1import{f as Ke,i as at,c as qe,o as be,a as I,j as At,t as Et,h as B,r as Fe,k as Qt,s as Qf,l as em,m as tm,n as $o,p as Ne,q as nr,w as ee,b as pe,v as tt,x as im,y as gs,z as _s,A as Ot,B as wc,C as rr,D as Nn,E as cu,F as qr,G as ay,H as Na,J as Lr,T as oy,K as Cf,L as rm,M as ly,N as uy,O as nm,P as cy,Q as da,R as sm,S as hy,U as am,V as ys,W as dy,X as py,Y as vs,Z as Sd,d as kr,$ as fy,a0 as my,a1 as gy,a2 as _y,a3 as fd,I as un,g as na,a4 as Td,a5 as wr,a6 as Sc,a7 as Tc,a8 as Zo,_ as zd,u as yy,a9 as vy,aa as au,ab as ou}from"./ZmefSjRN.js";import{_ as xy}from"./yhmtF68i.js";import{p as om,n as by,a as Af}from"./BXC3_ykx.js";function aa(f){return typeof f!="string"?f:f.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(y){var x=(y.charCodeAt(0)&15)<<12|(y.charCodeAt(1)&63)<<6|y.charCodeAt(2)&63;return String.fromCharCode(x)}).replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(y){var x=(y.charCodeAt(0)&31)<<6|y.charCodeAt(1)&63;return String.fromCharCode(x)})}const wy={class:"flex flex-col max-w-[300px] text-2xl"},ky={class:"text-govblue"},Sy={key:0,class:"text-sm font-bold m-0 p-0"},Ty={class:"mb-4 font-semibold"},zy={key:1,class:"text-sm font-bold m-0 p-0"},Cy={class:"mb-4 font-semibold"},Ay={key:2,class:"text-sm font-bold m-0 p-0"},Py={class:"font-semibold"},Iy={key:3,class:"font-semibold m-0 p-0"},Ey={key:0},My={key:1},Dy={key:2},Ly={key:3},Ry=Ke({__name:"RegionInfo",props:["dataProperties"],setup(f){function _(x){return aa(f.dataProperties[x])}const y=at(()=>{const x=f.dataProperties.straatnamen.split(",");return x.length>1?x.slice(0,-1).join(", ")+", en "+x[x.length-1]:x[0]});return(x,C)=>(be(),qe("div",wy,[I("div",ky,[f.dataProperties.gm_naam?(be(),qe("h3",Sy,"Gemeente")):At("",!0),I("h3",Ty,Et(_("gm_naam")),1),f.dataProperties.zorgregio_naam?(be(),qe("h3",zy,"Zorgregio")):At("",!0),I("h3",Cy,Et(_("zorgregio_naam")),1),f.dataProperties.bu_naam?(be(),qe("h3",Ay,"Buurt")):At("",!0),I("h3",Py,Et(_("bu_naam")),1),f.dataProperties.pand_id?(be(),qe("div",Iy,[f.dataProperties.zorgorganisatie?(be(),qe("h3",Ey,Et(_("zorgorganisatie")),1)):f.dataProperties.aantal_woningen_in_pand>1?(be(),qe("h3",My," Pand met "+Et(_("aantal_woningen_in_pand"))+" woningen gelegen aan "+Et(B(y)),1)):f.dataProperties.postcode?(be(),qe("h3",Dy,Et(_("straat"))+" "+Et(_("huisnummer"))+", "+Et(_("postcode")),1)):(be(),qe("h3",Ly," Geen adres gegevens beschikbaar"))])):At("",!0)])]))}}),By=["href"],Fy=["src"],Oy=Ke({__name:"StreetView",props:["dataProperties"],setup(f){function _(w){return w.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}let y=Fe(f.dataProperties.straat),x=Fe(" "+f.dataProperties.huisnummer+","+f.dataProperties.postcode),C=Fe(`http://maps.google.com/maps?q=${_(y.value)}${encodeURIComponent(x.value)}`),L=Fe(`/api/streetview?location=${_(y.value)}${encodeURIComponent(x.value)}`);return Qt(()=>f.dataProperties,w=>{y=Fe(f.dataProperties.straat),x=Fe(" "+f.dataProperties.huisnummer+","+f.dataProperties.postcode),C=Fe(`http://maps.google.com/maps?q=${_(y.value)}${encodeURIComponent(x.value)}`),L=Fe(`/api/streetview?location=${_(y.value)}${encodeURIComponent(x.value)}`)}),(w,l)=>(be(),qe("div",null,[I("a",{id:"streetview-link",target:"_blank",href:B(C)},[(be(),qe("img",{id:"streetview-img",src:B(L),key:B(L),alt:"Street View Image",title:"Street View Image",loading:"eager"},null,8,Fy))],8,By)]))}}),$y=["top","right","bottom","left"],oa=Math.min,ln=Math.max,zc=Math.round,gc=Math.floor,Un=f=>({x:f,y:f}),jy={left:"right",right:"left",bottom:"top",top:"bottom"},Vy={start:"end",end:"start"};function md(f,_,y){return ln(f,oa(_,y))}function fs(f,_){return typeof f=="function"?f(_):f}function ms(f){return f.split("-")[0]}function Ho(f){return f.split("-")[1]}function Cd(f){return f==="x"?"y":"x"}function Ad(f){return f==="y"?"height":"width"}function la(f){return["top","bottom"].includes(ms(f))?"y":"x"}function Pd(f){return Cd(la(f))}function Ny(f,_,y){y===void 0&&(y=!1);const x=Ho(f),C=Pd(f),L=Ad(C);let w=C==="x"?x===(y?"end":"start")?"right":"left":x==="start"?"bottom":"top";return _.reference[L]>_.floating[L]&&(w=Cc(w)),[w,Cc(w)]}function Uy(f){const _=Cc(f);return[gd(f),_,gd(_)]}function gd(f){return f.replace(/start|end/g,_=>Vy[_])}function Gy(f,_,y){const x=["left","right"],C=["right","left"],L=["top","bottom"],w=["bottom","top"];switch(f){case"top":case"bottom":return y?_?C:x:_?x:C;case"left":case"right":return _?L:w;default:return[]}}function qy(f,_,y,x){const C=Ho(f);let L=Gy(ms(f),y==="start",x);return C&&(L=L.map(w=>w+"-"+C),_&&(L=L.concat(L.map(gd)))),L}function Cc(f){return f.replace(/left|right|bottom|top/g,_=>jy[_])}function Zy(f){return{top:0,right:0,bottom:0,left:0,...f}}function lm(f){return typeof f!="number"?Zy(f):{top:f,right:f,bottom:f,left:f}}function Ac(f){const{x:_,y,width:x,height:C}=f;
vendor: 10,788 bytes, line 1
1return{width:x,height:C,top:y,left:_,right:_+x,bottom:y+C,x:_,y}}function Pf(f,_,y){let{reference:x,floating:C}=f;const L=la(_),w=Pd(_),l=Ad(w),U=ms(_),W=L==="y",G=x.x+x.width/2-C.width/2,F=x.y+x.height/2-C.height/2,T=x[l]/2-C[l]/2;let re;switch(U){case"top":re={x:G,y:x.y-C.height};break;case"bottom":re={x:G,y:x.y+x.height};break;case"right":re={x:x.x+x.width,y:F};break;case"left":re={x:x.x-C.width,y:F};break;default:re={x:x.x,y:x.y}}switch(Ho(_)){case"start":re[w]-=T*(y&&W?-1:1);break;case"end":re[w]+=T*(y&&W?-1:1);break}return re}const Hy=async(f,_,y)=>{const{placement:x="bottom",strategy:C="absolute",middleware:L=[],platform:w}=y,l=L.filter(Boolean),U=await(w.isRTL==null?void 0:w.isRTL(_));let W=await w.getElementRects({reference:f,floating:_,strategy:C}),{x:G,y:F}=Pf(W,x,U),T=x,re={},fe=0;for(let ye=0;ye<l.length;ye++){const{name:de,fn:ge}=l[ye],{x:ae,y:le,data:Ze,reset:Ue}=await ge({x:G,y:F,initialPlacement:x,placement:T,strategy:C,middlewareData:re,rects:W,platform:w,elements:{reference:f,floating:_}});G=ae??G,F=le??F,re={...re,[de]:{...re[de],...Ze}},Ue&&fe<=50&&(fe++,typeof Ue=="object"&&(Ue.placement&&(T=Ue.placement),Ue.rects&&(W=Ue.rects===!0?await w.getElementRects({reference:f,floating:_,strategy:C}):Ue.rects),{x:G,y:F}=Pf(W,T,U)),ye=-1)}return{x:G,y:F,placement:T,strategy:C,middlewareData:re}};async function hu(f,_){var y;_===void 0&&(_={});const{x,y:C,platform:L,rects:w,elements:l,strategy:U}=f,{boundary:W="clippingAncestors",rootBoundary:G="viewport",elementContext:F="floating",altBoundary:T=!1,padding:re=0}=fs(_,f),fe=lm(re),de=l[T?F==="floating"?"reference":"floating":F],ge=Ac(await L.getClippingRect({element:(y=await(L.isElement==null?void 0:L.isElement(de)))==null||y?de:de.contextElement||await(L.getDocumentElement==null?void 0:L.getDocumentElement(l.floating)),boundary:W,rootBoundary:G,strategy:U})),ae=F==="floating"?{x,y:C,width:w.floating.width,height:w.floating.height}:w.reference,le=await(L.getOffsetParent==null?void 0:L.getOffsetParent(l.floating)),Ze=await(L.isElement==null?void 0:L.isElement(le))?await(L.getScale==null?void 0:L.getScale(le))||{x:1,y:1}:{x:1,y:1},Ue=Ac(L.convertOffsetParentRelativeRectToViewportRelativeRect?await L.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:ae,offsetParent:le,strategy:U}):ae);return{top:(ge.top-Ue.top+fe.top)/Ze.y,bottom:(Ue.bottom-ge.bottom+fe.bottom)/Ze.y,left:(ge.left-Ue.left+fe.left)/Ze.x,right:(Ue.right-ge.right+fe.right)/Ze.x}}const Wy=f=>({name:"arrow",options:f,async fn(_){const{x:y,y:x,placement:C,rects:L,platform:w,elements:l,middlewareData:U}=_,{element:W,padding:G=0}=fs(f,_)||{};if(W==null)return{};const F=lm(G),T={x:y,y:x},re=Pd(C),fe=Ad(re),ye=await w.getDimensions(W),de=re==="y",ge=de?"top":"left",ae=de?"bottom":"right",le=de?"clientHeight":"clientWidth",Ze=L.reference[fe]+L.reference[re]-T[re]-L.floating[fe],Ue=T[re]-L.reference[re],wt=await(w.getOffsetParent==null?void 0:w.getOffsetParent(W));let Ge=wt?wt[le]:0;(!Ge||!await(w.isElement==null?void 0:w.isElement(wt)))&&(Ge=l.floating[le]||L.floating[fe]);const P=Ze/2-Ue/2,Te=Ge/2-ye[fe]/2-1,Ae=oa(F[ge],Te),Pt=oa(F[ae],Te),_t=Ae,Ct=Ge-ye[fe]-Pt,Lt=Ge/2-ye[fe]/2+P,wi=md(_t,Lt,Ct),ri=!U.arrow&&Ho(C)!=null&&Lt!==wi&&L.reference[fe]/2-(Lt<_t?Ae:Pt)-ye[fe]/2<0,hi=ri?Lt<_t?Lt-_t:Lt-Ct:0;return{[re]:T[re]+hi,data:{[re]:wi,centerOffset:Lt-wi-hi,...ri&&{alignmentOffset:hi}},reset:ri}}}),Xy=function(f){return f===void 0&&(f={}),{name:"flip",options:f,async fn(_){var y,x;const{placement:C,middlewareData:L,rects:w,initialPlacement:l,platform:U,elements:W}=_,{mainAxis:G=!0,crossAxis:F=!0,fallbackPlacements:T,fallbackStrategy:re="bestFit",fallbackAxisSideDirection:fe="none",flipAlignment:ye=!0,...de}=fs(f,_);if((y=L.arrow)!=null&&y.alignmentOffset)return{};const ge=ms(C),ae=la(l),le=ms(l)===l,Ze=await(U.isRTL==null?void 0:U.isRTL(W.floating)),Ue=T||(le||!ye?[Cc(l)]:Uy(l)),wt=fe!=="none";!T&&wt&&Ue.push(...qy(l,ye,fe,Ze));const Ge=[l,...Ue],P=await hu(_,de),Te=[];let Ae=((x=L.flip)==null?void 0:x.overflows)||[];if(G&&Te.push(P[ge]),F){const Lt=Ny(C,w,Ze);Te.push(P[Lt[0]],P[Lt[1]])}if(Ae=[...Ae,{placement:C,overflows:Te}],!Te.every(Lt=>Lt<=0)){var Pt,_t;const Lt=(((Pt=L.flip)==null?void 0:Pt.index)||0)+1,wi=Ge[Lt];if(wi)return{data:{index:Lt,overflows:Ae},reset:{placement:wi}};let ri=(_t=Ae.filter(hi=>hi.overflows[0]<=0).sort((hi,Di)=>hi.overflows[1]-Di.overflows[1])[0])==null?void 0:_t.placement;if(!ri)switch(re){case"bestFit":{var Ct;const hi=(Ct=Ae.filter(Di=>{if(wt){const xi=la(Di.placement);return xi===ae||xi==="y"}return!0}).map(Di=>[Di.placement,Di.overflows.filter(xi=>xi>0).reduce((xi,Ui)=>xi+Ui,0)]).sort((Di,xi)=>Di[1]-xi[1])[0])==null?void 0:Ct[0];hi&&(ri=hi);break}case"initialPlacement":ri=l;break}if(C!==ri)return{reset:{placement:ri}}}return{}}}};function If(f,_){return{top:f.top-_.height,right:f.right-_.width,bottom:f.bottom-_.height,left:f.left-_.width}}function Ef(f){return $y.some(_=>f[_]>=0)}const Ky=function(f){return f===void 0&&(f={}),{name:"hide",options:f,async fn(_){const{rects:y}=_,{strategy:x="referenceHidden",...C}=fs(f,_);switch(x){case"referenceHidden":{const L=await hu(_,{...C,elementContext:"reference"}),w=If(L,y.reference);return{data:{referenceHiddenOffsets:w,referenceHidden:Ef(w)}}}case"escaped":{const L=await hu(_,{...C,altBoundary:!0}),w=If(L,y.floating);return{data:{escapedOffsets:w,escaped:Ef(w)}}}default:return{}}}}};async function Yy(f,_){const{placement:y,platform:x,elements:C}=f,L=await(x.isRTL==null?void 0:x.isRTL(C.floating)),w=ms(y),l=Ho(y),U=la(y)==="y",W=["left","top"].includes(w)?-1:1,G=L&&U?-1:1,F=fs(_,f);let{mainAxis:T,crossAxis:re,alignmentAxis:fe}=typeof F=="number"?{mainAxis:F,crossAxis:0,alignmentAxis:null}:{mainAxis:F.mainAxis||0,crossAxis:F.crossAxis||0,alignmentAxis:F.alignmentAxis};return l&&typeof fe=="number"&&(re=l==="end"?fe*-1:fe),U?{x:re*G,y:T*W}:{x:T*W,y:re*G}}const Jy=function(f){return f===void 0&&(f=0),{name:"offset",options:f,async fn(_){var y,x;const{x:C,y:L,placement:w,middlewareData:l}=_,U=await Yy(_,f);return w===((y=l.offset)==null?void 0:y.placement)&&(x=l.arrow)!=null&&x.alignmentOffset?{}:{x:C+U.x,y:L+U.y,data:{...U,placement:w}}}}},Qy=function(f){return f===void 0&&(f={}),{name:"shift",options:f,async fn(_){const{x:y,y:x,placement:C}=_,{mainAxis:L=!0,crossAxis:w=!1,limiter:l={fn:de=>{let{x:ge,y:ae}=de;return{x:ge,y:ae}}},...U}=fs(f,_),W={x:y,y:x},G=await hu(_,U),F=la(ms(C)),T=Cd(F);let re=W[T],fe=W[F];if(L){const de=T==="y"?"top":"left",ge=T==="y"?"bottom":"right",ae=re+G[de],le=re-G[ge];re=md(ae,re,le)}if(w){const de=F==="y"?"top":"left",ge=F==="y"?"bottom":"right",ae=fe+G[de],le=fe-G[ge];fe=md(ae,fe,le)}const ye=l.fn({..._,[T]:re,[F]:fe});return{...ye,data:{x:ye.x-y,y:ye.y-x,enabled:{[T]:L,[F]:w}}}}}},ev=function(f){return f===void 0&&(f={}),{options:f,fn(_){const{x:y,y:x,placement:C,rects:L,middlewareData:w}=_,{offset:l=0,mainAxis:U=!0,crossAxis:W=!0}=fs(f,_),G={x:y,y:x},F=la(C),T=Cd(F);let re=G[T],fe=G[F];const ye=fs(l,_),de=typeof ye=="number"?{mainAxis:ye,crossAxis:0}:{mainAxis:0,crossAxis:0,...ye};if(U){const le=T==="y"?"height":"width",Ze=L.reference[T]-L.floating[le]+de.mainAxis,Ue=L.reference[T]+L.reference[le]-de.mainAxis;re<Ze?re=Ze:re>Ue&&(re=Ue)}if(W){var ge,ae;const le=T==="y"?"width":"height",Ze=["top","left"].includes(ms(C)),Ue=L.reference[F]-L.floating[le]+(Ze&&((ge=w.offset)==null?void 0:ge[F])||0)+(Ze?0:de.crossAxis),wt=L.reference[F]+L.reference[le]+(Ze?0:((ae=w.offset)==null?void 0:ae[F])||0)-(Ze?de.crossAxis:0);fe<Ue?fe=Ue:fe>wt&&(fe=wt)}return{[T]:re,[F]:fe}}}},tv=function(f){return f===void 0&&(f={}),{name:"size",options:f,async fn(_){var y,x;const{placement:C,rects:L,platform:w,elements:l}=_,{apply:U=()=>{},...W}=fs(f,_),G=await hu(_,W),F=ms(C),T=Ho(C),re=la(C)==="y",{width:fe,height:ye}=L.floating;let de,ge;F==="top"||F==="bottom"?(de=F,ge=T===(await(w.isRTL==null?void 0:w.isRTL(l.floating))?"start":"end")?"left":"right"):(ge=F,de=T==="end"?"top":"bottom");const ae=ye-G.top-G.bottom,le=fe-G.left-G.right,Ze=oa(ye-G[de],ae),Ue=oa(fe-G[ge],le),wt=!_.middlewareData.shift;let Ge=Ze,P=Ue;if((y=_.middlewareData.shift)!=null&&y.enabled.x&&(P=le),(x=_.middlewareData.shift)!=null&&x.enabled.y&&(Ge=ae),wt&&!T){const Ae=ln(G.left,0),Pt=ln(G.right,0),_t=ln(G.top,0),Ct=ln(G.bottom,0);re?P=fe-2*(Ae!==0||Pt!==0?Ae+Pt:ln(G.left,G.right)):Ge=ye-2*(_t!==0||Ct!==0?_t+Ct:ln(G.top,G.bottom))}await U({..._,availableWidth:P,availableHeight:Ge});const Te=await w.getDimensions(l.floating);return fe!==Te.width||ye!==Te.height?{reset:{rects:!0}}:{}}}};function Ic(){return typeof window<"u"}function Ua(f){return Id(f)?(f.nodeName||"").toLowerCase():"#document"}function cn(f){var _;return(f==null||(_=f.ownerDocument)==null?void 0:_.defaultView)||window}function Zn(f){var _;return(_=(Id(f)?f.ownerDocument:f.document)||window.document)==null?void 0:_.documentElement}function Id(f){return Ic()?f instanceof Node||f instanceof cn(f).Node:!1}function In(f){return Ic()?f instanceof Element||f instanceof cn(f).Element:!1}function qn(f){return Ic()?f instanceof HTMLElement||f instanceof cn(f).HTMLElement:!1}function Mf(f){return!Ic()||typeof ShadowRoot>"u"?!1:f instanceof ShadowRoot||f instanceof cn(f).ShadowRoot}function pu(f){const{overflow:_,overflowX:y,overflowY:x,display:C}=En(f);return/auto|scroll|overlay|hidden|clip/.test(_+x+y)&&!["inline","contents"].includes(C)}function iv(f){return["table","td","th"].includes(Ua(f))}function Ec(f){return[":popover-open",":modal"].some(_=>{try{return f.matches(_)}catch{return!1}})}function Ed(f){const _=Md(),y=In(f)?En(f):f;return["transform","translate","scale","rotate","perspective"].some(x=>y[x]?y[x]!=="none":!1)||(y.containerType?y.containerType!=="normal":!1)||!_&&(y.backdropFilter?y.backdropFilter!=="none":!1)||!_&&(y.filter?y.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(x=>(y.willChange||"").includes(x))||["paint","layout","strict","content"].some(x=>(y.contain||"").includes(x))}function rv(f){let _=ua(f);for(;qn(_)&&!Go(_);){if(Ed(_))return _;if(Ec(_))return null;_=ua(_)}return null}function Md(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Go(f){return["html","body","#document"].includes(Ua(f))}function En(f){return cn(f).getComputedStyle(f)}function Mc(f){return In(f)?{scrollLeft:f.scrollLeft,scrollTop:f.scrollTop}:{scrollLeft:f.scrollX,scrollTop:f.scrollY}}function ua(f){if(Ua(f)==="html")return f;const _=f.assignedSlot||f.parentNode||Mf(f)&&f.host||Zn(f);return Mf(_)?_.host:_}function um(f){const _=ua(f);return Go(_)?f.ownerDocument?f.ownerDocument.body:f.body:qn(_)&&pu(_)?_:um(_)}function du(f,_,y){var x;_===void 0&&(_=[]),y===void 0&&(y=!0);const C=um(f),L=C===((x=f.ownerDocument)==null?void 0:x.body),w=cn(C);if(L){const l=_d(w);
vendor: 4,339 bytes, line 1
1return _.concat(w,w.visualViewport||[],pu(C)?C:[],l&&y?du(l):[])}return _.concat(C,du(C,[],y))}function _d(f){return f.parent&&Object.getPrototypeOf(f.parent)?f.frameElement:null}function cm(f){const _=En(f);let y=parseFloat(_.width)||0,x=parseFloat(_.height)||0;const C=qn(f),L=C?f.offsetWidth:y,w=C?f.offsetHeight:x,l=zc(y)!==L||zc(x)!==w;return l&&(y=L,x=w),{width:y,height:x,$:l}}function Dd(f){return In(f)?f:f.contextElement}function No(f){const _=Dd(f);if(!qn(_))return Un(1);const y=_.getBoundingClientRect(),{width:x,height:C,$:L}=cm(_);let w=(L?zc(y.width):y.width)/x,l=(L?zc(y.height):y.height)/C;return(!w||!Number.isFinite(w))&&(w=1),(!l||!Number.isFinite(l))&&(l=1),{x:w,y:l}}const nv=Un(0);function hm(f){const _=cn(f);return!Md()||!_.visualViewport?nv:{x:_.visualViewport.offsetLeft,y:_.visualViewport.offsetTop}}function sv(f,_,y){return _===void 0&&(_=!1),!y||_&&y!==cn(f)?!1:_}function ja(f,_,y,x){_===void 0&&(_=!1),y===void 0&&(y=!1);const C=f.getBoundingClientRect(),L=Dd(f);let w=Un(1);_&&(x?In(x)&&(w=No(x)):w=No(f));const l=sv(L,y,x)?hm(L):Un(0);let U=(C.left+l.x)/w.x,W=(C.top+l.y)/w.y,G=C.width/w.x,F=C.height/w.y;if(L){const T=cn(L),re=x&&In(x)?cn(x):x;let fe=T,ye=_d(fe);for(;ye&&x&&re!==fe;){const de=No(ye),ge=ye.getBoundingClientRect(),ae=En(ye),le=ge.left+(ye.clientLeft+parseFloat(ae.paddingLeft))*de.x,Ze=ge.top+(ye.clientTop+parseFloat(ae.paddingTop))*de.y;U*=de.x,W*=de.y,G*=de.x,F*=de.y,U+=le,W+=Ze,fe=cn(ye),ye=_d(fe)}}return Ac({width:G,height:F,x:U,y:W})}function Ld(f,_){const y=Mc(f).scrollLeft;return _?_.left+y:ja(Zn(f)).left+y}function dm(f,_,y){y===void 0&&(y=!1);const x=f.getBoundingClientRect(),C=x.left+_.scrollLeft-(y?0:Ld(f,x)),L=x.top+_.scrollTop;return{x:C,y:L}}function av(f){let{elements:_,rect:y,offsetParent:x,strategy:C}=f;const L=C==="fixed",w=Zn(x),l=_?Ec(_.floating):!1;if(x===w||l&&L)return y;let U={scrollLeft:0,scrollTop:0},W=Un(1);const G=Un(0),F=qn(x);if((F||!F&&!L)&&((Ua(x)!=="body"||pu(w))&&(U=Mc(x)),qn(x))){const re=ja(x);W=No(x),G.x=re.x+x.clientLeft,G.y=re.y+x.clientTop}const T=w&&!F&&!L?dm(w,U,!0):Un(0);return{width:y.width*W.x,height:y.height*W.y,x:y.x*W.x-U.scrollLeft*W.x+G.x+T.x,y:y.y*W.y-U.scrollTop*W.y+G.y+T.y}}function ov(f){return Array.from(f.getClientRects())}function lv(f){const _=Zn(f),y=Mc(f),x=f.ownerDocument.body,C=ln(_.scrollWidth,_.clientWidth,x.scrollWidth,x.clientWidth),L=ln(_.scrollHeight,_.clientHeight,x.scrollHeight,x.clientHeight);let w=-y.scrollLeft+Ld(f);const l=-y.scrollTop;return En(x).direction==="rtl"&&(w+=ln(_.clientWidth,x.clientWidth)-C),{width:C,height:L,x:w,y:l}}function uv(f,_){const y=cn(f),x=Zn(f),C=y.visualViewport;let L=x.clientWidth,w=x.clientHeight,l=0,U=0;if(C){L=C.width,w=C.height;const W=Md();(!W||W&&_==="fixed")&&(l=C.offsetLeft,U=C.offsetTop)}return{width:L,height:w,x:l,y:U}}function cv(f,_){const y=ja(f,!0,_==="fixed"),x=y.top+f.clientTop,C=y.left+f.clientLeft,L=qn(f)?No(f):Un(1),w=f.clientWidth*L.x,l=f.clientHeight*L.y,U=C*L.x,W=x*L.y;return{width:w,height:l,x:U,y:W}}function Df(f,_,y){let x;if(_==="viewport")x=uv(f,y);else if(_==="document")x=lv(Zn(f));else if(In(_))x=cv(_,y);else{const C=hm(f);x={x:_.x-C.x,y:_.y-C.y,width:_.width,height:_.height}}return Ac(x)}function pm(f,_){const y=ua(f);return y===_||!In(y)||Go(y)?!1:En(y).position==="fixed"||pm(y,_)}function hv(f,_){const y=_.get(f);if(y)return y;let x=du(f,[],!1).filter(l=>In(l)&&Ua(l)!=="body"),C=null;const L=En(f).position==="fixed";let w=L?ua(f):f;for(;In(w)&&!Go(w);){const l=En(w),U=Ed(w);!U&&l.position==="fixed"&&(C=null),(L?!U&&!C:!U&&l.position==="static"&&!!C&&["absolute","fixed"].includes(C.position)||pu(w)&&!U&&pm(f,w))?x=x.filter(G=>G!==w):C=l,w=ua(w)}return _.set(f,x),x}function dv(f){let{element:_,boundary:y,rootBoundary:x,strategy:C}=f;const w=[...y==="clippingAncestors"?Ec(_)?[]:hv(_,this._c):[].concat(y),x],l=w[0],U=w.reduce((W,G)=>{const F=Df(_,G,C);return W.top=ln(F.top,W.top),W.right=oa(F.right,W.right),W.bottom=oa(F.bottom,W.bottom),W.left=ln(F.left,W.left),W},Df(_,l,C));return{width:U.right-U.left,height:U.bottom-U.top,x:U.left,y:U.top}}function pv(f){const{width:_,height:y}=cm(f);return{width:_,height:y}}function fv(f,_,y){const x=qn(_),C=Zn(_),L=y==="fixed",w=ja(f,!0,L,_);let l={scrollLeft:0,scrollTop:0};const U=Un(0);if(x||!x&&!L)if((Ua(_)!=="body"||pu(C))&&(l=Mc(_)),x){const T=ja(_,!0,L,_);
1U.x=T.x+_.clientLeft,U.y=T.y+_.clientTop}else C&&(U.x=Ld(C));const W=C&&!x&&!L?dm(C,l):Un(0),G=w.left+l.scrollLeft-U.x-W.x,F=w.top+l.scrollTop-U.y-W.y;return{x:G,y:F,width:w.width,height:w.height}}function ad(f){return En(f).position==="static"}function Lf(f,_){if(!qn(f)||En(f).position==="fixed")return null;if(_)return _(f);let y=f.offsetParent;return Zn(f)===y&&(y=y.ownerDocument.body),y}function fm(f,_){const y=cn(f);if(Ec(f))return y;if(!qn(f)){let C=ua(f);for(;C&&!Go(C);){if(In(C)&&!ad(C))return C;C=ua(C)}return y}let x=Lf(f,_);for(;x&&iv(x)&&ad(x);)x=Lf(x,_);return x&&Go(x)&&ad(x)&&!Ed(x)?y:x||rv(f)||y}const mv=async function(f){const _=this.getOffsetParent||fm,y=this.getDimensions,x=await y(f.floating);return{reference:fv(f.reference,await _(f.floating),f.strategy),floating:{x:0,y:0,width:x.width,height:x.height}}};function gv(f){return En(f).direction==="rtl"}const _v={convertOffsetParentRelativeRectToViewportRelativeRect:av,getDocumentElement:Zn,getClippingRect:dv,getOffsetParent:fm,getElementRects:mv,getClientRects:ov,getDimensions:pv,getScale:No,isElement:In,isRTL:gv};function mm(f,_){return f.x===_.x&&f.y===_.y&&f.width===_.width&&f.height===_.height}function yv(f,_){let y=null,x;const C=Zn(f);function L(){var l;clearTimeout(x),(l=y)==null||l.disconnect(),y=null}function w(l,U){l===void 0&&(l=!1),U===void 0&&(U=1),L();const W=f.getBoundingClientRect(),{left:G,top:F,width:T,height:re}=W;if(l||_(),!T||!re)return;const fe=gc(F),ye=gc(C.clientWidth-(G+T)),de=gc(C.clientHeight-(F+re)),ge=gc(G),le={rootMargin:-fe+"px "+-ye+"px "+-de+"px "+-ge+"px",threshold:ln(0,oa(1,U))||1};let Ze=!0;function Ue(wt){const Ge=wt[0].intersectionRatio;if(Ge!==U){if(!Ze)return w();Ge?w(!1,Ge):x=setTimeout(()=>{w(!1,1e-7)},1e3)}Ge===1&&!mm(W,f.getBoundingClientRect())&&w(),Ze=!1}try{y=new IntersectionObserver(Ue,{...le,root:C.ownerDocument})}catch{y=new IntersectionObserver(Ue,le)}y.observe(f)}return w(!0),L}function vv(f,_,y,x){x===void 0&&(x={});const{ancestorScroll:C=!0,ancestorResize:L=!0,elementResize:w=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:U=!1}=x,W=Dd(f),G=C||L?[...W?du(W):[],...du(_)]:[];G.forEach(ge=>{C&&ge.addEventListener("scroll",y,{passive:!0}),L&&ge.addEventListener("resize",y)});const F=W&&l?yv(W,y):null;let T=-1,re=null;w&&(re=new ResizeObserver(ge=>{let[ae]=ge;ae&&ae.target===W&&re&&(re.unobserve(_),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var le;(le=re)==null||le.observe(_)})),y()}),W&&!U&&re.observe(W),re.observe(_));let fe,ye=U?ja(f):null;U&&de();function de(){const ge=ja(f);ye&&!mm(ye,ge)&&y(),ye=ge,fe=requestAnimationFrame(de)}return y(),()=>{var ge;G.forEach(ae=>{C&&ae.removeEventListener("scroll",y),L&&ae.removeEventListener("resize",y)}),F==null||F(),(ge=re)==null||ge.disconnect(),re=null,U&&cancelAnimationFrame(fe)}}const xv=Jy,bv=Qy,Rf=Xy,wv=tv,kv=Ky,Sv=Wy,Tv=ev,zv=(f,_,y)=>{const x=new Map,C={platform:_v,...y},L={...C.platform,_c:x};return Hy(f,_,{...C,platform:L})};function Cv(f){return f!=null&&typeof f=="object"&&"$el"in f}function yd(f){if(Cv(f)){const _=f.$el;return Id(_)&&Ua(_)==="#comment"?null:_}return f}function Vo(f){return typeof f=="function"?f():B(f)}function Av(f){return{name:"arrow",options:f,fn(_){const y=yd(Vo(f.element));return y==null?{}:Sv({element:y,padding:f.padding}).fn(_)}}}function gm(f){return typeof window>"u"?1:(f.ownerDocument.defaultView||window).devicePixelRatio||1}function Bf(f,_){const y=gm(f);return Math.round(_*y)/y}function Pv(f,_,y){y===void 0&&(y={});const x=y.whileElementsMounted,C=at(()=>{var Ge;return(Ge=Vo(y.open))!=null?Ge:!0}),L=at(()=>Vo(y.middleware)),w=at(()=>{var Ge;return(Ge=Vo(y.placement))!=null?Ge:"bottom"}),l=at(()=>{var Ge;return(Ge=Vo(y.strategy))!=null?Ge:"absolute"}),U=at(()=>{var Ge;return(Ge=Vo(y.transform))!=null?Ge:!0}),W=at(()=>yd(f.value)),G=at(()=>yd(_.value)),F=Fe(0),T=Fe(0),re=Fe(l.value),fe=Fe(w.value),ye=Qf({}),de=Fe(!1),ge=at(()=>{const Ge={position:re.value,left:"0",top:"0"};if(!G.value)return Ge;const P=Bf(G.value,F.value),Te=Bf(G.value,T.value);return U.value?{...Ge,transform:"translate("+P+"px, "+Te+"px)",...gm(G.value)>=1.5&&{willChange:"transform"}}
1:{position:re.value,left:P+"px",top:Te+"px"}});let ae;function le(){if(W.value==null||G.value==null)return;const Ge=C.value;zv(W.value,G.value,{middleware:L.value,placement:w.value,strategy:l.value}).then(P=>{F.value=P.x,T.value=P.y,re.value=P.strategy,fe.value=P.placement,ye.value=P.middlewareData,de.value=Ge!==!1})}function Ze(){typeof ae=="function"&&(ae(),ae=void 0)}function Ue(){if(Ze(),x===void 0){le();return}if(W.value!=null&&G.value!=null){ae=x(W.value,G.value,le);return}}function wt(){C.value||(de.value=!1)}return Qt([L,w,l,C],le,{flush:"sync"}),Qt([W,G],Ue,{flush:"sync"}),Qt(C,wt,{flush:"sync"}),em()&&tm(Ze),{x:$o(F),y:$o(T),strategy:$o(re),placement:$o(fe),middlewareData:$o(ye),isPositioned:$o(de),floatingStyles:ge,update:le}}function Rr(f,_){const y=typeof f=="string"&&!_?`${f}Context`:_,x=Symbol(y);return[C=>{const L=ay(x,C);if(L||L===null)return L;throw new Error(`Injection \`${x.toString()}\` not found. Component must be used within ${Array.isArray(f)?`one of the following components: ${f.join(", ")}`:`\`${f}\``}`)},C=>(_y(x,C),C)]}function _m(f,_,y){const x=y.originalEvent.target,C=new CustomEvent(f,{bubbles:!1,cancelable:!0,detail:y});_&&x.addEventListener(f,_,{once:!0}),x.dispatchEvent(C)}function Iv(f,_=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY){return Math.min(y,Math.max(_,f))}function od(f){return f==null}function Ev(f,_){var y;const x=Qf();return Lr(()=>{x.value=f()},{..._,flush:(y=void 0)!=null?y:"sync"}),Sd(x)}function Wo(f){return em()?(tm(f),!0):!1}function Mv(){const f=new Set,_=y=>{f.delete(y)};return{on:y=>{f.add(y);const x=()=>_(y);return Wo(x),{off:x}},off:_,trigger:(...y)=>Promise.all(Array.from(f).map(x=>x(...y)))}}function Dv(f){let _=!1,y;const x=sm(!0);return(...C)=>(_||(y=x.run(()=>f(...C)),_=!0),y)}function Lv(f){let _=0,y,x;const C=()=>{_-=1,x&&_<=0&&(x.stop(),y=void 0,x=void 0)};return(...L)=>(_+=1,y||(x=sm(!0),y=x.run(()=>f(...L))),Wo(C),y)}function Gn(f){return typeof f=="function"?f():B(f)}const xs=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Rv=f=>typeof f<"u",Bv=Object.prototype.toString,Fv=f=>Bv.call(f)==="[object Object]",vd=()=>{},Ff=Ov();function Ov(){var f,_;return xs&&((f=window==null?void 0:window.navigator)==null?void 0:f.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((_=window==null?void 0:window.navigator)==null?void 0:_.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function ym(f,_){function y(...x){return new Promise((C,L)=>{Promise.resolve(f(()=>_.apply(this,x),{fn:_,thisArg:this,args:x})).then(C).catch(L)})}return y}const vm=f=>f();function $v(f,_={}){let y,x,C=vd;const L=w=>{clearTimeout(w),C(),C=vd};return w=>{const l=Gn(f),U=Gn(_.maxWait);return y&&L(y),l<=0||U!==void 0&&U<=0?(x&&(L(x),x=null),Promise.resolve(w())):new Promise((W,G)=>{C=_.rejectOnCancel?G:W,U&&!x&&(x=setTimeout(()=>{y&&L(y),x=null,W(w())},U)),y=setTimeout(()=>{x&&L(x),x=null,W(w())},l)})}}function jv(f=vm){const _=Fe(!0);function y(){_.value=!1}function x(){_.value=!0}const C=(...L)=>{_.value&&f(...L)};return{isActive:Sd(_),pause:y,resume:x,eventFilter:C}}function Vv(f){return Na()}function Nv(f,_=1e4){return gy((y,x)=>{let C=Gn(f),L;const w=()=>setTimeout(()=>{C=Gn(f),x()},Gn(_));return Wo(()=>{clearTimeout(L)}),{get(){return y(),C},set(l){C=l,x(),clearTimeout(L),L=w()}}})}function xm(f,_=200,y={}){return ym($v(_,y),f)}function Uv(f,_,y={}){const{eventFilter:x=vm,...C}=y;return Qt(f,ym(x,_),C)}function Of(f,_,y={}){const{eventFilter:x,...C}=y,{eventFilter:L,pause:w,resume:l,isActive:U}=jv(x);return{stop:Uv(f,_,{...C,eventFilter:L}),pause:w,resume:l,isActive:U}}function Gv(f,_,...[y]){const{flush:x="sync",deep:C=!1,immediate:L=!0,direction:w="both",transform:l={}}=y||{},U=[],W="ltr"in l&&l.ltr||(F=>F),G="rtl"in l&&l.rtl||(F=>F);return(w==="both"||w==="ltr")&&U.push(Of(f,F=>{U.forEach(T=>T.pause()),_.value=W(F),U.forEach(T=>T.resume())},{flush:x,deep:C,immediate:L})),(w==="both"||w==="rtl")&&U.push(Of(_,F=>{U.forEach(T=>T.pause()),f.value=G(F),U.forEach(T=>T.resume())},{flush:x,deep:C,immediate:L})),()=>
1{U.forEach(F=>F.stop())}}function qv(f,_){Vv()&&hy(f,_)}function bm(f,_,y={}){const{immediate:x=!0}=y,C=Fe(!1);let L=null;function w(){L&&(clearTimeout(L),L=null)}function l(){C.value=!1,w()}function U(...W){w(),C.value=!0,L=setTimeout(()=>{C.value=!1,L=null,f(...W)},Gn(_))}return x&&(C.value=!0,xs&&U()),Wo(l),{isPending:Sd(C),start:U,stop:l}}function Zv(f,_,y){const x=Qt(f,(...C)=>(vs(()=>x()),_(...C)),y);return x}function ca(f){var _;const y=Gn(f);return(_=y==null?void 0:y.$el)!=null?_:y}const Dc=xs?window:void 0;function Pc(...f){let _,y,x,C;if(typeof f[0]=="string"||Array.isArray(f[0])?([y,x,C]=f,_=Dc):[_,y,x,C]=f,!_)return vd;Array.isArray(y)||(y=[y]),Array.isArray(x)||(x=[x]);const L=[],w=()=>{L.forEach(G=>G()),L.length=0},l=(G,F,T,re)=>(G.addEventListener(F,T,re),()=>G.removeEventListener(F,T,re)),U=Qt(()=>[ca(_),Gn(C)],([G,F])=>{if(w(),!G)return;const T=Fv(F)?{...F}:F;L.push(...y.flatMap(re=>x.map(fe=>l(G,re,fe,T))))},{immediate:!0,flush:"post"}),W=()=>{U(),w()};return Wo(W),W}function Hv(f){return typeof f=="function"?f:typeof f=="string"?_=>_.key===f:Array.isArray(f)?_=>f.includes(_.key):()=>!0}function Wv(...f){let _,y,x={};f.length===3?(_=f[0],y=f[1],x=f[2]):f.length===2?typeof f[1]=="object"?(_=!0,y=f[0],x=f[1]):(_=f[0],y=f[1]):(_=!0,y=f[0]);const{target:C=Dc,eventName:L="keydown",passive:w=!1,dedupe:l=!1}=x,U=Hv(_);return Pc(C,L,W=>{W.repeat&&Gn(l)||U(W)&&y(W)},w)}function wm(){const f=Fe(!1),_=Na();return _&&nr(()=>{f.value=!0},_),f}function Xv(f){const _=wm();return at(()=>(_.value,!!f()))}function Kv(f){return JSON.parse(JSON.stringify(f))}function qo(f,_,y={}){const{window:x=Dc,...C}=y;let L;const w=Xv(()=>x&&"ResizeObserver"in x),l=()=>{L&&(L.disconnect(),L=void 0)},U=at(()=>Array.isArray(f)?f.map(F=>ca(F)):[ca(f)]),W=Qt(U,F=>{if(l(),w.value&&x){L=new ResizeObserver(_);for(const T of F)T&&L.observe(T,C)}},{immediate:!0,flush:"post"}),G=()=>{l(),W()};return Wo(G),{isSupported:w,stop:G}}function ha(f,_,y,x={}){var C,L,w;const{clone:l=!1,passive:U=!1,eventName:W,deep:G=!1,defaultValue:F,shouldEmit:T}=x,re=Na(),fe=y||(re==null?void 0:re.emit)||((C=re==null?void 0:re.$emit)==null?void 0:C.bind(re))||((w=(L=re==null?void 0:re.proxy)==null?void 0:L.$emit)==null?void 0:w.bind(re==null?void 0:re.proxy));let ye=W;_||(_="modelValue"),ye=ye||`update:${_.toString()}`;const de=le=>l?typeof l=="function"?l(le):Kv(le):le,ge=()=>Rv(f[_])?de(f[_]):F,ae=le=>{T?T(le)&&fe(ye,le):fe(ye,le)};if(U){const le=ge(),Ze=Fe(le);let Ue=!1;return Qt(()=>f[_],wt=>{Ue||(Ue=!0,Ze.value=de(wt),vs(()=>Ue=!1))}),Qt(Ze,wt=>{!Ue&&(wt!==f[_]||G)&&ae(wt)},{deep:G}),Ze}else return at({get(){return ge()},set(le){ae(le)}})}function Rd(f){return f?f.flatMap(_=>_.type===qr?Rd(_.children):[_]):[]}function sa(){let f=document.activeElement;if(f==null)return null;for(;f!=null&&f.shadowRoot!=null&&f.shadowRoot.activeElement!=null;)f=f.shadowRoot.activeElement;return f}const Yv=["INPUT","TEXTAREA"];function Jv(f,_,y,x={}){if(!_||x.enableIgnoredElement&&Yv.includes(_.nodeName))return null;const{arrowKeyOptions:C="both",attributeName:L="[data-radix-vue-collection-item]",itemsArray:w=[],loop:l=!0,dir:U="ltr",preventScroll:W=!0,focus:G=!1}=x,[F,T,re,fe,ye,de]=[f.key==="ArrowRight",f.key==="ArrowLeft",f.key==="ArrowUp",f.key==="ArrowDown",f.key==="Home",f.key==="End"],ge=re||fe,ae=F||T;if(!ye&&!de&&(!ge&&!ae||C==="vertical"&&ae||C==="horizontal"&&ge))return null;const le=y?Array.from(y.querySelectorAll(L)):w;if(!le.length)return null;W&&f.preventDefault();let Ze=null;return ae||ge?Ze=km(le,_,{goForward:ge?fe:U==="ltr"?F:T,loop:l}):ye?Ze=le.at(0)||null:de&&(Ze=le.at(-1)||null),G&&(Ze==null||Ze.focus()),Ze}function km(f,_,y,x=f.length){if(--x===0)return null;const C=f.indexOf(_),L=y.goForward?C+1:C-1;if(!y.loop&&(L<0||L>=f.length))return null;const w=(L+f.length)%f.length,l=f[w];return l?l.hasAttribute("disabled")&&l.getAttribute("disabled")!=="false"?km(f,l,y,x):l:null}function ld(f){if(f===null||typeof f!="object")return!1;const _=Object.getPrototypeOf(f);return _!==null&&_!==Object.prototype&&Object.getPrototypeOf(_)!==null||Symbol.iterator in f?!1:Symbol.toStringTag in f?Object.prototype.toString.call(f)==="[object Module]":!0}function xd(f,_,y=".",x){if(!ld(_))return xd(f,{},y);const C=Object.assign({},_);for(const L in f){if(L==="__proto__"||L==="constructor")continue;const w=f[L];w!=null&&(Array.isArray(w)&&Array.isArray(C[L])?C[L]=[...w,...C[L]]:ld(w)&&ld(C[L])?C[L]=xd(w,C[L],(y?`${y}.`:"")+L.toString()):C[L]=w)}return C}function Qv(f){return(..._)=>_.reduce((y,x)=>xd(y,x,""),{})}const ex=Qv(),[Lc,x2]=Rr("ConfigProvider");let tx="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ix=(f=21)=>{let _="",y=f;for(;y--;)_+=tx[Math.random()*64|0];return _};const rx=Lv(()=>{const f=Fe(new Map),_=Fe(),y=at(()=>{for(const w of f.value.values())if(w)return!0;return!1}),x=Lc({scrollBody:Fe(!0)});let C=null;const L=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=_.value??"",Ff&&(C==null||C()),_.value=void 0};return Qt(y,(w,l)=>{var U;if(!xs)return;if(!w){l&&L();return}_.value===void 0&&(_.value=document.body.style.overflow);const W=window.innerWidth-document.documentElement.clientWidth,G={padding:W,margin:0},F=(U=x.scrollBody)!=null&&U.value?typeof x.scrollBody.value=="object"?ex({padding:x.scrollBody.value.padding===!0?W:x.scrollBody.value.padding,margin:x.scrollBody.value.margin===!0?W:x.scrollBody.value.margin},G):G:{padding:0,margin:0};W>0&&(document.body.style.paddingRight=typeof F.padding=="number"?`${F.padding}px`:String(F.padding),document.body.style.marginRight=typeof F.margin=="number"?`${F.margin}px`:String(F.margin),document.body.style.setProperty("--scrollbar-width",`${W}px`),document.body.style.overflow="hidden"),Ff&&(C=Pc(document,"touchmove",T=>nx(T),{passive:!1})),vs(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),f});function Sm(f){const _=ix(6),y=rx();y.value.set(_,f);const x=at({get:()=>y.value.get(_)??!1,set:C=>y.value.set(_,C)});return qv(()=>{y.value.delete(_)}),x}function Tm(f){const _=window.getComputedStyle(f);if(_.overflowX==="scroll"||_.overflowY==="scroll"||_.overflowX==="auto"&&f.clientWidth<f.scrollWidth||_.overflowY==="auto"&&f.clientHeight<f.scrollHeight)return!0;{const y=f.parentNode;return!y||y.tagName==="BODY"?!1:Tm(y)}}function nx(f){const _=f||window.event,y=_.target;return y instanceof Element&&Tm(y)?!1:_.touches.length>1?!0:(_.preventDefault&&_.cancelable&&_.preventDefault(),!1)}function zm(f){const _=Lc({dir:Fe("ltr")});return at(()=>{var y;return(f==null?void 0:f.value)||((y=_.dir)==null?void 0:y.value)||"ltr"})}function Rc(f){const _=Na(),y=_==null?void 0:_.type.emits,x={};return y!=null&&y.length||console.warn(`No emitted event found. Please check component: ${_==null?void 0:_.type.__name}
1`),y==null||y.forEach(C=>{x[cy(nm(C))]=(...L)=>f(C,...L)}),x}let ud=0;function sx(){Lr(f=>{if(!xs)return;const _=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",_[0]??$f()),document.body.insertAdjacentElement("beforeend",_[1]??$f()),ud++,f(()=>{ud===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(y=>y.remove()),ud--})})}function $f(){const f=document.createElement("span");return f.setAttribute("data-radix-focus-guard",""),f.tabIndex=0,f.style.outline="none",f.style.opacity="0",f.style.position="fixed",f.style.pointerEvents="none",f}function ax(f){return at(()=>{var _;return Gn(f)?!!((_=ca(f))!=null&&_.closest("form")):!0})}function Bc(f){const _=Na(),y=Object.keys((_==null?void 0:_.type.props)??{}).reduce((C,L)=>{const w=(_==null?void 0:_.type.props[L]).default;return w!==void 0&&(C[L]=w),C},{}),x=uy(f);return at(()=>{const C={},L=(_==null?void 0:_.vnode.props)??{};return Object.keys(L).forEach(w=>{C[nm(w)]=L[w]}),Object.keys({...y,...C}).reduce((w,l)=>(x.value[l]!==void 0&&(w[l]=x.value[l]),w),{})})}function Ga(f,_){const y=Bc(f),x=_?Rc(_):{};return at(()=>({...y.value,...x}))}function kt(){const f=Na(),_=Fe(),y=at(()=>{var w,l;return["#text","#comment"].includes((w=_.value)==null?void 0:w.$el.nodeName)?(l=_.value)==null?void 0:l.$el.nextElementSibling:ca(_)}),x=Object.assign({},f.exposed),C={};for(const w in f.props)Object.defineProperty(C,w,{enumerable:!0,configurable:!0,get:()=>f.props[w]});if(Object.keys(x).length>0)for(const w in x)Object.defineProperty(C,w,{enumerable:!0,configurable:!0,get:()=>x[w]});Object.defineProperty(C,"$el",{enumerable:!0,configurable:!0,get:()=>f.vnode.el}),f.exposed=C;function L(w){_.value=w,!(w instanceof Element||!w)&&(Object.defineProperty(C,"$el",{enumerable:!0,configurable:!0,get:()=>w.$el}),f.exposed=C)}return{forwardRef:L,currentRef:_,currentElement:y}}function Cm(f,_){const y=Nv(!1,300),x=Fe(null),C=Mv();function L(){x.value=null,y.value=!1}function w(l,U){const W=l.currentTarget,G={x:l.clientX,y:l.clientY},F=ox(G,W.getBoundingClientRect()),T=lx(G,F),re=ux(U.getBoundingClientRect()),fe=hx([...T,...re]);x.value=fe,y.value=!0}return Lr(l=>{if(f.value&&_.value){const U=G=>w(G,_.value),W=G=>w(G,f.value);f.value.addEventListener("pointerleave",U),_.value.addEventListener("pointerleave",W),l(()=>{var G,F;(G=f.value)==null||G.removeEventListener("pointerleave",U),(F=_.value)==null||F.removeEventListener("pointerleave",W)})}}),Lr(l=>{var U;if(x.value){const W=G=>{var F,T;if(!x.value)return;const re=G.target,fe={x:G.clientX,y:G.clientY},ye=((F=f.value)==null?void 0:F.contains(re))||((T=_.value)==null?void 0:T.contains(re)),de=!cx(fe,x.value),ge=!!re.closest("[data-grace-area-trigger]");ye?L():(de||ge)&&(L(),C.trigger())};(U=f.value)==null||U.ownerDocument.addEventListener("pointermove",W),l(()=>{var G;return(G=f.value)==null?void 0:G.ownerDocument.removeEventListener("pointermove",W)})}}),{isPointerInTransit:y,onPointerExit:C.on}}function ox(f,_){const y=Math.abs(_.top-f.y),x=Math.abs(_.bottom-f.y),C=Math.abs(_.right-f.x),L=Math.abs(_.left-f.x);switch(Math.min(y,x,C,L)){case L:return"left";case C:return"right";case y:return"top";case x:return"bottom";default:throw new Error("unreachable")}}function lx(f,_,y=5){const x=[];switch(_){case"top":x.push({x:f.x-y,y:f.y+y},{x:f.x+y,y:f.y+y});break;case"bottom":x.push({x:f.x-y,y:f.y-y},{x:f.x+y,y:f.y-y});break;case"left":x.push({x:f.x+y,y:f.y-y},{x:f.x+y,y:f.y+y});break;case"right":x.push({x:f.x-y,y:f.y-y},{x:f.x-y,y:f.y+y});break}return x}function ux(f){const{top:_,right:y,bottom:x,left:C}=f;return[{x:C,y:_},{x:y,y:_},{x:y,y:x},{x:C,y:x}]}function cx(f,_){const{x:y,y:x}=f;let C=!1;for(let L=0,w=_.length-1;L<_.length;w=L++){const l=_[L].x,U=_[L].y,W=_[w].x,G=_[w].y;U>x!=G>x&&y<(W-l)*(x-U)/(G-U)+l&&(C=!C)}return C}function hx(f){const _=f.slice();return _.sort((y,x)=>y.x<x.x?-1:y.x>x.x?1:y.y<x.y?-1:y.y>x.y?1:0),dx(_)}function dx(f){if(f.length<=1)return f.slice();const _=[];for(let x=0;x<f.length;x++){const C=f[x];for(;_.length>=2;){const L=_[_.length-1],w=_[_.length-2];if((L.x-w.x)*(C.y-w.y)>=(L.y-w.y)*(C.x-w.x))_.pop();else break}_.push(C)}_.pop();const y=[];for(let x=f.length-1;x>=0;x--){const C=f[x];for(;y.length>=2;){const L=y[y.length-1],w=y[y.length-2];if((L.x-w.x)*(C.y-w.y)>=(L.y-w.y)*(C.x-w.x))y.pop();else break}y.push(C)}return y.pop(),_.length===1&&y.length===1&&_[0].x===y[0].x&&_[0].y===y[0].y?_:_.concat(y)}var px=function(f){if(typeof document>"u")return null;var _=Array.isArray(f)?f[0]:f;return _.ownerDocument.body},jo=new WeakMap,_c=new WeakMap,yc={},cd=0,Am=function(f){return f&&(f.host||Am(f.parentNode))},fx=function(f,_){return _.map(function(y){if(f.contains(y))return y;var x=Am(y);return x&&f.contains(x)?x:(console.error("aria-hidden",y,"in not contained inside",f,". Doing nothing"),null)}).filter(function(y){return!!y})},mx=function(f,_,y,x){var C=fx(_,Array.isArray(f)?f:[f]);yc[y]||(yc[y]=new WeakMap);var L=yc[y],w=[],l=new Set,U=new Set(C),W=function(F){!F||l.has(F)||(l.add(F),W(F.parentNode))};
1C.forEach(W);var G=function(F){!F||U.has(F)||Array.prototype.forEach.call(F.children,function(T){if(l.has(T))G(T);else try{var re=T.getAttribute(x),fe=re!==null&&re!=="false",ye=(jo.get(T)||0)+1,de=(L.get(T)||0)+1;jo.set(T,ye),L.set(T,de),w.push(T),ye===1&&fe&&_c.set(T,!0),de===1&&T.setAttribute(y,"true"),fe||T.setAttribute(x,"true")}catch(ge){console.error("aria-hidden: cannot operate on ",T,ge)}})};return G(_),l.clear(),cd++,function(){w.forEach(function(F){var T=jo.get(F)-1,re=L.get(F)-1;jo.set(F,T),L.set(F,re),T||(_c.has(F)||F.removeAttribute(x),_c.delete(F)),re||F.removeAttribute(y)}),cd--,cd||(jo=new WeakMap,jo=new WeakMap,_c=new WeakMap,yc={})}},gx=function(f,_,y){y===void 0&&(y="data-aria-hidden");var x=Array.from(Array.isArray(f)?f:[f]),C=px(f);return C?(x.push.apply(x,Array.from(C.querySelectorAll("[aria-live]"))),mx(x,C,y,"aria-hidden")):function(){return null}};function Pm(f){let _;Qt(()=>ca(f),y=>{y?_=gx(y):_&&_()}),da(()=>{_&&_()})}let _x=0;function Va(f,_="radix"){const y=Lc({useId:void 0});return Cf?`${_}-${Cf()}`:y.useId?`${_}-${y.useId()}`:`${_}-${++_x}`}function yx(f){const _=Fe(),y=at(()=>{var C;return((C=_.value)==null?void 0:C.width)??0}),x=at(()=>{var C;return((C=_.value)==null?void 0:C.height)??0});return nr(()=>{const C=ca(f);if(C){_.value={width:C.offsetWidth,height:C.offsetHeight};const L=new ResizeObserver(w=>{if(!Array.isArray(w)||!w.length)return;const l=w[0];let U,W;if("borderBoxSize"in l){const G=l.borderBoxSize,F=Array.isArray(G)?G[0]:G;U=F.inlineSize,W=F.blockSize}else U=C.offsetWidth,W=C.offsetHeight;_.value={width:U,height:W}});return L.observe(C,{box:"border-box"}),()=>L.unobserve(C)}else _.value=void 0}),{width:y,height:x}}function Im(f,_){const y=Fe(f);function x(C){return _[y.value][C]??y.value}return{state:y,dispatch:C=>{y.value=x(C)}}}const vx=Ke({name:"PrimitiveSlot",inheritAttrs:!1,setup(f,{attrs:_,slots:y}){return()=>{var x,C;if(!y.default)return null;const L=Rd(y.default()),w=L.findIndex(G=>G.type!==rm);if(w===-1)return L;const l=L[w];(x=l.props)==null||delete x.ref;const U=l.props?Ot(_,l.props):_;_.class&&(C=l.props)!=null&&C.class&&delete l.props.class;const W=ly(l,U);for(const G in U)G.startsWith("on")&&(W.props||(W.props={}),W.props[G]=U[G]);return L.length===1?W:(L[w]=W,L)}}}),ci=Ke({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(f,{attrs:_,slots:y}){const x=f.asChild?"template":f.as;return typeof x=="string"&&["area","img","input"].includes(x)?()=>wc(x,_):x!=="template"?()=>wc(f.as,_,{default:y.default}):()=>wc(vx,_,{default:y.default})}}),[Em,xx]=Rr("CollapsibleRoot"),bx=Ke({__name:"CollapsibleRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["update:open"],setup(f,{expose:_,emit:y}){const x=f,C=ha(x,"open",y,{defaultValue:x.defaultOpen,passive:x.open===void 0}),L=ha(x,"disabled");return xx({contentId:"",disabled:L,open:C,onOpenToggle:()=>{C.value=!C.value}}),_({open:C}),kt(),(w,l)=>(be(),Ne(B(ci),{as:w.as,"as-child":x.asChild,"data-state":B(C)?"open":"closed","data-disabled":B(L)?"":void 0},{default:ee(()=>[tt(w.$slots,"default",{open:B(C)})]),_:3},8,["as","as-child","data-state","data-disabled"]))}}),wx=Ke({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(f){const _=f;kt();const y=Em();return(x,C)=>{var L,w;return be(),Ne(B(ci),{type:x.as==="button"?"button":void 0,as:x.as,"as-child":_.asChild,"aria-controls":B(y).contentId,"aria-expanded":B(y).open.value,"data-state":B(y).open.value?"open":"closed","data-disabled":(L=B(y).disabled)!=null&&L.value?"":void 0,disabled:(w=B(y).disabled)==null?void 0:w.value,onClick:B(y).onOpenToggle},{default:ee(()=>[tt(x.$slots,"default")]),_:3},8,["type","as","as-child","aria-controls","aria-expanded","data-state","data-disabled","disabled","onClick"])}}});function kx(f,_){var y;const x=Fe({}),C=Fe("none"),L=Fe(f),w=f.value?"mounted":"unmounted";let l;const U=((y=_.value)==null?void 0:y.ownerDocument.defaultView)??Dc,{state:W,dispatch:G}=Im(w,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),F=de=>{var ge;if(xs){const ae=new CustomEvent(de,{bubbles:!1,cancelable:!1});(ge=_.value)==null||ge.dispatchEvent(ae)}};Qt(f,async(de,ge)=>{var ae;const le=ge!==de;if(await vs(),le){const Ze=C.value,Ue=vc(_.value);de?(G("MOUNT"),F("enter"),Ue==="none"&&F("after-enter")):Ue==="none"||((ae=x.value)==null?void 0:ae.display)==="none"?(G("UNMOUNT"),F("leave"),F("after-leave")):ge&&Ze!==Ue?(G("ANIMATION_OUT"),F("leave")):(G("UNMOUNT"),F("after-leave"))}},{immediate:!0});const T=de=>{const ge=vc(_.value),ae=ge.includes(de.animationName),le=W.value==="mounted"?"enter":"leave";
1if(de.target===_.value&&ae&&(F(`after-${le}`),G("ANIMATION_END"),!L.value)){const Ze=_.value.style.animationFillMode;_.value.style.animationFillMode="forwards",l=U==null?void 0:U.setTimeout(()=>{var Ue;((Ue=_.value)==null?void 0:Ue.style.animationFillMode)==="forwards"&&(_.value.style.animationFillMode=Ze)})}de.target===_.value&&ge==="none"&&G("ANIMATION_END")},re=de=>{de.target===_.value&&(C.value=vc(_.value))},fe=Qt(_,(de,ge)=>{de?(x.value=getComputedStyle(de),de.addEventListener("animationstart",re),de.addEventListener("animationcancel",T),de.addEventListener("animationend",T)):(G("ANIMATION_END"),l!==void 0&&(U==null||U.clearTimeout(l)),ge==null||ge.removeEventListener("animationstart",re),ge==null||ge.removeEventListener("animationcancel",T),ge==null||ge.removeEventListener("animationend",T))},{immediate:!0}),ye=Qt(W,()=>{const de=vc(_.value);C.value=W.value==="mounted"?de:"none"});return da(()=>{fe(),ye()}),{isPresent:at(()=>["mounted","unmountSuspended"].includes(W.value))}}function vc(f){return f&&getComputedStyle(f).animationName||"none"}const bs=Ke({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(f,{slots:_,expose:y}){var x;const{present:C,forceMount:L}=rr(f),w=Fe(),{isPresent:l}=kx(C,w);y({present:l});let U=_.default({present:l});U=Rd(U||[]);const W=Na();if(U&&(U==null?void 0:U.length)>1){const G=(x=W==null?void 0:W.parent)!=null&&x.type.name?`<${W.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${G}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(F=>` - ${F}`).join(` 2`)].join(` 3`))}return()=>L.value||C.value||l.value?wc(_.default({present:l})[0],{ref:G=>{const F=ca(G);return typeof(F==null?void 0:F.hasAttribute)>"u"||(F!=null&&F.hasAttribute("data-radix-popper-content-wrapper")?w.value=F.firstElementChild:w.value=F),F}}):null}}),Sx=Ke({inheritAttrs:!1,__name:"CollapsibleContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(f){const _=f,y=Em();y.contentId||(y.contentId=Va(void 0,"radix-vue-collapsible-content"));const x=Fe(),{forwardRef:C,currentElement:L}=kt(),w=Fe(0),l=Fe(0),U=at(()=>y.open.value),W=Fe(U.value),G=Fe();return Qt(()=>{var F;return[U.value,(F=x.value)==null?void 0:F.present]},async()=>{await vs();const F=L.value;if(!F)return;G.value=G.value||{transitionDuration:F.style.transitionDuration,animationName:F.style.animationName},F.style.transitionDuration="0s",F.style.animationName="none";const T=F.getBoundingClientRect();l.value=T.height,w.value=T.width,W.value||(F.style.transitionDuration=G.value.transitionDuration,F.style.animationName=G.value.animationName)},{immediate:!0}),nr(()=>{requestAnimationFrame(()=>{W.value=!1})}),(F,T)=>(be(),Ne(B(bs),{ref_key:"presentRef",ref:x,present:F.forceMount||B(y).open.value,"force-mount":!0},{default:ee(()=>{var re,fe;return[pe(B(ci),Ot(F.$attrs,{id:B(y).contentId,ref:B(C),"as-child":_.asChild,as:F.as,"data-state":B(y).open.value?"open":"closed","data-disabled":(re=B(y).disabled)!=null&&re.value?"":void 0,hidden:!((fe=x.value)!=null&&fe.present),style:{"--radix-collapsible-content-height":`${l.value}px`,"--radix-collapsible-content-width":`${w.value}px`}}),{default:ee(()=>{var ye;return[(ye=x.value)!=null&&ye.present?tt(F.$slots,"default",{key:0}):At("",!0)]}),_:3},16,["id","as-child","as","data-state","data-disabled","hidden","style"])]}),_:3},8,["present"]))}});function Mm({type:f,defaultValue:_,modelValue:y}){const x=y||_;if(od(f)&&od(y)&&od(_))throw new Error("Either the `type` or the `value` or `default-value` prop must be defined.");if(y!==void 0&&_!==void 0&&typeof y!=typeof _)throw new Error(`Invalid prop \`value\` of value \`${y}\` supplied, should be the same type as the \`defaultValue\` prop, which is \`${_}\`. The \`value\` prop must be:
4 ${f==="single"?"- a string":f==="multiple"?"- an array of strings":`- a string 5- an array of strings`} 6 - \`undefined\``);const C=y!==void 0||_!==void 0;if(f&&C){const L=Array.isArray(y)||Array.isArray(_),w=y!==void 0?"modelValue":"defaultValue",l=w==="modelValue"?typeof y:typeof _;if(f==="single"&&L)return console.error(`Invalid prop \`${w}\` of type ${l} supplied with type \`single\`. The \`modelValue\` prop must be a string or \`undefined\`. 7 You can remove the \`type\` prop to let the component infer the type from the ${w} prop.`),"multiple";if(f==="multiple"&&!L)return console.error(`Invalid prop \`${w}\` of type ${l} supplied with type \`multiple\`. The \`modelValue\` prop must be an array of strings or \`undefined\`. 8 You can remove the \`type\` prop to let the component infer the type from the ${w} prop.`),"single"}return C?Array.isArray(x)?"multiple":"single":f}function Tx({type:f,defaultValue:_,modelValue:y}){return f||Mm({type:f,defaultValue:_,modelValue:y})}function zx({type:f,defaultValue:_}){return _!==void 0?_:f==="single"?void 0:[]}function Cx(f,_){const y=Fe(Tx(f)),x=ha(f,"modelValue",_,{defaultValue:zx(f),passive:f.modelValue===void 0,deep:!0});Qt(()=>[f.type,f.modelValue,f.defaultValue],()=>{const w=Mm(f);y.value!==w&&(y.value=w)},{immediate:!0});function C(w){if(y.value==="single")x.value=w===x.value?void 0:w;else{const l=[...x.value||[]];if(l.includes(w)){const U=l.findIndex(W=>W===w);l.splice(U,1)}else l.push(w);x.value=l}}const L=at(()=>y.value==="single");return{modelValue:x,type:y,changeModelValue:C,isSingle:L}}const[Fc,Ax]=Rr("AccordionRoot"),Px=Ke({__name:"AccordionRoot",props:{collapsible:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dir:{},orientation:{default:"vertical"},asChild:{type:Boolean},as:{},type:{},modelValue:{},defaultValue:{}},emits:["update:modelValue"],setup(f,{emit:_}){const y=f,x=_,{dir:C,disabled:L}=rr(y),w=zm(C),{modelValue:l,changeModelValue:U,isSingle:W}=Cx(y,x),{forwardRef:G,currentElement:F}=kt();return Ax({disabled:L,direction:w,orientation:y.orientation,parentElement:F,isSingle:W,collapsible:y.collapsible,modelValue:l,changeModelValue:U}),(T,re)=>(be(),Ne(B(ci),{ref:B(G),"as-child":T.asChild,as:T.as},{default:ee(()=>[tt(T.$slots,"default",{modelValue:B(l)})]),_:3},8,["as-child","as"]))}}),[Bd,Ix]=Rr("AccordionItem"),Ex=Ke({__name:"AccordionItem",props:{disabled:{type:Boolean},value:{},asChild:{type:Boolean},as:{}},setup(f,{expose:_}){const y=f,x=Fc(),C=at(()=>x.isSingle.value?y.value===x.modelValue.value:Array.isArray(x.modelValue.value)&&x.modelValue.value.includes(y.value)),L=at(()=>x.disabled.value||y.disabled),w=at(()=>L.value?"":void 0),l=at(()=>C.value?"open":"closed");_({open:C,dataDisabled:w});const{currentRef:U,currentElement:W}=kt();Ix({open:C,dataState:l,disabled:L,dataDisabled:w,triggerId:"",currentRef:U,currentElement:W,value:at(()=>y.value)});function G(F){var T;const re=F.target;if(Array.from(((T=x.parentElement.value)==null?void 0:T.querySelectorAll("[data-radix-vue-collection-item]"))??[]).findIndex(fe=>fe===re)===-1)return null;Jv(F,W.value,x.parentElement.value,{arrowKeyOptions:x.orientation,dir:x.direction.value,focus:!0})}return(F,T)=>(be(),Ne(B(bx),{"data-orientation":B(x).orientation,"data-disabled":w.value,"data-state":l.value,disabled:L.value,open:C.value,as:y.as,"as-child":y.asChild,onKeydown:Nn(G,["up","down","left","right","home","end"])},{default:ee(()=>[tt(F.$slots,"default",{open:C.value})]),_:3},8,["data-orientation","data-disabled","data-state","disabled","open","as","as-child"]))}}),Mx=Ke({__name:"AccordionContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(f){const _=f,y=Fc(),x=Bd();return kt(),(C,L)=>(be(),Ne(B(Sx),{role:"region",hidden:!B(x).open.value,"as-child":_.asChild,"force-mount":_.forceMount,"aria-labelledby":B(x).triggerId,"data-state":B(x).dataState.value,"data-disabled":B(x).dataDisabled.value,"data-orientation":B(y).orientation,style:{"--radix-accordion-content-width":"var(--radix-collapsible-content-width)","--radix-accordion-content-height":"var(--radix-collapsible-content-height)"}},{default:ee(()=>[tt(C.$slots,"default")]),_:3},8,["hidden","as-child","force-mount","aria-labelledby","data-state","data-disabled","data-orientation"]))}}),Dx=Ke({__name:"AccordionHeader",props:{asChild:{type:Boolean},as:{default:"h3"}},setup(f){const _=f,y=Fc(),x=Bd();return kt(),(C,L)=>(be(),Ne(B(ci),{as:_.as,"as-child":_.asChild,"data-orientation":B(y).orientation,"data-state":B(x).dataState.value,"data-disabled":
8B(x).dataDisabled.value},{default:ee(()=>[tt(C.$slots,"default")]),_:3},8,["as","as-child","data-orientation","data-state","data-disabled"]))}}),Lx=Ke({__name:"AccordionTrigger",props:{asChild:{type:Boolean},as:{}},setup(f){const _=f,y=Fc(),x=Bd();x.triggerId||(x.triggerId=Va(void 0,"radix-vue-accordion-trigger"));function C(){const L=y.isSingle.value&&x.open.value&&!y.collapsible;x.disabled.value||L||y.changeModelValue(x.value.value)}return(L,w)=>(be(),Ne(B(wx),{id:B(x).triggerId,ref:B(x).currentRef,"data-radix-vue-collection-item":"",as:_.as,"as-child":_.asChild,"aria-disabled":B(x).disabled.value||void 0,"aria-expanded":B(x).open.value||!1,"data-disabled":B(x).dataDisabled.value,"data-orientation":B(y).orientation,"data-state":B(x).dataState.value,disabled:B(x).disabled.value,onClick:C},{default:ee(()=>[tt(L.$slots,"default")]),_:3},8,["id","as","as-child","aria-disabled","aria-expanded","data-disabled","data-orientation","data-state","disabled"]))}}),[Hn,Rx]=Rr("DialogRoot"),Bx=Ke({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(f,{emit:_}){const y=f,x=ha(y,"open",_,{defaultValue:y.defaultOpen,passive:y.open===void 0}),C=Fe(),L=Fe(),{modal:w}=rr(y);return Rx({open:x,modal:w,openModal:()=>{x.value=!0},onOpenChange:l=>{x.value=l},onOpenToggle:()=>{x.value=!x.value},contentId:"",titleId:"",descriptionId:"",triggerElement:C,contentElement:L}),(l,U)=>tt(l.$slots,"default",{open:B(x)})}}),Fx=Ke({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(f){const _=f,y=Hn(),{forwardRef:x,currentElement:C}=kt();return y.contentId||(y.contentId=Va(void 0,"radix-vue-dialog-content")),nr(()=>{y.triggerElement.value=C.value}),(L,w)=>(be(),Ne(B(ci),Ot(_,{ref:B(x),type:L.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":B(y).open.value||!1,"aria-controls":B(y).open.value?B(y).contentId:void 0,"data-state":B(y).open.value?"open":"closed",onClick:B(y).onOpenToggle}),{default:ee(()=>[tt(L.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),Oc=Ke({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(f){const _=wm();return(y,x)=>B(_)||y.forceMount?(be(),Ne(oy,{key:0,to:y.to,disabled:y.disabled},[tt(y.$slots,"default")],8,["to","disabled"])):At("",!0)}}),Ox=Ke({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(f){const _=f;return(y,x)=>(be(),Ne(B(Oc),gs(_s(_)),{default:ee(()=>[tt(y.$slots,"default")]),_:3},16))}}),$x="dismissableLayer.pointerDownOutside",jx="dismissableLayer.focusOutside";function Dm(f,_){const y=_.closest("[data-dismissable-layer]"),x=f.dataset.dismissableLayer===""?f:f.querySelector("[data-dismissable-layer]"),C=Array.from(f.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(y&&x===y||C.indexOf(x)<C.indexOf(y))}function Vx(f,_){var y;const x=((y=_==null?void 0:_.value)==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),C=Fe(!1),L=Fe(()=>{});return Lr(w=>{if(!xs)return;const l=async W=>{const G=W.target;if(_!=null&&_.value){if(Dm(_.value,G)){C.value=!1;return}if(W.target&&!C.value){let F=function(){_m($x,f,T)};const T={originalEvent:W};W.pointerType==="touch"?(x.removeEventListener("click",L.value),L.value=F,x.addEventListener("click",L.value,{once:!0})):F()}else x.removeEventListener("click",L.value);C.value=!1}},U=window.setTimeout(()=>{x.addEventListener("pointerdown",l)},0);w(()=>{window.clearTimeout(U),x.removeEventListener("pointerdown",l),x.removeEventListener("click",L.value)})}),{onPointerDownCapture:()=>C.value=!0}}function Nx(f,_){var y;const x=((y=_==null?void 0:_.value)==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),C=Fe(!1);return Lr(L=>{if(!xs)return;const w=async l=>{_!=null&&_.value&&(await vs(),!(!_.value||Dm(_.value,l.target))&&l.target&&!C.value&&_m(jx,f,{originalEvent:l}))};x.addEventListener("focusin",w),L(()=>x.removeEventListener("focusin",w))}),{onFocusCapture:()=>C.value=!0,onBlurCapture:()=>C.value=!1}}const ds=am({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$c=Ke({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(f,{emit:_}){const y=f,x=_,{forwardRef:C,currentElement:L}=kt(),w=at(()=>{var fe;return((fe=L.value)==null?void 0:fe.ownerDocument)??globalThis.document}),l=at(()=>ds.layersRoot),U=at(()=>L.value?Array.from(l.value).indexOf(L.value):-1),W=at(()=>ds.layersWithOutsidePointerEventsDisabled.size>0),G=at(()=>{const fe=Array.from(l.value),[ye]=[...ds.layersWithOutsidePointerEventsDisabled].slice(-1),de=fe.indexOf(ye);return U.value>=de}),F=Vx(async fe=>{const ye=[...ds.branches].some(de=>de==null?void 0:de.contains(fe.target));!G.value||ye||(x("pointerDownOutside",fe),x("interactOutside",fe),await vs(),fe.defaultPrevented||x("dismiss"))},L),T=Nx(fe=>{[...ds.branches].some(ye=>ye==null?void 0:ye.contains(fe.target))||(x("focusOutside",fe),x("interactOutside",fe),fe.defaultPrevented||x("dismiss"))},L);Wv("Escape",fe=>{U.value===l.value.size-1&&(x("escapeKeyDown",fe),fe.defaultPrevented||x("dismiss"))});let re;return Lr(fe=>{L.value&&(y.disableOutsidePointerEvents&&(ds.layersWithOutsidePointerEventsDisabled.size===0&&(re=w.value.body.style.pointerEvents,w.value.body.style.pointerEvents="none"),ds.layersWithOutsidePointerEventsDisabled.add(L.value)),l.value.add(L.value),fe(()=>{y.disableOutsidePointerEvents&&ds.layersWithOutsidePointerEventsDisabled.size===1&&(w.value.body.style.pointerEvents=re)}))}),Lr(fe=>{fe(()=>{L.value&&(l.value.delete(L.value),ds.layersWithOutsidePointerEventsDisabled.delete(L.value))})}),(fe,ye)=>(be(),Ne(B(ci),{ref:B(C),"as-child":fe.asChild,as:fe.as,"data-dismissable-layer":"",style:ys({pointerEvents:W.value?G.value?"auto":"none":void 0}),onFocusCapture:B(T).onFocusCapture,onBlurCapture:B(T).onBlurCapture,onPointerdownCapture:B(F).onPointerDownCapture},{default:ee(()=>[tt(fe.$slots,"default")]),_:3}
8,8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),hd="focusScope.autoFocusOnMount",dd="focusScope.autoFocusOnUnmount",jf={bubbles:!1,cancelable:!0};function Ux(f,{select:_=!1}={}){const y=sa();for(const x of f)if(ra(x,{select:_}),sa()!==y)return!0}function Gx(f){const _=Lm(f),y=Vf(_,f),x=Vf(_.reverse(),f);return[y,x]}function Lm(f){const _=[],y=document.createTreeWalker(f,NodeFilter.SHOW_ELEMENT,{acceptNode:x=>{const C=x.tagName==="INPUT"&&x.type==="hidden";return x.disabled||x.hidden||C?NodeFilter.FILTER_SKIP:x.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;y.nextNode();)_.push(y.currentNode);return _}function Vf(f,_){for(const y of f)if(!qx(y,{upTo:_}))return y}function qx(f,{upTo:_}){if(getComputedStyle(f).visibility==="hidden")return!0;for(;f;){if(_!==void 0&&f===_)return!1;if(getComputedStyle(f).display==="none")return!0;f=f.parentElement}return!1}function Zx(f){return f instanceof HTMLInputElement&&"select"in f}function ra(f,{select:_=!1}={}){if(f&&f.focus){const y=sa();f.focus({preventScroll:!0}),f!==y&&Zx(f)&&_&&f.select()}}const Hx=Dv(()=>Fe([]));function Wx(){const f=Hx();return{add(_){const y=f.value[0];_!==y&&(y==null||y.pause()),f.value=Nf(f.value,_),f.value.unshift(_)},remove(_){var y;f.value=Nf(f.value,_),(y=f.value[0])==null||y.resume()}}}function Nf(f,_){const y=[...f],x=y.indexOf(_);return x!==-1&&y.splice(x,1),y}function Xx(f){return f.filter(_=>_.tagName!=="A")}const Rm=Ke({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(f,{emit:_}){const y=f,x=_,{currentRef:C,currentElement:L}=kt(),w=Fe(null),l=Wx(),U=am({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Lr(G=>{if(!xs)return;const F=L.value;if(!y.trapped)return;function T(de){if(U.paused||!F)return;const ge=de.target;F.contains(ge)?w.value=ge:ra(w.value,{select:!0})}function re(de){if(U.paused||!F)return;const ge=de.relatedTarget;ge!==null&&(F.contains(ge)||ra(w.value,{select:!0}))}function fe(de){F.contains(w.value)||ra(F)}document.addEventListener("focusin",T),document.addEventListener("focusout",re);const ye=new MutationObserver(fe);F&&ye.observe(F,{childList:!0,subtree:!0}),G(()=>{document.removeEventListener("focusin",T),document.removeEventListener("focusout",re),ye.disconnect()})}),Lr(async G=>{const F=L.value;if(await vs(),!F)return;l.add(U);const T=sa();if(!F.contains(T)){const re=new CustomEvent(hd,jf);F.addEventListener(hd,fe=>x("mountAutoFocus",fe)),F.dispatchEvent(re),re.defaultPrevented||(Ux(Xx(Lm(F)),{select:!0}),sa()===T&&ra(F))}
8G(()=>{F.removeEventListener(hd,ye=>x("mountAutoFocus",ye));const re=new CustomEvent(dd,jf),fe=ye=>{x("unmountAutoFocus",ye)};F.addEventListener(dd,fe),F.dispatchEvent(re),setTimeout(()=>{re.defaultPrevented||ra(T??document.body,{select:!0}),F.removeEventListener(dd,fe),l.remove(U)},0)})});function W(G){if(!y.loop&&!y.trapped||U.paused)return;const F=G.key==="Tab"&&!G.altKey&&!G.ctrlKey&&!G.metaKey,T=sa();if(F&&T){const re=G.currentTarget,[fe,ye]=Gx(re);fe&&ye?!G.shiftKey&&T===ye?(G.preventDefault(),y.loop&&ra(fe,{select:!0})):G.shiftKey&&T===fe&&(G.preventDefault(),y.loop&&ra(ye,{select:!0})):T===re&&G.preventDefault()}}return(G,F)=>(be(),Ne(B(ci),{ref_key:"currentRef",ref:C,tabindex:"-1","as-child":G.asChild,as:G.as,onKeydown:W},{default:ee(()=>[tt(G.$slots,"default")]),_:3},8,["as-child","as"]))}});function Kx(f){return f?"open":"closed"}const Bm=Ke({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(f,{emit:_}){const y=f,x=_,C=Hn(),{forwardRef:L,currentElement:w}=kt();return C.titleId||(C.titleId=Va(void 0,"radix-vue-dialog-title")),C.descriptionId||(C.descriptionId=Va(void 0,"radix-vue-dialog-description")),nr(()=>{C.contentElement=w,sa()!==document.body&&(C.triggerElement.value=sa())}),(l,U)=>(be(),Ne(B(Rm),{"as-child":"",loop:"",trapped:y.trapFocus,onMountAutoFocus:U[5]||(U[5]=W=>x("openAutoFocus",W)),onUnmountAutoFocus:U[6]||(U[6]=W=>x("closeAutoFocus",W))},{default:ee(()=>[pe(B($c),Ot({id:B(C).contentId,ref:B(L),as:l.as,"as-child":l.asChild,"disable-outside-pointer-events":l.disableOutsidePointerEvents,role:"dialog","aria-describedby":B(C).descriptionId,"aria-labelledby":B(C).titleId,"data-state":B(Kx)(B(C).open.value)},l.$attrs,{onDismiss:U[0]||(U[0]=W=>B(C).onOpenChange(!1)),onEscapeKeyDown:U[1]||(U[1]=W=>x("escapeKeyDown",W)),onFocusOutside:U[2]||(U[2]=W=>x("focusOutside",W)),onInteractOutside:U[3]||(U[3]=W=>x("interactOutside",W)),onPointerDownOutside:U[4]||(U[4]=W=>x("pointerDownOutside",W))}),{default:ee(()=>[tt(l.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),Yx=Ke({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(f,{emit:_}){const y=f,x=_,C=Hn(),L=Rc(x),{forwardRef:w,currentElement:l}=kt();return Pm(l),(U,W)=>(be(),Ne(Bm,Ot({...y,...B(L)},{ref:B(w),"trap-focus":B(C).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:W[0]||(W[0]=G=>{var F;G.defaultPrevented||(G.preventDefault(),(F=B(C).triggerElement.value)==null||F.focus())}),onPointerDownOutside:W[1]||(W[1]=G=>{const F=G.detail.originalEvent,T=F.button===0&&F.ctrlKey===!0;(F.button===2||T)&&G.preventDefault()}),onFocusOutside:W[2]||(W[2]=G=>{G.preventDefault()})}),{default:ee(()=>[tt(U.$slots,"default")]),_:3},16,["trap-focus"]))}}),Jx=Ke({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(f,{emit:_}){const y=f,x=Rc(_);kt();const C=Hn(),L=Fe(!1),w=Fe(!1);return(l,U)=>(be(),Ne(Bm,Ot({...y,...B(x)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:U[0]||(U[0]=W=>{var G;W.defaultPrevented||(L.value||(G=B(C).triggerElement.value)==null||G.focus(),W.preventDefault()),L.value=!1,w.value=!1}),onInteractOutside:U[1]||(U[1]=W=>{var G;W.defaultPrevented||(L.value=!0,W.detail.originalEvent.type==="pointerdown"&&(w.value=!0));const F=W.target;(G=B(C).triggerElement.value)!=null&&G.contains(F)&&W.preventDefault(),W.detail.originalEvent.type==="focusin"&&w.value&&W.preventDefault()})}),{default:ee(()=>[tt(l.$slots,"default")]),_:3},16))}}),Qx=Ke({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(f,{emit:_}){const y=f,x=_,C=Hn(),L=Rc(x),{forwardRef:w}=kt();return(l,U)=>(be(),Ne(B(bs),{present:l.forceMount||B(C).open.value},{default:ee(()=>[B(C).modal.value?(be(),Ne(Yx,Ot({key:0,ref:B(w)},{...y,...B(L),...l.$attrs}),{default:ee(()=>[tt(l.$slots,"default")]),_:3},16)):(be(),Ne(Jx,Ot({key:1,ref:B(w)},{...y,...B(L),...l.$attrs}),{default:ee(()=>[tt(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),eb=Ke({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(f){const _=Hn();return Sm(!0),kt(),(y,x)=>(be(),Ne(B(ci),{as:y.as,"as-child":y.asChild,"data-state":B(_).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:ee(()=>[tt(y.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),tb=Ke({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(f){const _=Hn(),{forwardRef:y}=kt();return(x,C)=>{var L;return(L=B(_))!=null&&L.modal.value?(be(),Ne(B(bs),{key:0,present:x.forceMount||B(_).open.value},{default:ee(()=>[pe(eb,Ot(x.$attrs,{ref:B(y),as:x.as,"as-child":x.asChild}),{default:ee(()=>[tt(x.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):At("",!0)}}}),Uf=Ke({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(f){const _=f;kt();const y=Hn();return(x,C)=>(be(),Ne(B(ci),Ot(_,{type:x.as==="button"?"button":void 0,onClick:C[0]||(C[0]=L=>B(y).onOpenChange(!1))}),{default:ee(()=>[tt(x.$slots,"default")]),_:3},16,["type"]))}}),ib=Ke({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(f){const _=f,y=Hn();return kt(),(x,C)=>(be(),Ne(B(ci),Ot(_,{id:B(y).titleId}),{default:ee(()=>[tt(x.$slots,"default")]),_:3},16,["id"]))}}),rb=Ke({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(f){const _=f;kt();const y=Hn();return(x,C)=>(be(),Ne(B(ci),Ot(_,{id:B(y).descriptionId}),{default:ee(()=>[tt(x.$slots,"default")]),_:3},16,["id"]))}}),[Fm,nb]=Rr("PopperRoot"),Fd=Ke({inheritAttrs:!1,__name:"PopperRoot",setup(f){const _=Fe();return nb({anchor:_,onAnchorChange:y=>_.value=y}),(y,x)=>tt(y.$slots,"default")}}),Od=Ke({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(f){const _=f,{forwardRef:y,currentElement:x}=kt(),C=Fm();return Lr(()=>{C.onAnchorChange(_.element??x.value)}),(L,w)=>(be(),Ne(B(ci),{ref:B(y),as:L.as,"as-child":L.asChild},{default:ee(()=>[tt(L.$slots,"default")]),_:3},8,["as","as-child"]))}});
8function sb(f){return f!==null}function ab(f){return{name:"transformOrigin",options:f,fn(_){var y,x,C;const{placement:L,rects:w,middlewareData:l}=_,U=((y=l.arrow)==null?void 0:y.centerOffset)!==0,W=U?0:f.arrowWidth,G=U?0:f.arrowHeight,[F,T]=bd(L),re={start:"0%",center:"50%",end:"100%"}[T],fe=(((x=l.arrow)==null?void 0:x.x)??0)+W/2,ye=(((C=l.arrow)==null?void 0:C.y)??0)+G/2;let de="",ge="";return F==="bottom"?(de=U?re:`${fe}px`,ge=`${-G}px`):F==="top"?(de=U?re:`${fe}px`,ge=`${w.floating.height+G}px`):F==="right"?(de=`${-G}px`,ge=U?re:`${ye}px`):F==="left"&&(de=`${w.floating.width+G}px`,ge=U?re:`${ye}px`),{data:{x:de,y:ge}}}}}function bd(f){const[_,y="center"]=f.split("-");return[_,y]}const ob={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[lb,ub]=Rr("PopperContent"),$d=Ke({inheritAttrs:!1,__name:"PopperContent",props:dy({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...ob}),emits:["placed"],setup(f,{emit:_}){const y=f,x=_,C=Fm(),{forwardRef:L,currentElement:w}=kt(),l=Fe(),U=Fe(),{width:W,height:G}=yx(U),F=at(()=>y.side+(y.align!=="center"?`-${y.align}`:"")),T=at(()=>typeof y.collisionPadding=="number"?y.collisionPadding:{top:0,right:0,bottom:0,left:0,...y.collisionPadding}),re=at(()=>Array.isArray(y.collisionBoundary)?y.collisionBoundary:[y.collisionBoundary]),fe=at(()=>({padding:T.value,boundary:re.value.filter(sb),altBoundary:re.value.length>0})),ye=Ev(()=>[xv({mainAxis:y.sideOffset+G.value,alignmentAxis:y.alignOffset}),y.prioritizePosition&&y.avoidCollisions&&Rf({...fe.value}),y.avoidCollisions&&bv({mainAxis:!0,crossAxis:!!y.prioritizePosition,limiter:y.sticky==="partial"?Tv():void 0,...fe.value}),!y.prioritizePosition&&y.avoidCollisions&&Rf({...fe.value}),wv({...fe.value,apply:({elements:Ae,rects:Pt,availableWidth:_t,availableHeight:Ct})=>{const{width:Lt,height:wi}=Pt.reference,ri=Ae.floating.style;ri.setProperty("--radix-popper-available-width",`${_t}px`),ri.setProperty("--radix-popper-available-height",`${Ct}px`),ri.setProperty("--radix-popper-anchor-width",`${Lt}px`),ri.setProperty("--radix-popper-anchor-height",`${wi}px`)}}),U.value&&Av({element:U.value,padding:y.arrowPadding}),ab({arrowWidth:W.value,arrowHeight:G.value}),y.hideWhenDetached&&kv({strategy:"referenceHidden",...fe.value})]),{floatingStyles:de,placement:ge,isPositioned:ae,middlewareData:le}=Pv(C.anchor,l,{strategy:"fixed",placement:F,whileElementsMounted:(...Ae)=>vv(...Ae,{animationFrame:y.updatePositionStrategy==="always"}),middleware:ye}),Ze=at(()=>bd(ge.value)[0]),Ue=at(()=>bd(ge.value)[1]);py(()=>{ae.value&&x("placed")});const wt=at(()=>{var Ae;return((Ae=le.value.arrow)==null?void 0:Ae.centerOffset)!==0}),Ge=Fe("");Lr(()=>{w.value&&(Ge.value=window.getComputedStyle(w.value).zIndex)});const P=at(()=>{var Ae;return((Ae=le.value.arrow)==null?void 0:Ae.x)??0}),Te=at(()=>{var Ae;return((Ae=le.value.arrow)==null?void 0:Ae.y)??0});return ub({placedSide:Ze,onArrowChange:Ae=>U.value=Ae,arrowX:P,arrowY:Te,shouldHideArrow:wt}),(Ae,Pt)=>{var _t,Ct,Lt;return be(),qe("div",{ref_key:"floatingRef",ref:l,"data-radix-popper-content-wrapper":"",style:ys({...B(de),transform:B(ae)?B(de).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ge.value,"--radix-popper-transform-origin":[(_t=B(le).transformOrigin)==null?void 0:_t.x,(Ct=B(le).transformOrigin)==null?void 0:Ct.y].join(" "),...((Lt=B(le).hide)==null?void 0:Lt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[pe(B(ci),Ot({ref:B(L)},Ae.$attrs,{"as-child":y.asChild,as:Ae.as,"data-side":Ze.value,"data-align":Ue.value,style:{animation:B(ae)?void 0:"none"}}),{default:ee(()=>[tt(Ae.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),cb=I("polygon",{points:"0,0 30,0 15,10"},null,-1),hb=Ke({__name:"Arrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(f){const _=f;return kt(),(y,x)=>(be(),Ne(B(ci),Ot(_,{width:y.width,height:y.height,viewBox:y.asChild?void 0:"0 0 30 10",preserveAspectRatio:y.asChild?void 0:"none"}),{default:ee(()=>[tt(y.$slots,"default",{},()=>[cb])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}
8),db={top:"bottom",right:"left",bottom:"top",left:"right"},Om=Ke({inheritAttrs:!1,__name:"PopperArrow",props:{width:{},height:{},asChild:{type:Boolean},as:{default:"svg"}},setup(f){const{forwardRef:_}=kt(),y=lb(),x=at(()=>db[y.placedSide.value]);return(C,L)=>{var w,l,U,W;return be(),qe("span",{ref:G=>{B(y).onArrowChange(G)},style:ys({position:"absolute",left:(w=B(y).arrowX)!=null&&w.value?`${(l=B(y).arrowX)==null?void 0:l.value}px`:void 0,top:(U=B(y).arrowY)!=null&&U.value?`${(W=B(y).arrowY)==null?void 0:W.value}px`:void 0,[x.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[B(y).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[B(y).placedSide.value],visibility:B(y).shouldHideArrow.value?"hidden":void 0})},[pe(hb,Ot(C.$attrs,{ref:B(_),style:{display:"block"},as:C.as,"as-child":C.asChild,width:C.width,height:C.height}),{default:ee(()=>[tt(C.$slots,"default")]),_:3},16,["as","as-child","width","height"])],4)}}}),pb=Ke({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(f){return kt(),(_,y)=>(be(),Ne(B(ci),{as:_.as,"as-child":_.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:ee(()=>[tt(_.$slots,"default")]),_:3},8,["as","as-child"]))}});function fb(f){const _=Lc({nonce:Fe()});return at(()=>{var y;return(f==null?void 0:f.value)||((y=_.nonce)==null?void 0:y.value)})}const[jd,mb]=Rr("HoverCardRoot"),gb=Ke({__name:"HoverCardRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},openDelay:{default:700},closeDelay:{default:300}},emits:["update:open"],setup(f,{emit:_}){const y=f,x=_,{openDelay:C,closeDelay:L}=rr(y);kt();const w=ha(y,"open",x,{defaultValue:y.defaultOpen,passive:y.open===void 0}),l=Fe(0),U=Fe(0),W=Fe(!1),G=Fe(!1),F=Fe(!1),T=Fe();function re(){clearTimeout(U.value),l.value=window.setTimeout(()=>w.value=!0,C.value)}function fe(){clearTimeout(l.value),!W.value&&!G.value&&(U.value=window.setTimeout(()=>w.value=!1,L.value))}function ye(){w.value=!1}return mb({open:w,onOpenChange(de){w.value=de},onOpen:re,onClose:fe,onDismiss:ye,hasSelectionRef:W,isPointerDownOnContentRef:G,isPointerInTransitRef:F,triggerElement:T}),(de,ge)=>(be(),Ne(B(Fd),null,{default:ee(()=>[tt(de.$slots,"default",{open:B(w)})]),_:3}))}});function wd(f){return _=>_.pointerType==="touch"?void 0:f()}function _b(f){const _=[],y=document.createTreeWalker(f,NodeFilter.SHOW_ELEMENT,{acceptNode:x=>x.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;y.nextNode();)_.push(y.currentNode);return _}const yb=Ke({__name:"HoverCardTrigger",props:{asChild:{type:Boolean},as:{default:"a"}},setup(f){const{forwardRef:_,currentElement:y}=kt(),x=jd();x.triggerElement=y;function C(){setTimeout(()=>{!x.isPointerInTransitRef.value&&!x.open.value&&x.onClose()},0)}return(L,w)=>(be(),Ne(B(Od),{"as-child":""},{default:ee(()=>[pe(B(ci),{ref:B(_),"as-child":L.asChild,as:L.as,"data-state":B(x).open.value?"open":"closed","data-grace-area-trigger":"",onPointerenter:w[0]||(w[0]=l=>B(wd)(B(x).onOpen)(l)),onPointerleave:w[1]||(w[1]=l=>B(wd)(C)(l)),onFocus:w[2]||(w[2]=l=>B(x).onOpen()),onBlur:w[3]||(w[3]=l=>B(x).onClose())},{default:ee(()=>[tt(L.$slots,"default")]),_:3},8,["as-child","as","data-state"])]),_:3}))}}),vb=Ke({__name:"HoverCardPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(f){const _=f;return(y,x)=>(be(),Ne(B(Oc),gs(_s(_)),{default:ee(()=>[tt(y.$slots,"default")]),_:3},16))}}),xb=Ke({__name:"HoverCardContentImpl",props:{side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(f,{emit:_}){const y=f,x=_,C=Bc(y),{forwardRef:L,currentElement:w}=kt(),l=jd(),{isPointerInTransit:U,onPointerExit:W}=Cm(l.triggerElement,w);Gv(l.isPointerInTransitRef,U,{direction:"rtl"}),W(()=>{l.onClose()});const G=Fe(!1);let F;Lr(re=>{if(G.value){const fe=document.body;F=fe.style.userSelect||fe.style.webkitUserSelect,fe.style.userSelect="none",fe.style.webkitUserSelect="none",re(()=>{fe.style.userSelect=F,fe.style.webkitUserSelect=F})}});function T(){G.value=!1,l.isPointerDownOnContentRef.value=!1,vs(()=>{var re;((re=document.getSelection())==null?void 0:re.toString())!==""&&(l.hasSelectionRef.value=!0)})}return nr(()=>{w.value&&(document.addEventListener("pointerup",T),_b(w.value).forEach(re=>re.setAttribute("tabindex","-1")))}),da(()=>{document.removeEventListener("pointerup",T),l.hasSelectionRef.value=!1,l.isPointerDownOnContentRef.value=!1}),(re,fe)=>(be(),Ne(B($c),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:fe[1]||(fe[1]=ye
8=>x("escapeKeyDown",ye)),onPointerDownOutside:fe[2]||(fe[2]=ye=>x("pointerDownOutside",ye)),onFocusOutside:fe[3]||(fe[3]=cu(ye=>x("focusOutside",ye),["prevent"])),onDismiss:B(l).onDismiss},{default:ee(()=>[pe(B($d),Ot({...B(C),...re.$attrs},{ref:B(L),"data-state":B(l).open.value?"open":"closed",style:{userSelect:G.value?"text":void 0,WebkitUserSelect:G.value?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"},onPointerdown:fe[0]||(fe[0]=ye=>{ye.currentTarget.contains(ye.target)&&(G.value=!0),B(l).hasSelectionRef.value=!1,B(l).isPointerDownOnContentRef.value=!0})}),{default:ee(()=>[tt(re.$slots,"default")]),_:3},16,["data-state","style"])]),_:3},8,["onDismiss"]))}}),bb=Ke({__name:"HoverCardContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(f,{emit:_}){const y=Ga(f,_),{forwardRef:x}=kt(),C=jd();return(L,w)=>(be(),Ne(B(bs),{present:L.forceMount||B(C).open.value},{default:ee(()=>[pe(xb,Ot(B(y),{ref:B(x),onPointerenter:w[0]||(w[0]=l=>B(wd)(B(C).onOpen)(l))}),{default:ee(()=>[tt(L.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),wb=Ke({__name:"HoverCardArrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(f){const _=f;return kt(),(y,x)=>(be(),Ne(B(Om),gs(_s(_)),{default:ee(()=>[tt(y.$slots,"default")]),_:3},16))}}),[Xo,kb]=Rr("PopoverRoot"),$m=Ke({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},modal:{type:Boolean,default:!1}},emits:["update:open"],setup(f,{emit:_}){const y=f,x=_,{modal:C}=rr(y),L=ha(y,"open",x,{defaultValue:y.defaultOpen,passive:y.open===void 0}),w=Fe(),l=Fe(!1);return kb({contentId:"",modal:C,open:L,onOpenChange:U=>
8{L.value=U},onOpenToggle:()=>{L.value=!L.value},triggerElement:w,hasCustomAnchor:l}),(U,W)=>(be(),Ne(B(Fd),null,{default:ee(()=>[tt(U.$slots,"default",{open:B(L)})]),_:3}))}}),jm=Ke({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(f){const _=f,y=Xo(),{forwardRef:x,currentElement:C}=kt();return nr(()=>{y.triggerElement.value=C.value}),(L,w)=>(be(),Ne(im(B(y).hasCustomAnchor.value?B(ci):B(Od)),{"as-child":""},{default:ee(()=>[pe(B(ci),{ref:B(x),type:L.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":B(y).open.value,"aria-controls":B(y).contentId,"data-state":B(y).open.value?"open":"closed",as:L.as,"as-child":_.asChild,onClick:B(y).onOpenToggle},{default:ee(()=>[tt(L.$slots,"default")]),_:3},8,["type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),Vm=Ke({__name:"PopoverPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(f){const _=f;return(y,x)=>(be(),Ne(B(Oc),gs(_s(_)),{default:ee(()=>[tt(y.$slots,"default")]),_:3},16))}}),Nm=Ke({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(f,{emit:_}){const y=f,x=_,C=Bc(y),{forwardRef:L}=kt(),w=Xo();return sx(),(l,U)=>(be(),Ne(B(Rm),{"as-child":"",loop:"",trapped:l.trapFocus,onMountAutoFocus:U[5]||(U[5]=W=>x("openAutoFocus",W)),onUnmountAutoFocus:U[6]||(U[6]=W=>x("closeAutoFocus",W))},{default:ee(()=>[pe(B($c),{"as-child":"","disable-outside-pointer-events":l.disableOutsidePointerEvents,onPointerDownOutside:U[0]||(U[0]=W=>x("pointerDownOutside",W)),onInteractOutside:U[1]||(U[1]=W=>x("interactOutside",W)),onEscapeKeyDown:U[2]||(U[2]=W=>x("escapeKeyDown",W)),onFocusOutside:U[3]||(U[3]=W=>x("focusOutside",W)),onDismiss:U[4]||(U[4]=W=>B(w).onOpenChange(!1))},{default:ee(()=>[pe(B($d),Ot(B(C),{id:B(w).contentId,ref:B(L),"data-state":B(w).open.value?"open":"closed",role:"dialog",style:{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:ee(()=>[tt(l.$slots,"default")]),_:3},16,["id","data-state"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),Sb=Ke({__name:"PopoverContentModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(f,{emit:_}){const y=f,x=_,C=Xo(),L=Fe(!1);Sm(!0);const w=Ga(y,x),{forwardRef:l,currentElement:U}=kt();return Pm(U),(W,G)=>(be(),Ne(Nm,Ot(B(w),{ref:B(l),"trap-focus":B(C).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:G[0]||(G[0]=cu(F=>{var T;x("closeAutoFocus",F),L.value||(T=B(C).triggerElement.value)==null||T.focus()},["prevent"])),onPointerDownOutside:G[1]||(G[1]=F=>{x("pointerDownOutside",F);const T=F.detail.originalEvent,re=T.button===0&&T.ctrlKey===!0,fe=T.button===2||re;L.value=fe}),onFocusOutside:G[2]||(G[2]=cu(()=>{},["prevent"]))}),{default:ee(()=>[tt(W.$slots,"default")]),_:3},16,["trap-focus"]))}}),Tb=Ke({__name:"PopoverContentNonModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(f,{emit:_}){const y=f,x=_,C=Xo(),L=Fe(!1),w=Fe(!1),l=Ga(y,x);return(U,W)=>(be(),Ne(Nm,Ot(B(l),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:W[0]||(W[0]=G=>{var F;x("closeAutoFocus",G),G.defaultPrevented||(L.value||(F=B(C).triggerElement.value)==null||F.focus(),G.preventDefault()),L.value=!1,w.value=!1}),onInteractOutside:W[1]||(W[1]=async G=>{var F;x("interactOutside",G),G.defaultPrevented||(L.value=!0,G.detail.originalEvent.type==="pointerdown"&&(w.value=!0));const T=G.target;(F=B(C).triggerElement.value)!=null&&F.contains(T)&&G.preventDefault(),G.detail.originalEvent.type==="focusin"&&w.value&&G.preventDefault()})}),{default:ee(()=>[tt(U.$slots,"default")]),_:3},16))}}),Um=Ke({__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(f,{emit:_}){const y=f,x=_,C=Xo(),L=Ga(y,x),{forwardRef:w}=kt();return C.contentId||(C.contentId=Va(void 0,"radix-vue-popover-content")),(l,U)=>(be(),Ne(B(bs),{present:l.forceMount||B(C).open.value},{default:ee(()=>[B(C).modal.value?(be(),Ne(Sb,Ot({key:0},B(L),{ref:B(w)}),{default:ee(()=>[tt(l.$slots,"default")]),_:3},16)):(be(),Ne(Tb,Ot({key:1},B(L),{ref:B(w)}),{default:ee(()=>[tt(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Gm=Ke({__name:"PopoverClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(f){const _=f;kt();const y=Xo();return(x,C)=>(be(),Ne(B(ci),{type:x.as==="button"?"button":void 0,as:x.as,"as-child":_.asChild,onClick:C[0]||(C[0]=L=>B(y).onOpenChange(!1))},{default:ee(()=>[tt(x.$slots,"default")]),_:3},8,["type","as","as-child"]))}}),[bn,zb]=Rr("ScrollAreaRoot"),Cb=Ke({__name:"ScrollAreaRoot",props:{type:{default:"hover"},dir:{},scrollHideDelay:{default:600},asChild:{type:Boolean},as:{}},setup(f,{expose:_}){const y=f,x=Fe(0),C=Fe(0),L=Fe(),w=Fe(),l=Fe(),U=Fe(),W=Fe(!1),G=Fe(!1),{type:F,dir:T,scrollHideDelay:re}=rr(y),fe=zm(T);function ye(){var le;(le=L.value)==null||le.scrollTo({top:0})}function de(){var le;(le=L.value)==null||le.scrollTo({top:0,left:0})}_({viewport:L,scrollTop:ye,scrollTopLeft:de});const{forwardRef:ge,currentElement:ae}=kt();return zb({type:F,dir:fe,scrollHideDelay:re,scrollArea:ae,viewport:L,onViewportChange:le=>{L.value=le||void 0},content:w,onContentChange:le=>{w.value=le},scrollbarX:l,scrollbarXEnabled:W,scrollbarY:U,scrollbarYEnabled:G,onScrollbarXChange:le=>{l.value=le||void 0},onScrollbarYChange:le=>{U.value=le||void 0},onScrollbarXEnabledChange:le=>{W.value=le},onScrollbarYEnabledChange:le=>{G.value=le},onCornerWidthChange:le=>{x.value=le}
8,onCornerHeightChange:le=>{C.value=le}}),(le,Ze)=>(be(),Ne(B(ci),{ref:B(ge),"as-child":y.asChild,as:le.as,dir:B(fe),style:ys({position:"relative","--radix-scroll-area-corner-width":`${x.value}px`,"--radix-scroll-area-corner-height":`${C.value}px`})},{default:ee(()=>[tt(le.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),Ab=Ke({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(f,{expose:_}){const y=f,{nonce:x}=rr(y),C=fb(x),L=bn(),w=Fe();nr(()=>{L.onViewportChange(w.value),L.onContentChange(U.value)}),_({viewportElement:w});const{forwardRef:l,currentElement:U}=kt();return(W,G)=>(be(),qe(qr,null,[I("div",Ot({ref_key:"viewportElement",ref:w,"data-radix-scroll-area-viewport":"",style:{overflowX:B(L).scrollbarXEnabled.value?"scroll":"hidden",overflowY:B(L).scrollbarYEnabled.value?"scroll":"hidden"}},W.$attrs,{tabindex:0}),[pe(B(ci),{ref:B(l),style:ys({minWidth:B(L).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":y.asChild,as:W.as},{default:ee(()=>[tt(W.$slots,"default")]),_:3},8,["style","as-child","as"])],16),pe(B(ci),{as:"style",nonce:B(C)},{default:ee(()=>[kr(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-radix-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")]),_:1},8,["nonce"])],64))}});function qm(f,_){return y=>{if(f[0]===f[1]||_[0]===_[1])return _[0];const x=(_[1]-_[0])/(f[1]-f[0]);return _[0]+x*(y-f[0])}}function jc(f){const _=Zm(f.viewport,f.content),y=f.scrollbar.paddingStart+f.scrollbar.paddingEnd,x=(f.scrollbar.size-y)*_;return Math.max(x,18)}function Zm(f,_){const y=f/_;return Number.isNaN(y)?0:y}function Pb(f,_=()=>{}){let y={left:f.scrollLeft,top:f.scrollTop},x=0;return function C(){const L={left:f.scrollLeft,top:f.scrollTop},w=y.left!==L.left,l=y.top!==L.top;(w||l)&&_(),y=L,x=window.requestAnimationFrame(C)}(),()=>window.cancelAnimationFrame(x)}function Gf(f,_,y="ltr"){const x=jc(_),C=_.scrollbar.paddingStart+_.scrollbar.paddingEnd,L=_.scrollbar.size-C,w=_.content-_.viewport,l=L-x,U=y==="ltr"?[0,w]:[w*-1,0],W=Iv(f,U[0],U[1]);return qm([0,w],[0,l])(W)}function xc(f){return f?Number.parseInt(f,10):0}function Ib(f,_,y,x="ltr"){const C=jc(y),L=C/2,w=_||L,l=C-w,U=y.scrollbar.paddingStart+w,W=y.scrollbar.size-y.scrollbar.paddingEnd-l,G=y.content-y.viewport,F=x==="ltr"?[0,G]:[G*-1,0];return qm([U,W],F)(f)}function qf(f,_){return f>0&&f<_}const Hm=Ke({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(f,{emit:_}){const y=f,x=_,C=bn(),L=Vc(),w=Nc(),{forwardRef:l,currentElement:U}=kt(),W=Fe(""),G=Fe();function F(ge){var ae,le;if(G.value){const Ze=ge.clientX-((ae=G.value)==null?void 0:ae.left),Ue=ge.clientY-((le=G.value)==null?void 0:le.top);x("onDragScroll",{x:Ze,y:Ue})}}function T(ge){ge.button===0&&(ge.target.setPointerCapture(ge.pointerId),G.value=U.value.getBoundingClientRect(),W.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",C.viewport&&(C.viewport.value.style.scrollBehavior="auto"),F(ge))}function re(ge){F(ge)}function fe(ge){const ae=ge.target;ae.hasPointerCapture(ge.pointerId)&&ae.releasePointerCapture(ge.pointerId),document.body.style.webkitUserSelect=W.value,C.viewport&&(C.viewport.value.style.scrollBehavior=""),G.value=void 0}function ye(ge){var ae;const le=ge.target,Ze=(ae=U.value)==null?void 0:ae.contains(le),Ue=L.sizes.value.content-L.sizes.value.viewport;Ze&&L.handleWheelScroll(ge,Ue)}nr(()=>{document.addEventListener("wheel",ye,{passive:!1})}),da(()=>{document.removeEventListener("wheel",ye)});function de(){var ge,ae,le,Ze,Ue;U.value&&(y.isHorizontal?L.handleSizeChange({content:((ge=C.viewport.value)==null?void 0:ge.scrollWidth)??0,viewport:((ae=C.viewport.value)==null?void 0:ae.offsetWidth)??0,scrollbar:{size:U.value.clientWidth??0,paddingStart:xc(getComputedStyle(U.value).paddingLeft),paddingEnd:xc(getComputedStyle(U.value).paddingRight)}}):L.handleSizeChange({content:((le=C.viewport.value)==null?void 0:le.scrollHeight)??0,viewport:((Ze=C.viewport.value)==null?void 0:Ze.offsetHeight)??0,scrollbar:{size:((Ue=U.value)==null?void 0:Ue.clientHeight)??0,paddingStart:xc(getComputedStyle(U.value).paddingLeft),paddingEnd:xc(getComputedStyle(U.value).paddingRight)}}))}return qo(U,de),qo(C.content,de),(ge,ae)=>(be(),Ne(B(ci),{ref:B(l),style:{position:"absolute"},"data-scrollbarimpl":"",as:B(w).as.value,"as-child":B(w).asChild.value,onPointerdown:T,onPointermove:re,onPointerup:fe},{default:ee(()=>[tt(ge.$slots,"default")]),_:3},8,["as","as-child"]))}}),Eb=Ke({__name:"ScrollAreaScrollbarX",setup(f){const _=bn(),y=Vc(),{forwardRef:x,currentElement:C}=kt();nr(()=>{C.value&&_.onScrollbarXChange(C.value)});const L=at(()=>y.sizes.value);return(w,l)=>(be(),Ne(Hm,{ref:B(x),"is-horizontal":!0,"data-orientation":"horizontal",style:ys({bottom:0,left:B(_).dir.value==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:B(_).dir.value==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":L.value?`${B(jc)(L.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=U=>B(y).onDragScroll(U.x))},{default:ee(()=>[tt(w.$slots,"default")]),_:3},8,["style"]))}}),Mb=Ke({__name:"ScrollAreaScrollbarY",setup(f){const _=bn(),y=Vc(),{forwardRef:x,currentElement:C}=kt();nr(()=>{C.value&&_.onScrollbarYChange(C.value)});const L=at(()=>y.sizes.value);return(w,l)=>(be(),Ne(Hm,{ref:B(x),"is-horizontal":!1,"data-orientation":"vertical",style:ys({top:0,right:B(_).dir.value==="ltr"?0:void 0,left:B(_).dir.value==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":L.value?`${B(jc)(L.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=U=>B(y).onDragScroll(U.y))},{default:ee(()=>[tt(w.$slots,"default")]),_:3},8,["style"]))}}),[Vc,Db]=Rr("ScrollAreaScrollbarVisible"),Vd=Ke({__name:"ScrollAreaScrollbarVisible",setup(f){const _=bn(),y=Nc(),{forwardRef:x}=kt(),C=Fe({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),L=at(()=>{const ge=Zm(C.value.viewport,C.value.content);return ge>0&&ge<1}),w=Fe(),l=Fe(0);function U(ge,ae){if(re.value){const le=_.viewport.value.scrollLeft+ge.deltaY;_.viewport.value.scrollLeft=le,qf(le,ae)&&ge.preventDefault()}else{const le=_.viewport.value.scrollTop+ge.deltaY;_.viewport.value.scrollTop=le,qf(le,ae)&&ge.preventDefault()}}function W(ge,ae){re.value?l.value=ae.x:l.value=ae.y}function G(ge){l.value=0}function F(ge){C.value=ge}function T(ge,ae){return Ib(ge,l.value,C.value,ae)}const re=at(()=>y.isHorizontal.value);function fe(ge){re.value?_.viewport.value.scrollLeft=T(ge,_.dir.value):_.viewport.value.scrollTop=T(ge)}function ye(){if(re.value){if(_.viewport.value&&w.value){const ge=_.viewport.value.scrollLeft,ae=Gf(ge,C.value,_.dir.value);w.value.style.transform=`translate3d(${ae}px, 0, 0)`}}
8else if(_.viewport.value&&w.value){const ge=_.viewport.value.scrollTop,ae=Gf(ge,C.value);w.value.style.transform=`translate3d(0, ${ae}px, 0)`}}function de(ge){w.value=ge}return Db({sizes:C,hasThumb:L,handleWheelScroll:U,handleThumbDown:W,handleThumbUp:G,handleSizeChange:F,onThumbPositionChange:ye,onThumbChange:de,onDragScroll:fe}),(ge,ae)=>re.value?(be(),Ne(Eb,Ot({key:0},ge.$attrs,{ref:B(x)}),{default:ee(()=>[tt(ge.$slots,"default")]),_:3},16)):(be(),Ne(Mb,Ot({key:1},ge.$attrs,{ref:B(x)}),{default:ee(()=>[tt(ge.$slots,"default")]),_:3},16))}}),Wm=Ke({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean}},setup(f){const _=bn(),y=Nc(),{forwardRef:x}=kt(),C=Fe(!1),L=xm(()=>{if(_.viewport.value){const w=_.viewport.value.offsetWidth<_.viewport.value.scrollWidth,l=_.viewport.value.offsetHeight<_.viewport.value.scrollHeight;C.value=y.isHorizontal.value?w:l}},10);return nr(()=>L()),qo(_.viewport,L),qo(_.content,L),(w,l)=>(be(),Ne(B(bs),{present:w.forceMount||C.value},{default:ee(()=>[pe(Vd,Ot(w.$attrs,{ref:B(x),"data-state":C.value?"visible":"hidden"}),{default:ee(()=>[tt(w.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),Lb=Ke({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean}},setup(f){const _=bn(),{forwardRef:y}=kt();let x;const C=Fe(!1);function L(){window.clearTimeout(x),C.value=!0}function w(){x=window.setTimeout(()=>{C.value=!1},_.scrollHideDelay.value)}return nr(()=>{const l=_.scrollArea.value;l&&(l.addEventListener("pointerenter",L),l.addEventListener("pointerleave",w))}),da(()=>{const l=_.scrollArea.value;l&&(window.clearTimeout(x),l.removeEventListener("pointerenter",L),l.removeEventListener("pointerleave",w))}),(l,U)=>(be(),Ne(B(bs),{present:l.forceMount||C.value},{default:ee(()=>[pe(Wm,Ot(l.$attrs,{ref:B(y),"data-state":C.value?"visible":"hidden"}),{default:ee(()=>[tt(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),Rb=Ke({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean}},setup(f){const _=bn(),y=Nc(),{forwardRef:x}=kt(),{state:C,dispatch:L}=Im("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});Lr(l=>{if(C.value==="idle"){const U=window.setTimeout(()=>L("HIDE"),_.scrollHideDelay.value);l(()=>{window.clearTimeout(U)})}});const w=xm(()=>L("SCROLL_END"),100);return Lr(l=>{const U=_.viewport.value,W=y.isHorizontal.value?"scrollLeft":"scrollTop";if(U){let G=U[W];const F=()=>{const T=U[W];G!==T&&(L("SCROLL"),w()),G=T};U.addEventListener("scroll",F),l(()=>{U.removeEventListener("scroll",F)})}}),(l,U)=>(be(),Ne(B(bs),{present:l.forceMount||B(C)!=="hidden"},{default:ee(()=>[pe(Vd,Ot(l.$attrs,{ref:B(x)}),{default:ee(()=>[tt(l.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),[Nc,Bb]=Rr("ScrollAreaScrollbar"),Fb=Ke({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"div"}},setup(f){const _=f,{forwardRef:y}=kt(),x=bn(),C=at(()=>_.orientation==="horizontal");Qt(C,()=>{C.value?x.onScrollbarXEnabledChange(!0):x.onScrollbarYEnabledChange(!0)},{immediate:!0}),da(()=>{x.onScrollbarXEnabledChange(!1),x.onScrollbarYEnabledChange(!1)});const{orientation:L,forceMount:w,asChild:l,as:U}=rr(_);return Bb({orientation:L,forceMount:w,isHorizontal:C,as:U,asChild:l}),(W,G)=>B(x).type.value==="hover"?(be(),Ne(Lb,Ot({key:0},W.$attrs,{ref:B(y),"force-mount":B(w)}),{default:ee(()=>[tt(W.$slots,"default")]),_:3},16,["force-mount"])):B(x).type.value==="scroll"?(be(),Ne(Rb,Ot({key:1},W.$attrs,{ref:B(y),"force-mount":B(w)}),{default:ee(()=>[tt(W.$slots,"default")]),_:3},16,["force-mount"])):B(x).type.value==="auto"?(be(),Ne(Wm,Ot({key:2},W.$attrs,{ref:B(y),"force-mount":B(w)}),{default:ee(()=>[tt(W.$slots,"default")]),_:3},16,["force-mount"])):B(x).type.value==="always"?(be(),Ne(Vd,Ot({key:3},W.$attrs,{ref:B(y),"data-state":"visible"}),{default:ee(()=>[tt(W.$slots,"default")]),_:3},16)):At("",!0)}}),Ob=Ke({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean},as:{}},setup(f){const _=f,y=bn(),x=Vc();function C(T){const re=T.target.getBoundingClientRect(),fe=T.clientX-re.left,ye=T.clientY-re.top;x.handleThumbDown(T,{x:fe,y:ye})}function L(T){x.handleThumbUp(T)}const{forwardRef:w,currentElement:l}=kt(),U=Fe(),W=at(()=>y.viewport.value);function G(){if(!U.value){const T=Pb(W.value,x.onThumbPositionChange);U.value=T,x.onThumbPositionChange()}}const F=at(()=>x.sizes.value);return Zv(F,()=>{x.onThumbChange(l.value),W.value&&(x.onThumbPositionChange(),W.value.addEventListener("scroll",G))}),da(()=>{var T;W.value.removeEventListener("scroll",G),(T=y.viewport.value)==null||T.removeEventListener("scroll",G)}),(T,re)=>(be(),Ne(B(ci),{ref:B(w),"data-state":B(x).hasThumb?"visible":"hidden",style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)"},"as-child":_.asChild,as:T.as,onPointerdown:C,onPointerup:L},{default:ee(()=>[tt(T.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),$b=Ke({__name:"ScrollAreaCornerImpl",setup(f){const _=bn(),y=Fe(0),x=Fe(0),C=at(()=>!!y.value&&!!x.value);function L(){var l;const U=((l=_.scrollbarX.value)==null?void 0:l.offsetHeight)||0;
8_.onCornerHeightChange(U),x.value=U}function w(){var l;const U=((l=_.scrollbarY.value)==null?void 0:l.offsetWidth)||0;_.onCornerWidthChange(U),y.value=U}return qo(_.scrollbarX.value,L),qo(_.scrollbarY.value,w),Qt(()=>_.scrollbarX.value,L),Qt(()=>_.scrollbarY.value,w),(l,U)=>{var W;return C.value?(be(),Ne(B(ci),Ot({key:0,style:{width:`${y.value}px`,height:`${x.value}px`,position:"absolute",right:B(_).dir.value==="ltr"?0:void 0,left:B(_).dir.value==="rtl"?0:void 0,bottom:0}},(W=l.$parent)==null?void 0:W.$props),{default:ee(()=>[tt(l.$slots,"default")]),_:3},16,["style"])):At("",!0)}}}),jb=Ke({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean},as:{}},setup(f){const _=f,{forwardRef:y}=kt(),x=bn(),C=at(()=>!!x.scrollbarX.value&&!!x.scrollbarY.value),L=at(()=>x.type.value!=="scroll"&&C.value);return(w,l)=>L.value?(be(),Ne($b,Ot({key:0},_,{ref:B(y)}),{default:ee(()=>[tt(w.$slots,"default")]),_:3},16)):At("",!0)}});function Vb(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}Vb();const Nb=["name","disabled","required","value","checked","data-state","data-disabled"],[Ub,Gb]=Rr("SwitchRoot"),Xm=Ke({__name:"SwitchRoot",props:{defaultChecked:{type:Boolean},checked:{type:Boolean,default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(f,{emit:_}){const y=f,x=_,{disabled:C}=rr(y),L=ha(y,"checked",x,{defaultValue:y.defaultChecked,passive:y.checked===void 0});function w(){C.value||(L.value=!L.value)}const{forwardRef:l,currentElement:U}=kt(),W=ax(U),G=at(()=>{var F;return y.id&&U.value?(F=document.querySelector(`[for="${y.id}"]`))==null?void 0:F.innerText:void 0});return Gb({checked:L,toggleCheck:w,disabled:C}),(F,T)=>(be(),qe(qr,null,[pe(B(ci),Ot(F.$attrs,{id:F.id,ref:B(l),role:"switch",type:F.as==="button"?"button":void 0,value:F.value,"aria-label":F.$attrs["aria-label"]||G.value,"aria-checked":B(L),"aria-required":F.required,"data-state":B(L)?"checked":"unchecked","data-disabled":B(C)?"":void 0,"as-child":F.asChild,as:F.as,disabled:B(C),onClick:w,onKeydown:Nn(cu(w,["prevent"]),["enter"])}),{default:ee(()=>[tt(F.$slots,"default",{checked:B(L)})]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]),B(W)?(be(),qe("input",{key:0,type:"checkbox",name:F.name,tabindex:"-1","aria-hidden":"true",disabled:B(C),required:F.required,value:F.value,checked:!!B(L),"data-state":B(L)?"checked":"unchecked","data-disabled":B(C)?"":void 0,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,Nb)):At("",!0)],64))}}),Km=Ke({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(f){const _=Ub();return kt(),(y,x)=>{var C;return be(),Ne(B(ci),{"data-state":(C=B(_).checked)!=null&&C.value?"checked":"unchecked","data-disabled":B(_).disabled.value?"":void 0,"as-child":y.asChild,as:y.as},{default:ee(()=>[tt(y.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),Ym="tooltip.open",[Nd,qb]=Rr("TooltipProvider"),Zb=Ke({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(f){const _=f,{delayDuration:y,skipDelayDuration:x,disableHoverableContent:C,disableClosingTrigger:L,ignoreNonKeyboardFocus:w,disabled:l}=rr(_);kt();const U=Fe(!0),W=Fe(!1),{start:G,stop:F}=bm(()=>{U.value=!0},x,{immediate:!1});return qb({isOpenDelayed:U,delayDuration:y,onOpen(){F(),U.value=!1},onClose(){G()},isPointerInTransitRef:W,disableHoverableContent:C,disableClosingTrigger:L,disabled:l,ignoreNonKeyboardFocus:w}),(T,re)=>tt(T.$slots,"default")}}),[Uc,Hb]=Rr("TooltipRoot"),Wb=Ke({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(f,{emit:_}){const y=f,x=_;kt();const C=Nd(),L=at(()=>y.disableHoverableContent??C.disableHoverableContent.value),w=at(()=>y.disableClosingTrigger??C.disableClosingTrigger.value),l=at(()=>y.disabled??C.disabled.value),U=at(()=>y.delayDuration??C.delayDuration.value),W=at(()=>y.ignoreNonKeyboardFocus??C.ignoreNonKeyboardFocus.value),G=ha(y,"open",x,{defaultValue:y.defaultOpen,passive:y.open===void 0});Qt(G,le=>{C.onClose&&(le?(C.onOpen(),document.dispatchEvent(new CustomEvent(Ym))):C.onClose())});const F=Fe(!1),T=Fe(),re=at(()=>G.value?F.value?"delayed-open":"instant-open":"closed"),{start:fe,stop:ye}=bm(()=>{F.value=!0,G.value=!0},U,{immediate:!1});function de(){ye(),F.value=!1,G.value=!0}function ge(){ye(),G.value=!1}function ae(){fe()}return Hb({contentId:"",open:G,stateAttribute:re,trigger:T,onTriggerChange(le){T.value=le},onTriggerEnter(){C.isOpenDelayed.value?ae():de()},onTriggerLeave(){L.value?ge():ye()},onOpen:de,onClose:ge,disableHoverableContent:L,disableClosingTrigger:w,disabled:l,ignoreNonKeyboardFocus:W}),(le,Ze)=>(be(),Ne(B(Fd),null,{default:ee(()=>[tt(le.$slots,"default",{open:B(G)})]),_:3}))}}),Xb=Ke({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(f){const _=f,y=Uc(),x=Nd();y.contentId||(y.contentId=Va(void 0,"radix-vue-tooltip-content"));const{forwardRef:C,currentElement:L}=kt(),w=Fe(!1),l=Fe(!1),U=at(()=>y.disabled.value?{}
8:{click:ye,focus:re,pointermove:F,pointerleave:T,pointerdown:G,blur:fe});nr(()=>{y.onTriggerChange(L.value)});function W(){setTimeout(()=>{w.value=!1},1)}function G(){w.value=!0,document.addEventListener("pointerup",W,{once:!0})}function F(de){de.pointerType!=="touch"&&!l.value&&!x.isPointerInTransitRef.value&&(y.onTriggerEnter(),l.value=!0)}function T(){y.onTriggerLeave(),l.value=!1}function re(de){var ge,ae;w.value||y.ignoreNonKeyboardFocus.value&&!((ae=(ge=de.target).matches)!=null&&ae.call(ge,":focus-visible"))||y.onOpen()}function fe(){y.onClose()}function ye(){y.disableClosingTrigger.value||y.onClose()}return(de,ge)=>(be(),Ne(B(Od),{"as-child":""},{default:ee(()=>[pe(B(ci),Ot({ref:B(C),"aria-describedby":B(y).open.value?B(y).contentId:void 0,"data-state":B(y).stateAttribute.value,as:de.as,"as-child":_.asChild,"data-grace-area-trigger":""},fy(U.value)),{default:ee(()=>[tt(de.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),Jm=Ke({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(f,{emit:_}){const y=f,x=_,C=Uc(),{forwardRef:L}=kt(),w=my(),l=at(()=>{var G;return(G=w.default)==null?void 0:G.call(w)}),U=at(()=>{var G;if(y.ariaLabel)return y.ariaLabel;let F="";function T(re){typeof re.children=="string"&&re.type!==rm?F+=re.children:Array.isArray(re.children)&&re.children.forEach(fe=>T(fe))}return(G=l.value)==null||G.forEach(re=>T(re)),F}),W=at(()=>{const{ariaLabel:G,...F}=y;return F});return nr(()=>{Pc(window,"scroll",G=>{const F=G.target;F!=null&&F.contains(C.trigger.value)&&C.onClose()}),Pc(window,Ym,C.onClose)}),(G,F)=>(be(),Ne(B($c),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:F[0]||(F[0]=T=>x("escapeKeyDown",T)),onPointerDownOutside:F[1]||(F[1]=T=>{var re;B(C).disableClosingTrigger.value&&(re=B(C).trigger.value)!=null&&re.contains(T.target)&&T.preventDefault(),x("pointerDownOutside",T)}),onFocusOutside:F[2]||(F[2]=cu(()=>{},["prevent"])),onDismiss:F[3]||(F[3]=T=>B(C).onClose())},{default:ee(()=>[pe(B($d),Ot({ref:B(L),"data-state":B(C).stateAttribute.value},{...G.$attrs,...W.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:ee(()=>[tt(G.$slots,"default"),pe(B(pb),{id:B(C).contentId,role:"tooltip"},{default:ee(()=>[kr(Et(U.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),Kb=Ke({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(f){const _=Bc(f),{forwardRef:y,currentElement:x}=kt(),{trigger:C,onClose:L}=Uc(),w=Nd(),{isPointerInTransit:l,onPointerExit:U}=Cm(C,x);return w.isPointerInTransitRef=l,U(()=>{L()}),(W,G)=>(be(),Ne(Jm,Ot({ref:B(y)},B(_)),{default:ee(()=>[tt(W.$slots,"default")]),_:3},16))}}),Yb=Ke({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(f,{emit:_}){const y=f,x=_,C=Uc(),L=Ga(y,x),{forwardRef:w}=kt();return(l,U)=>(be(),Ne(B(bs),{present:l.forceMount||B(C).open.value},{default:ee(()=>[(be(),Ne(im(B(C).disableHoverableContent.value?Jm:Kb),Ot({ref:B(w)},B(L)),{default:ee(()=>[tt(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Jb=Ke({__name:"TooltipArrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(f){const _=f;return kt(),(y,x)=>(be(),Ne(B(Om),gs(_s(_)),{default:ee(()=>[tt(y.$slots,"default")]),_:3},16))}}),Qb=Ke({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(f){const _=f;return(y,x)=>(be(),Ne(B(Oc),gs(_s(_)),{default:ee(()=>[tt(y.$slots,"default")]),_:3},16))}});function Qm(f){var _,y,x="";if(typeof f=="string"||typeof f=="number")x+=f;else if(typeof f=="object")if(Array.isArray(f)){var C=f.length;for(_=0;_<C;_++)f[_]&&(y=Qm(f[_]))&&(x&&(x+=" "),x+=y)}else for(y in f)f[y]&&(x&&(x+=" "),x+=y);return x}function eg(){for(var f,_,y=0,x="",C=arguments.length;y<C;y++)(f=arguments[y])&&(_=Qm(f))&&(x&&(x+=" "),x+=_);return x}const Zf=f=>typeof f=="boolean"?`${f}`:f===0?"0":f,Hf=eg,e0=(f,_)=>y=>{var x;if((_==null?void 0:_.variants)==null)return Hf(f,y==null?void 0:y.class,y==null?void 0:y.className);const{variants:C,defaultVariants:L}=_,w=Object.keys(C).map(W=>{const G=y==null?void 0:y[W],F=L==null?void 0:L[W];if(G===null)return null;const T=Zf(G)||Zf(F);return C[W][T]}),l=y&&Object.entries(y).reduce((W,G)=>{let[F,T]=G;return T===void 0||(W[F]=T),W},{}),U=_==null||(x=_.compoundVariants)===null||x===void 0?void 0:x.reduce((W,G)=>{let{class:F,className:T,...re}=G;return Object.entries(re).every(fe=>{let[ye,de]=fe;return Array.isArray(de)?de.includes({...L,...l}[ye]):{...L,...l}[ye]===de})?[...W,F,T]:W},[]);return Hf(f,w,U,y==null?void 0:y.class,y==null?void 0:y.className)},t0=e0("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ud="-",i0=f=>{const _=n0(f),{conflictingClassGroups:y,conflictingClassGroupModifiers:x}=f;return{getClassGroupId:w=>{const l=w.split(Ud);return l[0]===""&&l.length!==1&&l.shift(),tg(l,_)||r0(w)},getConflictingClassGroupIds:(w,l)=>{const U=y[w]||[];return l&&x[w]?[...U,...x[w]]:U}}},tg=(f,_)=>{var w;if(f.length===0)return _.classGroupId;const y=f[0],x=_.nextPart.get(y),C=x?tg(f.slice(1),x):void 0;if(C)return C;if(_.validators.length===0)return;const L=f.join(Ud);return(w=_.validators.find(({validator:l})=>l(L)))==null?void 0:w.classGroupId},Wf=/^\[(.+)\]$/,r0=f=>{if(Wf.test(f)){const _=Wf.exec(f)[1],y=_==null?void 0:_.substring(0,_.indexOf(":"));if(y)return"arbitrary.."+y}},n0=f=>{const{theme:_,prefix:y}=f,x={nextPart:new Map,validators:[]};
vendor: 5,198 bytes, line 8
8return a0(Object.entries(f.classGroups),y).forEach(([L,w])=>{kd(w,x,L,_)}),x},kd=(f,_,y,x)=>{f.forEach(C=>{if(typeof C=="string"){const L=C===""?_:Xf(_,C);L.classGroupId=y;return}if(typeof C=="function"){if(s0(C)){kd(C(x),_,y,x);return}_.validators.push({validator:C,classGroupId:y});return}Object.entries(C).forEach(([L,w])=>{kd(w,Xf(_,L),y,x)})})},Xf=(f,_)=>{let y=f;return _.split(Ud).forEach(x=>{y.nextPart.has(x)||y.nextPart.set(x,{nextPart:new Map,validators:[]}),y=y.nextPart.get(x)}),y},s0=f=>f.isThemeGetter,a0=(f,_)=>_?f.map(([y,x])=>{const C=x.map(L=>typeof L=="string"?_+L:typeof L=="object"?Object.fromEntries(Object.entries(L).map(([w,l])=>[_+w,l])):L);return[y,C]}):f,o0=f=>{if(f<1)return{get:()=>{},set:()=>{}};let _=0,y=new Map,x=new Map;const C=(L,w)=>{y.set(L,w),_++,_>f&&(_=0,x=y,y=new Map)};return{get(L){let w=y.get(L);if(w!==void 0)return w;if((w=x.get(L))!==void 0)return C(L,w),w},set(L,w){y.has(L)?y.set(L,w):C(L,w)}}},ig="!",l0=f=>{const{separator:_,experimentalParseClassName:y}=f,x=_.length===1,C=_[0],L=_.length,w=l=>{const U=[];let W=0,G=0,F;for(let de=0;de<l.length;de++){let ge=l[de];if(W===0){if(ge===C&&(x||l.slice(de,de+L)===_)){U.push(l.slice(G,de)),G=de+L;continue}if(ge==="/"){F=de;continue}}ge==="["?W++:ge==="]"&&W--}const T=U.length===0?l:l.substring(G),re=T.startsWith(ig),fe=re?T.substring(1):T,ye=F&&F>G?F-G:void 0;return{modifiers:U,hasImportantModifier:re,baseClassName:fe,maybePostfixModifierPosition:ye}};return y?l=>y({className:l,parseClassName:w}):w},u0=f=>{if(f.length<=1)return f;const _=[];let y=[];return f.forEach(x=>{x[0]==="["?(_.push(...y.sort(),x),y=[]):y.push(x)}),_.push(...y.sort()),_},c0=f=>({cache:o0(f.cacheSize),parseClassName:l0(f),...i0(f)}),h0=/\s+/,d0=(f,_)=>{const{parseClassName:y,getClassGroupId:x,getConflictingClassGroupIds:C}=_,L=[],w=f.trim().split(h0);let l="";for(let U=w.length-1;U>=0;U-=1){const W=w[U],{modifiers:G,hasImportantModifier:F,baseClassName:T,maybePostfixModifierPosition:re}=y(W);let fe=!!re,ye=x(fe?T.substring(0,re):T);if(!ye){if(!fe){l=W+(l.length>0?" "+l:l);continue}if(ye=x(T),!ye){l=W+(l.length>0?" "+l:l);continue}fe=!1}const de=u0(G).join(":"),ge=F?de+ig:de,ae=ge+ye;if(L.includes(ae))continue;L.push(ae);const le=C(ye,fe);for(let Ze=0;Ze<le.length;++Ze){const Ue=le[Ze];L.push(ge+Ue)}l=W+(l.length>0?" "+l:l)}return l};function p0(){let f=0,_,y,x="";for(;f<arguments.length;)(_=arguments[f++])&&(y=rg(_))&&(x&&(x+=" "),x+=y);return x}const rg=f=>{if(typeof f=="string")return f;let _,y="";for(let x=0;x<f.length;x++)f[x]&&(_=rg(f[x]))&&(y&&(y+=" "),y+=_);return y};function f0(f,..._){let y,x,C,L=w;function w(U){const W=_.reduce((G,F)=>F(G),f());return y=c0(W),x=y.cache.get,C=y.cache.set,L=l,l(U)}function l(U){const W=x(U);if(W)return W;const G=d0(U,y);return C(U,G),G}return function(){return L(p0.apply(null,arguments))}}const Ci=f=>{const _=y=>y[f]||[];return _.isThemeGetter=!0,_},ng=/^\[(?:([a-z-]+):)?(.+)\]$/i,m0=/^\d+\/\d+$/,g0=new Set(["px","full","screen"]),_0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,y0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,v0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,x0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,b0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ps=f=>Uo(f)||g0.has(f)||m0.test(f),ta=f=>Ko(f,"length",P0),Uo=f=>!!f&&!Number.isNaN(Number(f)),pd=f=>Ko(f,"number",Uo),lu=f=>!!f&&Number.isInteger(Number(f)),w0=f=>f.endsWith("%")&&Uo(f.slice(0,-1)),Vt=f=>ng.test(f),ia=f=>_0.test(f),k0=new Set(["length","size","percentage"]),S0=f=>Ko(f,k0,sg),T0=f=>Ko(f,"position",sg),z0=new Set(["image","url"]),C0=f=>Ko(f,z0,E0),A0=f=>Ko(f,"",I0),uu=()=>!0,Ko=(f,_,y)=>{const x=ng.exec(f);return x?x[1]?typeof _=="string"?x[1]===_:_.has(x[1]):y(x[2]):!1},P0=f=>y0.test(f)&&!v0.test(f),sg=()=>!1,I0=f=>x0.test(f),E0=f=>b0.test(f),M0=()=>{const f=Ci("colors"),_=Ci("spacing"),y=Ci("blur"),x=Ci("brightness"),C=Ci("borderColor"),L=Ci("borderRadius"),w=Ci("borderSpacing"),l=Ci("borderWidth"),U=Ci("contrast"),W=Ci("grayscale"),G=Ci("hueRotate"),F=Ci("invert"),T=Ci("gap"),re=Ci("gradientColorStops"),fe=Ci("gradientColorStopPositions"),ye=Ci("inset"),de=Ci("margin"),ge=Ci("opacity"),ae=Ci("padding"),le=Ci("saturate"),Ze=Ci("scale"),Ue=Ci("sepia"),wt=Ci("skew"),Ge=Ci("space"),P=Ci("translate"),Te=()=>["auto","contain","none"],Ae=()=>["auto","hidden","clip","visible","scroll"],Pt=()=>["auto",Vt,_],_t=()=>[Vt,_],Ct=()=>["",ps,ta],Lt=()=>["auto",Uo,Vt],wi=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ri=()=>["solid","dashed","dotted","double","none"],hi=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Di=()=>["start","end","center","between","around","evenly","stretch"],xi=()=>["","0",Vt],Ui=()=>["auto","avoid","all","avoid-page","page","left","right","column"],li=()=>[Uo,Vt];return{cacheSize:500,separator:":",theme:{colors:[uu],spacing:[ps,ta],blur:["none","",ia,Vt],brightness:li(),borderColor:[f],borderRadius:["n
8one","","full",ia,Vt],borderSpacing:_t(),borderWidth:Ct(),contrast:li(),grayscale:xi(),hueRotate:li(),invert:xi(),gap:_t(),gradientColorStops:[f],gradientColorStopPositions:[w0,ta],inset:Pt(),margin:Pt(),opacity:li(),padding:_t(),saturate:li(),scale:li(),sepia:xi(),skew:li(),space:_t(),translate:_t()},classGroups:{aspect:[{aspect:["auto","square","video",Vt]}],container:["container"],columns:[{columns:[ia]}],"break-after":[{"break-after":Ui()}],"break-before":[{"break-before":Ui()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...wi(),Vt]}],overflow:[{overflow:Ae()}],"overflow-x":[{"overflow-x":Ae()}],"overflow-y":[{"overflow-y":Ae()}],overscroll:[{overscroll:Te()}],"overscroll-x":[{"overscroll-x":Te()}],"overscroll-y":[{"overscroll-y":Te()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[ye]}],"inset-x":[{"inset-x":[ye]}],"inset-y":[{"inset-y":[ye]}],start:[{start:[ye]}],end:[{end:[ye]}],top:[{top:[ye]}],right:[{right:[ye]}],bottom:[{bottom:[ye]}],left:[{left:[ye]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",lu,Vt]}],basis:[{basis:Pt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Vt]}],grow:[{grow:xi()}],shrink:[{shrink:xi()}],order:[{order:["first","last","none",lu,Vt]}],"grid-cols":[{"grid-cols":[uu]}],"col-start-end":[{col:["auto",{span:["full",lu,Vt]},Vt]}],"col-start":[{"col-start":Lt()}],"col-end":[{"col-end":Lt()}],"grid-rows":[{"grid-rows":[uu]}],"row-start-end":[{row:["auto",{span:[lu,Vt]},Vt]}],"row-start":[{"row-start":Lt()}],"row-end":[{"row-end":Lt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Vt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Vt]}],gap:[{gap:[T]}],"gap-x":[{"gap-x":[T]}],"gap-y":[{"gap-y":[T]}],"justify-content":[{justify:["normal",...Di()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Di(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Di(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[ae]}],px:[{px:[ae]}],py:[{py:[ae]}],ps:[{ps:[ae]}],pe:[{pe:[ae]}],pt:[{pt:[ae]}],pr:[{pr:[ae]}],pb:[{pb:[ae]}],pl:[{pl:[ae]}],m:[{m:[de]}],mx:[{mx:[de]}],my:[{my:[de]}],ms:[{ms:[de]}],me:[{me:[de]}],mt:[{mt:[de]}],mr:[{mr:[de]}],mb:[{mb:[de]}],ml:[{ml:[de]}],"space-x":[{"space-x":[Ge]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Ge]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Vt,_]}],"min-w":[{"min-w":[Vt,_,"min","max","fit"]}],"max-w":[{"max-w":[Vt,_,"none","full","min","max","fit","prose",{screen:[ia]},ia]}],h:[{h:[Vt,_,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Vt,_,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Vt,_,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Vt,_,"auto","min","max","fit"]}],"font-size":[{text:["base",ia,ta]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pd]}],"font-family":[{font:[uu]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Vt]}],"line-clamp":[{"line-clamp":["none",Uo,pd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ps,Vt]}],"list-image":[{"list-image":["none",Vt]}],"list-style-type":[{list:["none","disc","decimal",Vt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[f]}],"placeholder-opacity":[{"placeholder-opacity":[ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[f]}],"text-opacity":[{"text-opacity":[ge]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ri(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ps,ta]}],"underline-offset":[{"underline-offset":["auto",ps,Vt]}],"text-decoration-color":[{decoration:[f]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_t()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Vt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Vt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[ge]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...wi(),T0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",S0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},C0]}],"bg-color":[{bg:[f]}],"gradient-from-pos":[{from:[fe]}
vendor: 5,225 bytes, line 8
8],"gradient-via-pos":[{via:[fe]}],"gradient-to-pos":[{to:[fe]}],"gradient-from":[{from:[re]}],"gradient-via":[{via:[re]}],"gradient-to":[{to:[re]}],rounded:[{rounded:[L]}],"rounded-s":[{"rounded-s":[L]}],"rounded-e":[{"rounded-e":[L]}],"rounded-t":[{"rounded-t":[L]}],"rounded-r":[{"rounded-r":[L]}],"rounded-b":[{"rounded-b":[L]}],"rounded-l":[{"rounded-l":[L]}],"rounded-ss":[{"rounded-ss":[L]}],"rounded-se":[{"rounded-se":[L]}],"rounded-ee":[{"rounded-ee":[L]}],"rounded-es":[{"rounded-es":[L]}],"rounded-tl":[{"rounded-tl":[L]}],"rounded-tr":[{"rounded-tr":[L]}],"rounded-br":[{"rounded-br":[L]}],"rounded-bl":[{"rounded-bl":[L]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[ge]}],"border-style":[{border:[...ri(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[ge]}],"divide-style":[{divide:ri()}],"border-color":[{border:[C]}],"border-color-x":[{"border-x":[C]}],"border-color-y":[{"border-y":[C]}],"border-color-s":[{"border-s":[C]}],"border-color-e":[{"border-e":[C]}],"border-color-t":[{"border-t":[C]}],"border-color-r":[{"border-r":[C]}],"border-color-b":[{"border-b":[C]}],"border-color-l":[{"border-l":[C]}],"divide-color":[{divide:[C]}],"outline-style":[{outline:["",...ri()]}],"outline-offset":[{"outline-offset":[ps,Vt]}],"outline-w":[{outline:[ps,ta]}],"outline-color":[{outline:[f]}],"ring-w":[{ring:Ct()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[f]}],"ring-opacity":[{"ring-opacity":[ge]}],"ring-offset-w":[{"ring-offset":[ps,ta]}],"ring-offset-color":[{"ring-offset":[f]}],shadow:[{shadow:["","inner","none",ia,A0]}],"shadow-color":[{shadow:[uu]}],opacity:[{opacity:[ge]}],"mix-blend":[{"mix-blend":[...hi(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":hi()}],filter:[{filter:["","none"]}],blur:[{blur:[y]}],brightness:[{brightness:[x]}],contrast:[{contrast:[U]}],"drop-shadow":[{"drop-shadow":["","none",ia,Vt]}],grayscale:[{grayscale:[W]}],"hue-rotate":[{"hue-rotate":[G]}],invert:[{invert:[F]}],saturate:[{saturate:[le]}],sepia:[{sepia:[Ue]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[y]}],"backdrop-brightness":[{"backdrop-brightness":[x]}],"backdrop-contrast":[{"backdrop-contrast":[U]}],"backdrop-grayscale":[{"backdrop-grayscale":[W]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[G]}],"backdrop-invert":[{"backdrop-invert":[F]}],"backdrop-opacity":[{"backdrop-opacity":[ge]}],"backdrop-saturate":[{"backdrop-saturate":[le]}],"backdrop-sepia":[{"backdrop-sepia":[Ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[w]}],"border-spacing-x":[{"border-spacing-x":[w]}],"border-spacing-y":[{"border-spacing-y":[w]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Vt]}],duration:[{duration:li()}],ease:[{ease:["linear","in","out","in-out",Vt]}],delay:[{delay:li()}],animate:[{animate:["none","spin","ping","pulse","bounce",Vt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Ze]}],"scale-x":[{"scale-x":[Ze]}],"scale-y":[{"scale-y":[Ze]}],rotate:[{rotate:[lu,Vt]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[wt]}],"skew-y":[{"skew-y":[wt]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Vt]}],accent:[{accent:["auto",f]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Vt]}],"caret-color":[{caret:[f]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_t()}],"scroll-mx":[{"scroll-mx":_t()}],"scroll-my":[{"scroll-my":_t()}],"scroll-ms":[{"scroll-ms":_t()}],"scroll-me":[{"scroll-me":_t()}],"scroll-mt":[{"scroll-mt":_t()}],"scroll-mr":[{"scroll-mr":_t()}],"scroll-mb":[{"scroll-mb":_t()}],"scroll-ml":[{"scroll-ml":_t()}],"scroll-p":[{"scroll-p":_t()}],"scroll-px":[{"scroll-px":_t()}],"scroll-py":[{"scroll-py":_t()}],"scroll-ps":[{"scroll-ps":_t()}],"scroll-pe":[{"scroll-pe":_t()}],"scroll-pt":[{"scroll-pt":_t()}],"scroll-pr":[{"scroll-pr":_t()}],"scroll-pb":[{"scroll-pb":_t()}],"scroll-pl":[{"scroll-pl":_t()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
8],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Vt]}],fill:[{fill:[f,"none"]}],"stroke-w":[{stroke:[ps,ta,pd]}],stroke:[{stroke:[f,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},D0=f0(M0);function Gc(...f){return D0(eg(f))}const L0=Ke({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(f){const _=f;return(y,x)=>(be(),Ne(B(ci),{as:y.as,"as-child":y.asChild,class:fd(B(Gc)(B(t0)({variant:y.variant,size:y.size}),_.class))},{default:ee(()=>[tt(y.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),ag=Ke({__name:"Button",setup(f){return(_,y)=>(be(),Ne(L0,null,{default:ee(()=>[tt(_.$slots,"default")]),_:3}))}}),R0=Ke({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(f){const _=f,y=at(()=>{const{class:x,...C}=_;return C});return(x,C)=>(be(),Ne(B(Fb),Ot(y.value,{class:B(Gc)("flex touch-none select-none transition-colors",x.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",x.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",_.class)}),{default:ee(()=>[pe(B(Ob),{class:"relative flex-1 rounded-full bg-border"})]),_:1},16,["class"]))}}),B0=Ke({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(f){const _=f,y=at(()=>{const{class:x,...C}=_;return C});return(x,C)=>(be(),Ne(B(Cb),Ot(y.value,{class:B(Gc)("relative overflow-hidden",_.class)}),{default:ee(()=>[pe(B(Ab),{class:"h-full w-full rounded-[inherit] max-h-[60vh]"},{default:ee(()=>[tt(x.$slots,"default")]),_:3}),pe(R0),pe(B(jb))]),_:3},16,["class"]))}}),F0=Intl.NumberFormat("nl-NL");function fi(f){const _=parseFloat(f);
8return isNaN(_)?aa(f):_<0?"":F0.format(_)}function og(f,_){return new Intl.NumberFormat("nl-NL",{minimumFractionDigits:_,maximumFractionDigits:_}).format(f)}function Kf(f,_=2){return og(f/1e3,_)}function O0(f){return Math.round(f*100)}const $0={g_adl_afst:f=>Kf(f,2),g_vv_afst:f=>Kf(f,2),g_seswoa:f=>og(f,2),f_optop:f=>String(O0(f))};function j0(f,_){if(!_)return fi(f);const y=parseFloat(f);if(isNaN(y))return aa(f);if(y<0)return"";const x=$0[_];return x?x(y):fi(y)}const V0={class:"flex flex-col gap-2 mt-10 mb-5"},N0={key:0},U0={key:0,class:"mb-4 min-w-full"},G0={class:"bg-gray-200 sticky top-0 z-30"},q0={class:"px-1 text-right font-bold"},Z0={class:"bg-slate-100 font-semibold"},H0={colspan:"9",scope:"colgroup"},W0={class:"p-2 text-left font-light italic"},X0={class:"border-b even:bg-gray-50"},K0={class:"px-2 py-2 text-left font-thin"},Y0={class:"p-3 text-right"},J0={key:0},Q0={class:"flex justify-end"},e1={class:"mb-4 flex w-fit flex-wrap gap-1 place-self-center text-sm"},t1={class:"me-2"},i1=["onClick"],r1=Ke({__name:"ComparisonOverview",props:{selected:{}},setup(f){const _=at(()=>Object.fromEntries(Object.entries(om).filter(([l,U])=>U.length>0)));function y(l){return aa(l.charAt(0).toUpperCase()+l.slice(1).replaceAll("_"," "))}const x=f,C=Fe([]);function L(l){return aa((l==null?void 0:l.bu_naam)||(l==null?void 0:l.gm_naam)||"")}const w=at(()=>C.value.filter(l=>L(l)===L(x.selected)).length>0);return(l,U)=>{const W=ag;return be(),qe("div",V0,[B(w)?At("",!0):(be(),Ne(W,{key:0,class:"w-7/8 mr-1 h-8 rounded text-white text-base bg-govblue shadow-[0_2px_10px] shadow-black/5 hover:bg-govblue/70 focus:bg-govblue/70",onClick:U[0]||(U[0]=G=>B(C).push(x.selected)),disabled:B(w)||B(C).length>5},{default:ee(()=>U[1]||(U[1]=[kr(" Vergelijk geselecteerde regio ")])),_:1},8,["disabled"])),B(w)?(be(),Ne(B(Bx),{key:1},{default:ee(()=>[pe(B(Fx),{"as-child":""},{default:ee(()=>[pe(W,{class:"w-7/8 mr-1 h-8 rounded border-[2px] text-base border-govblue bg-white shadow-[0_2px_10px] shadow-black/5 hover:bg-govblue/20 focus:bg-govblue/20",disabled:B(C).length<1},{default:ee(()=>[U[2]||(U[2]=I("span",{class:"me-2"}," Toon vergelijking ",-1)),B(C).length>0?(be(),qe("span",N0,"("+Et(B(C).length)+")",1)):At("",!0)]),_:1},8,["disabled"])]),_:1}),pe(B(Ox),null,{default:ee(()=>[pe(B(tb),{class:"data-[state=open]:animate-overlayShow fixed inset-0 z-[55] bg-slate-900/70"}),pe(B(Qx),{class:"data-[state=open]:animate-contentShow fixed left-[50%] top-[50%] z-[100] max-h-[85vh] w-[90vw] translate-x-[-50%] translate-y-[-50%] rounded-[6px] bg-white p-[25px] shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] focus:outline-none"},{default:ee(()=>[pe(B(ib),{class:"m-0 text-[17px] font-semibold text-mauve12"},{default:ee(()=>U[3]||(U[3]=[kr(" Vergelijkingstabel ")])),_:1}),pe(B(rb),{class:"mb-5 mt-[10px] text-[15px] leading-normal text-mauve11"},{default:ee(()=>U[4]||(U[4]=[kr(" Vergelijk data van verschillende gemeenten of buurten. ")])),_:1}),pe(B(Uf),{class:"absolute right-[10px] top-[10px] inline-flex h-[25px] w-[25px] appearance-none items-center justify-center rounded-full hover:bg-mauve12/5 focus:shadow-[0_0_0_2px] focus:outline-none","aria-label":"Close"},{default:ee(()=>[pe(B(un),{icon:"lucide:x"})]),_:1}),pe(B(B0),{class:"py-2 max-h-[40vh] sm:max-h-full"},{default:ee(()=>[B(C).length>0?(be(),qe("table",U0,[I("thead",G0,[I("tr",null,[U[5]||(U[5]=I("th",{class:"px-1 font-bold text-left"},"Label",-1)),(be(!0),qe(qr,null,na(B(C),G=>(be(),qe("th",q0,Et(L(G)),1))),256))])]),I("tbody",null,[(be(!0),qe(qr,null,na(B(_),(G,F)=>(be(),qe(qr,null,[I("tr",Z0,[I("th",H0,[I("h3",W0,Et(y(F)),1)])]),(be(!0),qe(qr,null,na(G.filter(T=>B(C).map(re=>re[T.attribute]).some(re=>re)),T=>(be(),qe("tr",X0,[I("th",K0,Et(T.label),1),(be(!0),qe(qr,null,na(B(C),re=>(be(),qe("td",Y0,[kr(Et(B(j0)(re[T.attribute],T.attribute))+" ",1),T.unit&&re[T.attribute]?(be(),qe("span",J0,Et(T.unit),1)):At("",!0)]))),256))]))),256))],64))),256))])])):At("",!0),I("div",Q0,[pe(B(Uf),{class:"w-7/8 mr-1 inline-flex h-8 appearance-none items-center justify-center gap-1 rounded border-[2px] border-govblue/20 bg-white px-2 py-1 shadow-[0_2px_10px] shadow-black/5 hover:bg-mauve12/5 focus:bg-govblue/20","aria-label":"Close"},{default:ee(()=>
8[U[6]||(U[6]=kr(" Vergelijking sluiten ")),pe(B(un),{icon:"lucide:x"})]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1})):At("",!0),I("ul",e1,[(be(!0),qe(qr,null,na(B(C),(G,F)=>(be(),qe("li",{key:L(G),class:"flex w-fit flex-row place-items-center rounded-full bg-govblue/75 pl-3 pr-2 py-1 text-white"},[I("span",t1,Et(L(G)),1),I("button",{onClick:T=>B(C).splice(F,1),title:"Verwijder regio uit vergelijking","aria-label":"Verwijder regio uit vergelijking"},[pe(B(un),{class:"cursor-pointer border-white",icon:"radix-icons:cross-2"})],8,i1)]))),128))])])}}}),n1=Ke({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(f,{emit:_}){const C=Ga(f,_);return(L,w)=>(be(),Ne(B(Wb),gs(_s(B(C))),{default:ee(()=>[tt(L.$slots,"default")]),_:3},16))}}),s1=Ke({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(f,{emit:_}){const y=f,x=_,C=at(()=>{const{class:w,...l}=y;return l}),L=Ga(C,x);return(w,l)=>(be(),Ne(B(Qb),null,{default:ee(()=>[pe(B(Yb),Ot({...B(L),...w.$attrs},{side:"left",class:B(Gc)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",y.class)}),{default:ee(()=>[pe(B(Jb),{class:"fill-white"}),tt(w.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),a1=Ke({__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(f){const _=f;return(y,x)=>(be(),Ne(B(Zb),gs(_s(_)),{default:ee(()=>[tt(y.$slots,"default")]),_:3},16))}}),o1=Ke({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{}},setup(f){const _=f;return(y,x)=>(be(),Ne(B(Xb),gs(_s(_)),{default:ee(()=>[tt(y.$slots,"default")]),_:3},16))}}),l1=Ke({__name:"Tooltip",props:{description:{}},setup(f){const _=f;return(y,x)=>_.description?(be(),Ne(B(a1),{key:0},{default:ee(()=>[pe(B(n1),null,{default:ee(()=>[pe(B(o1),{"as-child":""},{default:ee(()=>[tt(y.$slots,"default")]),_:3}),pe(B(s1),{class:"max-w-prose bg-white"},{default:ee(()=>[I("p",null,Et(("utf8Decode"in y?y.utf8Decode:B(aa))(_.description)),1)]),_:1})]),_:3})]),_:3})):tt(y.$slots,"default",{key:1})}}),u1=Td("/icons/411.001-ZorgopdeKaart-iconen-uitroepteken.svg"),c1=["aria-label"],h1={class:"text-sm"},d1=Ke({__name:"Note",props:{text:{}},setup(f){const _=Fe(!1);return(y,x)=>(be(),Ne(B(gb),{open:B(_),"onUpdate:open":x[4]||(x[4]=C=>wr(_)?_.value=C:null)},{default:ee(()=>[pe(B(yb),null,{default:ee(()=>[I("div",{tabindex:"0",role:"button","aria-label":y.text.includes("zorginstellingen")?"Tooltip met informatie over data":"Tooltip met disclaimer","aria-describedby":"hovercard-content",onKeyup:[x[0]||(x[0]=Nn(C=>_.value=!0,["enter"])),x[1]||(x[1]=Nn(C=>_.value=!0,["space"]))],onBlur:x[2]||(x[2]=C=>_.value=!1),onFocus:x[3]||(x[3]=C=>_.value=!0)},x[5]||(x[5]=[I("img",{src:u1,class:"mr-2 text-lg w-6","aria-label":"Disclaimer icoon"},null,-1)]),40,c1)]),_:1}),pe(B(vb),null,{default:ee(()=>[pe(B(bb),{class:"max-w-64 rounded bg-white shadow-lg z-[90] py-2 px-4 border","side-offset":10,side:"top",role:"tooltip","aria-live":"polite",id:"hovercard-content"},{default:ee(()=>[I("p",h1,Et(y.text),1),pe(B(wb),{class:"fill-white"})]),_:1})]),_:1})]),_:1},8,["open"]))}}),p1={class:"flex gap-3 text-govblue"},f1={class:"font-semibold"},m1=Ke({__name:"Header",props:{title:{},note:{}},setup(f){return(_,y)=>{const x=d1;return be(),Ne(B(Dx),{class:"m-0 flex"},{default:ee(()=>[pe(B(Lx),{class:"group flex h-[45px] flex-1 cursor-default items-center justify-between bg-white/70 border-t-[4px] border-b-[4px] mt-[-4px] border-govSecondary text-[15px] leading-none text-slate-700 outline-none hover:bg-govSecondary/50 data-[state=open]:border-b-0"},{default:ee(()=>
8[I("div",p1,[I("span",f1,Et(_.title),1),_.note?(be(),Ne(x,{key:0,text:_.note},null,8,["text"])):At("",!0)]),pe(B(un),{icon:"famicons:chevron-down-sharp",class:"text-govblue text-2xl ease-[cubic-bezier(0.87,_0,_0.13,_1)] text-[#15427] transition-transform duration-300 group-data-[state=open]:rotate-180"})]),_:1})]),_:1})}}}),g1=Ke({__name:"Item",props:{value:{},title:{},note:{}},setup(f){return(_,y)=>{const x=m1;return be(),Ne(B(Ex),{class:"overflow-hidden border-b-slate-900 first:mt-0 first:rounded-t last:rounded-b",value:_.value},{default:ee(()=>[pe(x,{title:_.title,note:_.note},null,8,["title","note"]),pe(B(Mx),{class:"overflow-hidden bg-white text-[15px] text-govblue data-[state=closed]:animate-slideUp data-[state=open]:animate-slideDown"},{default:ee(()=>[tt(_.$slots,"default")]),_:3})]),_:3},8,["value"])}}}),_1=Ke({__name:"Root",setup(f){return(_,y)=>(be(),Ne(B(Px),{type:"multiple"},{default:ee(()=>[tt(_.$slots,"default")]),_:3}))}}),y1={class:"w-full"},v1={class:"flex m-1 items-center text-govblue"},x1={key:0,class:"px-2 py-1 text-right"},b1={key:1,class:"px-2 py-1 text-right"},w1={key:1},k1={class:"px-2 py-1"},S1={class:"px-2 py-1 text-right"},T1={key:2},z1={key:3},C1={colspan:"2",class:"pr-2 py-1 font-semibold text-govPrimary"},A1={key:4},P1={colspan:"2",class:"pr-2 py-1 font-semibold text-govPrimary"},I1={key:5},E1={key:0,class:"px-2 py-1 text-white bg-[#B30B0B]"},M1={key:1,class:"pr-2 py-1"},D1={key:0,class:"px-2 py-2 text-right"},L1={key:0},R1={key:1,class:"px-2 py-1 text-right"},B1=["href"],F1=["innerHTML"],O1={key:3,class:"px-2 py-1 text-right"},$1={key:4,class:"p-2 text-right text-white bg-[#B30B0B]"},j1={key:5,class:"px-2 py-1 text-right"},V1={key:6,class:"px-2 py-1 text-right"},N1={key:0},U1={key:7,class:"px-2 py-1 text-right"},G1={key:0},q1={key:8,class:"px-2 py-1 text-right"},Z1={key:0},H1={key:9,class:"px-2 py-1 text-right"},W1={key:0},X1={key:6,class:"bg-[#E69F00] text-black"},K1=Ke({__name:"SidebarAccordion",props:["dataProperties","activeTheme"],setup(f){const _=f,{dataProperties:y,activeTheme:x}=rr(_);function C(T){return T.includes("ADL")&&(T=T.replaceAll("ADL_","ADL-")),aa(T.charAt(0).toUpperCase()+T.slice(1).replaceAll("_"," "))}const L=at(()=>Object.fromEntries(Object.entries(om).filter(([T,re])=>re.length>0)));function w(T){return T.split(",").join("<br>")}function l(T){return T=="1"||T=="2"?"Ja":"Nee"}function U(T){return Math.round(T*100)}function W(T){return(T/1e3).toFixed(2)}const G=Fe([]);Qt(()=>x==null?void 0:x.value,T=>{String(T)=="Afstand tot voorzieningen voor Algemene Dagelijkse Levensbehoeften"?G.value=["afstand_tot_ADL_voorzieningen"]:String(T)=="Toegankelijkheid woningen"?G.value=["indicatie_toegankelijkheid_per_woning","kostenindicatie_aanpassingen"]:String(T)=="Woningvoorraad en gezinssamenstelling"?G.value=["woningen"]:String(T)=="Panden langdurige zorgorganisaties"?G.value=["zorginstellingen"]:String(T)=="Geclusterd wonen"?G.value=["geclusterd_wonen"]:String(T)=="Huidige zorgvraag"?G.value=["zorggebruik","mantelzorg"]:String(T)=="Toekomstige zorgvraag"?G.value=["toekomstige_zorgvraag"]:String(T)=="Geschiktheidsgids geclusterd wonen"?G.value=["geschiktheidsgids_geclusterd_wonen"]:(console.log("No theme has been selected"),G.value=[])},{immediate:!0});function F(T,re){if(y){const fe=at(()=>y.value??{});if(T=="geschiktheidsgids_geclusterd_wonen"&&!("p_wcorpw"in fe.value))return!1;if(re.filter(ye=>ye.attribute in fe.value).length>0)return!0;if(T=="kostenindicatie_aanpassingen"&&"postcode"in fe.value&&("n_ster_2"in fe.value||"n_ster_1"in fe.value))return!0}}return(T,re)=>{const fe=l1,ye=g1,de=_1;return be(),qe("div",null,[re[3]||(re[3]=I("div",{class:"h-[4px] mt-4 bg-govSecondary w-full"},null,-1)),pe(de,{modelValue:B(G),"onUpdate:modelValue":re[0]||(re[0]=ge=>wr(G)?G.value=ge:null)},{default:ee(()=>[(be(!0),qe(qr,null,na(B(L),(ge,ae)=>(be(),qe(qr,{key:ae},[F(ae,ge)?(be(),Ne(ye,{key:0,value:`${ae}`,title:C(ae),note:B(by)[ae]},{default:ee(()=>[I("table",y1,[I("tbody",null,[(be(!0),qe(qr,null,na(ge,(le,Ze)=>(be(),qe(qr,{key:Ze},[ae=="indicatie_toegankelijkheid_per_woning"&&(le.attribute==="n_ster_2"||le.attribute==="n_ster_3"||le.attribute==="n_ster_1")?(be(),qe("tr",{key:0,class:fd([{"bg-[#f092cd]":le.attribute==="n_ster_1","bg-[#f9e11e]":le.attribute==="n_ster_2","bg-[#76d2b6]":le.attribute==="n_ster_3"},"text-black text-base"])},[pe(fe,{description:le.description},{default:ee(()=>[I("td",v1,[pe(B(un),{icon:"radix-icons:star-filled","aria-label":le.attribute=="n_ster_1"?"1 ster":null,"aria-hidden":le.attribute=="n_ster_1"?"false":"true"},null,8,["aria-label","aria-hidden"]),le.attribute==="n_ster_2"||le.attribute==="n_ster_3"?(be(),Ne(B(un),{key:0,icon:"radix-icons:star-filled","aria-label":le.attribute=="n_ster_2"?"2 sterren":null,"aria-hidden":le.attribute==="n_ster_2"?"false":"true"},null,8,["aria-label","aria-hidden"])):At("",!0),le.attribute==="n_ster_3"?(be(),Ne(B(un),{key:1,icon:"radix-icons:star-filled","aria-label":"3 sterren","aria-hidden":le.attribute=="n_ster_3"?"false":"true"},null,8,["aria-hidden"])):At("",!0),I("p",{class:fd({"pl-[1.1rem]":le.attribute==="n_ster_3","ml-7":le.attribute==="n_ster_2","ml-[2.8rem]":le.attribute==="n_ster_1"})},Et(le.label),3)])]),_:2},1032,["description"]),B(y)[le.attribute]?(be(),qe("td",b1,Et(B(fi)(B(y)[le.attribute])),1)):(be(),qe("td",x1," 0 "))],2)):At("",!0),ae=="kostenindicatie_aanpassingen"&&(B(y).n_ster_2&&le.attribute!="nieuw_traplift"&&le.attribute!="tweedehands_traplift"||B(y).n_ster_1)?(be(),qe("tr",w1,[pe(fe,{description:le.description},{default:ee(()=>[I("td",k1,Et(le.label),1),I("td",S1,Et(le.unit),1)]),_:2},1032,["description"])])):At("",!0),!B(y).p_huurcorp&&le.attribute==="p_huurcorp"&&B(x)!=="Geschiktheidsgids geclusterd wonen"?(be(),qe("tr",T1,re[1]||(re[1]=[I("td",{class:"px-2 py-1"}," Huurwoning (woningcorporatie)",-1),I("td",{class:"px-2 py-1 text-right"}," 0 % ",-1)]))):At("",!0),ae=="geschiktheidsgids_geclusterd_wonen"&&le.header?(be(),qe("tr",z1,[I("td",C1,Et(le.header),1)])):At("",!0),ae=="toekomstige_zorgvraag"&&le.attribute.includes("tzv_n65_")?(be(
8),qe("tr",A1,[I("td",P1,Et(le.attribute.substring(8,12)),1)])):At("",!0),B(y)[le.attribute]&&le.attribute!="n_ster_2"&&le.attribute!="n_ster_3"&&le.attribute!="n_ster_1"&&le.attribute!="p_ster_3"&&(le.attribute!="p_ster_2"||ae=="geschiktheidsgids_geclusterd_wonen")&&le.attribute!="p_ster_1"?(be(),qe("tr",I1,[pe(fe,{description:le.description},{default:ee(()=>[le.attribute=="n_ster_0"?(be(),qe("td",E1,Et(le.label),1)):(be(),qe("td",M1,Et(le.label),1))]),_:2},1032,["description"]),le.attribute=="bouwjaar"||le.attribute=="pand_id"||le.attribute=="postcode"?(be(),qe("td",D1,[kr(Et(B(y)[le.attribute])+" ",1),le.unit?(be(),qe("span",L1,Et(le.unit),1)):At("",!0)])):le.attribute=="baglink"?(be(),qe("td",R1,[I("p",null,[I("a",{href:B(y)[le.attribute]}," BAG link ",8,B1)])])):le.attribute=="gebruiksdoelen"?(be(),qe("td",{key:2,innerHTML:w(B(y)[le.attribute]),class:"px-2 py-2 text-right whitespace-pre-line"},null,8,F1)):le.attribute=="lift"?(be(),qe("td",O1,Et(l(B(y)[le.attribute])),1)):le.attribute=="n_ster_0"?(be(),qe("td",$1,Et(B(fi)(B(y)[le.attribute])),1)):le.attribute=="g_seswoa"?(be(),qe("td",j1,Et(B(y)[le.attribute].toFixed(2)),1)):le.attribute=="g_adl_afst"||le.attribute=="g_vv_afst"?(be(),qe("td",V1,[kr(Et(W(B(y)[le.attribute]))+" ",1),le.unit?(be(),qe("span",N1,Et(le.unit),1)):At("",!0)])):ae=="geschiktheidsgids_geclusterd_wonen"&&(le.attribute=="tzv_p65_2023"||le.attribute=="tzv_p65_2030")?(be(),qe("td",U1,[kr(Et(B(y)[le.attribute].toFixed(0))+" ",1),le.unit?(be(),qe("span",G1,Et(le.unit),1)):At("",!0)])):le.attribute=="f_optop"?(be(),qe("td",q1,[kr(Et(U(B(y)[le.attribute]))+" ",1),le.unit?(be(),qe("span",Z1,Et(le.unit),1)):At("",!0)])):(be(),qe("td",H1,[kr(Et(B(fi)(B(y)[le.attribute]))+" ",1),le.unit?(be(),qe("span",W1,Et(le.unit),1)):At("",!0)]))])):At("",!0),B(y).straat&&ae=="indicatie_toegankelijkheid_per_woning"&&B(y).n_ster_2>0&&B(y).n_ster_0>0&&le.attribute==="n_ster_0"?(be(),qe("tr",X1,re[2]||(re[2]=[I("td",{colspan:"2",class:"px-2 py-1"}," * Panden die oranje zijn weergegeven in de applicatie hebben beide woningen in het pand die toegankelijk zijn mits de woning drempelvrij wordt gemaakt (2 sterren) maar ze hebben ook woningen in het pand die niet toegankelijk zijn (0 sterren). Bron: TNO ",-1)]))):At("",!0)],64))),128))])])]),_:2},1032,["value","title","note"])):At("",!0)],64))),128))]),_:1},8,["modelValue"])])}}}),Y1=4,J1=Ke({__name:"Sidebar",props:Sc(["activeTheme"],{modelValue:{},modelModifiers:{}}),emits:Sc(["close-panel"],["update:modelValue"]),setup(f,{emit:_}){const y=Tc(f,"modelValue"),x=_,C=f,{activeTheme:L}=rr(C),w=Fe(0),l=Fe(400);let U;function W(re){const fe=U-re.x;U=re.x,l.value=l.value+fe}function G(re){re.offsetX<Y1&&(U=re.x,document.addEventListener("mousemove",W,!1))}function F(){document.removeEventListener("mousemove",W,!1)}function T(){x("close-panel")}return Qt(C,re=>{w.value+=1}),(re,fe)=>{const ye=Ry,de=Oy,ge=r1,ae=K1;return y.value?(be(),qe("div",{key:0,class:"dragborder-left absolute right-0 top-0 z-10 h-full overflow-y-scroll bg-white/85 bg-opacity-95 p-6 max-w-[100vw]",style:ys({width:B(l)+"px"}),onMousedown:G,onMouseup:F},[fe[0]||(fe[0]=I("div",{class:"absolute left-0 top-0 h-full w-0.5 cursor-ew-resize bg-govblue/30"},null,-1)),tt(re.$slots,"default",{},()=>[pe(ye,{"data-properties":y.value,tabindex:"0"},null,8,["data-properties"]),y.value.straat?(be(),Ne(de,{key:0,"data-properties":y.value},null,8,["data-properties"])):At("",!0),y.value.gm_naam?(be(),Ne(ge,{key:1,selected:y.value},null,8,["selected"])):At("",!0),(be(),Ne(ae,{key:B(w),activeTheme:B(L),"data-properties":y.value,class:"mb-6"},null,8,["activeTheme","data-properties"]))]),I("button",{class:"absolute right-[5px] top-[10px] inline-flex h-[25px] w-[25px] cursor-default items-center justify-center rounded-full text-slate-800 outline-none hover:bg-slate-800 hover:text-slate-200 focus:bg-slate-800 focus:text-slate-200",onClick:T,title:"Sluit informatievenster","aria-label":"Sluit informatievenster"},[pe(B(un),{icon:"radix-icons:cross-2",width:"15",height:"15"})])],36)):At("",!0)}}}),Q1={class:"grid grid-cols-2 gap-4"},ew=["src"],tw={class:"sm:text-lg text-[14px] font-semibold text-govblue mb-3"},iw={class:"absolute top-5 right-1 flex flex-row-reverse justify-between"},rw=4,nw=Ke({__name:"Sideselect",props:{show:{type:Boolean},showModifiers:{}},emits:Sc(["close-panel"],["update:show"]),setup(f,{emit:_}){const y=Tc(f,"show"),x=Fe(800);let C;const L=Zo("footer");function w(T){const re=C-T.x;C=T.x,x.value=x.value+re}function l(T){T.offsetX<rw&&(C=T.x,document.addEventListener("mousemove",w,!1))}function U(){document.removeEventListener("mousemove",w,!1)}const W=[{image:"Toegankelijkheid_woningen",title:"Toegankelijkheid woningen",description:"Is de woning toegankelijk en wat kost het om een woning toegankelijk te maken? Buurtrapportages: Hoeveel toegankelijke woningen heeft de buurt en hoeveel hiervan zijn huur of koop? Wat kosten de aanpassingen? Hoeveel vraag zal er in de buurt of gemeente zijn door demografische veranderingen?",property:"p_ster_2en3"},{image:"Afstand_tot_voorzieningen_voor_ADL",title:"Afstand tot voorzieningen voor Algemene Dagelijkse Levensbehoeften",description:"Toegang tot essentiële dagelijkse voorzieningen, zoals een supermarkt, huisarts en apotheek, is een voorwaarde voor zelfstandig wonen, zeker voor ouderen. De kaartlaag âADL-voorzieningenâ toont de gemiddelde afstand van inwoners tot deze voorzieningen, gemeten over de weg. Dit biedt beleidsmakers inzicht in de mate van fysieke toegankelijkheid binnen een gebied en helpt om kansen en knelpunten in nabijheid te signaleren. Zo kan gericht beleid worden ontwikkeld om de leefomgeving geschikt te maken voor een vergrijzende bevolking en gebieden te identificeren waar mogelijkheden zijn of ontwikkeld kunnen worden voor geclusterd wonen.",property:"af_gem_aas"},{image:"Woningvoorraad_en_gezinssamenstelling",title:"Woningvoorraad en gezinssamenstelling",description:"Krijg een beeld van de eigendomsverhoudingen binnen de woningvoorraad: het aandeel koop- en huurwoningen en de gezinssamenstelling per gebied. Hiermee wordt inzichtelijk of de balans tussen koop en huur voldoende is om de woningvoorraad toegankelijk en toekomstbestendig te houden. De informatie helpt bij het beoordelen of en hoe overleg met woningcorporaties zinvol is en welke rol dit speelt binnen het huidige en toekomstige gemeentelijk beleid.",property:"p_koopwon"}
8,{image:"Panden_langdurige_zorgorganisaties",title:"Panden langdurige zorgorganisaties",description:"Wordt in een pand verblijfszorg aangeboden en is het onderdeel van een langdurige zorginstelling? Dan is het pand per definitie toegankelijk. Een overzicht van panden met langdurige verblijfszorg geeft beleidsmakers inzicht in waar zorginstellingen actief zijn, tot welke sector ze behoren en hoeveel zorgwoningen er beschikbaar zijn per regio of gemeente. Dit is essentieel om aanbod en vraag goed op elkaar af te stemmen, knelpunten te signaleren en gericht te sturen op voldoende en toegankelijke zorginfrastructuur.",property:"aantal_verblijfszorginstellingen_per_65plus"},{image:"Geclusterde_woningen",title:"Geclusterd wonen",description:"Geclusterde woonvormen bestaan uit zelfstandige woningen met gedeelde voorzieningen, gericht op ontmoeting en wederzijdse ondersteuning voor ouderen of mensen met een huidige of toekomstige zorgvraag. Ze vormen een belangrijke schakel tussen zelfstandig wonen en het verpleeghuis. Voor beleidsmakers is inzicht in de spreiding van deze woonvormen cruciaal om gericht te sturen op passende woonzorgoplossingen, de doorstroming te bevorderen en het beleid rond langer thuis wonen nu en in de toekomst effectief vorm te geven.",property:"aandeel_zorgindicaties_in_cluster_totaal"},{image:"leefbaarheidssituatie",title:"Leefbaarheidssituatie",description:"Mensen met mobiliteitsbeperkingen hebben een beperkte actieradius. Wat is de (loop afstand) van hun huis tot voorzieningen? Hoe is de relatie tussen de voorzieningen en de leefbaarheid van de wijk? Bron: leefbaarometer.nl, BZK, 2014"},{image:"gr_aant_inwoners_per_buurt",title:"Aantal inwoners",description:"Op deze plattegrond van de gekozen gemeente ziet u de buurten met de meeste inwoners. Dit geeft u een indicatie van de behoefte aan aanpasbare woningen en in welke buurten u de grootste impact van een voldoende aanbod aan geschikte woningen kan verwachten."},{image:"grootste_aanbod_3ster",title:"Aantal woningen ster 3",description:"Het aanbod aan ster 3 woningen die in beginsel geschikt zijn voor mensen met mobiliteitsbeperkingen in deze buurt."},{image:"gr_aandeel_65plus",title:"Aandeel 65+ ers",description:"Het aandeel 65+ ers in deze buurt. Dit geeft u een indicatie van de toekomstig behoefte aan aanpasbare woningen en waar u de grootste vraag naar geschikte woningen of woningaanpassingen kunt verwachten."},{image:"gr_aand_instroom_mobiliteitsbeperkten",title:"Aandeel instroom mobiliteitsbeperkten",description:"Op deze plattegrond van de gekozen gemeente ziet u de buurten waar het aandeel van de instroom aan mobiliteitsbeperkten het grootst is, gelet op de demografie. U kunt daarmee inschatten of er behoefte is aan geschikte woningen en/of vraag naar woningaanpassingen."},{image:"grootste_vraag_tov_aanbod_3ster_woningen",title:"Vraag t.o.v. ster 3 woningen",description:"De vraag naar ster 3 woningen die in beginsel geschikt zijn voor mensen met mobiliteitsbeperkingen in deze buurt. Deze vraag wordt verwacht op basis van de demografie."},{image:"hoogste_aanp_kosten_per_inwoner",title:"Jaarlijkse aanpassingskosten / inwoner",description:"De jaarlijkse aanpassingskosten per inwoner in deze buurt. Als de vraag naar woningaanpassingen wordt gehonoreerd volgen de kosten uit de typologie van de woningen en de demografie."},{image:"Huidige_zorgvraag",title:"Huidige zorgvraag",description:"Actuele informatie over de zorgvraag vanuit de Wmo is voor beleidsmakers cruciaal om effectief te kunnen sturen op toegankelijkheid, betaalbaarheid en passende ondersteuning. Inzicht in type en omvang van hulpvragen, zoals huishoudelijke hulp of begeleiding, helpt bij het tijdig signaleren van trends, knelpunten en veranderende behoeften. Dit maakt het mogelijk om beleid beter af te stemmen op de lokale situatie, middelen doelgericht in te zetten en samenwerkingen met zorgaanbieders te versterken.",property:"nizvvper65plus"},{image:"Toekomstige_zorgvraag",title:"Toekomstige zorgvraag",description:"De verwachte ontwikkeling van de zorgvraag tot op buurtniveau. Het aandeel 65-plussers, demografische ontwikkelingen en de mantelzorgratio (op basis van de huidige en toekomstige Older-Old Support Ratio - OOSR) geven richting aan waar de druk op informele en formele zorg toeneemt. Ook het aantal WLZ-zorgindicaties per buurt biedt handvatten voor het inschatten van de zorgbehoefte. Deze informatie ondersteunt beleidsmakers bij het tijdig inspelen op de vraag naar geschikte en aanpasbare woningen, geclusterde woonvormen en bij het bepalen van gebieden die prioriteit verdienen voor samenwerking met zorg- en woningpartners.",property:"tzv_p6
85_2023"},{image:"Geschiktheidsgids_geclusterd_wonen",title:"Geschiktheidsgids geclusterd wonen",description:"Wordt op dit moment aan gewerkt...",property:"p_gewogenindicatoren_met_waarde"}],G=Fe(null),F=T=>{var re;if(T.key==="Tab"){const ye=document.querySelectorAll('[role="dialog"] button, [role="dialog"] [href], [role="dialog"] input, [role="dialog"] select, [role="dialog"] textarea, [role="dialog"] [tabindex]:not([tabindex="-1"])')[0];T.shiftKey&&T.target===ye?(T.preventDefault(),(re=G.value)==null||re.focus()):!T.shiftKey&&T.target===G.value&&(T.preventDefault(),ye.focus())}};return nr(()=>{document.addEventListener("keydown",F)}),da(()=>{document.removeEventListener("keydown",F)}),(T,re)=>{const fe=zd;return y.value?(be(),qe("div",{key:0,class:"bg-slate-50 absolute top-0 right-0 h-full p-6 z-20 overflow-y-scroll dragborder-left max-w-[100vw]",style:ys({width:x.value+"px"}),onMousedown:l,onMouseup:U,role:"dialog","aria-modal":"true",onKeydown:F},[re[3]||(re[3]=I("div",{class:"absolute h-full w-0.5 bg-slate-300 top-0 left-0 cursor-ew-resize"},null,-1)),re[4]||(re[4]=I("h2",{class:"text-base font-semibold text-govPrimary mb-4"},"Selecteer thema om op de kaart te tonen",-1)),I("div",Q1,[(be(!0),qe(qr,null,na(W.filter(ye=>ye.property),ye=>(be(),Ne(fe,{to:ye!=null&&ye.property?`/map?property=${ye.property}`:"/map",class:"flex flex-col gap-2 hover:bg-slate-500/10 no-underline",onClick:re[0]||(re[0]=de=>{y.value=!1,L.value=!1})},{default:ee(()=>[I("img",{src:`/img/${ye.image}.png`,class:"w-full",alt:""},null,8,ew),I("h3",tw,Et(ye.title),1),pe(fe,{to:`/themes?property=${ye.property}`,class:"text-base text-govblue hover:text-govSecondary"},{default:ee(()=>[re[2]||(re[2]=kr("Toelichting ")),pe(B(un),{class:"inline-block",icon:"radix-icons:chevron-right"})]),_:2},1032,["to"])]),_:2},1032,["to"]))),256))]),I("div",iw,[I("button",{class:"inline-flex h-[25px] w-[25px] cursor-default items-center justify-center rounded-full text-govblue outline-none hover:bg-slate-800 hover:text-slate-200 focus:bg-slate-800 focus:text-slate-200",onClick:re[1]||(re[1]=ye=>y.value=!1),title:"Sluit thema selectie venster","aria-label":"Sluit thema selectie venster",ref_key:"lastElement",ref:G},[pe(B(un),{icon:"raphael:cross",width:"24",height:"24"})],512)])],36)):At("",!0)}}}),sw=Td("/icons/411.001-ZorgopdeKaart-iconen-legenda.svg"),lg=()=>({backgroundMapState:Zo("backgroundMapState",()=>!1)}),aw={class:"absolute bottom-0 left-0 w-fit z-[100]"},ow={class:"flex flex-col gap-2.5 text-govblue"},lw={class:"mb-2.5 font-bold leading-[19px]"},uw={key:0,class:"max-w-prose text-sm"},cw={key:1,class:"max-w-prose text-sm"},hw={key:2},dw={"aria-label":"Lijst met filters op basis van categorie voor kaart"},pw={key:3},fw={key:4},mw={"aria-label":"Lijst met filters op basis van categorie voor kaart"},gw={key:5},_w={"aria-label":"Lijst met filters op basis van categorie voor kaart"},yw={key:6},vw={"aria-label":"Lijst met filters op basis van categorie voor kaart"},xw={key:7},bw={"aria-label":"Lijst met filters op basis van categorie voor kaart"},ww={key:8},kw={"aria-label":"Lijst met filters op basis van categorie voor kaart"},Sw={key:9},Tw={"aria-label":"Lijst met filters op basis van categorie voor kaart"},zw={key:10},Cw={"aria-label":"Lijst met filters op basis van categorie voor kaart"},Aw={key:11},Pw={"aria-label":"Legenda lijst met filters op basis van categorie wmo aandeel 65plus voor kaart"},Iw={key:12},Ew={"aria-label":"Legenda lijst met filters op basis van categorie voor kaart"},Mw={"aria-label":"Legenda lijst met filters op basis van categorie wmo aandeel 65plus voor kaart"},Dw={key:13},Lw={"aria-label":"Legenda lijst met filters op basis van categorie voor kaart"},Rw={"aria-label":"Legenda lijst met filters op basis van categorie wmo aandeel 65plus voor kaart"},Bw={key:14},Fw={class:"font-medium text-[15px] mt-2"},Ow={"aria-label":"Lijst met filters op basis van categorie voor kaart"},$w={key:15},jw={class:"font-medium text-[15px] mt-2"},Vw={"aria-label":"Lijst met filters op basis van categorie voor kaart"},Nw={key:16},Uw={class:"font-medium text-[15px] mt-2"},Gw={"aria-label":"Lijst met filters op basis van categorie voor kaart"},qw={key:17},Zw={"aria-label":"Lijst met filters op basis van categorie voor kaart"},Hw={class:"flex gap-2 items-center mt-3"},Ww=Ke({__name:"Legend",props:Sc({description:{},label:{},title:{},zoomlevel:{},attribute_selected_year_tzv:{}},{minLim:{},minLimModifiers:{},maxLim:{},maxLimModifiers:{}}),emits:["update:minLim","update:maxLim"],setup(f){const _=Tc(f,"minLim"),y=Tc(f,"maxLim"),x=Fe(0);let C=Fe(0),L=Fe(0),w=Fe(0),l=Fe(0),U=Fe(0);const W=Fe(0),G=Fe(0);let F=!0;const T=f,{description:re="",label:fe=""}=rr(T),{title:ye}=rr(T),{zoomlevel:de}=rr(T),{attribute_selected_year_tzv:ge}=rr(T);function ae(Ge,P,Te){x.value==0&&(_.value=Ge,y.value=P),x.value=Te}const le=()=>{if(_.value&&y.value){const P=(y.value-_.value)/5;C.value=_.value+1,L.value=_.value+1*P,w.value=_.value+2*P,l.value=_.value+3*P,U.value=_.value+4*P}},Ze=()=>{_.value&&y.value&&(W.value=_.value,G.value=y.value)};nr(()=>{Ze(),le()});const Ue=Fe(!1),{backgroundMapState:wt}=lg();return Qt(()=>ye.value,()=>{x.value=0}),Qt(x,Ge=>{Ge&&(F=!1)}),Qt(()=>[_.value,y.value],()=>{F&&Ze(),le(),F=!0}),(Ge,P)=>{const Te=ag;
8return be(),qe("div",aw,[pe(B($m),{open:Ue.value},{default:ee(()=>[pe(B(jm),{class:"inline-flex h-12 cursor-default items-center justify-center bg-white px-8 py-2 text-slate-800 outline-none hover:bg-slate-100 focus:shadow-[0_0_0_2px] focus:shadow-black","aria-label":"Knop om de legenda voor kaart te openen in een popup",onClick:P[0]||(P[0]=Ae=>Ue.value=!Ue.value)},{default:ee(()=>P[106]||(P[106]=[I("img",{src:sw,class:"mr-2 text-lg w-6"},null,-1),I("span",{class:"text-lg text-govblue"},"Legenda",-1)])),_:1}),pe(B(Vm),null,{default:ee(()=>[pe(B(Um),{side:"top",class:"data-[state=open]:data-[side=top]:animate-slideDownAndFade data-[state=open]:data-[side=right]:animate-slideLeftAndFade data-[state=open]:data-[side=top]:animate-slideUpAndFade data-[state=open]:data-[side=left]:animate-slideRightAndFade h-[50vh] max-h-fit overflow-y-auto md:max-w-[21rem] max-w-[19rem] rounded bg-white p-5 shadow-[0_10px_38px_-10px_hsla(206,22%,7%,.35),0_10px_20px_-15px_hsla(206,22%,7%,.2)] will-change-[transform,opacity] focus:shadow-[0_10px_38px_-10px_hsla(206,22%,7%,.35),0_10px_20px_-15px_hsla(206,22%,7%,.2)] z-20","aria-label":"Dialoogvenster met legenda voor kaart"},{default:ee(()=>[I("div",ow,[I("h3",lw,Et(B(ye)),1),B(ye)==="Afstand tot voorzieningen voor Algemene Dagelijkse Levensbehoeften"?(be(),qe("p",uw," De gemiddelde afstand van alle inwoners in een gebied tot zowel de dichtstbijzijnde supermarkt, apotheek, als huisartsenpraktijk/huisartsenpost, berekend over de weg. ")):(be(),qe("p",cw,Et(B(re)),1)),P[242]||(P[242]=I("div",{class:"h-[3px] w-full bg-govSecondary mt-3"},null,-1)),B(ye)==="Woningvoorraad en gezinssamenstelling"?(be(),qe("div",hw,[I("ul",dw,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[1]||(P[1]=Ae=>ae(0,20,1)),"aria-pressed":x.value===1},{default:ee(()=>P[107]||(P[107]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"},"0-20% koopwoningen ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[2]||(P[2]=Ae=>ae(20,40,2)),"aria-pressed":x.value===2},{default:ee(()=>P[108]||(P[108]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"},"20-40% koopwoningen",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[3]||(P[3]=Ae=>ae(40,60,3)),"aria-pressed":x.value===3},{default:ee(()=>P[109]||(P[109]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/50"},null,-1),I("p",{class:"font-normal"},"40-60% koopwoningen",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[4]||(P[4]=Ae=>ae(60,80,4)),"aria-pressed":x.value===4},{default:ee(()=>P[110]||(P[110]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/75"},null,-1),I("p",{class:"font-normal"},"60-80% koopwoningen",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[5]||(P[5]=Ae=>ae(80,100,5)),"aria-pressed":x.value===5},{default:ee(()=>P[111]||(P[111]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue"},null,-1),I("p",{class:"font-normal"},"80-100% koopwoningen",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[6]||(P[6]=Ae=>ae(0,100,0)),"aria-pressed":x.value===0},{default:ee(()=>P[112]||(P[112]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])])])])):At("",!0),B(ye)==="Afstand tot voorzieningen voor Algemene Dagelijkse Levensbehoeften"&&B(de)&&B(de)>13.5?(be(),qe("div",pw,P[113]||(P[113]=[I("h4",{class:"font-medium text-[15px] mt-2"}," Nabijheid van ADL-voorzieningen",-1),I("ul",{"aria-label":"Legenda voor warmtekaart",class:"grid grid-cols-[4_1fr] grid-rows-[50px_1fr] gap-2"},[I("li",{class:"flex justify-start gap-2 col-span-2"},[I("div",{class:"h-4 w-5 border-2 border-slate-800 mt-1"}),I("p",{class:"font-normal"},"Geen ADL-voorzieningen aanwezig binnen 400m")]),I("li",{class:"flex flex-col justify-between col-start-1 row-start-2 row-span-2"},[I("div",{class:"h-40 w-4 border-2 border-slate-800 bg-gradient-to-b from-yellow-100 to-green-700"})]),I("li",{class:"flex justify-start col-start-2 row-start-2"},[I("p",{class:"font-normal mt-[-6px]"},"1 categorie ADL-voorziening aanwezig binnen 400m ")]),I("li",{class:"flex justify-start items-end col-start-2 row-start-3"},[I("p",{class:"font-normal mb-[-6px]"}," Alle ADL-voorzieningen aanwezig binnen 200m ")])],-1),I("h4",{class:"font-medium text-[15px] mt-4"}," ADL-voorzieningen",-1),I("ul",{"aria-label":"Lijst met filters op basis van categorie voor kaart"},[I("li",{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0"},[I("div",{class:"h-10 w-10 bg-[url('/icons/apotheek_wit.png')] bg-contain bg-no-repeat"}),I("p",{class:"font-normal"},"Apotheek")]),I("li",{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0"},[I("div",{class:"h-10 w-10 bg-[url('/icons/huisarts_wit.png')] bg-contain bg-no-repeat"}),I("p",{class:"font-normal"},"Huisarts")]),I("li",{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0"},[I("div",{class:"h-10 w-10 bg-[url('/icons/supermarkt_wit.png')] bg-contain bg-no-repeat"}),I("p",{class:"font-normal"},"Supermarkt")]),I("li",{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0"},[I("div",{class:"h-10 w-10 bg-[url('/icons/bus_wit.png')] bg-contain bg-no-repeat"}),I("p",{class:"font-normal"},"Bus halte")]),I("li",{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0"},[I("div",{class:"h-10 w-10 bg-[url('/icons/trein_wit.png')] bg-contain bg-no-repeat"}),I("p",{class:"font-normal"},"Trein halte")]),I("li",{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0"},[I("div",{class:"h-10 w-10 bg-[url('/icons/tram_wit.png')] bg-contain bg-no-repeat"}),I("p",{class:"font-normal"},"Tram halte")]),I("li",{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0"},[I("div",{class:"h-10 w-10 bg-[url('/icons/metro_wit.png')] bg-contain bg-no-repeat"}),I("p",{class:"font-normal"},"Metro halte")]),I("li",{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0"},[I("div",{class:"h-10 w-10 bg-[url('/icons/veerboot_wit.png')] bg-contain bg-no-repeat"}),I("p",{class:"font-normal"},"Veerboot halte")])],-1)]))):B(ye)==="Afstand tot voorzieningen voor Algemene Dagelijkse Levensbehoeften"&&B(de)&&B(de)>12?(be(),qe("div",fw,[I("ul",mw,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[7]||(P[7]=Ae=>ae(0,1.5,1)),"aria-pressed":x.value===1},{default:ee(()=>P[114]||(P[114]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"},"Maximaal 1,5 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[8]||(P[8]=Ae=>ae(1.5,3.5,2)),"aria-pressed":x.value===2},{default:ee(()=>P[115]||(P[115]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/15"},null,-1),I("p",{class:"font-normal"},"Maximaal 3,5 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[9]||(P[9]=Ae=>ae(3.5,5,3)),"aria-pressed":x.value===3},{default:ee(()=>P[116]||(P[116]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/30"},null,-1),I("p",{class:"font-normal"},"Maximaal 5 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[10]||(P[10]=Ae=>ae(5,6.5,4)),"aria-pressed":x.value===4},{default:ee(()=>P[117]||(P[117]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"Maximaal 6,5 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[11]||(P[11]=Ae=>ae(6.5,8,5)),"aria-pressed":x.value===5},{default:ee(()=>P[118]||(P[118]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/55"},null,-1),I("p",{class:"font-normal"},"Maximaal 8 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[12]||(P[12]=Ae=>ae(8,9.5,6)),"aria-pressed":x.value===6},{default:ee(()=>P[119]||(P[119]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/70"},null,-1),I("p",{class:"font-normal"},"Maximaal 9,5 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[13]||(P[13]=Ae=>ae(9.5,11,7)),"aria-pressed":x.value===7},{default:ee(()=>P[120]||(P[120]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/85"},null,-1),I("p",{class:"font-normal"},"Maximaal 11 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[14]||(P[14]=Ae=>ae(11,11.5,7)),"aria-pressed":x.value===8},{default:ee(()=>P[121]||(P[121]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/90"},null,-1),I("p",{class:"font-normal"},"Meer dan 11 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[15]||(P[15]=Ae=>ae(0,11.5,0)),"aria-pressed":x.value===0},{default:ee(()=>P[122]||(P[122]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])])])])):B(ye)==="Afstand tot voorzieningen voor Algemene Dagelijkse Levensbehoeften"?(be(),qe("div",gw,[I("ul",_w,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[16]||(P[16]=Ae=>ae(0,.5,1)),"aria-pressed":x.value===1},{default:ee(()=>P[123]||(P[123]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/5"},null,-1),I("p",{class:"font-normal"},"Maximaal 0,5 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[17]||(P[17]=Ae=>ae(.5,1,2)),"aria-pressed":x.value===2},{default:ee(()=>P[124]||(P[124]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"},"Maximaal 1 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[18]||(P[18]=Ae=>ae(1,1.5,3)),"aria-pressed":x.value===3},{default:ee(()=>P[125]||(P[125]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"Maximaal 1,5 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[19]||(P[19]=Ae=>ae(1.5,2,4)),"aria-pressed":x.value===4},{default:ee(()=>P[126]||(P[126]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"},"Maximaal 2 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[20]||(P[20]=Ae=>ae(2,2.5,5)),"aria-pressed":x.value===5},{default:ee(()=>P[127]||(P[127]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"Maximaal 2,5 km",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[21]||(P[21]=Ae=>
8ae(0,2.5,0)),"aria-pressed":x.value===0},{default:ee(()=>P[128]||(P[128]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])]),pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0"},{default:ee(()=>P[129]||(P[129]=[I("div",{class:"h-4 w-4 bg-slate-400 border-2 border-slate-800"},null,-1),I("p",{class:"font-normal"},"Onbekend",-1)])),_:1})])])):B(ye)==="Toegankelijkheid woningen"?(be(),qe("div",yw,[P[137]||(P[137]=I("h4",{class:"font-medium text-[15px] mt-2"}," Percentage woningen met 2 en 3 sterren.",-1)),I("ul",vw,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[22]||(P[22]=Ae=>ae(0,10,1)),"aria-pressed":x.value===1},{default:ee(()=>P[130]||(P[130]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"},"0 tot 10%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[23]||(P[23]=Ae=>ae(10,20,2)),"aria-pressed":x.value===2},{default:ee(()=>P[131]||(P[131]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"},"10 tot 20%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[24]||(P[24]=Ae=>ae(20,40,3)),"aria-pressed":x.value===3},{default:ee(()=>P[132]||(P[132]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"20 tot 40%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[25]||(P[25]=Ae=>ae(40,60,4)),"aria-pressed":x.value===4},{default:ee(()=>P[133]||(P[133]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"},"40 tot 60%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[26]||(P[26]=Ae=>ae(60,80,5)),"aria-pressed":x.value===5},{default:ee(()=>P[134]||(P[134]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"60 tot 80%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[27]||(P[27]=Ae=>ae(80,100,6)),"aria-pressed":x.value===6},{default:ee(()=>P[135]||(P[135]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/100"},null,-1),I("p",{class:"font-normal"},"80 tot 100%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[28]||(P[28]=Ae=>ae(0,100,0)),"aria-pressed":x.value===0},{default:ee(()=>P[136]||(P[136]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])])])])):At("",!0),B(ye)==="Panden langdurige zorgorganisaties"&&B(de)&&B(de)>=9?(be(),qe("div",xw,[I("ul",bw,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[29]||(P[29]=Ae=>ae(0,4,1)),"aria-pressed":x.value===1},{default:ee(()=>P[138]||(P[138]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"}," < 4% zorgcapaciteit/65+ ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[30]||(P[30]=Ae=>ae(4,4.5,2)),"aria-pressed":x.value===2},{default:ee(()=>P[139]||(P[139]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"}," 4% - 4,5% zorgcapaciteit/65+",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[31]||(P[31]=Ae=>ae(4.5,5,3)),"aria-pressed":x.value===3},{default:ee(()=>P[140]||(P[140]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"4,5% - 5% zorgcapaciteit/65+",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[32]||(P[32]=Ae=>ae(5,5.5,4)),"aria-pressed":x.value===4},{default:ee(()=>P[141]||(P[141]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"},"5% - 5,5% zorgcapaciteit/65+",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[33]||(P[33]=Ae=>ae(5.5,6,5)),"aria-pressed":x.value===5},{default:ee(()=>P[142]||(P[142]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"5,5% - 6% zorgcapaciteit/65+",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[34]||(P[34]=Ae=>ae(6,6.6,6)),"aria-pressed":x.value===6},{default:ee(()=>P[143]||(P[143]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/95"},null,-1),I("p",{class:"font-normal"}," > 6% zorgcapaciteit/65+",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[35]||(P[35]=Ae=>ae(0,6.6,0)),"aria-pressed":x.value===0},{default:ee(()=>P[144]||(P[144]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])])])])):B(ye)==="Panden langdurige zorgorganisaties"?(be(),qe("div",ww,[I("ul",kw,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[36]||(P[36]=Ae=>ae(1,3,1)),"aria-pressed":x.value===1},{default:ee(()=>P[145]||(P[145]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"}," < 3% zorgcapaciteit/65+ ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[37]||(P[37]=Ae=>ae(3,6,2)),"aria-pressed":x.value===2},{default:ee(()=>P[146]||(P[146]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"}," 3% - 6% zorgcapaciteit/65+",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[38]||(P[38]=Ae=>ae(6,9,3)),"aria-pressed":x.value===3},{default:ee(()=>P[147]||(P[147]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"6% - 9% zorgcapaciteit/65+",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[39]||(P[39]=Ae=>ae(9,12,4)),"aria-pressed":x.value===4},{default:ee(()=>P[148]||(P[148]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"9% - 12% zorgcapaciteit/65+",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[40]||(P[40]=Ae=>ae(12,15,5)),"aria-pressed":x.value===5},{default:ee(()=>P[149]||(P[149]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"},"12% - 15% zorgcapaciteit/65+",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[41]||(P[41]=Ae=>ae(15,18,6)),"aria-pressed":x.value===6},{default:ee(()=>P[150]||(P[150]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"15% - 18% zorgcapaciteit/65+",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[42]||(P[42]=Ae=>ae(18,19,7)),"aria-pressed":x.value===7},{default:ee(()=>P[151]||(P[151]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/95"},null,-1),I("p",{class:"font-normal"}," > 18% zorgcapaciteit/65+",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[43]||(P[43]=Ae=>ae(0,19,0)),"aria-pressed":x.value===0},{default:ee(()=>P[152]||(P[152]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])])])])):At("",!0),B(ye)==="Geclusterd wonen"&&B(de)&&B(de)>=9?(be(),qe("div",Sw,[P[162]||(P[162]=I("p",{class:"py-2 font-medium"},"Aandeel zorgindicaties woonachtig in cluster:",-1)),I("ul",Tw,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[44]||(P[44]=Ae=>ae(1,6,1)),"aria-pressed":x.value===1},{default:ee(()=>P[153]||(P[153]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"}," < 6% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[45]||(P[45]=Ae=>ae(6,12,2)),"aria-pressed":x.value===2},{default:ee(()=>P[154]||(P[154]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"}," 6% - 12% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[46]||(P[46]=Ae=>ae(12,18,3)),"aria-pressed":x.value===3},{default:ee(()=>P[155]||(P[155]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"12% - 18% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[47]||(P[47]=Ae=>ae(18,24,4)),"aria-pressed":x.value===4},{default:ee(()=>P[156]||(P[156]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"},"18% - 24% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[48]||(P[48]=Ae=>ae(24,30,5)),"aria-pressed":x.value===5},{default:ee(()=>P[157]||(P[157]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"24% - 30% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[49]||(P[49]=Ae=>ae(30,36,6)),"aria-pressed":x.value===6},{default:ee(()=>P[158]||(P[158]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/95"},null,-1),I("p",{class:"font-normal"},"30% - 36% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[50]||(P[50]=Ae=>ae(36,37,7)),"aria-pressed":x.value===7},{default:ee(()=>P[159]||(P[159]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/95"},null,-1),I("p",{class:"font-normal"}," > 36% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[51]||(P[51]=Ae=>ae(1,37,0)),"aria-pressed":x.value===0},{default:ee(()=>P[160]||(P[160]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])]),pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[161]||(P[161]=[I("div",{class:"h-4 w-4 bg-slate-400 border-2 border-slate-800"},null,-1),I("p",{class:"font-normal"},"Onbekend",-1)])),_:1})])])):B(ye)==="Geclusterd wonen"?(be(),qe("div",zw,[P[170]||(P[170]=I("p",{class:"py-2 font-medium"},"Aandeel zorgindicaties woonachtig in cluster:",-1)),I("ul",Cw,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[52]||(P[52]=Ae=>ae(10,11,1)),"aria-pressed":x.value===1},{default:ee(()=>P[163]||(P[163]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"}," < 11% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[53]||(P[53]=Ae=>ae(11,14,2)),"aria-pressed":x.value===2},{default:ee(()=>P[164]||(P[164]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"}," 11% - 14% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[54]||(P[54]=Ae=>ae(14,17,3)),"aria-pressed":x.value===3},{default:ee(()=>P[165]||(P[165]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"14% - 17% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[55]||(P[55]=Ae=>ae(17,20,4)),"aria-pressed":x.value===4},{default:ee(()=>P[166]||(P[166]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"},"17% - 20% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[56]||
8(P[56]=Ae=>ae(20,23,5)),"aria-pressed":x.value===5},{default:ee(()=>P[167]||(P[167]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"20% - 23% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[57]||(P[57]=Ae=>ae(23,24,6)),"aria-pressed":x.value===6},{default:ee(()=>P[168]||(P[168]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/95"},null,-1),I("p",{class:"font-normal"}," > 23% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[58]||(P[58]=Ae=>ae(10,24,0)),"aria-pressed":x.value===0},{default:ee(()=>P[169]||(P[169]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])])])])):At("",!0),B(ye)==="Huidige zorgvraag"&&B(de)&&B(de)>=12?(be(),qe("div",Aw,[P[177]||(P[177]=I("p",{class:"pt-4 pb-2 font-medium"},"Aandeel WMO / 65+:",-1)),I("ul",Pw,[P[176]||(P[176]=I("li",{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},[I("div",{class:"h-8 w-8 border-2 border-slate-800]"}),I("p",{class:"font-normal"}," Niet beschikbaar ")],-1)),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[171]||(P[171]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_1.png')]"},null,-1),I("p",{class:"font-normal"}," < 8% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[172]||(P[172]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_4.png')]"},null,-1),I("p",{class:"font-normal"},"8% - 16% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[173]||(P[173]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_2.png')]"},null,-1),I("p",{class:"font-normal"},"16% - 24% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[174]||(P[174]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_3.png')]"},null,-1),I("p",{class:"font-normal"},"24% - 32% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[175]||(P[175]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_5.png')]"},null,-1),I("p",{class:"font-normal"}," > 32% ",-1)])),_:1})])])])):B(ye)==="Huidige zorgvraag"&&B(de)>9?(be(),qe("div",Iw,[P[191]||(P[191]=I("p",{class:"py-2 font-medium"}," Aandeel zorgindicaties VV (niet in zorginstelling) / aantal 65+:",-1)),I("ul",Ew,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[59]||(P[59]=Ae=>ae(.4,1,1)),"aria-pressed":x.value===1},{default:ee(()=>P[178]||(P[178]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"}," < 1% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[60]||(P[60]=Ae=>ae(1,1.6,2)),"aria-pressed":x.value===2},{default:ee(()=>P[179]||(P[179]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"}," 1% - 1.6% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[61]||(P[61]=Ae=>ae(1.6,1.2,3)),"aria-pressed":x.value===3},{default:ee(()=>P[180]||(P[180]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"1.6% - 2.2% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[62]||(P[62]=Ae=>ae(2.2,2.8,4)),"aria-pressed":x.value===4},{default:ee(()=>P[181]||(P[181]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"2.2% - 2.8% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[63]||(P[63]=Ae=>ae(2.8,3.4,5)),"aria-pressed":x.value===5},{default:ee(()=>P[182]||(P[182]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"},"2.8% - 3.4% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[64]||(P[64]=Ae=>ae(3.4,3.8,6)),"aria-pressed":x.value===6},{default:ee(()=>P[183]||(P[183]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"> 3.4% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[65]||(P[65]=Ae=>ae(.4,3.8,0)),"aria-pressed":x.value===0},{default:ee(()=>P[184]||(P[184]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])])]),P[192]||(P[192]=I("p",{class:"pt-4 pb-2 font-medium"},"Aandeel WMO / 65+:",-1)),I("ul",Mw,[P[190]||(P[190]=I("li",{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},[I("div",{class:"h-8 w-8 border-2 border-slate-800]"}),I("p",{class:"font-normal"}," Niet beschikbaar ")],-1)),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[185]||(P[185]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_1.png')]"},null,-1),I("p",{class:"font-normal"}," 6% - 12% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[186]||(P[186]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_4.png')]"},null,-1),I("p",{class:"font-normal"}," 12% - 18% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[187]||(P[187]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_2.png')]"},null,-1),I("p",{class:"font-normal"},"18% - 24%% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[188]||(P[188]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_3.png')]"},null,-1),I("p",{class:"font-normal"},"24% - 30% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[189]||(P[189]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_5.png')]"},null,-1),I("p",{class:"font-normal"}," > 30% ",-1)])),_:1})])])])):B(ye)==="Huidige zorgvraag"?(be(),qe("div",Dw,[P[206]||(P[206
8]=I("p",{class:"py-2 font-medium"}," Aandeel zorgindicaties VV (niet in zorginstelling) / aantal 65+:",-1)),I("ul",Lw,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[193]||(P[193]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"}," < 2% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[66]||(P[66]=Ae=>ae(2,2.2,2)),"aria-pressed":x.value===2},{default:ee(()=>P[194]||(P[194]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"}," 2% - 2.2% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[67]||(P[67]=Ae=>ae(2.2,2.4,3)),"aria-pressed":x.value===3},{default:ee(()=>P[195]||(P[195]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"2.2% - 2.4% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[68]||(P[68]=Ae=>ae(2.4,2.6,4)),"aria-pressed":x.value===4},{default:ee(()=>P[196]||(P[196]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"2.4% - 2.6% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[69]||(P[69]=Ae=>ae(2.6,2.8,5)),"aria-pressed":x.value===5},{default:ee(()=>P[197]||(P[197]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"},"2.6% - 2.8% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[70]||(P[70]=Ae=>ae(2.8,2.9,6)),"aria-pressed":x.value===6},{default:ee(()=>P[198]||(P[198]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"> 2.8% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0",onClick:P[71]||(P[71]=Ae=>ae(2,2.9,0)),"aria-pressed":x.value===0},{default:ee(()=>P[199]||(P[199]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])])]),P[207]||(P[207]=I("p",{class:"pt-4 pb-2 font-medium"},"Aandeel WMO / 65+:",-1)),I("ul",Rw,[P[205]||(P[205]=I("li",{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},[I("div",{class:"h-8 w-8 border-2 border-slate-800]"}),I("p",{class:"font-normal"}," Niet beschikbaar ")],-1)),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[200]||(P[200]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_1.png')]"},null,-1),I("p",{class:"font-normal"}," 15% - 17% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[201]||(P[201]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_4.png')]"},null,-1),I("p",{class:"font-normal"},"17% - 19% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[202]||(P[202]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_2.png')]"},null,-1),I("p",{class:"font-normal"},"19% - 21% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[203]||(P[203]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_3.png')]"},null,-1),I("p",{class:"font-normal"},"21% - 23% ",-1)])),_:1})]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-min-h-8 h-full h-full pl-0 pb-0"},{default:ee(()=>P[204]||(P[204]=[I("div",{class:"h-8 w-8 border-2 border-slate-800 bg-[url('/patterns/Pattern_5.png')]"},null,-1),I("p",{class:"font-normal"}," > 23% ",-1)])),_:1})])])])):At("",!0),B(ye)==="Toekomstige zorgvraag"&&B(de)&&B(de)>12?(be(),qe("div",Bw,[I("h4",Fw," Aandeel 65+ in jaar "+Et(B(ge).substring(8,12)),1),I("ul",Ow,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[72]||(P[72]=Ae=>ae(0,10,1)),"aria-pressed":x.value===1},{default:ee(()=>P[208]||(P[208]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"},"0 tot 10%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[73]||(P[73]=Ae=>ae(10,20,2)),"aria-pressed":x.value===2},{default:ee(()=>P[209]||(P[209]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"},"10 tot 20%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[74]||(P[74]=Ae=>ae(20,40,3)),"aria-pressed":x.value===3},{default:ee(()=>P[210]||(P[210]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"20 tot 40%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[75]||(P[75]=Ae=>ae(40,60,4)),"aria-pressed":x.value===4},{default:ee(()=>P[211]||(P[211]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"},"40 tot 60%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[76]||(P[76]=Ae=>ae(60,80,5)),"aria-pressed":x.value===5},{default:ee(()=>P[212]||(P[212]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"60 tot 80%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[77]||(P[77]=Ae=>ae(80,100,6)),"aria-pressed":x.value===6},{default:ee(()=>P[213]||(P[213]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/100"},null,-1),I("p",{class:"font-normal"},"80 tot 100%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[78]||(P[78]=Ae=>ae(0,100,0)),"aria-pressed":x.value===0},{default:ee(()=>P[214]||(P[214]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])])])])):B(ye)==="Toekomstige zorgvraag"&&B(de)&&B(de)>9?(be(),qe("div",$w,[I("h4",jw," Aandeel 65+ in jaar "+Et(B(ge).substring(8,12)),1),I("ul",Vw,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[79]||(P[79]=Ae=>ae(10,11,1)),"aria-pressed":x.value===1},{default:ee(()=>P[215]||(P[215]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"}," 10% ",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[80]||(P[80]=Ae=>ae(11,16.6,2)),"aria-pressed":x.value===2},{default:ee(()=>P[216]||(P[216]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"},"11% tot 16.6%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[81]||(P[81]=Ae=>ae(16.6,23.2,3)),"aria-pressed":x.value===3},{default:ee(()=>P[217]||(P[217]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"16.6% tot 23.2%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[82]||(P[82]=Ae=>ae(23.2,29.8,4)),"aria-pressed":x.value===4},{default:ee(()=>P[218]||(P[218]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"},"23.2% tot 29.8%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[83]||(P[83]=Ae=>ae(29.8,36.4,5)),"aria-pressed":x.value===5},{default:ee(()=>P[219]||(P[219]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"29.8% tot 36.4%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[84]||(P[84]=Ae=>ae(36.4,43,6)),"aria-pressed":x.value===6},{default:ee(()=>P[220]||(P[220]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/100"},null,-1),I("p",{class:"font-normal"}," 36.4% tot 43%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[85]||(P[85]=Ae=>ae(10,43,0)),"aria-pressed":x.value===0},{default:ee(()=>P[221]||(P[221]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])])])])):B(ye)==="Toekomstige zorgvraag"?(be(),qe("div",Nw,[I("h4",Uw," Aandeel 65+ in jaar "+Et(B(ge).substring(8,12)),1),I("ul",Gw,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[86]||(P[86]=Ae=>ae(15,16,1)),"aria-pressed":x.value===1},{default:ee(()=>P[222]||(P[222]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/0"},null,-1),I("p",{class:"font-normal"}," 15%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[87]||(P[87]=Ae=>ae(16,19,2)),"aria-pressed":x.value===2},{default:ee(()=>P[223]||(P[223]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"},"16 tot 19%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[88]||(P[88]=Ae=>ae(19,22,3)),"aria-pressed":x.value===3},{default:ee(()=>P[224]||(P[224]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"19 tot 22%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[89]||(P[89]=Ae=>ae(22,25,4)),"aria-pressed":x.value===4},{default:ee(()=>P[225]||(P[225]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"},"22 tot 25%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[90]||(P[90]=Ae=>ae(25,28,5)),"aria-pressed":x.value===5},{default:ee(()=>P[226]||(P[226]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"25 tot 28%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[91]||(P[91]=Ae=>ae(28,32,6)),"aria-pressed":x.value===6},{default:ee(()=>P[227]||(P[227]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/100"},null,-1),I("p",{class:"font-normal"}," > 28%",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[92]||(P[92]=Ae=>ae(15,32,0)),"aria-pressed":x.value===0},{default:ee(()=>P[228]||(P[228]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])])])])):B(ye)==="Geschiktheidsgids geclusterd wonen"?(be(),qe("div",qw,[P[241]||(P[241]=I("h4",{class:"font-medium text-[15px] mt-2"}," Hoe hoger de score, hoe geschikter de buurt.",-1)),I("ul",Zw,[I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[93]||(P[93]=Ae=>ae(0,10,1)),"aria-pressed":x.value===1},{default:ee(()=>P[229]||(P[229]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/10"},null,-1),I("p",{class:"font-normal"}," < 10",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[94]||(P[94]=Ae=>ae(10,20,2)),"aria-pressed":x.value===2},{default:ee(()=>P[230]||(P[230]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/20"},null,-1),I("p",{class:"font-normal"},"10 tot 20",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[95]||(P[95]=Ae=>ae(20,30,3)),"aria-pressed":x.value===3},{default:ee(()=>P[231]||(P[231]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/30"},null,-1),I("p",{class:"font-normal"},"20 tot 30",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[96]||(P[96]=Ae=>ae(30,40,4)),"aria-pressed":x.value===4},{default:ee(()=>P[232]||(P[232]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/40"},null,-1),I("p",{class:"font-normal"},"30 tot 40",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[97]||(P[97]=Ae=>ae(40,50,5)),"aria-pressed":x.value===5},{default:ee(()=>P[233]||(P[233]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/50"},null,-1),I("p",{class:"font-normal"},"40 tot 50",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[98]||(P[98]=Ae=>ae(50,60,6)),"aria-pressed":x.value===6},{default:ee(()=>P[234]||(P[234]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/60"},null,-1),I("p",{class:"font-normal"}," 50 tot 60",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[99]||(P[99]=Ae=>ae(60,70,7)),"aria-pressed":x.value===7},{default:ee(()=>P[235]||(P[235]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/70"},null,-1),I("p",{class:"font-normal"},"60 tot 70",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[100]||(P[100]=Ae=>ae(70,80,8)),"aria-pressed":x.value===8},{default:ee(()=>P[236]||(P[236]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/80"},null,-1),I("p",{class:"font-normal"},"70 tot 80",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[101]||(P[101]=Ae=>ae(80,90,9)),"aria-pressed":x.value===9},{default:ee(()=>P[237]||(P[237]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/90"},null,-1),I("p",{class:"font-normal"},"80 tot 90",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[102]||(P[102]=Ae=>
8ae(90,100,10)),"aria-pressed":x.value===10},{default:ee(()=>P[238]||(P[238]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-govblue/100"},null,-1),I("p",{class:"font-normal"}," > 90",-1)])),_:1},8,["aria-pressed"])]),I("li",null,[pe(Te,{class:"flex justify-start gap-2 min-h-8 h-full pl-0 pb-0",onClick:P[103]||(P[103]=Ae=>ae(0,100,0)),"aria-pressed":x.value===0},{default:ee(()=>P[239]||(P[239]=[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gradient-to-br from-govblue to-govblue/0"},null,-1),I("p",{class:"font-normal"},"Toon alles",-1)])),_:1},8,["aria-pressed"])]),P[240]||(P[240]=I("li",{class:"flex justify-start gap-2 min-h-8 h-full mt-3"},[I("div",{class:"h-4 w-4 border-2 border-slate-800 bg-gray-400"}),I("p",{class:"font-normal text-sm mt-[-2px]"}," Geen data beschikbaar ")],-1))])])):At("",!0)]),P[244]||(P[244]=I("div",{class:"h-[3px] w-full bg-govSecondary mt-3"},null,-1)),P[245]||(P[245]=I("p",{class:"font-bold text-sm text-govblue mt-2"},"Weergave kaart",-1)),I("div",Hw,[pe(B(Xm),{id:"background-map",checked:B(wt),"onUpdate:checked":P[104]||(P[104]=Ae=>wr(wt)?wt.value=Ae:null),class:"w-[39px] h-[22px] flex bg-govblue/20 border border-govblue rounded-full relative data-[state=checked]:bg-govblue/70 cursor-default"},{default:ee(()=>[pe(B(Km),{class:"block w-[18px] h-[18px] my-auto bg-govblue rounded-full transition-transform duration-100 translate-x-0.5 will-change-transform data-[state=checked]:translate-x-[19px]"})]),_:1},8,["checked"]),P[243]||(P[243]=I("label",{class:"text-govblue text-[15px] leading-none pr-[15px] select-none",for:"background-map"}," Satelliet achtergrond kaart ",-1))]),pe(B(Gm),{class:"absolute right-[5px] top-[5px] inline-flex h-[25px] w-[25px] cursor-default items-center justify-center rounded-full text-slate-800 outline-none hover:bg-slate-800 hover:text-slate-200 focus:bg-slate-800 focus:text-slate-200","aria-label":"Sluiten",onClick:P[105]||(P[105]=Ae=>Ue.value=!1)},{default:ee(()=>[pe(B(un),{icon:"radix-icons:cross-2"})]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])])}}}),Yf=Td("/icons/411.001-ZorgopdeKaart-iconen-doc-pdf.svg"),ug=()=>({filterCorporatiewoningState:Zo("filterCorporatiewoningState",()=>!1)}),cg=()=>({filterAanpasbareWoningState:Zo("filterAanpasbareWoningState",()=>!1)}),hg=()=>({filterOptopState:Zo("filterOptopState",()=>!1)}),Xw=["src"],Kw={class:"text-lg text-govblue"},Yw={key:0,class:"flex flex-col gap-2.5"},Jw={class:"text-sm py-4 pr-4"},Qw={class:"text-sm py-2 pr-4"},e2={key:1},t2={class:"flex-col gap-2 mt-3"},i2={key:0,class:"font-bold mb-2"},r2={class:"flex-row"},n2={key:0,class:"text-black text-[15px] leading-none pr-[15px] select-none text-wrap",for:"filter-cowo"},s2={key:1,class:"text-black text-[15px] leading-none pr-[15px] select-none"},a2={key:1,class:"flex-row"},o2=Ke({__name:"Popover",props:{label:{},icon:{},img:{},theme:{}},setup(f){const _=Fe(!1),y=f,{label:x}=rr(y),{theme:C}=rr(y),{filterCorporatiewoningState:L}=ug(),{filterAanpasbareWoningState:w}=cg(),{filterOptopState:l}=hg();function U(){window.open("/files/Toelichting aanpasbare woningvoorraad.pdf","_blank")}function W(F){F=="Toegankelijkheid woningen"?window.open("/files/Toelichting Toegankelijkheid woningen.pdf","_blank"):F=="Afstand tot voorzieningen voor Algemene Dagelijkse Levensbehoeften"?window.open("/files/Toelichting ADL-voorzieningen.pdf","_blank"):F=="Woningvoorraad en gezinssamenstelling"?window.open("/files/Toelichting Woningvoorraad en gezinssamenstelling.pdf","_blank"):F=="Panden langdurige zorgorganisaties"?window.open("/files/Toelichting Panden langdurige zorg.pdf","_blank"):F=="Geclusterd wonen"?window.open("/files/Toelichting Geclusterde woningen.pdf","_blank"):F=="Huidige zorgvraag"?window.open("/files/Toelichting Huidige zorgvraag.pdf","_blank"):F=="Toekomstige zorgvraag"?window.open("/files/Toelichting Toekomstige zorgvraag.pdf","_blank"):F=="Geschiktheidsgids geclusterd wonen"&&window.open("/files/Toelichting Geschiktheidsgids geclusterd wonen.pdf","_blank")}const G=at(()=>x.value==="Filter"?"Open filters in popup":"Open popup om meer toelichting over toegankelijkheid woningen te verkrijgen");return(F,T)=>{const re=zd,fe=Km,ye=Xm;return be(),Ne(B($m),{open:_.value},{default:ee(()=>[pe(B(jm),{class:"inline-flex h-12 cursor-default items-center justify-center bg-white px-8 py-2 text-slate-800 border border-white border-l-slate-400 outline-none hover:bg-slate-100 focus:shadow-[0_0_0_2px] focus:shadow-black","aria-label":B(G),onClick:T[0]||(T[0]=de=>_.value=!_.value)},{default:ee(()=>[y.img?(be(),qe("img",{key:0,src:y.img,class:"mr-2 text-lg w-6"},null,8,Xw)):At("",!0),y.icon?(be(),Ne(B(un),{key:1,icon:y.icon,class:"mr-2 text-lg"},null,8,["icon"])):At("",!0),I("span",Kw,Et(B(x)),1)]),_:1},8,["aria-label"]),pe(B(Vm),null,{default:ee(()=>[pe(B(Um),{side:"top",class:"data-[state=open]:data-[side=top]:animate-slideDownAndFade data-[state=open]:data-[side=right]:animate-slideLeftAndFade data-[state=open]:data-[side=top]:animate-slideUpAndFade data-[state=open]:data-[side=left]:animate-slideRightAndFade lg:w-fit max-w-[50vw] rounded bg-white p-5 sm:ml-[9.9rem] ml-[8vw] shadow-[0_10px_38px_-10px_hsla(206,22%,7%,.35),0_10px_20px_-15px_hsla(206,22%,7%,.2)] will-change-[transform,opacity] focus:shadow-[0_10px_38px_-10px_hsla(206,22%,7%,.35),0_10px_20px_-15px_hsla(206,22%,7%,.2)] z-20","aria-label":"Dialoogvenster over toelichting data gebruikt op kaart"},{default:ee(()=>[B(x)=="Toelichting"?(be(),qe("div",Yw,[I("p",Jw,[pe(re,{onClick:T[1]||(T[1]=de=>W(B(C))),class:"text-govblue",title:"Open PDF-bestand Toelichting over geselecteerd thema in nieuwe tab","aria-label":"Open PDF-bestand Toelichting over geselecteerd thema in een nieuwe tab",tabindex:"0",onKeyup:[Nn(U,["enter"]),Nn(U,["space"])]},{default:ee(()=>[T[6]||(T[6]=I("img",{src:Yf,class:"inline mr-2 text-lg w-6","aria-label":"Document icoon"},null,-1)),kr(" Toelichting thema "+Et(B(C))+".pdf ",1)]),_:1})]),I("p",Qw,[pe(re,{onClick:U,class:"text-govblue",title:"Open PDF-bestand Toelichting aanpasbare woningvoorraad in nieuwe tab","aria-label":"Open PDF-bestand genaamd Toelichting aanpasbare woningvoorraad in een nieuwe tab",tabindex:"0",onKeyup:[Nn(U,["enter"]),Nn(U,["space"])]},{default:ee(()=>T[7]||(T[7]=[I("img",{src:Yf,class:"inline mr-2 text-lg w-6","aria-label":"Document icoon"},null,-1),kr(" Toelichting aanpasbare woningvoorraad.pdf ")])),_:1})])])):At("",!0),B(x)=="Filter"?(be(),qe("div",e2,[I("div",t2,[B(C)=="Geschiktheidsgids geclusterd wonen"?(be(),qe("h3",i2," Toon enkel:")):At("",!0),I("div",r2,[pe(ye,{id:"filter-cowo",checked:B(L),"onUpdate:checked":T[2]||(T[2]=de=>wr(L)?L.value=de:null),class:"w-[39px] h-[22px] flex bg-black/50 shadow-sm rounded-full relative data-[state=checked]:bg-black cursor-default"},{default:ee(()=>[pe(fe,{class:"block w-[18px] h-[18px] my-auto bg-white shadow-sm rounded-full transition-transform duration-100 translate-x-0.5 will-change-transform data-[state=checked]:translate-x-[19px]"})]),_:1},8,["checked"]),B(C)!="Geschiktheidsgids geclusterd wonen"?(be(),qe("label",n2," Toon enkel corporatiewoningen ")):(be(),qe("label",s2," Sociale huurwoningen "))]),B(C)=="Geschiktheidsgids geclusterd wonen"?(be(),qe("div",a2,[pe(ye,{id:"filter-optop",checked:B(l),"onUpdate:checked":T[3]||(T[3]=de=>wr(l)?l.value=de:null),class:"w-[39px] h-[22px] flex bg-black/50 shadow-sm rounded-full relative data-[state=checked]:bg-black cursor-default"},{default:ee(()=>[pe(fe,{class:"block w-[18px] h-[18px] my-auto bg-white shadow-sm rounded-full transition-transform duration-100 translate-x-0.5 will-change-transform data-[state=checked]:translate-x-[19px]"})]),_:1},8,["checked"]),T[8]||(T[8]=I("label",{class:"text-black text-[15px] leading-none pr-[15px] select-none",for:"filter-optop"}," Panden met optoppotentieel ",-1)),pe(ye,{id:"filter-ster2",checked:B(w),"onUpdate:checked":T[4]||(T[4]=de=>wr(w)?w.value=de:null),class:"w-[39px] h-[22px] flex bg-black/50 shadow-sm rounded-full relative data-[state=checked]:bg-black cursor-default"},{default:ee(()=>[pe(fe,{class:"block w-[18px] h-[18px] my-auto bg-white shadow-sm rounded-full transition-transform duration-100 translate-x-0.5 will-change-transform data-[state=checked]:translate-x-[19px]"})]),_:1},8,["checked"]),T[9]||(T[9]=I("label",{class:"text-black text-[15px] leading-none pr-[15px] select-none",for:"filter-ster2"}," Aanpasbare woningen ",-1))])):At("",!0)])])):At("",!0),pe(B(Gm),{class:"absolute right-[5px] top-[5px] inline-flex h-[25px] w-[25px] cursor-default items-center justify-center rounded-full text-slate-800 outline-none hover:bg-slate-800 hover:text-slate-200 focus:bg-slate-800 focus:text-slate-200","aria-label":"Popup sluiten",onClick:T[5]||(T[5]=de=>_.value=!1)},{default:ee(()=>[pe(B(un),{icon:"radix-icons:cross-2"})]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}});var kc={exports:{}};/** 9 * MapLibre GL JS 10 * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt 11 */var l2=kc.exports,Jf;function u2(){return Jf||(Jf=1,function(f,_){(function(y,x){f.exports=x()})(l2,function(){var y={},x={};function C(w,l,U){if(x[w]=U,w==="index"){var W="var sharedModule = {}; ("+x.shared+")(sharedModule); ("+x.worker+")(sharedModule);",G={};return x.shared(G),x.index(y,G),typeof window<"u"&&y.setWorkerUrl(window.URL.createObjectURL(new Blob([W],{type:"text/javascript"}))),y}}C("shared",["exports"],function(w){function l(i,t,r,s){return new(r||(r=Promise))(function(u,d){function p(S){try{v(s.next(S))}catch(z){d(z)}}function m(S){try{v(s.throw(S))}catch(z){d(z)}}function v(S){var z;S.done?u(S.value):(z=S.value,z instanceof r?z:new r(function(E){E(z)})).then(p,m)}v((s=s.apply(i,t||[])).next())})}function U(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}typeof SuppressedError=="function"&&SuppressedError;var W=G;function G(i,t){this.x=i,this.y=t}G.prototype={clone:function(){return new G(this.x,this.y)},add:function(i){return this.clone()._add(i)},sub:function(i){return this.clone()._sub(i)},multByPoint:function(i){return this.clone()._multByPoint(i)},divByPoint:function(i){return this.clone()._divByPoint(i)},mult:function(i){return this.clone()._mult(i)},div:function(i){return this.clone()._div(i)},rotate:function(i){return this.clone()._rotate(i)}
11,rotateAround:function(i,t){return this.clone()._rotateAround(i,t)},matMult:function(i){return this.clone()._matMult(i)},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(i){return this.x===i.x&&this.y===i.y},dist:function(i){return Math.sqrt(this.distSqr(i))},distSqr:function(i){var t=i.x-this.x,r=i.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(i){return Math.atan2(this.y-i.y,this.x-i.x)},angleWith:function(i){return this.angleWithSep(i.x,i.y)},angleWithSep:function(i,t){return Math.atan2(this.x*t-this.y*i,this.x*i+this.y*t)},_matMult:function(i){var t=i[2]*this.x+i[3]*this.y;return this.x=i[0]*this.x+i[1]*this.y,this.y=t,this},_add:function(i){return this.x+=i.x,this.y+=i.y,this},_sub:function(i){return this.x-=i.x,this.y-=i.y,this},_mult:function(i){return this.x*=i,this.y*=i,this},_div:function(i){return this.x/=i,this.y/=i,this},_multByPoint:function(i){return this.x*=i.x,this.y*=i.y,this},_divByPoint:function(i){return this.x/=i.x,this.y/=i.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var i=this.y;return this.y=this.x,this.x=-i,this},_rotate:function(i){var t=Math.cos(i),r=Math.sin(i),s=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=s,this},_rotateAround:function(i,t){var r=Math.cos(i),s=Math.sin(i),u=t.y+s*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-s*(this.y-t.y),this.y=u,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},G.convert=function(i){return i instanceof G?i:Array.isArray(i)?new G(i[0],i[1]):i};var F=U(W),T=re;function re(i,t,r,s){this.cx=3*i,this.bx=3*(r-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(s-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=t,this.p2x=r,this.p2y=s}re.prototype={sampleCurveX:function(i){return((this.ax*i+this.bx)*i+this.cx)*i},sampleCurveY:function(i){return((this.ay*i+this.by)*i+this.cy)*i},sampleCurveDerivativeX:function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},solveCurveX:function(i,t){if(t===void 0&&(t=1e-6),i<0)return 0;if(i>1)return 1;for(var r=i,s=0;s<8;s++){var u=this.sampleCurveX(r)-i;if(Math.abs(u)<t)return r;var d=this.sampleCurveDerivativeX(r);if(Math.abs(d)<1e-6)break;r-=u/d}var p=0,m=1;for(r=i,s=0;s<20&&(u=this.sampleCurveX(r),!(Math.abs(u-i)<t));s++)i>u?p=r:m=r,r=.5*(m-p)+p;return r},solve:function(i,t){return this.sampleCurveY(this.solveCurveX(i,t))}};var fe=U(T);let ye,de;function ge(){return ye==null&&(ye=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),ye}function ae(){if(de==null&&(de=!1,ge())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let s=0;s<5*5;s++){const u=4*s;t.fillStyle=`rgb(${u},${u+1},${u+2})`,t.fillRect(s%5,Math.floor(s/5),1,1)}const r=t.getImageData(0,0,5,5).data;for(let s=0;s<5*5*4;s++)if(s%4!=3&&r[s]!==s){de=!0;break}}}return de||!1}function le(i,t,r,s){const u=new fe(i,t,r,s);return d=>u.solve(d)}const Ze=le(.25,.1,.25,1);function Ue(i,t,r){return Math.min(r,Math.max(t,i))}function wt(i,t,r){const s=r-t,u=((i-t)%s+s)%s+t;return u===t?r:u}function Ge(i,...t){for(const r of t)for(const s in r)i[s]=r[s];return i}let P=1;function Te(i,t,r){const s={};for(const u in i)s[u]=t.call(this,i[u],u,i);return s}function Ae(i,t,r){const s={};for(const u in i)t.call(this,i[u],u,i)&&(s[u]=i[u]);return s}function Pt(i){return Array.isArray(i)?i.map(Pt):typeof i=="object"&&i?Te(i,Pt):i}const _t={};function Ct(i){_t[i]||(typeof console<"u"&&console.warn(i),_t[i]=!0)}function Lt(i,t,r){return(r.y-i.y)*(t.x-i.x)>(t.y-i.y)*(r.x-i.x)}function wi(i){return typeof WorkerGlobalScope<"u"&&i!==void 0&&i instanceof WorkerGlobalScope}let ri=null;function hi(i){return typeof ImageBitmap<"u"&&i instanceof ImageBitmap}const Di="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function xi(i,t,r,s,u){return l(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const d=new VideoFrame(i,{timestamp:0});try{const p=d==null?void 0:d.format;if(!p||!p.startsWith("BGR")&&!p.startsWith("RGB"))throw new Error(`Unrecognized format ${p}`);const m=p.startsWith("BGR"),v=new Uint8ClampedArray(s*u*4);if(yield d.copyTo(v,function(S,z,E,R,j){const N=4*Math.max(-z,0),q=(Math.max(0,E)-E)*R*4+N,K=4*R,ie=Math.max(0,z),ke=Math.max(0,E);return{rect:{x:ie,y:ke,width:Math.min(S.width,z+R)-ie,height:Math.min(S.height,E+j)-ke},layout:[{offset:q,stride:K}]}}(i,t,r,s,u)),m)for(let S=0;S<v.length;S+=4){const z=v[S];v[S]=v[S+2],v[S+2]=z}return v}finally{d.close()}})}let Ui,li;const dr="AbortError";function wn(){return new Error(dr)}const Zr={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};
vendor: 4,330 bytes, line 11
11function Sr(i){return Zr.REGISTERED_PROTOCOLS[i.substring(0,i.indexOf("://"))]}const kn="global-dispatcher";class Hi extends Error{constructor(t,r,s,u){super(`AJAXError: ${r} (${t}): ${s}`),this.status=t,this.statusText=r,this.url=s,this.body=u}}const pr=()=>wi(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,hn=function(i,t){if(/:\/\//.test(i.url)&&!/^https?:|^file:/.test(i.url)){const s=Sr(i.url);if(s)return s(i,t);if(wi(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:i,targetMapId:kn},t)}if(!(/^file:/.test(r=i.url)||/^file:/.test(pr())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(s,u){return l(this,void 0,void 0,function*(){const d=new Request(s.url,{method:s.method||"GET",body:s.body,credentials:s.credentials,headers:s.headers,cache:s.cache,referrer:pr(),signal:u.signal});s.type!=="json"||d.headers.has("Accept")||d.headers.set("Accept","application/json");const p=yield fetch(d);if(!p.ok){const S=yield p.blob();throw new Hi(p.status,p.statusText,s.url,S)}let m;m=s.type==="arrayBuffer"||s.type==="image"?p.arrayBuffer():s.type==="json"?p.json():p.text();const v=yield m;if(u.signal.aborted)throw wn();return{data:v,cacheControl:p.headers.get("Cache-Control"),expires:p.headers.get("Expires")}})}(i,t);if(wi(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:i,mustQueue:!0,targetMapId:kn},t)}var r;return function(s,u){return new Promise((d,p)=>{var m;const v=new XMLHttpRequest;v.open(s.method||"GET",s.url,!0),s.type!=="arrayBuffer"&&s.type!=="image"||(v.responseType="arraybuffer");for(const S in s.headers)v.setRequestHeader(S,s.headers[S]);s.type==="json"&&(v.responseType="text",!((m=s.headers)===null||m===void 0)&&m.Accept||v.setRequestHeader("Accept","application/json")),v.withCredentials=s.credentials==="include",v.onerror=()=>{p(new Error(v.statusText))},v.onload=()=>{if(!u.signal.aborted)if((v.status>=200&&v.status<300||v.status===0)&&v.response!==null){let S=v.response;if(s.type==="json")try{S=JSON.parse(v.response)}catch(z){return void p(z)}d({data:S,cacheControl:v.getResponseHeader("Cache-Control"),expires:v.getResponseHeader("Expires")})}else{const S=new Blob([v.response],{type:v.getResponseHeader("Content-Type")});p(new Hi(v.status,v.statusText,s.url,S))}},u.signal.addEventListener("abort",()=>{v.abort(),p(wn())}),v.send(s.body)})}(i,t)};function sr(i){if(!i||i.indexOf("://")<=0||i.indexOf("data:image/")===0||i.indexOf("blob:")===0)return!0;const t=new URL(i),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function Wn(i,t,r){r[i]&&r[i].indexOf(t)!==-1||(r[i]=r[i]||[],r[i].push(t))}function Br(i,t,r){if(r&&r[i]){const s=r[i].indexOf(t);s!==-1&&r[i].splice(s,1)}}class Hr{constructor(t,r={}){Ge(this,r),this.type=t}}class Tr extends Hr{constructor(t,r={}){super("error",Ge({error:t},r))}}class Mn{on(t,r){return this._listeners=this._listeners||{},Wn(t,r,this._listeners),this}off(t,r){return Br(t,r,this._listeners),Br(t,r,this._oneTimeListeners),this}once(t,r){return r?(this._oneTimeListeners=this._oneTimeListeners||{},Wn(t,r,this._oneTimeListeners),this):new Promise(s=>this.once(t,s))}fire(t,r){typeof t=="string"&&(t=new Hr(t,r||{}));const s=t.type;if(this.listens(s)){t.target=this;const u=this._listeners&&this._listeners[s]?this._listeners[s].slice():[];for(const m of u)m.call(this,t);const d=this._oneTimeListeners&&this._oneTimeListeners[s]?this._oneTimeListeners[s].slice():[];for(const m of d)Br(s,m,this._oneTimeListeners),m.call(this,t);const p=this._eventedParent;p&&(Ge(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),p.fire(t))}else t instanceof Tr&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,r){return this._eventedParent=t,this._eventedParentData=r,this}}var Ce={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"}
vendor: 3,574 bytes, line 11
11,bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{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
vendor: 8,509 bytes, line 11
11","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"}
vendor: 8,873 bytes, line 11
11,"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:"enum",default:"mercator",values:{mercator:{},globe:{}}}},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"}
vendor: 9,830 bytes, line 11
11,"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"}}};const
vendor: 6,678 bytes, line 11
11dn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ee(i,t){const r={};for(const s in i)s!=="ref"&&(r[s]=i[s]);return dn.forEach(s=>{s in t&&(r[s]=t[s])}),r}function Le(i,t){if(Array.isArray(i)){if(!Array.isArray(t)||i.length!==t.length)return!1;for(let r=0;r<i.length;r++)if(!Le(i[r],t[r]))return!1;return!0}if(typeof i=="object"&&i!==null&&t!==null){if(typeof t!="object"||Object.keys(i).length!==Object.keys(t).length)return!1;for(const r in i)if(!Le(i[r],t[r]))return!1;return!0}return i===t}function yt(i,t){i.push(t)}function Oe(i,t,r){yt(r,{command:"addSource",args:[i,t[i]]})}function ki(i,t,r){yt(t,{command:"removeSource",args:[i]}),r[i]=!0}function qt(i,t,r,s){ki(i,r,s),Oe(i,t,r)}function ei(i,t,r){let s;for(s in i[r])if(Object.prototype.hasOwnProperty.call(i[r],s)&&s!=="data"&&!Le(i[r][s],t[r][s]))return!1;for(s in t[r])if(Object.prototype.hasOwnProperty.call(t[r],s)&&s!=="data"&&!Le(i[r][s],t[r][s]))return!1;return!0}function Gt(i,t,r,s,u,d){i=i||{},t=t||{};for(const p in i)Object.prototype.hasOwnProperty.call(i,p)&&(Le(i[p],t[p])||r.push({command:d,args:[s,p,t[p],u]}));for(const p in t)Object.prototype.hasOwnProperty.call(t,p)&&!Object.prototype.hasOwnProperty.call(i,p)&&(Le(i[p],t[p])||r.push({command:d,args:[s,p,t[p],u]}))}function Zt(i){return i.id}function Ft(i,t){return i[t.id]=t,i}class Be{constructor(t,r,s,u){this.message=(t?`${t}: `:"")+s,u&&(this.identifier=u),r!=null&&r.__line__&&(this.line=r.__line__)}}function Si(i,...t){for(const r of t)for(const s in r)i[s]=r[s];return i}class ni extends Error{constructor(t,r){super(r),this.message=r,this.key=t}}class Fi{constructor(t,r=[]){this.parent=t,this.bindings={};for(const[s,u]of r)this.bindings[s]=u}concat(t){return new Fi(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const ar={kind:"null"},Ve={kind:"number"},ft={kind:"string"},ut={kind:"boolean"},Wi={kind:"color"},Wr={kind:"object"},It={kind:"value"},pn={kind:"collator"},Sn={kind:"formatted"},Dn={kind:"padding"},fn={kind:"resolvedImage"},te={kind:"variableAnchorOffsetCollection"};function $(i,t){return{kind:"array",itemType:i,N:t}}function O(i){if(i.kind==="array"){const t=O(i.itemType);return typeof i.N=="number"?`array<${t}, ${i.N}>`:i.itemType.kind==="value"?"array":`array<${t}>`}return i.kind}const Z=[ar,Ve,ft,ut,Wi,Sn,Wr,$(It),Dn,fn,te];function J(i,t){if(t.kind==="error")return null;if(i.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!J(i.itemType,t.itemType))&&(typeof i.N!="number"||i.N===t.N))return null}else{if(i.kind===t.kind)return null;if(i.kind==="value"){for(const r of Z)if(!J(r,t))return null}}return`Expected ${O(i)} but found ${O(t)} instead.`}function he(i,t){return t.some(r=>r.kind===i.kind)}function _e(i,t){return t.some(r=>r==="null"?i===null:r==="array"?Array.isArray(i):r==="object"?i&&!Array.isArray(i)&&typeof i=="object":r===typeof i)}function we(i,t){return i.kind==="array"&&t.kind==="array"?i.itemType.kind===t.itemType.kind&&typeof i.N=="number":i.kind===t.kind}const oe=.96422,Ie=.82521,Re=4/29,ze=6/29,He=3*ze*ze,gt=ze*ze*ze,vt=Math.PI/180,Ht=180/Math.PI;function Mt(i){return(i%=360)<0&&(i+=360),i}function Wt([i,t,r,s]){let u,d;const p=Li((.2225045*(i=$t(i))+.7168786*(t=$t(t))+.0606169*(r=$t(r)))/1);i===t&&t===r?u=d=p:(u=Li((.4360747*i+.3850649*t+.1430804*r)/oe),d=Li((.0139322*i+.0971045*t+.7141733*r)/Ie));const m=116*p-16;return[m<0?0:m,500*(u-p),200*(p-d),s]}function $t(i){return i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Li(i){return i>gt?Math.pow(i,1/3):i/He+Re}function Ti([i,t,r,s]){let u=(i+16)/116,d=isNaN(t)?u:u+t/500,p=isNaN(r)?u:u-r/200;return u=1*ti(u),d=oe*ti(d),p=Ie*ti(p),[Rt(3.1338561*d-1.6168667*u-.4906146*p),Rt(-.9787684*d+1.9161415*u+.033454*p),Rt(.0719453*d-.2289914*u+1.4052427*p),s]}function Rt(i){return(i=i<=.00304?12.92*i:1.055*Math.pow(i,1/2.4)-.055)<0?0:i>1?1:i}function ti(i){return i>ze?i*i*i:He*(i-Re)}function bi(i){return parseInt(i.padEnd(2,i),16)/255}function $i(i,t){return Gi(t?i/100:i,0,1)}function Gi(i,t,r){return Math.min(Math.max(t,i),r)}function or(i){return!i.some(Number.isNaN)}const ws={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
11ive:[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]};class ii{constructor(t,r,s,u=1,d=!0){this.r=t,this.g=r,this.b=s,this.a=u,d||(this.r*=u,this.g*=u,this.b*=u,u||this.overwriteGetter("rgb",[t,r,s,u]))}static parse(t){if(t instanceof ii)return t;if(typeof t!="string")return;const r=function(s){if((s=s.toLowerCase().trim())==="transparent")return[0,0,0,0];const u=ws[s];if(u){const[p,m,v]=u;return[p/255,m/255,v/255,1]}if(s.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(s)){const p=s.length<6?1:2;let m=1;return[bi(s.slice(m,m+=p)),bi(s.slice(m,m+=p)),bi(s.slice(m,m+=p)),bi(s.slice(m,m+p)||"ff")]}if(s.startsWith("rgb")){const p=s.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(p){const[m,v,S,z,E,R,j,N,q,K,ie,ke]=p,ce=[z||" ",j||" ",K].join("");if(ce===" "||ce===" /"||ce===",,"||ce===",,,"){const xe=[S,R,q].join(""),Pe=xe==="%%%"?100:xe===""?255:0;if(Pe){const $e=[Gi(+v/Pe,0,1),Gi(+E/Pe,0,1),Gi(+N/Pe,0,1),ie?$i(+ie,ke):1];if(or($e))return $e}}return}}const d=s.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(d){const[p,m,v,S,z,E,R,j,N]=d,q=[v||" ",z||" ",R].join("");if(q===" "||q===" /"||q===",,"||q===",,,"){const K=[+m,Gi(+S,0,100),Gi(+E,0,100),j?$i(+j,N):1];if(or(K))return function([ie,ke,ce,xe]){function Pe($e){const rt=($e+ie/30)%12,xt=ke*Math.min(ce,1-ce);return ce-xt*Math.max(-1,Math.min(rt-3,9-rt,1))}return ie=Mt(ie),ke/=100,ce/=100,[Pe(0),Pe(8),Pe(4),xe]}(K)}}}(t);return r?new ii(...r,!1):void 0}get rgb(){const{r:t,g:r,b:s,a:u}=this,d=u||1/0;return this.overwriteGetter("rgb",[t/d,r/d,s/d,u])}get hcl(){return this.overwriteGetter("hcl",function(t){const[r,s,u,d]=Wt(t),p=Math.sqrt(s*s+u*u);return[Math.round(1e4*p)?Mt(Math.atan2(u,s)*Ht):NaN,p,r,d]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Wt(this.rgb))}overwriteGetter(t,r){return Object.defineProperty(this,t,{value:r}),r}toString(){const[t,r,s,u]=this.rgb;return`rgba(${[t,r,s].map(d=>Math.round(255*d)).join(",")},${u})`}}ii.black=new ii(0,0,0,1),ii.white=new ii(1,1,1,1),ii.transparent=new ii(0,0,0,0),ii.red=new ii(1,0,0,1);class Yo{constructor(t,r,s){this.sensitivity=t?r?"variant":"case":r?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,r){return this.collator.compare(t,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Jo{constructor(t,r,s,u,d){this.text=t,this.image=r,this.scale=s,this.fontStack=u,this.textColor=d}}class zr{constructor(t){this.sections=t}static fromString(t){return new zr([new Jo(t,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof zr?t:zr.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}}class Cr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Cr)return t;if(typeof t=="number")return new Cr([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const r of t)if(typeof r!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new Cr(t)}}toString(){return JSON.stringify(this.values)}}const qc=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Fr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Fr)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let r=0;r<t.length;r+=2){const s=t[r],u=t[r+1];
vendor: 18,255 bytes, line 11
11if(typeof s!="string"||!qc.has(s)||!Array.isArray(u)||u.length!==2||typeof u[0]!="number"||typeof u[1]!="number")return}return new Fr(t)}}toString(){return JSON.stringify(this.values)}}class Ar{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new Ar({name:t,available:!1}):null}}function ks(i,t,r,s){return typeof i=="number"&&i>=0&&i<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:`Invalid rgba value [${[i,t,r,s].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof s=="number"?[i,t,r,s]:[i,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Xn(i){if(i===null||typeof i=="string"||typeof i=="boolean"||typeof i=="number"||i instanceof ii||i instanceof Yo||i instanceof zr||i instanceof Cr||i instanceof Fr||i instanceof Ar)return!0;if(Array.isArray(i)){for(const t of i)if(!Xn(t))return!1;return!0}if(typeof i=="object"){for(const t in i)if(!Xn(i[t]))return!1;return!0}return!1}function Ri(i){if(i===null)return ar;if(typeof i=="string")return ft;if(typeof i=="boolean")return ut;if(typeof i=="number")return Ve;if(i instanceof ii)return Wi;if(i instanceof Yo)return pn;if(i instanceof zr)return Sn;if(i instanceof Cr)return Dn;if(i instanceof Fr)return te;if(i instanceof Ar)return fn;if(Array.isArray(i)){const t=i.length;let r;for(const s of i){const u=Ri(s);if(r){if(r===u)continue;r=It;break}r=u}return $(r||It,t)}return Wr}function pa(i){const t=typeof i;return i===null?"":t==="string"||t==="number"||t==="boolean"?String(i):i instanceof ii||i instanceof zr||i instanceof Cr||i instanceof Fr||i instanceof Ar?i.toString():JSON.stringify(i)}class Xr{constructor(t,r){this.type=t,this.value=r}static parse(t,r){if(t.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Xn(t[1]))return r.error("invalid value");const s=t[1];let u=Ri(s);const d=r.expectedType;return u.kind!=="array"||u.N!==0||!d||d.kind!=="array"||typeof d.N=="number"&&d.N!==0||(u=d),new Xr(u,s)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Ei{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}const qa={string:ft,number:Ve,boolean:ut,object:Wr};class Kr{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let s,u=1;const d=t[0];if(d==="array"){let m,v;if(t.length>2){const S=t[1];if(typeof S!="string"||!(S in qa)||S==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);m=qa[S],u++}else m=It;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return r.error('The length argument to "array" must be a positive integer literal',2);v=t[2],u++}s=$(m,v)}else{if(!qa[d])throw new Error(`Types doesn't contain name = ${d}`);s=qa[d]}const p=[];for(;u<t.length;u++){const m=r.parse(t[u],u,It);if(!m)return null;p.push(m)}return new Kr(s,p)}evaluate(t){for(let r=0;r<this.args.length;r++){const s=this.args[r].evaluate(t);if(!J(this.type,Ri(s)))return s;if(r===this.args.length-1)throw new Ei(`Expected value to be of type ${O(this.type)}, but found ${O(Ri(s))} instead.`)}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Qo={"to-boolean":ut,"to-color":Wi,"to-number":Ve,"to-string":ft};class Yr{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const s=t[0];if(!Qo[s])throw new Error(`Can't parse ${s} as it is not part of the known types`);if((s==="to-boolean"||s==="to-string")&&t.length!==2)return r.error("Expected one argument.");const u=Qo[s],d=[];for(let p=1;p<t.length;p++){const m=r.parse(t[p],p,It);if(!m)return null;d.push(m)}return new Yr(u,d)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let r,s;for(const u of this.args){if(r=u.evaluate(t),s=null,r instanceof ii)return r;if(typeof r=="string"){const d=t.parseColor(r);if(d)return d}else if(Array.isArray(r)&&(s=r.length<3||r.length>4?`Invalid rbga value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:ks(r[0],r[1],r[2],r[3]),!s))return new ii(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new Ei(s||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"padding":{let r;for(const s of this.args){r=s.evaluate(t);const u=Cr.parse(r);if(u)return u}throw new Ei(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"variableAnchorOffsetCollection":{let r;for(const s of this.args){r=s.evaluate(t);const u=Fr.parse(r);if(u)return u}throw new Ei(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"number":{let r=null;for(const s of this.args){if(r=s.evaluate(t),r===null)return 0;const u=Number(r);if(!isNaN(u))return u}throw new Ei(`Could not convert ${JSON.stringify(r)} to number.`)}case"formatted":return zr.fromString(pa(this.args[0].evaluate(t)));case"resolvedImage":return Ar.fromString(pa(this.args[0].evaluate(t)));default:return pa(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Zc=["Unknown","Point","LineString","Polygon"];class Za{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"?Zc[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let r=this._parseColorCache[t];return r||(r=this._parseColorCache[t]=ii.parse(t)),r}}class Kn{constructor(t,r,s=[],u,d=new Fi,p=[]){this.registry=t,this.path=s,this.key=s.map(m=>`[${m}]`).join(""),this.scope=d,this.errors=p,this.expectedType=u,this._isConstant=r}parse(t,r,s,u,d={}){return r?this.concat(r,s,u)._parse(t,d):this._parse(t,d)}_parse(t,r){function s(u,d,p){return p==="assert"?new Kr(d,[u]):p==="coerce"?new Yr(d,[u]):u}if(t!==null&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"||(t=["literal",t]),Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const u=t[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;const d=this.registry[u];if(d){let p=d.parse(t,this);if(!p)return null;if(this.expectedType){const m=this.expectedType,v=p.type;if(m.kind!=="string"&&m.kind!=="number"&&m.kind!=="boolean"&&m.kind!=="object"&&m.kind!=="array"||v.kind!=="value")if(m.kind!=="color"&&m.kind!=="formatted"&&m.kind!=="resolvedImage"||v.kind!=="value"&&v.kind!=="string")if(m.kind!=="padding"||v.kind!=="value"&&v.kind!=="number"&&v.kind!=="array")if(m.kind!=="variableAnchorOffsetCollection"||v.kind!=="value"&&v.kind!=="array"){if(this.checkSubtype(m,v))return null}else p=s(p,m,r.typeAnnotation||"coerce");else p=s(p,m,r.typeAnnotation||"coerce");else p=s(p,m,r.typeAnnotation||"coerce");else p=s(p,m,r.typeAnnotation||"assert")}if(!(p instanceof Xr)&&p.type.kind!=="resolvedImage"&&this._isConstant(p)){const m=new Za;try{p=new Xr(p.type,p.evaluate(m))}catch(v){return this.error(v.message),null}}return p}return this.error(`Unknown expression "${u}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(t===void 0?"'undefined' value invalid. Use null instead.":typeof t=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,r,s){const u=typeof t=="number"?this.path.concat(t):this.path,d=s?this.scope.concat(s):this.scope;return new Kn(this.registry,this._isConstant,u,r||null,d,this.errors)}error(t,...r){const s=`${this.key}${r.map(u=>`[${u}]`).join("")}`;this.errors.push(new ni(s,t))}checkSubtype(t,r){const s=J(t,r);return s&&this.error(s),s}}class Ln{constructor(t,r){this.type=r.type,this.bindings=[].concat(t),this.result=r}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const r of this.bindings)t(r[1]);t(this.result)}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const s=[];for(let d=1;d<t.length-1;d+=2){const p=t[d];if(typeof p!="string")return r.error(`Expected string, but found ${typeof p} instead.`,d);if(/[^a-zA-Z0-9_]/.test(p))return r.error("Variable names must contain only alphanumeric characters or '_'.",d);const m=r.parse(t[d+1],d+1);if(!m)return null;s.push([p,m])}const u=r.parse(t[t.length-1],t.length-1,r.expectedType,s);return u?new Ln(s,u):null}outputDefined(){return this.result.outputDefined()}}class Yt{constructor(t,r){this.type=r.type,this.name=t,this.boundExpression=r}static parse(t,r){if(t.length!==2||typeof t[1]!="string")return r.error("'var' expression requires exactly one string literal argument.");const s=t[1];return r.scope.has(s)?new Yt(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(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class el{constructor(t,r,s){this.type=t,this.index=r,this.input=s}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const s=r.parse(t[1],1,Ve),u=r.parse(t[2],2,$(r.expectedType||It));return s&&u?new el(u.type.itemType,s,u):null}evaluate(t){const r=this.index.evaluate(t),s=this.input.evaluate(t);if(r<0)throw new Ei(`Array index out of bounds: ${r} < 0.`);if(r>=s.length)throw new Ei(`Array index out of bounds: ${r} > ${s.length-1}.`);if(r!==Math.floor(r))throw new Ei(`Array index must be an integer, but found ${r} instead.`);return s[r]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class tl{constructor(t,r){this.type=ut,this.needle=t,this.haystack=r}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const s=r.parse(t[1],1,It),u=r.parse(t[2],2,It);return s&&u?he(s.type,[ut,ft,Ve,ar,It])?new tl(s,u):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${O(s.type)} instead`):null}evaluate(t){const r=this.needle.evaluate(t),s=this.haystack.evaluate(t);if(!s)return!1;if(!_e(r,["boolean","string","number","null"]))throw new Ei(`Expected first argument to be of type boolean, string, number or null, but found ${O(Ri(r))} instead.`);if(!_e(s,["string","array"]))throw new Ei(`Expected second argument to be of type array or string, but found ${O(Ri(s))} instead.`);return s.indexOf(r)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class Ss{constructor(t,r,s){this.type=Ve,this.needle=t,this.haystack=r,this.fromIndex=s}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const s=r.parse(t[1],1,It),u=r.parse(t[2],2,It);if(!s||!u)return null;if(!he(s.type,[ut,ft,Ve,ar,It]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${O(s.type)} instead`);if(t.length===4){const d=r.parse(t[3],3,Ve);return d?new Ss(s,u,d):null}return new Ss(s,u)}evaluate(t){const r=this.needle.evaluate(t),s=this.haystack.evaluate(t);if(!_e(r,["boolean","string","number","null"]))throw new Ei(`Expected first argument to be of type boolean, string, number or null, but found ${O(Ri(r))} instead.`);let u;if(this.fromIndex&&(u=this.fromIndex.evaluate(t)),_e(s,["string"])){const d=s.indexOf(r,u);return d===-1?-1:[...s.slice(0,d)].length}if(_e(s,["array"]))return s.indexOf(r,u);throw new Ei(`Expected second argument to be of type array or string, but found ${O(Ri(s))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class il{constructor(t,r,s,u,d,p){this.inputType=t,this.type=r,this.input=s,this.cases=u,this.outputs=d,this.otherwise=p}static parse(t,r){if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");let s,u;r.expectedType&&r.expectedType.kind!=="value"&&(u=r.expectedType);const d={},p=[];for(let S=2;S<t.length-1;S+=2){let z=t[S];const E=t[S+1];Array.isArray(z)||(z=[z]);const R=r.concat(S);if(z.length===0)return R.error("Expected at least one branch label.");for(const N of z){if(typeof N!="number"&&typeof N!="string")return R.error("Branch labels must be numbers or strings.");if(typeof N=="number"&&Math.abs(N)>Number.MAX_SAFE_INTEGER)return R.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof N=="number"&&Math.floor(N)!==N)return R.error("Numeric branch labels must be integer values.");if(s){if(R.checkSubtype(s,Ri(N)))return null}else s=Ri(N);if(d[String(N)]!==void 0)return R.error("Branch labels must be unique.");d[String(N)]=p.length}const j=r.parse(E,S,u);if(!j)return null;u=u||j.type,p.push(j)}const m=r.parse(t[1],1,It);if(!m)return null;const v=r.parse(t[t.length-1],t.length-1,u);return v?m.type.kind!=="value"&&r.concat(1).checkSubtype(s,m.type)?null:new il(s,u,m,d,p,v):null}evaluate(t){const r=this.input.evaluate(t);return(Ri(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}}class Ha{constructor(t,r,s){this.type=t,this.branches=r,this.otherwise=s}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");let s;r.expectedType&&r.expectedType.kind!=="value"&&(s=r.expectedType);const u=[];for(let p=1;p<t.length-1;p+=2){const m=r.parse(t[p],p,ut);if(!m)return null;const v=r.parse(t[p+1],p+1,s);if(!v)return null;u.push([m,v]),s=s||v.type}const d=r.parse(t[t.length-1],t.length-1,s);if(!d)return null;if(!s)throw new Error("Can't infer output type");return new Ha(s,u,d)}evaluate(t){for(const[r,s]of this.branches)if(r.evaluate(t))return s.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[r,s]of this.branches)t(r),t(s);t(this.otherwise)}outputDefined(){return this.branches.every(([t,r])=>r.outputDefined())&&this.otherwise.outputDefined()}}class fa{constructor(t,r,s,u){this.type=t,this.input=r,this.beginIndex=s,this.endIndex=u}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const s=r.parse(t[1],1,It),u=r.parse(t[2],2,Ve);if(!s||!u)return null;if(!he(s.type,[$(It),ft,It]))return r.error(`Expected first argument to be of type array or string, but found ${O(s.type)} instead`);if(t.length===4){const d=r.parse(t[3],3,Ve);return d?new fa(s.type,s,u,d):null}return new fa(s.type,s,u)}evaluate(t){const r=this.input.evaluate(t),s=this.beginIndex.evaluate(t);let u;if(this.endIndex&&(u=this.endIndex.evaluate(t)),_e(r,["string"]))return[...r].slice(s,u).join("");if(_e(r,["array"]))return r.slice(s,u);throw new Ei(`Expected first argument to be of type array or string, but found ${O(Ri(r))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function Wa(i,t){const r=i.length-1;let s,u,d=0,p=r,m=0;for(;d<=p;)if(m=Math.floor((d+p)/2),s=i[m],u=i[m+1],s<=t){if(m===r||t<u)return m;d=m+1}else{if(!(s>t))throw new Ei("Input is not a number.");p=m-1}return 0}class Ts{constructor(t,r,s){this.type=t,this.input=r,this.labels=[],this.outputs=[];for(const[u,d]of s)this.labels.push(u),this.outputs.push(d)}static parse(t,r){if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");const s=r.parse(t[1],1,Ve);if(!s)return null;const u=[];let d=null;r.expectedType&&r.expectedType.kind!=="value"&&(d=r.expectedType);for(let p=1;p<t.length;p+=2){const m=p===1?-1/0:t[p],v=t[p+1],S=p,z=p+1;if(typeof m!="number")return r.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',S);if(u.length&&u[u.length-1][0]>=m)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',S);const E=r.parse(v,z,d);if(!E)return null;d=d||E.type,u.push([m,E])}return new Ts(d,s,u)}evaluate(t){const r=this.labels,s=this.outputs;if(r.length===1)return s[0].evaluate(t);const u=this.input.evaluate(t);if(u<=r[0])return s[0].evaluate(t);const d=r.length;return u>=r[d-1]?s[d-1].evaluate(t):s[Wa(r,u)].evaluate(t)}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function fu(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Hc=mu;function mu(i,t,r,s){this.cx=3*i,this.bx=3*(r-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(s-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=t,this.p2x=r,this.p2y=s}mu.prototype={sampleCurveX:function(i){return((this.ax*i+this.bx)*i+this.cx)*i},sampleCurveY:function(i){return((this.ay*i+this.by)*i+this.cy)*i},sampleCurveDerivativeX:function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},solveCurveX:function(i,t){if(t===void 0&&(t=1e-6),i<0)return 0;if(i>1)return 1;for(var r=i,s=0;s<8;s++){var u=this.sampleCurveX(r)-i;if(Math.abs(u)<t)return r;var d=this.sampleCurveDerivativeX(r);if(Math.abs(d)<1e-6)break;r-=u/d}var p=0,m=1;for(r=i,s=0;s<20&&(u=this.sampleCurveX(r),!(Math.abs(u-i)<t));s++)i>u?p=r:m=r,r=.5*(m-p)+p;return r}
11,solve:function(i,t){return this.sampleCurveY(this.solveCurveX(i,t))}};var Wc=fu(Hc);function Yn(i,t,r){return i+r*(t-i)}function ma(i,t,r){return i.map((s,u)=>Yn(s,t[u],r))}const fr={number:Yn,color:function(i,t,r,s="rgb"){switch(s){case"rgb":{const[u,d,p,m]=ma(i.rgb,t.rgb,r);return new ii(u,d,p,m,!1)}case"hcl":{const[u,d,p,m]=i.hcl,[v,S,z,E]=t.hcl;let R,j;if(isNaN(u)||isNaN(v))isNaN(u)?isNaN(v)?R=NaN:(R=v,p!==1&&p!==0||(j=S)):(R=u,z!==1&&z!==0||(j=d));else{let ke=v-u;v>u&&ke>180?ke-=360:v<u&&u-v>180&&(ke+=360),R=u+r*ke}const[N,q,K,ie]=function([ke,ce,xe,Pe]){return ke=isNaN(ke)?0:ke*vt,Ti([xe,Math.cos(ke)*ce,Math.sin(ke)*ce,Pe])}([R,j??Yn(d,S,r),Yn(p,z,r),Yn(m,E,r)]);return new ii(N,q,K,ie,!1)}case"lab":{const[u,d,p,m]=Ti(ma(i.lab,t.lab,r));return new ii(u,d,p,m,!1)}}},array:ma,padding:function(i,t,r){return new Cr(ma(i.values,t.values,r))},variableAnchorOffsetCollection:function(i,t,r){const s=i.values,u=t.values;if(s.length!==u.length)throw new Ei(`Cannot interpolate values of different length. from: ${i.toString()}, to: ${t.toString()}`);const d=[];for(let p=0;p<s.length;p+=2){if(s[p]!==u[p])throw new Ei(`Cannot interpolate values containing mismatched anchors. from[${p}]: ${s[p]}, to[${p}]: ${u[p]}`);d.push(s[p]);const[m,v]=s[p+1],[S,z]=u[p+1];d.push([Yn(m,S,r),Yn(v,z,r)])}return new Fr(d)}};class mr{constructor(t,r,s,u,d){this.type=t,this.operator=r,this.interpolation=s,this.input=u,this.labels=[],this.outputs=[];for(const[p,m]of d)this.labels.push(p),this.outputs.push(m)}static interpolationFactor(t,r,s,u){let d=0;if(t.name==="exponential")d=Xa(r,t.base,s,u);else if(t.name==="linear")d=Xa(r,1,s,u);else if(t.name==="cubic-bezier"){const p=t.controlPoints;d=new Wc(p[0],p[1],p[2],p[3]).solve(Xa(r,1,s,u))}return d}static parse(t,r){let[s,u,d,...p]=t;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"){const S=u[1];if(typeof S!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);u={name:"exponential",base:S}}else{if(u[0]!=="cubic-bezier")return r.error(`Unknown interpolation type ${String(u[0])}`,1,0);{const S=u.slice(1);if(S.length!==4||S.some(z=>typeof z!="number"||z<0||z>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);u={name:"cubic-bezier",controlPoints:S}}}if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(d=r.parse(d,2,Ve),!d)return null;const m=[];let v=null;s==="interpolate-hcl"||s==="interpolate-lab"?v=Wi:r.expectedType&&r.expectedType.kind!=="value"&&(v=r.expectedType);for(let S=0;S<p.length;S+=2){const z=p[S],E=p[S+1],R=S+3,j=S+4;if(typeof z!="number")return r.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',R);if(m.length&&m[m.length-1][0]>=z)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',R);const N=r.parse(E,j,v);if(!N)return null;v=v||N.type,m.push([z,N])}return we(v,Ve)||we(v,Wi)||we(v,Dn)||we(v,te)||we(v,$(Ve))?new mr(v,s,u,d,m):r.error(`Type ${O(v)} is not interpolatable.`)}evaluate(t){const r=this.labels,s=this.outputs;if(r.length===1)return s[0].evaluate(t);const u=this.input.evaluate(t);if(u<=r[0])return s[0].evaluate(t);const d=r.length;if(u>=r[d-1])return s[d-1].evaluate(t);const p=Wa(r,u),m=mr.interpolationFactor(this.interpolation,u,r[p],r[p+1]),v=s[p].evaluate(t),S=s[p+1].evaluate(t);switch(this.operator){case"interpolate":return fr[this.type.kind](v,S,m);case"interpolate-hcl":return fr.color(v,S,m,"hcl");case"interpolate-lab":return fr.color(v,S,m,"lab")}}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Xa(i,t,r,s){const u=s-r,d=i-r;return u===0?0:t===1?d/u:(Math.pow(t,d)-1)/(Math.pow(t,u)-1)}class Ka{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expectected at least one argument.");let s=null;const u=r.expectedType;u&&u.kind!=="value"&&(s=u);const d=[];for(const m of t.slice(1)){const v=r.parse(m,1+d.length,s,void 0,{typeAnnotation:"omit"});if(!v)return null;s=s||v.type,d.push(v)}if(!s)throw new Error("No output type");const p=u&&d.some(m=>J(u,m.type));return new Ka(p?It:s,d)}evaluate(t){let r,s=null,u=0;for(const d of this.args)if(u++,s=d.evaluate(t),s&&s instanceof Ar&&!s.available&&(r||(r=s.name),s=null,u===this.args.length&&(s=r)),s!==null)break;return s}
11eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}function Ya(i,t){return i==="=="||i==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function gu(i,t,r,s){return s.compare(t,r)===0}function zs(i,t,r){const s=i!=="=="&&i!=="!=";return class dg{constructor(d,p,m){this.type=ut,this.lhs=d,this.rhs=p,this.collator=m,this.hasUntypedArgument=d.type.kind==="value"||p.type.kind==="value"}static parse(d,p){if(d.length!==3&&d.length!==4)return p.error("Expected two or three arguments.");const m=d[0];let v=p.parse(d[1],1,It);if(!v)return null;if(!Ya(m,v.type))return p.concat(1).error(`"${m}" comparisons are not supported for type '${O(v.type)}'.`);let S=p.parse(d[2],2,It);if(!S)return null;if(!Ya(m,S.type))return p.concat(2).error(`"${m}" comparisons are not supported for type '${O(S.type)}'.`);if(v.type.kind!==S.type.kind&&v.type.kind!=="value"&&S.type.kind!=="value")return p.error(`Cannot compare types '${O(v.type)}' and '${O(S.type)}'.`);s&&(v.type.kind==="value"&&S.type.kind!=="value"?v=new Kr(S.type,[v]):v.type.kind!=="value"&&S.type.kind==="value"&&(S=new Kr(v.type,[S])));let z=null;if(d.length===4){if(v.type.kind!=="string"&&S.type.kind!=="string"&&v.type.kind!=="value"&&S.type.kind!=="value")return p.error("Cannot use collator to compare non-string types.");if(z=p.parse(d[3],3,pn),!z)return null}return new dg(v,S,z)}evaluate(d){const p=this.lhs.evaluate(d),m=this.rhs.evaluate(d);if(s&&this.hasUntypedArgument){const v=Ri(p),S=Ri(m);if(v.kind!==S.kind||v.kind!=="string"&&v.kind!=="number")throw new Ei(`Expected arguments for "${i}" to be (string, string) or (number, number), but found (${v.kind}, ${S.kind}) instead.`)}if(this.collator&&!s&&this.hasUntypedArgument){const v=Ri(p),S=Ri(m);if(v.kind!=="string"||S.kind!=="string")return t(d,p,m)}return this.collator?r(d,p,m,this.collator.evaluate(d)):t(d,p,m)}eachChild(d){d(this.lhs),d(this.rhs),this.collator&&d(this.collator)}outputDefined(){return!0}}}const Xc=zs("==",function(i,t,r){return t===r},gu),_u=zs("!=",function(i,t,r){return t!==r},function(i,t,r,s){return!gu(0,t,r,s)}),yu=zs("<",function(i,t,r){return t<r},function(i,t,r,s){return s.compare(t,r)<0}),Kc=zs(">",function(i,t,r){return t>r},function(i,t,r,s){return s.compare(t,r)>0}),Yc=zs("<=",function(i,t,r){return t<=r},function(i,t,r,s){return s.compare(t,r)<=0}),vu=zs(">=",function(i,t,r){return t>=r},function(i,t,r,s){return s.compare(t,r)>=0});class ga{constructor(t,r,s){this.type=pn,this.locale=s,this.caseSensitive=t,this.diacriticSensitive=r}static parse(t,r){if(t.length!==2)return r.error("Expected one argument.");const s=t[1];if(typeof s!="object"||Array.isArray(s))return r.error("Collator options argument must be an object.");const u=r.parse(s["case-sensitive"]!==void 0&&s["case-sensitive"],1,ut);if(!u)return null;const d=r.parse(s["diacritic-sensitive"]!==void 0&&s["diacritic-sensitive"],1,ut);if(!d)return null;let p=null;return s.locale&&(p=r.parse(s.locale,1,ft),!p)?null:new ga(u,d,p)}evaluate(t){return new Yo(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class rl{constructor(t,r,s,u,d){this.type=ft,this.number=t,this.locale=r,this.currency=s,this.minFractionDigits=u,this.maxFractionDigits=d}static parse(t,r){if(t.length!==3)return r.error("Expected two arguments.");const s=r.parse(t[1],1,Ve);if(!s)return null;const u=t[2];if(typeof u!="object"||Array.isArray(u))return r.error("NumberFormat options argument must be an object.");let d=null;if(u.locale&&(d=r.parse(u.locale,1,ft),!d))return null;let p=null;if(u.currency&&(p=r.parse(u.currency,1,ft),!p))return null;let m=null;if(u["min-fraction-digits"]&&(m=r.parse(u["min-fraction-digits"],1,Ve),!m))return null;let v=null;return u["max-fraction-digits"]&&(v=r.parse(u["max-fraction-digits"],1,Ve),!v)?null:new rl(s,d,p,m,v)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class Ja{constructor(t){this.type=Sn,this.sections=t}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const s=t[1];if(!Array.isArray(s)&&typeof s=="object")return r.error("First argument must be an image or text section.");const u=[];let d=!1;for(let p=1;p<=t.length-1;++p){const m=t[p];if(d&&typeof m=="object"&&!Array.isArray(m)){d=!1;let v=null;if(m["font-scale"]&&(v=r.parse(m["font-scale"],1,Ve),!v))return null;let S=null;if(m["text-font"]&&(S=r.parse(m["text-font"],1,$(ft)),!S))return null;let z=null;if(m["text-color"]&&(z=r.parse(m["text-color"],1,Wi),!z))return null;const E=u[u.length-1];E.scale=v,E.font=S,E.textColor=z}else{const v=r.parse(t[p],1,It);if(!v)return null;const S=v.type.kind;
vendor: 14,984 bytes, line 11
11if(S!=="string"&&S!=="value"&&S!=="null"&&S!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");d=!0,u.push({content:v,scale:null,font:null,textColor:null})}}return new Ja(u)}evaluate(t){return new zr(this.sections.map(r=>{const s=r.content.evaluate(t);return Ri(s)===fn?new Jo("",s,null,null,null):new Jo(pa(s),null,r.scale?r.scale.evaluate(t):null,r.font?r.font.evaluate(t).join(","):null,r.textColor?r.textColor.evaluate(t):null)}))}eachChild(t){for(const r of this.sections)t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor)}outputDefined(){return!1}}class nl{constructor(t){this.type=fn,this.input=t}static parse(t,r){if(t.length!==2)return r.error("Expected two arguments.");const s=r.parse(t[1],1,ft);return s?new nl(s):r.error("No image name provided.")}evaluate(t){const r=this.input.evaluate(t),s=Ar.fromString(r);return s&&t.availableImages&&(s.available=t.availableImages.indexOf(r)>-1),s}eachChild(t){t(this.input)}outputDefined(){return!1}}class sl{constructor(t){this.type=Ve,this.input=t}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);const s=r.parse(t[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 ${O(s.type)} instead.`):new sl(s):null}evaluate(t){const r=this.input.evaluate(t);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new Ei(`Expected value to be of type string or array, but found ${O(Ri(r))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const mn=8192;function Jc(i,t){const r=(180+i[0])/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i[1]*Math.PI/360)))/360,u=Math.pow(2,t.z);return[Math.round(r*u*mn),Math.round(s*u*mn)]}function al(i,t){const r=Math.pow(2,t.z);return[(u=(i[0]/mn+t.x)/r,360*u-180),(s=(i[1]/mn+t.y)/r,360/Math.PI*Math.atan(Math.exp((180-360*s)*Math.PI/180))-90)];var s,u}function Jn(i,t){i[0]=Math.min(i[0],t[0]),i[1]=Math.min(i[1],t[1]),i[2]=Math.max(i[2],t[0]),i[3]=Math.max(i[3],t[1])}function Rn(i,t){return!(i[0]<=t[0]||i[2]>=t[2]||i[1]<=t[1]||i[3]>=t[3])}function Jt(i,t,r){const s=i[0]-t[0],u=i[1]-t[1],d=i[0]-r[0],p=i[1]-r[1];return s*p-d*u==0&&s*d<=0&&u*p<=0}function Qa(i,t,r,s){return(u=[s[0]-r[0],s[1]-r[1]])[0]*(d=[t[0]-i[0],t[1]-i[1]])[1]-u[1]*d[0]!=0&&!(!bu(i,t,r,s)||!bu(r,s,i,t));var u,d}function Qc(i,t,r){for(const s of r)for(let u=0;u<s.length-1;++u)if(Qa(i,t,s[u],s[u+1]))return!0;return!1}function Cs(i,t,r=!1){let s=!1;for(const m of t)for(let v=0;v<m.length-1;v++){if(Jt(i,m[v],m[v+1]))return r;(d=m[v])[1]>(u=i)[1]!=(p=m[v+1])[1]>u[1]&&u[0]<(p[0]-d[0])*(u[1]-d[1])/(p[1]-d[1])+d[0]&&(s=!s)}var u,d,p;return s}function eh(i,t){for(const r of t)if(Cs(i,r))return!0;return!1}function xu(i,t){for(const r of i)if(!Cs(r,t))return!1;for(let r=0;r<i.length-1;++r)if(Qc(i[r],i[r+1],t))return!1;return!0}function th(i,t){for(const r of t)if(xu(i,r))return!0;return!1}function bu(i,t,r,s){const u=s[0]-r[0],d=s[1]-r[1],p=(i[0]-r[0])*d-u*(i[1]-r[1]),m=(t[0]-r[0])*d-u*(t[1]-r[1]);return p>0&&m<0||p<0&&m>0}function ol(i,t,r){const s=[];for(let u=0;u<i.length;u++){const d=[];for(let p=0;p<i[u].length;p++){const m=Jc(i[u][p],r);Jn(t,m),d.push(m)}s.push(d)}return s}function wu(i,t,r){const s=[];for(let u=0;u<i.length;u++){const d=ol(i[u],t,r);s.push(d)}return s}function ku(i,t,r,s){if(i[0]<r[0]||i[0]>r[2]){const u=.5*s;let d=i[0]-r[0]>u?-s:r[0]-i[0]>u?s:0;d===0&&(d=i[0]-r[2]>u?-s:r[2]-i[0]>u?s:0),i[0]+=d}Jn(t,i)}function Su(i,t,r,s){const u=Math.pow(2,s.z)*mn,d=[s.x*mn,s.y*mn],p=[];for(const m of i)for(const v of m){const S=[v.x+d[0],v.y+d[1]];ku(S,t,r,u),p.push(S)}return p}function Tu(i,t,r,s){const u=Math.pow(2,s.z)*mn,d=[s.x*mn,s.y*mn],p=[];for(const v of i){const S=[];for(const z of v){const E=[z.x+d[0],z.y+d[1]];Jn(t,E),S.push(E)}p.push(S)}if(t[2]-t[0]<=u/2){(m=t)[0]=m[1]=1/0,m[2]=m[3]=-1/0;for(const v of p)for(const S of v)ku(S,t,r,u)}var m;return p}class Qn{constructor(t,r){this.type=ut,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Xn(t[1])){const s=t[1];if(s.type==="FeatureCollection"){const u=[];for(const d of s.features){const{type:p,coordinates:m}=d.geometry;p==="Polygon"&&u.push(m),p==="MultiPolygon"&&u.push(...m)}if(u.length)return new Qn(s,{type:"MultiPolygon",coordinates:u})}else if(s.type==="Feature"){const u=s.geometry.type;if(u==="Polygon"||u==="MultiPolygon")return new Qn(s,s.geometry)}else if(s.type==="Polygon"||s.type==="MultiPolygon")return new Qn(s,s)}return r.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(r,s){const u=[1/0,1/0,-1/0,-1/0],d=[1/0,1/0,-1/0,-1/0],p=r.canonicalID();if(s.type==="Polygon"){const m=ol(s.coordinates,d,p),v=Su(r.geometry(),u,d,p);if(!Rn(u,d))return!1;for(const S of v)if(!Cs(S,m))return!1}if(s.type==="MultiPolygon"){const m=wu(s.coordinates,d,p),v=Su(r.geometry(),u,d,p);if(!Rn(u,d))return!1;for(const S of v)if(!eh(S,m))return!1}return!0}(t,this.geometries);if(t.geometryType()==="LineString")return function(r,s){const u=[1/0,1/0,-1/0,-1/0],d=[1/0,1/0,-1/0,-1/0],p=r.canonicalID();if(s.type==="Polygon"){const m=ol(s.coordinates,d,p),v=Tu(r.geometry(),u,d,p);if(!Rn(u,d))return!1;for(const S of v)if(!xu(S,m))return!1}if(s.type==="MultiPolygon"){const m=wu(s.coordinates,d,p),v=Tu(r.geometry(),u,d,p);if(!Rn(u,d))return!1;for(const S of v)if(!th(S,m))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let zu=class{constructor(i=[],t=(r,s)=>r<s?-1:r>s?1:0){if(this.data=i,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(i){this.data.push(i),this._up(this.length++)}pop(){if(this.length===0)return;const i=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),i}peek(){return this.data[0]}_up(i){const{data:t,compare:r}=this,s=t[i];for(;i>0;){const u=i-1>>1,d=t[u];if(r(s,d)>=0)break;t[i]=d,i=u}t[i]=s}_down(i){const{data:t,compare:r}=this,s=this.length>>1,u=t[i];for(;i<s;){let d=1+(i<<1);const p=d+1;if(p<this.length&&r(t[p],t[d])<0&&(d=p),r(t[d],u)>=0)break;t[i]=t[d],i=d}t[i]=u}};function ih(i,t,r,s,u){Cu(i,t,r,s||i.length-1,u||rh)}function Cu(i,t,r,s,u){for(;s>r;){if(s-r>600){var d=s-r+1,p=t-r+1,m=Math.log(d),v=.5*Math.exp(2*m/3),S=.5*Math.sqrt(m*v*(d-v)/d)*(p-d/2<0?-1:1);Cu(i,t,Math.max(r,Math.floor(t-p*v/d+S)),Math.min(s,Math.floor(t+(d-p)*v/d+S)),u)}var z=i[t],E=r,R=s;for(_a(i,r,t),u(i[s],z)>0&&_a(i,r,s);E<R;){for(_a(i,E,R),E++,R--;u(i[E],z)<0;)E++;for(;u(i[R],z)>0;)R--}u(i[r],z)===0?_a(i,r,R):_a(i,++R,s),R<=t&&(r=R+1),t<=R&&(s=R-1)}}function _a(i,t,r){var s=i[t];i[t]=i[r],i[r]=s}function rh(i,t){return i<t?-1:i>t?1:0}function eo(i,t){if(i.length<=1)return[i];const r=[];let s,u;for(const d of i){const p=sh(d);p!==0&&(d.area=Math.abs(p),u===void 0&&(u=p<0),u===p<0?(s&&r.push(s),s=[d]):s.push(d))}if(s&&r.push(s),t>1)for(let d=0;d<r.length;d++)r[d].length<=t||(ih(r[d],t,1,r[d].length-1,nh),r[d]=r[d].slice(0,t));return r}function nh(i,t){return t.area-i.area}function sh(i){let t=0;for(let r,s,u=0,d=i.length,p=d-1;u<d;p=u++)r=i[u],s=i[p],t+=(s.x-r.x)*(r.y+s.y);return t}const Au=1/298.257223563,Pu=Au*(2-Au),Iu=Math.PI/180;class ll{constructor(t){const r=6378.137*Iu*1e3,s=Math.cos(t*Iu),u=1/(1-Pu*(1-s*s)),d=Math.sqrt(u);this.kx=r*d*s,this.ky=r*d*u*(1-Pu)}distance(t,r){const s=this.wrap(t[0]-r[0])*this.kx,u=(t[1]-r[1])*this.ky;return Math.sqrt(s*s+u*u)}pointOnLine(t,r){let s,u,d,p,m=1/0;for(let v=0;v<t.length-1;v++){let S=t[v][0],z=t[v][1],E=this.wrap(t[v+1][0]-S)*this.kx,R=(t[v+1][1]-z)*this.ky,j=0;E===0&&R===0||(j=(this.wrap(r[0]-S)*this.kx*E+(r[1]-z)*this.ky*R)/(E*E+R*R),j>1?(S=t[v+1][0],z=t[v+1][1]):j>0&&(S+=E/this.kx*j,z+=R/this.ky*j)),E=this.wrap(r[0]-S)*this.kx,R=(r[1]-z)*this.ky;const N=E*E+R*R;N<m&&(m=N,s=S,u=z,d=v,p=j)}return{point:[s,u],index:d,t:Math.max(0,Math.min(1,p))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}function Eu(i,t){return t[0]-i[0]}function to(i){return i[1]-i[0]+1}function Tn(i,t){return i[1]>=i[0]&&i[1]<t}function ul(i,t){if(i[0]>i[1])return[null,null];const r=to(i);if(t){if(r===2)return[i,null];const u=Math.floor(r/2);return[[i[0],i[0]+u],[i[0]+u,i[1]]]}if(r===1)return[i,null];const s=Math.floor(r/2)-1;return[[i[0],i[0]+s],[i[0]+s+1,i[1]]]}function cl(i,t){if(!Tn(t,i.length))return[1/0,1/0,-1/0,-1/0];const r=[1/0,1/0,-1/0,-1/0];for(let s=t[0];s<=t[1];++s)Jn(r,i[s]);return r}function hl(i){const t=[1/0,1/0,-1/0,-1/0];for(const r of i)for(const s of r)Jn(t,s);return t}function io(i){return i[0]!==-1/0&&i[1]!==-1/0&&i[2]!==1/0&&i[3]!==1/0}function dl(i,t,r){if(!io(i)||!io(t))return NaN;let s=0,u=0;return i[2]<t[0]&&(s=t[0]-i[2]),i[0]>t[2]&&(s=i[0]-t[2]),i[1]>t[3]&&(u=i[1]-t[3]),i[3]<t[1]&&(u=t[1]-i[3]),r.distance([0,0],[s,u])}function es(i,t,r){const s=r.pointOnLine(t,i);return r.distance(i,s.point)}function pl(i,t,r,s,u){const d=Math.min(es(i,[r,s],u),es(t,[r,s],u)),p=Math.min(es(r,[i,t],u),es(s,[i,t],u));return Math.min(d,p)}function ah(i,t,r,s,u){if(!Tn(t,i.length)||!Tn(s,r.length))return 1/0;let d=1/0;for(let p=t[0];p<t[1];++p){const m=i[p],v=i[p+1];for(let S=s[0];S<s[1];++S){const z=r[S],E=r[S+1];if(Qa(m,v,z,E))return 0;d=Math.min(d,pl(m,v,z,E,u))}}return d}function Ai(i,t,r,s,u){if(!Tn(t,i.length)||!Tn(s,r.length))return NaN;let d=1/0;for(let p=t[0];p<=t[1];++p)for(let m=s[0];m<=s[1];++m)if(d=Math.min(d,u.distance(i[p],r[m])),d===0)return d;return d}function oh(i,t,r){if(Cs(i,t,!0))return 0;let s=1/0;for(const u of t){const d=u[0],p=u[u.length-1];if(d!==p&&(s=Math.min(s,es(i,[p,d],r)),s===0))return s;const m=r.pointOnLine(u,i);if(s=Math.min(s,r.distance(i,m.point)),s===0)return s}return s}function Bt(i,t,r,s){if(!Tn(t,i.length))return NaN;for(let d=t[0];d<=t[1];++d)if(Cs(i[d],r,!0))return 0;let u=1/0;for(let d=t[0];d<t[1];++d){const p=i[d],m=i[d+1];for(const v of r)for(let S=0,z=v.length,E=z-1;S<z;E=S++){const R=v[E],j=v[S];if(Qa(p,m,R,j))return 0;u=Math.min(u,pl(p,m,R,j,s))}}return u}function ro(i,t){for(const r of i)for(const s of r)if(Cs(s,t,!0))return!0;return!1}function di(i,t,r,s=1/0){const u=hl(i),d=hl(t);if(s!==1/0&&dl(u,d,r)>=s)return s;if(Rn(u,d)){if(ro(i,t))return 0}else if(ro(t,i))return 0;let p=1/0;for(const m of i)for(let v=0,S=m.length,z=S-1;v<S;z=v++){const E=m[z],R=m[v];for(const j of t)for(let N=0,q=j.length,K=q-1;N<q;K=N++){const ie=j[K],ke=j[N];if(Qa(E,R,ie,ke))return 0;p=Math.min(p,pl(E,R,ie,ke,r))}}return p}function si(i,t,r,s,u,d){if(!d)return;const p=dl(cl(s,d),u,r);p<t&&i.push([p,d,[0,0]])}function ts(i,t,r,s,u,d,p){if(!d||!p)return;const m=dl(cl(s,d),cl(u,p),r);m<t&&i.push([m,d,p])}function ya(i,t,r,s,u=1/0){let d=Math.min(s.distance(i[0],r[0][0]),u);if(d===0)return d;const p=new zu([[0,[0,i.length-1],[0,0]]],Eu),m=hl(r);for(;p.length>0;){const v=p.pop();if(v[0]>=d)continue;const S=v[1],z=t?50:100;if(to(S)<=z){if(!Tn(S,i.length))return NaN;if(t){const E=Bt(i,S,r,s);if(isNaN(E)||E===0)return E;d=Math.min(d,E)}else for(let E=S[0];E<=S[1];++E){const R=oh(i[E],r,s);if(d=Math.min(d,R),d===0)return 0}}else{const E=ul(S,t);si(p,d,s,i,m,E[0]),si(p,d,s,i,m,E[1])}}return d}function va(i,t,r,s,u,d=1/0){let p=Math.min(d,u.distance(i[0],r[0]));if(p===0)return p;const m=new zu([[0,[0,i.length-1],[0,r.length-1]]],Eu);for(;m.length>0;){const v=m.pop();if(v[0]>=p)continue;const S=v[1],z=v[2],E=t?50:100,R=s?50:100;if(to(S)<=E&&to(z)<=R){if(!Tn(S,i.length)&&Tn(z,r.length))return NaN;let j;if(t&&s)j=ah(i,S,r,z,u),p=Math.min(p,j);else if(t&&!s){const N=i.slice(S[0],S[1]+1);for(let q=z[0];q<=z[1];++q)if(j=es(r[q],N,u),p=Math.min(p,j),p===0)return p}else if(!t&&s){const N=r.slice(z[0],z[1]+1);for(let q=S[0];q<=S[1];++q)if(j=es(i[q],N,u),p=Math.min(p,j),p===0)return p}else j=Ai(i,S,r,z,u),p=Math.min(p,j)}else{const j=ul(S,t),N=ul(z,s);ts(m,p,u,i,r,j[0],N[0]),ts(m,p,u,i,r,j[0],N[1]),ts(m,p,u,i,r,j[1],N[0]),ts(m,p,u,i,r,j[1],N[1])}}return p}function fl(i){return i.type==="MultiPolygon"?i.coordinates.map(t=>({type:"Polygon",coordinates:t})):i.type==="MultiLineString"?i.coordinates.map(t=>({type:"LineString",coordinates:t})):i.type==="MultiPoint"?i.coordinates.map(t=>({type:"Point",coordinates:t})):[i]}class is{constructor(t,r){this.type=Ve,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Xn(t[1])){const s=t[1];if(s.type==="FeatureCollection")return new is(s,s.features.map(u=>fl(u.geometry)).flat());if(s.type==="Feature")return new is(s,fl(s.geometry));if("type"in s&&"coordinates"in s)return new is(s,fl(s))}return r.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(r,s){const u=r.geometry(),d=u.flat().map(v=>al([v.x,v.y],r.canonical));if(u.length===0)return NaN;const p=new ll(d[0][1]);let m=1/0;for(const v of s){switch(v.type){case"Point":m=Math.min(m,va(d,!1,[v.coordinates],!1,p,m));break;case"LineString":m=Math.min(m,va(d,!1,v.coordinates,!0,p,m));break;case"Polygon":m=Math.min(m,ya(d,!1,v.coordinates,p,m))}if(m===0)return m}return m}(t,this.geometries);if(t.geometryType()==="LineString")return function(r,s){const u=r.geometry(),d=u.flat().map(v=>al([v.x,v.y],r.canonical));if(u.length===0)return NaN;const p=new ll(d[0][1]);let m=1/0;for(const v of s){switch(v.type){case"Point":m=Math.min(m,va(d,!0,[v.coordinates],!1,p,m));break;case"LineString":m=Math.min(m,va(d,!0,v.coordinates,!0,p,m));break;case"Polygon":m=Math.min(m,ya(d,!0,v.coordinates,p,m))}if(m===0)return m}return m}(t,this.geometries);if(t.geometryType()==="Polygon")return function(r,s){const u=r.geometry();if(u.length===0||u[0].length===0)return NaN;const d=eo(u,0).map(v=>v.map(S=>S.map(z=>al([z.x,z.y],r.canonical)))),p=new ll(d[0][0][0][1]);let m=1/0;for(const v of s)for(const S of d){switch(v.type){case"Point":m=Math.min(m,ya([v.coordinates],!1,S,p,m));break;case"LineString":m=Math.min(m,ya(v.coordinates,!0,S,p,m));break;case"Polygon":m=Math.min(m,di(S,v.coordinates,p,m))}if(m===0)return m}return m}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const As={"==":Xc,"!=":_u,">":Kc,"<":yu,">=":vu,"<=":Yc,array:Kr,at:el,boolean:Kr,case:Ha,coalesce:Ka,collator:ga,format:Ja,image:nl,in:tl,"index-of":Ss,interpolate:mr,"interpolate-hcl":mr,"interpolate-lab":mr,length:sl,let:Ln,literal:Xr,match:il,number:Kr,"number-format":rl,object:Kr,slice:fa,step:Ts,string:Kr,"to-boolean":Yr,"to-color":Yr,"to-number":Yr,"to-string":Yr,var:Yt,within:Qn,distance:is};class Or{constructor(t,r,s,u){this.name=t,this.type=r,this._evaluate=s,this.args=u}evaluate(t){return this._evaluate(t,this.args)}
11eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,r){const s=t[0],u=Or.definitions[s];if(!u)return r.error(`Unknown expression "${s}". If you wanted a literal array, use ["literal", [...]].`,0);const d=Array.isArray(u)?u[0]:u.type,p=Array.isArray(u)?[[u[1],u[2]]]:u.overloads,m=p.filter(([S])=>!Array.isArray(S)||S.length===t.length-1);let v=null;for(const[S,z]of m){v=new Kn(r.registry,xa,r.path,null,r.scope);const E=[];let R=!1;for(let j=1;j<t.length;j++){const N=t[j],q=Array.isArray(S)?S[j-1]:S.type,K=v.parse(N,1+E.length,q);if(!K){R=!0;break}E.push(K)}if(!R)if(Array.isArray(S)&&S.length!==E.length)v.error(`Expected ${S.length} arguments, but found ${E.length} instead.`);else{for(let j=0;j<E.length;j++){const N=Array.isArray(S)?S[j]:S.type,q=E[j];v.concat(j+1).checkSubtype(N,q.type)}if(v.errors.length===0)return new Or(s,d,z,E)}}if(m.length===1)r.errors.push(...v.errors);else{const S=(m.length?m:p).map(([E])=>{return R=E,Array.isArray(R)?`(${R.map(O).join(", ")})`:`(${O(R.type)}...)`;var R}).join(" | "),z=[];for(let E=1;E<t.length;E++){const R=r.parse(t[E],1+z.length);if(!R)return null;z.push(O(R.type))}r.error(`Expected arguments of type ${S}, but found (${z.join(", ")}) instead.`)}return null}static register(t,r){Or.definitions=r;for(const s in r)t[s]=Or}}function ml(i,[t,r,s,u]){t=t.evaluate(i),r=r.evaluate(i),s=s.evaluate(i);const d=u?u.evaluate(i):1,p=ks(t,r,s,d);if(p)throw new Ei(p);return new ii(t/255,r/255,s/255,d,!1)}function gl(i,t){return i in t}function _l(i,t){const r=t[i];return r===void 0?null:r}function rs(i){return{type:i}}function xa(i){if(i instanceof Yt)return xa(i.boundExpression);if(i instanceof Or&&i.name==="error"||i instanceof ga||i instanceof Qn||i instanceof is)return!1;const t=i instanceof Yr||i instanceof Kr;let r=!0;return i.eachChild(s=>{r=t?r&&xa(s):r&&s instanceof Xr}),!!r&&ba(i)&&wa(i,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function ba(i){if(i instanceof Or&&(i.name==="get"&&i.args.length===1||i.name==="feature-state"||i.name==="has"&&i.args.length===1||i.name==="properties"||i.name==="geometry-type"||i.name==="id"||/^filter-/.test(i.name))||i instanceof Qn||i instanceof is)return!1;let t=!0;return i.eachChild(r=>{t&&!ba(r)&&(t=!1)}),t}function Ps(i){if(i instanceof Or&&i.name==="feature-state")return!1;let t=!0;return i.eachChild(r=>{t&&!Ps(r)&&(t=!1)}),t}function wa(i,t){if(i instanceof Or&&t.indexOf(i.name)>=0)return!1;let r=!0;return i.eachChild(s=>{r&&!wa(s,t)&&(r=!1)}),r}function no(i){return{result:"success",value:i}}function Is(i){return{result:"error",value:i}}function Es(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function Mu(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function yl(i){return!!i.expression&&i.expression.interpolated}function Xt(i){return i instanceof Number?"number":i instanceof String?"string":i instanceof Boolean?"boolean":Array.isArray(i)?"array":i===null?"null":typeof i}function so(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function lh(i){return i}function Du(i,t){const r=t.type==="color",s=i.stops&&typeof i.stops[0][0]=="object",u=s||!(s||i.property!==void 0),d=i.type||(yl(t)?"exponential":"interval");if(r||t.type==="padding"){const z=r?ii.parse:Cr.parse;(i=Si({},i)).stops&&(i.stops=i.stops.map(E=>[E[0],z(E[1])])),i.default=z(i.default?i.default:t.default)}if(i.colorSpace&&(p=i.colorSpace)!=="rgb"&&p!=="hcl"&&p!=="lab")throw new Error(`Unknown color space: "${i.colorSpace}"`);var p;let m,v,S;if(d==="exponential")m=Ru;else if(d==="interval")m=ao;else if(d==="categorical"){m=Lu,v=Object.create(null);for(const z of i.stops)v[z[0]]=z[1];S=typeof i.stops[0][0]}else{if(d!=="identity")throw new Error(`Unknown function type "${d}"`);m=Bu}if(s){const z={},E=[];for(let N=0;N<i.stops.length;N++){const q=i.stops[N],K=q[0].zoom;z[K]===void 0&&(z[K]={zoom:K,type:i.type,property:i.property,default:i.default,stops:[]},E.push(K)),z[K].stops.push([q[0].value,q[1]])}const R=[];
vendor: 15,074 bytes, line 11
11for(const N of E)R.push([z[N].zoom,Du(z[N],t)]);const j={name:"linear"};return{kind:"composite",interpolationType:j,interpolationFactor:mr.interpolationFactor.bind(void 0,j),zoomStops:R.map(N=>N[0]),evaluate:({zoom:N},q)=>Ru({stops:R,base:i.base},t,N).evaluate(N,q)}}if(u){const z=d==="exponential"?{name:"exponential",base:i.base!==void 0?i.base:1}:null;return{kind:"camera",interpolationType:z,interpolationFactor:mr.interpolationFactor.bind(void 0,z),zoomStops:i.stops.map(E=>E[0]),evaluate:({zoom:E})=>m(i,t,E,v,S)}}return{kind:"source",evaluate(z,E){const R=E&&E.properties?E.properties[i.property]:void 0;return R===void 0?Ms(i.default,t.default):m(i,t,R,v,S)}}}function Ms(i,t,r){return i!==void 0?i:t!==void 0?t:r!==void 0?r:void 0}function Lu(i,t,r,s,u){return Ms(typeof r===u?s[r]:void 0,i.default,t.default)}function ao(i,t,r){if(Xt(r)!=="number")return Ms(i.default,t.default);const s=i.stops.length;if(s===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[s-1][0])return i.stops[s-1][1];const u=Wa(i.stops.map(d=>d[0]),r);return i.stops[u][1]}function Ru(i,t,r){const s=i.base!==void 0?i.base:1;if(Xt(r)!=="number")return Ms(i.default,t.default);const u=i.stops.length;if(u===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[u-1][0])return i.stops[u-1][1];const d=Wa(i.stops.map(z=>z[0]),r),p=function(z,E,R,j){const N=j-R,q=z-R;return N===0?0:E===1?q/N:(Math.pow(E,q)-1)/(Math.pow(E,N)-1)}(r,s,i.stops[d][0],i.stops[d+1][0]),m=i.stops[d][1],v=i.stops[d+1][1],S=fr[t.type]||lh;return typeof m.evaluate=="function"?{evaluate(...z){const E=m.evaluate.apply(void 0,z),R=v.evaluate.apply(void 0,z);if(E!==void 0&&R!==void 0)return S(E,R,p,i.colorSpace)}}:S(m,v,p,i.colorSpace)}function Bu(i,t,r){switch(t.type){case"color":r=ii.parse(r);break;case"formatted":r=zr.fromString(r.toString());break;case"resolvedImage":r=Ar.fromString(r.toString());break;case"padding":r=Cr.parse(r);break;default:Xt(r)===t.type||t.type==="enum"&&t.values[r]||(r=void 0)}return Ms(r,i.default,t.default)}Or.register(As,{error:[{kind:"error"},[ft],(i,[t])=>{throw new Ei(t.evaluate(i))}],typeof:[ft,[It],(i,[t])=>O(Ri(t.evaluate(i)))],"to-rgba":[$(Ve,4),[Wi],(i,[t])=>{const[r,s,u,d]=t.evaluate(i).rgb;return[255*r,255*s,255*u,d]}],rgb:[Wi,[Ve,Ve,Ve],ml],rgba:[Wi,[Ve,Ve,Ve,Ve],ml],has:{type:ut,overloads:[[[ft],(i,[t])=>gl(t.evaluate(i),i.properties())],[[ft,Wr],(i,[t,r])=>gl(t.evaluate(i),r.evaluate(i))]]},get:{type:It,overloads:[[[ft],(i,[t])=>_l(t.evaluate(i),i.properties())],[[ft,Wr],(i,[t,r])=>_l(t.evaluate(i),r.evaluate(i))]]},"feature-state":[It,[ft],(i,[t])=>_l(t.evaluate(i),i.featureState||{})],properties:[Wr,[],i=>i.properties()],"geometry-type":[ft,[],i=>i.geometryType()],id:[It,[],i=>i.id()],zoom:[Ve,[],i=>i.globals.zoom],"heatmap-density":[Ve,[],i=>i.globals.heatmapDensity||0],"line-progress":[Ve,[],i=>i.globals.lineProgress||0],accumulated:[It,[],i=>i.globals.accumulated===void 0?null:i.globals.accumulated],"+":[Ve,rs(Ve),(i,t)=>{let r=0;for(const s of t)r+=s.evaluate(i);return r}],"*":[Ve,rs(Ve),(i,t)=>{let r=1;for(const s of t)r*=s.evaluate(i);return r}],"-":{type:Ve,overloads:[[[Ve,Ve],(i,[t,r])=>t.evaluate(i)-r.evaluate(i)],[[Ve],(i,[t])=>-t.evaluate(i)]]},"/":[Ve,[Ve,Ve],(i,[t,r])=>t.evaluate(i)/r.evaluate(i)],"%":[Ve,[Ve,Ve],(i,[t,r])=>t.evaluate(i)%r.evaluate(i)],ln2:[Ve,[],()=>Math.LN2],pi:[Ve,[],()=>Math.PI],e:[Ve,[],()=>Math.E],"^":[Ve,[Ve,Ve],(i,[t,r])=>Math.pow(t.evaluate(i),r.evaluate(i))],sqrt:[Ve,[Ve],(i,[t])=>Math.sqrt(t.evaluate(i))],log10:[Ve,[Ve],(i,[t])=>Math.log(t.evaluate(i))/Math.LN10],ln:[Ve,[Ve],(i,[t])=>Math.log(t.evaluate(i))],log2:[Ve,[Ve],(i,[t])=>Math.log(t.evaluate(i))/Math.LN2],sin:[Ve,[Ve],(i,[t])=>Math.sin(t.evaluate(i))],cos:[Ve,[Ve],(i,[t])=>Math.cos(t.evaluate(i))],tan:[Ve,[Ve],(i,[t])=>Math.tan(t.evaluate(i))],asin:[Ve,[Ve],(i,[t])=>Math.asin(t.evaluate(i))],acos:[Ve,[Ve],(i,[t])=>Math.acos(t.evaluate(i))],atan:[Ve,[Ve],(i,[t])=>Math.atan(t.evaluate(i))],min:[Ve,rs(Ve),(i,t)=>Math.min(...t.map(r=>r.evaluate(i)))],max:[Ve,rs(Ve),(i,t)=>Math.max(...t.map(r=>r.evaluate(i)))],abs:[Ve,[Ve],(i,[t])=>Math.abs(t.evaluate(i))],round:[Ve,[Ve],(i,[t])=>{const r=t.evaluate(i);return r<0?-Math.round(-r):Math.round(r)}],floor:[Ve,[Ve],(i,[t])=>Math.floor(t.evaluate(i))],ceil:[Ve,[Ve],(i,[t])=>Math.ceil(t.evaluate(i))],"filter-==":[ut,[ft,It],(i,[t,r])=>i.properties()[t.value]===r.value],"filter-id-==":[ut,[It],(i,[t])=>i.id()===t.value],"filter-type-==":[ut,[ft],(i,[t])=>i.geometryType()===t.value],"filter-<":[ut,[ft,It],(i,[t,r])=>{const s=i.properties()[t.value],u=r.value;return typeof s==typeof u&&s<u}],"filter-id-<":[ut,[It],(i,[t])=>{const r=i.id(),s=t.value;return typeof r==typeof s&&r<s}],"filter->":[ut,[ft,It],(i,[t,r])=>{const s=i.properties()[t.value],u=r.value;return typeof s==typeof u&&s>u}],"filter-id->":[ut,[It],(i,[t])=>{const r=i.id(),s=t.value;return typeof r==typeof s&&r>s}],"filter-<=":[ut,[ft,It],(i,[t,r])=>{const s=i.properties()[t.value],u=r.value;return typeof s==typeof u&&s<=u}],"filter-id-<=":[ut,[It],(i,[t])=>{const r=i.id(),s=t.value;return typeof r==typeof s&&r<=s}],"filter->=":[ut,[ft,It],(i,[t,r])=>{const s=i.properties()[t.value],u=r.value;return typeof s==typeof u&&s>=u}],"filter-id->=":[ut,[It],(i,[t])=>{const r=i.id(),s=t.value;return typeof r==typeof s&&r>=s}],"filter-has":[ut,[It],(i,[t])=>t.value in i.properties()],"filter-has-id":[ut,[],i=>i.id()!==null&&i.id()!==void 0],"filter-type-in":[ut,[$(ft)],(i,[t])=>t.value.indexOf(i.geometryType())>=0],"filter-id-in":[ut,[$(It)],(i,[t])=>t.value.indexOf(i.id())>=0],"filter-in-small":[ut,[ft,$(It)],(i,[t,r])=>r.value.indexOf(i.properties()[t.value])>=0],"filter-in-large":[ut,[ft,$(It)],(i,[t,r])=>function(s,u,d,p){for(;d<=p;){const m=d+p>>1;if(u[m]===s)return!0;u[m]>s?p=m-1:d=m+1}return!1}(i.properties()[t.value],r.value,0,r.value.length-1)],all:{type:ut,overloads:[[[ut,ut],(i,[t,r])=>t.evaluate(i)&&r.evaluate(i)],[rs(ut),(i,t)=>{for(const r of t)if(!r.evaluate(i))return!1;return!0}]]},any:{type:ut,overloads:[[[ut,ut],(i,[t,r])=>t.evaluate(i)||r.evaluate(i)],[rs(ut),(i,t)=>{for(const r of t)if(r.evaluate(i))return!0;return!1}]]},"!":[ut,[ut],(i,[t])=>!t.evaluate(i)],"is-supported-script":[ut,[ft],(i,[t])=>{const r=i.globals&&i.globals.isSupportedScript;return!r||r(t.evaluate(i))}],upcase:[ft,[ft],(i,[t])=>t.evaluate(i).toUpperCase()],downcase:[ft,[ft],(i,[t])=>t.evaluate(i).toLowerCase()],concat:[ft,rs(It),(i,t)=>t.map(r=>pa(r.evaluate(i))).join("")],"resolved-locale":[ft,[pn],(i,[t])=>t.evaluate(i).resolvedLocale()]});class oo{constructor(t,r){var s;this.expression=t,this._warningHistory={},this._evaluator=new Za,this._defaultValue=r?(s=r).type==="color"&&so(s.default)?new ii(0,0,0,0):s.type==="color"?ii.parse(s.default)||null:s.type==="padding"?Cr.parse(s.default)||null:s.type==="variableAnchorOffsetCollection"?Fr.parse(s.default)||null:s.default===void 0?null:s.default:null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(t,r,s,u,d,p){return this._evaluator.globals=t,this._evaluator.feature=r,this._evaluator.featureState=s,this._evaluator.canonical=u,this._evaluator.availableImages=d||null,this._evaluator.formattedSection=p,this.expression.evaluate(this._evaluator)}evaluate(t,r,s,u,d,p){this._evaluator.globals=t,this._evaluator.feature=r||null,this._evaluator.featureState=s||null,this._evaluator.canonical=u,this._evaluator.availableImages=d||null,this._evaluator.formattedSection=p||null;try{const m=this.expression.evaluate(this._evaluator);if(m==null||typeof m=="number"&&m!=m)return this._defaultValue;if(this._enumValues&&!(m in this._enumValues))throw new Ei(`Expected value to be one of ${Object.keys(this._enumValues).map(v=>JSON.stringify(v)).join(", ")}, but found ${JSON.stringify(m)} instead.`);return m}catch(m){return this._warningHistory[m.message]||(this._warningHistory[m.message]=!0,typeof console<"u"&&console.warn(m.message)),this._defaultValue}}}function lo(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in As}function Ds(i,t){const r=new Kn(As,xa,[],t?function(u){const d={color:Wi,string:ft,number:Ve,enum:ft,boolean:ut,formatted:Sn,padding:Dn,resolvedImage:fn,variableAnchorOffsetCollection:te};return u.type==="array"?$(d[u.value]||It,u.length):d[u.type]}(t):void 0),s=r.parse(i,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return s?no(new oo(s,t)):Is(r.errors)}class Ls{constructor(t,r){this.kind=t,this._styleExpression=r,this.isStateDependent=t!=="constant"&&!Ps(r.expression)}evaluateWithoutErrorHandling(t,r,s,u,d,p){return this._styleExpression.evaluateWithoutErrorHandling(t,r,s,u,d,p)}evaluate(t,r,s,u,d,p){return this._styleExpression.evaluate(t,r,s,u,d,p)}}class Rs{constructor(t,r,s,u){this.kind=t,this.zoomStops=s,this._styleExpression=r,this.isStateDependent=t!=="camera"&&!Ps(r.expression),this.interpolationType=u}evaluateWithoutErrorHandling(t,r,s,u,d,p){return this._styleExpression.evaluateWithoutErrorHandling(t,r,s,u,d,p)}evaluate(t,r,s,u,d,p){return this._styleExpression.evaluate(t,r,s,u,d,p)}interpolationFactor(t,r,s){return this.interpolationType?mr.interpolationFactor(this.interpolationType,t,r,s):0}}function vl(i,t){const r=Ds(i,t);if(r.result==="error")return r;const s=r.value.expression,u=ba(s);if(!u&&!Es(t))return Is([new ni("","data expressions not supported")]);const d=wa(s,["zoom"]);if(!d&&!Mu(t))return Is([new ni("","zoom expressions not supported")]);const p=ka(s);return p||d?p instanceof ni?Is([p]):p instanceof mr&&!yl(t)?Is([new ni("",'"interpolate" expressions cannot be used with this property')]):no(p?new Rs(u?"camera":"composite",r.value,p.labels,p instanceof mr?p.interpolation:void 0):new Ls(u?"constant":"source",r.value)):Is([new ni("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Bs{constructor(t,r){this._parameters=t,this._specification=r,Si(this,Du(this._parameters,this._specification))}static deserialize(t){return new Bs(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function ka(i){let t=null;if(i instanceof Ln)t=ka(i.result);else if(i instanceof Ka){for(const r of i.args)if(t=ka(r),t)break}else(i instanceof Ts||i instanceof mr)&&i.input instanceof Or&&i.input.name==="zoom"&&(t=i);return t instanceof ni||i.eachChild(r=>{const s=ka(r);s instanceof ni?t=s:!t&&s?t=new ni("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&s&&t!==s&&(t=new ni("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function uo(i){if(i===!0||i===!1)return!0;if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(const t of i.slice(1))if(!uo(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const co={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function xl(i){if(i==null)return{filter:()=>!0,needGeometry:!1};uo(i)||(i=ho(i));const t=Ds(i,co);if(t.result==="error")throw new Error(t.value.map(r=>`${r.key}: ${r.message}`).join(", "));return{filter:(r,s,u)=>t.value.evaluate(r,s,{},u),needGeometry:Fu(i)}}function uh(i,t){return i<t?-1:i>t?1:0}function Fu(i){if(!Array.isArray(i))return!1;if(i[0]==="within"||i[0]==="distance")return!0;for(let t=1;t<i.length;t++)if(Fu(i[t]))return!0;return!1}function ho(i){if(!i)return!0;const t=i[0];return i.length<=1?t!=="any":t==="=="?bl(i[1],i[2],"=="):t==="!="?Xi(bl(i[1],i[2],"==")):t==="<"||t===">"||t==="<="||t===">="?bl(i[1],i[2],t):t==="any"?(r=i.slice(1),["any"].concat(r.map(ho))):t==="all"?["all"].concat(i.slice(1).map(ho)):t==="none"?["all"].concat(i.slice(1).map(ho).map(Xi)):t==="in"?Sa(i[1],i.slice(2)):t==="!in"?Xi(Sa(i[1],i.slice(2))):t==="has"?Ta(i[1]):t!=="!has"||Xi(Ta(i[1]));var r}function bl(i,t,r){switch(i){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,i,t]}}function Sa(i,t){if(t.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(r=>typeof r!=typeof t[0])?["filter-in-large",i,["literal",t.sort(uh)]]:["filter-in-small",i,["literal",t]]}}function Ta(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function Xi(i){return["!",i]}function ns(i){const t=typeof i;if(t==="number"||t==="boolean"||t==="string"||i==null)return JSON.stringify(i);if(Array.isArray(i)){let u="[";for(const d of i)u+=`${ns(d)},`;return`${u}]`}const r=Object.keys(i).sort();let s="{";for(let u=0;u<r.length;u++)s+=`${JSON.stringify(r[u])}:${ns(i[r[u]])},`;return`${s}}`}function Ou(i){let t="";for(const r of dn)t+=`/${ns(i[r])}`;return t}function $u(i){const t=i.value;return t?[new Be(i.key,t,"constants have been deprecated as of v8")]:[]}function Pi(i){return i instanceof Number||i instanceof String||i instanceof Boolean?i.valueOf():i}function Jr(i){if(Array.isArray(i))return i.map(Jr);if(i instanceof Object&&!(i instanceof Number||i instanceof String||i instanceof Boolean)){const t={};for(const r in i)t[r]=Jr(i[r]);return t}return Pi(i)}function Pr(i){const t=i.key,r=i.value,s=i.valueSpec||{},u=i.objectElementValidators||{},d=i.style,p=i.styleSpec,m=i.validateSpec;let v=[];const S=Xt(r);if(S!=="object")return[new Be(t,r,`object expected, ${S} found`)];for(const z in r){const E=z.split(".")[0],R=s[E]||s["*"];let j;if(u[E])j=u[E];else if(s[E])j=m;else if(u["*"])j=u["*"];else{if(!s["*"]){v.push(new Be(t,r[z],`unknown property "${z}"`));continue}j=m}v=v.concat(j({key:(t&&`${t}.`)+z,value:r[z],valueSpec:R,style:d,styleSpec:p,object:r,objectKey:z,validateSpec:m},r))}for(const z in s)u[z]||s[z].required&&s[z].default===void 0&&r[z]===void 0&&v.push(new Be(t,r,`missing required property "${z}"`));return v}function za(i){const t=i.value,r=i.valueSpec,s=i.style,u=i.styleSpec,d=i.key,p=i.arrayElementValidator||i.validateSpec;if(Xt(t)!=="array")return[new Be(d,t,`array expected, ${Xt(t)} found`)];if(r.length&&t.length!==r.length)return[new Be(d,t,`array length ${r.length} expected, length ${t.length} found`)];if(r["min-length"]&&t.length<r["min-length"])return[new Be(d,t,`array length at least ${r["min-length"]} expected, length ${t.length} found`)];let m={type:r.value,values:r.values};u.$version<7&&(m.function=r.function),Xt(r.value)==="object"&&(m=r.value);let v=[];for(let S=0;S<t.length;S++)v=v.concat(p({array:t,arrayIndex:S,value:t[S],valueSpec:m,validateSpec:i.validateSpec,style:s,styleSpec:u,key:`${d}[${S}]`}));return v}function wl(i){const t=i.key,r=i.value,s=i.valueSpec;let u=Xt(r);return u==="number"&&r!=r&&(u="NaN"),u!=="number"?[new Be(t,r,`number expected, ${u}
11 found`)]:"minimum"in s&&r<s.minimum?[new Be(t,r,`${r} is less than the minimum value ${s.minimum}`)]:"maximum"in s&&r>s.maximum?[new Be(t,r,`${r} is greater than the maximum value ${s.maximum}`)]:[]}function po(i){const t=i.valueSpec,r=Pi(i.value.type);let s,u,d,p={};const m=r!=="categorical"&&i.value.property===void 0,v=!m,S=Xt(i.value.stops)==="array"&&Xt(i.value.stops[0])==="array"&&Xt(i.value.stops[0][0])==="object",z=Pr({key:i.key,value:i.value,valueSpec:i.styleSpec.function,validateSpec:i.validateSpec,style:i.style,styleSpec:i.styleSpec,objectElementValidators:{stops:function(j){if(r==="identity")return[new Be(j.key,j.value,'identity function may not have a "stops" property')];let N=[];const q=j.value;return N=N.concat(za({key:j.key,value:q,valueSpec:j.valueSpec,validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec,arrayElementValidator:E})),Xt(q)==="array"&&q.length===0&&N.push(new Be(j.key,q,"array must have at least one stop")),N},default:function(j){return j.validateSpec({key:j.key,value:j.value,valueSpec:t,validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec})}}});return r==="identity"&&m&&z.push(new Be(i.key,i.value,'missing required property "property"')),r==="identity"||i.value.stops||z.push(new Be(i.key,i.value,'missing required property "stops"')),r==="exponential"&&i.valueSpec.expression&&!yl(i.valueSpec)&&z.push(new Be(i.key,i.value,"exponential functions not supported")),i.styleSpec.$version>=8&&(v&&!Es(i.valueSpec)?z.push(new Be(i.key,i.value,"property functions not supported")):m&&!Mu(i.valueSpec)&&z.push(new Be(i.key,i.value,"zoom functions not supported"))),r!=="categorical"&&!S||i.value.property!==void 0||z.push(new Be(i.key,i.value,'"property" property is required')),z;function E(j){let N=[];const q=j.value,K=j.key;if(Xt(q)!=="array")return[new Be(K,q,`array expected, ${Xt(q)} found`)];if(q.length!==2)return[new Be(K,q,`array length 2 expected, length ${q.length} found`)];if(S){if(Xt(q[0])!=="object")return[new Be(K,q,`object expected, ${Xt(q[0])} found`)];if(q[0].zoom===void 0)return[new Be(K,q,"object stop key must have zoom")];if(q[0].value===void 0)return[new Be(K,q,"object stop key must have value")];if(d&&d>Pi(q[0].zoom))return[new Be(K,q[0].zoom,"stop zoom values must appear in ascending order")];Pi(q[0].zoom)!==d&&(d=Pi(q[0].zoom),u=void 0,p={}),N=N.concat(Pr({key:`${K}[0]`,value:q[0],valueSpec:{zoom:{}},validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec,objectElementValidators:{zoom:wl,value:R}}))}else N=N.concat(R({key:`${K}[0]`,value:q[0],validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec},q));return lo(Jr(q[1]))?N.concat([new Be(`${K}[1]`,q[1],"expressions are not allowed in function stops.")]):N.concat(j.validateSpec({key:`${K}[1]`,value:q[1],valueSpec:t,validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec}))}function R(j,N){const q=Xt(j.value),K=Pi(j.value),ie=j.value!==null?j.value:N;if(s){if(q!==s)return[new Be(j.key,ie,`${q} stop domain type must match previous stop domain type ${s}`)]}else s=q;if(q!=="number"&&q!=="string"&&q!=="boolean")return[new Be(j.key,ie,"stop domain value must be a number, string, or boolean")];if(q!=="number"&&r!=="categorical"){let ke=`number expected, ${q} found`;return Es(t)&&r===void 0&&(ke+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Be(j.key,ie,ke)]}return r!=="categorical"||q!=="number"||isFinite(K)&&Math.floor(K)===K?r!=="categorical"&&q==="number"&&u!==void 0&&K<u?[new Be(j.key,ie,"stop domain values must appear in ascending order")]:(u=K,r==="categorical"&&K in p?[new Be(j.key,ie,"stop domain values must be unique")]:(p[K]=!0,[])):[new Be(j.key,ie,`integer expected, found ${K}`)]}}function Fs(i){const t=(i.expressionContext==="property"?vl:Ds)(Jr(i.value),i.valueSpec);if(t.result==="error")return t.value.map(s=>new Be(`${i.key}${s.key}`,i.value,s.message));const r=t.value.expression||t.value._styleExpression.expression;if(i.expressionContext==="property"&&i.propertyKey==="text-font"&&!r.outputDefined())return[new Be(i.key,i.value,`Invalid data expression for "${i.propertyKey}". Output values must be contained as literals within the expression.`)];if(i.expressionContext==="property"&&i.propertyType==="layout"&&!Ps(r))return[new Be(i.key,i.value,'"feature-state" data expressions are not supported with layout properties.')];if(i.expressionContext==="filter"&&!Ps(r))return[new Be(i.key,i.value,'"feature-state" data expressions are not supported with filters.')];if(i.expressionContext&&i.expressionContext.indexOf("cluster")===0){if(!wa(r,["zoom","feature-state"]))return[new Be(i.key,i.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(i.expressionContext==="cluster-initial"&&!ba(r))return[new Be(i.key,i.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function zn(i){const t=i.key,r=i.value,s=i.valueSpec,u=[];return Array.isArray(s.values)?s.values.indexOf(Pi(r))===-1&&u.push(new Be(t,r,`expected one of [${s.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(s.values).indexOf(Pi(r))===-1&&u.push(new Be(t,r,`expected one of [${Object.keys(s.values).join(", ")}], ${JSON.stringify(r)} found`)),u}function kl(i){return uo(Jr(i.value))?Fs(Si({},i,{expressionContext:"filter",valueSpec:{value:"boolean"}})):fo(i)}function fo(i){const t=i.value,r=i.key;if(Xt(t)!=="array")return[new Be(r,t,`array expected, ${Xt(t)} found`)];const s=i.styleSpec;let u,d=[];if(t.length<1)return[new Be(r,t,"filter array must have at least 1 element")];switch(d=d.concat(zn({key:`${r}[0]`,value:t[0],valueSpec:s.filter_operator,style:i.style,styleSpec:i.styleSpec})),Pi(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Pi(t[1])==="$type"&&d.push(new Be(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&d.push(new Be(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(u=Xt(t[1]),u!=="string"&&d.push(new Be(`${r}[1]`,t[1],`string expected, ${u}
11 found`)));for(let p=2;p<t.length;p++)u=Xt(t[p]),Pi(t[1])==="$type"?d=d.concat(zn({key:`${r}[${p}]`,value:t[p],valueSpec:s.geometry_type,style:i.style,styleSpec:i.styleSpec})):u!=="string"&&u!=="number"&&u!=="boolean"&&d.push(new Be(`${r}[${p}]`,t[p],`string, number, or boolean expected, ${u} found`));break;case"any":case"all":case"none":for(let p=1;p<t.length;p++)d=d.concat(fo({key:`${r}[${p}]`,value:t[p],style:i.style,styleSpec:i.styleSpec}));break;case"has":case"!has":u=Xt(t[1]),t.length!==2?d.push(new Be(r,t,`filter array for "${t[0]}" operator must have 2 elements`)):u!=="string"&&d.push(new Be(`${r}[1]`,t[1],`string expected, ${u} found`))}return d}function Sl(i,t){const r=i.key,s=i.validateSpec,u=i.style,d=i.styleSpec,p=i.value,m=i.objectKey,v=d[`${t}_${i.layerType}`];if(!v)return[];const S=m.match(/^(.*)-transition$/);if(t==="paint"&&S&&v[S[1]]&&v[S[1]].transition)return s({key:r,value:p,valueSpec:d.transition,style:u,styleSpec:d});const z=i.valueSpec||v[m];if(!z)return[new Be(r,p,`unknown property "${m}"`)];let E;if(Xt(p)==="string"&&Es(z)&&!z.tokens&&(E=/^{([^}]+)}$/.exec(p)))return[new Be(r,p,`"${m}" does not support interpolation syntax 12Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(E[1])} }\`.`)];const R=[];return i.layerType==="symbol"&&(m==="text-field"&&u&&!u.glyphs&&R.push(new Be(r,p,'use of "text-field" requires a style "glyphs" property')),m==="text-font"&&so(Jr(p))&&Pi(p.type)==="identity"&&R.push(new Be(r,p,'"text-font" does not support identity functions'))),R.concat(s({key:i.key,value:p,valueSpec:z,style:u,styleSpec:d,expressionContext:"property",propertyType:t,propertyKey:m}))}function mo(i){return Sl(i,"paint")}function Tl(i){return Sl(i,"layout")}function zl(i){let t=[];const r=i.value,s=i.key,u=i.style,d=i.styleSpec;r.type||r.ref||t.push(new Be(s,r,'either "type" or "ref" is required'));let p=Pi(r.type);const m=Pi(r.ref);if(r.id){const v=Pi(r.id);for(let S=0;S<i.arrayIndex;S++){const z=u.layers[S];Pi(z.id)===v&&t.push(new Be(s,r.id,`duplicate layer id "${r.id}", previously used at line ${z.id.__line__}`))}}if("ref"in r){let v;["type","source","source-layer","filter","layout"].forEach(S=>{S in r&&t.push(new Be(s,r[S],`"${S}" is prohibited for ref layers`))}),u.layers.forEach(S=>{Pi(S.id)===m&&(v=S)}),v?v.ref?t.push(new Be(s,r.ref,"ref cannot reference another ref layer")):p=Pi(v.type):t.push(new Be(s,r.ref,`ref layer "${m}" not found`))}else if(p!=="background")if(r.source){const v=u.sources&&u.sources[r.source],S=v&&Pi(v.type);v?S==="vector"&&p==="raster"?t.push(new Be(s,r.source,`layer "${r.id}" requires a raster source`)):S!=="raster-dem"&&p==="hillshade"?t.push(new Be(s,r.source,`layer "${r.id}" requires a raster-dem source`)):S==="raster"&&p!=="raster"?t.push(new Be(s,r.source,`layer "${r.id}" requires a vector source`)):S!=="vector"||r["source-layer"]?S==="raster-dem"&&p!=="hillshade"?t.push(new Be(s,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):p!=="line"||!r.paint||!r.paint["line-gradient"]||S==="geojson"&&v.lineMetrics||t.push(new Be(s,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new Be(s,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new Be(s,r.source,`source "${r.source}" not found`))}else t.push(new Be(s,r,'missing required property "source"'));return t=t.concat(Pr({key:s,value:r,valueSpec:d.layer,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,objectElementValidators:{"*":()=>[],type:()=>i.validateSpec({key:`${s}.type`,value:r.type,valueSpec:d.layer.type,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,object:r,objectKey:"type"}),filter:kl,layout:v=>Pr({layer:r,key:v.key,value:v.value,style:v.style,styleSpec:v.styleSpec,validateSpec:v.validateSpec,objectElementValidators:{"*":S=>Tl(Si({layerType:p},S))}}),paint:v=>Pr({layer:r,key:v.key,value:v.value,style:v.style,styleSpec:v.styleSpec,validateSpec:v.validateSpec,objectElementValidators:{"*":S=>mo(Si({layerType:p},S))}})}})),t}function ss(i){const t=i.value,r=i.key,s=Xt(t);return s!=="string"?[new Be(r,t,`string expected, ${s} found`)]:[]}const go={promoteId:function({key:i,value:t}
vendor: 5,231 bytes, line 12
12){if(Xt(t)==="string")return ss({key:i,value:t});{const r=[];for(const s in t)r.push(...ss({key:`${i}.${s}`,value:t[s]}));return r}}};function Ca(i){const t=i.value,r=i.key,s=i.styleSpec,u=i.style,d=i.validateSpec;if(!t.type)return[new Be(r,t,'"type" is required')];const p=Pi(t.type);let m;switch(p){case"vector":case"raster":return m=Pr({key:r,value:t,valueSpec:s[`source_${p.replace("-","_")}`],style:i.style,styleSpec:s,objectElementValidators:go,validateSpec:d}),m;case"raster-dem":return m=function(v){var S;const z=(S=v.sourceName)!==null&&S!==void 0?S:"",E=v.value,R=v.styleSpec,j=R.source_raster_dem,N=v.style;let q=[];const K=Xt(E);if(E===void 0)return q;if(K!=="object")return q.push(new Be("source_raster_dem",E,`object expected, ${K} found`)),q;const ie=Pi(E.encoding)==="custom",ke=["redFactor","greenFactor","blueFactor","baseShift"],ce=v.value.encoding?`"${v.value.encoding}"`:"Default";for(const xe in E)!ie&&ke.includes(xe)?q.push(new Be(xe,E[xe],`In "${z}": "${xe}" is only valid when "encoding" is set to "custom". ${ce} encoding found`)):j[xe]?q=q.concat(v.validateSpec({key:xe,value:E[xe],valueSpec:j[xe],validateSpec:v.validateSpec,style:N,styleSpec:R})):q.push(new Be(xe,E[xe],`unknown property "${xe}"`));return q}({sourceName:r,value:t,style:i.style,styleSpec:s,validateSpec:d}),m;case"geojson":if(m=Pr({key:r,value:t,valueSpec:s.source_geojson,style:u,styleSpec:s,validateSpec:d,objectElementValidators:go}),t.cluster)for(const v in t.clusterProperties){const[S,z]=t.clusterProperties[v],E=typeof S=="string"?[S,["accumulated"],["get",v]]:S;m.push(...Fs({key:`${r}.${v}.map`,value:z,expressionContext:"cluster-map"})),m.push(...Fs({key:`${r}.${v}.reduce`,value:E,expressionContext:"cluster-reduce"}))}return m;case"video":return Pr({key:r,value:t,valueSpec:s.source_video,style:u,validateSpec:d,styleSpec:s});case"image":return Pr({key:r,value:t,valueSpec:s.source_image,style:u,validateSpec:d,styleSpec:s});case"canvas":return[new Be(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return zn({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Cl(i){const t=i.value,r=i.styleSpec,s=r.light,u=i.style;let d=[];const p=Xt(t);if(t===void 0)return d;if(p!=="object")return d=d.concat([new Be("light",t,`object expected, ${p} found`)]),d;for(const m in t){const v=m.match(/^(.*)-transition$/);d=d.concat(v&&s[v[1]]&&s[v[1]].transition?i.validateSpec({key:m,value:t[m],valueSpec:r.transition,validateSpec:i.validateSpec,style:u,styleSpec:r}):s[m]?i.validateSpec({key:m,value:t[m],valueSpec:s[m],validateSpec:i.validateSpec,style:u,styleSpec:r}):[new Be(m,t[m],`unknown property "${m}"`)])}return d}function Al(i){const t=i.value,r=i.styleSpec,s=r.sky,u=i.style,d=Xt(t);if(t===void 0)return[];if(d!=="object")return[new Be("sky",t,`object expected, ${d} found`)];let p=[];for(const m in t)p=p.concat(s[m]?i.validateSpec({key:m,value:t[m],valueSpec:s[m],style:u,styleSpec:r}):[new Be(m,t[m],`unknown property "${m}"`)]);return p}function Pl(i){const t=i.value,r=i.styleSpec,s=r.terrain,u=i.style;let d=[];const p=Xt(t);if(t===void 0)return d;if(p!=="object")return d=d.concat([new Be("terrain",t,`object expected, ${p} found`)]),d;for(const m in t)d=d.concat(s[m]?i.validateSpec({key:m,value:t[m],valueSpec:s[m],validateSpec:i.validateSpec,style:u,styleSpec:r}):[new Be(m,t[m],`unknown property "${m}"`)]);return d}function Il(i){let t=[];const r=i.value,s=i.key;if(Array.isArray(r)){const u=[],d=[];for(const p in r)r[p].id&&u.includes(r[p].id)&&t.push(new Be(s,r,`all the sprites' ids must be unique, but ${r[p].id} is duplicated`)),u.push(r[p].id),r[p].url&&d.includes(r[p].url)&&t.push(new Be(s,r,`all the sprites' URLs must be unique, but ${r[p].url} is duplicated`)),d.push(r[p].url),t=t.concat(Pr({key:`${s}[${p}]`,value:r[p],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:i.validateSpec}));return t}return ss({key:s,value:r})}const _o={"*":()=>[],array:za,boolean:function(i){const t=i.value,r=i.key,s=Xt(t);return s!=="boolean"?[new Be(r,t,`boolean expected, ${s} found`)]:[]},number:wl,color:function(i){const t=i.key,r=i.value,s=Xt(r);return s!=="string"?[new Be(t,r,`color expected, ${s} found`)]:ii.parse(String(r))?[]:[new Be(t,r,`color expected, "${r}" found`)]},constants:$u,enum:zn,filter:kl,function:po,layer:zl,object:Pr,source:Ca,light:Cl,sky:Al,terrain:Pl,projection:function(i){const t=i.value,r=i.styleSpec,s=r.projection,u=i.style,d=Xt(t);if(t===void 0)return[];if(d!=="object")return[new Be("projection",t,`object expected, ${d} found`)];let p=[];for(const m in t)p=p.concat(s[m]?i.validateSpec({key:m,value:t[m],valueSpec:s[m],style:u,styleSpec:r}):[new Be(m,t[m],`unknown property "${m}"`)]);return p},string:ss,formatted:function(i){return ss(i).length===0?[]:Fs(i)},resolvedImage:function(i){return ss(i).length===0?[]:Fs(i)},padding:function(i){const t=i.key,r=i.value;if(Xt(r)==="array"){if(r.length<1||r.length>4)return[new Be(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];const s={type:"number"};let u=[];for(let d=0;d<r.length;d++)u=u.concat(i.validateSpec({key:`${t}[${d}
12]`,value:r[d],validateSpec:i.validateSpec,valueSpec:s}));return u}return wl({key:t,value:r,valueSpec:{}})},variableAnchorOffsetCollection:function(i){const t=i.key,r=i.value,s=Xt(r),u=i.styleSpec;if(s!=="array"||r.length<1||r.length%2!=0)return[new Be(t,r,"variableAnchorOffsetCollection requires a non-empty array of even length")];let d=[];for(let p=0;p<r.length;p+=2)d=d.concat(zn({key:`${t}[${p}]`,value:r[p],valueSpec:u.layout_symbol["text-anchor"]})),d=d.concat(za({key:`${t}[${p+1}]`,value:r[p+1],valueSpec:{length:2,value:"number"},validateSpec:i.validateSpec,style:i.style,styleSpec:u}));return d},sprite:Il};function Aa(i){const t=i.value,r=i.valueSpec,s=i.styleSpec;return i.validateSpec=Aa,r.expression&&so(Pi(t))?po(i):r.expression&&lo(Jr(t))?Fs(i):r.type&&_o[r.type]?_o[r.type](i):Pr(Si({},i,{valueSpec:r.type?s[r.type]:r}))}function ju(i){const t=i.value,r=i.key,s=ss(i);return s.length||(t.indexOf("{fontstack}")===-1&&s.push(new Be(r,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&s.push(new Be(r,t,'"glyphs" url must include a "{range}" token'))),s}function $r(i,t=Ce){let r=[];return r=r.concat(Aa({key:"",value:i,valueSpec:t.$root,styleSpec:t,style:i,validateSpec:Aa,objectElementValidators:{glyphs:ju,"*":()=>[]}})),i.constants&&(r=r.concat($u({key:"constants",value:i.constants}))),El(r)}function gn(i){return function(t){return i({...t,validateSpec:Aa})}}function El(i){return[].concat(i).sort((t,r)=>t.line-r.line)}function Qr(i){return function(...t){return El(i.apply(this,t))}}$r.source=Qr(gn(Ca)),$r.sprite=Qr(gn(Il)),$r.glyphs=Qr(gn(ju)),$r.light=Qr(gn(Cl)),$r.sky=Qr(gn(Al)),$r.terrain=Qr(gn(Pl)),$r.layer=Qr(gn(zl)),$r.filter=Qr(gn(kl)),$r.paintProperty=Qr(gn(mo)),$r.layoutProperty=Qr(gn(Tl));const as=$r,ch=as.light,hh=as.sky,Vu=as.paintProperty,Nu=as.layoutProperty;function Ml(i,t){let r=!1;if(t&&t.length)for(const s of t)i.fire(new Tr(new Error(s.message))),r=!0;return r}class Os{constructor(t,r,s){const u=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const p=new Int32Array(this.arrayBuffer);t=p[0],this.d=(r=p[1])+2*(s=p[2]);for(let v=0;v<this.d*this.d;v++){const S=p[3+v],z=p[3+v+1];u.push(S===z?null:p.subarray(S,z))}const m=p[3+u.length+1];this.keys=p.subarray(p[3+u.length],m),this.bboxes=p.subarray(m),this.insert=this._insertReadonly}else{this.d=r+2*s;for(let p=0;p<this.d*this.d;p++)u.push([]);this.keys=[],this.bboxes=[]}this.n=r,this.extent=t,this.padding=s,this.scale=r/t,this.uid=0;const d=s/r*t;this.min=-d,this.max=t+d}insert(t,r,s,u,d){this._forEachCell(r,s,u,d,this._insertCell,this.uid++,void 0,void 0),this.keys.push(t),this.bboxes.push(r),this.bboxes.push(s),this.bboxes.push(u),this.bboxes.push(d)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(t,r,s,u,d,p){this.cells[d].push(p)}query(t,r,s,u,d){const p=this.min,m=this.max;if(t<=p&&r<=p&&m<=s&&m<=u&&!d)return Array.prototype.slice.call(this.keys);{const v=[];return this._forEachCell(t,r,s,u,this._queryCell,v,{},d),v}}_queryCell(t,r,s,u,d,p,m,v){const S=this.cells[d];if(S!==null){const z=this.keys,E=this.bboxes;for(let R=0;R<S.length;R++){const j=S[R];if(m[j]===void 0){const N=4*j;(v?v(E[N+0],E[N+1],E[N+2],E[N+3]):t<=E[N+2]&&r<=E[N+3]&&s>=E[N+0]&&u>=E[N+1])?(m[j]=!0,p.push(z[j])):m[j]=!1}}}}_forEachCell(t,r,s,u,d,p,m,v){const S=this._convertToCellCoord(t),z=this._convertToCellCoord(r),E=this._convertToCellCoord(s),R=this._convertToCellCoord(u);for(let j=S;j<=E;j++)for(let N=z;N<=R;N++){const q=this.d*N+j;if((!v||v(this._convertFromCellCoord(j),this._convertFromCellCoord(N),this._convertFromCellCoord(j+1),this._convertFromCellCoord(N+1)))&&d.call(this,t,r,s,u,q,p,m,v))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const t=this.cells,r=3+this.cells.length+1+1;let s=0;for(let p=0;p<this.cells.length;p++)s+=this.cells[p].length;const u=new Int32Array(r+s+this.keys.length+this.bboxes.length);u[0]=this.extent,u[1]=this.n,u[2]=this.padding;let d=r;for(let p=0;p<t.length;p++){const m=t[p];u[3+p]=d,u.set(m,d),d+=m.length}return u[3+t.length]=d,u.set(this.keys,d),d+=this.keys.length,u[3+t.length+1]=d,u.set(this.bboxes,d),d+=this.bboxes.length,u.buffer}static serialize(t,r){const s=t.toArrayBuffer();return r&&r.push(s),{buffer:s}}static deserialize(t){return new Os(t.buffer)}}const jr={};function ot(i,t,r={}){if(jr[i])throw new Error(`${i} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:i,writeable:!1}
12),jr[i]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}ot("Object",Object),ot("TransferableGridIndex",Os),ot("Color",ii),ot("Error",Error),ot("AJAXError",Hi),ot("ResolvedImage",Ar),ot("StylePropertyFunction",Bs),ot("StyleExpression",oo,{omit:["_evaluator"]}),ot("ZoomDependentExpression",Rs),ot("ZoomConstantExpression",Ls),ot("CompoundExpression",Or,{omit:["_evaluate"]});for(const i in As)As[i]._classRegistryKey||ot(`Expression_${i}`,As[i]);function yo(i){return i&&typeof ArrayBuffer<"u"&&(i instanceof ArrayBuffer||i.constructor&&i.constructor.name==="ArrayBuffer")}function Dl(i){return i.$name||i.constructor._classRegistryKey}function Uu(i){return!function(t){if(t===null||typeof t!="object")return!1;const r=Dl(t);return!(!r||r==="Object")}(i)&&(i==null||typeof i=="boolean"||typeof i=="number"||typeof i=="string"||i instanceof Boolean||i instanceof Number||i instanceof String||i instanceof Date||i instanceof RegExp||i instanceof Blob||i instanceof Error||yo(i)||hi(i)||ArrayBuffer.isView(i)||i instanceof ImageData)}function $s(i,t){if(Uu(i))return(yo(i)||hi(i))&&t&&t.push(i),ArrayBuffer.isView(i)&&t&&t.push(i.buffer),i instanceof ImageData&&t&&t.push(i.data.buffer),i;if(Array.isArray(i)){const d=[];for(const p of i)d.push($s(p,t));return d}if(typeof i!="object")throw new Error("can't serialize object of type "+typeof i);const r=Dl(i);if(!r)throw new Error(`can't serialize object of unregistered class ${i.constructor.name}`);if(!jr[r])throw new Error(`${r} is not registered.`);const{klass:s}=jr[r],u=s.serialize?s.serialize(i,t):{};if(s.serialize){if(t&&u===t[t.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const d in i){if(!i.hasOwnProperty(d)||jr[r].omit.indexOf(d)>=0)continue;const p=i[d];u[d]=jr[r].shallow.indexOf(d)>=0?p:$s(p,t)}i instanceof Error&&(u.message=i.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return r!=="Object"&&(u.$name=r),u}function js(i){if(Uu(i))return i;if(Array.isArray(i))return i.map(js);if(typeof i!="object")throw new Error("can't deserialize object of type "+typeof i);const t=Dl(i)||"Object";if(!jr[t])throw new Error(`can't deserialize unregistered class ${t}`);const{klass:r}=jr[t];if(!r)throw new Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(i);const s=Object.create(r.prototype);for(const u of Object.keys(i)){if(u==="$name")continue;const d=i[u];s[u]=jr[t].shallow.indexOf(u)>=0?d:js(d)}return s}class Ll{constructor(){this.first=!0}update(t,r){const s=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=s,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=s,!0):(this.lastFloorZoom>s?(this.lastIntegerZoom=s+1,this.lastIntegerZoomTime=r):this.lastFloorZoom<s&&(this.lastIntegerZoom=s,this.lastIntegerZoomTime=r),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=s,!0))}}const Nt={"Latin-1 Supplement":i=>i>=128&&i<=255,"Hangul Jamo":i=>i>=4352&&i<=4607,Khmer:i=>i>=6016&&i<=6143,"General Punctuation":i=>i>=8192&&i<=8303,"Letterlike Symbols":i=>i>=8448&&i<=8527,"Number Forms":i=>i>=8528&&i<=8591,"Miscellaneous Technical":i=>i>=8960&&i<=9215,"Control Pictures":i=>i>=9216&&i<=9279,"Optical Character Recognition":i=>i>=9280&&i<=9311,"Enclosed Alphanumerics":i=>i>=9312&&i<=9471,"Geometric Shapes":i=>i>=9632&&i<=9727,"Miscellaneous Symbols":i=>i>=9728&&i<=9983,"Miscellaneous Symbols and Arrows":i=>i>=11008&&i<=11263,"Ideographic Description Characters":i=>i>=12272&&i<=12287,"CJK Symbols and Punctuation":i=>i>=12288&&i<=12351,Katakana:i=>i>=12448&&i<=12543,Kanbun:i=>i>=12688&&i<=12703,"CJK Strokes":i=>i>=12736&&i<=12783,"Enclosed CJK Letters and Months":i=>i>=12800&&i<=13055,"CJK Compatibility":i=>i>=13056&&i<=13311,"Yijing Hexagram Symbols":i=>i>=19904&&i<=19967,"Private Use Area":i=>i>=57344&&i<=63743,"Vertical Forms":i=>i>=65040&&i<=65055,"CJK Compatibility Forms":i=>i>=65072&&i<=65103,"Small Form Variants":i=>i>=65104&&i<=65135,"Halfwidth and Fullwidth Forms":i=>i>=65280&&i<=65519};function Rl(i){for(const t of i)if(Fl(t.charCodeAt(0)))return!0;return!1}function dh(i){for(const t of i)if(!Vs(t.charCodeAt(0)))return!1;return!0}function Bl(i){const t=i.map(r=>{try{return new RegExp(`\\p{sc=${r}}`,"u").source}catch{return null}}).filter(r=>r);return new RegExp(t.join("|"),"u")}const ph=Bl(["Arab","Dupl","Mong","Ougr","Syrc"]);function Vs(i){return!ph.test(String.fromCodePoint(i))}const Gu=Bl(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Fl(i){return!(i!==746&&i!==747&&(i<4352||!(Nt["CJK Compatibility Forms"](i)&&!(i>=65097&&i<=65103)||Nt["CJK Compatibility"](i)||Nt["CJK Strokes"](i)||!(!Nt["CJK Symbols and Punctuation"](i)||i>=12296&&i<=12305||i>=12308&&i<=12319||i===12336)||Nt["Enclosed CJK Letters and Months"](i)||Nt["Ideographic Description Characters"](i)||Nt.Kanbun(i)||Nt.Katakana(i)&&i!==12540||!(!Nt["Halfwidth and Fullwidth Forms"](i)||i===65288||i===65289||i===65293||i>=65306&&i<=65310||i===65339||i===65341||i===65343||i>=65371&&i<=65503||i===65507||i>=65512&&i<=65519)||!(!Nt["Small Form Variants"](i)||i>=65112&&i<=65118||i>=65123&&i<=65126)||Nt["Vertical Forms"](i)||Nt["Yijing Hexagram Symbols"](i)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(i))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(i))||Gu.test(String.fromCodePoint(i)))))}function qu(i){return!(Fl(i)||function(t){return!!(Nt["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||Nt["General Punctuation"](t)&&(t===8214||t===8224||t===8225||t===8240||t===8241||t===8251||t===8252||t===8258||t===8263||t===8264||t===8265||t===8273)||Nt["Letterlike Symbols"](t)||Nt["Number Forms"](t)||Nt["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||t===9003||t>=9085&&t<=9114||t>=9150&&t<=9165||t===9167||t>=9169&&t<=9179||t>=9186&&t<=9215)||Nt["Control Pictures"](t)&&t!==9251||Nt["Optical Character Recognition"](t)||Nt["Enclosed Alphanumerics"](t)||Nt["Geometric Shapes"](t)||Nt["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Nt["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Nt["CJK Symbols and Punctuation"](t)||Nt.Katakana(t)||Nt["Private Use Area"](t)||Nt["CJK Compatibility Forms"](t)||Nt["Small Form Variants"](t)||Nt["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)}(i))}
12const fh=Bl(["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 Ol(i){return fh.test(String.fromCodePoint(i))}function mh(i,t){return!(!t&&Ol(i)||i>=2304&&i<=3583||i>=3840&&i<=4255||Nt.Khmer(i))}function gh(i){for(const t of i)if(Ol(t.charCodeAt(0)))return!0;return!1}const Ir=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(i){this.pluginStatus=i.pluginStatus,this.pluginURL=i.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(i){this.applyArabicShaping=i.applyArabicShaping,this.processBidirectionalText=i.processBidirectionalText,this.processStyledBidirectionalText=i.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class mi{constructor(t,r){this.zoom=t,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 Ll,this.transition={})}isSupportedScript(t){return function(r,s){for(const u of r)if(!mh(u.charCodeAt(0),s))return!1;return!0}(t,Ir.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,r=t-Math.floor(t),s=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:r+(1-r)*s}:{fromScale:.5,toScale:1,t:1-(1-s)*r}}}class Ns{constructor(t,r){this.property=t,this.value=r,this.expression=function(s,u){if(so(s))return new Bs(s,u);if(lo(s)){const d=vl(s,u);if(d.result==="error")throw new Error(d.value.map(p=>`${p.key}: ${p.message}`).join(", "));return d.value}{let d=s;return u.type==="color"&&typeof s=="string"?d=ii.parse(s):u.type!=="padding"||typeof s!="number"&&!Array.isArray(s)?u.type==="variableAnchorOffsetCollection"&&Array.isArray(s)&&(d=Fr.parse(s)):d=Cr.parse(s),{kind:"constant",evaluate:()=>d}}}(r===void 0?t.specification.default:r,t.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(t,r,s){return this.property.possiblyEvaluate(this,t,r,s)}}class vo{constructor(t){this.property=t,this.value=new Ns(t,void 0)}transitioned(t,r){return new Zu(this.property,this.value,r,Ge({},t.transition,this.transition),t.now)}untransitioned(){return new Zu(this.property,this.value,null,{},0)}}class xo{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}getValue(t){return Pt(this._values[t].value.value)}setValue(t,r){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new vo(this._values[t].property)),this._values[t].value=new Ns(this._values[t].property,r===null?void 0:Pt(r))}getTransition(t){return Pt(this._values[t].transition)}setTransition(t,r){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new vo(this._values[t].property)),this._values[t].transition=Pt(r)||void 0}serialize(){const t={};for(const r of Object.keys(this._values)){const s=this.getValue(r);s!==void 0&&(t[r]=s);const u=this.getTransition(r);u!==void 0&&(t[`${r}-transition`]=u)}return t}transitioned(t,r){const s=new Pa(this._properties);for(const u of Object.keys(this._values))s._values[u]=this._values[u].transitioned(t,r._values[u]);return s}untransitioned(){const t=new Pa(this._properties);for(const r of Object.keys(this._values))t._values[r]=this._values[r].untransitioned();return t}}class Zu{constructor(t,r,s,u,d){this.property=t,this.value=r,this.begin=d+u.delay||0,this.end=this.begin+u.duration||0,t.specification.transition&&(u.delay||u.duration)&&(this.prior=s)}
vendor: 5,970 bytes, line 12
12possiblyEvaluate(t,r,s){const u=t.now||0,d=this.value.possiblyEvaluate(t,r,s),p=this.prior;if(p){if(u>this.end)return this.prior=null,d;if(this.value.isDataDriven())return this.prior=null,d;if(u<this.begin)return p.possiblyEvaluate(t,r,s);{const m=(u-this.begin)/(this.end-this.begin);return this.property.interpolate(p.possiblyEvaluate(t,r,s),d,function(v){if(v<=0)return 0;if(v>=1)return 1;const S=v*v,z=S*v;return 4*(v<.5?z:3*(v-S)+z-.75)}(m))}}return d}}class Pa{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,r,s){const u=new Ea(this._properties);for(const d of Object.keys(this._values))u._values[d]=this._values[d].possiblyEvaluate(t,r,s);return u}hasTransition(){for(const t of Object.keys(this._values))if(this._values[t].prior)return!0;return!1}}class Ia{constructor(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)}hasValue(t){return this._values[t].value!==void 0}getValue(t){return Pt(this._values[t].value)}setValue(t,r){this._values[t]=new Ns(this._values[t].property,r===null?void 0:Pt(r))}serialize(){const t={};for(const r of Object.keys(this._values)){const s=this.getValue(r);s!==void 0&&(t[r]=s)}return t}possiblyEvaluate(t,r,s){const u=new Ea(this._properties);for(const d of Object.keys(this._values))u._values[d]=this._values[d].possiblyEvaluate(t,r,s);return u}}class _n{constructor(t,r,s){this.property=t,this.value=r,this.parameters=s}isConstant(){return this.value.kind==="constant"}constantOr(t){return this.value.kind==="constant"?this.value.value:t}evaluate(t,r,s,u){return this.property.evaluate(this.value,this.parameters,t,r,s,u)}}class Ea{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class ct{constructor(t){this.specification=t}possiblyEvaluate(t,r){if(t.isDataDriven())throw new Error("Value should not be data driven");return t.expression.evaluate(r)}interpolate(t,r,s){const u=fr[this.specification.type];return u?u(t,r,s):t}}class bt{constructor(t,r){this.specification=t,this.overrides=r}possiblyEvaluate(t,r,s,u){return new _n(this,t.expression.kind==="constant"||t.expression.kind==="camera"?{kind:"constant",value:t.expression.evaluate(r,null,{},s,u)}:t.expression,r)}interpolate(t,r,s){if(t.value.kind!=="constant"||r.value.kind!=="constant")return t;if(t.value.value===void 0||r.value.value===void 0)return new _n(this,{kind:"constant",value:void 0},t.parameters);const u=fr[this.specification.type];if(u){const d=u(t.value.value,r.value.value,s);return new _n(this,{kind:"constant",value:d},t.parameters)}return t}evaluate(t,r,s,u,d,p){return t.kind==="constant"?t.value:t.evaluate(r,s,u,d,p)}}class bo extends bt{possiblyEvaluate(t,r,s,u){if(t.value===void 0)return new _n(this,{kind:"constant",value:void 0},r);if(t.expression.kind==="constant"){const d=t.expression.evaluate(r,null,{},s,u),p=t.property.specification.type==="resolvedImage"&&typeof d!="string"?d.name:d,m=this._calculate(p,p,p,r);return new _n(this,{kind:"constant",value:m},r)}if(t.expression.kind==="camera"){const d=this._calculate(t.expression.evaluate({zoom:r.zoom-1}),t.expression.evaluate({zoom:r.zoom}),t.expression.evaluate({zoom:r.zoom+1}),r);return new _n(this,{kind:"constant",value:d},r)}return new _n(this,t.expression,r)}evaluate(t,r,s,u,d,p){if(t.kind==="source"){const m=t.evaluate(r,s,u,d,p);return this._calculate(m,m,m,r)}return t.kind==="composite"?this._calculate(t.evaluate({zoom:Math.floor(r.zoom)-1},s,u),t.evaluate({zoom:Math.floor(r.zoom)},s,u),t.evaluate({zoom:Math.floor(r.zoom)+1},s,u),r):t.value}_calculate(t,r,s,u){return u.zoom>u.zoomHistory.lastIntegerZoom?{from:t,to:r}:{from:s,to:r}}interpolate(t){return t}}class wo{constructor(t){this.specification=t}possiblyEvaluate(t,r,s,u){if(t.value!==void 0){if(t.expression.kind==="constant"){const d=t.expression.evaluate(r,null,{},s,u);return this._calculate(d,d,d,r)}return this._calculate(t.expression.evaluate(new mi(Math.floor(r.zoom-1),r)),t.expression.evaluate(new mi(Math.floor(r.zoom),r)),t.expression.evaluate(new mi(Math.floor(r.zoom+1),r)),r)}}_calculate(t,r,s,u){return u.zoom>u.zoomHistory.lastIntegerZoom?{from:t,to:r}:{from:s,to:r}}interpolate(t){return t}}class $l{constructor(t){this.specification=t}possiblyEvaluate(t,r,s,u){return!!t.expression.evaluate(r,null,{},s,u)}interpolate(){return!1}}class h{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const r in t){const s=t[r];s.specification.overridable&&this.overridableProperties.push(r);const u=this.defaultPropertyValues[r]=new Ns(s,void 0),d=this.defaultTransitionablePropertyValues[r]=new vo(s);this.defaultTransitioningPropertyValues[r]=d.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=u.possiblyEvaluate({})}}}ot("DataDrivenProperty",bt),ot("DataConstantProperty",ct),ot("CrossFadedDataDrivenProperty",bo),ot("CrossFadedProperty",wo),ot("ColorRampProperty",$l);const e="-transition";class n extends Mn{constructor(t,r){if(super(),this.id=t.id,this.type=t.type,this._featureFilter={filter:()=>!0,needGeometry:!1},t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),r.layout&&(this._unevaluatedLayout=new Ia(r.layout)),r.paint)){this._transitionablePaint=new xo(r.paint);for(const s in t.paint)this.setPaintProperty(s,t.paint[s],{validate:!1});for(const s in t.layout)this.setLayoutProperty(s,t.layout[s],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ea(r.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return t==="visibility"?this.visibility:this._unevaluatedLayout.getValue(t)}setLayoutProperty(t,r,s={}
12){r!=null&&this._validate(Nu,`layers.${this.id}.layout.${t}`,t,r,s)||(t!=="visibility"?this._unevaluatedLayout.setValue(t,r):this.visibility=r)}getPaintProperty(t){return t.endsWith(e)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,r,s={}){if(r!=null&&this._validate(Vu,`layers.${this.id}.paint.${t}`,t,r,s))return!1;if(t.endsWith(e))return this._transitionablePaint.setTransition(t.slice(0,-11),r||void 0),!1;{const u=this._transitionablePaint._values[t],d=u.property.specification["property-type"]==="cross-faded-data-driven",p=u.value.isDataDriven(),m=u.value;this._transitionablePaint.setValue(t,r),this._handleSpecialPaintPropertyUpdate(t);const v=this._transitionablePaint._values[t].value;return v.isDataDriven()||p||d||this._handleOverridablePaintPropertyUpdate(t,m,v)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,r,s){return!1}isHidden(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||this.visibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,r){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,r)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,r)}
vendor: 5,961 bytes, line 12
12serialize(){const t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),Ae(t,(r,s)=>!(r===void 0||s==="layout"&&!Object.keys(r).length||s==="paint"&&!Object.keys(r).length))}_validate(t,r,s,u,d={}){return(!d||d.validate!==!1)&&Ml(this,t.call(as,{key:r,layerType:this.type,objectKey:s,value:u,styleSpec:Ce,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const r=this.paint.get(t);if(r instanceof _n&&Es(r.property.specification)&&(r.value.kind==="source"||r.value.kind==="composite")&&r.value.isStateDependent)return!0}return!1}}const a={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class o{constructor(t,r){this._structArray=t,this._pos1=r*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class c{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,r){return t._trim(),r&&(t.isTransferred=!0,r.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const r=Object.create(this.prototype);return r.arrayBuffer=t.arrayBuffer,r.length=t.length,r.capacity=t.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(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function g(i,t=1){let r=0,s=0;return{members:i.map(u=>{const d=a[u.type].BYTES_PER_ELEMENT,p=r=b(r,Math.max(t,d)),m=u.components||1;return s=Math.max(s,d),r+=d*m,{name:u.name,type:u.type,components:m,offset:p}}),size:b(r,Math.max(s,t)),alignment:t}}function b(i,t){return Math.ceil(i/t)*t}class k extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r){const s=this.length;return this.resize(s+1),this.emplace(s,t,r)}emplace(t,r,s){const u=2*t;return this.int16[u+0]=r,this.int16[u+1]=s,t}}k.prototype.bytesPerElement=4,ot("StructArrayLayout2i4",k);class A extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,s){const u=this.length;return this.resize(u+1),this.emplace(u,t,r,s)}emplace(t,r,s,u){const d=3*t;return this.int16[d+0]=r,this.int16[d+1]=s,this.int16[d+2]=u,t}}A.prototype.bytesPerElement=6,ot("StructArrayLayout3i6",A);class M extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,s,u){const d=this.length;return this.resize(d+1),this.emplace(d,t,r,s,u)}emplace(t,r,s,u,d){const p=4*t;return this.int16[p+0]=r,this.int16[p+1]=s,this.int16[p+2]=u,this.int16[p+3]=d,t}}M.prototype.bytesPerElement=8,ot("StructArrayLayout4i8",M);class D extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,s,u,d,p){const m=this.length;return this.resize(m+1),this.emplace(m,t,r,s,u,d,p)}emplace(t,r,s,u,d,p,m){const v=6*t;return this.int16[v+0]=r,this.int16[v+1]=s,this.int16[v+2]=u,this.int16[v+3]=d,this.int16[v+4]=p,this.int16[v+5]=m,t}}D.prototype.bytesPerElement=12,ot("StructArrayLayout2i4i12",D);class V extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,s,u,d,p){const m=this.length;return this.resize(m+1),this.emplace(m,t,r,s,u,d,p)}emplace(t,r,s,u,d,p,m){const v=4*t,S=8*t;return this.int16[v+0]=r,this.int16[v+1]=s,this.uint8[S+4]=u,this.uint8[S+5]=d,this.uint8[S+6]=p,this.uint8[S+7]=m,t}}V.prototype.bytesPerElement=8,ot("StructArrayLayout2i4ub8",V);class H extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r){const s=this.length;return this.resize(s+1),this.emplace(s,t,r)}emplace(t,r,s){const u=2*t;return this.float32[u+0]=r,this.float32[u+1]=s,t}}H.prototype.bytesPerElement=8,ot("StructArrayLayout2f8",H);class X extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,s,u,d,p,m,v,S,z){const E=this.length;return this.resize(E+1),this.emplace(E,t,r,s,u,d,p,m,v,S,z)}emplace(t,r,s,u,d,p,m,v,S,z,E){const R=10*t;return this.uint16[R+0]=r,this.uint16[R+1]=s,this.uint16[R+2]=u,this.uint16[R+3]=d,this.uint16[R+4]=p,this.uint16[R+5]=m,this.uint16[R+6]=v,this.uint16[R+7]=S,this.uint16[R+8]=z,this.uint16[R+9]=E,t}}X.prototype.bytesPerElement=20,ot("StructArrayLayout10ui20",X);class Q extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,s,u,d,p,m,v,S,z,E,R){const j=this.length;return this.resize(j+1),this.emplace(j,t,r,s,u,d,p,m,v,S,z,E,R)}emplace(t,r,s,u,d,p,m,v,S,z,E,R,j){const N=12*t;return this.int16[N+0]=r,this.int16[N+1]=s,this.int16[N+2]=u,this.int16[N+3]=d,this.uint16[N+4]=p,this.uint16[N+5]=m,this.uint16[N+6]=v,this.uint16[N+7]=S,this.int16[N+8]=z,this.int16[N+9]=E,this.int16[N+10]=R,this.int16[N+11]=j,t}}Q.prototype.bytesPerElement=24,ot("StructArrayLayout4i4ui4i24",Q);
vendor: 18,969 bytes, line 12
12class ne extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,s){const u=this.length;return this.resize(u+1),this.emplace(u,t,r,s)}emplace(t,r,s,u){const d=3*t;return this.float32[d+0]=r,this.float32[d+1]=s,this.float32[d+2]=u,t}}ne.prototype.bytesPerElement=12,ot("StructArrayLayout3f12",ne);class se extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.uint32[1*t+0]=r,t}}se.prototype.bytesPerElement=4,ot("StructArrayLayout1ul4",se);class ue extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,s,u,d,p,m,v,S){const z=this.length;return this.resize(z+1),this.emplace(z,t,r,s,u,d,p,m,v,S)}emplace(t,r,s,u,d,p,m,v,S,z){const E=10*t,R=5*t;return this.int16[E+0]=r,this.int16[E+1]=s,this.int16[E+2]=u,this.int16[E+3]=d,this.int16[E+4]=p,this.int16[E+5]=m,this.uint32[R+3]=v,this.uint16[E+8]=S,this.uint16[E+9]=z,t}}ue.prototype.bytesPerElement=20,ot("StructArrayLayout6i1ul2ui20",ue);class Y extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,s,u,d,p){const m=this.length;return this.resize(m+1),this.emplace(m,t,r,s,u,d,p)}emplace(t,r,s,u,d,p,m){const v=6*t;return this.int16[v+0]=r,this.int16[v+1]=s,this.int16[v+2]=u,this.int16[v+3]=d,this.int16[v+4]=p,this.int16[v+5]=m,t}}Y.prototype.bytesPerElement=12,ot("StructArrayLayout2i2i2i12",Y);class me extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,s,u,d){const p=this.length;return this.resize(p+1),this.emplace(p,t,r,s,u,d)}emplace(t,r,s,u,d,p){const m=4*t,v=8*t;return this.float32[m+0]=r,this.float32[m+1]=s,this.float32[m+2]=u,this.int16[v+6]=d,this.int16[v+7]=p,t}}me.prototype.bytesPerElement=16,ot("StructArrayLayout2f1f2i16",me);class ve extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,s,u,d,p){const m=this.length;return this.resize(m+1),this.emplace(m,t,r,s,u,d,p)}emplace(t,r,s,u,d,p,m){const v=16*t,S=4*t,z=8*t;return this.uint8[v+0]=r,this.uint8[v+1]=s,this.float32[S+1]=u,this.float32[S+2]=d,this.int16[z+6]=p,this.int16[z+7]=m,t}}ve.prototype.bytesPerElement=16,ot("StructArrayLayout2ub2f2i16",ve);class Se extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,s){const u=this.length;return this.resize(u+1),this.emplace(u,t,r,s)}emplace(t,r,s,u){const d=3*t;return this.uint16[d+0]=r,this.uint16[d+1]=s,this.uint16[d+2]=u,t}}Se.prototype.bytesPerElement=6,ot("StructArrayLayout3ui6",Se);class De extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,s,u,d,p,m,v,S,z,E,R,j,N,q,K,ie){const ke=this.length;return this.resize(ke+1),this.emplace(ke,t,r,s,u,d,p,m,v,S,z,E,R,j,N,q,K,ie)}emplace(t,r,s,u,d,p,m,v,S,z,E,R,j,N,q,K,ie,ke){const ce=24*t,xe=12*t,Pe=48*t;return this.int16[ce+0]=r,this.int16[ce+1]=s,this.uint16[ce+2]=u,this.uint16[ce+3]=d,this.uint32[xe+2]=p,this.uint32[xe+3]=m,this.uint32[xe+4]=v,this.uint16[ce+10]=S,this.uint16[ce+11]=z,this.uint16[ce+12]=E,this.float32[xe+7]=R,this.float32[xe+8]=j,this.uint8[Pe+36]=N,this.uint8[Pe+37]=q,this.uint8[Pe+38]=K,this.uint32[xe+10]=ie,this.int16[ce+22]=ke,t}}De.prototype.bytesPerElement=48,ot("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",De);class je extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,s,u,d,p,m,v,S,z,E,R,j,N,q,K,ie,ke,ce,xe,Pe,$e,rt,xt,et,Je,pt,lt){const st=this.length;return this.resize(st+1),this.emplace(st,t,r,s,u,d,p,m,v,S,z,E,R,j,N,q,K,ie,ke,ce,xe,Pe,$e,rt,xt,et,Je,pt,lt)}emplace(t,r,s,u,d,p,m,v,S,z,E,R,j,N,q,K,ie,ke,ce,xe,Pe,$e,rt,xt,et,Je,pt,lt,st){const Me=32*t,mt=16*t;return this.int16[Me+0]=r,this.int16[Me+1]=s,this.int16[Me+2]=u,this.int16[Me+3]=d,this.int16[Me+4]=p,this.int16[Me+5]=m,this.int16[Me+6]=v,this.int16[Me+7]=S,this.uint16[Me+8]=z,this.uint16[Me+9]=E,this.uint16[Me+10]=R,this.uint16[Me+11]=j,this.uint16[Me+12]=N,this.uint16[Me+13]=q,this.uint16[Me+14]=K,this.uint16[Me+15]=ie,this.uint16[Me+16]=ke,this.uint16[Me+17]=ce,this.uint16[Me+18]=xe,this.uint16[Me+19]=Pe,this.uint16[Me+20]=$e,this.uint16[Me+21]=rt,this.uint16[Me+22]=xt,this.uint32[mt+12]=et,this.float32[mt+13]=Je,this.float32[mt+14]=pt,this.uint16[Me+30]=lt,this.uint16[Me+31]=st,t}}je.prototype.bytesPerElement=64,ot("StructArrayLayout8i15ui1ul2f2ui64",je);class Qe extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.float32[1*t+0]=r,t}}Qe.prototype.bytesPerElement=4,ot("StructArrayLayout1f4",Qe);class nt extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,s){const u=this.length;return this.resize(u+1),this.emplace(u,t,r,s)}emplace(t,r,s,u){const d=3*t;return this.uint16[6*t+0]=r,this.float32[d+1]=s,this.float32[d+2]=u,t}}nt.prototype.bytesPerElement=12,ot("StructArrayLayout1ui2f12",nt);class Xe extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,s){const u=this.length;return this.resize(u+1),this.emplace(u,t,r,s)}emplace(t,r,s,u){const d=4*t;return this.uint32[2*t+0]=r,this.uint16[d+2]=s,this.uint16[d+3]=u,t}}Xe.prototype.bytesPerElement=8,ot("StructArrayLayout1ul2ui8",Xe);class We extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r){const s=this.length;return this.resize(s+1),this.emplace(s,t,r)}emplace(t,r,s){const u=2*t;return this.uint16[u+0]=r,this.uint16[u+1]=s,t}}We.prototype.bytesPerElement=4,ot("StructArrayLayout2ui4",We);class ht extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.uint16[1*t+0]=r,t}}ht.prototype.bytesPerElement=2,ot("StructArrayLayout1ui2",ht);class zt extends c{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,s,u){const d=this.length;return this.resize(d+1),this.emplace(d,t,r,s,u)}emplace(t,r,s,u,d){const p=4*t;return this.float32[p+0]=r,this.float32[p+1]=s,this.float32[p+2]=u,this.float32[p+3]=d,t}}zt.prototype.bytesPerElement=16,ot("StructArrayLayout4f16",zt);class Ye extends o{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 F(this.anchorPointX,this.anchorPointY)}}Ye.prototype.size=20;class it extends ue{get(t){return new Ye(this,t)}}ot("CollisionBoxArray",it);class St extends o{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}St.prototype.size=48;class gi extends De{get(t){return new St(this,t)}}ot("PlacedSymbolArray",gi);class Dt extends o{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(t){this._structArray.uint32[this._pos4+12]=t}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Dt.prototype.size=64;class jt extends je{get(t){return new Dt(this,t)}}ot("SymbolInstanceArray",jt);class _i extends Qe{getoffsetX(t){return this.float32[1*t+0]}}ot("GlyphOffsetArray",_i);class Ki extends A{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}ot("SymbolLineVertexArray",Ki);class en extends o{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]}}en.prototype.size=12;class yi extends nt{get(t){return new en(this,t)}}ot("TextAnchorOffsetArray",yi);class gr extends o{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]}}gr.prototype.size=8;class lr extends Xe{get(t){return new gr(this,t)}}ot("FeatureIndexArray",lr);class Yi extends k{}class ur extends k{}class yn extends k{}class Us extends D{}class ko extends V{}class Gs extends H{}class Vr extends X{}class So extends Q{}class jl extends ne{}class Nr extends se{}class Ur extends Y{}class Bn extends ve{}class tn extends Se{}class qi extends We{}const Ji=g([{name:"a_pos",components:2,type:"Int16"}],4),{members:Er}=Ji;class Ut{constructor(t=[]){this.segments=t}prepareSegment(t,r,s,u){let d=this.segments[this.segments.length-1];return t>Ut.MAX_VERTEX_ARRAY_LENGTH&&Ct(`Max vertices per segment is ${Ut.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}`),(!d||d.vertexLength+t>Ut.MAX_VERTEX_ARRAY_LENGTH||d.sortKey!==u)&&(d={vertexOffset:r.length,primitiveOffset:s.length,vertexLength:0,primitiveLength:0},u!==void 0&&(d.sortKey=u),this.segments.push(d)),d}get(){return this.segments}destroy(){for(const t of this.segments)for(const r in t.vaos)t.vaos[r].destroy()}static simpleSegment(t,r,s,u){return new Ut([{vertexOffset:t,primitiveOffset:r,vertexLength:s,primitiveLength:u,vaos:{},sortKey:0}])}}function os(i,t){return 256*(i=Ue(Math.floor(i),0,255))+Ue(Math.floor(t),0,255)}Ut.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,ot("SegmentVector",Ut);const qs=g([{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 Zs={exports:{}},Hu={exports:{}};Hu.exports=function(i,t){var r,s,u,d,p,m,v,S;for(s=i.length-(r=3&i.length),u=t,p=3432918353,m=461845907,S=0;S<s;)v=255&i.charCodeAt(S)|(255&i.charCodeAt(++S))<<8|(255&i.charCodeAt(++S))<<16|(255&i.charCodeAt(++S))<<24,++S,u=27492+(65535&(d=5*(65535&(u=(u^=v=(65535&(v=(v=(65535&v)*p+(((v>>>16)*p&65535)<<16)&4294967295)<<15|v>>>17))*m+(((v>>>16)*m&65535)<<16)&4294967295)<<13|u>>>19))+((5*(u>>>16)&65535)<<16)&4294967295))+((58964+(d>>>16)&65535)<<16);switch(v=0,r){case 3:v^=(255&i.charCodeAt(S+2))<<16;case 2:v^=(255&i.charCodeAt(S+1))<<8;case 1:u^=v=(65535&(v=(v=(65535&(v^=255&i.charCodeAt(S)))*p+(((v>>>16)*p&65535)<<16)&4294967295)<<15|v>>>17))*m+(((v>>>16)*m&65535)<<16)&4294967295}return u^=i.length,u=2246822507*(65535&(u^=u>>>16))+((2246822507*(u>>>16)&65535)<<16)&4294967295,u=3266489909*(65535&(u^=u>>>13))+((3266489909*(u>>>16)&65535)<<16)&4294967295,(u^=u>>>16)>>>0};var _h=Hu.exports,Wu={exports:{}};Wu.exports=function(i,t){for(var r,s=i.length,u=t^s,d=0;s>=4;)r=1540483477*(65535&(r=255&i.charCodeAt(d)|(255&i.charCodeAt(++d))<<8|(255&i.charCodeAt(++d))<<16|(255&i.charCodeAt(++d))<<24))+((1540483477*(r>>>16)&65535)<<16),u=1540483477*(65535&u)+((1540483477*(u>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),s-=4,++d;switch(s){case 3:u^=(255&i.charCodeAt(d+2))<<16;case 2:u^=(255&i.charCodeAt(d+1))<<8;case 1:u=1540483477*(65535&(u^=255&i.charCodeAt(d)))+((1540483477*(u>>>16)&65535)<<16)}return u=1540483477*(65535&(u^=u>>>13))+((1540483477*(u>>>16)&65535)<<16),(u^=u>>>15)>>>0};var Fn=_h,Xu=Wu.exports;Zs.exports=Fn,Zs.exports.murmur3=Fn,Zs.exports.murmur2=Xu;var To=U(Zs.exports);class Ma{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,r,s,u){this.ids.push(zo(t)),this.positions.push(r,s,u)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const r=zo(t);let s=0,u=this.ids.length-1;for(;s<u;){const p=s+u>>1;this.ids[p]>=r?u=p:s=p+1}const d=[];for(;this.ids[s]===r;)d.push({index:this.positions[3*s],start:this.positions[3*s+1],end:this.positions[3*s+2]}),s++;return d}static serialize(t,r){const s=new Float64Array(t.ids),u=new Uint32Array(t.positions);return Co(s,u,0,s.length-1),r&&r.push(s.buffer,u.buffer),{ids:s,positions:u}}static deserialize(t){const r=new Ma;return r.ids=t.ids,r.positions=t.positions,r.indexed=!0,r}}function zo(i){const t=+i;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:To(String(i))}function Co(i,t,r,s){for(;r<s;){const u=i[r+s>>1];let d=r-1,p=s+1;for(;;){do d++;while(i[d]<u);do p--;while(i[p]>u);if(d>=p)break;Hs(i,d,p),Hs(t,3*d,3*p),Hs(t,3*d+1,3*p+1),Hs(t,3*d+2,3*p+2)}p-r<s-p?(Co(i,t,r,p),r=p+1):(Co(i,t,p+1,s),s=p)}}function Hs(i,t,r){const s=i[t];i[t]=i[r],i[r]=s}ot("FeaturePositionMap",Ma);class Da{constructor(t,r){this.gl=t.gl,this.location=r}}class Ku extends Da{constructor(t,r){super(t,r),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))}}class Gd extends Da{constructor(t,r){super(t,r),this.current=[0,0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))}}class qd extends Da{constructor(t,r){super(t,r),this.current=ii.transparent}set(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))}}const pg=new Float32Array(16);function yh(i){return[os(255*i.r,255*i.g),os(255*i.b,255*i.a)]}class Vl{constructor(t,r,s){this.value=t,this.uniformNames=r.map(u=>`u_${u}`),this.type=s}setUniform(t,r,s){t.set(s.constantOr(this.value))}getBinding(t,r,s){return this.type==="color"?new qd(t,r):new Ku(t,r)}}class Ao{constructor(t,r){this.uniformNames=r.map(s=>`u_${s}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,r){this.pixelRatioFrom=r.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=r.tlbr,this.patternTo=t.tlbr}setUniform(t,r,s,u){const d=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;d&&t.set(d)}getBinding(t,r,s){return s.substr(0,9)==="u_pattern"?new Gd(t,r):new Ku(t,r)}}class ls{constructor(t,r,s,u){this.expression=t,this.type=s,this.maxValue=0,this.paintVertexAttributes=r.map(d=>({name:`a_${d}`,type:"Float32",components:s==="color"?2:1,offset:0})),this.paintVertexArray=new u}populatePaintArray(t,r,s,u,d){const p=this.paintVertexArray.length,m=this.expression.evaluate(new mi(0),r,{},u,[],d);this.paintVertexArray.resize(t),this._setPaintValue(p,t,m)}updatePaintArray(t,r,s,u){const d=this.expression.evaluate({zoom:0},s,u);this._setPaintValue(t,r,d)}
12_setPaintValue(t,r,s){if(this.type==="color"){const u=yh(s);for(let d=t;d<r;d++)this.paintVertexArray.emplace(d,u[0],u[1])}else{for(let u=t;u<r;u++)this.paintVertexArray.emplace(u,s);this.maxValue=Math.max(this.maxValue,Math.abs(s))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Cn{constructor(t,r,s,u,d,p){this.expression=t,this.uniformNames=r.map(m=>`u_${m}_t`),this.type=s,this.useIntegerZoom=u,this.zoom=d,this.maxValue=0,this.paintVertexAttributes=r.map(m=>({name:`a_${m}`,type:"Float32",components:s==="color"?4:2,offset:0})),this.paintVertexArray=new p}populatePaintArray(t,r,s,u,d){const p=this.expression.evaluate(new mi(this.zoom),r,{},u,[],d),m=this.expression.evaluate(new mi(this.zoom+1),r,{},u,[],d),v=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(v,t,p,m)}updatePaintArray(t,r,s,u){const d=this.expression.evaluate({zoom:this.zoom},s,u),p=this.expression.evaluate({zoom:this.zoom+1},s,u);this._setPaintValue(t,r,d,p)}_setPaintValue(t,r,s,u){if(this.type==="color"){const d=yh(s),p=yh(u);for(let m=t;m<r;m++)this.paintVertexArray.emplace(m,d[0],d[1],p[0],p[1])}else{for(let d=t;d<r;d++)this.paintVertexArray.emplace(d,s,u);this.maxValue=Math.max(this.maxValue,Math.abs(s),Math.abs(u))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(t,r){const s=this.useIntegerZoom?Math.floor(r.zoom):r.zoom,u=Ue(this.expression.interpolationFactor(s,this.zoom,this.zoom+1),0,1);t.set(u)}getBinding(t,r,s){return new Ku(t,r)}}class Ws{constructor(t,r,s,u,d,p){this.expression=t,this.type=r,this.useIntegerZoom=s,this.zoom=u,this.layerId=p,this.zoomInPaintVertexArray=new d,this.zoomOutPaintVertexArray=new d}populatePaintArray(t,r,s){const u=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(u,t,r.patterns&&r.patterns[this.layerId],s)}updatePaintArray(t,r,s,u,d){this._setPaintValues(t,r,s.patterns&&s.patterns[this.layerId],d)}_setPaintValues(t,r,s,u){if(!u||!s)return;const{min:d,mid:p,max:m}=s,v=u[d],S=u[p],z=u[m];if(v&&S&&z)for(let E=t;E<r;E++)this.zoomInPaintVertexArray.emplace(E,S.tl[0],S.tl[1],S.br[0],S.br[1],v.tl[0],v.tl[1],v.br[0],v.br[1],S.pixelRatio,v.pixelRatio),this.zoomOutPaintVertexArray.emplace(E,S.tl[0],S.tl[1],S.br[0],S.br[1],z.tl[0],z.tl[1],z.br[0],z.br[1],S.pixelRatio,z.pixelRatio)}upload(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,qs.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,qs.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Zd{constructor(t,r,s){this.binders={},this._buffers=[];const u=[];for(const d in t.paint._values){if(!s(d))continue;const p=t.paint.get(d);if(!(p instanceof _n&&Es(p.property.specification)))continue;const m=fg(d,t.type),v=p.value,S=p.property.specification.type,z=p.property.useIntegerZoom,E=p.property.specification["property-type"],R=E==="cross-faded"||E==="cross-faded-data-driven";if(v.kind==="constant")this.binders[d]=R?new Ao(v.value,m):new Vl(v.value,m,S),u.push(`/u_${d}`);else if(v.kind==="source"||R){const j=Hd(d,S,"source");this.binders[d]=R?new Ws(v,S,z,r,j,t.id):new ls(v,m,S,j),u.push(`/a_${d}`)}else{const j=Hd(d,S,"composite");this.binders[d]=new Cn(v,m,S,z,r,j),u.push(`/z_${d}`)}}this.cacheKey=u.sort().join("")}getMaxValue(t){const r=this.binders[t];return r instanceof ls||r instanceof Cn?r.maxValue:0}populatePaintArrays(t,r,s,u,d){for(const p in this.binders){const m=this.binders[p];(m instanceof ls||m instanceof Cn||m instanceof Ws)&&m.populatePaintArray(t,r,s,u,d)}}setConstantPatternPositions(t,r){for(const s in this.binders){const u=this.binders[s];u instanceof Ao&&u.setConstantPatternPositions(t,r)}}updatePaintArrays(t,r,s,u,d){let p=!1;for(const m in t){const v=r.getPositions(m);for(const S of v){const z=s.feature(S.index);for(const E in this.binders){const R=this.binders[E];if((R instanceof ls||R instanceof Cn||R instanceof Ws)&&R.expression.isStateDependent===!0){const j=u.paint.get(E);R.expression=j.value,R.updatePaintArray(S.start,S.end,z,t[m],d),p=!0}}}}return p}defines(){const t=[];for(const r in this.binders){const s=this.binders[r];(s instanceof Vl||s instanceof Ao)&&t.push(...s.uniformNames.map(u=>`#define HAS_UNIFORM_${u}`))}return t}getBinderAttributes(){const t=[];for(const r in this.binders){const s=this.binders[r];if(s instanceof ls||s instanceof Cn)for(let u=0;u<s.paintVertexAttributes.length;u++)t.push(s.paintVertexAttributes[u].name);else if(s instanceof Ws)for(let u=0;u<qs.members.length;u++)t.push(qs.members[u].name)}return t}getBinderUniforms(){const t=[];for(const r in this.binders){const s=this.binders[r];if(s instanceof Vl||s instanceof Ao||s instanceof Cn)for(const u of s.uniformNames)t.push(u)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,r){const s=[];for(const u in this.binders){const d=this.binders[u];if(d instanceof Vl||d instanceof Ao||d instanceof Cn){for(const p of d.uniformNames)if(r[p]){const m=d.getBinding(t,r[p],p);s.push({name:p,property:u,binding:m})}}}return s}setUniforms(t,r,s,u){for(const{name:d,property:p,binding:m}of r)this.binders[p].setUniform(m,u,s.get(p),d)}updatePaintBuffers(t){this._buffers=[];for(const r in this.binders){const s=this.binders[r];if(t&&s instanceof Ws){const u=t.fromScale===2?s.zoomInPaintVertexBuffer:s.zoomOutPaintVertexBuffer;u&&this._buffers.push(u)}else(s instanceof ls||s instanceof Cn)&&s.paintVertexBuffer&&this._buffers.push(s.paintVertexBuffer)}}upload(t){for(const r in this.binders){const s=this.binders[r];(s instanceof ls||s instanceof Cn||s instanceof Ws)&&s.upload(t)}this.updatePaintBuffers()}destroy(){for(const t in this.binders){const r=this.binders[t];(r instanceof ls||r instanceof Cn||r instanceof Ws)&&r.destroy()}}}class La{constructor(t,r,s=()=>!0){this.programConfigurations={};for(const u of t)this.programConfigurations[u.id]=new Zd(u,r,s);this.needsUpload=!1,this._featureMap=new Ma,this._bufferOffset=0}populatePaintArrays(t,r,s,u,d,p){for(const m in this.programConfigurations)this.programConfigurations[m].populatePaintArrays(t,r,u,d,p);r.id!==void 0&&this._featureMap.add(r.id,s,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,r,s,u){for(const d of s)this.needsUpload=this.programConfigurations[d.id].updatePaintArrays(t,this._featureMap,r,d,u)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const r in this.programConfigurations)this.programConfigurations[r].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}function fg(i,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["ga
12pwidth"],"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"]}[i]||[i.replace(`${t}-`,"").replace(/-/g,"_")]}function Hd(i,t,r){const s={color:{source:H,composite:zt},number:{source:Qe,composite:H}},u=function(d){return{"line-pattern":{source:Vr,composite:Vr},"fill-pattern":{source:Vr,composite:Vr},"fill-extrusion-pattern":{source:Vr,composite:Vr}}[d]}(i);return u&&u[r]||s[t][r]}ot("ConstantBinder",Vl),ot("CrossFadedConstantBinder",Ao),ot("SourceExpressionBinder",ls),ot("CrossFadedCompositeBinder",Ws),ot("CompositeExpressionBinder",Cn),ot("ProgramConfiguration",Zd,{omit:["_buffers"]}),ot("ProgramConfigurationSet",La);const Bi=8192,vh=Math.pow(2,14)-1,Wd=-vh-1;function Ra(i){const t=Bi/i.extent,r=i.loadGeometry();for(let s=0;s<r.length;s++){const u=r[s];for(let d=0;d<u.length;d++){const p=u[d],m=Math.round(p.x*t),v=Math.round(p.y*t);p.x=Ue(m,Wd,vh),p.y=Ue(v,Wd,vh),(m<p.x||m>p.x+1||v<p.y||v>p.y+1)&&Ct("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function Ba(i,t){return{type:i.type,id:i.id,properties:i.properties,geometry:t?Ra(i):[]}}function Yu(i,t,r,s,u){i.emplaceBack(2*t+(s+1)/2,2*r+(u+1)/2)}class xh{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(r=>r.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new ur,this.indexArray=new tn,this.segments=new Ut,this.programConfigurations=new La(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(t,r,s){const u=this.layers[0],d=[];let p=null,m=!1;u.type==="circle"&&(p=u.layout.get("circle-sort-key"),m=!p.isConstant());for(const{feature:v,id:S,index:z,sourceLayerIndex:E}of t){const R=this.layers[0]._featureFilter.needGeometry,j=Ba(v,R);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),j,s))continue;const N=m?p.evaluate(j,{},s):void 0,q={id:S,properties:v.properties,type:v.type,sourceLayerIndex:E,index:z,geometry:R?j.geometry:Ra(v),patterns:{},sortKey:N};d.push(q)}m&&d.sort((v,S)=>v.sortKey-S.sortKey);for(const v of d){const{geometry:S,index:z,sourceLayerIndex:E}=v,R=t[z].feature;this.addFeature(v,S,z,s),r.featureIndex.insert(R,S,z,E,this.index)}}update(t,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Er),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,r,s,u){for(const d of r)for(const p of d){const m=p.x,v=p.y;if(m<0||m>=Bi||v<0||v>=Bi)continue;const S=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),z=S.vertexLength;Yu(this.layoutVertexArray,m,v,-1,-1),Yu(this.layoutVertexArray,m,v,1,-1),Yu(this.layoutVertexArray,m,v,1,1),Yu(this.layoutVertexArray,m,v,-1,1),this.indexArray.emplaceBack(z,z+1,z+2),this.indexArray.emplaceBack(z,z+3,z+2),S.vertexLength+=4,S.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,{},u)}}function Xd(i,t){for(let r=0;r<i.length;r++)if(Po(t,i[r]))return!0;for(let r=0;r<t.length;r++)if(Po(i,t[r]))return!0;return!!bh(i,t)}function mg(i,t,r){return!!Po(i,t)||!!wh(t,i,r)}function Kd(i,t){if(i.length===1)return Jd(t,i[0]);for(let r=0;r<t.length;r++){const s=t[r];for(let u=0;u<s.length;u++)if(Po(i,s[u]))return!0}for(let r=0;r<i.length;r++)if(Jd(t,i[r]))return!0;for(let r=0;r<t.length;r++)if(bh(i,t[r]))return!0;return!1}function gg(i,t,r){if(i.length>1){if(bh(i,t))return!0;for(let s=0;s<t.length;s++)if(wh(t[s],i,r))return!0}for(let s=0;s<i.length;s++)if(wh(i[s],t,r))return!0;return!1}function bh(i,t){if(i.length===0||t.length===0)return!1;for(let r=0;r<i.length-1;r++){const s=i[r],u=i[r+1];for(let d=0;d<t.length-1;d++)if(_g(s,u,t[d],t[d+1]))return!0}return!1}function _g(i,t,r,s){return Lt(i,r,s)!==Lt(t,r,s)&&Lt(i,t,r)!==Lt(i,t,s)}function wh(i,t,r){const s=r*r;if(t.length===1)return i.distSqr(t[0])<s;for(let u=1;u<t.length;u++)if(Yd(i,t[u-1],t[u])<s)return!0;return!1}function Yd(i,t,r){const s=t.distSqr(r);if(s===0)return i.distSqr(t);const u=((i.x-t.x)*(r.x-t.x)+(i.y-t.y)*(r.y-t.y))/s;return i.distSqr(u<0?t:u>1?r:r.sub(t)._mult(u)._add(t))}function Jd(i,t){let r,s,u,d=!1;for(let p=0;p<i.length;p++){r=i[p];for(let m=0,v=r.length-1;m<r.length;v=m++)s=r[m],u=r[v],s.y>t.y!=u.y>t.y&&t.x<(u.x-s.x)*(t.y-s.y)/(u.y-s.y)+s.x&&(d=!d)}return d}function Po(i,t){let r=!1;for(let s=0,u=i.length-1;s<i.length;u=s++){const d=i[s],p=i[u];d.y>t.y!=p.y>t.y&&t.x<(p.x-d.x)*(t.y-d.y)/(p.y-d.y)+d.x&&(r=!r)}return r}function yg(i,t,r){const s=r[0],u=r[2];if(i.x<s.x&&t.x<s.x||i.x>u.x&&t.x>u.x||i.y<s.y&&t.y<s.y||i.y>u.y&&t.y>u.y)return!1;const d=Lt(i,t,r[0]);return d!==Lt(i,t,r[1])||d!==Lt(i,t,r[2])||d!==Lt(i,t,r[3])}function Nl(i,t,r){const s=t.paint.get(i).value;return s.kind==="constant"?s.value:r.programConfigurations.get(t.id).getMaxValue(i)}function Ju(i){return Math.sqrt(i[0]*i[0]+i[1]*i[1])}function Qu(i,t,r,s,u){if(!t[0]&&!t[1])return i;const d=F.convert(t)._mult(u);r==="viewport"&&d._rotate(-s);const p=[];for(let m=0;m<i.length;m++)p.push(i[m].sub(d));return p}let Qd,ep;ot("CircleBucket",xh,{omit:["layers"]});var vg={get paint(){return ep=ep||new h({"circle-radius":new bt(Ce.paint_circle["circle-radius"]),"circle-color":new bt(Ce.paint_circle["circle-color"]),"circle-blur":new bt(Ce.paint_circle["circle-blur"]),"circle-opacity":new bt(Ce.paint_circle["circle-opacity"]),"circle-translate":new ct(Ce.paint_circle["circle-translate"]),"circle-translate-anchor":new ct(Ce.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ct(Ce.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ct(Ce.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new bt(Ce.paint_circle["circle-stroke-width"]),"circle-stroke-color":new bt(Ce.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new bt(Ce.paint_circle["circle-stroke-opacity"])})},get layout(){return Qd=Qd||new h({"circle-sort-key":new bt(Ce.layout_circle["circle-sort-key"])})}},_r=1e-6,Io=typeof Float32Array<"u"?Float32Array:Array;function kh(i){return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=1,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=1,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}function tp(i,t,r){var s=t[0],u=t[1],d=t[2],p=t[3],m=t[4],v=t[5],S=t[6],z=t[7],E=t[8],R=t[9],j=t[10],N=t[11],q=t[12],K=t[13],ie=t[14],ke=t[15],ce=r[0],xe=r[1],Pe=r[2],$e=r[3];return i[0]=ce*s+xe*m+Pe*E+$e*q,i[1]=ce*u+xe*v+Pe*R+$e*K,i[2]=ce*d+xe*S+Pe*j+$e*ie,i[3]=ce*p+xe*z+Pe*N+$e*ke,i[4]=(ce=r[4])*s+(xe=r[5])*m+(Pe=r[6])*E+($e=r[7]
vendor: 14,855 bytes, line 12
12)*q,i[5]=ce*u+xe*v+Pe*R+$e*K,i[6]=ce*d+xe*S+Pe*j+$e*ie,i[7]=ce*p+xe*z+Pe*N+$e*ke,i[8]=(ce=r[8])*s+(xe=r[9])*m+(Pe=r[10])*E+($e=r[11])*q,i[9]=ce*u+xe*v+Pe*R+$e*K,i[10]=ce*d+xe*S+Pe*j+$e*ie,i[11]=ce*p+xe*z+Pe*N+$e*ke,i[12]=(ce=r[12])*s+(xe=r[13])*m+(Pe=r[14])*E+($e=r[15])*q,i[13]=ce*u+xe*v+Pe*R+$e*K,i[14]=ce*d+xe*S+Pe*j+$e*ie,i[15]=ce*p+xe*z+Pe*N+$e*ke,i}Math.hypot||(Math.hypot=function(){for(var i=0,t=arguments.length;t--;)i+=arguments[t]*arguments[t];return Math.sqrt(i)});var Ul,xg=tp;function ec(i,t,r){var s=t[0],u=t[1],d=t[2],p=t[3];return i[0]=r[0]*s+r[4]*u+r[8]*d+r[12]*p,i[1]=r[1]*s+r[5]*u+r[9]*d+r[13]*p,i[2]=r[2]*s+r[6]*u+r[10]*d+r[14]*p,i[3]=r[3]*s+r[7]*u+r[11]*d+r[15]*p,i}Ul=new Io(4),Io!=Float32Array&&(Ul[0]=0,Ul[1]=0,Ul[2]=0,Ul[3]=0);class bg extends n{constructor(t){super(t,vg)}createBucket(t){return new xh(t)}queryRadius(t){const r=t;return Nl("circle-radius",this,r)+Nl("circle-stroke-width",this,r)+Ju(this.paint.get("circle-translate"))}queryIntersectsFeature(t,r,s,u,d,p,m,v){const S=Qu(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),p.angle,m),z=this.paint.get("circle-radius").evaluate(r,s)+this.paint.get("circle-stroke-width").evaluate(r,s),E=this.paint.get("circle-pitch-alignment")==="map",R=E?S:function(N,q){return N.map(K=>ip(K,q))}(S,v),j=E?z*m:z;for(const N of u)for(const q of N){const K=E?q:ip(q,v);let ie=j;const ke=ec([],[q.x,q.y,0,1],v);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ie*=ke[3]/p.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ie*=p.cameraToCenterDistance/ke[3]),mg(R,K,ie))return!0}return!1}}function ip(i,t){const r=ec([],[i.x,i.y,0,1],t);return new F(r[0]/r[3],r[1]/r[3])}class rp extends xh{}let np;ot("HeatmapBucket",rp,{omit:["layers"]});var wg={get paint(){return np=np||new h({"heatmap-radius":new bt(Ce.paint_heatmap["heatmap-radius"]),"heatmap-weight":new bt(Ce.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ct(Ce.paint_heatmap["heatmap-intensity"]),"heatmap-color":new $l(Ce.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ct(Ce.paint_heatmap["heatmap-opacity"])})}};function Sh(i,{width:t,height:r},s,u){if(u){if(u instanceof Uint8ClampedArray)u=new Uint8Array(u.buffer);else if(u.length!==t*r*s)throw new RangeError(`mismatched image size. expected: ${u.length} but got: ${t*r*s}`)}else u=new Uint8Array(t*r*s);return i.width=t,i.height=r,i.data=u,i}function sp(i,{width:t,height:r},s){if(t===i.width&&r===i.height)return;const u=Sh({},{width:t,height:r},s);Th(i,u,{x:0,y:0},{x:0,y:0},{width:Math.min(i.width,t),height:Math.min(i.height,r)},s),i.width=t,i.height=r,i.data=u.data}function Th(i,t,r,s,u,d){if(u.width===0||u.height===0)return t;if(u.width>i.width||u.height>i.height||r.x>i.width-u.width||r.y>i.height-u.height)throw new RangeError("out of range source coordinates for image copy");if(u.width>t.width||u.height>t.height||s.x>t.width-u.width||s.y>t.height-u.height)throw new RangeError("out of range destination coordinates for image copy");const p=i.data,m=t.data;if(p===m)throw new Error("srcData equals dstData, so image is already copied");for(let v=0;v<u.height;v++){const S=((r.y+v)*i.width+r.x)*d,z=((s.y+v)*t.width+s.x)*d;for(let E=0;E<u.width*d;E++)m[z+E]=p[S+E]}return t}class Gl{constructor(t,r){Sh(this,t,1,r)}resize(t){sp(this,t,1)}clone(){return new Gl({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,r,s,u,d){Th(t,r,s,u,d,1)}}class rn{constructor(t,r){Sh(this,t,4,r)}resize(t){sp(this,t,4)}replace(t,r){r?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new rn({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,r,s,u,d){Th(t,r,s,u,d,4)}}function ap(i){const t={},r=i.resolution||256,s=i.clips?i.clips.length:1,u=i.image||new rn({width:r,height:s});if(Math.log(r)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${r}`);const d=(p,m,v)=>{t[i.evaluationKey]=v;const S=i.expression.evaluate(t);u.data[p+m+0]=Math.floor(255*S.r/S.a),u.data[p+m+1]=Math.floor(255*S.g/S.a),u.data[p+m+2]=Math.floor(255*S.b/S.a),u.data[p+m+3]=Math.floor(255*S.a)};if(i.clips)for(let p=0,m=0;p<s;++p,m+=4*r)for(let v=0,S=0;v<r;v++,S+=4){const z=v/(r-1),{start:E,end:R}=i.clips[p];d(m,S,E*(1-z)+R*z)}else for(let p=0,m=0;p<r;p++,m+=4)d(0,m,p/(r-1));return u}ot("AlphaImage",Gl),ot("RGBAImage",rn);const zh="big-fb";class kg extends n{createBucket(t){return new rp(t)}constructor(t){super(t,wg),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){t==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=ap({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(zh)&&this.heatmapFbos.delete(zh)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let op;var Sg={get paint(){return op=op||new h({"hillshade-illumination-direction":new ct(Ce.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new ct(Ce.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new ct(Ce.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new ct(Ce.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new ct(Ce.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new ct(Ce.paint_hillshade["hillshade-accent-color"])})}};class Tg extends n{constructor(t){super(t,Sg)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}const zg=g([{name:"a_pos",components:2,type:"Int16"}],4),{members:Cg}=zg;function lp(i,t,r=2){const s=t&&t.length,u=s?t[0]*r:i.length;let d=up(i,0,u,r,!0);const p=[];if(!d||d.next===d.prev)return p;let m,v,S;if(s&&(d=function(z,E,R,j){const N=[];for(let q=0,K=E.length;q<K;q++){const ie=up(z,E[q]*j,q<K-1?E[q+1]*j:z.length,j,!1);ie===ie.next&&(ie.steiner=!0),N.push(Rg(ie))}N.sort(Mg);for(let q=0;q<N.length;q++)R=Dg(N[q],R);return R}(i,t,d,r)),i.length>80*r){m=1/0,v=1/0;let z=-1/0,E=-1/0;for(let R=r;R<u;R+=r){const j=i[R],N=i[R+1];j<m&&(m=j),N<v&&(v=N),j>z&&(z=j),N>E&&(E=N)}S=Math.max(z-m,E-v),S=S!==0?32767/S:0}return ql(d,p,r,m,v,S,0),p}function up(i,t,r,s,u){let d;if(u===function(p,m,v,S){let z=0;for(let E=m,R=v-S;E<v;E+=S)z+=(p[R]-p[E])*(p[E+1]+p[R+1]),R=E;return z}(i,t,r,s)>0)for(let p=t;p<r;p+=s)d=dp(p/s|0,i[p],i[p+1],d);else for(let p=r-s;p>=t;p-=s)d=dp(p/s|0,i[p],i[p+1],d);return d&&tc(d,d.next)&&(Hl(d),d=d.next),d}function Fa(i,t){if(!i)return i;t||(t=i);let r,s=i;do if(r=!1,s.steiner||!tc(s,s.next)&&Mi(s.prev,s,s.next)!==0)s=s.next;else{if(Hl(s),s=t=s.prev,s===s.next)break;r=!0}while(r||s!==t);return t}function ql(i,t,r,s,u,d,p){if(!i)return;!p&&d&&function(v,S,z,E){let R=v;do R.z===0&&(R.z=Ch(R.x,R.y,S,z,E)),R.prevZ=R.prev,R.nextZ=R.next,R=R.next;while(R!==v);R.prevZ.nextZ=null,R.prevZ=null,function(j){let N,q=1;do{let K,ie=j;j=null;let ke=null;for(N=0;ie;){N++;let ce=ie,xe=0;for(let $e=0;$e<q&&(xe++,ce=ce.nextZ,ce);$e++);let Pe=q;for(;xe>0||Pe>0&&ce;)xe!==0&&(Pe===0||!ce||ie.z<=ce.z)?(K=ie,ie=ie.nextZ,xe--):(K=ce,ce=ce.nextZ,Pe--),ke?ke.nextZ=K:j=K,K.prevZ=ke,ke=K;ie=ce}ke.nextZ=null,q*=2}while(N>1)}(R)}(i,s,u,d);let m=i;for(;i.prev!==i.next;){const v=i.prev,S=i.next;if(d?Pg(i,s,u,d):Ag(i))t.push(v.i,i.i,S.i),Hl(i),i=S.next,m=S.next;else if((i=S)===m){p?p===1?ql(i=Ig(Fa(i),t),t,r,s,u,d,2):p===2&&Eg(i,t,r,s,u,d):ql(Fa(i),t,r,s,u,d,1);break}}}function Ag(i){const t=i.prev,r=i,s=i.next;if(Mi(t,r,s)>=0)return!1;const u=t.x,d=r.x,p=s.x,m=t.y,v=r.y,S=s.y,z=u<d?u<p?u:p:d<p?d:p,E=m<v?m<S?m:S:v<S?v:S,R=u>d?u>p?u:p:d>p?d:p,j=m>v?m>S?m:S:v>S?v:S;let N=s.next;for(;N!==t;){if(N.x>=z&&N.x<=R&&N.y>=E&&N.y<=j&&Eo(u,m,d,v,p,S,N.x,N.y)&&Mi(N.prev,N,N.next)>=0)return!1;N=N.next}return!0}function Pg(i,t,r,s){const u=i.prev,d=i,p=i.next;if(Mi(u,d,p)>=0)return!1;const m=u.x,v=d.x,S=p.x,z=u.y,E=d.y,R=p.y,j=m<v?m<S?m:S:v<S?v:S,N=z<E?z<R?z:R:E<R?E:R,q=m>v?m>S?m:S:v>S?v:S,K=z>E?z>R?z:R:E>R?E:R,ie=Ch(j,N,t,r,s),ke=Ch(q,K,t,r,s);let ce=i.prevZ,xe=i.nextZ;for(;ce&&ce.z>=ie&&xe&&xe.z<=ke;){if(ce.x>=j&&ce.x<=q&&ce.y>=N&&ce.y<=K&&ce!==u&&ce!==p&&Eo(m,z,v,E,S,R,ce.x,ce.y)&&Mi(ce.prev,ce,ce.next)>=0||(ce=ce.prevZ,xe.x>=j&&xe.x<=q&&xe.y>=N&&xe.y<=K&&xe!==u&&xe!==p&&Eo(m,z,v,E,S,R,xe.x,xe.y)&&Mi(xe.prev,xe,xe.next)>=0))return!1;xe=xe.nextZ}for(;ce&&ce.z>=ie;){if(ce.x>=j&&ce.x<=q&&ce.y>=N&&ce.y<=K&&ce!==u&&ce!==p&&Eo(m,z,v,E,S,R,ce.x,ce.y)&&Mi(ce.prev,ce,ce.next)>=0)return!1;ce=ce.prevZ}for(;xe&&xe.z<=ke;){if(xe.x>=j&&xe.x<=q&&xe.y>=N&&xe.y<=K&&xe!==u&&xe!==p&&Eo(m,z,v,E,S,R,xe.x,xe.y)&&Mi(xe.prev,xe,xe.next)>=0)return!1;xe=xe.nextZ}return!0}function Ig(i,t){let r=i;do{const s=r.prev,u=r.next.next;!tc(s,u)&&cp(s,r,r.next,u)&&Zl(s,u)&&Zl(u,s)&&(t.push(s.i,r.i,u.i),Hl(r),Hl(r.next),r=i=u),r=r.next}while(r!==i);return Fa(r)}function Eg(i,t,r,s,u,d){let p=i;do{let m=p.next.next;for(;m!==p.prev;){if(p.i!==m.i&&Bg(p,m)){let v=hp(p,m);return p=Fa(p,p.next),v=Fa(v,v.next),ql(p,t,r,s,u,d,0),void ql(v,t,r,s,u,d,0)}m=m.next}p=p.next}while(p!==i)}function Mg(i,t){return i.x-t.x}function Dg(i,t){const r=function(u,d){let p=d;const m=u.x,v=u.y;let S,z=-1/0;do{if(v<=p.y&&v>=p.next.y&&p.next.y!==p.y){const q=p.x+(v-p.y)*(p.next.x-p.x)/(p.next.y-p.y);if(q<=m&&q>z&&(z=q,S=p.x<p.next.x?p:p.next,q===m))return S}p=p.next}while(p!==d);if(!S)return null;const E=S,R=S.x,j=S.y;let N=1/0;p=S;do{if(m>=p.x&&p.x>=R&&m!==p.x&&Eo(v<j?m:z,v,R,j,v<j?z:m,v,p.x,p.y)){const q=Math.abs(v-p.y)/(m-p.x);Zl(p,u)&&(q<N||q===N&&(p.x>S.x||p.x===S.x&&Lg(S,p)))&&(S=p,N=q)}p=p.next}while(p!==E);return S}(i,t);if(!r)return t;const s=hp(r,i);return Fa(s,s.next),Fa(r,r.next)}function Lg(i,t){return Mi(i.prev,i,t.prev)<0&&Mi(t.next,i,i.next)<0}function Ch(i,t,r,s,u){return(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=(i-r)*u|0)|i<<8))|i<<4))|i<<2))|i<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-s)*u|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Rg(i){let t=i,r=i;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==i);return r}function Eo(i,t,r,s,u,d,p,m){return(u-p)*(t-m)>=(i-p)*(d-m)&&(i-p)*(s-m)>=(r-p)*(t-m)&&(r-p)*(d-m)>=(u-p)*(s-m)}function Bg(i,t){return i.next.i!==t.i&&i.prev.i!==t.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&&cp(u,u.next,r,s))return!0;u=u.next}while(u!==r);return!1}(i,t)&&(Zl(i,t)&&Zl(t,i)&&function(r,s){let u=r,d=!1;const p=(r.x+s.x)/2,m=(r.y+s.y)/2;do u.y>m!=u.next.y>m&&u.next.y!==u.y&&p<(u.next.x-u.x)*(m-u.y)/(u.next.y-u.y)+u.x&&(d=!d),u=u.next;while(u!==r);return d}(i,t)&&(Mi(i.prev,i,t.prev)||Mi(i,t.prev,t))||tc(i,t)&&Mi(i.prev,i,i.next)>0&&Mi(t.prev,t,t.next)>0)}function Mi(i,t,r){return(t.y-i.y)*(r.x-t.x)-(t.x-i.x)*(r.y-t.y)}function tc(i,t){return i.x===t.x&&i.y===t.y}function cp(i,t,r,s){const u=rc(Mi(i,t,r)),d=rc(Mi(i,t,s)),p=rc(Mi(r,s,i)),m=rc(Mi(r,s,t));return u!==d&&p!==m||!(u!==0||!ic(i,r,t))||!(d!==0||!ic(i,s,t))||!(p!==0||!ic(r,i,s))||!(m!==0||!ic(r,t,s))}function ic(i,t,r){return t.x<=Math.max(i.x,r.x)&&t.x>=Math.min(i.x,r.x)&&t.y<=Math.max(i.y,r.y)&&t.y>=Math.min(i.y,r.y)}function rc(i){return i>0?1:i<0?-1:0}function Zl(i,t){return Mi(i.prev,i,i.next)<0?Mi(i,t,i.next)>=0&&Mi(i,i.prev,t)>=0:Mi(i,t,i.prev)<0||Mi(i,i.next,t)<0}function hp(i,t){const r=Ah(i.i,i.x,i.y),s=Ah(t.i,t.x,t.y),u=i.next,d=t.prev;return i.next=t,t.prev=i,r.next=u,u.prev=r,s.next=r,r.prev=s,d.next=s,s.prev=d,s}function dp(i,t,r,s){const u=Ah(i,t,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 Hl(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function Ah(i,t,r){return{i,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ph(i,t,r){const s=r.patternDependencies;let u=!1;for(const d of t){const p=d.paint.get(`${i}-pattern`);p.isConstant()||(u=!0);const m=p.constantOr(null);m&&(u=!0,s[m.to]=!0,s[m.from]=!0)}return u}function Ih(i,t,r,s,u){const d=u.patternDependencies;for(const p of t){const m=p.paint.get(`${i}-pattern`).value;if(m.kind!=="constant"){let v=m.evaluate({zoom:s-1},r,{},u.availableImages),S=m.evaluate({zoom:s},r,{},u.availableImages),z=m.evaluate({zoom:s+1},r,{},u.availableImages);v=v&&v.name?v.name:v,S=S&&S.name?S.name:S,z=z&&z.name?z.name:z,d[v]=!0,d[S]=!0,d[z]=!0,r.patterns[p.id]={min:v,mid:S,max:z}}}return r}class Eh{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(r=>r.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new yn,this.indexArray=new tn,this.indexArray2=new qi,this.programConfigurations=new La(t.layers,t.zoom),this.segments=new Ut,this.segments2=new Ut,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(t,r,s){this.hasPattern=Ph("fill",this.layers,r);const u=this.layers[0].layout.get("fill-sort-key"),d=!u.isConstant(),p=[];for(const{feature:m,id:v,index:S,sourceLayerIndex:z}of t){const E=this.layers[0]._featureFilter.needGeometry,R=Ba(m,E);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),R,s))continue;const j=d?u.evaluate(R,{},s,r.availableImages):void 0,N={id:v,properties:m.properties,type:m.type,sourceLayerIndex:z,index:S,geometry:E?R.geometry:Ra(m),patterns:{},sortKey:j};p.push(N)}d&&p.sort((m,v)=>m.sortKey-v.sortKey);for(const m of p){const{geometry:v,index:S,sourceLayerIndex:z}=m;if(this.hasPattern){const E=Ih("fill",this.layers,m,this.zoom,r);this.patternFeatures.push(E)}else this.addFeature(m,v,S,s,{});r.featureIndex.insert(t[S].feature,v,S,z,this.index)}}update(t,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,s)}addFeatures(t,r,s){for(const u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,r,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Cg),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,r,s,u,d){for(const p of eo(r,500)){let m=0;for(const j of p)m+=j.length;const v=this.segments.prepareSegment(m,this.layoutVertexArray,this.indexArray),S=v.vertexLength,z=[],E=[];
12for(const j of p){if(j.length===0)continue;j!==p[0]&&E.push(z.length/2);const N=this.segments2.prepareSegment(j.length,this.layoutVertexArray,this.indexArray2),q=N.vertexLength;this.layoutVertexArray.emplaceBack(j[0].x,j[0].y),this.indexArray2.emplaceBack(q+j.length-1,q),z.push(j[0].x),z.push(j[0].y);for(let K=1;K<j.length;K++)this.layoutVertexArray.emplaceBack(j[K].x,j[K].y),this.indexArray2.emplaceBack(q+K-1,q+K),z.push(j[K].x),z.push(j[K].y);N.vertexLength+=j.length,N.primitiveLength+=j.length}const R=lp(z,E);for(let j=0;j<R.length;j+=3)this.indexArray.emplaceBack(S+R[j],S+R[j+1],S+R[j+2]);v.vertexLength+=m,v.primitiveLength+=R.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,d,u)}}let pp,fp;ot("FillBucket",Eh,{omit:["layers","patternFeatures"]});var Fg={get paint(){return fp=fp||new h({"fill-antialias":new ct(Ce.paint_fill["fill-antialias"]),"fill-opacity":new bt(Ce.paint_fill["fill-opacity"]),"fill-color":new bt(Ce.paint_fill["fill-color"]),"fill-outline-color":new bt(Ce.paint_fill["fill-outline-color"]),"fill-translate":new ct(Ce.paint_fill["fill-translate"]),"fill-translate-anchor":new ct(Ce.paint_fill["fill-translate-anchor"]),"fill-pattern":new bo(Ce.paint_fill["fill-pattern"])})},get layout(){return pp=pp||new h({"fill-sort-key":new bt(Ce.layout_fill["fill-sort-key"])})}};class Og extends n{constructor(t){super(t,Fg)}recalculate(t,r){super.recalculate(t,r);const 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(t){return new Eh(t)}queryRadius(){return Ju(this.paint.get("fill-translate"))}queryIntersectsFeature(t,r,s,u,d,p,m){return Kd(Qu(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),p.angle,m),u)}isTileClipped(){return!0}}const $g=g([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),jg=g([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Vg}=$g;var Xs={},Ng=W,mp=Mo;function Mo(i,t,r,s,u){this.properties={},this.extent=r,this.type=0,this._pbf=i,this._geometry=-1,this._keys=s,this._values=u,i.readFields(Ug,this,t)}function Ug(i,t,r){i==1?t.id=r.readVarint():i==2?function(s,u){for(var d=s.readVarint()+s.pos;s.pos<d;){var p=u._keys[s.readVarint()],m=u._values[s.readVarint()];u.properties[p]=m}}(r,t):i==3?t.type=r.readVarint():i==4&&(t._geometry=r.pos)}function Gg(i){for(var t,r,s=0,u=0,d=i.length,p=d-1;u<d;p=u++)s+=((r=i[p]).x-(t=i[u]).x)*(t.y+r.y);return s}Mo.types=["Unknown","Point","LineString","Polygon"],Mo.prototype.loadGeometry=function(){var i=this._pbf;i.pos=this._geometry;for(var t,r=i.readVarint()+i.pos,s=1,u=0,d=0,p=0,m=[];i.pos<r;){if(u<=0){var v=i.readVarint();s=7&v,u=v>>3}if(u--,s===1||s===2)d+=i.readSVarint(),p+=i.readSVarint(),s===1&&(t&&m.push(t),t=[]),t.push(new Ng(d,p));else{if(s!==7)throw new Error("unknown command "+s);t&&t.push(t[0].clone())}}return t&&m.push(t),m},Mo.prototype.bbox=function(){var i=this._pbf;i.pos=this._geometry;for(var t=i.readVarint()+i.pos,r=1,s=0,u=0,d=0,p=1/0,m=-1/0,v=1/0,S=-1/0;i.pos<t;){if(s<=0){var z=i.readVarint();r=7&z,s=z>>3}if(s--,r===1||r===2)(u+=i.readSVarint())<p&&(p=u),u>m&&(m=u),(d+=i.readSVarint())<v&&(v=d),d>S&&(S=d);else if(r!==7)throw new Error("unknown command "+r)}return[p,v,m,S]},Mo.prototype.toGeoJSON=function(i,t,r){var s,u,d=this.extent*Math.pow(2,r),p=this.extent*i,m=this.extent*t,v=this.loadGeometry(),S=Mo.types[this.type];function z(j){for(var N=0;N<j.length;N++){var q=j[N];j[N]=[360*(q.x+p)/d-180,360/Math.PI*Math.atan(Math.exp((180-360*(q.y+m)/d)*Math.PI/180))-90]}}switch(this.type){case 1:var E=[];for(s=0;s<v.length;s++)E[s]=v[s][0];z(v=E);break;case 2:for(s=0;s<v.length;s++)z(v[s]);break;case 3:for(v=function(j){var N=j.length;if(N<=1)return[j];for(var q,K,ie=[],ke=0;ke<N;ke++){var ce=Gg(j[ke]);ce!==0&&(K===void 0&&(K=ce<0),K===ce<0?(q&&ie.push(q),q=[j[ke]]):q.push(j[ke]))}return q&&ie.push(q),ie}(v),s=0;s<v.length;s++)for(u=0;u<v[s].length;u++)z(v[s][u])}v.length===1?v=v[0]:S="Multi"+S;var R={type:"Feature",geometry:{type:S,coordinates:v},properties:this.properties};return"id"in this&&(R.id=this.id),R};var qg=mp,gp=_p;function _p(i,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=i,this._keys=[],this._values=[],this._features=[],i.readFields(Zg,this,t),this.length=this._features.length}function Zg(i,t,r){i===15?t.version=r.readVarint():i===1?t.name=r.readString():i===5?t.extent=r.readVarint():i===2?t._features.push(r.pos):i===3?t._keys.push(r.readString()):i===4&&t._values.push(function(s){for(var u=null,d=s.readVarint()+s.pos;s.pos<d;){var p=s.readVarint()>>3;u=p===1?s.readString():p===2?s.readFloat():p===3?s.readDouble():p===4?s.readVarint64():p===5?s.readVarint():p===6?s.readSVarint():p===7?s.readBoolean():null}return u}(r))}_p.prototype.feature=function(i){if(i<0||i>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[i];var t=this._pbf.readVarint()+this._pbf.pos;return new qg(this._pbf,t,this.extent,this._keys,this._values)};var Hg=gp;function Wg(i,t,r){if(i===3){var s=new Hg(r,r.readVarint()+r.pos);s.length&&(t[s.name]=s)}}Xs.VectorTile=function(i,t){this.layers=i.readFields(Wg,{},t)},Xs.VectorTileFeature=mp,Xs.VectorTileLayer=gp;const Xg=Xs.VectorTileFeature.types,Mh=Math.pow(2,13);function Wl(i,t,r,s,u,d,p,m){i.emplaceBack(t,r,2*Math.floor(s*Mh)+p,u*Mh*2,d*Mh*2,Math.round(m))}class Dh{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(r=>r.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Us,this.centroidVertexArray=new Yi,this.indexArray=new tn,this.programConfigurations=new La(t.layers,t.zoom),this.segments=new Ut,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(t,r,s){this.features=[],this.hasPattern=Ph("fill-extrusion",this.layers,r);for(const{feature:u,id:d,index:p,sourceLayerIndex:m}of t){const v=this.layers[0]._featureFilter.needGeometry,S=Ba(u,v);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),S,s))continue;const z={id:d,sourceLayerIndex:m,index:p,geometry:v?S.geometry:Ra(u),properties:u.properties,type:u.type,patterns:{}};this.hasPattern?this.features.push(Ih("fill-extrusion",this.layers,z,this.zoom,r)):this.addFeature(z,z.geometry,p,s,{}),r.featureIndex.insert(u,z.geometry,p,m,this.index,!0)}}addFeatures(t,r,s){for(const u of this.features){const{geometry:d}=u;this.addFeature(u,d,u.index,r,s)}}update(t,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Vg),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,jg.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,r,s,u,d){for(const p of eo(r,500)){const m={x:0,y:0,vertexCount:0};let v=0;for(const N of p)v+=N.length;let S=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);
vendor: 4,933 bytes, line 12
12for(const N of p){if(N.length===0||Yg(N))continue;let q=0;for(let K=0;K<N.length;K++){const ie=N[K];if(K>=1){const ke=N[K-1];if(!Kg(ie,ke)){S.vertexLength+4>Ut.MAX_VERTEX_ARRAY_LENGTH&&(S=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const ce=ie.sub(ke)._perp()._unit(),xe=ke.dist(ie);q+xe>32768&&(q=0),Wl(this.layoutVertexArray,ie.x,ie.y,ce.x,ce.y,0,0,q),Wl(this.layoutVertexArray,ie.x,ie.y,ce.x,ce.y,0,1,q),m.x+=2*ie.x,m.y+=2*ie.y,m.vertexCount+=2,q+=xe,Wl(this.layoutVertexArray,ke.x,ke.y,ce.x,ce.y,0,0,q),Wl(this.layoutVertexArray,ke.x,ke.y,ce.x,ce.y,0,1,q),m.x+=2*ke.x,m.y+=2*ke.y,m.vertexCount+=2;const Pe=S.vertexLength;this.indexArray.emplaceBack(Pe,Pe+2,Pe+1),this.indexArray.emplaceBack(Pe+1,Pe+2,Pe+3),S.vertexLength+=4,S.primitiveLength+=2}}}}if(S.vertexLength+v>Ut.MAX_VERTEX_ARRAY_LENGTH&&(S=this.segments.prepareSegment(v,this.layoutVertexArray,this.indexArray)),Xg[t.type]!=="Polygon")continue;const z=[],E=[],R=S.vertexLength;for(const N of p)if(N.length!==0){N!==p[0]&&E.push(z.length/2);for(let q=0;q<N.length;q++){const K=N[q];Wl(this.layoutVertexArray,K.x,K.y,0,0,1,1,0),m.x+=K.x,m.y+=K.y,m.vertexCount+=1,z.push(K.x),z.push(K.y)}}const j=lp(z,E);for(let N=0;N<j.length;N+=3)this.indexArray.emplaceBack(R+j[N],R+j[N+2],R+j[N+1]);S.primitiveLength+=j.length/3,S.vertexLength+=v;for(let N=0;N<m.vertexCount;N++){const q=Math.floor(m.x/m.vertexCount),K=Math.floor(m.y/m.vertexCount);this.centroidVertexArray.emplaceBack(q,K)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,d,u)}}function Kg(i,t){return i.x===t.x&&(i.x<0||i.x>Bi)||i.y===t.y&&(i.y<0||i.y>Bi)}function Yg(i){return i.every(t=>t.x<0)||i.every(t=>t.x>Bi)||i.every(t=>t.y<0)||i.every(t=>t.y>Bi)}let yp;ot("FillExtrusionBucket",Dh,{omit:["layers","features"]});var Jg={get paint(){return yp=yp||new h({"fill-extrusion-opacity":new ct(Ce["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new bt(Ce["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ct(Ce["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ct(Ce["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new bo(Ce["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new bt(Ce["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new bt(Ce["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ct(Ce["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Qg extends n{constructor(t){super(t,Jg)}createBucket(t){return new Dh(t)}queryRadius(){return Ju(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(t,r,s,u,d,p,m,v){const S=Qu(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),p.angle,m),z=this.paint.get("fill-extrusion-height").evaluate(r,s),E=this.paint.get("fill-extrusion-base").evaluate(r,s),R=function(N,q,K,ie){const ke=[];for(const ce of N){const xe=[ce.x,ce.y,0,1];ec(xe,xe,q),ke.push(new F(xe[0]/xe[3],xe[1]/xe[3]))}return ke}(S,v),j=function(N,q,K,ie){const ke=[],ce=[],xe=ie[8]*q,Pe=ie[9]*q,$e=ie[10]*q,rt=ie[11]*q,xt=ie[8]*K,et=ie[9]*K,Je=ie[10]*K,pt=ie[11]*K;for(const lt of N){const st=[],Me=[];for(const mt of lt){const dt=mt.x,Tt=mt.y,ui=ie[0]*dt+ie[4]*Tt+ie[12],oi=ie[1]*dt+ie[5]*Tt+ie[13],ji=ie[2]*dt+ie[6]*Tt+ie[14],vn=ie[3]*dt+ie[7]*Tt+ie[15],er=ji+$e,Vi=vn+rt,yr=ui+xt,vr=oi+et,xr=ji+Je,Ii=vn+pt,Ni=new F((ui+xe)/Vi,(oi+Pe)/Vi);Ni.z=er/Vi,st.push(Ni);const cr=new F(yr/Ii,vr/Ii);cr.z=xr/Ii,Me.push(cr)}ke.push(st),ce.push(Me)}return[ke,ce]}(u,E,z,v);return function(N,q,K){let ie=1/0;Kd(K,q)&&(ie=vp(K,q[0]));for(let ke=0;ke<q.length;ke++){const ce=q[ke],xe=N[ke];for(let Pe=0;Pe<ce.length-1;Pe++){const $e=ce[Pe],rt=[$e,ce[Pe+1],xe[Pe+1],xe[Pe],$e];Xd(K,rt)&&(ie=Math.min(ie,vp(K,rt)))}}return ie!==1/0&&ie}(j[0],j[1],R)}}function Xl(i,t){return i.x*t.x+i.y*t.y}function vp(i,t){if(i.length===1){let r=0;const s=t[r++];let u;for(;!u||s.equals(u);)if(u=t[r++],!u)return 1/0;for(;r<t.length;r++){const d=t[r],p=i[0],m=u.sub(s),v=d.sub(s),S=p.sub(s),z=Xl(m,m),E=Xl(m,v),R=Xl(v,v),j=Xl(S,m),N=Xl(S,v),q=z*R-E*E,K=(R*j-E*N)/q,ie=(z*N-E*j)/q,ke=s.z*(1-K-ie)+u.z*K+d.z*ie;if(isFinite(ke))return ke}return 1/0}{let r=1/0;for(const s of t)r=Math.min(r,s.z);return r}}const e_=g([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:t_}=e_,i_=g([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:r_}=i_,n_=Xs.VectorTileFeature.types,s_=Math.cos(Math.PI/180*37.5),xp=Math.pow(2,14)/.5;class Lh{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(r=>r.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={}
vendor: 5,003 bytes, line 12
12,this.layers.forEach(r=>{this.gradients[r.id]={}}),this.layoutVertexArray=new ko,this.layoutVertexArray2=new Gs,this.indexArray=new tn,this.programConfigurations=new La(t.layers,t.zoom),this.segments=new Ut,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(t,r,s){this.hasPattern=Ph("line",this.layers,r);const u=this.layers[0].layout.get("line-sort-key"),d=!u.isConstant(),p=[];for(const{feature:m,id:v,index:S,sourceLayerIndex:z}of t){const E=this.layers[0]._featureFilter.needGeometry,R=Ba(m,E);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),R,s))continue;const j=d?u.evaluate(R,{},s):void 0,N={id:v,properties:m.properties,type:m.type,sourceLayerIndex:z,index:S,geometry:E?R.geometry:Ra(m),patterns:{},sortKey:j};p.push(N)}d&&p.sort((m,v)=>m.sortKey-v.sortKey);for(const m of p){const{geometry:v,index:S,sourceLayerIndex:z}=m;if(this.hasPattern){const E=Ih("line",this.layers,m,this.zoom,r);this.patternFeatures.push(E)}else this.addFeature(m,v,S,s,{});r.featureIndex.insert(t[S].feature,v,S,z,this.index)}}update(t,r,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,s)}addFeatures(t,r,s){for(const u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,r,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,r_)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,t_),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,r,s,u,d){const p=this.layers[0].layout,m=p.get("line-join").evaluate(t,{}),v=p.get("line-cap"),S=p.get("line-miter-limit"),z=p.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const E of r)this.addLine(E,t,m,v,S,z);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,d,u)}addLine(t,r,s,u,d,p){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ie=0;ie<t.length-1;ie++)this.totalDistance+=t[ie].dist(t[ie+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const m=n_[r.type]==="Polygon";let v=t.length;for(;v>=2&&t[v-1].equals(t[v-2]);)v--;let S=0;for(;S<v-1&&t[S].equals(t[S+1]);)S++;if(v<(m?3:2))return;s==="bevel"&&(d=1.05);const z=this.overscaling<=16?15*Bi/(512*this.overscaling):0,E=this.segments.prepareSegment(10*v,this.layoutVertexArray,this.indexArray);let R,j,N,q,K;this.e1=this.e2=-1,m&&(R=t[v-2],K=t[S].sub(R)._unit()._perp());for(let ie=S;ie<v;ie++){if(N=ie===v-1?m?t[S+1]:void 0:t[ie+1],N&&t[ie].equals(N))continue;K&&(q=K),R&&(j=R),R=t[ie],K=N?N.sub(R)._unit()._perp():q,q=q||K;let ke=q.add(K);ke.x===0&&ke.y===0||ke._unit();const ce=q.x*K.x+q.y*K.y,xe=ke.x*K.x+ke.y*K.y,Pe=xe!==0?1/xe:1/0,$e=2*Math.sqrt(2-2*xe),rt=xe<s_&&j&&N,xt=q.x*K.y-q.y*K.x>0;if(rt&&ie>S){const pt=R.dist(j);if(pt>2*z){const lt=R.sub(R.sub(j)._mult(z/pt)._round());this.updateDistance(j,lt),this.addCurrentVertex(lt,q,0,0,E),j=lt}}const et=j&&N;let Je=et?s:m?"butt":u;if(et&&Je==="round"&&(Pe<p?Je="miter":Pe<=2&&(Je="fakeround")),Je==="miter"&&Pe>d&&(Je="bevel"),Je==="bevel"&&(Pe>2&&(Je="flipbevel"),Pe<d&&(Je="miter")),j&&this.updateDistance(j,R),Je==="miter")ke._mult(Pe),this.addCurrentVertex(R,ke,0,0,E);else if(Je==="flipbevel"){if(Pe>100)ke=K.mult(-1);else{const pt=Pe*q.add(K).mag()/q.sub(K).mag();ke._perp()._mult(pt*(xt?-1:1))}this.addCurrentVertex(R,ke,0,0,E),this.addCurrentVertex(R,ke.mult(-1),0,0,E)}else if(Je==="bevel"||Je==="fakeround"){const pt=-Math.sqrt(Pe*Pe-1),lt=xt?pt:0,st=xt?0:pt;if(j&&this.addCurrentVertex(R,q,lt,st,E),Je==="fakeround"){const Me=Math.round(180*$e/Math.PI/20);for(let mt=1;mt<Me;mt++){let dt=mt/Me;if(dt!==.5){const ui=dt-.5;dt+=dt*ui*(dt-1)*((1.0904+ce*(ce*(3.55645-1.43519*ce)-3.2452))*ui*ui+(.848013+ce*(.215638*ce-1.06021)))}const Tt=K.sub(q)._mult(dt)._add(q)._unit()._mult(xt?-1:1);this.addHalfVertex(R,Tt.x,Tt.y,!1,xt,0,E)}}N&&this.addCurrentVertex(R,K,-lt,-st,E)}else if(Je==="butt")this.addCurrentVertex(R,ke,0,0,E);else if(Je==="square"){const pt=j?1:-1;this.addCurrentVertex(R,ke,pt,pt,E)}else Je==="round"&&(j&&(this.addCurrentVertex(R,q,0,0,E),this.addCurrentVertex(R,q,1,1,E,!0)),N&&(this.addCurrentVertex(R,K,-1,-1,E,!0),this.addCurrentVertex(R,K,0,0,E)));if(rt&&ie<v-1){const pt=R.dist(N);if(pt>
vendor: 9,094 bytes, line 12
122*z){const lt=R.add(N.sub(R)._mult(z/pt)._round());this.updateDistance(R,lt),this.addCurrentVertex(lt,K,0,0,E),R=lt}}}}addCurrentVertex(t,r,s,u,d,p=!1){const m=r.y*u-r.x,v=-r.y-r.x*u;this.addHalfVertex(t,r.x+r.y*s,r.y-r.x*s,p,!1,s,d),this.addHalfVertex(t,m,v,p,!0,-u,d),this.distance>xp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,r,s,u,d,p))}addHalfVertex({x:t,y:r},s,u,d,p,m,v){const S=.5*(this.lineClips?this.scaledDistance*(xp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(d?1:0),(r<<1)+(p?1:0),Math.round(63*s)+128,Math.round(63*u)+128,1+(m===0?0:m<0?-1:1)|(63&S)<<2,S>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const z=v.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,z),v.primitiveLength++),p?this.e2=z:this.e1=z}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,r){this.distance+=t.dist(r),this.updateScaledDistance()}}let bp,wp;ot("LineBucket",Lh,{omit:["layers","patternFeatures"]});var kp={get paint(){return wp=wp||new h({"line-opacity":new bt(Ce.paint_line["line-opacity"]),"line-color":new bt(Ce.paint_line["line-color"]),"line-translate":new ct(Ce.paint_line["line-translate"]),"line-translate-anchor":new ct(Ce.paint_line["line-translate-anchor"]),"line-width":new bt(Ce.paint_line["line-width"]),"line-gap-width":new bt(Ce.paint_line["line-gap-width"]),"line-offset":new bt(Ce.paint_line["line-offset"]),"line-blur":new bt(Ce.paint_line["line-blur"]),"line-dasharray":new wo(Ce.paint_line["line-dasharray"]),"line-pattern":new bo(Ce.paint_line["line-pattern"]),"line-gradient":new $l(Ce.paint_line["line-gradient"])})},get layout(){return bp=bp||new h({"line-cap":new ct(Ce.layout_line["line-cap"]),"line-join":new bt(Ce.layout_line["line-join"]),"line-miter-limit":new ct(Ce.layout_line["line-miter-limit"]),"line-round-limit":new ct(Ce.layout_line["line-round-limit"]),"line-sort-key":new bt(Ce.layout_line["line-sort-key"])})}};class a_ extends bt{possiblyEvaluate(t,r){return r=new mi(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),super.possiblyEvaluate(t,r)}evaluate(t,r,s,u){return r=Ge({},r,{zoom:Math.floor(r.zoom)}),super.evaluate(t,r,s,u)}}let nc;class o_ extends n{constructor(t){super(t,kp),this.gradientVersion=0,nc||(nc=new a_(kp.paint.properties["line-width"].specification),nc.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){const r=this.gradientExpression();this.stepInterpolant=!!function(s){return s._styleExpression!==void 0}(r)&&r._styleExpression.expression instanceof Ts,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,r){super.recalculate(t,r),this.paint._values["line-floorwidth"]=nc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Lh(t)}queryRadius(t){const r=t,s=Sp(Nl("line-width",this,r),Nl("line-gap-width",this,r)),u=Nl("line-offset",this,r);return s/2+Math.abs(u)+Ju(this.paint.get("line-translate"))}queryIntersectsFeature(t,r,s,u,d,p,m){const v=Qu(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),p.angle,m),S=m/2*Sp(this.paint.get("line-width").evaluate(r,s),this.paint.get("line-gap-width").evaluate(r,s)),z=this.paint.get("line-offset").evaluate(r,s);return z&&(u=function(E,R){const j=[];for(let N=0;N<E.length;N++){const q=E[N],K=[];for(let ie=0;ie<q.length;ie++){const ke=q[ie-1],ce=q[ie],xe=q[ie+1],Pe=ie===0?new F(0,0):ce.sub(ke)._unit()._perp(),$e=ie===q.length-1?new F(0,0):xe.sub(ce)._unit()._perp(),rt=Pe._add($e)._unit(),xt=rt.x*$e.x+rt.y*$e.y;xt!==0&&rt._mult(1/xt),K.push(rt._mult(R)._add(ce))}j.push(K)}return j}(u,z*m)),function(E,R,j){for(let N=0;N<R.length;N++){const q=R[N];if(E.length>=3){for(let K=0;K<q.length;K++)if(Po(E,q[K]))return!0}if(gg(E,q,j))return!0}return!1}(v,u,S)}isTileClipped(){return!0}}function Sp(i,t){return t>0?t+2*i:i}const l_=g([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),u_=g([{name:"a_projected_pos",components:3,type:"Float32"}],4);g([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const c_=g([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);g([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Tp=g([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),h_=g([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function d_(i,t,r){return i.sections.forEach(s=>{s.text=function(u,d,p){const m=d.layout.get("text-transform").evaluate(p,{});return m==="uppercase"?u=u.toLocaleUpperCase():m==="lowercase"&&(u=u.toLocaleLowerCase()),Ir.applyArabicShaping&&(u=Ir.applyArabicShaping(u)),u}(s.text,t,r)}),i}g([{name:"triangle",components:3,type:"Uint16"}]),g([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),g([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),g([{type:"Float32",name:"offsetX"}]),g([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),g([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Kl={"!":"ï¸","#":"ï¼",$:"ï¼","%":"ï¼
","&":"ï¼","(":"︵",")":"︶","*":"ï¼","+":"ï¼",",":"ï¸","-":"︲",".":"ã»","/":"ï¼",":":"ï¸",";":"ï¸","<":"︿","=":"ï¼",">":"ï¹","?":"ï¸","@":"ï¼ ","[":"ï¹","\\":"ï¼¼","]":"ï¹","^":"ï¼¾",_:"︳","`":"ï½","{":"︷","|":"â","}":"︸","~":"ï½","¢":"ï¿ ","£":"ï¿¡","Â¥":"ï¿¥","¦":"¦","¬":"ï¿¢","¯":"ï¿£","â":"︲","â":"︱","â":"ï¹","â":"ï¹","â":"ï¹","â":"ï¹","â¦":"ï¸","â§":"ã»","â©":"₩","ã":"ï¸","ã":"ï¸","ã":"︿","ã":"ï¹","ã":"︽","ã":"︾","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"︻","ã":"︼","ã":"︹","ã":"︺","ã":"ï¸","ã":"ï¸","ï¼":"ï¸","ï¼":"︵","ï¼":"︶","ï¼":"ï¸","ï¼":"︲","ï¼":"ã»","ï¼":"ï¸","ï¼":"ï¸","ï¼":"︿","ï¼":"ï¹","ï¼":"ï¸","ï¼»":"ï¹","ï¼½":"ï¹","_":"︳","ï½":"︷","ï½":"â","ï½":"︸","ï½":"︵","ï½ ":"︶","。":"ï¸","ï½¢":"ï¹","ï½£":"ï¹"};var Oi=24,zp=ai,Cp=function(i,t,r,s,u){var d,p,m=8*u-s-1,v=(1<<m)-1,S=v>>1,z=-7,E=u-1,R=-1,j=i[t+E];for(E+=R,d=j&(1<<-z)-1,j>>=-z,z+=m;z>0;d=256*d+i[t+E],E+=R,z-=8);for(p=d&(1<<-z)-1,d>>=-z,z+=s;z>0;p=256*p+i[t+E],E+=R,z-=8);if(d===0)d=1-S;else{if(d===v)return p?NaN:1/0*(j?-1:1);p+=Math.pow(2,s),d-=S}return(j?-1:1)*p*Math.pow(2,d-s)},Ap=function(i,t,r,s,u,d){var p,m,v,S=8*d-u-1,z=(1<<S)-1,E=z>>1,R=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,j=0,N=1,q=t<0||t===0&&1
12/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(m=isNaN(t)?1:0,p=z):(p=Math.floor(Math.log(t)/Math.LN2),t*(v=Math.pow(2,-p))<1&&(p--,v*=2),(t+=p+E>=1?R/v:R*Math.pow(2,1-E))*v>=2&&(p++,v/=2),p+E>=z?(m=0,p=z):p+E>=1?(m=(t*v-1)*Math.pow(2,u),p+=E):(m=t*Math.pow(2,E-1)*Math.pow(2,u),p=0));u>=8;i[r+j]=255&m,j+=N,m/=256,u-=8);for(p=p<<u|m,S+=u;S>0;i[r+j]=255&p,j+=N,p/=256,S-=8);i[r+j-N]|=128*q};function ai(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}ai.Varint=0,ai.Fixed64=1,ai.Bytes=2,ai.Fixed32=5;var Rh=4294967296,Pp=1/Rh,Ip=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function us(i){return i.type===ai.Bytes?i.readVarint()+i.pos:i.pos+1}function Do(i,t,r){return r?4294967296*t+(i>>>0):4294967296*(t>>>0)+(i>>>0)}function Ep(i,t,r){var s=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(s);for(var u=r.pos-1;u>=i;u--)r.buf[u+s]=r.buf[u]}function p_(i,t){for(var r=0;r<i.length;r++)t.writeVarint(i[r])}function f_(i,t){for(var r=0;r<i.length;r++)t.writeSVarint(i[r])}function m_(i,t){for(var r=0;r<i.length;r++)t.writeFloat(i[r])}function g_(i,t){for(var r=0;r<i.length;r++)t.writeDouble(i[r])}function __(i,t){for(var r=0;r<i.length;r++)t.writeBoolean(i[r])}function y_(i,t){for(var r=0;r<i.length;r++)t.writeFixed32(i[r])}function v_(i,t){for(var r=0;r<i.length;r++)t.writeSFixed32(i[r])}function x_(i,t){for(var r=0;r<i.length;r++)t.writeFixed64(i[r])}function b_(i,t){for(var r=0;r<i.length;r++)t.writeSFixed64(i[r])}function sc(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+16777216*i[t+3]}function Lo(i,t,r){i[r]=t,i[r+1]=t>>>8,i[r+2]=t>>>16,i[r+3]=t>>>24}function Mp(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+(i[t+3]<<24)}ai.prototype={destroy:function(){this.buf=null},readFields:function(i,t,r){for(r=r||this.length;this.pos<r;){var s=this.readVarint(),u=s>>3,d=this.pos;this.type=7&s,i(u,t,this),this.pos===d&&this.skip(s)}return t},readMessage:function(i,t){return this.readFields(i,t,this.readVarint()+this.pos)},readFixed32:function(){var i=sc(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=Mp(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=sc(this.buf,this.pos)+sc(this.buf,this.pos+4)*Rh;return this.pos+=8,i},readSFixed64:function(){var i=sc(this.buf,this.pos)+Mp(this.buf,this.pos+4)*Rh;return this.pos+=8,i},readFloat:function(){var i=Cp(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=Cp(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var t,r,s=this.buf;return t=127&(r=s[this.pos++]),r<128?t:(t|=(127&(r=s[this.pos++]))<<7,r<128?t:(t|=(127&(r=s[this.pos++]))<<14,r<128?t:(t|=(127&(r=s[this.pos++]))<<21,r<128?t:function(u,d,p){var m,v,S=p.buf;if(m=(112&(v=S[p.pos++]))>>4,v<128||(m|=(127&(v=S[p.pos++]))<<3,v<128)||(m|=(127&(v=S[p.pos++]))<<10,v<128)||(m|=(127&(v=S[p.pos++]))<<17,v<128)||(m|=(127&(v=S[p.pos++]))<<24,v<128)||(m|=(1&(v=S[p.pos++]))<<31,v<128))return Do(u,m,d);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=s[this.pos]))<<28,i,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var i=this.readVarint();return i%2==1?(i+1)/-2:i/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var i=this.readVarint()+this.pos,t=this.pos;return this.pos=i,i-t>=12&&Ip?function(r,s,u){return Ip.decode(r.subarray(s,u))}(this.buf,t,i):function(r,s,u){for(var d="",p=s;p<u;){var m,v,S,z=r[p],E=null,R=z>239?4:z>223?3:z>191?2:1;if(p+R>u)break;R===1?z<128&&(E=z):R===2?(192&(m=r[p+1]))==128&&(E=(31&z)<<6|63&m)<=127&&(E=null):R===3?(v=r[p+2],(192&(m=r[p+1]))==128&&(192&v)==128&&((E=(15&z)<<12|(63&m)<<6|63&v)<=2047||E>=55296&&E<=57343)&&(E=null)):R===4&&(v=r[p+2],S=r[p+3],(192&(m=r[p+1]))==128&&(192&v)==128&&(192&S)==128&&((E=(15&z)<<18|(63&m)<<12|(63&v)<<6|63&S)<=65535||E>=1114112)&&(E=null)),E===null?(E=65533,R=1):E>65535&&(E-=65536,d+=String.fromCharCode(E>>>10&1023|55296),E=56320|1023&E),d+=String.fromCharCode(E),p+=R}return d}(this.buf,t,i)},readBytes:function(){var i=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,i);return this.pos=i,t}
vendor: 5,627 bytes, line 12
12,readPackedVarint:function(i,t){if(this.type!==ai.Bytes)return i.push(this.readVarint(t));var r=us(this);for(i=i||[];this.pos<r;)i.push(this.readVarint(t));return i},readPackedSVarint:function(i){if(this.type!==ai.Bytes)return i.push(this.readSVarint());var t=us(this);for(i=i||[];this.pos<t;)i.push(this.readSVarint());return i},readPackedBoolean:function(i){if(this.type!==ai.Bytes)return i.push(this.readBoolean());var t=us(this);for(i=i||[];this.pos<t;)i.push(this.readBoolean());return i},readPackedFloat:function(i){if(this.type!==ai.Bytes)return i.push(this.readFloat());var t=us(this);for(i=i||[];this.pos<t;)i.push(this.readFloat());return i},readPackedDouble:function(i){if(this.type!==ai.Bytes)return i.push(this.readDouble());var t=us(this);for(i=i||[];this.pos<t;)i.push(this.readDouble());return i},readPackedFixed32:function(i){if(this.type!==ai.Bytes)return i.push(this.readFixed32());var t=us(this);for(i=i||[];this.pos<t;)i.push(this.readFixed32());return i},readPackedSFixed32:function(i){if(this.type!==ai.Bytes)return i.push(this.readSFixed32());var t=us(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed32());return i},readPackedFixed64:function(i){if(this.type!==ai.Bytes)return i.push(this.readFixed64());var t=us(this);for(i=i||[];this.pos<t;)i.push(this.readFixed64());return i},readPackedSFixed64:function(i){if(this.type!==ai.Bytes)return i.push(this.readSFixed64());var t=us(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed64());return i},skip:function(i){var t=7&i;if(t===ai.Varint)for(;this.buf[this.pos++]>127;);else if(t===ai.Bytes)this.pos=this.readVarint()+this.pos;else if(t===ai.Fixed32)this.pos+=4;else{if(t!==ai.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(i,t){this.writeVarint(i<<3|t)},realloc:function(i){for(var t=this.length||16;t<this.pos+i;)t*=2;if(t!==this.length){var r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(i){this.realloc(4),Lo(this.buf,i,this.pos),this.pos+=4},writeSFixed32:function(i){this.realloc(4),Lo(this.buf,i,this.pos),this.pos+=4},writeFixed64:function(i){this.realloc(8),Lo(this.buf,-1&i,this.pos),Lo(this.buf,Math.floor(i*Pp),this.pos+4),this.pos+=8},writeSFixed64:function(i){this.realloc(8),Lo(this.buf,-1&i,this.pos),Lo(this.buf,Math.floor(i*Pp),this.pos+4),this.pos+=8},writeVarint:function(i){(i=+i||0)>268435455||i<0?function(t,r){var s,u;if(t>=0?(s=t%4294967296|0,u=t/4294967296|0):(u=~(-t/4294967296),4294967295^(s=~(-t%4294967296))?s=s+1|0:(s=0,u=u+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");r.realloc(10),function(d,p,m){m.buf[m.pos++]=127&d|128,d>>>=7,m.buf[m.pos++]=127&d|128,d>>>=7,m.buf[m.pos++]=127&d|128,d>>>=7,m.buf[m.pos++]=127&d|128,m.buf[m.pos]=127&(d>>>=7)}(s,0,r),function(d,p){var m=(7&d)<<4;p.buf[p.pos++]|=m|((d>>>=3)?128:0),d&&(p.buf[p.pos++]=127&d|((d>>>=7)?128:0),d&&(p.buf[p.pos++]=127&d|((d>>>=7)?128:0),d&&(p.buf[p.pos++]=127&d|((d>>>=7)?128:0),d&&(p.buf[p.pos++]=127&d|((d>>>=7)?128:0),d&&(p.buf[p.pos++]=127&d)))))}(u,r)}(i,this):(this.realloc(4),this.buf[this.pos++]=127&i|(i>127?128:0),i<=127||(this.buf[this.pos++]=127&(i>>>=7)|(i>127?128:0),i<=127||(this.buf[this.pos++]=127&(i>>>=7)|(i>127?128:0),i<=127||(this.buf[this.pos++]=i>>>7&127))))},writeSVarint:function(i){this.writeVarint(i<0?2*-i-1:2*i)},writeBoolean:function(i){this.writeVarint(!!i)},writeString:function(i){i=String(i),this.realloc(4*i.length),this.pos++;var t=this.pos;this.pos=function(s,u,d){for(var p,m,v=0;v<u.length;v++){if((p=u.charCodeAt(v))>55295&&p<57344){if(!m){p>56319||v+1===u.length?(s[d++]=239,s[d++]=191,s[d++]=189):m=p;continue}if(p<56320){s[d++]=239,s[d++]=191,s[d++]=189,m=p;continue}p=m-55296<<10|p-56320|65536,m=null}else m&&(s[d++]=239,s[d++]=191,s[d++]=189,m=null);p<128?s[d++]=p:(p<2048?s[d++]=p>>6|192:(p<65536?s[d++]=p>>12|224:(s[d++]=p>>18|240,s[d++]=p>>12&63|128),s[d++]=p>>6&63|128),s[d++]=63&p|128)}return d}(this.buf,i,this.pos);var r=this.pos-t;r>=128&&Ep(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(i){this.realloc(4),Ap(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),Ap(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var t=i.length;this.writeVarint(t),this.realloc(t);for(var r=0;r<t;r++)this.buf[this.pos++]=i[r]},writeRawMessage:function(i,t){this.pos++;var r=this.pos;i(t,this);var s=this.pos-r;s>=128&&Ep(r,s,this),this.pos=r-1,this.writeVarint(s),this.pos+=s},writeMessage:function(i,t,r){this.writeTag(i,ai.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(i,t){t.length&&this.writeMessage(i,p_,t)},writePackedSVarint:function(i,t){t.length&&this.writeMessage(i,f_,t)},writePackedBoolean:function(i,t){t.length&&this.writeMessage(i,__,t)},writePackedFloat:function(i,t){t.length&&this.writeMessage(i,m_,t)},writePackedDouble:function(i,t){t.length&&this.writeMessage(i,g_,t)},writePackedFixed32:function(i,t){t.length&&this.writeMessage(i,y_,t)},writePackedSFixed32:function(i,t){t.length&&this.writeMessage(i,v_,t)},writePackedFixed64:function(i,t){t.length&&this.writeMessage(i,x_,t)},writePackedSFixed64:function(i,t){t.length&&this.writeMessage(i,b_,t)},writeBytesField:function(i,t){this.writeTag(i,ai.Bytes),this.writeBytes(t)},writeFixed32Field:function(i,t){this.writeTag(i,ai.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(i,t){this.writeTag(i,ai.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(i,t){this.writeTag(i,ai.Fixed64),this.writeFixed64
12(t)},writeSFixed64Field:function(i,t){this.writeTag(i,ai.Fixed64),this.writeSFixed64(t)},writeVarintField:function(i,t){this.writeTag(i,ai.Varint),this.writeVarint(t)},writeSVarintField:function(i,t){this.writeTag(i,ai.Varint),this.writeSVarint(t)},writeStringField:function(i,t){this.writeTag(i,ai.Bytes),this.writeString(t)},writeFloatField:function(i,t){this.writeTag(i,ai.Fixed32),this.writeFloat(t)},writeDoubleField:function(i,t){this.writeTag(i,ai.Fixed64),this.writeDouble(t)},writeBooleanField:function(i,t){this.writeVarintField(i,!!t)}};var Bh=U(zp);const Fh=3;function w_(i,t,r){i===1&&r.readMessage(k_,t)}function k_(i,t,r){if(i===3){const{id:s,bitmap:u,width:d,height:p,left:m,top:v,advance:S}=r.readMessage(S_,{});t.push({id:s,bitmap:new Gl({width:d+2*Fh,height:p+2*Fh},u),metrics:{width:d,height:p,left:m,top:v,advance:S}})}}function S_(i,t,r){i===1?t.id=r.readVarint():i===2?t.bitmap=r.readBytes():i===3?t.width=r.readVarint():i===4?t.height=r.readVarint():i===5?t.left=r.readSVarint():i===6?t.top=r.readSVarint():i===7&&(t.advance=r.readVarint())}const T_=Fh;function Dp(i){let t=0,r=0;for(const p of i)t+=p.w*p.h,r=Math.max(r,p.w);i.sort((p,m)=>m.h-p.h);const s=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}];let u=0,d=0;for(const p of i)for(let m=s.length-1;m>=0;m--){const v=s[m];if(!(p.w>v.w||p.h>
vendor: 6,125 bytes, line 12
12v.h)){if(p.x=v.x,p.y=v.y,d=Math.max(d,p.y+p.h),u=Math.max(u,p.x+p.w),p.w===v.w&&p.h===v.h){const S=s.pop();m<s.length&&(s[m]=S)}else p.h===v.h?(v.x+=p.w,v.w-=p.w):p.w===v.w?(v.y+=p.h,v.h-=p.h):(s.push({x:v.x+p.w,y:v.y,w:v.w-p.w,h:p.h}),v.y+=p.h,v.h-=p.h);break}}return{w:u,h:d,fill:t/(u*d)||0}}const Mr=1;class Oh{constructor(t,{pixelRatio:r,version:s,stretchX:u,stretchY:d,content:p,textFitWidth:m,textFitHeight:v}){this.paddedRect=t,this.pixelRatio=r,this.stretchX=u,this.stretchY=d,this.content=p,this.version=s,this.textFitWidth=m,this.textFitHeight=v}get tl(){return[this.paddedRect.x+Mr,this.paddedRect.y+Mr]}get br(){return[this.paddedRect.x+this.paddedRect.w-Mr,this.paddedRect.y+this.paddedRect.h-Mr]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Mr)/this.pixelRatio,(this.paddedRect.h-2*Mr)/this.pixelRatio]}}class Lp{constructor(t,r){const s={},u={};this.haveRenderCallbacks=[];const d=[];this.addImages(t,s,d),this.addImages(r,u,d);const{w:p,h:m}=Dp(d),v=new rn({width:p||1,height:m||1});for(const S in t){const z=t[S],E=s[S].paddedRect;rn.copy(z.data,v,{x:0,y:0},{x:E.x+Mr,y:E.y+Mr},z.data)}for(const S in r){const z=r[S],E=u[S].paddedRect,R=E.x+Mr,j=E.y+Mr,N=z.data.width,q=z.data.height;rn.copy(z.data,v,{x:0,y:0},{x:R,y:j},z.data),rn.copy(z.data,v,{x:0,y:q-1},{x:R,y:j-1},{width:N,height:1}),rn.copy(z.data,v,{x:0,y:0},{x:R,y:j+q},{width:N,height:1}),rn.copy(z.data,v,{x:N-1,y:0},{x:R-1,y:j},{width:1,height:q}),rn.copy(z.data,v,{x:0,y:0},{x:R+N,y:j},{width:1,height:q})}this.image=v,this.iconPositions=s,this.patternPositions=u}addImages(t,r,s){for(const u in t){const d=t[u],p={x:0,y:0,w:d.data.width+2*Mr,h:d.data.height+2*Mr};s.push(p),r[u]=new Oh(p,d),d.hasRenderCallback&&this.haveRenderCallbacks.push(u)}}patchUpdatedImages(t,r){t.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const s in t.updatedImages)this.patchUpdatedImage(this.iconPositions[s],t.getImage(s),r),this.patchUpdatedImage(this.patternPositions[s],t.getImage(s),r)}patchUpdatedImage(t,r,s){if(!t||!r||t.version===r.version)return;t.version=r.version;const[u,d]=t.tl;s.update(r.data,void 0,{x:u,y:d})}}var Ks;ot("ImagePosition",Oh),ot("ImageAtlas",Lp),w.ah=void 0,(Ks=w.ah||(w.ah={}))[Ks.none=0]="none",Ks[Ks.horizontal=1]="horizontal",Ks[Ks.vertical=2]="vertical",Ks[Ks.horizontalOnly=3]="horizontalOnly";const Yl=-17;class Jl{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(t,r){const s=new Jl;return s.scale=t||1,s.fontStack=r,s}static forImage(t){const r=new Jl;return r.imageName=t,r}}class Ro{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(t,r){const s=new Ro;for(let u=0;u<t.sections.length;u++){const d=t.sections[u];d.image?s.addImageSection(d):s.addTextSection(d,r)}return s}length(){return this.text.length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}getCharCode(t){return this.text.charCodeAt(t)}verticalizePunctuation(){this.text=function(t){let r="";for(let s=0;s<t.length;s++){const u=t.charCodeAt(s+1)||null,d=t.charCodeAt(s-1)||null;r+=u&&qu(u)&&!Kl[t[s+1]]||d&&qu(d)&&!Kl[t[s-1]]||!Kl[t[s]]?t[s]:Kl[t[s]]}return r}(this.text)}trim(){let t=0;for(let s=0;s<this.text.length&&oc[this.text.charCodeAt(s)];s++)t++;let r=this.text.length;for(let s=this.text.length-1;s>=0&&s>=t&&oc[this.text.charCodeAt(s)];s--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)}substring(t,r){const s=new Ro;return s.text=this.text.substring(t,r),s.sectionIndex=this.sectionIndex.slice(t,r),s.sections=this.sections,s}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,r)=>Math.max(t,this.sections[r].scale),0)}addTextSection(t,r){this.text+=t.text,this.sections.push(Jl.forText(t.scale,t.fontStack||r));const s=this.sections.length-1;for(let u=0;u<t.text.length;++u)this.sectionIndex.push(s)}addImageSection(t){const r=t.image?t.image.name:"";if(r.length===0)return void Ct("Can't add FormattedSection with an empty image.");const s=this.getNextImageSectionCharCode();s?(this.text+=String.fromCharCode(s),this.sections.push(Jl.forImage(r)),this.sectionIndex.push(this.sections.length-1)):Ct("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function ac(i,t,r,s,u,d,p,m,v,S,z,E,R,j,N){const q=Ro.fromFeature(i,u);let K;E===w.ah.vertical&&q.verticalizePunctuation();const{processBidirectionalText:ie,processStyledBidirectionalText:ke}=Ir;if(ie&&q.sections.length===1){K=[];const Pe=ie(q.toString(),$h(q,S,d,t,s,j));for(const $e of Pe){const rt=new Ro;rt.text=$e,rt.sections=q.sections;for(let xt=0;xt<$e.length;xt++)rt.sectionIndex.push(0);K.push(rt)}}else if(ke){K=[];const Pe=ke(q.text,q.sectionIndex,$h(q,S,d,t,s,j));for(const $e of Pe){const rt=new Ro;rt.text=$e[0],rt.sectionIndex=$e[1],rt.sections=q.sections,K.push(rt)}}else K=function(Pe,$e){const rt=[],xt=Pe.text;let et=0;for(const Je of $e)rt.push(Pe.substring(et,Je)),et=Je;return et<xt.length&&rt.push(Pe.substring(et,xt.length)),rt}(q,$h(q,S,d,t,s,j));const ce=[],xe={positionedLines:ce,text:q.toString(),top:z[1],bottom:z[1],left:z[0],right:z[0],writingMode:E,iconsInText:!1,verticalizable:!1};return function(Pe,$e,rt,xt,et,Je,pt,lt,st,Me,mt,dt){let Tt=0,ui=Yl,oi=0,ji=0;const vn=lt==="right"?1:lt==="left"?0:.5;let er=0;for(const Ii of et){Ii.trim();const Ni=Ii.getMaxScale(),cr=(Ni-1)*Oi,tr={positionedGlyphs:[],lineOffset:0};Pe.positionedLines[er]=tr;const br=tr.positionedGlyphs;let ir=0;if(!Ii.length()){ui+=Je,++er;continue}for(let Dr=0;Dr<Ii.length();Dr++){const Kt=Ii.getSection(Dr),pi=Ii.getSectionIndex(Dr),vi=Ii.getCharCode(Dr);let Gr=0,zi=null,Oo=null,$n=null,jn=Oi;const xn=!(st===w.ah.horizontal||!mt&&!Fl(vi)||mt&&(oc[vi]||(Vi=vi,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(Vi)))));if(Kt.imageName){const an=xt[Kt.imageName];if(!an)continue;$n=Kt.imageName,Pe.iconsInText=Pe.iconsInText||!0,Oo=an.paddedRect;const Zi=an.displaySize;
12Kt.scale=Kt.scale*Oi/dt,zi={width:Zi[0],height:Zi[1],left:Mr,top:-3,advance:xn?Zi[1]:Zi[0]},Gr=cr+(Oi-Zi[1]*Kt.scale),jn=zi.advance;const cs=xn?Zi[0]*Kt.scale-Oi*Ni:Zi[1]*Kt.scale-Oi*Ni;cs>0&&cs>ir&&(ir=cs)}else{const an=rt[Kt.fontStack],Zi=an&&an[vi];if(Zi&&Zi.rect)Oo=Zi.rect,zi=Zi.metrics;else{const cs=$e[Kt.fontStack],su=cs&&cs[vi];if(!su)continue;zi=su.metrics}Gr=(Ni-Kt.scale)*Oi}xn?(Pe.verticalizable=!0,br.push({glyph:vi,imageName:$n,x:Tt,y:ui+Gr,vertical:xn,scale:Kt.scale,fontStack:Kt.fontStack,sectionIndex:pi,metrics:zi,rect:Oo}),Tt+=jn*Kt.scale+Me):(br.push({glyph:vi,imageName:$n,x:Tt,y:ui+Gr,vertical:xn,scale:Kt.scale,fontStack:Kt.fontStack,sectionIndex:pi,metrics:zi,rect:Oo}),Tt+=zi.advance*Kt.scale+Me)}br.length!==0&&(oi=Math.max(Tt-Me,oi),P_(br,0,br.length-1,vn,ir)),Tt=0;const sn=Je*Ni+ir;tr.lineOffset=Math.max(ir,cr),ui+=sn,ji=Math.max(sn,ji),++er}var Vi;const yr=ui-Yl,{horizontalAlign:vr,verticalAlign:xr}=jh(pt);(function(Ii,Ni,cr,tr,br,ir,sn,Dr,Kt){const pi=(Ni-cr)*br;let vi=0;vi=ir!==sn?-Dr*tr-Yl:(-tr*Kt+.5)*sn;for(const Gr of Ii)for(const zi of Gr.positionedGlyphs)zi.x+=pi,zi.y+=vi})(Pe.positionedLines,vn,vr,xr,oi,ji,Je,yr,et.length),Pe.top+=-xr*yr,Pe.bottom=Pe.top+yr,Pe.left+=-vr*oi,Pe.right=Pe.left+oi}(xe,t,r,s,K,p,m,v,E,S,R,N),!function(Pe){for(const $e of Pe)if($e.positionedGlyphs.length!==0)return!1;return!0}(ce)&&xe}const oc={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},z_={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},C_={40:!0};function Rp(i,t,r,s,u,d){if(t.imageName){const p=s[t.imageName];return p?p.displaySize[0]*t.scale*Oi/d+u:0}{const p=r[t.fontStack],m=p&&p[i];return m?m.metrics.advance*t.scale+u:0}}function Bp(i,t,r,s){const u=Math.pow(i-t,2);return s?i<t?u/2:2*u:u+Math.abs(r)*r}function A_(i,t,r){let s=0;return i===10&&(s-=1e4),r&&(s+=150),i!==40&&i!==65288||(s+=50),t!==41&&t!==65289||(s+=50),s}function Fp(i,t,r,s,u,d){let p=null,m=Bp(t,r,u,d);for(const v of s){const S=Bp(t-v.x,r,u,d)+v.badness;S<=m&&(p=v,m=S)}return{index:i,x:t,priorBreak:p,badness:m}}function Op(i){return i?Op(i.priorBreak).concat(i.index):[]}function $h(i,t,r,s,u,d){if(!i)return[];const p=[],m=function(E,R,j,N,q,K){let ie=0;for(let ke=0;ke<E.length();ke++){const ce=E.getSection(ke);ie+=Rp(E.getCharCode(ke),ce,N,q,R,K)}return ie/Math.max(1,Math.ceil(ie/j))}(i,t,r,s,u,d),v=i.text.indexOf("â")>=0;let S=0;for(let E=0;E<i.length();E++){const R=i.getSection(E),j=i.getCharCode(E);if(oc[j]||(S+=Rp(j,R,s,u,t,d)),E<i.length()-1){const N=!((z=j)<11904)&&(!!Nt["CJK Compatibility Forms"](z)||!!Nt["CJK Compatibility"](z)||!!Nt["CJK Strokes"](z)||!!Nt["CJK Symbols and Punctuation"](z)||!!Nt["Enclosed CJK Letters and Months"](z)||!!Nt["Halfwidth and Fullwidth Forms"](z)||!!Nt["Ideographic Description Characters"](z)||!!Nt["Vertical Forms"](z)||Gu.test(String.fromCodePoint(z)));(z_[j]||N||R.imageName||E!==i.length()-2&&C_[i.getCharCode(E+1)])&&p.push(Fp(E+1,S,m,p,A_(j,i.getCharCode(E+1),N&&v),!1))}}var z;return Op(Fp(i.length(),S,m,p,0,!0))}function jh(i){let t=.5,r=.5;switch(i){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(i){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:t,verticalAlign:r}}function P_(i,t,r,s,u){if(!s&&!u)return;const d=i[r],p=(i[r].x+d.metrics.advance*d.scale)*s;for(let m=t;m<=r;m++)i[m].x-=p,i[m].y+=u}function I_(i,t,r){const{horizontalAlign:s,verticalAlign:u}=jh(r),d=t[0]-i.displaySize[0]*s,p=t[1]-i.displaySize[1]*u;return{image:i,top:p,bottom:p+i.displaySize[1],left:d,right:d+i.displaySize[0]}}function $p(i){var t,r;let s=i.left,u=i.top,d=i.right-s,p=i.bottom-u;const m=(t=i.image.textFitWidth)!==null&&t!==void 0?t:"stretchOrShrink",v=(r=i.image.textFitHeight)!==null&&r!==void 0?r:"stretchOrShrink",S=(i.image.content[2]-i.image.content[0])/(i.image.content[3]-i.image.content[1]);if(v==="proportional"){if(m==="stretchOnly"&&d/p<S||m==="proportional"){const z=Math.ceil(p*S);s*=z/d,d=z}}else if(m==="proportional"&&v==="stretchOnly"&&S!==0&&d/p>S){const z=Math.ceil(d/S);u*=z/p,p=z}return{x1:s,y1:u,x2:s+d,y2:u+p}}function jp(i,t,r,s,u,d){const p=i.image;let m;if(p.content){const K=p.content,ie=p.pixelRatio||1;m=[K[0]/ie,K[1]/ie,p.displaySize[0]-K[2]/ie,p.displaySize[1]-K[3]/ie]}const v=t.left*d,S=t.right*d;let z,E,R,j;r==="width"||r==="both"?(j=u[0]+v-s[3],E=u[0]+S+s[1]):(j=u[0]+(v+S-p.displaySize[0])/2,E=j+p.displaySize[0]);const N=t.top*d,q=t.bottom*d;return r==="height"||r==="both"?(z=u[1]+N-s[0],R=u[1]+q+s[2]):(z=u[1]+(N+q-p.displaySize[1])/2,R=z+p.displaySize[1]),{image:p,top:z,right:E,bottom:R,left
vendor: 25,013 bytes, line 12
12:j,collisionPadding:m}}const Ql=255,On=128,Ys=Ql*On;function Vp(i,t){const{expression:r}=t;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new mi(i+1))};if(r.kind==="source")return{kind:"source"};{const{zoomStops:s,interpolationType:u}=r;let d=0;for(;d<s.length&&s[d]<=i;)d++;d=Math.max(0,d-1);let p=d;for(;p<s.length&&s[p]<i+1;)p++;p=Math.min(s.length-1,p);const m=s[d],v=s[p];return r.kind==="composite"?{kind:"composite",minZoom:m,maxZoom:v,interpolationType:u}:{kind:"camera",minZoom:m,maxZoom:v,minSize:r.evaluate(new mi(m)),maxSize:r.evaluate(new mi(v)),interpolationType:u}}}function Vh(i,t,r){let s="never";const u=i.get(t);return u?s=u:i.get(r)&&(s="always"),s}const E_=Xs.VectorTileFeature.types,M_=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function lc(i,t,r,s,u,d,p,m,v,S,z,E,R){const j=m?Math.min(Ys,Math.round(m[0])):0,N=m?Math.min(Ys,Math.round(m[1])):0;i.emplaceBack(t,r,Math.round(32*s),Math.round(32*u),d,p,(j<<1)+(v?1:0),N,16*S,16*z,256*E,256*R)}function Nh(i,t,r){i.emplaceBack(t.x,t.y,r),i.emplaceBack(t.x,t.y,r),i.emplaceBack(t.x,t.y,r),i.emplaceBack(t.x,t.y,r)}function D_(i){for(const t of i.sections)if(gh(t.text))return!0;return!1}class Uh{constructor(t){this.layoutVertexArray=new So,this.indexArray=new tn,this.programConfigurations=t,this.segments=new Ut,this.dynamicLayoutVertexArray=new jl,this.opacityVertexArray=new Nr,this.hasVisibleVertices=!1,this.placedSymbolArray=new gi}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(t,r,s,u){this.isEmpty()||(s&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,l_.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,r),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,u_.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,M_,!0),this.opacityVertexBuffer.itemSize=1),(s||u)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}ot("SymbolBuffers",Uh);class Gh{constructor(t,r,s){this.layoutVertexArray=new t,this.layoutAttributes=r,this.indexArray=new s,this.segments=new Ut,this.collisionVertexArray=new Bn}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,c_.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}ot("CollisionBuffers",Gh);class Bo{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(p=>p.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=kh([]),this.placementViewportMatrix=kh([]);const r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Vp(this.zoom,r["text-size"]),this.iconSizeData=Vp(this.zoom,r["icon-size"]);const s=this.layers[0].layout,u=s.get("symbol-sort-key"),d=s.get("symbol-z-order");this.canOverlap=Vh(s,"text-overlap","text-allow-overlap")!=="never"||Vh(s,"icon-overlap","icon-allow-overlap")!=="never"||s.get("text-ignore-placement")||s.get("icon-ignore-placement"),this.sortFeaturesByKey=d!=="viewport-y"&&!u.isConstant(),this.sortFeaturesByY=(d==="viewport-y"||d==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,s.get("symbol-placement")==="point"&&(this.writingModes=s.get("text-writing-mode").map(p=>w.ah[p])),this.stateDependentLayerIds=this.layers.filter(p=>p.isStateDependent()).map(p=>p.id),this.sourceID=t.sourceID}createArrays(){this.text=new Uh(new La(this.layers,this.zoom,t=>/^text/.test(t))),this.icon=new Uh(new La(this.layers,this.zoom,t=>/^icon/.test(t))),this.glyphOffsetArray=new _i,this.lineVertexArray=new Ki,this.symbolInstances=new jt,this.textAnchorOffsets=new yi}calculateGlyphDependencies(t,r,s,u,d){for(let p=0;p<t.length;p++)if(r[t.charCodeAt(p)]=!0,(s||u)&&d){const m=Kl[t.charAt(p)];m&&(r[m.charCodeAt(0)]=!0)}}populate(t,r,s){const u=this.layers[0],d=u.layout,p=d.get("text-font"),m=d.get("text-field"),v=d.get("icon-image"),S=(m.value.kind!=="constant"||m.value.value instanceof zr&&!m.value.value.isEmpty()||m.value.value.toString().length>0)&&(p.value.kind!=="constant"||p.value.value.length>0),z=v.value.kind!=="constant"||!!v.value.value||Object.keys(v.parameters).length>0,E=d.get("symbol-sort-key");if(this.features=[],!S&&!z)return;const R=r.iconDependencies,j=r.glyphDependencies,N=r.availableImages,q=new mi(this.zoom);for(const{feature:K,id:ie,index:ke,sourceLayerIndex:ce}of t){const xe=u._featureFilter.needGeometry,Pe=Ba(K,xe);if(!u._featureFilter.filter(q,Pe,s))continue;let $e,rt;if(xe||(Pe.geometry=Ra(K)),S){const et=u.getValueAndResolveTokens("text-field",Pe,s,N),Je=zr.factory(et),pt=this.hasRTLText=this.hasRTLText||D_(Je);(!pt||Ir.getRTLTextPluginStatus()==="unavailable"||pt&&Ir.isParsed())&&($e=d_(Je,u,Pe))}if(z){const et=u.getValueAndResolveTokens("icon-image",Pe,s,N);rt=et instanceof Ar?et:Ar.fromString(et)}if(!$e&&!rt)continue;const xt=this.sortFeaturesByKey?E.evaluate(Pe,{},s):void 0;if(this.features.push({id:ie,text:$e,icon:rt,index:ke,sourceLayerIndex:ce,geometry:Pe.geometry,properties:K.properties,type:E_[K.type],sortKey:xt}),rt&&(R[rt.name]=!0),$e){const et=p.evaluate(Pe,{},s).join(","),Je=d.get("text-rotation-alignment")!=="viewport"&&d.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(w.ah.vertical)>=0;for(const pt of $e.sections)if(pt.image)R[pt.image.name]=!0;else{const lt=Rl($e.toString()),st=pt.fontStack||et,Me=j[st]=j[st]||{};this.calculateGlyphDependencies(pt.text,Me,Je,this.allowVerticalPlacement,lt)}}}d.get("symbol-placement")==="line"&&(this.features=function(K){const ie={},ke={},ce=[];let xe=0;function Pe(et){ce.push(K[et]),xe++}function $e(et,Je,pt){const lt=ke[et];return delete ke[et],ke[Je]=lt,ce[lt].geometry[0].pop(),ce[lt].geometry[0]=ce[lt].geometry[0].concat(pt[0]),lt}function rt(et,Je,pt){const lt=ie[Je];return delete ie[Je],ie[et]=lt,ce[lt].geometry[0].shift(),ce[lt].geometry[0]=pt[0].concat(ce[lt].geometry[0]),lt}function xt(et,Je,pt){const lt=pt?Je[0][Je[0].length-1]:Je[0][0];return`${et}:${lt.x}:${lt.y}`}for(let et=0;et<K.length;et++){const Je=K[et],pt=Je.geometry,lt=Je.text?Je.text.toString():null;if(!lt){Pe(et);continue}const st=xt(lt,pt),Me=xt(lt,pt,!0);if(st in ke&&Me in ie&&ke[st]!==ie[Me]){const mt=rt(st,Me,pt),dt=$e(st,Me,ce[mt].geometry);delete ie[st],delete ke[Me],ke[xt(lt,ce[dt].geometry,!0)]=dt,ce[mt].geometry=null}else st in ke?$e(st,Me,pt):Me in ie?rt(st,Me,pt):(Pe(et),ie[st]=xe-1,ke[Me]=xe-1)}return ce.filter(et=>et.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((K,ie)=>K.sortKey-ie.sortKey)}update(t,r,s){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,r,this.layers,s),this.icon.programConfigurations.updatePaintArrays(t,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(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,r){const s=this.lineVertexArray.length;if(t.segment!==void 0){let u=t.dist(r[t.segment+1]),d=t.dist(r[t.segment]);const p={};for(let m=t.segment+1;m<r.length;m++)p[m]={x:r[m].x,y:r[m].y,tileUnitDistanceFromAnchor:u},m<r.length-1&&(u+=r[m+1].dist(r[m]));for(let m=t.segment||0;m>=0;m--)p[m]={x:r[m].x,y:r[m].y,tileUnitDistanceFromAnchor:d},m>0&&(d+=r[m-1].dist(r[m]));for(let m=0;m<r.length;m++){const v=p[m];this.lineVertexArray.emplaceBack(v.x,v.y,v.tileUnitDistanceFromAnchor)}}return{lineStartIndex:s,lineLength:this.lineVertexArray.length-s}}addSymbols(t,r,s,u,d,p,m,v,S,z,E,R){const j=t.indexArray,N=t.layoutVertexArray,q=t.segments.prepareSegment(4*r.length,N,j,this.canOverlap?p.sortKey:void 0),K=this.glyphOffsetArray.length,ie=q.vertexLength,ke=this.allowVerticalPlacement&&m===w.ah.vertical?Math.PI/2:0,ce=p.text&&p.text.sections;for(let xe=0;xe<r.length;xe++){const{tl:Pe,tr:$e,bl:rt,br:xt,tex:et,pixelOffsetTL:Je,pixelOffsetBR:pt,minFontScaleX:lt,minFontScaleY:st,glyphOffset:Me,isSDF:mt,sectionIndex:dt}=r[xe],Tt=q.vertexLength,ui=Me[1];lc(N,v.x,v.y,Pe.x,ui+Pe.y,et.x,et.y,s,mt,Je.x,Je.y,lt,st),lc(N,v.x,v.y,$e.x,ui+$e.y,et.x+et.w,et.y,s,mt,pt.x,Je.y,lt,st),lc(N,v.x,v.y,rt.x,ui+rt.y,et.x,et.y+et.h,s,mt,Je.x,pt.y,lt,st),lc(N,v.x,v.y,xt.x,ui+xt.y,et.x+et.w,et.y+et.h,s,mt,pt.x,pt.y,lt,st),Nh(t.dynamicLayoutVertexArray,v,ke),j.emplaceBack(Tt,Tt+1,Tt+2),j.emplaceBack(Tt+1,Tt+2,Tt+3),q.vertexLength+=4,q.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Me[0]),xe!==r.length-1&&dt===r[xe+1].sectionIndex||t.programConfigurations.populatePaintArrays(N.length,p,p.index,{},R,ce&&ce[dt])}t.placedSymbolArray.emplaceBack(v.x,v.y,K,this.glyphOffsetArray.length-K,ie,S,z,v.segment,s?s[0]:0,s?s[1]:0,u[0],u[1],m,0,!1,0,E)}_addCollisionDebugVertex(t,r,s,u,d,p){return r.emplaceBack(0,0),t.emplaceBack(s.x,s.y,u,d,Math.round(p.x),Math.round(p.y))}addCollisionDebugVertices(t,r,s,u,d,p,m){const v=d.segments.prepareSegment(4,d.layoutVertexArray,d.indexArray),S=v.vertexLength,z=d.layoutVertexArray,E=d.collisionVertexArray,R=m.anchorX,j=m.anchorY;this._addCollisionDebugVertex(z,E,p,R,j,new F(t,r)),this._addCollisionDebugVertex(z,E,p,R,j,new F(s,r)),this._addCollisionDebugVertex(z,E,p,R,j,new F(s,u)),this._addCollisionDebugVertex(z,E,p,R,j,new F(t,u)),v.vertexLength+=4;const N=d.indexArray;N.emplaceBack(S,S+1),N.emplaceBack(S+1,S+2),N.emplaceBack(S+2,S+3),N.emplaceBack(S+3,S),v.primitiveLength+=4}addDebugCollisionBoxes(t,r,s,u){for(let d=t;d<r;d++){const p=this.collisionBoxArray.get(d);this.addCollisionDebugVertices(p.x1,p.y1,p.x2,p.y2,u?this.textCollisionBox:this.iconCollisionBox,p.anchorPoint,s)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Gh(Ur,Tp.members,qi),this.iconCollisionBox=new Gh(Ur,Tp.members,qi);for(let t=0;t<this.symbolInstances.length;t++){const r=this.symbolInstances.get(t);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(t,r,s,u,d,p,m,v,S){const z={};for(let E=r;E<s;E++){const R=t.get(E);z.textBox={x1:R.x1,y1:R.y1,x2:R.x2,y2:R.y2,anchorPointX:R.anchorPointX,anchorPointY:R.anchorPointY},z.textFeatureIndex=R.featureIndex;break}for(let E=u;E<d;E++){const R=t.get(E);z.verticalTextBox={x1:R.x1,y1:R.y1,x2:R.x2,y2:R.y2,anchorPointX:R.anchorPointX,anchorPointY:R.anchorPointY},z.verticalTextFeatureIndex=R.featureIndex;break}for(let E=p;E<m;E++){const R=t.get(E);z.iconBox={x1:R.x1,y1:R.y1,x2:R.x2,y2:R.y2,anchorPointX:R.anchorPointX,anchorPointY:R.anchorPointY},z.iconFeatureIndex=R.featureIndex;break}for(let E=v;E<S;E++){const R=t.get(E);z.verticalIconBox={x1:R.x1,y1:R.y1,x2:R.x2,y2:R.y2,anchorPointX:R.anchorPointX,anchorPointY:R.anchorPointY},z.verticalIconFeatureIndex=R.featureIndex;break}return z}deserializeCollisionBoxes(t){this.collisionArrays=[];for(let r=0;r<this.symbolInstances.length;r++){const s=this.symbolInstances.get(r);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,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(t,r){const s=t.placedSymbolArray.get(r),u=s.vertexStartIndex+4*s.numGlyphs;for(let d=s.vertexStartIndex;d<u;d+=4)t.indexArray.emplaceBack(d,d+1,d+2),t.indexArray.emplaceBack(d+1,d+2,d+3)}getSortedSymbolIndexes(t){if(this.sortedAngle===t&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const r=Math.sin(t),s=Math.cos(t),u=[],d=[],p=[];for(let m=0;m<this.symbolInstances.length;++m){p.push(m);const v=this.symbolInstances.get(m);u.push(0|Math.round(r*v.anchorX+s*v.anchorY)),d.push(v.featureIndex)}return p.sort((m,v)=>u[m]-u[v]||d[v]-d[m]),p}addToSortKeyRanges(t,r){const s=this.sortKeyRanges[this.sortKeyRanges.length-1];s&&s.sortKey===r?s.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:r,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const r of this.symbolInstanceIndexes){const s=this.symbolInstances.get(r);this.featureSortOrder.push(s.featureIndex),[s.rightJustifiedTextSymbolIndex,s.centerJustifiedTextSymbolIndex,s.leftJustifiedTextSymbolIndex].forEach((u,d,p)=>{u>=0&&p.indexOf(u)===d&&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 Np,Up;ot("SymbolBucket",Bo,{omit:["layers","collisionBoxArray","features","compareText"]}),Bo.MAX_GLYPHS=65535,Bo.addDynamicAttributes=Nh;var qh={get paint(){return Up=Up||new h({"icon-opacity":new bt(Ce.paint_symbol["icon-opacity"]),"icon-color":new bt(Ce.paint_symbol["icon-color"]),"icon-halo-color":new bt(Ce.paint_symbol["icon-halo-color"]),"icon-halo-width":new bt(Ce.paint_symbol["icon-halo-width"]),"icon-halo-blur":new bt(Ce.paint_symbol["icon-halo-blur"]),"icon-translate":new ct(Ce.paint_symbol["icon-translate"]),"icon-translate-anchor":new ct(Ce.paint_symbol["icon-translate-anchor"]),"text-opacity":new bt(Ce.paint_symbol["text-opacity"]),"text-color":new bt(Ce.paint_symbol["text-color"],{runtimeType:Wi,getOverride:i=>i.textColor,hasOverride:i=>!!i.textColor}),"text-halo-color":new bt(Ce.paint_symbol["text-halo-color"]),"text-halo-width":new bt(Ce.paint_symbol["text-halo-width"]),"text-halo-blur":new bt(Ce.paint_symbol["text-halo-blur"]),"text-translate":new ct(Ce.paint_symbol["text-translate"]),"text-translate-anchor":new ct(Ce.paint_symbol["text-translate-anchor"])})},get layout(){return Np=Np||new h({"symbol-placement":new ct(Ce.layout_symbol["symbol-placement"]),"symbol-spacing":new ct(Ce.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ct(Ce.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new bt(Ce.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ct(Ce.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ct(Ce.layout_symbol["icon-allow-overlap"]),"icon-overlap":new ct(Ce.layout_symbol["icon-overlap"]),"icon-ignore-placement":new ct(Ce.layout_symbol["icon-ignore-placement"]),"icon-optional":new ct(Ce.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ct(Ce.layout_symbol["icon-rotation-alignment"]),"icon-size":new bt(Ce.layout_symbol["icon-size"]),"icon-text-fit":new ct(Ce.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ct(Ce.layout_symbol["icon-text-fit-padding"]),"icon-image":new bt(Ce.layout_symbol["icon-image"]),"icon-rotate":new bt(Ce.layout_symbol["icon-rotate"]),"icon-padding":new bt(Ce.layout_symbol["icon-padding"]),"icon-keep-upright":new ct(Ce.layout_symbol["icon-keep-upright"]),"icon-offset":new bt(Ce.layout_symbol["icon-offset"]),"icon-anchor":new bt(Ce.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ct(Ce.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ct(Ce.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ct(Ce.layout_symbol["text-rotation-alignment"]),"text-field":new bt(Ce.layout_symbol["text-field"]),"text-font":new bt(Ce.layout_symbol["text-font"]),"text-size":new bt(Ce.layout_symbol["text-size"]),"text-max-width":new bt(Ce.layout_symbol["text-max-width"]),"text-line-height":new ct(Ce.layout_symbol["text-line-height"]),"text-letter-spacing":new bt(Ce.layout_symbol["text-letter-spacing"]),"text-justify":new bt(Ce.layout_symbol["text-justify"]),"text-radial-offset":new bt(Ce.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ct(Ce.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new bt(Ce.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new bt(Ce.layout_symbol["text-anchor"]),"text-max-angle":new ct(Ce.layout_symbol["text-max-angle"]),"text-writing-mode":new ct(Ce.layout_symbol["text-writing-mode"]),"text-rotate":new bt(Ce.layout_symbol["text-rotate"]),"text-padding":new ct(Ce.layout_symbol["text-padding"]),"text-keep-upright":new ct(Ce.layout_symbol["text-keep-upright"]),"text-transform":new bt(Ce.layout_symbol["text-transform"]),"text-offset":new bt(Ce.layout_symbol["text-offset"]),"text-allow-overlap":new ct(Ce.layout_symbol["text-allow-overlap"]),"text-overlap":new ct(Ce.layout_symbol["text-overlap"]),"text-ignore-placement":new ct(Ce.layout_symbol["text-ignore-placement"]),"text-optional":new ct(Ce.layout_symbol["text-optional"])})}};class Gp{constructor(t){if(t.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:ar,this.defaultValue=t}evaluate(t){if(t.formattedSection){const r=this.defaultValue.property.overrides;if(r&&r.hasOverride(t.formattedSection))return r.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}ot("FormatSectionOverride",Gp,{omit:["defaultValue"]});class uc extends n{constructor(t){super(t,qh)}recalculate(t,r){if(super.recalculate(t,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"){const s=this.layout.get("text-writing-mode");if(s){const u=[];for(const d of s)u.indexOf(d)<0&&u.push(d);this.layout._values["text-writing-mode"]=u}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,r,s,u){const d=this.layout.get(t).evaluate(r,{},s,u),p=this._unevaluatedLayout._values[t];return p.isDataDriven()||lo(p.value)||!d?d:function(m,v){return v.replace(/{([^{}]+)}/g,(S,z)=>m&&z in m?String(m[z]):"")}(r.properties,d)}createBucket(t){return new Bo(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of qh.paint.overridableProperties){if(!uc.hasPaintOverride(this.layout,t))continue;const r=this.paint.get(t),s=new Gp(r),u=new oo(s,r.property.specification);let d=null;d=r.value.kind==="constant"||r.value.kind==="source"?new Ls("source",u):new Rs("composite",u,r.value.zoomStops),this.paint._values[t]=new _n(r.property,d,r.parameters)}}_handleOverridablePaintPropertyUpdate(t,r,s){return!(!this.layout||r.isDataDriven()||s.isDataDriven())&&uc.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,r){const s=t.get("text-field"),u=qh.paint.properties[r];let d=!1;const p=m=>{for(const v of m)if(u.overrides&&u.overrides.hasOverride(v))return void(d=!0)};if(s.value.kind==="constant"&&s.value.value instanceof zr)p(s.value.value.sections);else if(s.value.kind==="source"){const m=S=>{d||(S instanceof Xr&&Ri(S.value)===Sn?p(S.value.sections):S instanceof Ja?p(S.sections):S.eachChild(m))},v=s.value;v._styleExpression&&m(v._styleExpression.expression)}return d}}let qp;var L_={get paint(){return qp=qp||new h({"background-color":new ct(Ce.paint_background["background-color"]),"background-pattern":new wo(Ce.paint_background["background-pattern"]),"background-opacity":new ct(Ce.paint_background["background-opacity"])})}};class R_ extends n{constructor(t){super(t,L_)}}let Zp;var B_={get paint(){return Zp=Zp||new h({"raster-opacity":new ct(Ce.paint_raster["raster-opacity"]),"raster-hue-rotate":new ct(Ce.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ct(Ce.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ct(Ce.paint_raster["raster-brightness-max"]),"raster-saturation":new ct(Ce.paint_raster["raster-saturation"]),"raster-contrast":new ct(Ce.paint_raster["raster-contrast"]),"raster-resampling":new ct(Ce.paint_raster["raster-resampling"]),"raster-fade-duration":new ct(Ce.paint_raster["raster-fade-duration"])})}};class F_ extends n{constructor(t){super(t,B_)}}class O_ extends n{constructor(t){super(t,{}),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=t}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class $_{constructor(t){this._methodToThrottle=t,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=()=>{}}}const Zh=63710088e-1;class Js{constructor(t,r){if(isNaN(t)||isNaN(r))throw new Error(`Invalid LngLat object: (${t}, ${r})`);if(this.lng=+t,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 Js(wt(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const r=Math.PI/180,s=this.lat*r,u=t.lat*r,d=Math.sin(s)*Math.sin(u)+Math.cos(s)*Math.cos(u)*Math.cos((t.lng-this.lng)*r);return Zh*Math.acos(Math.min(d,1))}static convert(t){if(t instanceof Js)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new Js(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t!==null)return new Js(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const Hp=2*Math.PI*Zh;function Wp(i){return Hp*Math.cos(i*Math.PI/180)}function Xp(i){return(180+i)/360}function Kp(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function Yp(i,t){return i/Wp(t)}function Hh(i){return 360/Math.PI*Math.atan(Math.exp((180-360*i)*Math.PI/180)
vendor: 8,974 bytes, line 12
12)-90}class eu{constructor(t,r,s=0){this.x=+t,this.y=+r,this.z=+s}static fromLngLat(t,r=0){const s=Js.convert(t);return new eu(Xp(s.lng),Kp(s.lat),Yp(r,s.lat))}toLngLat(){return new Js(360*this.x-180,Hh(this.y))}toAltitude(){return this.z*Wp(Hh(this.y))}meterInMercatorCoordinateUnits(){return 1/Hp*(t=Hh(this.y),1/Math.cos(t*Math.PI/180));var t}}function Jp(i,t,r){var s=2*Math.PI*6378137/256/Math.pow(2,r);return[i*s-2*Math.PI*6378137/2,t*s-2*Math.PI*6378137/2]}class Wh{constructor(t,r,s){if(!function(u,d,p){return!(u<0||u>25||p<0||p>=Math.pow(2,u)||d<0||d>=Math.pow(2,u))}(t,r,s))throw new Error(`x=${r}, y=${s}, z=${t} outside of bounds. 0<=x<${Math.pow(2,t)}, 0<=y<${Math.pow(2,t)} 0<=z<=25 `);this.z=t,this.x=r,this.y=s,this.key=tu(0,t,t,r,s)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,r,s){const u=(p=this.y,m=this.z,v=Jp(256*(d=this.x),256*(p=Math.pow(2,m)-p-1),m),S=Jp(256*(d+1),256*(p+1),m),v[0]+","+v[1]+","+S[0]+","+S[1]);var d,p,m,v,S;const z=function(E,R,j){let N,q="";for(let K=E;K>0;K--)N=1<<K-1,q+=(R&N?1:0)+(j&N?2:0);return q}(this.z,this.x,this.y);return t[(this.x+this.y)%t.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,z).replace(/{bbox-epsg-3857}/g,u)}isChildOf(t){const r=this.z-t.z;return r>0&&t.x===this.x>>r&&t.y===this.y>>r}getTilePoint(t){const r=Math.pow(2,this.z);return new F((t.x*r-this.x)*Bi,(t.y*r-this.y)*Bi)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Qp{constructor(t,r){this.wrap=t,this.canonical=r,this.key=tu(t,r.z,r.z,r.x,r.y)}}class nn{constructor(t,r,s,u,d){if(t<s)throw new Error(`overscaledZ should be >= z; overscaledZ = ${t}; z = ${s}`);this.overscaledZ=t,this.wrap=r,this.canonical=new Wh(s,+u,+d),this.key=tu(r,t,s,u,d)}clone(){return new nn(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const r=this.canonical.z-t;return t>this.canonical.z?new nn(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new nn(t,this.wrap,t,this.canonical.x>>r,this.canonical.y>>r)}calculateScaledKey(t,r){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const s=this.canonical.z-t;return t>this.canonical.z?tu(this.wrap*+r,t,this.canonical.z,this.canonical.x,this.canonical.y):tu(this.wrap*+r,t,t,this.canonical.x>>s,this.canonical.y>>s)}isChildOf(t){if(t.wrap!==this.wrap)return!1;const r=this.canonical.z-t.canonical.z;return t.overscaledZ===0||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>r&&t.canonical.y===this.canonical.y>>r}children(t){if(this.overscaledZ>=t)return[new nn(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const r=this.canonical.z+1,s=2*this.canonical.x,u=2*this.canonical.y;return[new nn(r,this.wrap,r,s,u),new nn(r,this.wrap,r,s+1,u),new nn(r,this.wrap,r,s,u+1),new nn(r,this.wrap,r,s+1,u+1)]}isLessThan(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}wrapped(){return new nn(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new nn(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Qp(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(t){return this.canonical.getTilePoint(new eu(t.x-this.wrap,t.y))}}function tu(i,t,r,s,u){(i*=2)<0&&(i=-1*i-1);const d=1<<r;return(d*d*i+d*u+s).toString(36)+r.toString(36)+t.toString(36)}ot("CanonicalTileID",Wh),ot("OverscaledTileID",nn,{omit:["posMatrix"]});class ef{constructor(t,r,s,u=1,d=1,p=1,m=0){if(this.uid=t,r.height!==r.width)throw new RangeError("DEM tiles must be square");if(s&&!["mapbox","terrarium","custom"].includes(s))return void Ct(`"${s}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=r.height;const v=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=d,this.blueFactor=p,this.baseShift=m;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let S=0;S<v;S++)this.data[this._idx(-1,S)]=this.data[this._idx(0,S)],this.data[this._idx(v,S)]=this.data[this._idx(v-1,S)],this.data[this._idx(S,-1)]=this.data[this._idx(S,0)],this.data[this._idx(S,v)]=this.data[this._idx(S,v-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(v,-1)]=this.data[this._idx(v-1,0)],this.data[this._idx(-1,v)]=this.data[this._idx(0,v-1)],this.data[this._idx(v,v)]=this.data[this._idx(v-1,v-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let S=0;S<v;S++)for(let z=0;z<v;z++){const E=this.get(S,z);E>this.max&&(this.max=E),E<this.min&&(this.min=E)}}get(t,r){const s=new Uint8Array(this.data.buffer),u=4*this._idx(t,r);return this.unpack(s[u],s[u+1],s[u+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(t,r){if(t<-1||t>=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+(t+1)}unpack(t,r,s){return t*this.redFactor+r*this.greenFactor+s*this.blueFactor-this.baseShift}getPixels(){return new rn({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,r,s){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let u=r*this.dim,d=r*this.dim+this.dim,p=s*this.dim,m=s*this.dim+this.dim;switch(r){case-1:u=d-1;break;case 1:d=u+1}switch(s){case-1:p=m-1;break;case 1:m=p+1}const v=-r*this.dim,S=-s*this.dim;for(let z=p;z<m;z++)for(let E=u;E<d;E++)this.data[this._idx(E,z)]=t.data[this._idx(E+v,z+S)]}}ot("DEMData",ef);class tf{constructor(t){this._stringToNumber={},this._numberToString=[];for(let r=0;r<t.length;r++){const s=t[r];this._stringToNumber[s]=r,this._numberToString[r]=s}}encode(t){return this._stringToNumber[t]}decode(t){if(t>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${t} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}}class rf{constructor(t,r,s,u,d){this.type="Feature",this._vectorTileFeature=t,t._z=r,t._x=s,t._y=u,this.properties=t.properties,this.id=d}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(t){this._geometry=t}toJSON(){const t={geometry:this.geometry};for(const r in this)r!=="_geometry"&&r!=="_vectorTileFeature"&&(t[r]=this[r]);return t}}class nf{constructor(t,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Os(Bi,16,0),this.grid3D=new Os(Bi,16,0),this.featureIndexArray=new lr,this.promoteId=r}insert(t,r,s,u,d,p){const m=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(s,u,d);const v=p?this.grid3D:this.grid;for(let S=0;S<r.length;S++){const z=r[S],E=[1/0,1/0,-1/0,-1/0];for(let R=0;R<z.length;R++){const j=z[R];E[0]=Math.min(E[0],j.x),E[1]=Math.min(E[1],j.y),E[2]=Math.max(E[2],j.x),E[3]=Math.max(E[3],j.y)}E[0]<Bi&&E[1]<Bi&&E[2]>=0&&E[3]>=0&&v.insert(m,E[0],E[1],E[2],E[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Xs.VectorTile(new Bh(this.rawTileData)).layers,this.sourceLayerCoder=new tf(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(t,r,s,u){this.loadVTLayers();const d=t.params||{},p=Bi/t.tileSize/t.scale,m=xl(d.filter),v=t.queryGeometry,S=t.queryPadding*p,z=af(v),E=this.grid.query(z.minX-S,z.minY-S,z.maxX+S,z.maxY+S),R=af(t.cameraQueryGeometry),j=this.grid3D.query(R.minX-S,R.minY-S,R.maxX+S,R.maxY+S,(K,ie,ke,ce)=>function(xe,Pe,$e,rt,xt){for(const Je of xe)if(Pe<=Je.x&&$e<=Je.y&&rt>=Je.x&&xt>=Je.y)return!0;const et=[new F(Pe,$e),new F(Pe,xt),new F(rt,xt),new F(rt,$e)];if(xe.length>2){for(const Je of et)if(Po(xe,Je))return!0}for(let Je=0;Je<xe.length-1;Je++)if(yg(xe[Je],xe[Je+1],et))return!0;return!1}(t.cameraQueryGeometry,K-S,ie-S,ke+S,ce+S));for(const K of j)E.push(K);E.sort(j_);const N={};let q;for(let K=0;K<E.length;K++){const ie=E[K];if(ie===q)continue;q=ie;const ke=this.featureIndexArray.get(ie);let ce=null;
12this.loadMatchingFeature(N,ke.bucketIndex,ke.sourceLayerIndex,ke.featureIndex,m,d.layers,d.availableImages,r,s,u,(xe,Pe,$e)=>(ce||(ce=Ra(xe)),Pe.queryIntersectsFeature(v,xe,$e,ce,this.z,t.transform,p,t.pixelPosMatrix)))}return N}loadMatchingFeature(t,r,s,u,d,p,m,v,S,z,E){const R=this.bucketLayerIDs[r];if(p&&!function(K,ie){for(let ke=0;ke<K.length;ke++)if(ie.indexOf(K[ke])>=0)return!0;return!1}(p,R))return;const j=this.sourceLayerCoder.decode(s),N=this.vtLayers[j].feature(u);if(d.needGeometry){const K=Ba(N,!0);if(!d.filter(new mi(this.tileID.overscaledZ),K,this.tileID.canonical))return}else if(!d.filter(new mi(this.tileID.overscaledZ),N))return;const q=this.getId(N,j);for(let K=0;K<R.length;K++){const ie=R[K];if(p&&p.indexOf(ie)<0)continue;const ke=v[ie];if(!ke)continue;let ce={};q&&z&&(ce=z.getState(ke.sourceLayer||"_geojsonTileLayer",q));const xe=Ge({},S[ie]);xe.paint=sf(xe.paint,ke.paint,N,ce,m),xe.layout=sf(xe.layout,ke.layout,N,ce,m);const Pe=!E||E(N,ke,ce);if(!Pe)continue;const $e=new rf(N,this.z,this.x,this.y,q);$e.layer=xe;let rt=t[ie];rt===void 0&&(rt=t[ie]=[]),rt.push({featureIndex:u,feature:$e,intersectionZ:Pe})}}lookupSymbolFeatures(t,r,s,u,d,p,m,v){const S={};this.loadVTLayers();const z=xl(d);for(const E of t)this.loadMatchingFeature(S,s,u,E,z,p,m,v,r);return S}hasLayer(t){for(const r of this.bucketLayerIDs)for(const s of r)if(t===s)return!0;return!1}getId(t,r){let s=t.id;return this.promoteId&&(s=t.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[r]],typeof s=="boolean"&&(s=Number(s))),s}}function sf(i,t,r,s,u){return Te(i,(d,p)=>{const m=t instanceof Ea?t.get(p):null;return m&&m.evaluate?m.evaluate(r,s,u):m})}function af(i){let t=1/0,r=1/0,s=-1/0,u=-1/0;for(const d of i)t=Math.min(t,d.x),r=Math.min(r,d.y),s=Math.max(s,d.x),u=Math.max(u,d.y);return{minX:t,minY:r,maxX:s,maxY:u}}function j_(i,t){return t-i}function of(i,t,r,s,u){const d=[];for(let p=0;p<i.length;p++){const m=i[p];let v;for(let S=0;S<m.length-1;S++){let z=m[S],E=m[S+1];z.x<t&&E.x<t||(z.x<t?z=new F(t,z.y+(t-z.x)/(E.x-z.x)*(E.y-z.y))._round():E.x<t&&(E=new F(t,z.y+(t-z.x)/(E.x-z.x)*(E.y-z.y))._round()),z.y<r&&E.y<r||(z.y<r?z=new F(z.x+(r-z.y)/(E.y-z.y)*(E.x-z.x),r)._round():E.y<r&&(E=new F(z.x+(r-z.y)/(E.y-z.y)*(E.x-z.x),r)._round()),z.x>=s&&E.x>=s||(z.x>=s?z=new F(s,z.y+(s-z.x)/(E.x-z.x)*(E.y-z.y))._round():E.x>=s&&(E=new F(s,z.y+(s-z.x)/(E.x-z.x)*(E.y-z.y))._round()),z.y>=u&&E.y>=u||(z.y>
vendor: 4,509 bytes, line 12
12=u?z=new F(z.x+(u-z.y)/(E.y-z.y)*(E.x-z.x),u)._round():E.y>=u&&(E=new F(z.x+(u-z.y)/(E.y-z.y)*(E.x-z.x),u)._round()),v&&z.equals(v[v.length-1])||(v=[z],d.push(v)),v.push(E)))))}}return d}ot("FeatureIndex",nf,{omit:["rawTileData","sourceLayerCoder"]});class Qs extends F{constructor(t,r,s,u){super(t,r),this.angle=s,u!==void 0&&(this.segment=u)}clone(){return new Qs(this.x,this.y,this.angle,this.segment)}}function lf(i,t,r,s,u){if(t.segment===void 0||r===0)return!0;let d=t,p=t.segment+1,m=0;for(;m>-r/2;){if(p--,p<0)return!1;m-=i[p].dist(d),d=i[p]}m+=i[p].dist(i[p+1]),p++;const v=[];let S=0;for(;m<r/2;){const z=i[p],E=i[p+1];if(!E)return!1;let R=i[p-1].angleTo(z)-z.angleTo(E);for(R=Math.abs((R+3*Math.PI)%(2*Math.PI)-Math.PI),v.push({distance:m,angleDelta:R}),S+=R;m-v[0].distance>s;)S-=v.shift().angleDelta;if(S>u)return!1;p++,m+=z.dist(E)}return!0}function uf(i){let t=0;for(let r=0;r<i.length-1;r++)t+=i[r].dist(i[r+1]);return t}function cf(i,t,r){return i?.6*t*r:0}function hf(i,t){return Math.max(i?i.right-i.left:0,t?t.right-t.left:0)}function V_(i,t,r,s,u,d){const p=cf(r,u,d),m=hf(r,s)*d;let v=0;const S=uf(i)/2;for(let z=0;z<i.length-1;z++){const E=i[z],R=i[z+1],j=E.dist(R);if(v+j>S){const N=(S-v)/j,q=fr.number(E.x,R.x,N),K=fr.number(E.y,R.y,N),ie=new Qs(q,K,R.angleTo(E),z);return ie._round(),!p||lf(i,ie,m,p,t)?ie:void 0}v+=j}}function N_(i,t,r,s,u,d,p,m,v){const S=cf(s,d,p),z=hf(s,u),E=z*p,R=i[0].x===0||i[0].x===v||i[0].y===0||i[0].y===v;return t-E<t/4&&(t=E+t/4),df(i,R?t/2*m%t:(z/2+2*d)*p*m%t,t,S,r,E,R,!1,v)}function df(i,t,r,s,u,d,p,m,v){const S=d/2,z=uf(i);let E=0,R=t-r,j=[];for(let N=0;N<i.length-1;N++){const q=i[N],K=i[N+1],ie=q.dist(K),ke=K.angleTo(q);for(;R+r<E+ie;){R+=r;const ce=(R-E)/ie,xe=fr.number(q.x,K.x,ce),Pe=fr.number(q.y,K.y,ce);if(xe>=0&&xe<v&&Pe>=0&&Pe<v&&R-S>=0&&R+S<=z){const $e=new Qs(xe,Pe,ke,N);$e._round(),s&&!lf(i,$e,d,s,u)||j.push($e)}}E+=ie}return m||j.length||p||(j=df(i,E/2,r,s,u,d,p,!0,v)),j}ot("Anchor",Qs);const iu=Mr;function pf(i,t,r,s){const u=[],d=i.image,p=d.pixelRatio,m=d.paddedRect.w-2*iu,v=d.paddedRect.h-2*iu;let S={x1:i.left,y1:i.top,x2:i.right,y2:i.bottom};const z=d.stretchX||[[0,m]],E=d.stretchY||[[0,v]],R=(Me,mt)=>Me+mt[1]-mt[0],j=z.reduce(R,0),N=E.reduce(R,0),q=m-j,K=v-N;let ie=0,ke=j,ce=0,xe=N,Pe=0,$e=q,rt=0,xt=K;if(d.content&&s){const Me=d.content,mt=Me[2]-Me[0],dt=Me[3]-Me[1];(d.textFitWidth||d.textFitHeight)&&(S=$p(i)),ie=cc(z,0,Me[0]),ce=cc(E,0,Me[1]),ke=cc(z,Me[0],Me[2]),xe=cc(E,Me[1],Me[3]),Pe=Me[0]-ie,rt=Me[1]-ce,$e=mt-ke,xt=dt-xe}const et=S.x1,Je=S.y1,pt=S.x2-et,lt=S.y2-Je,st=(Me,mt,dt,Tt)=>{const ui=hc(Me.stretch-ie,ke,pt,et),oi=dc(Me.fixed-Pe,$e,Me.stretch,j),ji=hc(mt.stretch-ce,xe,lt,Je),vn=dc(mt.fixed-rt,xt,mt.stretch,N),er=hc(dt.stretch-ie,ke,pt,et),Vi=dc(dt.fixed-Pe,$e,dt.stretch,j),yr=hc(Tt.stretch-ce,xe,lt,Je),vr=dc(Tt.fixed-rt,xt,Tt.stretch,N),xr=new F(ui,ji),Ii=new F(er,ji),Ni=new F(er,yr),cr=new F(ui,yr),tr=new F(oi/p,vn/p),br=new F(Vi/p,vr/p),ir=t*Math.PI/180;if(ir){const Kt=Math.sin(ir),pi=Math.cos(ir),vi=[pi,-Kt,Kt,pi];xr._matMult(vi),Ii._matMult(vi),cr._matMult(vi),Ni._matMult(vi)}const sn=Me.stretch+Me.fixed,Dr=mt.stretch+mt.fixed;return{tl:xr,tr:Ii,bl:cr,br:Ni,tex:{x:d.paddedRect.x+iu+sn,y:d.paddedRect.y+iu+Dr,w:dt.stretch+dt.fixed-sn,h:Tt.stretch+Tt.fixed-Dr},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:tr,pixelOffsetBR:br,minFontScaleX:$e/p/pt,minFontScaleY:xt/p/lt,isSDF:r}};if(s&&(d.stretchX||d.stretchY)){const Me=ff(z,q,j),mt=ff(E,K,N);for(let dt=0;dt<Me.length-1;dt++){const Tt=Me[dt],ui=Me[dt+1];for(let oi=0;oi<mt.length-1;oi++)u.push(st(Tt,mt[oi],ui,mt[oi+1]))}}else u.push(st({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:m+1},{fixed:0,stretch:v+1}));return u}function cc(i,t,r){let s=0;for(const u of i)s+=Math.max(t,Math.min(r,u[1]))-Math.max(t,Math.min(r,u[0]));return s}function ff(i,t,r){const s=[{fixed:-1,stretch:0}];for(const[u,d]of i){const p=s[s.length-1];s.push({fixed:u-p.stretch,stretch:p.stretch}),s.push({fixed:u-p.stretch,stretch:p.stretch+(d-u)})}return s.push({fixed:t+iu,stretch:r}),s}function hc(i,t,r,s){return i/t*r+s}function dc(i,t,r,s){return i-t*r/s}class pc{constructor(t,r,s,u,d,p,m,v,S,z){var E;if(this.boxStartIndex=t.length,S){let R=p.top,j=p.bottom;const N=p.collisionPadding;N&&(R-=N[1],j+=N[3]);let q=j-R;q>0&&(q=Math.max(10,q),this.circleDiameter=q)}else{const R=!((E=p.image)===null||E===void 0)&&E.content&&(p.image.textFitWidth||p.image.textFitHeight)?$p(p):{x1:p.left,y1:p.top,x2:p.right,y2:p.bottom};
vendor: 7,899 bytes, line 12
12R.y1=R.y1*m-v[0],R.y2=R.y2*m+v[2],R.x1=R.x1*m-v[3],R.x2=R.x2*m+v[1];const j=p.collisionPadding;if(j&&(R.x1-=j[0]*m,R.y1-=j[1]*m,R.x2+=j[2]*m,R.y2+=j[3]*m),z){const N=new F(R.x1,R.y1),q=new F(R.x2,R.y1),K=new F(R.x1,R.y2),ie=new F(R.x2,R.y2),ke=z*Math.PI/180;N._rotate(ke),q._rotate(ke),K._rotate(ke),ie._rotate(ke),R.x1=Math.min(N.x,q.x,K.x,ie.x),R.x2=Math.max(N.x,q.x,K.x,ie.x),R.y1=Math.min(N.y,q.y,K.y,ie.y),R.y2=Math.max(N.y,q.y,K.y,ie.y)}t.emplaceBack(r.x,r.y,R.x1,R.y1,R.x2,R.y2,s,u,d)}this.boxEndIndex=t.length}}class U_{constructor(t=[],r=(s,u)=>s<u?-1:s>u?1:0){if(this.data=t,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(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;const t=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:r,compare:s}=this,u=r[t];for(;t>0;){const d=t-1>>1,p=r[d];if(s(u,p)>=0)break;r[t]=p,t=d}r[t]=u}_down(t){const{data:r,compare:s}=this,u=this.length>>1,d=r[t];for(;t<u;){let p=1+(t<<1);const m=p+1;if(m<this.length&&s(r[m],r[p])<0&&(p=m),s(r[p],d)>=0)break;r[t]=r[p],t=p}r[t]=d}}function G_(i,t=1,r=!1){let s=1/0,u=1/0,d=-1/0,p=-1/0;const m=i[0];for(let j=0;j<m.length;j++){const N=m[j];(!j||N.x<s)&&(s=N.x),(!j||N.y<u)&&(u=N.y),(!j||N.x>d)&&(d=N.x),(!j||N.y>p)&&(p=N.y)}const v=Math.min(d-s,p-u);let S=v/2;const z=new U_([],q_);if(v===0)return new F(s,u);for(let j=s;j<d;j+=v)for(let N=u;N<p;N+=v)z.push(new Fo(j+S,N+S,S,i));let E=function(j){let N=0,q=0,K=0;const ie=j[0];for(let ke=0,ce=ie.length,xe=ce-1;ke<ce;xe=ke++){const Pe=ie[ke],$e=ie[xe],rt=Pe.x*$e.y-$e.x*Pe.y;q+=(Pe.x+$e.x)*rt,K+=(Pe.y+$e.y)*rt,N+=3*rt}return new Fo(q/N,K/N,0,j)}(i),R=z.length;for(;z.length;){const j=z.pop();(j.d>E.d||!E.d)&&(E=j,r&&console.log("found best %d after %d probes",Math.round(1e4*j.d)/1e4,R)),j.max-E.d<=t||(S=j.h/2,z.push(new Fo(j.p.x-S,j.p.y-S,S,i)),z.push(new Fo(j.p.x+S,j.p.y-S,S,i)),z.push(new Fo(j.p.x-S,j.p.y+S,S,i)),z.push(new Fo(j.p.x+S,j.p.y+S,S,i)),R+=4)}return r&&(console.log(`num probes: ${R}`),console.log(`best distance: ${E.d}`)),E.p}function q_(i,t){return t.max-i.max}function Fo(i,t,r,s){this.p=new F(i,t),this.h=r,this.d=function(u,d){let p=!1,m=1/0;for(let v=0;v<d.length;v++){const S=d[v];for(let z=0,E=S.length,R=E-1;z<E;R=z++){const j=S[z],N=S[R];j.y>u.y!=N.y>u.y&&u.x<(N.x-j.x)*(u.y-j.y)/(N.y-j.y)+j.x&&(p=!p),m=Math.min(m,Yd(u,j,N))}}return(p?1:-1)*Math.sqrt(m)}(this.p,s),this.max=this.d+this.h*Math.SQRT2}var Qi;w.aq=void 0,(Qi=w.aq||(w.aq={}))[Qi.center=1]="center",Qi[Qi.left=2]="left",Qi[Qi.right=3]="right",Qi[Qi.top=4]="top",Qi[Qi.bottom=5]="bottom",Qi[Qi["top-left"]=6]="top-left",Qi[Qi["top-right"]=7]="top-right",Qi[Qi["bottom-left"]=8]="bottom-left",Qi[Qi["bottom-right"]=9]="bottom-right";const ea=7,Xh=Number.POSITIVE_INFINITY;function mf(i,t){return t[1]!==Xh?function(r,s,u){let d=0,p=0;switch(s=Math.abs(s),u=Math.abs(u),r){case"top-right":case"top-left":case"top":p=u-ea;break;case"bottom-right":case"bottom-left":case"bottom":p=-u+ea}switch(r){case"top-right":case"bottom-right":case"right":d=-s;break;case"top-left":case"bottom-left":case"left":d=s}return[d,p]}(i,t[0],t[1]):function(r,s){let u=0,d=0;s<0&&(s=0);const p=s/Math.SQRT2;switch(r){case"top-right":case"top-left":d=p-ea;break;case"bottom-right":case"bottom-left":d=-p+ea;break;case"bottom":d=-s+ea;break;case"top":d=s-ea}switch(r){case"top-right":case"bottom-right":u=-p;break;case"top-left":case"bottom-left":u=p;break;case"left":u=s;break;case"right":u=-s}return[u,d]}(i,t[0])}function gf(i,t,r){var s;const u=i.layout,d=(s=u.get("text-variable-anchor-offset"))===null||s===void 0?void 0:s.evaluate(t,{},r);if(d){const m=d.values,v=[];for(let S=0;S<m.length;S+=2){const z=v[S]=m[S],E=m[S+1].map(R=>R*Oi);z.startsWith("top")?E[1]-=ea:z.startsWith("bottom")&&(E[1]+=ea),v[S+1]=E}return new Fr(v)}const p=u.get("text-variable-anchor");if(p){let m;m=i._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[u.get("text-radial-offset").evaluate(t,{},r)*Oi,Xh]:u.get("text-offset").evaluate(t,{},r).map(S=>S*Oi);const v=[];for(const S of p)v.push(S,mf(S,m));return new Fr(v)}return null}function Kh(i){switch(i){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Z_(i,t,r,s,u,d,p,m,v,S,z){let E=d.textMaxSize.evaluate(t,{});E===void 0&&(E=p);const R=i.layers[0].layout,j=R.get("icon-offset").evaluate(t,{},z),N=yf(r.horizontal),q=p/24,K=i.tilePixelRatio*q,ie=i.tilePixelRatio*E/24,ke=i.tilePixelRatio*m,ce=i.tilePixelRatio*R.get("symbol-spacing"),xe=R.get("text-padding")*i.tilePixelRatio,Pe=function(Me,mt,dt,Tt=1){const ui=Me.get("icon-padding").evaluate(mt,{},dt),oi=ui&&ui.values;return[oi[0]*Tt,oi[1]*Tt,oi[2]*Tt,oi[3]*Tt]}(R,t,z,i.tilePixelRatio),$e=R.get("text-max-angle")/180*Math.PI,rt=R.get("text-rotation-alignment")!=="viewport"&&R.get("symbol-placement")!=="point",xt=R.get("icon-rotation-alignment")==="map"&&R.get("symbol-placement")!=="point",et=R.get("symbol-placement"),Je=ce/2,pt=R.get("icon-text-fit");let lt;s&&pt!=="none"&&(i.allowVerticalPlacement&&r.vertical&&(lt=jp(s,r.vertical,pt,R.get("icon-text-fit-padding"),j,q)),N&&(s=jp(s,N,pt,R.get("icon-text-fit-padding"),j,q)));const st=(Me,mt)=>{mt.x<0||mt.x>=Bi||mt.y<0||mt.y>=Bi||function(dt,Tt,ui,oi,ji,vn,er,Vi,yr,vr,xr,Ii,Ni,cr,tr,br,ir,sn,Dr,Kt,pi,vi,Gr,zi,Oo){const $n=dt.addToLineVertexArray(Tt,ui);let jn,xn,an,Zi,cs=0,su=0,wf=0,kf=0,nd=-1,sd=-1;const hs={};let Sf=To("");if(dt.allowVerticalPlacement&&oi.vertical){const hr=Vi.layout.get("text-rotate").evaluate(pi,{},zi)+90;an=new pc(yr,Tt,vr,xr,Ii,oi.vertical,Ni,cr,tr,hr),er&&(Zi=new pc(yr,Tt,vr,xr,Ii,er,ir,sn,tr,hr))}if(ji){const hr=Vi.layout.get("icon-rotate").evaluate(pi,{}),on=Vi.layout.get("icon-text-fit")!=="none",Oa=pf(ji,hr,Gr,on),Pn=er?pf(er,hr,Gr,on):void 0;xn=new pc(yr,Tt,vr,xr,Ii,ji,ir,sn,!1,hr),cs=4*Oa.length;const $a=dt.iconSizeData;let Vn=null;$a.kind==="source"?(Vn=[On*Vi.layout.get("icon-size").evaluate(pi,{})],Vn[0]>Ys&&Ct(`${dt.layerIds[0]}: Value for "icon-size" is >= ${Ql}. Reduce your "icon-size".`)):$a.kind==="composite"&&(Vn=[On*vi.compositeIconSizes[0].evaluate(pi,{},zi),On*vi.compositeIconSizes[1].evaluate(pi,{},zi)],(Vn[0]>Ys||Vn[1]>Ys)&&Ct(`${dt.layerIds[0]}: Value for "icon-size" is >= ${Ql}. Reduce your "icon-size".`)),dt.addSymbols(dt.icon,Oa,Vn,Kt,Dr,pi,w.ah.none,Tt,$n.lineStartIndex,$n.lineLength,-1,zi),nd=dt.icon.placedSymbolArray.length-1,Pn&&(su=4*Pn.length,dt.addSymbols(dt.icon,Pn,Vn,Kt,Dr,pi,w.ah.vertical,Tt,$n.lineStartIndex,$n.lineLength,-1,zi),sd=dt.icon.placedSymbolArray.length-1)}const Tf=Object.keys(oi.horizontal);for(const hr of Tf){const on=oi.horizontal[hr];if(!jn){Sf=To(on.text);const Pn=Vi.layout.get("text-rotate").evaluate(pi,{},zi);jn=new pc(yr,Tt,vr,xr,Ii,on,Ni,cr,tr,Pn)}const Oa=on.positionedLines.length===1;if(wf+=_f(dt,Tt,on,vn,Vi,tr,pi,br,$n,oi.vertical?w.ah.horizontal:w.ah.horizontalOnly,Oa?Tf:[hr],hs,nd,vi,zi),Oa)break}oi.vertical&&(kf+=_f(dt,Tt,oi.vertical,vn,Vi,tr,pi,br,$n,w.ah.vertical,["vertical"],hs,sd,vi,zi));const X_=jn?jn.boxStartIndex:dt.collisionBoxArray.length,K_=jn?jn.boxEndIndex:dt.collisionBoxArray.length,Y_=an?an.boxStartIndex:dt.collisionBoxArray.length,J_=an?an.boxEndIndex:dt.collisionBoxArray.length,Q_=xn?xn.boxStartIndex:dt.collisionBoxArray.length,ey=xn?xn.boxEndIndex:dt.collisionBoxArray.length,ty=Zi?Zi.boxStartIndex:dt.collisionBoxArray.length,iy=Zi?Zi.boxEndIndex:dt.collisionBoxArray.length;let An=-1;const mc=(hr,on)=>hr&&hr.circleDiameter?Math.max(hr.circleDiameter,on):on;An=mc(jn,An),An=mc(an,An),An=mc(xn,An),An=mc(Zi,An);const zf=An>-1?1:0;zf&&(An*=Oo/Oi),dt.glyphOffsetArray.length>=Bo.MAX_GLYPHS&&Ct("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),pi.sortKey!==void 0&&dt.addToSortKey
12Ranges(dt.symbolInstances.length,pi.sortKey);const ry=gf(Vi,pi,zi),[ny,sy]=function(hr,on){const Oa=hr.length,Pn=on==null?void 0:on.values;if((Pn==null?void 0:Pn.length)>0)for(let $a=0;$a<Pn.length;$a+=2){const Vn=Pn[$a+1];hr.emplaceBack(w.aq[Pn[$a]],Vn[0],Vn[1])}return[Oa,hr.length]}(dt.textAnchorOffsets,ry);dt.symbolInstances.emplaceBack(Tt.x,Tt.y,hs.right>=0?hs.right:-1,hs.center>=0?hs.center:-1,hs.left>=0?hs.left:-1,hs.vertical||-1,nd,sd,Sf,X_,K_,Y_,J_,Q_,ey,ty,iy,vr,wf,kf,cs,su,zf,0,Ni,An,ny,sy)}(i,mt,Me,r,s,u,lt,i.layers[0],i.collisionBoxArray,t.index,t.sourceLayerIndex,i.index,K,[xe,xe,xe,xe],rt,v,ke,Pe,xt,j,t,d,S,z,p)};if(et==="line")for(const Me of of(t.geometry,0,0,Bi,Bi)){const mt=N_(Me,ce,$e,r.vertical||N,s,24,ie,i.overscaling,Bi);for(const dt of mt)N&&H_(i,N.text,Je,dt)||st(Me,dt)}else if(et==="line-center"){for(const Me of t.geometry)if(Me.length>1){const mt=V_(Me,$e,r.vertical||N,s,24,ie);mt&&st(Me,mt)}}else if(t.type==="Polygon")for(const Me of eo(t.geometry,0)){const mt=G_(Me,16);st(Me[0],new Qs(mt.x,mt.y,0))}else if(t.type==="LineString")for(const Me of t.geometry)st(Me,new Qs(Me[0].x,Me[0].y,0));else if(t.type==="Point")for(const Me of t.geometry)for(const mt of Me)st([mt],new Qs(mt.x,mt.y,0))}function _f(i,t,r,s,u,d,p,m,v,S,z,E,R,j,N){const q=function(ke,ce,xe,Pe,$e,rt,xt,et){const Je=Pe.layout.get("text-rotate").evaluate(rt,{})*Math.PI/180,pt=[];for(const lt of ce.positionedLines)for(const st of lt.positionedGlyphs){if(!st.rect)continue;const Me=st.rect||{};let mt=T_+1,dt=!0,Tt=1,ui=0;const oi=($e||et)&&st.vertical,ji=st.metrics.advance*st.scale/2;if(et&&ce.verticalizable&&(ui=lt.lineOffset/2-(st.imageName?-(Oi-st.metrics.width*st.scale)/2:(st.scale-1)*Oi)),st.imageName){const Kt=xt[st.imageName];dt=Kt.sdf,Tt=Kt.pixelRatio,mt=Mr/Tt}const vn=$e?[st.x+ji,st.y]:[0,0];let er=$e?[0,0]:[st.x+ji+xe[0],st.y+xe[1]-ui],Vi=[0,0];oi&&(Vi=er,er=[0,0]);const yr=st.metrics.isDoubleResolution?2:1,vr=(st.metrics.left-mt)*st.scale-ji+er[0],xr=(-st.metrics.top-mt)*st.scale+er[1],Ii=vr+Me.w/yr*st.scale/Tt,Ni=xr+Me.h/yr*st.scale/Tt,cr=new F(vr,xr),tr=new F(Ii,xr),br=new F(vr,Ni),ir=new F(Ii,Ni);if(oi){const Kt=new F(-ji,ji-Yl),pi=-Math.PI/2,vi=Oi/2-ji,Gr=new F(5-Yl-vi,-(st.imageName?vi:0)),zi=new F(...Vi);cr._rotateAround(pi,Kt)._add(Gr)._add(zi),tr._rotateAround(pi,Kt)._add(Gr)._add(zi),br._rotateAround(pi,Kt)._add(Gr)._add(zi),ir._rotateAround(pi,Kt)._add(Gr)._add(zi)}if(Je){const Kt=Math.sin(Je),pi=Math.cos(Je),vi=[pi,-Kt,Kt,pi];cr._matMult(vi),tr._matMult(vi),br._matMult(vi),ir._matMult(vi)}const sn=new F(0,0),Dr=new F(0,0);pt.push({tl:cr,tr,bl:br,br:ir,tex:Me,writingMode:ce.writingMode,glyphOffset:vn,sectionIndex:st.sectionIndex,isSDF:dt,pixelOffsetTL:sn,pixelOffsetBR:Dr,minFontScaleX:0,minFontScaleY:0})}return pt}(0,r,m,u,d,p,s,i.allowVerticalPlacement),K=i.textSizeData;let ie=null;K.kind==="source"?(ie=[On*u.layout.get("text-size").evaluate(p,{})],ie[0]>Ys&&Ct(`${i.layerIds[0]}: Value for "text-size" is >= ${Ql}. Reduce your "text-size".`)):K.kind==="composite"&&(ie=[On*j.compositeTextSizes[0].evaluate(p,{},N),On*j.compositeTextSizes[1].evaluate(p,{},N)],(ie[0]>Ys||ie[1]>Ys)&&Ct(`${i.layerIds[0]}: Value for "text-size" is >= ${Ql}. Reduce your "text-size".`)),i.addSymbols(i.text,q,ie,m,d,p,S,t,v.lineStartIndex,v.lineLength,R,N);for(const ke of z)E[ke]=i.text.placedSymbolArray.length-1;return 4*q.length}function yf(i){for(const t in i)return i[t];return null}function H_(i,t,r,s){const u=i.compareText;if(t in u){const d=u[t];for(let p=d.length-1;p>=0;p--)if(s.dist(d[p])<r)return!0}else u[t]=[];return u[t].push(s),!1}const vf=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Yh{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[r,s]=new Uint8Array(t,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");const u=s>>4;if(u!==1)throw new Error(`Got v${u} data when expected v1.`);const d=vf[15&s];if(!d)throw new Error("Unrecognized array type.");const[p]=new Uint16Array(t,2,1),[m]=new Uint32Array(t,4,1);return new Yh(m,p,d,t)}constructor(t,r=64,s=Float64Array,u){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=s,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const d=vf.indexOf(this.ArrayType),p=2*t*this.ArrayType.BYTES_PER_ELEMENT,m=t*this.IndexArrayType.BYTES_PER_ELEMENT,v=(8-m%8)%8;if(d<0)throw new Error(`Unexpected typed array class: ${s}.`);u&&u instanceof ArrayBuffer?(this.data=u,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+m+v,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+p+m+v),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+m+v,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+d]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=t)}
vendor: 20,710 bytes, line 12
12add(t,r){const s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=t,this.coords[this._pos++]=r,s}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Jh(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,r,s,u){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:d,coords:p,nodeSize:m}=this,v=[0,d.length-1,0],S=[];for(;v.length;){const z=v.pop()||0,E=v.pop()||0,R=v.pop()||0;if(E-R<=m){for(let K=R;K<=E;K++){const ie=p[2*K],ke=p[2*K+1];ie>=t&&ie<=s&&ke>=r&&ke<=u&&S.push(d[K])}continue}const j=R+E>>1,N=p[2*j],q=p[2*j+1];N>=t&&N<=s&&q>=r&&q<=u&&S.push(d[j]),(z===0?t<=N:r<=q)&&(v.push(R),v.push(j-1),v.push(1-z)),(z===0?s>=N:u>=q)&&(v.push(j+1),v.push(E),v.push(1-z))}return S}within(t,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:u,coords:d,nodeSize:p}=this,m=[0,u.length-1,0],v=[],S=s*s;for(;m.length;){const z=m.pop()||0,E=m.pop()||0,R=m.pop()||0;if(E-R<=p){for(let K=R;K<=E;K++)bf(d[2*K],d[2*K+1],t,r)<=S&&v.push(u[K]);continue}const j=R+E>>1,N=d[2*j],q=d[2*j+1];bf(N,q,t,r)<=S&&v.push(u[j]),(z===0?t-s<=N:r-s<=q)&&(m.push(R),m.push(j-1),m.push(1-z)),(z===0?t+s>=N:r+s>=q)&&(m.push(j+1),m.push(E),m.push(1-z))}return v}}function Jh(i,t,r,s,u,d){if(u-s<=r)return;const p=s+u>>1;xf(i,t,p,s,u,d),Jh(i,t,r,s,p-1,1-d),Jh(i,t,r,p+1,u,1-d)}function xf(i,t,r,s,u,d){for(;u>s;){if(u-s>600){const S=u-s+1,z=r-s+1,E=Math.log(S),R=.5*Math.exp(2*E/3),j=.5*Math.sqrt(E*R*(S-R)/S)*(z-S/2<0?-1:1);xf(i,t,r,Math.max(s,Math.floor(r-z*R/S+j)),Math.min(u,Math.floor(r+(S-z)*R/S+j)),d)}const p=t[2*r+d];let m=s,v=u;for(ru(i,t,s,r),t[2*u+d]>p&&ru(i,t,s,u);m<v;){for(ru(i,t,m,v),m++,v--;t[2*m+d]<p;)m++;for(;t[2*v+d]>p;)v--}t[2*s+d]===p?ru(i,t,s,v):(v++,ru(i,t,v,u)),v<=r&&(s=v+1),r<=v&&(u=v-1)}}function ru(i,t,r,s){Qh(i,r,s),Qh(t,2*r,2*s),Qh(t,2*r+1,2*s+1)}function Qh(i,t,r){const s=i[t];i[t]=i[r],i[r]=s}function bf(i,t,r,s){const u=i-r,d=t-s;return u*u+d*d}var ed;w.bg=void 0,(ed=w.bg||(w.bg={})).create="create",ed.load="load",ed.fullLoad="fullLoad";let fc=null,nu=[];const td=1e3/60,id="loadTime",rd="fullLoadTime",W_={mark(i){performance.mark(i)},frame(i){const t=i;fc!=null&&nu.push(t-fc),fc=t},clearMetrics(){fc=null,nu=[],performance.clearMeasures(id),performance.clearMeasures(rd);for(const i in w.bg)performance.clearMarks(w.bg[i])},getPerformanceMetrics(){performance.measure(id,w.bg.create,w.bg.load),performance.measure(rd,w.bg.create,w.bg.fullLoad);const i=performance.getEntriesByName(id)[0].duration,t=performance.getEntriesByName(rd)[0].duration,r=nu.length,s=1/(nu.reduce((d,p)=>d+p,0)/r/1e3),u=nu.filter(d=>d>td).reduce((d,p)=>d+(p-td)/td,0);return{loadTime:i,fullLoadTime:t,fps:s,percentDroppedFrames:u/(r+u)*100,totalFrames:r}}};w.$=class extends M{},w.A=Io,w.B=hh,w.C=function(i){if(ri==null){const t=i.navigator?i.navigator.userAgent:null;ri=!!i.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return ri},w.D=ct,w.E=Mn,w.F=class{constructor(i,t){this.target=i,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new $_(()=>this.process()),this.subscription=function(r,s,u,d){return r.addEventListener(s,u,!1),{unsubscribe:()=>{r.removeEventListener(s,u,!1)}}}(this.target,"message",r=>this.receive(r)),this.globalScope=wi(self)?i:window}registerMessageHandler(i,t){this.messageHandlers[i]=t}sendAsync(i,t){return new Promise((r,s)=>{const u=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[u]={resolve:r,reject:s},t&&t.signal.addEventListener("abort",()=>{delete this.resolveRejects[u];const m={id:u,type:"<cancel>",origin:location.origin,targetMapId:i.targetMapId,sourceMapId:this.mapId};this.target.postMessage(m)},{once:!0});const d=[],p=Object.assign(Object.assign({},i),{id:u,sourceMapId:this.mapId,origin:location.origin,data:$s(i.data,d)});this.target.postMessage(p,{transfer:d})})}receive(i){const t=i.data,r=t.id;if(!(t.origin!=="file://"&&location.origin!=="file://"&&t.origin!=="resource://android"&&location.origin!=="resource://android"&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type==="<cancel>"){delete this.tasks[r];const s=this.abortControllers[r];return delete this.abortControllers[r],void(s&&s.abort())}if(wi(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(this.taskQueue.length===0)return;const i=this.taskQueue.shift(),t=this.tasks[i];delete this.tasks[i],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(i,t)}processTask(i,t){return l(this,void 0,void 0,function*(){if(t.type==="<response>"){const u=this.resolveRejects[i];return delete this.resolveRejects[i],u?void(t.error?u.reject(js(t.error)):u.resolve(js(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(i,new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const r=js(t.data),s=new AbortController;this.abortControllers[i]=s;try{const u=yield this.messageHandlers[t.type](t.sourceMapId,r,s);this.completeTask(i,null,u)}catch(u){this.completeTask(i,u)}})}completeTask(i,t,r){const s=[];delete this.abortControllers[i];const u={id:i,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:t?$s(t):null,data:$s(r,s)};this.target.postMessage(u,{transfer:s})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},w.G=kn,w.H=function(){var i=new Io(16);return Io!=Float32Array&&(i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0),i[0]=1,i[5]=1,i[10]=1,i[15]=1,i},w.I=Oh,w.J=function(i,t,r){var s,u,d,p,m,v,S,z,E,R,j,N,q=r[0],K=r[1],ie=r[2];return t===i?(i[12]=t[0]*q+t[4]*K+t[8]*ie+t[12],i[13]=t[1]*q+t[5]*K+t[9]*ie+t[13],i[14]=t[2]*q+t[6]*K+t[10]*ie+t[14],i[15]=t[3]*q+t[7]*K+t[11]*ie+t[15]):(u=t[1],d=t[2],p=t[3],m=t[4],v=t[5],S=t[6],z=t[7],E=t[8],R=t[9],j=t[10],N=t[11],i[0]=s=t[0],i[1]=u,i[2]=d,i[3]=p,i[4]=m,i[5]=v,i[6]=S,i[7]=z,i[8]=E,i[9]=R,i[10]=j,i[11]=N,i[12]=s*q+m*K+E*ie+t[12],i[13]=u*q+v*K+R*ie+t[13],i[14]=d*q+S*K+j*ie+t[14],i[15]=p*q+z*K+N*ie+t[15]),i},w.K=function(i,t,r){var s=r[0],u=r[1],d=r[2];return i[0]=t[0]*s,i[1]=t[1]*s,i[2]=t[2]*s,i[3]=t[3]*s,i[4]=t[4]*u,i[5]=t[5]*u,i[6]=t[6]*u,i[7]=t[7]*u,i[8]=t[8]*d,i[9]=t[9]*d,i[10]=t[10]*d,i[11]=t[11]*d,i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i},w.L=tp,w.M=function(i,t){const r={};for(let s=0;s<t.length;s++){const u=t[s];u in i&&(r[u]=i[u])}return r},w.N=Js,w.O=Xp,w.P=F,w.Q=Kp,w.R=rn,w.S=nn,w.T=xo,w.U=ge,w.V=ae,w.W=xi,w.X=Bi,w.Y=g,w.Z=eu,w._=l,w.a=Zr,w.a$=function(i,t){var r=i[0],s=i[1],u=i[2],d=i[3],p=i[4],m=i[5],v=i[6],S=i[7],z=i[8],E=i[9],R=i[10],j=i[11],N=i[12],q=i[13],K=i[14],ie=i[15],ke=t[0],ce=t[1],xe=t[2],Pe=t[3],$e=t[4],rt=t[5],xt=t[6],et=t[7],Je=t[8],pt=t[9],lt=t[10],st=t[11],Me=t[12],mt=t[13],dt=t[14],Tt=t[15];return Math.abs(r-ke)<=_r*Math.max(1,Math.abs(r),Math.abs(ke))&&Math.abs(s-ce)<=_r*Math.max(1,Math.abs(s),Math.abs(ce))&&Math.abs(u-xe)<=_r*Math.max(1,Math.abs(u),Math.abs(xe))&&Math.abs(d-Pe)<=_r*Math.max(1,Math.abs(d),Math.abs(Pe))&&Math.abs(p-$e)<=_r*Math.max(1,Math.abs(p),Math.abs($e))&&Math.abs(m-rt)<=_r*Math.max(1,Math.abs(m),Math.abs(rt))&&Math.abs(v-xt)<=_r*Math.max(1,Math.abs(v),Math.abs(xt))&&Math.abs(S-et)<=_r*Math.max(1,Math.abs(S),Math.abs(et))&&Math.abs(z-Je)<=_r*Math.max(1,Math.abs(z),Math.abs(Je))&&Math.abs(E-pt)<=_r*Math.max(1,Math.abs(E),Math.abs(pt))&&Math.abs(R-lt)<=_r*Math.max(1,Math.abs(R),Math.abs(lt))&&Math.abs(j-st)<=_r*Math.max(1,Math.abs(j),Math.abs(st))&&Math.abs(N-Me)<=_r*Math.max(1,Math.abs(N),Math.abs(Me))&&Math.abs(q-mt)<=_r*Math.max(1,Math.abs(q),Math.abs(mt))&&Math.abs(K-dt)<=_r*Math.max(1,Math.abs(K),Math.abs(dt))&&Math.abs(ie-Tt)<=_r*Math.max(1,Math.abs(ie),Math.abs(Tt))},w.a0=Ut,w.a1=Wh,w.a2=Be,w.a3=i=>{const t=window.document.createElement("video");return t.muted=!0,new Promise(r=>{t.onloadstart=()=>{r(t)};for(const s of i){const u=window.document.createElement("source");sr(s)||(t.crossOrigin="Anonymous"),u.src=s,t.appendChild(u)}})},w.a4=function(){return P++},w.a5=it,w.a6=Bo,w.a7=xl,w.a8=Ba,w.a9=rf,w.aA=function(i){if(i.type==="custom")return new O_(i);switch(i.type){case"background":return new R_(i);case"circle":return new bg(i);case"fill":return new Og(i);case"fill-extrusion":return new Qg(i);case"heatmap":return new kg(i);case"hillshade":return new Tg(i);case"line":return new o_(i);case"raster":return new F_(i);case"symbol":return new uc(i)}},w.aB=Pt,w.aC=function(i,t){if(!i)return[{command:"setStyle",args:[t]}];let r=[];try{if(!Le(i.version,t.version))return[{command:"setStyle",args:[t]}];Le(i.center,t.center)||r.push({command:"setCenter",args:[t.center]}),Le(i.zoom,t.zoom)||r.push({command:"setZoom",args:[t.zoom]}),Le(i.bearing,t.bearing)||r.push({command:"setBearing",args:[t.bearing]}),Le(i.pitch,t.pitch)||r.push({command:"setPitch",args:[t.pitch]}),Le(i.sprite,t.sprite)||r.push({command:"setSprite",args:[t.sprite]}),Le(i.glyphs,t.glyphs)||r.push({command:"setGlyphs",args:[t.glyphs]}),Le(i.transition,t.transition)||r.push({command:"setTransition",args:[t.transition]}),Le(i.light,t.light)||r.push({command:"setLight",args:[t.light]}),Le(i.terrain,t.terrain)||r.push({command:"setTerrain",args:[t.terrain]}),Le(i.sky,t.sky)||r.push({command:"setSky",args:[t.sky]}),Le(i.projection,t.projection)||r.push({command:"setProjection",args:[t.projection]});const s={},u=[];(function(p,m,v,S){let z;for(z in m=m||{},p=p||{})Object.prototype.hasOwnProperty.call(p,z)&&(Object.prototype.hasOwnProperty.call(m,z)||ki(z,v,S));for(z in m)Object.prototype.hasOwnProperty.call(m,z)&&(Object.prototype.hasOwnProperty.call(p,z)?Le(p[z],m[z])||(p[z].type==="geojson"&&m[z].type==="geojson"&&ei(p,m,z)?yt(v,{command:"setGeoJSONSourceData",args:[z,m[z].data]}):qt(z,m,v,S)):Oe(z,m,v))})(i.sources,t.sources,u,s);const d=[];i.layers&&i.layers.forEach(p=>{"source"in p&&s[p.source]?r.push({command:"removeLayer",args:[p.id]}):d.push(p)}),r=r.concat(u),function(p,m,v){m=m||[];const S=(p=p||[]).map(Zt),z=m.map(Zt),E=p.reduce(Ft,{}),R=m.reduce(Ft,{}),j=S.slice(),N=Object.create(null);let q,K,ie,ke,ce;for(let xe=0,Pe=0;xe<S.length;xe++)q=S[xe],Object.prototype.hasOwnProperty.call(R,q)?Pe++:(yt(v,{command:"removeLayer",args:[q]}),j.splice(j.indexOf(q,Pe),1));for(let xe=0,Pe=0;xe<z.length;xe++)q=z[z.length-1-xe],j[j.length-1-xe]!==q&&(Object.prototype.hasOwnProperty.call(E,q)?(yt(v,{command:"removeLayer",args:[q]}),j.splice(j.lastIndexOf(q,j.length-Pe),1)):Pe++,ke=j[j.length-xe],yt(v,{command:"addLayer",args:[R[q],ke]}),j.splice(j.length-xe,0,q),N[q]=!0);for(let xe=0;xe<z.length;xe++)if(q=z[xe],K=E[q],ie=R[q],!N[q]&&!Le(K,ie))if(Le(K.source,ie.source)&&Le(K["source-layer"],ie["source-layer"])&&Le(K.type,ie.type)){for(ce in Gt(K.layout,ie.layout,v,q,null,"setLayoutProperty"),Gt(K.paint,ie.paint,v,q,null,"setPaintProperty"),Le(K.filter,ie.filter)||yt(v,{command:"setFilter",args:[q,ie.filter]}),Le(K.minzoom,ie.minzoom)&&Le(K.maxzoom,ie.maxzoom)||yt(v,{command:"setLayerZoomRange",args:[q,ie.minzoom,ie.maxzoom]}),K)Object.prototype.hasOwnProperty.call(K,ce)&&ce!=="layout"&&ce!=="paint"&&ce!=="filter"&&ce!=="metadata"&&ce!=="minzoom"&&ce!=="maxzoom"&&(ce.indexOf("paint.")===0?Gt(K[ce],ie[ce],v,q,ce.slice(6),"setPaintProperty"):Le(K[ce],ie[ce])||yt(v,{command:"setLayerProperty",args:[q,ce,ie[ce]]}));for(ce in ie)Object.prototype.hasOwnProperty.call(ie,ce)&&!Object.prototype.hasOwnProperty.call(K,ce)&&ce!=="layout"&&ce!=="paint"&&ce!=="filter"&&ce!=="metadata"&&ce!=="minzoom"&&ce!=="maxzoom"&&(ce.indexOf("paint.")===0?Gt(K[ce],ie[ce],v,q,ce.slice(6),"setPaintProperty"):Le(K[ce],ie[ce])||yt(v,{command:"setLayerProperty",args:[q,ce,ie[ce]]}))}else yt(v,{command:"removeLayer",args:[q]}),ke=j[j.lastIndexOf(q)+1],yt(v,{command:"addLayer",args:[ie,ke]})}(d,t.layers,r)}catch(s){console.warn("Unable to compute style diff:",s),r=[{command:"setStyle",args:[t]}]}return r},w.aD=function(i){const t=[],r=i.id;return r===void 0&&t.push({message:`layers.${r}: missing required property "id"`}),i.render===void 0&&t.push({message:`layers.${r}: missing required method "render"`}),i.renderingMode&&i.renderingMode!=="2d"&&i.renderingMode!=="3d"&&t.push({message:`layers.${r}: property "renderingMode" must be either "2d" or "3d"`}),t},w.aE=function i(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(let s=0;s<t.length;s++)if(!i(t[s],r[s]))return!1;return!0}if(typeof t=="object"&&t!==null&&r!==null){if(typeof r!="object"||Object.keys(t).length!==Object.keys(r).length)return!1;for(const s in t)if(!i(t[s],r[s]))return!1;return!0}return t===r},w.aF=Te,w.aG=Ae,w.aH=class extends Da{constructor(i,t){super(i,t),this.current=0}set(i){this.current!==i&&(this.current=i,this.gl.uniform1i(this.location,i))}},w.aI=Ku,w.aJ=class extends Da{constructor(i,t){super(i,t),this.current=pg}set(i){if(i[12]!==this.current[12]||i[0]!==this.current[0])return this.current=i,void this.gl.uniformMatrix4fv(this.location,!1,i);for(let t=1;t<16;t++)if(i[t]!==this.current[t]){this.current=i,this.gl.uniformMatrix4fv(this.location,!1,i);break}}},w.aK=Gd,w.aL=qd,w.aM=ii,w.aN=class extends Da{constructor(i,t){super(i,t),this.current=[0,0,0]}set(i){i[0]===this.current[0]&&i[1]===this.current[1]&&i[2]===this.current[2]||(this.current=i,this.gl.uniform3f(this.location,i[0],i[1],i[2]))}},w.aO=class extends Da{constructor(i,t){super(i,t),this.current=[0,0]}set(i){i[0]===this.current[0]&&i[1]===this.current[1]||(this.current=i,this.gl.uniform2f(this.location,i[0],i[1]))}},w.aP=function(i,t,r,s,u,d,p){var m=1/(t-r),v=1/(s-u),S=1/(d-p);return i[0]=-2*m,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=-2*v,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=2*S,i[11]=0,i[12]=(t+r)*m,i[13]=(u+s)*v,i[14]=(p+d)*S,i[15]=1,i},w.aQ=xg,w.aR=class extends me{},w.aS=h_,w.aT=class extends Se{},w.aU=zh,w.aV=function(i){return i<=1?1:Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))},w.aW=ap,w.aX=Yi,w.aY=tn,w.aZ=class extends ht{},w.a_=function(i,t){return i[0]===t[0]&&i[1]===t[1]&&i[2]===t[2]&&i[3]===t[3]&&i[4]===t[4]&&i[5]===t[5]&&i[6]===t[6]&&i[7]===t[7]&&i[8]===t[8]&&i[9]===t[9]&&i[10]===t[10]&&i[11]===t[11]&&i[12]===t[12]&&i[13]===t[13]&&i[14]===t[14]&&i[15]===t[15]},w.aa=function(i){const t={};if(i.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(r,s,u,d)=>{const p=u||d;return t[s]=!p||p.toLowerCase(),""}),t["max-age"]){const r=parseInt(t["max-age"],10);isNaN(r)?delete t["max-age"]:t["max-age"]=r}return t},w.ab=function(i,t){const r=[];for(const s in i)s in t||r.push(s);return r},w.ac=Ue,w.ad=function(i,t,r){var s=Math.sin(r),u=Math.cos(r),d=t[0],p=t[1],m=t[2],v=t[3],S=t[4],z=t[5],E=t[6],R=t[7];return t!==i&&(i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15]),i[0]=d*u+S*s,i[1]=p*u+z*s,i[2]=m*u+E*s,i[3]=v*u+R*s,i[4]=S*u-d*s,i[5]=z*u-p*s,i[6]=E*u-m*s,i[7]=R*u-v*s,i},w.ae=function(i){var t=new Io(16);return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],t},w.af=ec,w.ag=function(i,t){let r=0,s=0;if(i.kind==="constant")s=i.layoutSize;else if(i.kind!=="source"){const{interpolationType:u,minZoom:d,maxZoom:p}=i,m=u?Ue(mr.interpolationFactor(u,t,d,p),0,1):0;i.kind==="camera"?s=fr.number(i.minSize,i.maxSize,m):r=m}return{uSizeT:r,uSize:s}},w.ai=function(i,{uSize:t,uSizeT:r},{lowerSize:s,upperSize:u}){return i.kind==="source"?s/On:i.kind==="composite"?fr.number(s/On,u/On,r):t},w.aj=Nh,w.ak=function(i,t,r,s){const u=t.y-i.y,d=t.x-i.x,p=s.y-r.y,m=s.x-r.x,v=p*d-m*u;if(v===0)return null;const S=(m*(i.y-r.y)-p*(i.x-r.x))/v;return new F(i.x+S*d,i.y+S*u)},w.al=of,w.am=Xd,w.an=kh,w.ao=function(i){let t=1/0,r=1/0,s=-1/0,u=-1/0;for(const d of i)t=Math.min(t,d.x),r=Math.min(r,d.y),s=Math.max(s,d.x),u=Math.max(u,d.y);return[t,r,s,u]},w.ap=Oi,w.ar=Vh,w.as=function(i,t){var r=t[0],s=t[1],u=t[2],d=t[3],p=t[4],m=t[5],v=t[6],S=t[7],z=t[8],E=t[9],R=t[10],j=t[11],N=t[12],q=t[13],K=t[14],ie=t[15],ke=r*m-s*p,ce=r*v-u*p,xe=r*S-d*p,Pe=s*v-u*m,$e=s*S-d*m,rt=u*S-d*v,xt=z*q-E*N,et=z*K-R*N,Je=z*ie-j*N,pt=E*K-R*q,lt=E*ie-j*q,st=R*ie-j*K,Me=ke*st-ce*lt+xe*pt+Pe*Je-$e*et+rt*xt;return Me?(i[0]=(m*st-v*lt+S*pt)*(Me=1/Me),i[1]=(u*lt-s*st-d*pt)*Me,i[2]=(q*rt-K*$e+ie*Pe)*Me,i[3]=(R*$e-E*rt-j*Pe)*Me,i[4]=(v*Je-p*st-S*et)*Me,i[5]=(r*st-u*Je+d*et)*Me,i[6]=(K*xe-N*rt-ie*ce)*Me,i[7]=(z*rt-R*xe+j*ce)*Me,i[8]=(p*lt-m*Je+S*xt)*Me,i[9]=(s*Je-r*lt-d*xt)*Me,i[10]=(N*$e-q*xe+ie*ke)*Me,i[11]=(E*xe-z*$e-j*ke)*Me,i[12]=(m*et-p*pt-v*xt)*Me,i[13]=(r*pt-s*et+u*xt)*Me,i[14]=(q*ce-N*Pe-K*ke)*Me,i[15]=(z*Pe-E*ce+R*ke)*Me,i):null},w.at=Kh,w.au=jh,w.av=Yh,w.aw=function(){const i={},t=Ce.$version;for(const r in Ce.$root){const s=Ce.$root[r];if(s.required){let u=null;u=r==="version"?t:s.type==="array"?[]:{},u!=null&&(i[r]=u)}}return i},w.ax=Ll,w.ay=pr,w.az=function(i){i=i.slice();const t=Object.create(null);for(let r=0;r<i.length;r++)t[i[r].id]=i[r];for(let r=0;r<i.length;r++)"ref"in i[r]&&(i[r]=Ee(i[r],t[i[r].ref]));return i},w.b=hi,w.b0=function(i,t){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i},w.b1=function(i,t,r){return i[0]=t[0]*r[0],i[1]=t[1]*r[1],i[2]=t[2]*r[2],i[3]=t[3]*r[3],i},w.b2=function(i,t){return i[0]*t[0]+i[1]*t[1]+i[2]*t[2]+i[3]*t[3]},w.b3=wt,w.b4=Qp,w.b5=Yp,w.b6=function(i,t,r,s,u){var d,p=1/Math.tan(t/2);return i[0]=p/r,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=p,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[11]=-1,i[12]=0,i[13]=0,i[15]=0,u!=null&&u!==1/0?(i[10]=(u+s)*(d=1/(s-u)),i[14]=2*u*s*d):(i[10]=-1,i[14]=-2*s),i},w.b7=function(i,t,r){var s=Math.sin(r),u=Math.cos(r),d=t[4],p=t[5],m=t[6],v=t[7],S=t[8],z=t[9],E=t[10],R=t[11];return t!==i&&(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15]),i[4]=d*u+S*s,i[5]=p*u+z*s,i[6]=m*u+E*s,i[7]=v*u+R*s,i[8]=S*u-d*s,i[9]=z*u-p*s,i[10]=E*u-m*s,i[11]=R*u-v*s,i},w.b8=le,w.b9=Ze,w.bA=zp,w.bB=function(i){return i.message===dr},w.bC=Ds,w.bD=Ir,w.ba=function(i){return i*Math.PI/180},w.bb=function(i,t){const{x:r,y:s}=eu.fromLngLat(t);return!(i<0||i>25||s<0||s>=1||r<0||r>=1)},w.bc=function(i,t){return i[0]=t[0],i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=t[1],i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=t[2],i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i},w.bd=class extends A{},w.be=Zh,w.bf=W_,w.bh=Hi,w.bi=function(i,t){Zr.REGISTERED_PROTOCOLS[i]=t},w.bj=function(i){delete Zr.REGISTERED_PROTOCOLS[i]},w.bk=function(i,t){const r={};for(let u=0;u<i.length;u++){const d=t&&t[i[u].id]||Ou(i[u]);t&&(t[i[u].id]=d);let p=r[d];p||(p=r[d]=[]),p.push(i[u])}const s=[];for(const u in r)s.push(r[u]);return s},w.bl=ot,w.bm=tf,w.bn=nf,w.bo=Lp,w.bp=function(i){i.bucket.createArrays(),i.bucket.tilePixelRatio=Bi/(512*i.bucket.overscaling),i.bucket.compareText={},i.bucket.iconsNeedLinear=!1;const t=i.bucket.layers[0],r=t.layout,s=t._unevaluatedLayout._values,u={layoutIconSize:s["icon-size"].possiblyEvaluate(new mi(i.bucket.zoom+1),i.canonical),layoutTextSize:s["text-size"].possiblyEvaluate(new mi(i.bucket.zoom+1),i.canonical),textMaxSize:s["text-size"].possiblyEvaluate(new mi(18))};if(i.bucket.textSizeData.kind==="composite"){const{minZoom:S,maxZoom:z}=i.bucket.textSizeData;u.compositeTextSizes=[s["text-size"].possiblyEvaluate(new mi(S),i.canonical),s["text-size"].possiblyEvaluate(new mi(z),i.canonical)]}if(i.bucket.iconSizeData.kind==="composite"){const{minZoom:S,maxZoom:z}=i.bucket.iconSizeData;u.compositeIconSizes=[s["icon-size"].possiblyEvaluate(new mi(S),i.canonical),s["icon-size"].possiblyEvaluate(new mi(z),i.canonical)]}const d=r.get("text-line-height")*Oi,p=r.get("text-rotation-alignment")!=="viewport"&&r.get("symbol-placement")!=="point",m=r.get("text-keep-upright"),v=r.get("text-size");for(const S of i.bucket.features){const z=r.get("text-font").evaluate(S,{},i.canonical).join(","),E=v.evaluate(S,{},i.canonical),R=u.layoutTextSize.evaluate(S,{},i.canonical),j=u.layoutIconSize.evaluate(S,{},i.canonical),N={horizontal:{},vertical:void 0},q=S.text;let K,ie=[0,0];if(q){const xe=q.toString(),Pe=r.get("text-letter-spacing").evaluate(S,{},i.canonical)*Oi,$e=dh(xe)?Pe:0,rt=r.get("text-anchor").evaluate(S,{},i.canonical),xt=gf(t,S,i.canonical);if(!xt){const lt=r.get("text-radial-offset").evaluate(S,{},i.canonical);ie=lt?mf(rt,[lt*Oi,Xh]):r.get("text-offset").evaluate(S,{},i.canonical).map(st=>st*Oi)}
12let et=p?"center":r.get("text-justify").evaluate(S,{},i.canonical);const Je=r.get("symbol-placement")==="point"?r.get("text-max-width").evaluate(S,{},i.canonical)*Oi:1/0,pt=()=>{i.bucket.allowVerticalPlacement&&Rl(xe)&&(N.vertical=ac(q,i.glyphMap,i.glyphPositions,i.imagePositions,z,Je,d,rt,"left",$e,ie,w.ah.vertical,!0,R,E))};if(!p&&xt){const lt=new Set;if(et==="auto")for(let Me=0;Me<xt.values.length;Me+=2)lt.add(Kh(xt.values[Me]));else lt.add(et);let st=!1;for(const Me of lt)if(!N.horizontal[Me])if(st)N.horizontal[Me]=N.horizontal[0];else{const mt=ac(q,i.glyphMap,i.glyphPositions,i.imagePositions,z,Je,d,"center",Me,$e,ie,w.ah.horizontal,!1,R,E);mt&&(N.horizontal[Me]=mt,st=mt.positionedLines.length===1)}pt()}else{et==="auto"&&(et=Kh(rt));const lt=ac(q,i.glyphMap,i.glyphPositions,i.imagePositions,z,Je,d,rt,et,$e,ie,w.ah.horizontal,!1,R,E);lt&&(N.horizontal[et]=lt),pt(),Rl(xe)&&p&&m&&(N.vertical=ac(q,i.glyphMap,i.glyphPositions,i.imagePositions,z,Je,d,rt,et,$e,ie,w.ah.vertical,!1,R,E))}}let ke=!1;if(S.icon&&S.icon.name){const xe=i.imageMap[S.icon.name];xe&&(K=I_(i.imagePositions[S.icon.name],r.get("icon-offset").evaluate(S,{},i.canonical),r.get("icon-anchor").evaluate(S,{},i.canonical)),ke=!!xe.sdf,i.bucket.sdfIcons===void 0?i.bucket.sdfIcons=ke:i.bucket.sdfIcons!==ke&&Ct("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(xe.pixelRatio!==i.bucket.pixelRatio||r.get("icon-rotate").constantOr(1)!==0)&&(i.bucket.iconsNeedLinear=!0))}const ce=yf(N.horizontal)||N.vertical;i.bucket.iconsInText=!!ce&&ce.iconsInText,(ce||K)&&Z_(i.bucket,S,N,K,i.imageMap,u,R,j,ie,ke,i.canonical)}i.showCollisionBoxes&&i.bucket.generateCollisionDebugBuffers()},w.bq=Lh,w.br=Eh,w.bs=Dh,w.bt=Xs,w.bu=Bh,w.bv=class{constructor(i){this._marks={start:[i.url,"start"].join("#"),end:[i.url,"end"].join("#"),measure:i.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let i=performance.getEntriesByName(this._marks.measure);return i.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),i=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),i}},w.bw=function(i,t,r,s,u){return l(this,void 0,void 0,function*(){if(ae())try{return yield xi(i,t,r,s,u)}catch{}return function(d,p,m,v,S){const z=d.width,E=d.height;Ui&&li||(Ui=new OffscreenCanvas(z,E),li=Ui.getContext("2d",{willReadFrequently:!0})),Ui.width=z,Ui.height=E,li.drawImage(d,0,0,z,E);const R=li.getImageData(p,m,v,S);return li.clearRect(0,0,z,E),R.data}(i,t,r,s,u)})},w.bx=ef,w.by=U,w.bz=W,w.c=wn,w.d=i=>l(void 0,void 0,void 0,function*(){if(i.byteLength===0)return createImageBitmap(new ImageData(1,1));const t=new Blob([new Uint8Array(i)],{type:"image/png"});try{return createImageBitmap(t)}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.`)}}),w.e=Ge,w.f=i=>new Promise((t,r)=>{const s=new Image;s.onload=()=>{t(s),URL.revokeObjectURL(s.src),s.onload=null,window.requestAnimationFrame(()=>{s.src=Di})},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."));const u=new Blob([new Uint8Array(i)],{type:"image/png"});s.src=i.byteLength?URL.createObjectURL(u):Di}),w.g=Sr,w.h=(i,t)=>hn(Ge(i,{type:"json"}),t),w.i=wi,w.j=Tr,w.k=Hr,w.l=(i,t)=>hn(Ge(i,{type:"arrayBuffer"}),t),w.m=hn,w.n=function(i){return new Bh(i).readFields(w_,[])},w.o=Gl,w.p=Dp,w.q=h,w.r=ch,w.s=sr,w.t=Ml,w.u=as,w.v=Ce,w.w=Ct,w.x=function([i,t,r]){return t+=90,t*=Math.PI/180,r*=Math.PI/180,{x:i*Math.cos(t)*Math.sin(r),y:i*Math.sin(t)*Math.sin(r),z:i*Math.cos(r)}},w.y=fr,w.z=mi}),C("worker",["./shared"],function(w){class l{constructor($){this.keyCache={},$&&this.replace($)}replace($){this._layerConfigs={},this._layers={},this.update($,[])}update($,O){for(const J of $){this._layerConfigs[J.id]=J;const he=this._layers[J.id]=w.aA(J);he._featureFilter=w.a7(he.filter),this.keyCache[J.id]&&delete this.keyCache[J.id]}for(const J of O)delete this.keyCache[J],delete this._layerConfigs[J],delete this._layers[J];this.familiesBySource={};const Z=w.bk(Object.values(this._layerConfigs),this.keyCache);for(const J of Z){const he=J.map(ze=>this._layers[ze.id]),_e=he[0];if(_e.visibility==="none")continue;const we=_e.source||"";let oe=this.familiesBySource[we];
12oe||(oe=this.familiesBySource[we]={});const Ie=_e.sourceLayer||"_geojsonTileLayer";let Re=oe[Ie];Re||(Re=oe[Ie]=[]),Re.push(he)}}}class U{constructor($){const O={},Z=[];for(const we in $){const oe=$[we],Ie=O[we]={};for(const Re in oe){const ze=oe[+Re];if(!ze||ze.bitmap.width===0||ze.bitmap.height===0)continue;const He={x:0,y:0,w:ze.bitmap.width+2,h:ze.bitmap.height+2};Z.push(He),Ie[Re]={rect:He,metrics:ze.metrics}}}const{w:J,h:he}=w.p(Z),_e=new w.o({width:J||1,height:he||1});for(const we in $){const oe=$[we];for(const Ie in oe){const Re=oe[+Ie];if(!Re||Re.bitmap.width===0||Re.bitmap.height===0)continue;const ze=O[we][Ie].rect;w.o.copy(Re.bitmap,_e,{x:0,y:0},{x:ze.x+1,y:ze.y+1},Re.bitmap)}}this.image=_e,this.positions=O}}w.bl("GlyphAtlas",U);class W{constructor($){this.tileID=new w.S($.tileID.overscaledZ,$.tileID.wrap,$.tileID.canonical.z,$.tileID.canonical.x,$.tileID.canonical.y),this.uid=$.uid,this.zoom=$.zoom,this.pixelRatio=$.pixelRatio,this.tileSize=$.tileSize,this.source=$.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=$.showCollisionBoxes,this.collectResourceTiming=!!$.collectResourceTiming,this.returnDependencies=!!$.returnDependencies,this.promoteId=$.promoteId,this.inFlightDependencies=[]}parse($,O,Z,J){return w._(this,void 0,void 0,function*(){this.status="parsing",this.data=$,this.collisionBoxArray=new w.a5;const he=new w.bm(Object.keys($.layers).sort()),_e=new w.bn(this.tileID,this.promoteId);_e.bucketLayerIDs=[];const we={},oe={featureIndex:_e,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Z},Ie=O.familiesBySource[this.source];for(const Rt in Ie){const ti=$.layers[Rt];if(!ti)continue;ti.version===1&&w.w(`Vector tile source "${this.source}" layer "${Rt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const bi=he.encode(Rt),$i=[];for(let Gi=0;Gi<ti.length;Gi++){const or=ti.feature(Gi),ws=_e.getId(or,Rt);$i.push({feature:or,id:ws,index:Gi,sourceLayerIndex:bi})}for(const Gi of Ie[Rt]){const or=Gi[0];or.source!==this.source&&w.w(`layer.source = ${or.source} does not equal this.source = ${this.source}`),or.minzoom&&this.zoom<Math.floor(or.minzoom)||or.maxzoom&&this.zoom>=or.maxzoom||or.visibility!=="none"&&(G(Gi,this.zoom,Z),(we[or.id]=or.createBucket({index:_e.bucketLayerIDs.length,layers:Gi,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:bi,sourceID:this.source})).populate($i,oe,this.tileID.canonical),_e.bucketLayerIDs.push(Gi.map(ws=>ws.id)))}}const Re=w.aF(oe.glyphDependencies,Rt=>Object.keys(Rt).map(Number));this.inFlightDependencies.forEach(Rt=>Rt==null?void 0:Rt.abort()),this.inFlightDependencies=[];let ze=Promise.resolve({});if(Object.keys(Re).length){const Rt=new AbortController;this.inFlightDependencies.push(Rt),ze=J.sendAsync({type:"GG",data:{stacks:Re,source:this.source,tileID:this.tileID,type:"glyphs"}},Rt)}const He=Object.keys(oe.iconDependencies);let gt=Promise.resolve({});if(He.length){const Rt=new AbortController;this.inFlightDependencies.push(Rt),gt=J.sendAsync({type:"GI",data:{icons:He,source:this.source,tileID:this.tileID,type:"icons"}},Rt)}const vt=Object.keys(oe.patternDependencies);let Ht=Promise.resolve({});if(vt.length){const Rt=new AbortController;this.inFlightDependencies.push(Rt),Ht=J.sendAsync({type:"GI",data:{icons:vt,source:this.source,tileID:this.tileID,type:"patterns"}},Rt)}const[Mt,Wt,$t]=yield Promise.all([ze,gt,Ht]),Li=new U(Mt),Ti=new w.bo(Wt,$t);for(const Rt in we){const ti=we[Rt];ti instanceof w.a6?(G(ti.layers,this.zoom,Z),w.bp({bucket:ti,glyphMap:Mt,glyphPositions:Li.positions,imageMap:Wt,imagePositions:Ti.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):ti.hasPattern&&(ti instanceof w.bq||ti instanceof w.br||ti instanceof w.bs)&&(G(ti.layers,this.zoom,Z),ti.addFeatures(oe,this.tileID.canonical,Ti.patternPositions))}return this.status="done",{buckets:Object.values(we).filter(Rt=>!Rt.isEmpty()),featureIndex:_e,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Li.image,imageAtlas:Ti,glyphMap:this.returnDependencies?Mt:null,iconMap:this.returnDependencies?Wt:null,glyphPositions:this.returnDependencies?Li.positions:null}})}}function G(te,$,O){const Z=new w.z($);for(const J of te)J.recalculate(Z,O)}class F{constructor($,O,Z){this.actor=$,this.layerIndex=O,this.availableImages=Z,this.fetching={},this.loading={},this.loaded={}}loadVectorTile($,O){return w._(this,void 0,void 0,function*(){const Z=yield w.l($.request,O);try{return{vectorTile:new w.bt.VectorTile(new w.bu(Z.data)),rawData:Z.data,cacheControl:Z.cacheControl,expires:Z.expires}}
12catch(J){const he=new Uint8Array(Z.data);let _e=`Unable to parse the tile at ${$.request.url}, `;throw _e+=he[0]===31&&he[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${J.message}`,new Error(_e)}})}loadTile($){return w._(this,void 0,void 0,function*(){const O=$.uid,Z=!!($&&$.request&&$.request.collectResourceTiming)&&new w.bv($.request),J=new W($);this.loading[O]=J;const he=new AbortController;J.abort=he;try{const _e=yield this.loadVectorTile($,he);if(delete this.loading[O],!_e)return null;const we=_e.rawData,oe={};_e.expires&&(oe.expires=_e.expires),_e.cacheControl&&(oe.cacheControl=_e.cacheControl);const Ie={};if(Z){const ze=Z.finish();ze&&(Ie.resourceTiming=JSON.parse(JSON.stringify(ze)))}J.vectorTile=_e.vectorTile;const Re=J.parse(_e.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[O]=J,this.fetching[O]={rawTileData:we,cacheControl:oe,resourceTiming:Ie};try{const ze=yield Re;return w.e({rawTileData:we.slice(0)},ze,oe,Ie)}finally{delete this.fetching[O]}}catch(_e){throw delete this.loading[O],J.status="done",this.loaded[O]=J,_e}})}reloadTile($){return w._(this,void 0,void 0,function*(){const O=$.uid;if(!this.loaded||!this.loaded[O])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const Z=this.loaded[O];if(Z.showCollisionBoxes=$.showCollisionBoxes,Z.status==="parsing"){const J=yield Z.parse(Z.vectorTile,this.layerIndex,this.availableImages,this.actor);let he;if(this.fetching[O]){const{rawTileData:_e,cacheControl:we,resourceTiming:oe}=this.fetching[O];delete this.fetching[O],he=w.e({rawTileData:_e.slice(0)},J,we,oe)}else he=J;return he}if(Z.status==="done"&&Z.vectorTile)return Z.parse(Z.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile($){return w._(this,void 0,void 0,function*(){const O=this.loading,Z=$.uid;O&&O[Z]&&O[Z].abort&&(O[Z].abort.abort(),delete O[Z])})}removeTile($){return w._(this,void 0,void 0,function*(){this.loaded&&this.loaded[$.uid]&&delete this.loaded[$.uid]})}}class T{constructor(){this.loaded={}}loadTile($){return w._(this,void 0,void 0,function*(){const{uid:O,encoding:Z,rawImageData:J,redFactor:he,greenFactor:_e,blueFactor:we,baseShift:oe}=$,Ie=J.width+2,Re=J.height+2,ze=w.b(J)?new w.R({width:Ie,height:Re},yield w.bw(J,-1,-1,Ie,Re)):J,He=new w.bx(O,ze,Z,he,_e,we,oe);return this.loaded=this.loaded||{},this.loaded[O]=He,He})}removeTile($){const O=this.loaded,Z=$.uid;O&&O[Z]&&delete O[Z]}}function re(te,$){if(te.length!==0){fe(te[0],$);for(var O=1;O<te.length;O++)fe(te[O],!$)}}function fe(te,$){for(var O=0,Z=0,J=0,he=te.length,_e=he-1;J<he;_e=J++){var we=(te[J][0]-te[_e][0])*(te[_e][1]+te[J][1]),oe=O+we;Z+=Math.abs(O)>=Math.abs(we)?O-oe+we:we-oe+O,O=oe}O+Z>=0!=!!$&&te.reverse()}var ye=w.by(function te($,O){var Z,J=$&&$.type;if(J==="FeatureCollection")for(Z=0;Z<$.features.length;Z++)te($.features[Z],O);else if(J==="GeometryCollection")for(Z=0;Z<$.geometries.length;Z++)te($.geometries[Z],O);else if(J==="Feature")te($.geometry,O);else if(J==="Polygon")re($.coordinates,O);else if(J==="MultiPolygon")for(Z=0;Z<$.coordinates.length;Z++)re($.coordinates[Z],O);return $});const de=w.bt.VectorTileFeature.prototype.toGeoJSON;var ge={exports:{}},ae=w.bz,le=w.bt.VectorTileFeature,Ze=Ue;function Ue(te,$){this.options=$||{},this.features=te,this.length=te.length}function wt(te,$){this.id=typeof te.id=="number"?te.id:void 0,this.type=te.type,this.rawGeometry=te.type===1?[te.geometry]:te.geometry,this.properties=te.tags,this.extent=$||4096}Ue.prototype.feature=function(te){return new wt(this.features[te],this.options.extent)},wt.prototype.loadGeometry=function(){var te=this.rawGeometry;this.geometry=[];for(var $=0;$<te.length;$++){for(var O=te[$],Z=[],J=0;J<O.length;J++)Z.push(new ae(O[J][0],O[J][1]));this.geometry.push(Z)}return this.geometry},wt.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var te=this.geometry,$=1/0,O=-1/0,Z=1/0,J=-1/0,he=0;he<te.length;he++)for(var _e=te[he],we=0;we<_e.length;we++){var oe=_e[we];$=Math.min($,oe.x),O=Math.max(O,oe.x),Z=Math.min(Z,oe.y),J=Math.max(J,oe.y)}return[$,Z,O,J]},wt.prototype.toGeoJSON=le.prototype.toGeoJSON;var Ge=w.bA,P=Ze;function Te(te){var $=new Ge;
12return function(O,Z){for(var J in O.layers)Z.writeMessage(3,Ae,O.layers[J])}(te,$),$.finish()}function Ae(te,$){var O;$.writeVarintField(15,te.version||1),$.writeStringField(1,te.name||""),$.writeVarintField(5,te.extent||4096);var Z={keys:[],values:[],keycache:{},valuecache:{}};for(O=0;O<te.length;O++)Z.feature=te.feature(O),$.writeMessage(2,Pt,Z);var J=Z.keys;for(O=0;O<J.length;O++)$.writeStringField(3,J[O]);var he=Z.values;for(O=0;O<he.length;O++)$.writeMessage(4,ri,he[O])}function Pt(te,$){var O=te.feature;O.id!==void 0&&$.writeVarintField(1,O.id),$.writeMessage(2,_t,te),$.writeVarintField(3,O.type),$.writeMessage(4,wi,O)}function _t(te,$){var O=te.feature,Z=te.keys,J=te.values,he=te.keycache,_e=te.valuecache;for(var we in O.properties){var oe=O.properties[we],Ie=he[we];if(oe!==null){Ie===void 0&&(Z.push(we),he[we]=Ie=Z.length-1),$.writeVarint(Ie);var Re=typeof oe;Re!=="string"&&Re!=="boolean"&&Re!=="number"&&(oe=JSON.stringify(oe));var ze=Re+":"+oe,He=_e[ze];He===void 0&&(J.push(oe),_e[ze]=He=J.length-1),$.writeVarint(He)}}}function Ct(te,$){return($<<3)+(7&te)}function Lt(te){return te<<1^te>>31}function wi(te,$){for(var O=te.loadGeometry(),Z=te.type,J=0,he=0,_e=O.length,we=0;we<_e;we++){var oe=O[we],Ie=1;Z===1&&(Ie=oe.length),$.writeVarint(Ct(1,Ie));for(var Re=Z===3?oe.length-1:oe.length,ze=0;ze<Re;ze++){ze===1&&Z!==1&&$.writeVarint(Ct(2,Re-1));var He=oe[ze].x-J,gt=oe[ze].y-he;$.writeVarint(Lt(He)),$.writeVarint(Lt(gt)),J+=He,he+=gt}Z===3&&$.writeVarint(Ct(7,1))}}function ri(te,$){var O=typeof te;O==="string"?$.writeStringField(1,te):O==="boolean"?$.writeBooleanField(7,te):O==="number"&&(te%1!=0?$.writeDoubleField(3,te):te<0?$.writeSVarintField(6,te):$.writeVarintField(5,te))}ge.exports=Te,ge.exports.fromVectorTileJs=Te,ge.exports.fromGeojsonVt=function(te,$){$=$||{};var O={};for(var Z in te)O[Z]=new P(te[Z].features,$),O[Z].name=Z,O[Z].version=$.version,O[Z].extent=$.extent;return Te({layers:O})},ge.exports.GeoJSONWrapper=P;var hi=w.by(ge.exports);const Di={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:te=>te},xi=Math.fround||(Ui=new Float32Array(1),te=>(Ui[0]=+te,Ui[0]));var Ui;const li=3,dr=5,wn=6;class Zr{constructor($){this.options=Object.assign(Object.create(Di),$),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load($){const{log:O,minZoom:Z,maxZoom:J}=this.options;O&&console.time("total time");const he=`prepare ${$.length} points`;O&&console.time(he),this.points=$;const _e=[];for(let oe=0;oe<$.length;oe++){const Ie=$[oe];if(!Ie.geometry)continue;const[Re,ze]=Ie.geometry.coordinates,He=xi(Hi(Re)),gt=xi(pr(ze));_e.push(He,gt,1/0,oe,-1,1),this.options.reduce&&_e.push(0)}let we=this.trees[J+1]=this._createTree(_e);O&&console.timeEnd(he);for(let oe=J;oe>=Z;oe--){const Ie=+Date.now();we=this.trees[oe]=this._createTree(this._cluster(we,oe)),O&&console.log("z%d: %d clusters in %dms",oe,we.numItems,+Date.now()-Ie)}return O&&console.timeEnd("total time"),this}getClusters($,O){let Z=(($[0]+180)%360+360)%360-180;const J=Math.max(-90,Math.min(90,$[1]));let he=$[2]===180?180:(($[2]+180)%360+360)%360-180;const _e=Math.max(-90,Math.min(90,$[3]));if($[2]-$[0]>=360)Z=-180,he=180;else if(Z>he){const ze=this.getClusters([Z,J,180,_e],O),He=this.getClusters([-180,J,he,_e],O);return ze.concat(He)}const we=this.trees[this._limitZoom(O)],oe=we.range(Hi(Z),pr(_e),Hi(he),pr(J)),Ie=we.data,Re=[];for(const ze of oe){const He=this.stride*ze;Re.push(Ie[He+dr]>1?Sr(Ie,He,this.clusterProps):this.points[Ie[He+li]])}return Re}getChildren($){const O=this._getOriginId($),Z=this._getOriginZoom($),J="No cluster with the specified id.",he=this.trees[Z];if(!he)throw new Error(J);const _e=he.data;if(O*this.stride>=_e.length)throw new Error(J);const we=this.options.radius/(this.options.extent*Math.pow(2,Z-1)),oe=he.within(_e[O*this.stride],_e[O*this.stride+1],we),Ie=[];for(const Re of oe){const ze=Re*this.stride;_e[ze+4]===$&&Ie.push(_e[ze+dr]>1?Sr(_e,ze,this.clusterProps):this.points[_e[ze+li]])}if(Ie.length===0)throw new Error(J);return Ie}getLeaves($,O,Z){const J=[];return this._appendLeaves(J,$,O=O||10,Z=Z||0,0),J}getTile($,O,Z){const J=this.trees[this._limitZoom($)],he=Math.pow(2,$),{extent:_e,radius:we}=this.options,oe=we/_e,Ie=(Z-oe)/he,Re=(Z+1+oe)/he,ze={features:[]};return this._addTileFeatures(J.range((O-oe)/he,Ie,(O+1+oe)/he,Re),J.data,O,Z,he,ze),O===0&&this._addTileFeatures(J.range(1-oe/he,Ie,1,Re),J.data,he,Z,he,ze),O===he-1&&this._addTileFeatures(J.range(0,Ie,oe/
vendor: 13,331 bytes, line 12
12he,Re),J.data,-1,Z,he,ze),ze.features.length?ze:null}getClusterExpansionZoom($){let O=this._getOriginZoom($)-1;for(;O<=this.options.maxZoom;){const Z=this.getChildren($);if(O++,Z.length!==1)break;$=Z[0].properties.cluster_id}return O}_appendLeaves($,O,Z,J,he){const _e=this.getChildren(O);for(const we of _e){const oe=we.properties;if(oe&&oe.cluster?he+oe.point_count<=J?he+=oe.point_count:he=this._appendLeaves($,oe.cluster_id,Z,J,he):he<J?he++:$.push(we),$.length===Z)break}return he}_createTree($){const O=new w.av($.length/this.stride|0,this.options.nodeSize,Float32Array);for(let Z=0;Z<$.length;Z+=this.stride)O.add($[Z],$[Z+1]);return O.finish(),O.data=$,O}_addTileFeatures($,O,Z,J,he,_e){for(const we of $){const oe=we*this.stride,Ie=O[oe+dr]>1;let Re,ze,He;if(Ie)Re=kn(O,oe,this.clusterProps),ze=O[oe],He=O[oe+1];else{const Ht=this.points[O[oe+li]];Re=Ht.properties;const[Mt,Wt]=Ht.geometry.coordinates;ze=Hi(Mt),He=pr(Wt)}const gt={type:1,geometry:[[Math.round(this.options.extent*(ze*he-Z)),Math.round(this.options.extent*(He*he-J))]],tags:Re};let vt;vt=Ie||this.options.generateId?O[oe+li]:this.points[O[oe+li]].id,vt!==void 0&&(gt.id=vt),_e.features.push(gt)}}_limitZoom($){return Math.max(this.options.minZoom,Math.min(Math.floor(+$),this.options.maxZoom+1))}_cluster($,O){const{radius:Z,extent:J,reduce:he,minPoints:_e}=this.options,we=Z/(J*Math.pow(2,O)),oe=$.data,Ie=[],Re=this.stride;for(let ze=0;ze<oe.length;ze+=Re){if(oe[ze+2]<=O)continue;oe[ze+2]=O;const He=oe[ze],gt=oe[ze+1],vt=$.within(oe[ze],oe[ze+1],we),Ht=oe[ze+dr];let Mt=Ht;for(const Wt of vt){const $t=Wt*Re;oe[$t+2]>O&&(Mt+=oe[$t+dr])}if(Mt>Ht&&Mt>=_e){let Wt,$t=He*Ht,Li=gt*Ht,Ti=-1;const Rt=((ze/Re|0)<<5)+(O+1)+this.points.length;for(const ti of vt){const bi=ti*Re;if(oe[bi+2]<=O)continue;oe[bi+2]=O;const $i=oe[bi+dr];$t+=oe[bi]*$i,Li+=oe[bi+1]*$i,oe[bi+4]=Rt,he&&(Wt||(Wt=this._map(oe,ze,!0),Ti=this.clusterProps.length,this.clusterProps.push(Wt)),he(Wt,this._map(oe,bi)))}oe[ze+4]=Rt,Ie.push($t/Mt,Li/Mt,1/0,Rt,-1,Mt),he&&Ie.push(Ti)}else{for(let Wt=0;Wt<Re;Wt++)Ie.push(oe[ze+Wt]);if(Mt>1)for(const Wt of vt){const $t=Wt*Re;if(!(oe[$t+2]<=O)){oe[$t+2]=O;for(let Li=0;Li<Re;Li++)Ie.push(oe[$t+Li])}}}}return Ie}_getOriginId($){return $-this.points.length>>5}_getOriginZoom($){return($-this.points.length)%32}_map($,O,Z){if($[O+dr]>1){const _e=this.clusterProps[$[O+wn]];return Z?Object.assign({},_e):_e}const J=this.points[$[O+li]].properties,he=this.options.map(J);return Z&&he===J?Object.assign({},he):he}}function Sr(te,$,O){return{type:"Feature",id:te[$+li],properties:kn(te,$,O),geometry:{type:"Point",coordinates:[(Z=te[$],360*(Z-.5)),hn(te[$+1])]}};var Z}function kn(te,$,O){const Z=te[$+dr],J=Z>=1e4?`${Math.round(Z/1e3)}k`:Z>=1e3?Math.round(Z/100)/10+"k":Z,he=te[$+wn],_e=he===-1?{}:Object.assign({},O[he]);return Object.assign(_e,{cluster:!0,cluster_id:te[$+li],point_count:Z,point_count_abbreviated:J})}function Hi(te){return te/360+.5}function pr(te){const $=Math.sin(te*Math.PI/180),O=.5-.25*Math.log((1+$)/(1-$))/Math.PI;return O<0?0:O>1?1:O}function hn(te){const $=(180-360*te)*Math.PI/180;return 360*Math.atan(Math.exp($))/Math.PI-90}function sr(te,$,O,Z){let J=Z;const he=$+(O-$>>1);let _e,we=O-$;const oe=te[$],Ie=te[$+1],Re=te[O],ze=te[O+1];for(let He=$+3;He<O;He+=3){const gt=Wn(te[He],te[He+1],oe,Ie,Re,ze);if(gt>J)_e=He,J=gt;else if(gt===J){const vt=Math.abs(He-he);vt<we&&(_e=He,we=vt)}}J>Z&&(_e-$>3&&sr(te,$,_e,Z),te[_e+2]=J,O-_e>3&&sr(te,_e,O,Z))}function Wn(te,$,O,Z,J,he){let _e=J-O,we=he-Z;if(_e!==0||we!==0){const oe=((te-O)*_e+($-Z)*we)/(_e*_e+we*we);oe>1?(O=J,Z=he):oe>0&&(O+=_e*oe,Z+=we*oe)}return _e=te-O,we=$-Z,_e*_e+we*we}function Br(te,$,O,Z){const J={id:te??null,type:$,geometry:O,tags:Z,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if($==="Point"||$==="MultiPoint"||$==="LineString")Hr(J,O);else if($==="Polygon")Hr(J,O[0]);else if($==="MultiLineString")for(const he of O)Hr(J,he);else if($==="MultiPolygon")for(const he of O)Hr(J,he[0]);return J}function Hr(te,$){for(let O=0;O<$.length;O+=3)te.minX=Math.min(te.minX,$[O]),te.minY=Math.min(te.minY,$[O+1]),te.maxX=Math.max(te.maxX,$[O]),te.maxY=Math.max(te.maxY,$[O+1])}function Tr(te,$,O,Z){if(!$.geometry)return;const J=$.geometry.coordinates;if(J&&J.length===0)return;const he=$.geometry.type,_e=Math.pow(O.tolerance/((1<<O.maxZoom)*O.extent),2);let we=[],oe=$.id;if(O.promoteId?oe=$.properties[O.promoteId]:O.generateId&&(oe=Z||0),he==="Point")Mn(J,we);else if(he==="MultiPoint")for(const Ie of J)Mn(Ie,we);else if(he==="LineString")Ce(J,we,_e,!1);else if(he==="MultiLineString"){if(O.lineMetrics){for(const Ie of J)we=[],Ce(Ie,we,_e,!1),te.push(Br(oe,"LineString",we,$.properties));return}dn(J,we,_e,!1)}else if(he==="Polygon")dn(J,we,_e,!0);else{if(he!=="MultiPolygon"){if(he==="GeometryCollection"){for(const Ie of $.geometry.geometries)Tr(te,{id:oe,geometry:Ie,properties:$.properties},O,Z);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const Ie of J){const Re=[];dn(Ie,Re,_e,!0),we.push(Re)}}te.push(Br(oe,he,we,$.properties))}function Mn(te,$){$.push(Ee(te[0]),Le(te[1]),0)}function Ce(te,$,O,Z){let J,he,_e=0;for(let oe=0;oe<te.length;oe++){const Ie=Ee(te[oe][0]),Re=Le(te[oe][1]);$.push(Ie,Re,0),oe>0&&(_e+=Z?(J*Re-Ie*he)/2:Math.sqrt(Math.pow(Ie-J,2)+Math.pow(Re-he,2))),J=Ie,he=Re}const we=$.length-3;$[2]=1,sr($,0,we,O),$[we+2]=1,$.size=Math.abs(_e),$.start=0,$.end=$.size}function dn(te,$,O,Z){for(let J=0;J<te.length;J++){const he=[];Ce(te[J],he,O,Z),$.push(he)}}function Ee(te){return te/360+.5}function Le(te){const $=Math.sin(te*Math.PI/180),O=.5-.25*Math.log((1+$)/(1-$))/Math.PI;return O<0?0:O>1?1:O}function yt(te,$,O,Z,J,he,_e,we){if(Z/=$,he>=(O/=$)&&_e<Z)return te;if(_e<O||he>=Z)return null;const oe=[];for(const Ie of te){const Re=Ie.geometry;let ze=Ie.type;const He=J===0?Ie.minX:Ie.minY,gt=J===0?Ie.maxX:Ie.maxY;if(He>=O&><Z){oe.push(Ie);continue}if(gt<O||He>=Z)continue;let vt=[];if(ze==="Point"||ze==="MultiPoint")Oe(Re,vt,O,Z,J);else if(ze==="LineString")ki(Re,vt,O,Z,J,!1,we.lineMetrics);else if(ze==="MultiLineString")ei(Re,vt,O,Z,J,!1);else if(ze==="Polygon")ei(Re,vt,O,Z,J,!0);else if(ze==="MultiPolygon")for(const Ht of Re){const Mt=[];ei(Ht,Mt,O,Z,J,!0),Mt.length&&vt.push(Mt)}if(vt.length){if(we.lineMetrics&&ze==="LineString"){for(const Ht of vt)oe.push(Br(Ie.id,ze,Ht,Ie.tags));continue}ze!=="LineString"&&ze!=="MultiLineString"||(vt.length===1?(ze="LineString",vt=vt[0]):ze="MultiLineString"),ze!=="Point"&&ze!=="MultiPoint"||(ze=vt.length===3?"Point":"MultiPoint"),oe.push(Br(Ie.id,ze,vt,Ie.tags))}}return oe.length?oe:null}function Oe(te,$,O,Z,J){for(let he=0;he<te.length;he+=3){const _e=te[he+J];_e>=O&&_e<=Z&&Gt($,te[he],te[he+1],te[he+2])}}function ki(te,$,O,Z,J,he,_e){let we=qt(te);const oe=J===0?Zt:Ft;let Ie,Re,ze=te.start;for(let Mt=0;Mt<te.length-3;Mt+=3){const Wt=te[Mt],$t=te[Mt+1],Li=te[Mt+2],Ti=te[Mt+3],Rt=te[Mt+4],ti=J===0?Wt:$t,bi=J===0?Ti:Rt;let $i=!1;_e&&(Ie=Math.sqrt(Math.pow(Wt-Ti,2)+Math.pow($t-Rt,2))),ti<O?bi>O&&(Re=oe(we,Wt,$t,Ti,Rt,O),_e&&(we.start=ze+Ie*Re)):ti>Z?bi<Z&&(Re=oe(we,Wt,$t,Ti,Rt,Z),_e&&(we.start=ze+Ie*Re)):Gt(we,Wt,$t,Li),bi<O&&ti>=O&&(Re=oe(we,Wt,$t,Ti,Rt,O),$i=!0),bi>Z&&ti<=Z&&(Re=oe(we,Wt,$t,Ti,Rt,Z),$i=!0),!he&&$i&&(_e&&(we.end=ze+Ie*Re),$.push(we),we=qt(te)),_e&&(ze+=Ie)}let He=te.length-3;const gt=te[He],vt=te[He+1],Ht=J===0?gt:vt;Ht>=O&&Ht<=Z&&Gt(we,gt,vt,te[He+2]),He=we.length-3,he&&He>=3&&(we[He]!==we[0]||we[He+1]!==we[1])&&Gt(we,we[0],we[1],we[2]),we.length&&$.push(we)}function qt(te){const $=[];return $.size=te.size,$.start=te.start,$.end=te.end,$}function ei(te,$,O,Z,J,he){for(const _e of te)ki(_e,$,O,Z,J,he,!1)}function Gt(te,$,O,Z){te.push($,O,Z)}function Zt(te,$,O,Z,J,he){const _e=(he-$)/(Z-$);return Gt(te,he,O+(J-O)*_e,1),_e}function Ft(te,$,O,Z,J,he){const _e=(he-O)/(J-O);return Gt(te,$+(Z-$)*_e,he,1),_e}function Be(te,$){const O=[];for(let Z=0;Z<te.length;Z++){const J=te[Z],he=J.type;let _e;if(he==="Point"||he==="MultiPoint"||he==="LineString")_e=Si(J.geometry,$);else if(he==="MultiLineString"||he==="Polygon"){_e=[];for(const we of J.geometry)_e.push(Si(we,$))}else if(he==="MultiPolygon"){_e=[];for(const we of J.geometry){const oe=[];for(const Ie of we)oe.push(Si(Ie,$));_e.push(oe)}}O.push(Br(J.id,he,_e,J.tags))}return O}function Si(te,$){const O=[];O.size=te.size,te.start!==void 0&&(O.start=te.start,O.end=te.end);for(let Z=0;Z<te.length;Z+=3)O.push(te[Z]+$,te[Z+1],te[Z+2]);return O}function ni(te,$){if(te.transformed)return te;const O=1<<te.z,Z=te.x,J=te.y;for(const he of te.features){const _e=he.geometry,we=he.type;if(he.geometry=[],we===1)for(let oe=0;oe<_e.length;oe+=2)he.geometry.push(Fi(_e[oe],_e[oe+1],$,O,Z,J));else for(let oe=0;oe<_e.length;oe++){const Ie=[];for(let Re=0;Re<_e[oe].length;Re+=2)Ie.push(Fi(_e[oe][Re],_e[oe][Re+1],$,O,Z,J));he.geometry.push(Ie)}}return te.transformed=!0,te}function Fi(te,$,O,Z,J,he){return[Math.round(O*(te*Z-J)),Math.round(O*($*Z-he))]}function ar(te,$,O,Z,J){const he=$===J.maxZoom?0:J.tolerance/((1<<$)*J.extent),_e={features:[],numPoints:0,numSimplified:0,numFeatures:te.length,source:null,x:O,y:Z,z:$,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const we of te)Ve(_e,we,he,J);return _e}function Ve(te,$,O,Z){const J=$.geometry,he=$.type,_e=[];if(te.minX=Math.min(te.minX,$.minX),te.minY=Math.min(te.minY,$.minY),te.maxX=Math.max(te.maxX,$.maxX),te.maxY=Math.max(te.maxY,$.maxY),he==="Point"||he==="MultiPoint")for(let we=0;we<J.length;we+=3)_e.push(J[we],J[we+1]),te.numPoints++,te.numSimplified++;else if(he==="LineString")ft(_e,J,te,O,!1,!1);else if(he==="MultiLineString"||he==="Polygon")for(let we=0;we<J.length;we++)ft(_e,J[we],te,O,he==="Polygon",we===0);else if(he==="MultiPolygon")for(let we=0;we<J.length;we++){const oe=J[we];for(let Ie=0;Ie<oe.length;Ie++)ft(_e,oe[Ie],te,O,!0,Ie===0)}if(_e.length){let we=$.tags||null;if(he==="LineString"&&Z.lineMetrics){we={};for(const Ie in $.tags)we[Ie]=$.tags[Ie];we.mapbox_clip_start=J.start/J.size,we.mapbox_clip_end=J.end/J.size}const oe={geometry:_e,type:he==="Polygon"||he==="MultiPolygon"?3:he==="LineString"||he==="MultiLineString"?2:1,tags:we};$.id!==null&&(oe.id=$.id),te.features.push(oe)}}function ft(te,$,O,Z,J,he){const _e=Z*Z;if(Z>0&&$.size<(J?_e:Z))return void(O.numPoints+=$.length/3);const we=[];for(let oe=0;oe<$.length;oe+=3)(Z===0||$[oe+2]>_e)&&(O.numSimplified++,we.push($[oe],$[oe+1])),O.numPoints++;J&&function(oe,Ie){let Re=0;for(let ze=0,He=oe.length,gt=He-2;ze<He;gt=ze,ze+=2)Re+=(oe[ze]-oe[gt])*(oe[ze+1]+oe[gt+1]);if(Re>0===Ie)for(let ze=0,He=oe.length;ze<He/2;ze+=2){const gt=oe[ze],vt=oe[ze+1];oe[ze]=oe[He-2-ze],oe[ze+1]=oe[He-1-ze],oe[He-2-ze]=gt,oe[He-1-ze]=vt}}(we,he),te.push(we)}const ut={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Wi{constructor($,O){const Z=(O=this.options=function(he,_e){for(const we in _e)he[we]=_e[we];return he}(Object.create(ut),O)).debug;if(Z&&console.time("preprocess data"),O.maxZoom<0||O.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(O.promoteId&&O.generateId)throw new Error("promoteId and generateId cannot be used together.");let J=function(he,_e){const we=[];if(he.type==="FeatureCollection")for(let oe=0;oe<he.features.length;oe++)Tr(we,he.features[oe],_e,oe);else Tr(we,he.type==="Feature"?he:{geometry:he},_e);return we}($,O);this.tiles={},this.tileCoords=[],Z&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",O.indexMaxZoom,O.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),J=function(he,_e){const we=_e.buffer/_e.extent;let oe=he;const Ie=yt(he,1,-1-we,we,0,-1,2,_e),Re=yt(he,1,1-we,2+we,0,-1,2,_e);return(Ie||Re)&&(oe=yt(he,1,-we,1+we,0,-1,2,_e)||[],Ie&&(oe=Be(Ie,1).concat(oe)),Re&&(oe=oe.concat(Be(Re,-1)))),oe}(J,O),J.length&&this.splitTile(J,0,0,0),Z&&(J.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($,O,Z,J,he,_e,we){const oe=[$,O,Z,J],Ie=this.options,Re=Ie.debug;for(;oe.length;){J=oe.pop(),Z=oe.pop(),O=oe.pop(),$=oe.pop();const ze=1<<O,He=Wr(O,Z,J);let gt=this.tiles[He];if(!gt&&(Re>1&&console.time("creation"),gt=this.tiles[He]=ar($,O,Z,J,Ie),this.tileCoords.push({z:O,x:Z,y:J}),Re)){Re>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",O,Z,J,gt.numFeatures,gt.numPoints,gt.numSimplified),console.timeEnd("creation"));const $i=`z${O}`;this.stats[$i]=(this.stats[$i]||0)+1,this.total++}if(gt.source=$,he==null){if(O===Ie.indexMaxZoom||gt.numPoints<=Ie.indexMaxPoints)continue}else{if(O===Ie.maxZoom||O===he)continue;if(he!=null){const $i=he-O;if(Z!==_e>>$i||J!==we>>$i)continue}}if(gt.source=null,$.length===0)continue;Re>1&&console.time("clipping");const vt=.5*Ie.buffer/Ie.extent,Ht=.5-vt,Mt=.5+vt,Wt=1+vt;let $t=null,Li=null,Ti=null,Rt=null,ti=yt($,ze,Z-vt,Z+Mt,0,gt.minX,gt.maxX,Ie),bi=yt($,ze,Z+Ht,Z+Wt,0,gt.minX,gt.maxX,Ie);$=null,ti&&($t=yt(ti,ze,J-vt,J+Mt,1,gt.minY,gt.maxY,Ie),Li=yt(ti,ze,J+Ht,J+Wt,1,gt.minY,gt.maxY,Ie),ti=null),bi&&(Ti=yt(bi,ze,J-vt,J+Mt,1,gt.minY,gt.maxY,Ie),Rt=yt(bi,ze,J+Ht,J+Wt,1,gt.minY,gt.maxY,Ie),bi=null),Re>1&&console.timeEnd("clipping"),oe.push($t||[],O+1,2*Z,2*J),oe.push(Li||[],O+1,2*Z,2*J+1),oe.push(T
12i||[],O+1,2*Z+1,2*J),oe.push(Rt||[],O+1,2*Z+1,2*J+1)}}getTile($,O,Z){$=+$,O=+O,Z=+Z;const J=this.options,{extent:he,debug:_e}=J;if($<0||$>24)return null;const we=1<<$,oe=Wr($,O=O+we&we-1,Z);if(this.tiles[oe])return ni(this.tiles[oe],he);_e>1&&console.log("drilling down to z%d-%d-%d",$,O,Z);let Ie,Re=$,ze=O,He=Z;for(;!Ie&&Re>0;)Re--,ze>>=1,He>>=1,Ie=this.tiles[Wr(Re,ze,He)];return Ie&&Ie.source?(_e>1&&(console.log("found parent tile z%d-%d-%d",Re,ze,He),console.time("drilling down")),this.splitTile(Ie.source,Re,ze,He,$,O,Z),_e>1&&console.timeEnd("drilling down"),this.tiles[oe]?ni(this.tiles[oe],he):null):null}}function Wr(te,$,O){return 32*((1<<te)*O+$)+te}function It(te,$){return $?te.properties[$]:te.id}function pn(te,$){if(te==null)return!0;if(te.type==="Feature")return It(te,$)!=null;if(te.type==="FeatureCollection"){const O=new Set;for(const Z of te.features){const J=It(Z,$);if(J==null||O.has(J))return!1;O.add(J)}return!0}return!1}function Sn(te,$){const O=new Map;if(te!=null)if(te.type==="Feature")O.set(It(te,$),te);else for(const Z of te.features)O.set(It(Z,$),Z);return O}class Dn extends F{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile($,O){return w._(this,void 0,void 0,function*(){const Z=$.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const J=this._geoJSONIndex.getTile(Z.z,Z.x,Z.y);if(!J)return null;const he=new class{constructor(we){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=w.X,this.length=we.length,this._features=we}feature(we){return new class{constructor(oe){this._feature=oe,this.extent=w.X,this.type=oe.type,this.properties=oe.tags,"id"in oe&&!isNaN(oe.id)&&(this.id=parseInt(oe.id,10))}loadGeometry(){if(this._feature.type===1){const oe=[];for(const Ie of this._feature.geometry)oe.push([new w.P(Ie[0],Ie[1])]);return oe}{const oe=[];for(const Ie of this._feature.geometry){const Re=[];for(const ze of Ie)Re.push(new w.P(ze[0],ze[1]));oe.push(Re)}return oe}}toGeoJSON(oe,Ie,Re){return de.call(this,oe,Ie,Re)}}(this._features[we])}}(J.features);let _e=hi(he);return _e.byteOffset===0&&_e.byteLength===_e.buffer.byteLength||(_e=new Uint8Array(_e)),{vectorTile:he,rawData:_e.buffer}})}loadData($){return w._(this,void 0,void 0,function*(){var O;(O=this._pendingRequest)===null||O===void 0||O.abort();const Z=!!($&&$.request&&$.request.collectResourceTiming)&&new w.bv($.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON($,this._pendingRequest),this._geoJSONIndex=$.cluster?new Zr(function({superclusterOptions:_e,clusterProperties:we}){if(!we||!_e)return _e;const oe={},Ie={},Re={accumulated:null,zoom:0},ze={properties:null},He=Object.keys(we);for(const gt of He){const[vt,Ht]=we[gt],Mt=w.bC(Ht),Wt=w.bC(typeof vt=="string"?[vt,["accumulated"],["get",gt]]:vt);oe[gt]=Mt.value,Ie[gt]=Wt.value}return _e.map=gt=>{ze.properties=gt;const vt={};for(const Ht of He)vt[Ht]=oe[Ht].evaluate(Re,ze);return vt},_e.reduce=(gt,vt)=>{ze.properties=vt;for(const Ht of He)Re.accumulated=gt[Ht],gt[Ht]=Ie[Ht].evaluate(Re,ze)},_e}($)).load((yield this._pendingData).features):(J=yield this._pendingData,new Wi(J,$.geojsonVtOptions)),this.loaded={};const he={};if(Z){const _e=Z.finish();_e&&(he.resourceTiming={},he.resourceTiming[$.source]=JSON.parse(JSON.stringify(_e)))}return he}catch(he){if(delete this._pendingRequest,w.bB(he))return{abandoned:!0};throw he}var J})}getData(){return w._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile($){const O=this.loaded;return O&&O[$.uid]?super.reloadTile($):this.loadTile($)}loadAndProcessGeoJSON($,O){return w._(this,void 0,void 0,function*(){let Z=yield this.loadGeoJSON($,O);if(delete this._pendingRequest,typeof Z!="object")throw new Error(`Input data given to '${$.source}' is not a valid GeoJSON object.`);if(ye(Z,!0),$.filter){const J=w.bC($.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(J.result==="error")throw new Error(J.value.map(_e=>`${_e.key}: ${_e.message}`).join(", "));Z={type:"FeatureCollection",features:Z.features.filter(_e=>J.value.evaluate({zoom:0},_e))}}return Z})}loadGeoJSON($,O){return w._(this,void 0,void 0,function*(){const{promoteId:Z}=$;if($.request){const J=yield w.h($.request,O);return this._dataUpdateable=pn(J.data,Z)?Sn(J.data,Z):void 0,J.data}
12if(typeof $.data=="string")try{const J=JSON.parse($.data);return this._dataUpdateable=pn(J,Z)?Sn(J,Z):void 0,J}catch{throw new Error(`Input data given to '${$.source}' is not a valid GeoJSON object.`)}if(!$.dataDiff)throw new Error(`Input data given to '${$.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${$.source}`);return function(J,he,_e){var we,oe,Ie,Re;if(he.removeAll&&J.clear(),he.remove)for(const ze of he.remove)J.delete(ze);if(he.add)for(const ze of he.add){const He=It(ze,_e);He!=null&&J.set(He,ze)}if(he.update)for(const ze of he.update){let He=J.get(ze.id);if(He==null)continue;const gt=!ze.removeAllProperties&&(((we=ze.removeProperties)===null||we===void 0?void 0:we.length)>0||((oe=ze.addOrUpdateProperties)===null||oe===void 0?void 0:oe.length)>0);if((ze.newGeometry||ze.removeAllProperties||gt)&&(He=Object.assign({},He),J.set(ze.id,He),gt&&(He.properties=Object.assign({},He.properties))),ze.newGeometry&&(He.geometry=ze.newGeometry),ze.removeAllProperties)He.properties={};else if(((Ie=ze.removeProperties)===null||Ie===void 0?void 0:Ie.length)>0)for(const vt of ze.removeProperties)Object.prototype.hasOwnProperty.call(He.properties,vt)&&delete He.properties[vt];if(((Re=ze.addOrUpdateProperties)===null||Re===void 0?void 0:Re.length)>0)for(const{key:vt,value:Ht}of ze.addOrUpdateProperties)He.properties[vt]=Ht}}(this._dataUpdateable,$.dataDiff,Z),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource($){return w._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom($){return this._geoJSONIndex.getClusterExpansionZoom($.clusterId)}getClusterChildren($){return this._geoJSONIndex.getChildren($.clusterId)}getClusterLeaves($){return this._geoJSONIndex.getLeaves($.clusterId,$.limit,$.offset)}}class fn{constructor($){this.self=$,this.actor=new w.F($),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(O,Z)=>{if(this.externalWorkerSourceTypes[O])throw new Error(`Worker source with name "${O}" already registered.`);this.externalWorkerSourceTypes[O]=Z},this.self.addProtocol=w.bi,this.self.removeProtocol=w.bj,this.self.registerRTLTextPlugin=O=>{if(w.bD.isParsed())throw new Error("RTL text plugin already registered.");w.bD.setMethods(O)},this.actor.registerMessageHandler("LDT",(O,Z)=>this._getDEMWorkerSource(O,Z.source).loadTile(Z)),this.actor.registerMessageHandler("RDT",(O,Z)=>w._(this,void 0,void 0,function*(){this._getDEMWorkerSource(O,Z.source).removeTile(Z)})),this.actor.registerMessageHandler("GCEZ",(O,Z)=>w._(this,void 0,void 0,function*(){return this._getWorkerSource(O,Z.type,Z.source).getClusterExpansionZoom(Z)})),this.actor.registerMessageHandler("GCC",(O,Z)=>w._(this,void 0,void 0,function*(){return this._getWorkerSource(O,Z.type,Z.source).getClusterChildren(Z)})),this.actor.registerMessageHandler("GCL",(O,Z)=>w._(this,void 0,void 0,function*(){return this._getWorkerSource(O,Z.type,Z.source).getClusterLeaves(Z)})),this.actor.registerMessageHandler("LD",(O,Z)=>this._getWorkerSource(O,Z.type,Z.source).loadData(Z)),this.actor.registerMessageHandler("GD",(O,Z)=>this._getWorkerSource(O,Z.type,Z.source).getData()),this.actor.registerMessageHandler("LT",(O,Z)=>this._getWorkerSource(O,Z.type,Z.source).loadTile(Z)),this.actor.registerMessageHandler("RT",(O,Z)=>this._getWorkerSource(O,Z.type,Z.source).reloadTile(Z)),this.actor.registerMessageHandler("AT",(O,Z)=>this._getWorkerSource(O,Z.type,Z.source).abortTile(Z)),this.actor.registerMessageHandler("RMT",(O,Z)=>this._getWorkerSource(O,Z.type,Z.source).removeTile(Z)),this.actor.registerMessageHandler("RS",(O,Z)=>w._(this,void 0,void 0,function*(){if(!this.workerSources[O]||!this.workerSources[O][Z.type]||!this.workerSources[O][Z.type][Z.source])return;const J=this.workerSources[O][Z.type][Z.source];delete this.workerSources[O][Z.type][Z.source],J.removeSource!==void 0&&J.removeSource(Z)})),this.actor.registerMessageHandler("RM",O=>w._(this,void 0,void 0,function*(){delete this.layerIndexes[O],delete this.availableImages[O],delete this.workerSources[O],delete this.demWorkerSources[O]})),this.actor.registerMessageHandler("SR",(O,Z)=>w._(this,void 0,void 0,function*(){this.referrer=Z})),this.actor.registerMessageHandler("SRPS",(O,Z)=>this._syncRTLPluginState(O,Z)),this.actor.registerMessageHandler("IS",(O,Z)=>w._(this,void 0,void 0,function*(){this.self.importScripts(Z)})),this.actor.registerMessageHandler("SI",(O,Z)=>this._setImages(O,Z)),this.actor.registerMessageHandler("UL",(O,Z)=>w._(this,void 0,void 0,function*(){this._getLayerIndex(O).update(Z.layers,Z.removedIds)})),this.actor.registerMessageHandler("SL",(O,Z)=>w._(this,void 0,void 0,function*(){this._getLayerIndex(O).replace(Z)}))}_setImages($,O){return w._(this,void 0,void 0,function*(){this.availableImages[$]=O;for(const Z in this.workerSources[$]){const J=this.workerSources[$][Z];for(const he in J)J[he].availableImages=O}})}_syncRTLPluginState($,O){return w._(this,void 0,void 0,function*(){if(w.bD.isParsed())return w.bD.get
12State();if(O.pluginStatus!=="loading")return w.bD.setState(O),O;const Z=O.pluginURL;if(this.self.importScripts(Z),w.bD.isParsed()){const J={pluginStatus:"loaded",pluginURL:Z};return w.bD.setState(J),J}throw w.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Z}`)})}_getAvailableImages($){let O=this.availableImages[$];return O||(O=[]),O}_getLayerIndex($){let O=this.layerIndexes[$];return O||(O=this.layerIndexes[$]=new l),O}_getWorkerSource($,O,Z){if(this.workerSources[$]||(this.workerSources[$]={}),this.workerSources[$][O]||(this.workerSources[$][O]={}),!this.workerSources[$][O][Z]){const J={sendAsync:(he,_e)=>(he.targetMapId=$,this.actor.sendAsync(he,_e))};switch(O){case"vector":this.workerSources[$][O][Z]=new F(J,this._getLayerIndex($),this._getAvailableImages($));break;case"geojson":this.workerSources[$][O][Z]=new Dn(J,this._getLayerIndex($),this._getAvailableImages($));break;default:this.workerSources[$][O][Z]=new this.externalWorkerSourceTypes[O](J,this._getLayerIndex($),this._getAvailableImages($))}}return this.workerSources[$][O][Z]}_getDEMWorkerSource($,O){return this.demWorkerSources[$]||(this.demWorkerSources[$]={}),this.demWorkerSources[$][O]||(this.demWorkerSources[$][O]=new T),this.demWorkerSources[$][O]}}return w.i(self)&&(self.worker=new fn(self)),fn}),C("index",["exports","./shared"],function(w,l){var U="4.7.1";let W,G;const F={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:h=>new Promise((e,n)=>{const a=requestAnimationFrame(e);h.signal.addEventListener("abort",()=>{cancelAnimationFrame(a),n(l.c())})}),getImageData(h,e=0){return this.getImageCanvasContext(h).getImageData(-e,-e,h.width+2*e,h.height+2*e)},getImageCanvasContext(h){const e=window.document.createElement("canvas"),n=e.getContext("2d",{willReadFrequently:!0});if(!n)throw new Error("failed to create canvas 2d context");return e.width=h.width,e.height=h.height,n.drawImage(h,0,0,h.width,h.height),n},resolveURL:h=>(W||(W=document.createElement("a")),W.href=h,W.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(G==null&&(G=matchMedia("(prefers-reduced-motion: reduce)")),G.matches)}};class T{static testProp(e){if(!T.docStyle)return e[0];for(let n=0;n<e.length;n++)if(e[n]in T.docStyle)return e[n];return e[0]}static create(e,n,a){const o=window.document.createElement(e);return n!==void 0&&(o.className=n),a&&a.appendChild(o),o}static createNS(e,n){return window.document.createElementNS(e,n)}static disableDrag(){T.docStyle&&T.selectProp&&(T.userSelect=T.docStyle[T.selectProp],T.docStyle[T.selectProp]="none")}static enableDrag(){T.docStyle&&T.selectProp&&(T.docStyle[T.selectProp]=T.userSelect)}static setTransform(e,n){e.style[T.transformProp]=n}static addEventListener(e,n,a,o={}){e.addEventListener(n,a,"passive"in o?o:o.capture)}static removeEventListener(e,n,a,o={}){e.removeEventListener(n,a,"passive"in o?o:o.capture)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",T.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",T.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",T.suppressClickInternal,!0)},0)}static getScale(e){const n=e.getBoundingClientRect();return{x:n.width/e.offsetWidth||1,y:n.height/e.offsetHeight||1,boundingClientRect:n}}static getPoint(e,n,a){const o=n.boundingClientRect;return new l.P((a.clientX-o.left)/n.x-e.clientLeft,(a.clientY-o.top)/n.y-e.clientTop)}static mousePos(e,n){const a=T.getScale(e);return T.getPoint(e,a,n)}static touchPos(e,n){const a=[],o=T.getScale(e);for(let c=0;c<n.length;c++)a.push(T.getPoint(e,o,n[c]));return a}static mouseButton(e){return e.button}static remove(e){e.parentNode&&e.parentNode.removeChild(e)}}T.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,T.selectProp=T.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),T.transformProp=T.testProp(["transform","WebkitTransform"]);const re={supported:!1,testSupport:function(h){!de&&ye&&(ge?ae(h):fe=h)}};let fe,ye,de=!1,ge=!1;function ae(h){const e=h.createTexture();h.bindTexture(h.TEXTURE_2D,e);try{if(h.texImage2D(h.TEXTURE_2D,0,h.RGBA,h.RGBA,h.UNSIGNED_BYTE,ye),h.isContextLost())return;
12re.supported=!0}catch{}h.deleteTexture(e),de=!0}var le;typeof document<"u"&&(ye=document.createElement("img"),ye.onload=()=>{fe&&ae(fe),fe=null,ge=!0},ye.onerror=()=>{de=!0,fe=null},ye.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(h){let e,n,a,o;h.resetRequestQueue=()=>{e=[],n=0,a=0,o={}},h.addThrottleControl=k=>{const A=a++;return o[A]=k,A},h.removeThrottleControl=k=>{delete o[k],g()},h.getImage=(k,A,M=!0)=>new Promise((D,V)=>{re.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),l.e(k,{type:"image"}),e.push({abortController:A,requestParameters:k,supportImageRefresh:M,state:"queued",onError:H=>{V(H)},onSuccess:H=>{D(H)}}),g()});const c=k=>l._(this,void 0,void 0,function*(){k.state="running";const{requestParameters:A,supportImageRefresh:M,onError:D,onSuccess:V,abortController:H}=k,X=M===!1&&!l.i(self)&&!l.g(A.url)&&(!A.headers||Object.keys(A.headers).reduce((se,ue)=>se&&ue==="accept",!0));n++;const Q=X?b(A,H):l.m(A,H);try{const se=yield Q;delete k.abortController,k.state="completed",se.data instanceof HTMLImageElement||l.b(se.data)?V(se):se.data&&V({data:yield(ne=se.data,typeof createImageBitmap=="function"?l.d(ne):l.f(ne)),cacheControl:se.cacheControl,expires:se.expires})}catch(se){delete k.abortController,D(se)}finally{n--,g()}var ne}),g=()=>{const k=(()=>{for(const A of Object.keys(o))if(o[A]())return!0;return!1})()?l.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:l.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let A=n;A<k&&e.length>0;A++){const M=e.shift();M.abortController.signal.aborted?A--:c(M)}},b=(k,A)=>new Promise((M,D)=>{const V=new Image,H=k.url,X=k.credentials;X&&X==="include"?V.crossOrigin="use-credentials":(X&&X==="same-origin"||!l.s(H))&&(V.crossOrigin="anonymous"),A.signal.addEventListener("abort",()=>{V.src="",D(l.c())}),V.fetchPriority="high",V.onload=()=>{V.onerror=V.onload=null,M({data:V})},V.onerror=()=>{V.onerror=V.onload=null,A.signal.aborted||D(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."))},V.src=H})}(le||(le={})),le.resetRequestQueue();class Ze{constructor(e){this._transformRequestFn=e}transformRequest(e,n){return this._transformRequestFn&&this._transformRequestFn(e,n)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function Ue(h){var e=new l.A(3);return e[0]=h[0],e[1]=h[1],e[2]=h[2],e}var wt,Ge=function(h,e,n){return h[0]=e[0]-n[0],h[1]=e[1]-n[1],h[2]=e[2]-n[2],h};wt=new l.A(3),l.A!=Float32Array&&(wt[0]=0,wt[1]=0,wt[2]=0);var P=function(h){var e=h[0],n=h[1];return e*e+n*n};function Te(h){const e=[];if(typeof h=="string")e.push({id:"default",url:h});else if(h&&h.length>0){const n=[];for(const{id:a,url:o}of h){const c=`${a}${o}`;n.indexOf(c)===-1&&(n.push(c),e.push({id:a,url:o}))}}return e}function Ae(h,e,n){const a=h.split("?");return a[0]+=`${e}${n}`,a.join("?")}(function(){var h=new l.A(2);l.A!=Float32Array&&(h[0]=0,h[1]=0)})();class Pt{constructor(e,n,a,o){this.context=e,this.format=a,this.texture=e.gl.createTexture(),this.update(n,o)}update(e,n,a){const{width:o,height:c}=e,g=!(this.size&&this.size[0]===o&&this.size[1]===c||a),{context:b}=this,{gl:k}=b;if(this.useMipmap=!!(n&&n.useMipmap),k.bindTexture(k.TEXTURE_2D,this.texture),b.pixelStoreUnpackFlipY.set(!1),b.pixelStoreUnpack.set(1),b.pixelStoreUnpackPremultiplyAlpha.set(this.format===k.RGBA&&(!n||n.premultiply!==!1)),g)this.size=[o,c],e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||l.b(e)?k.texImage2D(k.TEXTURE_2D,0,this.format,this.format,k.UNSIGNED_BYTE,e):k.texImage2D(k.TEXTURE_2D,0,this.format,o,c,0,this.format,k.UNSIGNED_BYTE,e.data);else{const{x:A,y:M}=a||{x:0,y:0};e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||l.b(e)?k.texSubImage2D(k.TEXTURE_2D,0,A,M,k.RGBA,k.UNSIGNED_BYTE,e):k.texSubImage2D(k.TEXTURE_2D,0,A,M,o,c,k.RGBA,k.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&k.generateMipmap(k.TEXTURE_2D)}bind(e,n,a){const{context:o}=this,{gl:c}=o;c.bindTexture(c.TEXTURE_2D,this.texture),a!==c.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(a=c.LINEAR),e!==this.filter&&(c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,e),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,a||e),this.filter=e),n!==this.wrap&&(c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,n),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,n),this.wrap=n)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}function _t(h){const{userImage:e}=h;return!!(e&&e.render&&e.render())&&(h.data.replace(new Uint8Array(e.data.buffer)),!0)}class Ct extends l.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new l.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:n,promiseResolve:a}of this.requestors)a(this._getImagesForIds(n));this.requestors=[]}}getImage(e){const n=this.images[e];if(n&&!n.data&&n.spriteData){const a=n.spriteData;n.data=new l.R({width:a.width,height:a.height},a.context.getImageData(a.x,a.y,a.width,a.height).data),n.spriteData=null}return n}addImage(e,n){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);
vendor: 4,493 bytes, line 12
12this._validate(e,n)&&(this.images[e]=n)}_validate(e,n){let a=!0;const o=n.data||n.spriteData;return this._validateStretch(n.stretchX,o&&o.width)||(this.fire(new l.j(new Error(`Image "${e}" has invalid "stretchX" value`))),a=!1),this._validateStretch(n.stretchY,o&&o.height)||(this.fire(new l.j(new Error(`Image "${e}" has invalid "stretchY" value`))),a=!1),this._validateContent(n.content,n)||(this.fire(new l.j(new Error(`Image "${e}" has invalid "content" value`))),a=!1),a}_validateStretch(e,n){if(!e)return!0;let a=0;for(const o of e){if(o[0]<a||o[1]<o[0]||n<o[1])return!1;a=o[1]}return!0}_validateContent(e,n){if(!e)return!0;if(e.length!==4)return!1;const a=n.spriteData,o=a&&a.width||n.data.width,c=a&&a.height||n.data.height;return!(e[0]<0||o<e[0]||e[1]<0||c<e[1]||e[2]<0||o<e[2]||e[3]<0||c<e[3]||e[2]<e[0]||e[3]<e[1])}updateImage(e,n,a=!0){const o=this.getImage(e);if(a&&(o.data.width!==n.data.width||o.data.height!==n.data.height))throw new Error(`size mismatch between old image (${o.data.width}x${o.data.height}) and new image (${n.data.width}x${n.data.height}).`);n.version=o.version+1,this.images[e]=n,this.updatedImages[e]=!0}removeImage(e){const n=this.images[e];delete this.images[e],delete this.patterns[e],n.userImage&&n.userImage.onRemove&&n.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e){return new Promise((n,a)=>{let o=!0;if(!this.isLoaded())for(const c of e)this.images[c]||(o=!1);this.isLoaded()||o?n(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:n})})}_getImagesForIds(e){const n={};for(const a of e){let o=this.getImage(a);o||(this.fire(new l.k("styleimagemissing",{id:a})),o=this.getImage(a)),o?n[a]={data:o.data.clone(),pixelRatio:o.pixelRatio,sdf:o.sdf,version:o.version,stretchX:o.stretchX,stretchY:o.stretchY,content:o.content,textFitWidth:o.textFitWidth,textFitHeight:o.textFitHeight,hasRenderCallback:!!(o.userImage&&o.userImage.render)}:l.w(`Image "${a}" 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 n}getPixelSize(){const{width:e,height:n}=this.atlasImage;return{width:e,height:n}}getPattern(e){const n=this.patterns[e],a=this.getImage(e);if(!a)return null;if(n&&n.position.version===a.version)return n.position;if(n)n.position.version=a.version;else{const o={w:a.data.width+2,h:a.data.height+2,x:0,y:0},c=new l.I(o,a);this.patterns[e]={bin:o,position:c}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){const n=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new Pt(e,this.atlasImage,n.RGBA),this.atlasTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}_updatePatternAtlas(){const e=[];for(const c in this.patterns)e.push(this.patterns[c].bin);const{w:n,h:a}=l.p(e),o=this.atlasImage;o.resize({width:n||1,height:a||1});for(const c in this.patterns){const{bin:g}=this.patterns[c],b=g.x+1,k=g.y+1,A=this.getImage(c).data,M=A.width,D=A.height;l.R.copy(A,o,{x:0,y:0},{x:b,y:k},{width:M,height:D}),l.R.copy(A,o,{x:0,y:D-1},{x:b,y:k-1},{width:M,height:1}),l.R.copy(A,o,{x:0,y:0},{x:b,y:k+D},{width:M,height:1}),l.R.copy(A,o,{x:M-1,y:0},{x:b-1,y:k},{width:1,height:D}),l.R.copy(A,o,{x:0,y:0},{x:b+M,y:k},{width:1,height:D})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(const n of e){if(this.callbackDispatchedThisFrame[n])continue;this.callbackDispatchedThisFrame[n]=!0;const a=this.getImage(n);a||l.w(`Image with ID: "${n}" was not found`),_t(a)&&this.updateImage(n,a)}}}const Lt=1e20;function wi(h,e,n,a,o,c,g,b,k){for(let A=e;A<e+a;A++)ri(h,n*c+A,c,o,g,b,k);for(let A=n;A<n+o;A++)ri(h,A*c+e,1,a,g,b,k)}function ri(h,e,n,a,o,c,g){c[0]=0,g[0]=-1e20,g[1]=Lt,o[0]=h[e];for(let b=1,k=0,A=0;b<a;b++){o[b]=h[e+b*n];const M=b*b;do{const D=c[k];A=(o[b]-o[D]+M-D*D)/(b-D)/2}while(A<=g[k]&&--k>-1);k++,c[k]=b,g[k]=A,g[k+1]=Lt}for(let b=0,k=0;b<a;b++){for(;g[k+1]<b;)k++;const A=c[k],M=b-A;h[e+b*n]=o[A]+M*M}}class hi{constructor(e,n){this.requestManager=e,this.localIdeographFontFamily=n,this.entries={}}setURL(e){this.url=e}getGlyphs(e){return l._(this,void 0,void 0,function*(){const n=[];for(const c in e)for(const g of e[c])n.push(this._getAndCacheGlyphsPromise(c,g));const a=yield Promise.all(n),o={};for(const{stack:c,id:g,glyph:b}of a)o[c]||(o[c]={}),o[c][g]=b&&{id:b.id,bitmap:b.bitmap.clone(),metrics:b.metrics};return o}
12)}_getAndCacheGlyphsPromise(e,n){return l._(this,void 0,void 0,function*(){let a=this.entries[e];a||(a=this.entries[e]={glyphs:{},requests:{},ranges:{}});let o=a.glyphs[n];if(o!==void 0)return{stack:e,id:n,glyph:o};if(o=this._tinySDF(a,e,n),o)return a.glyphs[n]=o,{stack:e,id:n,glyph:o};const c=Math.floor(n/256);if(256*c>65535)throw new Error("glyphs > 65535 not supported");if(a.ranges[c])return{stack:e,id:n,glyph:o};if(!this.url)throw new Error("glyphsUrl is not set");if(!a.requests[c]){const b=hi.loadGlyphRange(e,c,this.url,this.requestManager);a.requests[c]=b}const g=yield a.requests[c];for(const b in g)this._doesCharSupportLocalGlyph(+b)||(a.glyphs[+b]=g[+b]);return a.ranges[c]=!0,{stack:e,id:n,glyph:g[n]||null}})}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(e))}_tinySDF(e,n,a){const o=this.localIdeographFontFamily;if(!o||!this._doesCharSupportLocalGlyph(a))return;let c=e.tinySDF;if(!c){let b="400";/bold/i.test(n)?b="900":/medium/i.test(n)?b="500":/light/i.test(n)&&(b="200"),c=e.tinySDF=new hi.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:o,fontWeight:b})}const g=c.draw(String.fromCharCode(a));return{id:a,bitmap:new l.o({width:g.width||60,height:g.height||60},g.data),metrics:{width:g.glyphWidth/2||24,height:g.glyphHeight/2||24,left:g.glyphLeft/2+.5||0,top:g.glyphTop/2-27.5||-8,advance:g.glyphAdvance/2||24,isDoubleResolution:!0}}}}hi.loadGlyphRange=function(h,e,n,a){return l._(this,void 0,void 0,function*(){const o=256*e,c=o+255,g=a.transformRequest(n.replace("{fontstack}",h).replace("{range}",`${o}-${c}`),"Glyphs"),b=yield l.l(g,new AbortController);if(!b||!b.data)throw new Error(`Could not load glyph range. range: ${e}, ${o}-${c}`);const k={};for(const A of l.n(b.data))k[A.id]=A;return k})},hi.TinySDF=class{constructor({fontSize:h=24,buffer:e=3,radius:n=8,cutoff:a=.25,fontFamily:o="sans-serif",fontWeight:c="normal",fontStyle:g="normal"}={}){this.buffer=e,this.cutoff=a,this.radius=n;const b=this.size=h+4*e,k=this._createCanvas(b),A=this.ctx=k.getContext("2d",{willReadFrequently:!0});A.font=`${g} ${c} ${h}px ${o}`,A.textBaseline="alphabetic",A.textAlign="left",A.fillStyle="black",this.gridOuter=new Float64Array(b*b),this.gridInner=new Float64Array(b*b),this.f=new Float64Array(b),this.z=new Float64Array(b+1),this.v=new Uint16Array(b)}_createCanvas(h){const e=document.createElement("canvas");return e.width=e.height=h,e}draw(h){const{width:e,actualBoundingBoxAscent:n,actualBoundingBoxDescent:a,actualBoundingBoxLeft:o,actualBoundingBoxRight:c}=this.ctx.measureText(h),g=Math.ceil(n),b=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(c-o))),k=Math.min(this.size-this.buffer,g+Math.ceil(a)),A=b+2*this.buffer,M=k+2*this.buffer,D=Math.max(A*M,0),V=new Uint8ClampedArray(D),H={data:V,width:A,height:M,glyphWidth:b,glyphHeight:k,glyphTop:g,glyphLeft:0,glyphAdvance:e};if(b===0||k===0)return H;const{ctx:X,buffer:Q,gridInner:ne,gridOuter:se}=this;X.clearRect(Q,Q,b,k),X.fillText(h,Q,Q+g);const ue=X.getImageData(Q,Q,b,k);se.fill(Lt,0,D),ne.fill(0,0,D);for(let Y=0;Y<k;Y++)for(let me=0;me<b;me++){const ve=ue.data[4*(Y*b+me)+3]/255;if(ve===0)continue;const Se=(Y+Q)*A+me+Q;if(ve===1)se[Se]=0,ne[Se]=Lt;else{const De=.5-ve;se[Se]=De>0?De*De:0,ne[Se]=De<0?De*De:0}}wi(se,0,0,A,M,A,this.f,this.v,this.z),wi(ne,Q,Q,b,k,A,this.f,this.v,this.z);for(let Y=0;Y<D;Y++){const me=Math.sqrt(se[Y])-Math.sqrt(ne[Y]);V[Y]=Math.round(255-255*(me/this.radius+this.cutoff))}return H}};class Di{constructor(){this.specification=l.v.light.position}possiblyEvaluate(e,n){return l.x(e.expression.evaluate(n))}interpolate(e,n,a){return{x:l.y.number(e.x,n.x,a),y:l.y.number(e.y,n.y,a),z:l.y.number(e.z,n.z,a)}}}let xi;class Ui extends l.E{constructor(e){super(),xi=xi||new l.q({anchor:new l.D(l.v.light.anchor),position:new Di,color:new l.D(l.v.light.color),intensity:new l.D(l.v.light.intensity)}),this._transitionable=new l.T(xi),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(e,n={}
vendor: 4,105 bytes, line 12
12){if(!this._validate(l.r,e,n))for(const a in e){const o=e[a];a.endsWith("-transition")?this._transitionable.setTransition(a.slice(0,-11),o):this._transitionable.setValue(a,o)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,n,a){return(!a||a.validate!==!1)&&l.t(this,e.call(l.u,{value:n,style:{glyphs:!0,sprite:!0},styleSpec:l.v}))}}const li=new l.q({"sky-color":new l.D(l.v.sky["sky-color"]),"horizon-color":new l.D(l.v.sky["horizon-color"]),"fog-color":new l.D(l.v.sky["fog-color"]),"fog-ground-blend":new l.D(l.v.sky["fog-ground-blend"]),"horizon-fog-blend":new l.D(l.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new l.D(l.v.sky["sky-horizon-blend"]),"atmosphere-blend":new l.D(l.v.sky["atmosphere-blend"])});class dr extends l.E{constructor(e){super(),this._transitionable=new l.T(li),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new l.z(0))}setSky(e,n={}){if(!this._validate(l.B,e,n)){e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const a in e){const o=e[a];a.endsWith("-transition")?this._transitionable.setTransition(a.slice(0,-11),o):this._transitionable.setValue(a,o)}}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,n,a={}){return(a==null?void 0:a.validate)!==!1&&l.t(this,e.call(l.u,l.e({value:n,style:{glyphs:!0,sprite:!0},styleSpec:l.v})))}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}}class wn{constructor(e,n){this.width=e,this.height=n,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,n){const a=e.join(",")+String(n);return this.dashEntry[a]||(this.dashEntry[a]=this.addDash(e,n)),this.dashEntry[a]}getDashRanges(e,n,a){const o=[];let c=e.length%2==1?-e[e.length-1]*a:0,g=e[0]*a,b=!0;o.push({left:c,right:g,isDash:b,zeroLength:e[0]===0});let k=e[0];for(let A=1;A<e.length;A++){b=!b;const M=e[A];c=k*a,k+=M,g=k*a,o.push({left:c,right:g,isDash:b,zeroLength:M===0})}return o}addRoundDash(e,n,a){const o=n/2;for(let c=-a;c<=a;c++){const g=this.width*(this.nextRow+a+c);let b=0,k=e[b];for(let A=0;A<this.width;A++){A/k.right>1&&(k=e[++b]);const M=Math.abs(A-k.left),D=Math.abs(A-k.right),V=Math.min(M,D);let H;const X=c/a*(o+1);if(k.isDash){const Q=o-Math.abs(X);H=Math.sqrt(V*V+Q*Q)}else H=o-Math.sqrt(V*V+X*X);this.data[g+A]=Math.max(0,Math.min(255,H+128))}}}addRegularDash(e){for(let b=e.length-1;b>=0;--b){const k=e[b],A=e[b+1];k.zeroLength?e.splice(b,1):A&&A.isDash===k.isDash&&(A.left=k.left,e.splice(b,1))}const n=e[0],a=e[e.length-1];n.isDash===a.isDash&&(n.left=a.left-this.width,a.right=n.right+this.width);const o=this.width*this.nextRow;let c=0,g=e[c];for(let b=0;b<this.width;b++){b/g.right>1&&(g=e[++c]);const k=Math.abs(b-g.left),A=Math.abs(b-g.right),M=Math.min(k,A);this.data[o+b]=Math.max(0,Math.min(255,(g.isDash?M:-M)+128))}}addDash(e,n){const a=n?7:0,o=2*a+1;if(this.nextRow+o>this.height)return l.w("LineAtlas out of space"),null;let c=0;for(let b=0;b<e.length;b++)c+=e[b];if(c!==0){const b=this.width/c,k=this.getDashRanges(e,this.width,b);n?this.addRoundDash(k,b,a):this.addRegularDash(k)}const g={y:(this.nextRow+a+.5)/this.height,height:2*a/this.height,width:c};return this.nextRow+=o,this.dirty=!0,g}bind(e){const n=e.gl;this.texture?(n.bindTexture(n.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,n.texSubImage2D(n.TEXTURE_2D,0,0,0,this.width,this.height,n.ALPHA,n.UNSIGNED_BYTE,this.data))):(this.texture=n.createTexture(),n.bindTexture(n.TEXTURE_2D,this.texture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.REPEAT),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.REPEAT),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.L
12INEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texImage2D(n.TEXTURE_2D,0,n.ALPHA,this.width,this.height,0,n.ALPHA,n.UNSIGNED_BYTE,this.data))}}const Zr="maplibre_preloaded_worker_pool";class Sr{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.length<Sr.workerCount;)this.workers.push(new Worker(l.a.WORKER_URL));return this.active[e]=!0,this.workers.slice()}release(e){delete this.active[e],this.numActive()===0&&(this.workers.forEach(n=>{n.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Zr]}numActive(){return Object.keys(this.active).length}}const kn=Math.floor(F.hardwareConcurrency/2);let Hi,pr;function hn(){return Hi||(Hi=new Sr),Hi}Sr.workerCount=l.C(globalThis)?Math.max(Math.min(kn,3),1):1;class sr{constructor(e,n){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=n;const a=this.workerPool.acquire(n);for(let o=0;o<a.length;o++){const c=new l.F(a[o],n);c.name=`Worker ${o}`,this.actors.push(c)}if(!this.actors.length)throw new Error("No actors found")}broadcast(e,n){const a=[];for(const o of this.actors)a.push(o.sendAsync({type:e,data:n}));return Promise.all(a)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.actors.forEach(n=>{n.remove()}),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,n){for(const a of this.actors)a.registerMessageHandler(e,n)}}function Wn(){return pr||(pr=new sr(hn(),l.G),pr.registerMessageHandler("GR",(h,e,n)=>l.m(e,n))),pr}function Br(h,e){const n=l.H();return l.J(n,n,[1,1,0]),l.K(n,n,[.5*h.width,.5*h.height,1]),l.L(n,n,h.calculatePosMatrix(e.toUnwrapped()))}
vendor: 3,673 bytes, line 12
12function Hr(h,e,n,a,o,c){const g=function(D,V,H){if(D)for(const X of D){const Q=V[X];if(Q&&Q.source===H&&Q.type==="fill-extrusion")return!0}else for(const X in V){const Q=V[X];if(Q.source===H&&Q.type==="fill-extrusion")return!0}return!1}(o&&o.layers,e,h.id),b=c.maxPitchScaleFactor(),k=h.tilesIn(a,b,g);k.sort(Tr);const A=[];for(const D of k)A.push({wrappedTileID:D.tileID.wrapped().key,queryResults:D.tile.queryRenderedFeatures(e,n,h._state,D.queryGeometry,D.cameraQueryGeometry,D.scale,o,c,b,Br(h.transform,D.tileID))});const M=function(D){const V={},H={};for(const X of D){const Q=X.queryResults,ne=X.wrappedTileID,se=H[ne]=H[ne]||{};for(const ue in Q){const Y=Q[ue],me=se[ue]=se[ue]||{},ve=V[ue]=V[ue]||[];for(const Se of Y)me[Se.featureIndex]||(me[Se.featureIndex]=!0,ve.push(Se))}}return V}(A);for(const D in M)M[D].forEach(V=>{const H=V.feature,X=h.getFeatureState(H.layer["source-layer"],H.id);H.source=H.layer.source,H.layer["source-layer"]&&(H.sourceLayer=H.layer["source-layer"]),H.state=X});return M}function Tr(h,e){const n=h.tileID,a=e.tileID;return n.overscaledZ-a.overscaledZ||n.canonical.y-a.canonical.y||n.wrap-a.wrap||n.canonical.x-a.canonical.x}function Mn(h,e,n){return l._(this,void 0,void 0,function*(){let a=h;if(h.url?a=(yield l.h(e.transformRequest(h.url,"Source"),n)).data:yield F.frameAsync(n),!a)return null;const o=l.M(l.e(a,h),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in a&&a.vector_layers&&(o.vectorLayerIds=a.vector_layers.map(c=>c.id)),o})}class Ce{constructor(e,n){e&&(n?this.setSouthWest(e).setNorthEast(n):Array.isArray(e)&&(e.length===4?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof l.N?new l.N(e.lng,e.lat):l.N.convert(e),this}setSouthWest(e){return this._sw=e instanceof l.N?new l.N(e.lng,e.lat):l.N.convert(e),this}extend(e){const n=this._sw,a=this._ne;let o,c;if(e instanceof l.N)o=e,c=e;else{if(!(e instanceof Ce))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(Ce.convert(e)):this.extend(l.N.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(l.N.convert(e)):this;if(o=e._sw,c=e._ne,!o||!c)return this}return n||a?(n.lng=Math.min(o.lng,n.lng),n.lat=Math.min(o.lat,n.lat),a.lng=Math.max(c.lng,a.lng),a.lat=Math.max(c.lat,a.lat)):(this._sw=new l.N(o.lng,o.lat),this._ne=new l.N(c.lng,c.lat)),this}getCenter(){return new l.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new l.N(this.getWest(),this.getNorth())}getSouthEast(){return new l.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){const{lng:n,lat:a}=l.N.convert(e);let o=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(o=this._sw.lng>=n&&n>=this._ne.lng),this._sw.lat<=a&&a<=this._ne.lat&&o}static convert(e){return e instanceof Ce?e:e&&new Ce(e)}static fromLngLat(e,n=0){const a=360*n/40075017,o=a/Math.cos(Math.PI/180*e.lat);return new Ce(new l.N(e.lng-o,e.lat-a),new l.N(e.lng+o,e.lat+a))}adjustAntiMeridian(){const e=new l.N(this._sw.lng,this._sw.lat),n=new l.N(this._ne.lng,this._ne.lat);return new Ce(e,e.lng>n.lng?new l.N(n.lng+360,n.lat):n)}}class dn{constructor(e,n,a){this.bounds=Ce.convert(this.validateBounds(e)),this.minzoom=n||0,this.maxzoom=a||24}
12validateBounds(e){return Array.isArray(e)&&e.length===4?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){const n=Math.pow(2,e.z),a=Math.floor(l.O(this.bounds.getWest())*n),o=Math.floor(l.Q(this.bounds.getNorth())*n),c=Math.ceil(l.O(this.bounds.getEast())*n),g=Math.ceil(l.Q(this.bounds.getSouth())*n);return e.x>=a&&e.x<c&&e.y>=o&&e.y<g}}class Ee extends l.E{constructor(e,n,a,o){if(super(),this.id=e,this.dispatcher=a,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,l.e(this,l.M(n,["url","scheme","tileSize","promoteId"])),this._options=l.e({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}load(){return l._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new l.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const e=yield Mn(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),e&&(l.e(this,e),e.bounds&&(this.tileBounds=new dn(e.bounds,this.minzoom,this.maxzoom)),this.fire(new l.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new l.k("data",{dataType:"source",sourceDataType:"content"})))}catch(e){this._tileJSONRequest=null,this.fire(new l.j(e))}})}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.abort(),e(),this.load()}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return l.e({},this._options)}loadTile(e){return l._(this,void 0,void 0,function*(){const n=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),a={request:this.map._requestManager.transformRequest(n,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.t
12ype,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};a.request.collectResourceTiming=this._collectResourceTiming;let o="RT";if(e.actor&&e.state!=="expired"){if(e.state==="loading")return new Promise((c,g)=>{e.reloadPromise={resolve:c,reject:g}})}else e.actor=this.dispatcher.getActor(),o="LT";e.abortController=new AbortController;try{const c=yield e.actor.sendAsync({type:o,data:a},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,c)}catch(c){if(delete e.abortController,e.aborted)return;if(c&&c.status!==404)throw c;this._afterTileLoadWorkerResponse(e,null)}})}_afterTileLoadWorkerResponse(e,n){if(n&&n.resourceTiming&&(e.resourceTiming=n.resourceTiming),n&&this.map._refreshExpiredTiles&&e.setExpiryData(n),e.loadVectorData(n,this.map.painter),e.reloadPromise){const a=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(a.resolve).catch(a.reject)}}abortTile(e){return l._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.t
12ype,source:this.id}}))})}unloadTile(e){return l._(this,void 0,void 0,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Le extends l.E{constructor(e,n,a,o){super(),this.id=e,this.dispatcher=a,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=l.e({type:"raster"},n),l.e(this,l.M(n,["url","scheme","tileSize"]))}load(){return l._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new l.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const e=yield Mn(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,e&&(l.e(this,e),e.bounds&&(this.tileBounds=new dn(e.bounds,this.minzoom,this.maxzoom)),this.fire(new l.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new l.k("data",{dataType:"source",sourceDataType:"content"})))}catch(e){this._tileJSONRequest=null,this.fire(new l.j(e))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load()}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return l.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return l._(this,void 0,void 0,function*(){const n=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{const a=yield le.getImage(this.map._requestManager.transformRequest(n,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(a&&a.data){this.map._refreshExpiredTiles&&a.cacheControl&&a.expires&&e.setExpiryData({cacheControl:a.cacheControl,expires:a.expires});const o=this.map.painter.context,c=o.gl,g=a.data;e.texture=this.map.painter.getTileTexture(g.width),e.texture?e.texture.update(g,{useMipmap:!0}):(e.texture=new Pt(o,g,c.RGBA,{useMipmap:!0}),e.texture.bind(c.LINEAR,c.CLAMP_TO_EDGE,c.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(a){if(delete e.abortController,e.aborted)e.state="unloaded";else if(a)throw e.state="errored",a}})}abortTile(e){return l._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return l._(this,void 0,void 0,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}}class yt extends Le{constructor(e,n,a,o){super(e,n,a,o),this.type="raster-dem",this.maxzoom=22,this._options=l.e({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox",this.redFactor=n.redFactor,this.greenFactor=n.greenFactor,this.blueFactor=n.blueFactor,this.baseShift=n.baseShift}loadTile(e){return l._(this,void 0,void 0,function*(){const n=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),a=this.map._requestManager.transformRequest(n,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{const o=yield le.getImage(a,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(o&&o.data){const c=o.data;this.map._refreshExpiredTiles&&o.cacheControl&&o.expires&&e.setExpiryData({cacheControl:o.cacheControl,expires:o.expires});const g=l.b(c)&&l.U()?c:yield this.readImageNow(c),b={type:this.type,uid:e.uid,source:this.id,rawImageData:g,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||e.state==="expired"){e.actor=this.dispatcher.getActor();const k=yield e.actor.sendAsync({type:"LDT",data:b});e.dem=k,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(o){if(delete e.abortController,e.aborted)e.state="unloaded";else if(o)throw e.state="errored",o}})}readImageNow(e){return l._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&l.V()){const n=e.width+2,a=e.height+2;try{return new l.R({width:n,height:a},yield l.W(e,-1,-1,n,a))}catch{}}return F.getImageData(e,1)})}_getNeighboringTiles(e){const n=e.canonical,a=Math.pow(2,n.z),o=(n.x-1+a)%a,c=n.x===0?e.wrap-1:e.wrap,g=(n.x+1+a)%a,b=n.x+1===a?e.wrap+1:e.wrap,k={};return k[new l.S(e.overscaledZ,c,n.z,o,n.y).key]={backfilled:!1},k[new l.S(e.overscaledZ,b,n.z,g,n.y).key]={backfilled:!1},n.y>0&&(k[new l.S(e.overscaledZ,c,n.z,o,n.y-1).key]={backfilled:!1},k[new l.S(e.overscaledZ,e.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},k[new l.S(e.overscaledZ,b,n.z,g,n.y-1).key]={backfilled:!1}),n.y+1<a&&(k[new l.S(e.overscaledZ,c,n.z,o,n.y+1).key]={backfilled:!1},k[new l.S(e.overscaledZ,e.wrap,n.z,n.x,n.y+1).key]={backfilled:!1},k[new l.S(e.overscaledZ,b,n.z,g,n.y+1).key]={backfilled:!1}),k}unloadTile(e){return l._(this,void 0,void 0,function*(){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&(yield e.actor.sendAsync({type:"RDT",data:{type:this.t
12ype,uid:e.uid,source:this.id}}))})}}class Oe extends l.E{constructor(e,n,a,o){super(),this.id=e,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=a.getActor(),this.setEventedParent(o),this._data=n.data,this._options=l.e({},n),this._collectResourceTiming=n.collectResourceTiming,n.maxzoom!==void 0&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution),this.promoteId=n.promoteId;const c=l.X/this.tileSize;n.clusterMaxZoom!==void 0&&this.maxzoom<=n.clusterMaxZoom&&l.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${n.clusterMaxZoom}".`),this.workerOptions=l.e({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(n.buffer!==void 0?n.buffer:128)*c,tolerance:(n.tolerance!==void 0?n.tolerance:.375)*c,extent:l.X,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:n.clusterMaxZoom!==void 0?n.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,n.clusterMinPoints||2),extent:l.X,radius:(n.clusterRadius||50)*c,log:!1,generateId:n.generateId||!1},clusterProperties:n.clusterProperties,filter:n.filter},n.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}load(){return l._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(e){this.map=e,this.load()}setData(e){return this._data=e,this._updateWorkerData(),this}updateData(e){return this._updateWorkerData(e),this}getData(){return l._(this,void 0,void 0,function*(){const e=l.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:e})})}setClusterOptions(e){return this.workerOptions.cluster=e.cluster,e&&(e.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=e.clusterRadius),e.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=e.clusterMa
12xZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(e){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}getClusterChildren(e){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}getClusterLeaves(e,n,a){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:n,offset:a}})}_updateWorkerData(e){return l._(this,void 0,void 0,function*(){const n=l.e({type:this.type},this.workerOptions);e?n.dataDiff=e:typeof this._data=="string"?(n.request=this.map._requestManager.transformRequest(F.resolveURL(this._data),"Source"),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new l.k("dataloading",{dataType:"source"}));try{const a=yield this.actor.sendAsync({type:"LD",data:n});if(this._pendingLoads--,this._removed||a.abandoned)return void this.fire(new l.k("dataabort",{dataType:"source"}));let o=null;a.resourceTiming&&a.resourceTiming[this.id]&&(o=a.resourceTiming[this.id].slice(0));const c={dataType:"source"};this._collectResourceTiming&&o&&o.length>0&&l.e(c,{resourceTiming:o}),this.fire(new l.k("data",Object.assign(Object.assign({},c),{sourceDataType:"metadata"}))),this.fire(new l.k("data",Object.assign(Object.assign({},c),{sourceDataType:"content"})))}catch(a){if(this._pendingLoads--,this._removed)return void this.fire(new l.k("dataabort",{dataType:"source"}));this.fire(new l.j(a))}})}loaded(){return this._pendingLoads===0}loadTile(e){return l._(this,void 0,void 0,function*(){const n=e.actor?"RT":"LT";e.actor=this.actor;const a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.abortController=new AbortController;const o=yield this.actor.sendAsync({type:n,data:a},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(o,this.map.painter,n==="RT")})}abortTile(e){return l._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return l._(this,void 0,void 0,function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.t
12ype,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return l.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var ki=l.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class qt extends l.E{constructor(e,n,a,o){super(),this.id=e,this.dispatcher=a,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(o),this.options=n}load(e){return l._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new l.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const n=yield le.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,n&&n.data&&(this.image=n.data,e&&(this.coordinates=e),this._finishLoading())}catch(n){this._request=null,this._loaded=!0,this.fire(new l.j(n))}})}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new l.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;const n=e.map(l.Z.fromLngLat);this.tileID=function(o){let c=1/0,g=1/0,b=-1/0,k=-1/0;for(const V of o)c=Math.min(c,V.x),g=Math.min(g,V.y),b=Math.max(b,V.x),k=Math.max(k,V.y);const A=Math.max(b-c,k-g),M=Math.max(0,Math.floor(-Math.log(A)/Math.LN2)),D=Math.pow(2,M);return new l.a1(M,Math.floor((c+b)/2*D),Math.floor((g+k)/2*D))}(n),this.minzoom=this.maxzoom=this.tileID.z;const a=n.map(o=>this.tileID.getTilePoint(o)._round());return this._boundsArray=new l.$,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,l.X,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,l.X),this._boundsArray.emplaceBack(a[2].x,a[2].y,l.X,l.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new l.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const e=this.map.painter.context,n=e.gl;this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,ki.members)),this.boundsSegments||(this.boundsSegments=l.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new Pt(e,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));let a=!1;for(const o in this.tiles){const c=this.tiles[o];c.state!=="loaded"&&(c.state="loaded",c.texture=this.texture,a=!0)}a&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return l._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class ei extends qt{constructor(e,n,a,o){super(e,n,a,o),this.roundZoom=!0,this.type="video",this.options=n}load(){return l._(this,void 0,void 0,function*(){this._loaded=!1;const e=this.options;this.urls=[];for(const n of e.urls)this.urls.push(this.map._requestManager.transformRequest(n,"Source").url);try{const n=yield l.a3(this.urls);if(this._loaded=!0,!n)return;this.video=n,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(n){this.fire(new l.j(n))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){const n=this.video.seekable;e<n.start(0)||e>n.end(0)?this.fire(new l.j(new l.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}
12onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const e=this.map.painter.context,n=e.gl;this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,ki.members)),this.boundsSegments||(this.boundsSegments=l.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new Pt(e,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));let a=!1;for(const o in this.tiles){const c=this.tiles[o];c.state!=="loaded"&&(c.state="loaded",c.texture=this.texture,a=!0)}a&&this.fire(new l.k("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 Gt extends qt{constructor(e,n,a,o){super(e,n,a,o),n.coordinates?Array.isArray(n.coordinates)&&n.coordinates.length===4&&!n.coordinates.some(c=>!Array.isArray(c)||c.length!==2||c.some(g=>typeof g!="number"))||this.fire(new l.j(new l.a2(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new l.j(new l.a2(`sources.${e}`,null,'missing required property "coordinates"'))),n.animate&&typeof n.animate!="boolean"&&this.fire(new l.j(new l.a2(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),n.canvas?typeof n.canvas=="string"||n.canvas instanceof HTMLCanvasElement||this.fire(new l.j(new l.a2(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new l.j(new l.a2(`sources.${e}`,null,'missing required property "canvas"'))),this.options=n,this.animate=n.animate===void 0||n.animate}load(){return l._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new l.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const n=this.map.painter.context,a=n.gl;this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,ki.members)),this.boundsSegments||(this.boundsSegments=l.a0.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new Pt(n,this.canvas,a.RGBA,{premultiply:!0});let o=!1;for(const c in this.tiles){const g=this.tiles[c];g.state!=="loaded"&&(g.state="loaded",g.texture=this.texture,o=!0)}o&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}const Zt={},Ft=h=>{switch(h){case"geojson":return Oe;case"image":return qt;case"raster":return Le;case"raster-dem":return yt;case"vector":return Ee;case"video":return ei;case"canvas":return Gt}return Zt[h]},Be="RTLPluginLoaded";class Si extends l.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Wn()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(n=>{throw this.status="error",n})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return l._(this,arguments,void 0,function*(n,a=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=F.resolveURL(n),!this.url)throw new Error(`requested url ${n}
12 is invalid`);if(this.status==="unavailable"){if(!a)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return l._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new l.k(Be))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let ni=null;function Fi(){return ni||(ni=new Si),ni}class ar{constructor(e,n){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=l.a4(),this.uses=0,this.tileSize=n,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){const n=e+this.timeAdded;n<this.fadeEndTime||(this.fadeEndTime=n)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(e,n,a){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(o,c){const g={};if(!c)return g;for(const b of o){const k=b.layerIds.map(A=>c.getLayer(A)).filter(Boolean);if(k.length!==0){b.layers=k,b.stateDependentLayerIds&&(b.stateDependentLayers=b.stateDependentLayerIds.map(A=>k.filter(M=>M.id===A)[0]));for(const A of k)g[A.id]=b}}return g}(e.buckets,n.style),this.hasSymbolBuckets=!1;for(const o in this.buckets){const c=this.buckets[o];if(c instanceof l.a6){if(this.hasSymbolBuckets=!0,!a)break;c.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const o in this.buckets){const c=this.buckets[o];if(c instanceof l.a6&&c.hasRTLText){this.hasRTLText=!0,Fi().lazyLoad();break}}this.queryPadding=0;for(const o in this.buckets){const c=this.buckets[o];this.queryPadding=Math.max(this.queryPadding,n.style.getLayer(o).queryRadius(c))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new l.a5}unloadVectorData(){for(const e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(const a in this.buckets){const o=this.buckets[a];o.uploadPending()&&o.upload(e)}const n=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Pt(e,this.imageAtlas.image,n.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Pt(e,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,n,a,o,c,g,b,k,A,M){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:o,cameraQueryGeometry:c,scale:g,tileSize:this.tileSize,pixelPosMatrix:M,transform:k,params:b,queryPadding:this.queryPadding*A},e,n,a):{}}
vendor: 6,757 bytes, line 12
12querySourceFeatures(e,n){const a=this.latestFeatureIndex;if(!a||!a.rawTileData)return;const o=a.loadVTLayers(),c=n&&n.sourceLayer?n.sourceLayer:"",g=o._geojsonTileLayer||o[c];if(!g)return;const b=l.a7(n&&n.filter),{z:k,x:A,y:M}=this.tileID.canonical,D={z:k,x:A,y:M};for(let V=0;V<g.length;V++){const H=g.feature(V);if(b.needGeometry){const ne=l.a8(H,!0);if(!b.filter(new l.z(this.tileID.overscaledZ),ne,this.tileID.canonical))continue}else if(!b.filter(new l.z(this.tileID.overscaledZ),H))continue;const X=a.getId(H,c),Q=new l.a9(H,k,A,M,X);Q.tile=D,e.push(Q)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){const n=this.expirationTime;if(e.cacheControl){const a=l.aa(e.cacheControl);a["max-age"]&&(this.expirationTime=Date.now()+1e3*a["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){const a=Date.now();let o=!1;if(this.expirationTime>a)o=!1;else if(n)if(this.expirationTime<n)o=!0;else{const c=this.expirationTime-n;c?this.expirationTime=a+Math.max(c,3e4):o=!0}else o=!0;o?(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(e,n){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(e).length===0)return;const a=this.latestFeatureIndex.loadVTLayers();for(const o in this.buckets){if(!n.style.hasLayer(o))continue;const c=this.buckets[o],g=c.layers[0].sourceLayer||"_geojsonTileLayer",b=a[g],k=e[g];if(!b||!k||Object.keys(k).length===0)continue;c.update(k,b,this.imageAtlas&&this.imageAtlas.patternPositions||{});const A=n&&n.style&&n.style.getLayer(o);A&&(this.queryPadding=Math.max(this.queryPadding,A.queryRadius(c)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<F.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(e){this.symbolFadeHoldUntil=F.now()+e}setDependencies(e,n){const a={};for(const o of n)a[o]=!0;this.dependencies[e]=a}hasDependency(e,n){for(const a of e){const o=this.dependencies[a];if(o){for(const c of n)if(o[c])return!0}}return!1}}class Ve{constructor(e,n){this.max=e,this.onRemove=n,this.reset()}reset(){for(const e in this.data)for(const n of this.data[e])n.timeout&&clearTimeout(n.timeout),this.onRemove(n.value);return this.data={},this.order=[],this}add(e,n,a){const o=e.wrapped().key;this.data[o]===void 0&&(this.data[o]=[]);const c={value:n,timeout:void 0};if(a!==void 0&&(c.timeout=setTimeout(()=>{this.remove(e,c)},a)),this.data[o].push(c),this.order.push(o),this.order.length>this.max){const g=this._getAndRemoveByKey(this.order[0]);g&&this.onRemove(g)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){const n=this.data[e].shift();return n.timeout&&clearTimeout(n.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),n.value}getByKey(e){const n=this.data[e];return n?n[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,n){if(!this.has(e))return this;const a=e.wrapped().key,o=n===void 0?0:this.data[a].indexOf(n),c=this.data[a][o];return this.data[a].splice(o,1),c.timeout&&clearTimeout(c.timeout),this.data[a].length===0&&delete this.data[a],this.onRemove(c.value),this.order.splice(this.order.indexOf(a),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){const n=this._getAndRemoveByKey(this.order[0]);n&&this.onRemove(n)}return this}filter(e){const n=[];for(const a in this.data)for(const o of this.data[a])e(o.value)||n.push(o);for(const a of n)this.remove(a.value.tileID,a)}}class ft{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,n,a){const o=String(n);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][o]=this.stateChanges[e][o]||{},l.e(this.stateChanges[e][o],a),this.deletedStates[e]===null){this.deletedStates[e]={};for(const c in this.state[e])c!==o&&(this.deletedStates[e][c]=null)}else if(this.deletedStates[e]&&this.deletedStates[e][o]===null){this.deletedStates[e][o]={};for(const c in this.state[e][o])a[c]||(this.deletedStates[e][o][c]=null)}else for(const c in a)this.deletedStates[e]&&this.deletedStates[e][o]&&this.deletedStates[e][o][c]===null&&delete this.deletedStates[e][o][c]}removeFeatureState(e,n,a){if(this.deletedStates[e]===null)return;const o=String(n);if(this.deletedStates[e]=this.deletedStates[e]||{},a&&n!==void 0)this.deletedStates[e][o]!==null&&(this.deletedStates[e][o]=this.deletedStates[e][o]||{},this.deletedStates[e][o][a]=null);else if(n!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][o])for(a in this.deletedStates[e][o]={},this.stateChanges[e][o])this.deletedStates[e][o][a]=null;else this.deletedStates[e][o]=null;else this.deletedStates[e]=null}getState(e,n){const a=String(n),o=l.e({},(this.state[e]||{})[a],(this.stateChanges[e]||{})[a]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){const c=this.deletedStates[e][n];if(c===null)return{};for(const g in c)delete o[g]}return o}initializeTileState(e,n){e.setFeatureState(this.state,n)}coalesceChanges(e,n){const a={};for(const o in this.stateChanges){this.state[o]=this.state[o]||{};const c={};for(const g in this.stateChanges[o])this.state[o][g]||(this.state[o][g]={}),l.e(this.state[o][g],this.stateChanges[o][g]),c[g]=this.state[o][g];a[o]=c}for(const o in this.deletedStates){this.state[o]=this.state[o]||{};const c={};if(this.deletedStates[o]===null)for(const g in this.state[o])c[g]={},this.state[o][g]={};else for(const g in this.deletedStates[o]){if(this.deletedStates[o][g]===null)this.state[o][g]={};else for(const b of Object.keys(this.deletedStates[o][g]))delete this.state[o][g][b];c[g]=this.state[o][g]}a[o]=a[o]||{},l.e(a[o],c)}if(this.stateChanges={},this.deletedStates={},Object.keys(a).length!==0)for(const o in e)e[o].setFeatureState(a,n)}}class ut extends l.E{constructor(e,n,a){super(),this.id=e,this.dispatcher=a,this.on("data",o=>this._dataHandler(o)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((o,c,g,b)=>{const k=new(Ft(c.type))(o,c,g,b);if(k.id!==o)throw new Error(`Expected Source id to be ${o} instead of ${k.id}`);return k})(e,n,a,this),this._tiles={},this._cache=new Ve(0,o=>this._unloadTile(o)),this._timers={},this._cacheTimers={}
12,this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new ft,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const e in this._tiles){const n=this._tiles[e];if(n.state!=="loaded"&&n.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,n,a){return l._(this,void 0,void 0,function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,n,a)}catch(o){e.state="errored",o.status!==404?this._source.fire(new l.j(o,{tile:e})):this.update(this.transform,this.terrain)}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new l.k("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const n in this._tiles){const a=this._tiles[n];a.upload(e),a.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(e=>e.tileID).sort(Wi).map(e=>e.key)}getRenderableIds(e){const n=[];for(const a in this._tiles)this._isIdRenderable(a,e)&&n.push(this._tiles[a]);return e?n.sort((a,o)=>{const c=a.tileID,g=o.tileID,b=new l.P(c.canonical.x,c.canonical.y)._rotate(this.transform.angle),k=new l.P(g.canonical.x,g.canonical.y)._rotate(this.transform.angle);return c.overscaledZ-g.overscaledZ||k.y-b.y||k.x-b.x}).map(a=>a.tileID.key):n.map(a=>a.tileID).sort(Wi).map(a=>a.key)}hasRenderableParent(e){const n=this.findLoadedParent(e,0);return!!n&&this._isIdRenderable(n.tileID.key)}_isIdRenderable(e,n){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(n||!this._tiles[e].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const e in this._tiles)this._tiles[e].state!=="errored"&&this._reloadTile(e,"reloading")}}_reloadTile(e,n){return l._(this,void 0,void 0,function*(){const a=this._tiles[e];a&&(a.state!=="loading"&&(a.state=n),yield this._loadTile(a,e,n))})}_tileLoaded(e,n,a){e.timeAdded=F.now(),a==="expired"&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(n,e),this.getSource().type==="raster-dem"&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new l.k("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){const n=this.getRenderableIds();for(let o=0;o<n.length;o++){const c=n[o];if(e.neighboringTiles&&e.neighboringTiles[c]){const g=this.getTileByID(c);a(e,g),a(g,e)}}function a(o,c){o.needsHillshadePrepare=!0,o.needsTerrainPrepare=!0;let g=c.tileID.canonical.x-o.tileID.canonical.x;const b=c.tileID.canonical.y-o.tileID.canonical.y,k=Math.pow(2,o.tileID.canonical.z),A=c.tileID.key;g===0&&b===0||Math.abs(b)>1||(Math.abs(g)>1&&(Math.abs(g+k)===1?g+=k:Math.abs(g-k)===1&&(g-=k)),c.dem&&o.dem&&(o.dem.backfillBorder(c.dem,g,b),o.neighboringTiles&&o.neighboringTiles[A]&&(o.neighboringTiles[A].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,n,a,o){for(const c in this._tiles){let g=this._tiles[c];if(o[c]||!g.hasData()||g.tileID.overscaledZ<=n||g.tileID.overscaledZ>a)continue;let b=g.tileID;for(;g&&g.tileID.overscaledZ>n+1;){const A=g.tileID.scaledTo(g.tileID.overscaledZ-1);g=this._tiles[A.key],g&&g.hasData()&&(b=A)}let k=b;for(;k.overscaledZ>n;)if(k=k.scaledTo(k.overscaledZ-1),e[k.key]){o[b.key]=b;break}}}findLoadedParent(e,n){if(e.key in this._loadedParentTiles){const a=this._loadedParentTiles[e.key];return a&&a.tileID.overscaledZ>=n?a:null}for(let a=e.overscaledZ-1;a>=n;a--){const o=e.scaledTo(a),c=this._getLoadedTile(o);if(c)return c}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){const n=this._tiles[e.key];return n&&n.hasData()?n:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){const n=Math.ceil(e.width/this._source.tileSize)+1,a=Math.ceil(e.height/this._source.tileSize)+1,o=Math.floor(n*a*(this._maxTileC
vendor: 19,145 bytes, line 12
12acheZoomLevels===null?l.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),c=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,o):o;this._cache.setMaxSize(c)}handleWrapJump(e){const n=Math.round((e-(this._prevLng===void 0?e:this._prevLng))/360);if(this._prevLng=e,n){const a={};for(const o in this._tiles){const c=this._tiles[o];c.tileID=c.tileID.unwrapTo(c.tileID.wrap+n),a[c.tileID.key]=c}this._tiles=a;for(const o in this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(const o in this._tiles)this._setTileReloadTimer(o,this._tiles[o])}}_updateCoveredAndRetainedTiles(e,n,a,o,c,g){const b={},k={},A=Object.keys(e),M=F.now();for(const D of A){const V=e[D],H=this._tiles[D];if(!H||H.fadeEndTime!==0&&H.fadeEndTime<=M)continue;const X=this.findLoadedParent(V,n),Q=this.findLoadedSibling(V),ne=X||Q||null;ne&&(this._addTile(ne.tileID),b[ne.tileID.key]=ne.tileID),k[D]=V}this._retainLoadedChildren(k,o,a,e);for(const D in b)e[D]||(this._coveredTiles[D]=!0,e[D]=b[D]);if(g){const D={},V={};for(const H of c)this._tiles[H.key].hasData()?D[H.key]=H:V[H.key]=H;for(const H in V){const X=V[H].children(this._source.maxzoom);this._tiles[X[0].key]&&this._tiles[X[1].key]&&this._tiles[X[2].key]&&this._tiles[X[3].key]&&(D[X[0].key]=e[X[0].key]=X[0],D[X[1].key]=e[X[1].key]=X[1],D[X[2].key]=e[X[2].key]=X[2],D[X[3].key]=e[X[3].key]=X[3],delete V[H])}for(const H in V){const X=V[H],Q=this.findLoadedParent(X,this._source.minzoom),ne=this.findLoadedSibling(X),se=Q||ne||null;if(se){D[se.tileID.key]=e[se.tileID.key]=se.tileID;for(const ue in D)D[ue].isChildOf(se.tileID)&&delete D[ue]}}for(const H in this._tiles)D[H]||(this._coveredTiles[H]=!0)}}update(e,n){if(!this._sourceLoaded||this._paused)return;let a;this.transform=e,this.terrain=n,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?a=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(M=>new l.S(M.canonical.z,M.wrap,M.canonical.z,M.canonical.x,M.canonical.y)):(a=e.coveringTiles({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:n}),this._source.hasTile&&(a=a.filter(M=>this._source.hasTile(M)))):a=[];const o=e.coveringZoomLevel(this._source),c=Math.max(o-ut.maxOverzooming,this._source.minzoom),g=Math.max(o+ut.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const M={};for(const D of a)if(D.canonical.z>this._source.minzoom){const V=D.scaledTo(D.canonical.z-1);M[V.key]=V;const H=D.scaledTo(Math.max(this._source.minzoom,Math.min(D.canonical.z,5)));M[H.key]=H}a=a.concat(Object.values(M))}const b=a.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,b&&this.fire(new l.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const k=this._updateRetainedTiles(a,o);Wr(this._source.type)&&this._updateCoveredAndRetainedTiles(k,c,g,o,a,n);for(const M in k)this._tiles[M].clearFadeHold();const A=l.ab(this._tiles,k);for(const M of A){const D=this._tiles[M];D.hasSymbolBuckets&&!D.holdingForFade()?D.setHoldDuration(this.map._fadeDuration):D.hasSymbolBuckets&&!D.symbolFadeFinished()||this._removeTile(M)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,n){var a;const o={},c={},g=Math.max(n-ut.maxOverzooming,this._source.minzoom),b=Math.max(n+ut.maxUnderzooming,this._source.minzoom),k={};for(const A of e){const M=this._addTile(A);o[A.key]=A,M.hasData()||n<this._source.maxzoom&&(k[A.key]=A)}this._retainLoadedChildren(k,n,b,o);for(const A of e){let M=this._tiles[A.key];if(M.hasData())continue;if(n+1>this._source.maxzoom){const V=A.children(this._source.maxzoom)[0],H=this.getTile(V);if(H&&H.hasData()){o[V.key]=V;continue}}else{const V=A.children(this._source.maxzoom);if(o[V[0].key]&&o[V[1].key]&&o[V[2].key]&&o[V[3].key])continue}let D=M.wasRequested();for(let V=A.overscaledZ-1;V>=g;--V){const H=A.scaledTo(V);if(c[H.key])break;if(c[H.key]=!0,M=this.getTile(H),!M&&D&&(M=this._addTile(H)),M){const X=M.hasData();if((X||!(!((a=this.map)===null||a===void 0)&&a.cancelPendingTileRequestsWhileZooming)||D)&&(o[H.key]=H),D=M.wasRequested(),X)break}}}return o}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const n=[];let a,o=this._tiles[e].tileID;for(;o.overscaledZ>0;){if(o.key in this._loadedParentTiles){a=this._loadedParentTiles[o.key];break}n.push(o.key);const c=o.scaledTo(o.overscaledZ-1);if(a=this._getLoadedTile(c),a)break;o=c}for(const c of n)this._loadedParentTiles[c]=a}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const e in this._tiles){const n=this._tiles[e].tileID,a=this._getLoadedTile(n);this._loadedSiblingTiles[n.key]=a}}_addTile(e){let n=this._tiles[e.key];if(n)return n;n=this._cache.getAndRemove(e),n&&(this._setTileReloadTimer(e.key,n),n.tileID=e,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,n)));const a=n;return n||(n=new ar(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(n,e.key,n.state)),n.uses++,this._tiles[e.key]=n,a||this._source.fire(new l.k("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n}_setTileReloadTimer(e,n){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const a=n.getExpiryTimeout();a&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},a))}_removeTile(e){const n=this._tiles[e];n&&(n.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),n.uses>0||(n.hasData()&&n.state!=="reloading"?this._cache.add(n.tileID,n,n.getExpiryTimeout()):(n.aborted=!0,this._abortTile(n),this._unloadTile(n))))}_dataHandler(e){const n=e.sourceDataType;e.dataType==="source"&&n==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&e.dataType==="source"&&n==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,n,a){const o=[],c=this.transform;if(!c)return o;const g=a?c.getCameraQueryGeometry(e):e,b=e.map(X=>c.pointCoordinate(X,this.terrain)),k=g.map(X=>c.pointCoordinate(X,this.terrain)),A=this.getIds();let M=1/0,D=1/0,V=-1/0,H=-1/0;for(const X of k)M=Math.min(M,X.x),D=Math.min(D,X.y),V=Math.max(V,X.x),H=Math.max(H,X.y);for(let X=0;X<A.length;X++){const Q=this._tiles[A[X]];if(Q.holdingForFade())continue;const ne=Q.tileID,se=Math.pow(2,c.zoom-Q.tileID.overscaledZ),ue=n*Q.queryPadding*l.X/Q.tileSize/se,Y=[ne.getTilePoint(new l.Z(M,D)),ne.getTilePoint(new l.Z(V,H))];if(Y[0].x-ue<l.X&&Y[0].y-ue<l.X&&Y[1].x+ue>=0&&Y[1].y+ue>=0){const me=b.map(Se=>ne.getTilePoint(Se)),ve=k.map(Se=>ne.getTilePoint(Se));o.push({tile:Q,tileID:ne,queryGeometry:me,cameraQueryGeometry:ve,scale:se})}}return o}getVisibleCoordinates(e){const n=this.getRenderableIds(e).map(a=>this._tiles[a].tileID);for(const a of n)a.posMatrix=this.transform.calculatePosMatrix(a.toUnwrapped());return n}hasTransition(){if(this._source.hasTransition())return!0;if(Wr(this._source.type)){const e=F.now();for(const n in this._tiles)if(this._tiles[n].fadeEndTime>=e)return!0}return!1}setFeatureState(e,n,a){this._state.updateState(e=e||"_geojsonTileLayer",n,a)}removeFeatureState(e,n,a){this._state.removeFeatureState(e=e||"_geojsonTileLayer",n,a)}getFeatureState(e,n){return this._state.getState(e=e||"_geojsonTileLayer",n)}setDependencies(e,n,a){const o=this._tiles[e];o&&o.setDependencies(n,a)}reloadTilesForDependencies(e,n){for(const a in this._tiles)this._tiles[a].hasDependency(e,n)&&this._reloadTile(a,"reloading");this._cache.filter(a=>!a.hasDependency(e,n))}}function Wi(h,e){const n=Math.abs(2*h.wrap)-+(h.wrap<0),a=Math.abs(2*e.wrap)-+(e.wrap<0);return h.overscaledZ-e.overscaledZ||a-n||e.canonical.y-h.canonical.y||e.canonical.x-h.canonical.x}function Wr(h){return h==="raster"||h==="image"||h==="video"}ut.maxOverzooming=10,ut.maxUnderzooming=3;class It{constructor(e,n){this.reset(e,n)}reset(e,n){this.points=e||[],this._distances=[0];for(let a=1;a<this.points.length;a++)this._distances[a]=this._distances[a-1]+this.points[a].dist(this.points[a-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(n||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(e){if(this.points.length===1)return this.points[0];e=l.ac(e,0,1);let n=1,a=this._distances[n];const o=e*this.paddedLength+this.padding;for(;a<o&&n<this._distances.length;)a=this._distances[++n];const c=n-1,g=this._distances[c],b=a-g,k=b>0?(o-g)/b:0;return this.points[c].mult(1-k).add(this.points[n].mult(k))}}function pn(h,e){let n=!0;return h==="always"||h!=="never"&&e!=="never"||(n=!1),n}class Sn{constructor(e,n,a){const o=this.boxCells=[],c=this.circleCells=[];this.xCellCount=Math.ceil(e/a),this.yCellCount=Math.ceil(n/a);for(let g=0;g<this.xCellCount*this.yCellCount;g++)o.push([]),c.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=n,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/n,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,n,a,o,c){this._forEachCell(n,a,o,c,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(n),this.bboxes.push(a),this.bboxes.push(o),this.bboxes.push(c)}insertCircle(e,n,a,o){this._forEachCell(n-o,a-o,n+o,a+o,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(n),this.circles.push(a),this.circles.push(o)}_insertBoxCell(e,n,a,o,c,g){this.boxCells[c].push(g)}_insertCircleCell(e,n,a,o,c,g){this.circleCells[c].push(g)}_query(e,n,a,o,c,g,b){if(a<0||e>this.width||o<0||n>this.height)return[];const k=[];if(e<=0&&n<=0&&this.width<=a&&this.height<=o){if(c)return[{key:null,x1:e,y1:n,x2:a,y2:o}];for(let A=0;A<this.boxKeys.length;A++)k.push({key:this.boxKeys[A],x1:this.bboxes[4*A],y1:this.bboxes[4*A+1],x2:this.bboxes[4*A+2],y2:this.bboxes[4*A+3]});for(let A=0;A<this.circleKeys.length;A++){const M=this.circles[3*A],D=this.circles[3*A+1],V=this.circles[3*A+2];k.push({key:this.circleKeys[A],x1:M-V,y1:D-V,x2:M+V,y2:D+V})}}else this._forEachCell(e,n,a,o,this._queryCell,k,{hitTest:c,overlapMode:g,seenUids:{box:{},circle:{}}},b);return k}query(e,n,a,o){return this._query(e,n,a,o,!1,null)}hitTest(e,n,a,o,c,g){return this._query(e,n,a,o,!0,c,g).length>0}hitTestCircle(e,n,a,o,c){const g=e-a,b=e+a,k=n-a,A=n+a;if(b<0||g>this.width||A<0||k>this.height)return!1;const M=[];return this._forEachCell(g,k,b,A,this._queryCellCircle,M,{hitTest:!0,overlapMode:o,circle:{x:e,y:n,radius:a},seenUids:{box:{},circle:{}}},c),M.length>0}_queryCell(e,n,a,o,c,g,b,k){const{seenUids:A,hitTest:M,overlapMode:D}=b,V=this.boxCells[c];if(V!==null){const X=this.bboxes;for(const Q of V)if(!A.box[Q]){A.box[Q]=!0;const ne=4*Q,se=this.boxKeys[Q];if(e<=X[ne+2]&&n<=X[ne+3]&&a>=X[ne+0]&&o>=X[ne+1]&&(!k||k(se))&&(!M||!pn(D,se.overlapMode))&&(g.push({key:se,x1:X[ne],y1:X[ne+1],x2:X[ne+2],y2:X[ne+3]}),M))return!0}}const H=this.circleCells[c];if(H!==null){const X=this.circles;for(const Q of H)if(!A.circle[Q]){A.circle[Q]=!0;const ne=3*Q,se=this.circleKeys[Q];if(this._circleAndRectCollide(X[ne],X[ne+1],X[ne+2],e,n,a,o)&&(!k||k(se))&&(!M||!pn(D,se.overlapMode))){const ue=X[ne],Y=X[ne+1],me=X[ne+2];if(g.push({key:se,x1:ue-me,y1:Y-me,x2:ue+me,y2:Y+me}),M)return!0}}}return!1}_queryCellCircle(e,n,a,o,c,g,b,k){const{circle:A,seenUids:M,overlapMode:D}=b,V=this.boxCells[c];if(V!==null){const X=this.bboxes;for(const Q of V)if(!M.box[Q]){M.box[Q]=!0;const ne=4*Q,se=this.boxKeys[Q];if(this._circleAndRectCollide(A.x,A.y,A.radius,X[ne+0],X[ne+1],X[ne+2],X[ne+3])&&(!k||k(se))&&!pn(D,se.overlapMode))return g.push(!0),!0}}const H=this.circleCells[c];if(H!==null){const X=this.circles;for(const Q of H)if(!M.circle[Q]){M.circle[Q]=!0;const ne=3*Q,se=this.circleKeys[Q];if(this._circlesCollide(X[ne],X[ne+1],X[ne+2],A.x,A.y,A.radius)&&(!k||k(se))&&!pn(D,se.overlapMode))return g.push(!0),!0}}}_forEachCell(e,n,a,o,c,g,b,k){const A=this._convertToXCellCoord(e),M=this._convertToYCellCoord(n),D=this._convertToXCellCoord(a),V=this._convertToYCellCoord(o);for(let H=A;H<=D;H++)for(let X=M;X<=V;X++)if(c.call(this,e,n,a,o,this.xCellCount*X+H,g,b,k))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,n,a,o,c,g){const b=o-e,k=c-n,A=a+g;return A*A>b*b+k*k}_circleAndRectCollide(e,n,a,o,c,g,b){const k=(g-o)/2,A=Math.abs(e-(o+k));if(A>k+a)return!1;const M=(b-c)/2,D=Math.abs(n-(c+M));if(D>M+a)return!1;if(A<=k||D<=M)return!0;const V=A-k,H=D-M;return V*V+H*H<=a*a}}function Dn(h,e,n,a,o){const c=l.H();return e?(l.K(c,c,[1/o,1/o,1]),n||l.ad(c,c,a.angle)):l.L(c,a.labelPlaneMatrix,h),c}function fn(h,e,n,a,o){if(e){const c=l.ae(h);return l.K(c,c,[o,o,1]),n||l.ad(c,c,-a.angle),c}return a.glCoordMatrix}function te(h,e,n,a){let o;a?(o=[h,e,a(h,e),1],l.af(o,o,n)):(o=[h,e,0,1],Ht(o,o,n));const c=o[3];return{point:new l.P(o[0]/c,o[1]/c),signedDistanceFromCamera:c,isOccluded:!1}}function $(h,e){return .5+h/e*.5}function O(h,e){return h.x>=-e[0]&&h.x<=e[0]&&h.y>=-e[1]&&h.y<=e[1]}function Z(h,e,n,a,o,c,g,b,k,A,M,D,V,H,X){const Q=a?h.textSizeData:h.iconSizeData,ne=l.ag(Q,n.transform.zoom),se=[256/n.width*2+1,256/n.height*2+1],ue=a?h.text.dynamicLayoutVertexArray:h.icon.dynamicLayoutVertexArray;ue.clear();const Y=h.lineVertexArray,me=a?h.text.placedSymbolArray:h.icon.placedSymbolArray,ve=n.transform.width/n.transform.height;let Se=!1;for(let De=0;De<me.length;De++){const je=me.get(De);if(je.hidden||je.writingMode===l.ah.vertical&&!Se){vt(je.numGlyphs,ue);continue}Se=!1;const Qe=te(je.anchorX,je.anchorY,e,X);if(!O(Qe.point,se)){vt(je.numGlyphs,ue);continue}const nt=$(n.transform.cameraToCenterDistance,Qe.signedDistanceFromCamera),Xe=l.ai(Q,ne,je),We=g?Xe/nt:Xe*nt,ht={getElevation:X,labelPlaneMatrix:o,lineVertexArray:Y,pitchWithMap:g,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:A,tileAnchorPoint:new l.P(je.anchorX,je.anchorY),unwrappedTileID:M,width:D,height:V,translation:H},zt=_e(ht,je,We,!1,b,e,c,h.glyphOffsetArray,ue,ve,k);Se=zt.useVertical,(zt.notEnoughRoom||Se||zt.needsFlipping&&_e(ht,je,We,!0,b,e,c,h.glyphOffsetArray,ue,ve,k).notEnoughRoom)&&vt(je.numGlyphs,ue)}a?h.text.dynamicLayoutVertexBuffer.updateData(ue):h.icon.dynamicLayoutVertexBuffer.updateData(ue)}function J(h,e,n,a,o,c,g,b){const k=c.glyphStartIndex+c.numGlyphs,A=c.lineStartIndex,M=c.lineStartIndex+c.lineLength,D=e.getoffsetX(c.glyphStartIndex),V=e.getoffsetX(k-1),H=He(h*D,n,a,o,c.segment,A,M,b,g);if(!H)return null;const X=He(h*V,n,a,o,c.segment,A,M,b,g);return X?b.projectionCache.anyProjectionOccluded?null:{first:H,last:X}:null}function he(h,e,n,a){return h===l.ah.horizontal&&Math.abs(n.y-e.y)>Math.abs(n.x-e.x)*a?{useVertical:!0}:(h===l.ah.vertical?e.y<n.y:e.x>n.x)?{needsFlipping:!0}:null}function _e(h,e,n,a,o,c,g,b,k,A,M){const D=n/24,V=e.lineOffsetX*D,H=e.lineOffsetY*D;let X;if(e.numGlyphs>1){const Q=e.glyphStartIndex+e.numGlyphs,ne=e.lineStartIndex,se=e.lineStartIndex+e.lineLength,ue=J(D,b,V,H,a,e,M,h);if(!ue)return{notEnoughRoom:!0};const Y=te(ue.first.point.x,ue.first.point.y,g,h.getElevation).point,me=te(ue.last.point.x,ue.last.point.y,g,h.getElevation).point;if(o&&!a){const ve=he(e.writingMode,Y,me,A);if(ve)return ve}X=[ue.first];for(let ve=e.glyphStartIndex+1;ve<Q-1;ve++)X.push(He(D*b.getoffsetX(ve),V,H,a,e.segment,ne,se,h,M));X.push(ue.last)}else{if(o&&!a){const ne=te(h.tileAnchorPoint.x,h.tileAnchorPoint.y,c,h.getElevation).point,se=e.lineStartIndex+e.segment+1,ue=new l.P(h.lineVertexArray.getx(se),h.lineVertexArray.gety(se)),Y=te(ue.x,ue.y,c,h.getElevation),me=Y.signedDistanceFromCamera>0?Y.point:function(Se,De,je,Qe,nt,Xe){return we(Se,De,je,1,nt,Xe)}(h.tileAnchorPoint,ue,ne,0,c,h),ve=he(e.writingMode,ne,me,A);if(ve)return ve}const Q=He(D*b.getoffsetX(e.glyphStartIndex),V,H,a,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,h,M);if(!Q||h.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};X=[Q]}for(const Q of X)l.aj(k,Q.point,Q.angle);return{}}function we(h,e,n,a,o,c){const g=h.add(h.sub(e)._unit()),b=o!==void 0?te(g.x,g.y,o,c.getElevation).point:Ie(g.x,g.y,c).point,k=n.sub(b);return n.add(k._mult(a/k.mag()))}function oe(h,e,n){const a=e.projectionCache;if(a.projections[h])return a.projections[h];const o=new l.P(e.lineVertexArray.getx(h),e.lineVertexArray.gety(h)),c=Ie(o.x,o.y,e);if(c.signedDistanceFromCamera>0)return a.projections[h]=c.point,a.anyProjectionOccluded=a.anyProjectionOccluded||c.isOccluded,c.point;const g=h-n.direction;return function(b,k,A,M,D){return we(b,k,A,M,void 0,D)}(n.distanceFromAnchor===0?e.tileAnchorPoint:new l.P(e.lineVertexArray.getx(g),e.lineVertexArray.gety(g)),o,n.previousVertex,n.absOffsetX-n.distanceFromAnchor+1,e)}function Ie(h,e,n){const a=h+n.translation[0],o=e+n.translation[1];let c;return!n.pitchWithMap&&n.projection.useSpecialProjectionForSymbols?(c=n.projection.projectTileCoordinates(a,o,n.unwrappedTileID,n.getElevation),c.point.x=(.5*c.point.x+.5)*n.width,c.point.y=(.5*-c.point.y+.5)*n.height):(c=te(a,o,n.labelPlaneMatrix,n.getElevation),c.isOccluded=!1),c}function Re(h,e,n){return h._unit()._perp()._mult(e*n)}function ze(h,e,n,a,o,c,g,b,k){if(b.projectionCache.offsets[h])return b.projectionCache.offsets[h];const A=n.add(e);if(h+k.direction<a||h+k.direction>=o)return b.projectionCache.offsets[h]=A,A;const M=oe(h+k.direction,b,k),D=Re(M.sub(n),g,k.direction),V=n.add(D),H=M.add(D);return b.projectionCache.offsets[h]=l.ak(c,A,V,H)||A,b.projectionCache.offsets[h]}function He(h,e,n,a,o,c,g,b,k){const A=a?h-e:h+e;let M=A>0?1:-1,D=0;a&&(M*=-1,D=Math.PI),M<0&&(D+=Math.PI);let V,H=M>0?c+o:c+o+1;b.projectionCache.cachedAnchorPoint?V=b.projectionCache.cachedAnchorPoint:(V=Ie(b.tileAnchorPoint.x,b.tileAnchorPoint.y,b).point,b.projectionCache.cachedAnchorPoint=V);let X,Q,ne=V,se=V,ue=0,Y=0;const me=Math.abs(A),ve=[];let Se;for(;ue+Y<=me;){if(H+=M,H<c||H>=g)return null;ue+=Y,se=ne,Q=X;const Qe={absOffsetX:me,direction:M,distanceFromAnchor:ue,previousVertex:se};if(ne=oe(H,b,Qe),n===0)ve.push(se),Se=ne.sub(se);else{let nt;const Xe=ne.sub(se);nt=Xe.mag()===0?Re(oe(H+M,b,Qe).sub(ne),n,M):Re(Xe,n,M),Q||(Q=se.add(nt)),X=ze(H,nt,ne,c,g,Q,n,b,Qe),ve.push(Q),Se=X.sub(Q)}Y=Se.mag()}const De=Se._mult((me-ue)/Y)._add(Q||se),je=D+Math.atan2(ne.y-se.y,ne.x-se.x);return ve.push(De),{point:De,angle:k?je:0,path:ve}}const gt=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function vt(h,e){for(let n=0;n<h;n++){const a=e.length;e.resize(a+4),e.float32.set(gt,3*a)}}function Ht(h,e,n){const a=e[0],o=e[1];
12return h[0]=n[0]*a+n[4]*o+n[12],h[1]=n[1]*a+n[5]*o+n[13],h[3]=n[3]*a+n[7]*o+n[15],h}const Mt=100;class Wt{constructor(e,n,a=new Sn(e.width+200,e.height+200,25),o=new Sn(e.width+200,e.height+200,25)){this.transform=e,this.mapProjection=n,this.grid=a,this.ignoredGrid=o,this.pitchFactor=Math.cos(e._pitch)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+Mt,this.screenBottomBoundary=e.height+Mt,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,n,a,o,c,g,b,k,A,M,D){const V=e.anchorPointX+k[0],H=e.anchorPointY+k[1],X=this.projectAndGetPerspectiveRatio(o,V,H,c,M),Q=a*X.perspectiveRatio;let ne;if(g||b)ne=this._projectCollisionBox(e,Q,o,c,g,b,k,X,M,D);else{const ve=X.point.x+(D?D.x*Q:0),Se=X.point.y+(D?D.y*Q:0);ne={allPointsOccluded:!1,box:[ve+e.x1*Q,Se+e.y1*Q,ve+e.x2*Q,Se+e.y2*Q]}}const[se,ue,Y,me]=ne.box;return this.mapProjection.useSpecialProjectionForSymbols&&(g?ne.allPointsOccluded:this.mapProjection.isOccluded(V,H,c))||X.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(se,ue,Y,me)||n!=="always"&&this.grid.hitTest(se,ue,Y,me,n,A)?{box:[se,ue,Y,me],placeable:!1,offscreen:!1}:{box:[se,ue,Y,me],placeable:!0,offscreen:this.isOffscreen(se,ue,Y,me)}}placeCollisionCircles(e,n,a,o,c,g,b,k,A,M,D,V,H,X,Q,ne){const se=[],ue=new l.P(n.anchorX,n.anchorY),Y=this.getPerspectiveRatio(g,ue.x,ue.y,b,ne),me=(D?c/Y:c*Y)/l.ap,ve={getElevation:ne,labelPlaneMatrix:k,lineVertexArray:a,pitchWithMap:D,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:ue,unwrappedTileID:b,width:this.transform.width,height:this.transform.height,translation:Q},Se=J(me,o,n.lineOffsetX*me,n.lineOffsetY*me,!1,n,!1,ve);let De=!1,je=!1,Qe=!0;if(Se){const nt=.5*H*Y+X,Xe=new l.P(-100,-100),We=new l.P(this.screenRightBoundary,this.screenBottomBoundary),ht=new It,zt=Se.first,Ye=Se.last;let it=[];for(let Dt=zt.path.length-1;Dt>=1;Dt--)it.push(zt.path[Dt]);for(let Dt=1;Dt<Ye.path.length;Dt++)it.push(Ye.path[Dt]);const St=2.5*nt;if(A){const Dt=this.projectPathToScreenSpace(it,ve,A);it=Dt.some(jt=>jt.signedDistanceFromCamera<=0)?[]:Dt.map(jt=>jt.point)}let gi=[];if(it.length>0){const Dt=it[0].clone(),jt=it[0].clone();for(let _i=1;_i<it.length;_i++)Dt.x=Math.min(Dt.x,it[_i].x),Dt.y=Math.min(Dt.y,it[_i].y),jt.x=Math.max(jt.x,it[_i].x),jt.y=Math.max(jt.y,it[_i].y);gi=Dt.x>=Xe.x&&jt.x<=We.x&&Dt.y>=Xe.y&&jt.y<=We.y?[it]:jt.x<Xe.x||Dt.x>We.x||jt.y<Xe.y||Dt.y>We.y?[]:l.al([it],Xe.x,Xe.y,We.x,We.y)}for(const Dt of gi){ht.reset(Dt,.25*nt);let jt=0;jt=ht.length<=.5*nt?1:Math.ceil(ht.paddedLength/St)+1;for(let _i=0;_i<jt;_i++){const Ki=_i/Math.max(jt-1,1),en=ht.lerp(Ki),yi=en.x+Mt,gr=en.y+Mt;se.push(yi,gr,nt,0);const lr=yi-nt,Yi=gr-nt,ur=yi+nt,yn=gr+nt;if(Qe=Qe&&this.isOffscreen(lr,Yi,ur,yn),je=je||this.isInsideGrid(lr,Yi,ur,yn),e!=="always"&&this.grid.hitTestCircle(yi,gr,nt,e,V)&&(De=!0,!M))return{circles:[],offscreen:!1,collisionDetected:De}}}}return{circles:!M&&De||!je||Y<this.perspectiveRatioCutoff?[]:se,offscreen:Qe,collisionDetected:De}}projectPathToScreenSpace(e,n,a){return e.map(o=>te(o.x,o.y,a,n.getElevation))}queryRenderedSymbols(e){if(e.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const n=[];let a=1/0,o=1/0,c=-1/0,g=-1/0;for(const M of e){const D=new l.P(M.x+Mt,M.y+Mt);a=Math.min(a,D.x),o=Math.min(o,D.y),c=Math.max(c,D.x),g=Math.max(g,D.y),n.push(D)}const b=this.grid.query(a,o,c,g).concat(this.ignoredGrid.query(a,o,c,g)),k={},A={};for(const M of b){const D=M.key;if(k[D.bucketInstanceId]===void 0&&(k[D.bucketInstanceId]={}),k[D.bucketInstanceId][D.featureIndex])continue;const V=[new l.P(M.x1,M.y1),new l.P(M.x2,M.y1),new l.P(M.x2,M.y2),new l.P(M.x1,M.y2)];l.am(n,V)&&(k[D.bucketInstanceId][D.featureIndex]=!0,A[D.bucketInstanceId]===void 0&&(A[D.bucketInstanceId]=[]),A[D.bucketInstanceId].push(D.featureIndex))}return A}insertCollisionBox(e,n,a,o,c,g){(a?this.ignoredGrid:this.grid).insert({bucketInstanceId:o,featureIndex:c,collisionGroupID:g,overlapMode:n},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,n,a,o,c,g){const b=a?this.ignoredGrid:this.grid,k={bucketInstanceId:o,featureIndex:c,collisionGroupID:g,overlapMode:n};for(let A=0;A<e.length;
vendor: 4,617 bytes, line 12
12A+=4)b.insertCircle(k,e[A],e[A+1],e[A+2])}projectAndGetPerspectiveRatio(e,n,a,o,c){let g;c?(g=[n,a,c(n,a),1],l.af(g,g,e)):(g=[n,a,0,1],Ht(g,g,e));const b=g[3];return{point:new l.P((g[0]/b+1)/2*this.transform.width+Mt,(-g[1]/b+1)/2*this.transform.height+Mt),perspectiveRatio:.5+this.transform.cameraToCenterDistance/b*.5,isOccluded:!1,signedDistanceFromCamera:b}}getPerspectiveRatio(e,n,a,o,c){const g=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(n,a,o,c):te(n,a,e,c);return .5+this.transform.cameraToCenterDistance/g.signedDistanceFromCamera*.5}isOffscreen(e,n,a,o){return a<Mt||e>=this.screenRightBoundary||o<Mt||n>this.screenBottomBoundary}isInsideGrid(e,n,a,o){return a>=0&&e<this.gridRightBoundary&&o>=0&&n<this.gridBottomBoundary}getViewportMatrix(){const e=l.an([]);return l.J(e,e,[-100,-100,0]),e}_projectCollisionBox(e,n,a,o,c,g,b,k,A,M){let D=new l.P(1,0),V=new l.P(0,1);const H=new l.P(e.anchorPointX+b[0],e.anchorPointY+b[1]);if(g&&!c){const Qe=this.projectAndGetPerspectiveRatio(a,H.x+1,H.y,o,A).point.sub(k.point).unit(),nt=Math.atan(Qe.y/Qe.x)+(Qe.x<0?Math.PI:0),Xe=Math.sin(nt),We=Math.cos(nt);D=new l.P(We,Xe),V=new l.P(-Xe,We)}else if(!g&&c){const Qe=-this.transform.angle,nt=Math.sin(Qe),Xe=Math.cos(Qe);D=new l.P(Xe,nt),V=new l.P(-nt,Xe)}let X=k.point,Q=n;if(c){X=H;const Qe=this.transform.zoom-Math.floor(this.transform.zoom);Q=Math.pow(2,-Qe),Q*=this.mapProjection.getPitchedTextCorrection(this.transform,H,o),M||(Q*=l.ac(.5+k.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}M&&(X=X.add(D.mult(M.x*Q)).add(V.mult(M.y*Q)));const ne=e.x1*Q,se=e.x2*Q,ue=(ne+se)/2,Y=e.y1*Q,me=e.y2*Q,ve=(Y+me)/2,Se=[{offsetX:ne,offsetY:Y},{offsetX:ue,offsetY:Y},{offsetX:se,offsetY:Y},{offsetX:se,offsetY:ve},{offsetX:se,offsetY:me},{offsetX:ue,offsetY:me},{offsetX:ne,offsetY:me},{offsetX:ne,offsetY:ve}];let De=[];for(const{offsetX:Qe,offsetY:nt}of Se)De.push(new l.P(X.x+D.x*Qe+V.x*nt,X.y+D.y*Qe+V.y*nt));let je=!1;if(c){const Qe=De.map(nt=>this.projectAndGetPerspectiveRatio(a,nt.x,nt.y,o,A));je=Qe.some(nt=>!nt.isOccluded),De=Qe.map(nt=>nt.point)}else je=!0;return{box:l.ao(De),allPointsOccluded:!je}}}function $t(h,e,n){return e*(l.X/(h.tileSize*Math.pow(2,n-h.tileID.overscaledZ)))}class Li{constructor(e,n,a,o){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?n:-n))):o&&a?1:0,this.placed=a}isHidden(){return this.opacity===0&&!this.placed}}class Ti{constructor(e,n,a,o,c){this.text=new Li(e?e.text:null,n,a,c),this.icon=new Li(e?e.icon:null,n,o,c)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Rt{constructor(e,n,a){this.text=e,this.icon=n,this.skipFade=a}}class ti{constructor(){this.invProjMatrix=l.H(),this.viewportMatrix=l.H(),this.circles=[]}}class bi{constructor(e,n,a,o,c){this.bucketInstanceId=e,this.featureIndex=n,this.sourceLayerIndex=a,this.bucketIndex=o,this.tileID=c}}class $i{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){const n=++this.maxGroupID;this.collisionGroups[e]={ID:n,predicate:a=>a.collisionGroupID===n}}return this.collisionGroups[e]}}function Gi(h,e,n,a,o){const{horizontalAlign:c,verticalAlign:g}=l.au(h);return new l.P(-(c-.5)*e+a[0]*o,-(g-.5)*n+a[1]*o)}class or{constructor(e,n,a,o,c,g){this.transform=e.clone(),this.terrain=a,this.collisionIndex=new Wt(this.transform,n),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=o,this.retainedQueryData={},this.collisionGroups=new $i(c),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=g,g&&(g.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){const n=this.terrain;return n?(a,o)=>n.getElevation(e,a,o):null}getBucketParts(e,n,a,o){const c=a.getBucket(n),g=a.latestFeatureIndex;if(!c||!g||n.id!==c.layerIds[0])return;const b=a.collisionBoxArray,k=c.layers[0].layout,A=c.layers[0].paint,M=Math.pow(2,this.transform.zoom-a.tileID.overscaledZ),D=a.tileSize/l.X,V=a.tileID.toUnwrapped(),H=this.transform.calculatePosMatrix(V),X=k.get("text-pitch-alignment")==="map",Q=k.get("text-rotation-alignment")==="map",ne=$t(a,1,this.transform.zoom),se=this.collisionIndex.mapProjection.translatePosition(this.transform,a,A.get("text-translate"),A.get("text-translate-anchor")),ue=this.collisionIndex.mapProjection.translatePosition(this.transform,a,A.get("icon-translate"),A.get("icon-translate-anchor")),Y=Dn(H,X,Q,this.transform,ne);let me=null;if(X){const Se=fn(H,X,Q,this.transform,ne);
12me=l.L([],this.transform.labelPlaneMatrix,Se)}this.retainedQueryData[c.bucketInstanceId]=new bi(c.bucketInstanceId,g,c.sourceLayerIndex,c.index,a.tileID);const ve={bucket:c,layout:k,translationText:se,translationIcon:ue,posMatrix:H,unwrappedTileID:V,textLabelPlaneMatrix:Y,labelToScreenMatrix:me,scale:M,textPixelRatio:D,holdingForFade:a.holdingForFade(),collisionBoxArray:b,partiallyEvaluatedTextSize:l.ag(c.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(c.sourceID)};if(o)for(const Se of c.sortKeyRanges){const{sortKey:De,symbolInstanceStart:je,symbolInstanceEnd:Qe}=Se;e.push({sortKey:De,symbolInstanceStart:je,symbolInstanceEnd:Qe,parameters:ve})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:c.symbolInstances.length,parameters:ve})}attemptAnchorPlacement(e,n,a,o,c,g,b,k,A,M,D,V,H,X,Q,ne,se,ue,Y){const me=l.aq[e.textAnchor],ve=[e.textOffset0,e.textOffset1],Se=Gi(me,a,o,ve,c),De=this.collisionIndex.placeCollisionBox(n,V,k,A,M,b,g,ne,D.predicate,Y,Se);if((!ue||this.collisionIndex.placeCollisionBox(ue,V,k,A,M,b,g,se,D.predicate,Y,Se).placeable)&&De.placeable){let je;if(this.prevPlacement&&this.prevPlacement.variableOffsets[H.crossTileID]&&this.prevPlacement.placements[H.crossTileID]&&this.prevPlacement.placements[H.crossTileID].text&&(je=this.prevPlacement.variableOffsets[H.crossTileID].anchor),H.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[H.crossTileID]={textOffset:ve,width:a,height:o,anchor:me,textBoxScale:c,prevAnchor:je},this.markUsedJustification(X,me,H,Q),X.allowVerticalPlacement&&(this.markUsedOrientation(X,Q,H),this.placedOrientations[H.crossTileID]=Q),{shift:Se,placedGlyphBoxes:De}}}placeLayerBucketPart(e,n,a){const{bucket:o,layout:c,translationText:g,translationIcon:b,posMatrix:k,unwrappedTileID:A,textLabelPlaneMatrix:M,labelToScreenMatrix:D,textPixelRatio:V,holdingForFade:H,collisionBoxArray:X,partiallyEvaluatedTextSize:Q,collisionGroup:ne}=e.parameters,se=c.get("text-optional"),ue=c.get("icon-optional"),Y=l.ar(c,"text-overlap","text-allow-overlap"),me=Y==="always",ve=l.ar(c,"icon-overlap","icon-allow-overlap"),Se=ve==="always",De=c.get("text-rotation-alignment")==="map",je=c.get("text-pitch-alignment")==="map",Qe=c.get("icon-text-fit")!=="none",nt=c.get("symbol-z-order")==="viewport-y",Xe=me&&(Se||!o.hasIconData()||ue),We=Se&&(me||!o.hasTextData()||se);!o.collisionArrays&&X&&o.deserializeCollisionBoxes(X);const ht=this._getTerrainElevationFunc(this.retainedQueryData[o.bucketInstanceId].tileID),zt=(Ye,it,St)=>{var gi,Dt;if(n[Ye.crossTileID])return;if(H)return void(this.placements[Ye.crossTileID]=new Rt(!1,!1,!1));let jt=!1,_i=!1,Ki=!0,en=null,yi={box:null,placeable:!1,offscreen:null},gr={placeable:!1},lr=null,Yi=null,ur=null,yn=0,Us=0,ko=0;it.textFeatureIndex?yn=it.textFeatureIndex:Ye.useRuntimeCollisionCircles&&(yn=Ye.featureIndex),it.verticalTextFeatureIndex&&(Us=it.verticalTextFeatureIndex);const Gs=it.textBox;if(Gs){const Nr=qi=>{let Ji=l.ah.horizontal;if(o.allowVerticalPlacement&&!qi&&this.prevPlacement){const Er=this.prevPlacement.placedOrientations[Ye.crossTileID];Er&&(this.placedOrientations[Ye.crossTileID]=Er,Ji=Er,this.markUsedOrientation(o,Ji,Ye))}return Ji},Ur=(qi,Ji)=>{if(o.allowVerticalPlacement&&Ye.numVerticalGlyphVertices>0&&it.verticalTextBox){for(const Er of o.writingModes)if(Er===l.ah.vertical?(yi=Ji(),gr=yi):yi=qi(),yi&&yi.placeable)break}else yi=qi()},Bn=Ye.textAnchorOffsetStartIndex,tn=Ye.textAnchorOffsetEndIndex;if(tn===Bn){const qi=(Ji,Er)=>{const Ut=this.collisionIndex.placeCollisionBox(Ji,Y,V,k,A,je,De,g,ne.predicate,ht);return Ut&&Ut.placeable&&(this.markUsedOrientation(o,Er,Ye),this.placedOrientations[Ye.crossTileID]=Er),Ut};Ur(()=>qi(Gs,l.ah.horizontal),()=>{const Ji=it.verticalTextBox;return o.allowVerticalPlacement&&Ye.numVerticalGlyphVertices>0&&Ji?qi(Ji,l.ah.vertical):{box:null,offscreen:null}}),Nr(yi&&yi.placeable)}else{let qi=l.aq[(Dt=(gi=this.prevPlacement)===null||gi===void 0?void 0:gi.variableOffsets[Ye.crossTileID])===null||Dt===void 0?void 0:Dt.anchor];const Ji=(Ut,os,qs)=>{const Zs=Ut.x2-Ut.x1,Hu=Ut.y2-Ut.y1,_h=Ye.textBoxScale,Wu=Qe&&ve==="never"?os:null;let Fn=null,Xu=Y==="never"?1:2,To="never";qi&&Xu++;for(let Ma=0;Ma<Xu;Ma++){for(let zo=Bn;zo<tn;zo++){const Co=o.textAnchorOffsets.get(zo);if(qi&&Co.textAnchor!==qi)continue;const Hs=this.attemptAnchorPlacement(Co,Ut,Zs,Hu,_h,De,je,V,k,A,ne,To,Ye,o,qs,g,b,Wu,ht);if(Hs&&(Fn=Hs.placedGlyphBoxes,Fn&&Fn.placeable))return jt=!0,en=Hs.shift,Fn}qi?qi=null:To=Y}return a&&!Fn&&(Fn={box:this.collisionIndex.placeCollisionBox(Gs,"always",V,k,A,je,De,g,ne.predicate,ht,new l.P(0,0)).box,offscreen:!1,placeable:!1}),Fn};Ur(()=>Ji(Gs,it.iconBox,l.ah.horizontal),()=>{const Ut=it.verticalTextBox;return o.allowVerticalPlacement&&(!yi||!yi.placeable)&&Ye.numVerticalGlyphVertices>0&&Ut?Ji(Ut,it.verticalIconBox,l.ah.vertical):{box:null,occluded:!0,offscreen:null}}),yi&&(jt=yi.placeable,Ki=yi.offscreen);const Er=Nr(yi&&yi.placeable);if(!jt&&this.prevPlacement){const Ut=this.prevPlacement.variableOffsets[Ye.crossTileID];Ut&&(this.variableOffsets[Ye.crossTileID]=Ut,this.markUsedJustification(o,Ut.anchor,Ye,Er))}}}if(lr=yi,jt=lr&&lr.placeable,Ki=lr&&lr.offscreen,Ye.useRuntimeCollisionCircles){const Nr=o.text.placedSymbolArray.get(Ye.centerJustifiedTextSymbolIndex),Ur=l.ai(o.textSizeData,Q,Nr),Bn=c.get("text-padding");Yi=this.collisionIndex.placeCollisionCircles(Y,Nr,o.lineVertexArray,o.glyphOffsetArray,Ur,k,A,M,D,a,je,ne.predicate,Ye.collisionCircleDiameter,Bn,g,ht),Yi.circles.length&&Yi.collisionDetected&&!a&&l.w("Collisions detected, but collision boxes are not shown"),jt=me||Yi.circles.length>0&&!Yi.collisionDetected,Ki=Ki&&Yi.offscreen}if(it.iconFeatureIndex&&(ko=it.iconFeatureIndex),it.iconBox){const Nr=Ur=>this.collisionIndex.placeCollisionBox(Ur,ve,V,k,A,je,De,b,ne.predicate,ht,Qe&&en?en:void 0);gr&&gr.placeable&&it.verticalIconBox?(ur=Nr(it.verticalIconBox),_i=ur.placeable):(ur=Nr(it.iconBox),_i=ur.placeable),Ki=Ki&&ur.offscreen}const Vr=se||Ye.numHorizontalGlyphVertices===0&&Ye.numVerticalGlyphVertices===0,So=ue||Ye.numIconVertices===0;Vr||So?So?Vr||(_i=_i&&jt):jt=_i&&jt:_i=jt=_i&&jt;
vendor: 12,284 bytes, line 12
12const jl=_i&&ur.placeable;if(jt&&lr.placeable&&this.collisionIndex.insertCollisionBox(lr.box,Y,c.get("text-ignore-placement"),o.bucketInstanceId,gr&&gr.placeable&&Us?Us:yn,ne.ID),jl&&this.collisionIndex.insertCollisionBox(ur.box,ve,c.get("icon-ignore-placement"),o.bucketInstanceId,ko,ne.ID),Yi&&jt&&this.collisionIndex.insertCollisionCircles(Yi.circles,Y,c.get("text-ignore-placement"),o.bucketInstanceId,yn,ne.ID),a&&this.storeCollisionData(o.bucketInstanceId,St,it,lr,ur,Yi),Ye.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(o.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Ye.crossTileID]=new Rt(jt||Xe,_i||We,Ki||o.justReloaded),n[Ye.crossTileID]=!0};if(nt){if(e.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const Ye=o.getSortedSymbolIndexes(this.transform.angle);for(let it=Ye.length-1;it>=0;--it){const St=Ye[it];zt(o.symbolInstances.get(St),o.collisionArrays[St],St)}}else for(let Ye=e.symbolInstanceStart;Ye<e.symbolInstanceEnd;Ye++)zt(o.symbolInstances.get(Ye),o.collisionArrays[Ye],Ye);if(a&&o.bucketInstanceId in this.collisionCircleArrays){const Ye=this.collisionCircleArrays[o.bucketInstanceId];l.as(Ye.invProjMatrix,k),Ye.viewportMatrix=this.collisionIndex.getViewportMatrix()}o.justReloaded=!1}storeCollisionData(e,n,a,o,c,g){if(a.textBox||a.iconBox){let b,k;this.collisionBoxArrays.has(e)?b=this.collisionBoxArrays.get(e):(b=new Map,this.collisionBoxArrays.set(e,b)),b.has(n)?k=b.get(n):(k={text:null,icon:null},b.set(n,k)),a.textBox&&(k.text=o.box),a.iconBox&&(k.icon=c.box)}if(g){let b=this.collisionCircleArrays[e];b===void 0&&(b=this.collisionCircleArrays[e]=new ti);for(let k=0;k<g.circles.length;k+=4)b.circles.push(g.circles[k+0]),b.circles.push(g.circles[k+1]),b.circles.push(g.circles[k+2]),b.circles.push(g.collisionDetected?1:0)}}markUsedJustification(e,n,a,o){let c;c=o===l.ah.vertical?a.verticalPlacedTextSymbolIndex:{left:a.leftJustifiedTextSymbolIndex,center:a.centerJustifiedTextSymbolIndex,right:a.rightJustifiedTextSymbolIndex}[l.at(n)];const g=[a.leftJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.rightJustifiedTextSymbolIndex,a.verticalPlacedTextSymbolIndex];for(const b of g)b>=0&&(e.text.placedSymbolArray.get(b).crossTileID=c>=0&&b!==c?0:a.crossTileID)}markUsedOrientation(e,n,a){const o=n===l.ah.horizontal||n===l.ah.horizontalOnly?n:0,c=n===l.ah.vertical?n:0,g=[a.leftJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.rightJustifiedTextSymbolIndex];for(const b of g)e.text.placedSymbolArray.get(b).placedOrientation=o;a.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).placedOrientation=c)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const n=this.prevPlacement;let a=!1;this.prevZoomAdjustment=n?n.zoomAdjustment(this.transform.zoom):0;const o=n?n.symbolFadeChange(e):1,c=n?n.opacities:{},g=n?n.variableOffsets:{},b=n?n.placedOrientations:{};for(const k in this.placements){const A=this.placements[k],M=c[k];M?(this.opacities[k]=new Ti(M,o,A.text,A.icon),a=a||A.text!==M.text.placed||A.icon!==M.icon.placed):(this.opacities[k]=new Ti(null,o,A.text,A.icon,A.skipFade),a=a||A.text||A.icon)}for(const k in c){const A=c[k];if(!this.opacities[k]){const M=new Ti(A,o,!1,!1);M.isHidden()||(this.opacities[k]=M,a=a||A.text.placed||A.icon.placed)}}for(const k in g)this.variableOffsets[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.variableOffsets[k]=g[k]);for(const k in b)this.placedOrientations[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.placedOrientations[k]=b[k]);if(n&&n.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");a?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=n?n.lastPlacementChangeTime:e)}updateLayerOpacities(e,n){const a={};for(const o of n){const c=o.getBucket(e);c&&o.latestFeatureIndex&&e.id===c.layerIds[0]&&this.updateBucketOpacities(c,o.tileID,a,o.collisionBoxArray)}}updateBucketOpacities(e,n,a,o){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();const c=e.layers[0],g=c.layout,b=new Ti(null,0,!1,!1,!0),k=g.get("text-allow-overlap"),A=g.get("icon-allow-overlap"),M=c._unevaluatedLayout.hasValue("text-variable-anchor")||c._unevaluatedLayout.hasValue("text-variable-anchor-offset"),D=g.get("text-rotation-alignment")==="map",V=g.get("text-pitch-alignment")==="map",H=g.get("icon-text-fit")!=="none",X=new Ti(null,0,k&&(A||!e.hasIconData()||g.get("icon-optional")),A&&(k||!e.hasTextData()||g.get("text-optional")),!0);!e.collisionArrays&&o&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(o);const Q=(se,ue,Y)=>{for(let me=0;me<ue/4;me++)se.opacityVertexArray.emplaceBack(Y);se.hasVisibleVertices=se.hasVisibleVertices||Y!==ks},ne=this.collisionBoxArrays.get(e.bucketInstanceId);for(let se=0;se<e.symbolInstances.length;se++){const ue=e.symbolInstances.get(se),{numHorizontalGlyphVertices:Y,numVerticalGlyphVertices:me,crossTileID:ve}=ue;let Se=this.opacities[ve];a[ve]?Se=b:Se||(Se=X,this.opacities[ve]=Se),a[ve]=!0;const De=ue.numIconVertices>0,je=this.placedOrientations[ue.crossTileID],Qe=je===l.ah.vertical,nt=je===l.ah.horizontal||je===l.ah.horizontalOnly;if(Y>0||me>0){const We=Ar(Se.text);Q(e.text,Y,Qe?ks:We),Q(e.text,me,nt?ks:We);const ht=Se.text.isHidden();[ue.rightJustifiedTextSymbolIndex,ue.centerJustifiedTextSymbolIndex,ue.leftJustifiedTextSymbolIndex].forEach(it=>{it>=0&&(e.text.placedSymbolArray.get(it).hidden=ht||Qe?1:0)}),ue.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(ue.verticalPlacedTextSymbolIndex).hidden=ht||nt?1:0);const zt=this.variableOffsets[ue.crossTileID];zt&&this.markUsedJustification(e,zt.anchor,ue,je);const Ye=this.placedOrientations[ue.crossTileID];Ye&&(this.markUsedJustification(e,"left",ue,Ye),this.markUsedOrientation(e,Ye,ue))}if(De){const We=Ar(Se.icon),ht=!(H&&ue.verticalPlacedIconSymbolIndex&&Qe);ue.placedIconSymbolIndex>=0&&(Q(e.icon,ue.numIconVertices,ht?We:ks),e.icon.placedSymbolArray.get(ue.placedIconSymbolIndex).hidden=Se.icon.isHidden()),ue.verticalPlacedIconSymbolIndex>=0&&(Q(e.icon,ue.numVerticalIconVertices,ht?ks:We),e.icon.placedSymbolArray.get(ue.verticalPlacedIconSymbolIndex).hidden=Se.icon.isHidden())}const Xe=ne&&ne.has(se)?ne.get(se):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){const We=e.collisionArrays[se];if(We){let ht=new l.P(0,0);if(We.textBox||We.verticalTextBox){let zt=!0;if(M){const Ye=this.variableOffsets[ve];Ye?(ht=Gi(Ye.anchor,Ye.width,Ye.height,Ye.textOffset,Ye.textBoxScale),D&&ht._rotate(V?this.transform.angle:-this.transform.angle)):zt=!1}if(We.textBox||We.verticalTextBox){let Ye;We.textBox&&(Ye=Qe),We.verticalTextBox&&(Ye=nt),ws(e.textCollisionBox.collisionVertexArray,Se.text.placed,!zt||Ye,Xe.text,ht.x,ht.y)}}if(We.iconBox||We.verticalIconBox){const zt=!!(!nt&&We.verticalIconBox);let Ye;We.iconBox&&(Ye=zt),We.verticalIconBox&&(Ye=!zt),ws(e.iconCollisionBox.collisionVertexArray,Se.icon.placed,Ye,Xe.icon,H?ht.x:0,H?ht.y:0)}}}}if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);if(e.bucketInstanceId in this.collisionCircleArrays){const se=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=se.invProjMatrix,e.placementViewportMatrix=se.viewportMatrix,e.collisionCircleArray=se.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,n){const a=this.zoomAtLastRecencyCheck===n?1-this.zoomAdjustment(n):1;return this.zoomAtLastRecencyCheck=n,this.commitTime+this.fadeDuration*a>e}setStale(){this.stale=!0}}function ws(h,e,n,a,o,c){a&&a.length!==0||(a=[0,0,0,0]);const g=a[0]-Mt,b=a[1]-Mt,k=a[2]-Mt,A=a[3]-Mt;h.emplaceBack(e?1:0,n?1:0,o||0,c||0,g,b),h.emplaceBack(e?1:0,n?1:0,o||0,c||0,k,b),h.emplaceBack(e?1:0,n?1:0,o||0,c||0,k,A),h.emplaceBack(e?1:0,n?1:0,o||0,c||0,g,A)}const ii=Math.pow(2,25),Yo=Math.pow(2,24),Jo=Math.pow(2,17),zr=Math.pow(2,16),Cr=Math.pow(2,9),qc=Math.pow(2,8),Fr=Math.pow(2,1);function Ar(h){if(h.opacity===0&&!h.placed)return 0;if(h.opacity===1&&h.placed)return 4294967295;const e=h.placed?1:0,n=Math.floor(127*h.opacity);return n*ii+e*Yo+n*Jo+e*zr+n*Cr+e*qc+n*Fr+e}const ks=0;function Xn(){return{isOccluded:(h,e,n)=>!1,getPitchedTextCorrection:(h,e,n)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(h,e,n,a){throw new Error("Not implemented.")},translatePosition:(h,e,n,a)=>function(o,c,g,b,k=!1){if(!g[0]&&!g[1])return[0,0];const A=k?b==="map"?o.angle:0:b==="viewport"?-o.angle:0;if(A){const M=Math.sin(A),D=Math.cos(A);g=[g[0]*D-g[1]*M,g[0]*M+g[1]*D]}return[k?g[0]:$t(c,g[0],o.zoom),k?g[1]:$t(c,g[1],o.zoom)]}(h,e,n,a),getCircleRadiusCorrection:h=>1}}class Ri{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,n,a,o,c){const g=this._bucketParts;for(;this._currentTileIndex<e.length;)if(n.getBucketParts(g,o,e[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,c())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,g.sort((b,k)=>b.sortKey-k.sortKey));this._currentPartIndex<g.length;)if(n.placeLayerBucketPart(g[this._currentPartIndex],this._seenCrossTileIDs,a),this._currentPartIndex++,c())return!0;return!1}}class pa{constructor(e,n,a,o,c,g,b,k){this.placement=new or(e,Xn(),n,g,b,k),this._currentPlacementIndex=a.length-1,this._forceFullPlacement=o,this._showCollisionBoxes=c,this._done=!1}isDone(){return this._done}continuePlacement(e,n,a){const o=F.now(),c=()=>!this._forceFullPlacement&&F.now()-o>2;for(;this._currentPlacementIndex>=0;){const g=n[e[this._currentPlacementIndex]],b=this.placement.collisionIndex.transform.zoom;if(g.type==="symbol"&&(!g.minzoom||g.minzoom<=b)&&(!g.maxzoom||g.maxzoom>b)){if(this._inProgressLayer||(this._inProgressLayer=new Ri(g)),this._inProgressLayer.continuePlacement(a[g.source],this.placement,this._showCollisionBoxes,g,c))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const Xr=512/l.X/2;class Ei{constructor(e,n,a){this.tileID=e,this.bucketInstanceId=a,this._symbolsByKey={};const o=new Map;for(let c=0;c<n.length;c++){const g=n.get(c),b=g.key,k=o.get(b);k?k.push(g):o.set(b,[g])}for(const[c,g]of o){const b={positions:g.map(k=>({x:Math.floor(k.anchorX*Xr),y:Math.floor(k.anchorY*Xr)})),crossTileIDs:g.map(k=>
vendor: 4,668 bytes, line 12
12k.crossTileID)};if(b.positions.length>128){const k=new l.av(b.positions.length,16,Uint16Array);for(const{x:A,y:M}of b.positions)k.add(A,M);k.finish(),delete b.positions,b.index=k}this._symbolsByKey[c]=b}}getScaledCoordinates(e,n){const{x:a,y:o,z:c}=this.tileID.canonical,{x:g,y:b,z:k}=n.canonical,A=Xr/Math.pow(2,k-c),M=(b*l.X+e.anchorY)*A,D=o*l.X*Xr;return{x:Math.floor((g*l.X+e.anchorX)*A-a*l.X*Xr),y:Math.floor(M-D)}}findMatches(e,n,a){const o=this.tileID.canonical.z<n.canonical.z?1:Math.pow(2,this.tileID.canonical.z-n.canonical.z);for(let c=0;c<e.length;c++){const g=e.get(c);if(g.crossTileID)continue;const b=this._symbolsByKey[g.key];if(!b)continue;const k=this.getScaledCoordinates(g,n);if(b.index){const A=b.index.range(k.x-o,k.y-o,k.x+o,k.y+o).sort();for(const M of A){const D=b.crossTileIDs[M];if(!a[D]){a[D]=!0,g.crossTileID=D;break}}}else if(b.positions)for(let A=0;A<b.positions.length;A++){const M=b.positions[A],D=b.crossTileIDs[A];if(Math.abs(M.x-k.x)<=o&&Math.abs(M.y-k.y)<=o&&!a[D]){a[D]=!0,g.crossTileID=D;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:e})=>e)}}class qa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Kr{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){const n=Math.round((e-this.lng)/360);if(n!==0)for(const a in this.indexes){const o=this.indexes[a],c={};for(const g in o){const b=o[g];b.tileID=b.tileID.unwrapTo(b.tileID.wrap+n),c[b.tileID.key]=b}this.indexes[a]=c}this.lng=e}addBucket(e,n,a){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===n.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let c=0;c<n.symbolInstances.length;c++)n.symbolInstances.get(c).crossTileID=0;this.usedCrossTileIDs[e.overscaledZ]||(this.usedCrossTileIDs[e.overscaledZ]={});const o=this.usedCrossTileIDs[e.overscaledZ];for(const c in this.indexes){const g=this.indexes[c];if(Number(c)>e.overscaledZ)for(const b in g){const k=g[b];k.tileID.isChildOf(e)&&k.findMatches(n.symbolInstances,e,o)}else{const b=g[e.scaledTo(Number(c)).key];b&&b.findMatches(n.symbolInstances,e,o)}}for(let c=0;c<n.symbolInstances.length;c++){const g=n.symbolInstances.get(c);g.crossTileID||(g.crossTileID=a.generate(),o[g.crossTileID]=!0)}return this.indexes[e.overscaledZ]===void 0&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new Ei(e,n.symbolInstances,n.bucketInstanceId),!0}removeBucketCrossTileIDs(e,n){for(const a of n.getCrossTileIDsLists())for(const o of a)delete this.usedCrossTileIDs[e][o]}removeStaleBuckets(e){let n=!1;for(const a in this.indexes){const o=this.indexes[a];for(const c in o)e[o[c].bucketInstanceId]||(this.removeBucketCrossTileIDs(a,o[c]),delete o[c],n=!0)}return n}}class Qo{constructor(){this.layerIndexes={},this.crossTileIDs=new qa,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,n,a){let o=this.layerIndexes[e.id];o===void 0&&(o=this.layerIndexes[e.id]=new Kr);let c=!1;const g={};o.handleWrapJump(a);for(const b of n){const k=b.getBucket(e);k&&e.id===k.layerIds[0]&&(k.bucketInstanceId||(k.bucketInstanceId=++this.maxBucketInstanceId),o.addBucket(b.tileID,k,this.crossTileIDs)&&(c=!0),g[k.bucketInstanceId]=!0)}return o.removeStaleBuckets(g)&&(c=!0),c}pruneUnusedLayers(e){const n={};e.forEach(a=>{n[a]=!0});for(const a in this.layerIndexes)n[a]||delete this.layerIndexes[a]}}const Yr=(h,e)=>l.t(h,e&&e.filter(n=>n.identifier!=="source.canvas")),Zc=l.aw();class Za extends l.E{constructor(e,n={}){super(),this._rtlPluginLoaded=()=>{for(const a in this.sourceCaches){const o=this.sourceCaches[a].getSource().type;o!=="vector"&&o!=="geojson"||this.sourceCaches[a].reload()}},this.map=e,this.dispatcher=new sr(hn(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(a,o)=>this.getGlyphs(a,o)),this.dispatcher.registerMessageHandler("GI",(a,o)=>this.getImages(a,o)),this.imageManager=new Ct,this.imageManager.setEventedParent(this),this.glyphManager=new hi(e._requestManager,n.localIdeographFontFamily),this.lineAtlas=new wn(256,512),this.crossTileSymbolIndex=new Qo,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new l.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",l.ay()),Fi().on(Be,this._rtlPluginLoaded),this.on("data",a=>{if(a.dataType!=="source"||a.sourceDataType!=="metadata")return;const o=this.sourceCaches[a.sourceId];if(!o)return;const c=o.getSource();if(c&&c.vectorLayerIds)for(const g in this._layers){const b=this._layers[g];
12b.source===c.id&&this._validateLayer(b)}})}loadURL(e,n={},a){this.fire(new l.k("dataloading",{dataType:"style"})),n.validate=typeof n.validate!="boolean"||n.validate;const o=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;const c=this._loadStyleRequest;l.h(o,this._loadStyleRequest).then(g=>{this._loadStyleRequest=null,this._load(g.data,n,a)}).catch(g=>{this._loadStyleRequest=null,g&&!c.signal.aborted&&this.fire(new l.j(g))})}loadJSON(e,n={},a){this.fire(new l.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,F.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,n.validate=n.validate!==!1,this._load(e,n,a)}).catch(()=>{})}loadEmpty(){this.fire(new l.k("dataloading",{dataType:"style"})),this._load(Zc,{validate:!1})}_load(e,n,a){var o;const c=n.transformStyle?n.transformStyle(a,e):e;if(!n.validate||!Yr(this,l.u(c))){this._loaded=!0,this.stylesheet=c;for(const g in c.sources)this.addSource(g,c.sources[g],{validate:!1});c.sprite?this._loadSprite(c.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(c.glyphs),this._createLayers(),this.light=new Ui(this.stylesheet.light),this.sky=new dr(this.stylesheet.sky),this.map.setTerrain((o=this.stylesheet.terrain)!==null&&o!==void 0?o:null),this.fire(new l.k("data",{dataType:"style"})),this.fire(new l.k("style.load"))}}_createLayers(){const e=l.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",e),this._order=e.map(n=>n.id),this._layers={},this._serializedLayers=null;for(const n of e){const a=l.aA(n);a.setEventedParent(this,{layer:{id:n.id}}),this._layers[n.id]=a}}_loadSprite(e,n=!1,a=void 0){let o;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(c,g,b,k){return l._(this,void 0,void 0,function*(){const A=Te(c),M=b>1?"@2x":"",D={},V={};for(const{id:H,url:X}of A){const Q=g.transformRequest(Ae(X,M,".json"),"SpriteJSON");D[H]=l.h(Q,k);const ne=g.transformRequest(Ae(X,M,".png"),"SpriteImage");V[H]=le.getImage(ne,k)}return yield Promise.all([...Object.values(D),...Object.values(V)]),function(H,X){return l._(this,void 0,void 0,function*(){const Q={};for(const ne in H){Q[ne]={};const se=F.getImageCanvasContext((yield X[ne]).data),ue=(yield H[ne]).data;for(const Y in ue){const{width:me,height:ve,x:Se,y:De,sdf:je,pixelRatio:Qe,stretchX:nt,stretchY:Xe,content:We,textFitWidth:ht,textFitHeight:zt}=ue[Y];Q[ne][Y]={data:null,pixelRatio:Qe,sdf:je,stretchX:nt,stretchY:Xe,content:We,textFitWidth:ht,textFitHeight:zt,spriteData:{width:me,height:ve,x:Se,y:De,context:se}}}}return Q})}(D,V)})}(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(c=>{if(this._spriteRequest=null,c)for(const g in c){this._spritesImagesIds[g]=[];const b=this._spritesImagesIds[g]?this._spritesImagesIds[g].filter(k=>!(k in c)):[];for(const k of b)this.imageManager.removeImage(k),this._changedImages[k]=!0;for(const k in c[g]){const A=g==="default"?k:`${g}:${k}`;this._spritesImagesIds[g].push(A),A in this.imageManager.images?this.imageManager.updateImage(A,c[g][k],!1):this.imageManager.addImage(A,c[g][k]),n&&(this._changedImages[A]=!0)}}}).catch(c=>{this._spriteRequest=null,o=c,this.fire(new l.j(o))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),n&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"})),a&&a(o)})}_unloadSprite(){for(const e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}_validateLayer(e){const n=this.sourceCaches[e.source];if(!n)return;const a=e.sourceLayer;if(!a)return;const o=n.getSource();(o.type==="geojson"||o.vectorLayerIds&&o.vectorLayerIds.indexOf(a)===-1)&&this.fire(new l.j(new Error(`Source layer "${a}" does not exist on source "${o.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,n=!1){const a=this._serializedAllLayers();if(!e||e.length===0)return Object.values(n?l.aB(a):a);const o=[];for(const c of e)if(a[c]){const g=n?l.aB(a[c]):a[c];o.push(g)}return o}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};const n=Object.keys(this._layers);for(const a of n){const o=this._layers[a];o.type!=="custom"&&(e[a]=o.serialize())}return e}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(const e in this.sourceCaches)if(this.sourceCaches[e].hasTransition())return!0;for(const e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;const n=this._changed;if(n){const o=Object.keys(this._updatedLayers),c=Object.keys(this._removedLayers);(o.length||c.length)&&this._updateWorkerLayers(o,c);for(const g in this._updatedSources){const b=this._updatedSources[g];if(b==="reload")this._reloadSource(g);else{if(b!=="clear")throw new Error(`Invalid action ${b}`);this._clearSource(g)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const g in this._updatedPaintProps)this._layers[g].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}const a={};for(const o in this.sourceCaches){const c=this.sourceCaches[o];a[o]=c.used,c.used=!1}for(const o of this._order){const c=this._layers[o];c.recalculate(e,this._availableImages),!c.isHidden(e.zoom)&&c.source&&(this.sourceCaches[c.source].used=!0)}for(const o in a){const c=this.sourceCaches[o];!!a[o]!=!!c.used&&c.fire(new l.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:o}))}this.light.recalculate(e),this.sky.recalculate(e),this.z=e.zoom,n&&this.fire(new l.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const n in this.sourceCaches)this.sourceCaches[n].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,n){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:n})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,n={}){var a;this._checkLoaded();const o=this.serialize();if(e=n.transformStyle?n.transformStyle(o,e):e,((a=n.validate)===null||a===void 0||a)&&Yr(this,l.u(e)))return!1;
vendor: 9,889 bytes, line 12
12(e=l.aB(e)).layers=l.az(e.layers);const c=l.aC(o,e),g=this._getOperationsToPerform(c);if(g.unimplemented.length>0)throw new Error(`Unimplemented: ${g.unimplemented.join(", ")}.`);if(g.operations.length===0)return!1;for(const b of g.operations)b();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){const n=[],a=[];for(const o of e)switch(o.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":n.push(()=>this.addLayer.apply(this,o.args));break;case"removeLayer":n.push(()=>this.removeLayer.apply(this,o.args));break;case"setPaintProperty":n.push(()=>this.setPaintProperty.apply(this,o.args));break;case"setLayoutProperty":n.push(()=>this.setLayoutProperty.apply(this,o.args));break;case"setFilter":n.push(()=>this.setFilter.apply(this,o.args));break;case"addSource":n.push(()=>this.addSource.apply(this,o.args));break;case"removeSource":n.push(()=>this.removeSource.apply(this,o.args));break;case"setLayerZoomRange":n.push(()=>this.setLayerZoomRange.apply(this,o.args));break;case"setLight":n.push(()=>this.setLight.apply(this,o.args));break;case"setGeoJSONSourceData":n.push(()=>this.setGeoJSONSourceData.apply(this,o.args));break;case"setGlyphs":n.push(()=>this.setGlyphs.apply(this,o.args));break;case"setSprite":n.push(()=>this.setSprite.apply(this,o.args));break;case"setSky":n.push(()=>this.setSky.apply(this,o.args));break;case"setTerrain":n.push(()=>this.map.setTerrain.apply(this,o.args));break;case"setTransition":n.push(()=>{});break;default:a.push(o.command)}return{operations:n,unimplemented:a}}addImage(e,n){if(this.getImage(e))return this.fire(new l.j(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,n),this._afterImageUpdated(e)}updateImage(e,n){this.imageManager.updateImage(e,n)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new l.j(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,n,a={}){if(this._checkLoaded(),this.sourceCaches[e]!==void 0)throw new Error(`Source "${e}" already exists.`);if(!n.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(n).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(l.u.source,`sources.${e}`,n,null,a))return;this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);const o=this.sourceCaches[e]=new ut(e,n,this.dispatcher);o.style=this,o.setEventedParent(this,()=>({isSourceLoaded:o.loaded(),source:o.serialize(),sourceId:e})),o.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error("There is no source with this ID");for(const a in this._layers)if(this._layers[a].source===e)return this.fire(new l.j(new Error(`Source "${e}" cannot be removed while layer "${a}" is using it.`)));const n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new l.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),n.setEventedParent(null),n.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,n){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error(`There is no source with this ID=${e}`);const a=this.sourceCaches[e].getSource();if(a.type!=="geojson")throw new Error(`geojsonSource.type is ${a.type}, which is !== 'geojson`);a.setData(n),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,n,a={}){this._checkLoaded();const o=e.id;if(this.getLayer(o))return void this.fire(new l.j(new Error(`Layer "${o}" already exists on this map.`)));let c;if(e.type==="custom"){if(Yr(this,l.aD(e)))return;c=l.aA(e)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(o,e.source),e=l.aB(e),e=l.e(e,{source:o})),this._validate(l.u.layer,`layers.${o}`,e,{arrayIndex:-1},a))return;c=l.aA(e),this._validateLayer(c),c.setEventedParent(this,{layer:{id:o}})}const g=n?this._order.indexOf(n):this._order.length;if(n&&g===-1)this.fire(new l.j(new Error(`Cannot add layer "${o}" before non-existing layer "${n}".`)));else{if(this._order.splice(g,0,o),this._layerOrderChanged=!0,this._layers[o]=c,this._removedLayers[o]&&c.source&&c.type!=="custom"){const b=this._removedLayers[o];delete this._removedLayers[o],b.type!==c.type?this._updatedSources[c.source]="clear":(this._updatedSources[c.source]="reload",this.sourceCaches[c.source].pause())}this._updateLayer(c),c.onAdd&&c.onAdd(this.map)}}moveLayer(e,n){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new l.j(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===n)return;const a=this._order.indexOf(e);this._order.splice(a,1);const o=n?this._order.indexOf(n):this._order.length;n&&o===-1?this.fire(new l.j(new Error(`Cannot move layer "${e}" before non-existing layer "${n}".`))):(this._order.splice(o,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();const n=this._layers[e];if(!n)return void this.fire(new l.j(new Error(`Cannot remove non-existing layer "${e}".`)));n.setEventedParent(null);const a=this._order.indexOf(e);this._order.splice(a,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=n,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],n.onRemove&&n.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,n,a){this._checkLoaded();const o=this.getLayer(e);o?o.minzoom===n&&o.maxzoom===a||(n!=null&&(o.minzoom=n),a!=null&&(o.maxzoom=a),this._updateLayer(o)):this.fire(new l.j(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,n,a={}){this._checkLoaded();const o=this.getLayer(e);if(o){if(!l.aE(o.filter,n))return n==null?(o.filter=void 0,void this._updateLayer(o)):void(this._validate(l.u.filter,`layers.${o.id}.filter`,n,null,a)||(o.filter=l.aB(n),this._updateLayer(o)))}else this.fire(new l.j(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return l.aB(this.getLayer(e).filter)}setLayoutProperty(e,n,a,o={}){this._checkLoaded();const c=this.getLayer(e);c?l.aE(c.getLayoutProperty(n),a)||(c.setLayoutProperty(n,a,o),this._updateLayer(c)):this.fire(new l.j(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,n){const a=this.getLayer(e);if(a)return a.getLayoutProperty(n);this.fire(new l.j(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,n,a,o={}){this._checkLoaded();const c=this.getLayer(e);c?l.aE(c.getPaintProperty(n),a)||(c.setPaintProperty(n,a,o)&&this._updateLayer(c),this._changed=!0,this._updatedPaintProps[e]=!0,this._serializedLayers=null):this.fire(new l.j(new Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(e,n){return this.getLayer(e).getPaintProperty(n)}setFeatureState(e,n){this._checkLoaded();const a=e.source,o=e.sourceLayer,c=this.sourceCaches[a];if(c===void 0)return void this.fire(new l.j(new Error(`The source '${a}' does not exist in the map's style.`)));const g=c.getSource().type;g==="geojson"&&o?this.fire(new l.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):g!=="vector"||o?(e.id===void 0&&this.fire(new l.j(new Error("The feature id parameter must be provided."))),c.setFeatureState(o,e.id,n)):this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,n){this._checkLoaded();const a=e.source,o=this.sourceCaches[a];if(o===void 0)return void this.fire(new l.j(new Error(`The source '${a}' does not exist in the map's style.`)));const c=o.getSource().type,g=c==="vector"?e.sourceLayer:void 0;c!=="vector"||g?n&&typeof e.id!="string"&&typeof e.id!="number"?this.fire(new l.j(new Error("A feature id is required to remove its specific state property."))):o.removeFeatureState(g,e.id,n):this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();const n=e.source,a=e.sourceLayer,o=this.sourceCaches[n];if(o!==void 0)return o.getSource().type!=="vector"||a?(e.id===void 0&&this.fire(new l.j(new Error("The feature id parameter must be provided."))),o.getFeatureState(a,e.id)):void this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new l.j(new Error(`The source '${n}' does not exist in the map's style.`)))}getTransition(){return l.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const e=l.aF(this.sourceCaches,c=>c.serialize()),n=this._serializeByIds(this._order,!0),a=this.map.getTerrain()||void 0,o=this.stylesheet;return l.aG({version:o.version,name:o.name,metadata:o.metadata,light:o.light,sky:o.sky,center:o.center,zoom:o.zoom,bearing:o.bearing,pitch:o.pitch,sprite:o.sprite,glyphs:o.glyphs,transition:o.transition,sources:e,layers:n,terrain:a},c=>c!==void 0)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.sourceCaches[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){const n=g=>this._layers[g].type==="fill-extrusion",a={},o=[];for(let g=this._order.length-1;g>=0;g--){const b=this._order[g];if(n(b)){a[b]=g;
12for(const k of e){const A=k[b];if(A)for(const M of A)o.push(M)}}}o.sort((g,b)=>b.intersectionZ-g.intersectionZ);const c=[];for(let g=this._order.length-1;g>=0;g--){const b=this._order[g];if(n(b))for(let k=o.length-1;k>=0;k--){const A=o[k].feature;if(a[A.layer.id]<g)break;c.push(A),o.pop()}else for(const k of e){const A=k[b];if(A)for(const M of A)c.push(M.feature)}}return c}queryRenderedFeatures(e,n,a){n&&n.filter&&this._validate(l.u.filter,"queryRenderedFeatures.filter",n.filter,null,n);const o={};if(n&&n.layers){if(!Array.isArray(n.layers))return this.fire(new l.j(new Error("parameters.layers must be an Array."))),[];for(const b of n.layers){const k=this._layers[b];if(!k)return this.fire(new l.j(new Error(`The layer '${b}' does not exist in the map's style and cannot be queried for features.`))),[];o[k.source]=!0}}const c=[];n.availableImages=this._availableImages;const g=this._serializedAllLayers();for(const b in this.sourceCaches)n.layers&&!o[b]||c.push(Hr(this.sourceCaches[b],this._layers,g,e,n,a));return this.placement&&c.push(function(b,k,A,M,D,V,H){const X={},Q=V.queryRenderedSymbols(M),ne=[];for(const se of Object.keys(Q).map(Number))ne.push(H[se]);ne.sort(Tr);for(const se of ne){const ue=se.featureIndex.lookupSymbolFeatures(Q[se.bucketInstanceId],k,se.bucketIndex,se.sourceLayerIndex,D.filter,D.layers,D.availableImages,b);for(const Y in ue){const me=X[Y]=X[Y]||[],ve=ue[Y];ve.sort((Se,De)=>{const je=se.featureSortOrder;if(je){const Qe=je.indexOf(Se.featureIndex);return je.indexOf(De.featureIndex)-Qe}return De.featureIndex-Se.featureIndex});for(const Se of ve)me.push(Se)}}for(const se in X)X[se].forEach(ue=>{const Y=ue.feature,me=A[b[se].source].getFeatureState(Y.layer["source-layer"],Y.id);Y.source=Y.layer.source,Y.layer["source-layer"]&&(Y.sourceLayer=Y.layer["source-layer"]),Y.state=me});return X}(this._layers,g,this.sourceCaches,e,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(c)}querySourceFeatures(e,n){n&&n.filter&&this._validate(l.u.filter,"querySourceFeatures.filter",n.filter,null,n);const a=this.sourceCaches[e];return a?function(o,c){const g=o.getRenderableIds().map(A=>o.getTileByID(A)),b=[],k={};for(let A=0;A<g.length;A++){const M=g[A],D=M.tileID.canonical.key;k[D]||(k[D]=!0,M.querySourceFeatures(b,c))}return b}(a,n):[]}getLight(){return this.light.getLight()}setLight(e,n={}){this._checkLoaded();const a=this.light.getLight();let o=!1;for(const g in e)if(!l.aE(e[g],a[g])){o=!0;break}if(!o)return;const c={now:F.now(),transition:l.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,n),this.light.updateTransitions(c)}getSky(){var e;return(e=this.stylesheet)===null||e===void 0?void 0:e.sky}setSky(e,n={}){const a=this.getSky();let o=!1;if(!e&&!a)return;if(e&&!a)o=!0;else if(!e&&a)o=!0;else for(const g in e)if(!l.aE(e[g],a[g])){o=!0;break}if(!o)return;const c={now:F.now(),transition:l.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,n),this.sky.updateTransitions(c)}_validate(e,n,a,o,c={}){return(!c||c.validate!==!1)&&Yr(this,e.call(l.u,l.e({key:n,style:this.serialize(),value:a,styleSpec:l.v},o)))}_remove(e=!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),Fi().off(Be,this._rtlPluginLoaded);for(const n in this._layers)this._layers[n].setEventedParent(null);for(const n in this.sourceCaches){const a=this.sourceCaches[n];a.setEventedParent(null),a.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.sourceCaches[e].clearTiles()}_reloadSource(e){this.sourceCaches[e].resume(),this.sourceCaches[e].reload()}_updateSources(e){for(const n in this.sourceCaches)this.sourceCaches[n].update(e,this.map.terrain)}_generateCollisionBoxes(){for(const e in this.sourceCaches)this._reloadSource(e)}_updatePlacement(e,n,a,o,c=!1){let g=!1,b=!1;const k={};for(const A of this._order){const M=this._layers[A];if(M.type!=="symbol")continue;if(!k[M.source]){const V=this.sourceCaches[M.source];k[M.source]=V.getRenderableIds(!0).map(H=>V.getTileByID(H)).sort((H,X)=>X.tileID.overscaledZ-H.tileID.overscaledZ||(H.tileID.isLessThan(X.tileID)?-1:1))}const D=this.crossTileSymbolIndex.addLayer(M,k[M.source],e.center.lng);g=g||D}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((c=c||this._layerOrderChanged||a===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(F.now(),e.zoom))&&(this.pauseablePlacement=new pa(e,this.map.terrain,this._order,c,n,a,o,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,k),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(F.now()),b=!0),g&&this.pauseablePlacement.placement.setStale()),b||g)for(const A of this._order){const M=this._layers[A];M.type==="symbol"&&this.placement.updateLayerOpacities(M,k[M.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(F.now())}_releaseSymbolFadeTiles(){for(const e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,n){return l._(this,void 0,void 0,function*(){const a=yield this.imageManager.getImages(n.icons);this._updateTilesForChangedImages();const o=this.sourceCaches[n.source];return o&&o.setDependencies(n.tileID.key,n.type,n.icons),a})}getGlyphs(e,n){return l._(this,void 0,void 0,function*(){const a=yield this.glyphManager.getGlyphs(n.stacks),o=this.sourceCaches[n.source];return o&&o.setDependencies(n.tileID.key,n.type,[""]),a})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,n={}
vendor: 4,518 bytes, lines 12-71
12){this._checkLoaded(),e&&this._validate(l.u.glyphs,"glyphs",e,null,n)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,n,a={},o){this._checkLoaded();const c=[{id:e,url:n}],g=[...Te(this.stylesheet.sprite),...c];this._validate(l.u.sprite,"sprite",g,null,a)||(this.stylesheet.sprite=g,this._loadSprite(c,!0,o))}removeSprite(e){this._checkLoaded();const n=Te(this.stylesheet.sprite);if(n.find(a=>a.id===e)){if(this._spritesImagesIds[e])for(const a of this._spritesImagesIds[e])this.imageManager.removeImage(a),this._changedImages[a]=!0;n.splice(n.findIndex(a=>a.id===e),1),this.stylesheet.sprite=n.length>0?n:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}else this.fire(new l.j(new Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return Te(this.stylesheet.sprite)}setSprite(e,n={},a){this._checkLoaded(),e&&this._validate(l.u.sprite,"sprite",e,null,n)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,a):(this._unloadSprite(),a&&a(null)))}}var Kn=l.Y([{name:"a_pos",type:"Int16",components:2}]);const Ln={prelude:Yt(`#ifdef GL_ES 13precision mediump float; 14#else 15#if !defined(lowp) 16#define lowp 17#endif 18#if !defined(mediump) 19#define mediump 20#endif 21#if !defined(highp) 22#define highp 23#endif 24#endif 25`,`#ifdef GL_ES 26precision highp float; 27#else 28#if !defined(lowp) 29#define lowp 30#endif 31#if !defined(mediump) 32#define mediump 33#endif 34#if !defined(highp) 35#define highp 36#endif 37#endif 38vec2 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 39);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} 40#ifdef TERRAIN3D 41uniform 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; 42#endif 43const 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) { 44#ifdef TERRAIN3D 45highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); 46#else 47return 1.0; 48#endif 49}float calculate_visibility(vec4 pos) { 50#ifdef TERRAIN3D 51vec3 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; 52#else 53return 1.0; 54#endif 55}float ele(vec2 pos) { 56#ifdef TERRAIN3D 57vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; 58#else 59return 0.0; 60#endif 61}float get_elevation(vec2 pos) { 62#ifdef TERRAIN3D 63vec2 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; 64#else 65return 0.0; 66#endif 67}`),background:Yt(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; 68#ifdef OVERDRAW_INSPECTOR 69gl_FragColor=vec4(1.0); 70#endif 71}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Yt(`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;
71uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying 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=texture2D(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=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; 72#ifdef OVERDRAW_INSPECTOR 73gl_FragColor=vec4(1.0); 74#endif 75}`,"uniform mat4 u_matrix;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;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);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:Yt(`varying vec3 v_data;varying float v_visibility; 76#pragma mapbox: define highp vec4 color 77#pragma mapbox: define mediump float radius 78#pragma mapbox: define lowp float blur 79#pragma mapbox: define lowp float opacity 80#pragma mapbox: define highp vec4 stroke_color 81#pragma mapbox: define mediump float stroke_width 82#pragma mapbox: define lowp float stroke_opacity 83void main() { 84#pragma mapbox: initialize highp vec4 color 85#pragma mapbox: initialize mediump float radius 86#pragma mapbox: initialize lowp float blur 87#pragma mapbox: initialize lowp float opacity 88#pragma mapbox: initialize highp vec4 stroke_color 89#pragma mapbox: initialize mediump float stroke_width 90#pragma mapbox: initialize lowp float stroke_opacity 91vec2 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));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); 92#ifdef OVERDRAW_INSPECTOR 93gl_FragColor=vec4(1.0); 94#endif 95}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; 96#pragma mapbox: define highp vec4 color 97#pragma mapbox: define mediump float radius 98#pragma mapbox: define lowp float blur 99#pragma mapbox: define lowp float opacity 100#pragma mapbox: define highp vec4 stroke_color 101#pragma mapbox: define mediump float stroke_width 102#pragma mapbox: define lowp float stroke_opacity 103void main(void) { 104#pragma mapbox: initialize highp vec4 color 105#pragma mapbox: initialize mediump float radius 106#pragma mapbox: initialize lowp float blur 107#pragma mapbox: initialize lowp float opacity 108#pragma mapbox: initialize highp vec4 stroke_color 109#pragma mapbox: initialize mediump float stroke_width 110#pragma mapbox: initialize lowp float stroke_opacity 111vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);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:Yt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Yt(`uniform highp float u_intensity;varying vec2 v_extrude; 112#pragma mapbox: define highp float weight 113#define GAUSS_COEF 0.3989422804014327 114void main() { 115#pragma mapbox: initialize highp float weight 116float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); 117#ifdef OVERDRAW_INSPECTOR 118gl_FragColor=vec4(1.0); 119#endif 120}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; 121#pragma mapbox: define highp float weight 122#pragma mapbox: define mediump float radius 123const highp float ZERO=1.0/255.0/16.0; 124#define GAUSS_COEF 0.3989422804014327 125void main(void) { 126#pragma mapbox: initialize highp float weight 127#pragma mapbox: initialize mediump float radius 128vec2 unscaled_extrude=vec2(mod(a_pos,2.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;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Yt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; 129#ifdef OVERDRAW_INSPECTOR 130gl_FragColor=vec4(0.0); 131#endif 132}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying 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:Yt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}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:Yt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);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);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;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;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Yt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Yt(`#pragma mapbox: define highp vec4 color 133#pragma mapbox: define lowp float opacity 134void main() { 135#pragma mapbox: initialize highp vec4 color 136#pragma mapbox: initialize lowp float opacity 137gl_FragColor=color*opacity; 138#ifdef OVERDRAW_INSPECTOR 139gl_FragColor=vec4(1.0); 140#endif 141}`,`attribute vec2 a_pos;uniform mat4 u_matrix; 142#pragma mapbox: define highp vec4 color 143#pragma mapbox: define lowp float opacity 144void main() { 145#pragma mapbox: initialize highp vec4 color 146#pragma mapbox: initialize lowp float opacity 147gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Yt(`varying vec2 v_pos; 148#pragma mapbox: define highp vec4 outline_color 149#pragma mapbox: define lowp float opacity 150void main() { 151#pragma mapbox: initialize highp vec4 outline_color 152#pragma mapbox: initialize lowp float opacity 153float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); 154#ifdef OVERDRAW_INSPECTOR 155gl_FragColor=vec4(1.0); 156#endif 157}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; 158#pragma mapbox: define highp vec4 outline_color 159#pragma mapbox: define lowp float opacity 160void main() { 161#pragma mapbox: initialize highp vec4 outline_color 162#pragma mapbox: initialize lowp float opacity 163gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Yt(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; 164#pragma mapbox: define lowp float opacity 165#pragma mapbox: define lowp vec4 pattern_from 166#pragma mapbox: define lowp vec4 pattern_to 167void main() { 168#pragma mapbox: initialize lowp float opacity 169#pragma mapbox: initialize mediump vec4 pattern_from 170#pragma mapbox: initialize mediump vec4 pattern_to 171vec2 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=texture2D(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=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; 172#ifdef OVERDRAW_INSPECTOR 173gl_FragColor=vec4(1.0); 174#endif 175}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; 176#pragma mapbox: define lowp float opacity 177#pragma mapbox: define lowp vec4 pattern_from 178#pragma mapbox: define lowp vec4 pattern_to 179#pragma mapbox: define lowp float pixel_ratio_from 180#pragma mapbox: define lowp float pixel_ratio_to 181void main() { 182#pragma mapbox: initialize lowp float opacity 183#pragma mapbox: initialize mediump vec4 pattern_from 184#pragma mapbox: initialize mediump vec4 pattern_to 185#pragma mapbox: initialize lowp float pixel_ratio_from 186#pragma mapbox: initialize lowp float pixel_ratio_to 187vec2 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=u_matrix*vec4(a_pos,0,1);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;}`),fillPattern:Yt(`#ifdef GL_ES 188precision highp float; 189#endif 190uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; 191#pragma mapbox: define lowp float opacity 192#pragma mapbox: define lowp vec4 pattern_from 193#pragma mapbox: define lowp vec4 pattern_to 194void main() { 195#pragma mapbox: initialize lowp float opacity 196#pragma mapbox: initialize mediump vec4 pattern_from 197#pragma mapbox: initialize mediump vec4 pattern_to 198vec2 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=texture2D(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=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; 199#ifdef OVERDRAW_INSPECTOR 200gl_FragColor=vec4(1.0); 201#endif 202}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; 203#pragma mapbox: define lowp float opacity 204#pragma mapbox: define lowp vec4 pattern_from 205#pragma mapbox: define lowp vec4 pattern_to 206#pragma mapbox: define lowp float pixel_ratio_from 207#pragma mapbox: define lowp float pixel_ratio_to 208void main() { 209#pragma mapbox: initialize lowp float opacity 210#pragma mapbox: initialize mediump vec4 pattern_from 211#pragma mapbox: initialize mediump vec4 pattern_to 212#pragma mapbox: initialize lowp float pixel_ratio_from 213#pragma mapbox: initialize lowp float pixel_ratio_to 214vec2 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=u_matrix*vec4(a_pos,0,1);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:Yt(`varying vec4 v_color;void main() {gl_FragColor=v_color; 215#ifdef OVERDRAW_INSPECTOR 216gl_FragColor=vec4(1.0); 217#endif 218}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed; 219#ifdef TERRAIN3D 220attribute vec2 a_centroid; 221#endif 222varying vec4 v_color; 223#pragma mapbox: define highp float base 224#pragma mapbox: define highp float height 225#pragma mapbox: define highp vec4 color 226void main() { 227#pragma mapbox: initialize highp float base 228#pragma mapbox: initialize highp float height 229#pragma mapbox: initialize highp vec4 color 230vec3 normal=a_normal_ed.xyz; 231#ifdef TERRAIN3D 232float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); 233#else 234float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; 235#endif 236base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/
23616384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Yt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; 237#pragma mapbox: define lowp float base 238#pragma mapbox: define lowp float height 239#pragma mapbox: define lowp vec4 pattern_from 240#pragma mapbox: define lowp vec4 pattern_to 241#pragma mapbox: define lowp float pixel_ratio_from 242#pragma mapbox: define lowp float pixel_ratio_to 243void main() { 244#pragma mapbox: initialize lowp float base 245#pragma mapbox: initialize lowp float height 246#pragma mapbox: initialize mediump vec4 pattern_from 247#pragma mapbox: initialize mediump vec4 pattern_to 248#pragma mapbox: initialize lowp float pixel_ratio_from 249#pragma mapbox: initialize lowp float pixel_ratio_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=texture2D(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=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; 251#ifdef OVERDRAW_INSPECTOR 252gl_FragColor=vec4(1.0); 253#endif 254}`,`uniform mat4 u_matrix;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 vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; 255#ifdef TERRAIN3D 256attribute vec2 a_centroid; 257#endif 258varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; 259#pragma mapbox: define lowp float base 260#pragma mapbox: define lowp float height 261#pragma mapbox: define lowp vec4 pattern_from 262#pragma mapbox: define lowp vec4 pattern_to 263#pragma mapbox: define lowp float pixel_ratio_from 264#pragma mapbox: define lowp float pixel_ratio_to 265void main() { 266#pragma mapbox: initialize lowp float base 267#pragma mapbox: initialize lowp float height 268#pragma mapbox: initialize mediump vec4 pattern_from 269#pragma mapbox: initialize mediump vec4 pattern_to 270#pragma mapbox: initialize lowp float pixel_ratio_from 271#pragma mapbox: initialize lowp float pixel_ratio_to 272vec2 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; 273#ifdef TERRAIN3D 274float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); 275#else 276float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; 277#endif 278base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 279? a_pos 280: vec2(edgedistance,z*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:Yt(`#ifdef GL_ES 281precision highp float; 282#endif 283uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(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));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); 284#ifdef OVERDRAW_INSPECTOR 285gl_FragColor=vec4(1.0); 286#endif 287}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying 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:Yt(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; 288#define PI 3.141592653589793 289void main() {vec4 pixel=texture2D(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;
289float 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);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; 290#ifdef OVERDRAW_INSPECTOR 291gl_FragColor=vec4(1.0); 292#endif 293}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Yt(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; 294#pragma mapbox: define highp vec4 color 295#pragma mapbox: define lowp float blur 296#pragma mapbox: define lowp float opacity 297void main() { 298#pragma mapbox: initialize highp vec4 color 299#pragma mapbox: initialize lowp float blur 300#pragma mapbox: initialize lowp float opacity 301float 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);gl_FragColor=color*(alpha*opacity); 302#ifdef OVERDRAW_INSPECTOR 303gl_FragColor=vec4(1.0); 304#endif 305}`,` 306#define scale 0.015873016 307attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; 308#pragma mapbox: define highp vec4 color 309#pragma mapbox: define lowp float blur 310#pragma mapbox: define lowp float opacity 311#pragma mapbox: define mediump float gapwidth 312#pragma mapbox: define lowp float offset 313#pragma mapbox: define mediump float width 314void main() { 315#pragma mapbox: initialize highp vec4 color 316#pragma mapbox: initialize lowp float blur 317#pragma mapbox: initialize lowp float opacity 318#pragma mapbox: initialize mediump float gapwidth 319#pragma mapbox: initialize lowp float offset 320#pragma mapbox: initialize mediump float width 321float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; 322#ifdef TERRAIN3D 323v_gamma_scale=1.0; 324#else 325float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 326#endif 327v_width2=vec2(outset,inset);}`),lineGradient:Yt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; 328#pragma mapbox: define lowp float blur 329#pragma mapbox: define lowp float opacity 330void main() { 331#pragma mapbox: initialize lowp float blur 332#pragma mapbox: initialize lowp float opacity 333float 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=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); 334#ifdef OVERDRAW_INSPECTOR 335gl_FragColor=vec4(1.0); 336#endif 337}`,` 338#define scale 0.015873016 339attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; 340#pragma mapbox: define lowp float blur 341#pragma mapbox: define lowp float opacity 342#pragma mapbox: define mediump float gapwidth 343#pragma mapbox: define lowp float offset 344#pragma mapbox: define mediump float width 345void main() { 346#pragma mapbox: initialize lowp float blur 347#pragma mapbox: initialize lowp float opacity 348#pragma mapbox: initialize mediump float gapwidth 349#pragma mapbox: initialize lowp float offset 350#pragma mapbox: initialize mediump float width 351float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; 352#ifdef TERRAIN3D 353v_gamma_scale=1.0; 354#else 355float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 356#endif 357v_width2=vec2(outset,inset);}`),linePattern:Yt(`#ifdef GL_ES 358precision highp float; 359#endif 360uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; 361#pragma mapbox: define lowp vec4 pattern_from 362#pragma mapbox: define lowp vec4 pattern_to 363#pragma mapbox: define lowp float pixel_ratio_from 364#pragma mapbox: define lowp float pixel_ratio_to 365#pragma mapbox: define lowp float blur 366#pragma mapbox: define lowp float opacity 367void main() { 368#pragma mapbox: initialize mediump vec4 pattern_from 369#pragma mapbox: initialize mediump vec4 pattern_to 370#pragma mapbox: initialize lowp float pixel_ratio_from 371#pragma mapbox: initialize lowp float pixel_ratio_to 372#pragma mapbox: initialize lowp float blur 373#pragma mapbox: initialize lowp float opacity 374vec2 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(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; 375#ifdef OVERDRAW_INSPECTOR 376gl_FragColor=vec4(1.0); 377#endif 378}`,` 379#define scale 0.015873016 380#define LINE_DISTANCE_SCALE 2.0 381attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; 382#pragma mapbox: define lowp float blur 383#pragma mapbox: define lowp float opacity 384#pragma mapbox: define lowp float offset 385#pragma mapbox: define mediump float gapwidth 386#pragma mapbox: define mediump float width 387#pragma mapbox: define lowp float floorwidth 388#pragma mapbox: define lowp vec4 pattern_from 389#pragma mapbox: define lowp vec4 pattern_to 390#pragma mapbox: define lowp float pixel_ratio_from 391#pragma mapbox: define lowp float pixel_ratio_to 392void main() { 393#pragma mapbox: initialize lowp float blur 394#pragma mapbox: initialize lowp float opacity 395#pragma mapbox: initialize lowp float offset 396#pragma mapbox: initialize mediump float gapwidth 397#pragma mapbox: initialize mediump float width 398#pragma mapbox: initialize lowp float floorwidth 399#pragma mapbox: initialize mediump vec4 pattern_from 400#pragma mapbox: initialize mediump vec4 pattern_to 401#pragma mapbox: initialize lowp float pixel_ratio_from 402#pragma mapbox: initialize lowp float pixel_ratio_to 403float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; 404#ifdef TERRAIN3D 405v_gamma_scale=1.0; 406#else 407float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 408#endif 409v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Yt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;
409uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; 410#pragma mapbox: define highp vec4 color 411#pragma mapbox: define lowp float blur 412#pragma mapbox: define lowp float opacity 413#pragma mapbox: define mediump float width 414#pragma mapbox: define lowp float floorwidth 415void main() { 416#pragma mapbox: initialize highp vec4 color 417#pragma mapbox: initialize lowp float blur 418#pragma mapbox: initialize lowp float opacity 419#pragma mapbox: initialize mediump float width 420#pragma mapbox: initialize lowp float floorwidth 421float 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=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(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);gl_FragColor=color*(alpha*opacity); 422#ifdef OVERDRAW_INSPECTOR 423gl_FragColor=vec4(1.0); 424#endif 425}`,` 426#define scale 0.015873016 427#define LINE_DISTANCE_SCALE 2.0 428attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;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;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; 429#pragma mapbox: define highp vec4 color 430#pragma mapbox: define lowp float blur 431#pragma mapbox: define lowp float opacity 432#pragma mapbox: define mediump float gapwidth 433#pragma mapbox: define lowp float offset 434#pragma mapbox: define mediump float width 435#pragma mapbox: define lowp float floorwidth 436void main() { 437#pragma mapbox: initialize highp vec4 color 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 443#pragma mapbox: initialize lowp float floorwidth 444float 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);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; 445#ifdef TERRAIN3D 446v_gamma_scale=1.0; 447#else 448float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 449#endif 450v_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:Yt(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying 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=texture2D(u_image0,v_pos0);vec4 color1=texture2D(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);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); 451#ifdef OVERDRAW_INSPECTOR 452gl_FragColor=vec4(1.0); 453#endif 454}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Yt(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; 455#pragma mapbox: define lowp float opacity 456void main() { 457#pragma mapbox: initialize lowp float opacity 458lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; 459#ifdef OVERDRAW_INSPECTOR 460gl_FragColor=vec4(1.0); 461#endif 462}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute 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_matrix;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;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} 463#pragma mapbox: define lowp float opacity 464void main() { 465#pragma mapbox: initialize lowp float opacity 466vec2 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 ? 467camera_to_anchor_distance/u_camera_to_center_distance : 468u_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;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Yt(`#define SDF_PX 8.0 469uniform 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;varying vec2 v_data0;varying vec3 v_data1; 470#pragma mapbox: define highp vec4 fill_color 471#pragma mapbox: define highp vec4 halo_color 472#pragma mapbox: define lowp float opacity 473#pragma mapbox: define lowp float halo_width 474#pragma mapbox: define lowp float halo_blur 475void main() { 476#pragma mapbox: initialize highp vec4 fill_color 477#pragma mapbox: initialize highp vec4 halo_color 478#pragma mapbox: initialize lowp float opacity 479#pragma mapbox: initialize lowp float halo_width 480#pragma mapbox: initialize lowp float halo_blur 481float 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=texture2D(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);}gl_FragColor=color*(alpha*opacity*fade_opacity); 482#ifdef OVERDRAW_INSPECTOR 483gl_FragColor=vec4(1.0); 484#endif 485}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute 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_matrix;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;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} 486#pragma mapbox: define highp vec4 fill_color 487#pragma mapbox: define highp vec4 halo_color 488#pragma mapbox: define lowp float opacity 489#pragma mapbox: define lowp float halo_width 490#pragma mapbox: define lowp float halo_blur 491void main() { 492#pragma mapbox: initialize highp vec4 fill_color 493#pragma mapbox: initialize highp vec4 halo_color 494#pragma mapbox: initialize lowp float opacity 495#pragma mapbox: initialize lowp float halo_width 496#pragma mapbox: initialize lowp float halo_blur 497vec2 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 ? 498camera_to_anchor_distance/u_camera_to_center_distance : 499u_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;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Yt(`#define SDF_PX 8.0 500#define SDF 1.0 501#define ICON 0.0 502uniform 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;varying vec4 v_data0;varying vec4 v_data1; 503#pragma mapbox: define highp vec4 fill_color 504#pragma mapbox: define highp vec4 halo_color 505#pragma mapbox: define lowp float opacity 506#pragma mapbox: define lowp float halo_width 507#pragma mapbox: define lowp float halo_blur 508void main() { 509#pragma mapbox: initialize highp vec4 fill_color 510#pragma mapbox: initialize highp vec4 halo_color 511#pragma mapbox: initialize lowp float opacity 512#pragma mapbox: initialize lowp float halo_width 513#pragma mapbox: initialize lowp float halo_blur 514float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;
514gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; 515#ifdef OVERDRAW_INSPECTOR 516gl_FragColor=vec4(1.0); 517#endif 518return;}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=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); 519#ifdef OVERDRAW_INSPECTOR 520gl_FragColor=vec4(1.0); 521#endif 522}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute 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_matrix;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;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} 523#pragma mapbox: define highp vec4 fill_color 524#pragma mapbox: define highp vec4 halo_color 525#pragma mapbox: define lowp float opacity 526#pragma mapbox: define lowp float halo_width 527#pragma mapbox: define lowp float halo_blur 528void main() { 529#pragma mapbox: initialize highp vec4 fill_color 530#pragma mapbox: initialize highp vec4 halo_color 531#pragma mapbox: initialize lowp float opacity 532#pragma mapbox: initialize lowp float halo_width 533#pragma mapbox: initialize lowp float halo_blur 534vec2 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 ? 535camera_to_anchor_distance/u_camera_to_center_distance : 536u_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;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Yt("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;varying vec2 v_texture_pos;varying 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=texture2D(u_texture,v_texture_pos);if (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);
536float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying 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=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Yt("varying 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() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying 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=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Yt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying 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=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Yt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Yt(h,e){const n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,a=e.match(/attribute ([\w]+) ([\w]+)/g),o=h.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),c=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),g=c?c.concat(o):o,b={};return{fragmentSource:h=h.replace(n,(k,A,M,D,V)=>(b[V]=!0,A==="define"?` 537#ifndef HAS_UNIFORM_u_${V} 538varying ${M} ${D} ${V}; 539#else 540uniform ${M} ${D} u_${V}; 541#endif 542`:` 543#ifdef HAS_UNIFORM_u_${V} 544 ${M} ${D} ${V} = u_${V}; 545#endif 546`)),vertexSource:e=e.replace(n,(k,A,M,D,V)=>{const H=D==="float"?"vec2":"vec4",X=V.match(/color/)?"color":H;return b[V]?A==="define"?` 547#ifndef HAS_UNIFORM_u_${V} 548uniform lowp float u_${V}_t; 549attribute ${M} ${H} a_${V}; 550varying ${M} ${D} ${V}; 551#else 552uniform ${M} ${D} u_${V}; 553#endif 554`:X==="vec4"?` 555#ifndef HAS_UNIFORM_u_${V} 556 ${V} = a_${V}; 557#else 558 ${M} ${D} ${V} = u_${V}; 559#endif 560`:` 561#ifndef HAS_UNIFORM_u_${V} 562 ${V} = unpack_mix_${X}(a_${V}, u_${V}_t); 563#else 564 ${M} ${D} ${V} = u_${V}; 565#endif 566`:A==="define"?` 567#ifndef HAS_UNIFORM_u_${V} 568uniform lowp float u_${V}_t; 569attribute ${M} ${H} a_${V}; 570#else 571uniform ${M} ${D} u_${V}; 572#endif 573`:X==="vec4"?` 574#ifndef HAS_UNIFORM_u_${V} 575 ${M} ${D} ${V} = a_${V}; 576#else 577 ${M} ${D} ${V} = u_${V}; 578#endif 579`:` 580#ifndef HAS_UNIFORM_u_${V} 581 ${M} ${D} ${V} = unpack_mix_${X}(a_${V}, u_${V}_t); 582#else 583 ${M} ${D} ${V} = u_${V}; 584#endif 585`}),staticAttributes:a,staticUniforms:g}}class el{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,n,a,o,c,g,b,k,A){this.context=e;let M=this.boundPaintVertexBuffers.length!==o.length;for(let D=0;!M&&D<o.length;D++)this.boundPaintVertexBuffers[D]!==o[D]&&(M=!0);!this.vao||this.boundProgram!==n||this.boundLayoutVertexBuffer!==a||M||this.boundIndexBuffer!==c||this.boundVertexOffset!==g||this.boundDynamicVertexBuffer!==b||this.boundDynamicVertexBuffer2!==k||this.boundDynamicVertexBuffer3!==A?this.freshBind(n,a,o,c,g,b,k,A):(e.bindVertexArray.set(this.vao),b&&b.bind(),c&&c.dynamicDraw&&c.bind(),k&&k.bind(),A&&A.bind())}freshBind(e,n,a,o,c,g,b,k){const A=e.numAttributes,M=this.context,D=M.gl;this.vao&&this.destroy(),this.vao=M.createVertexArray(),M.bindVertexArray.set(this.vao),this.boundProgram=e,this.boundLayoutVertexBuffer=n,this.boundPaintVertexBuffers=a,this.boundIndexBuffer=o,this.boundVertexOffset=c,this.boundDynamicVertexBuffer=g,this.boundDynamicVertexBuffer2=b,this.boundDynamicVertexBuffer3=k,n.enableAttributes(D,e);for(const V of a)V.enableAttributes(D,e);g&&g.enableAttributes(D,e),b&&b.enableAttributes(D,e),k&&k.enableAttributes(D,e),n.bind(),n.setVertexAttribPointers(D,e,c);for(const V of a)V.bind(),V.setVertexAttribPointers(D,e,c);g&&(g.bind(),g.setVertexAttribPointers(D,e,c)),o&&o.bind(),b&&(b.bind(),b.setVertexAttribPointers(D,e,c)),k&&(k.bind(),k.setVertexAttribPointers(D,e,c)),M.currentNumAttributes=A}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const tl=(h,e,n,a,o)=>({u_matrix:h,u_texture:0,u_ele_delta:e,u_fog_matrix:n,u_fog_color:a?a.properties.get("fog-color"):l.aM.white,u_fog_ground_blend:a?a.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:a?a.calculateFogBlendOpacity(o):0,u_horizon_color:a?a.properties.get("horizon-color"):l.aM.white,u_horizon_fog_blend:a?a.properties.get("horizon-fog-blend"):1});function Ss(h){const e=[];for(let n=0;n<h.length;n++){if(h[n]===null)continue;const a=h[n].split(" ");e.push(a.pop())}return e}class il{constructor(e,n,a,o,c,g){const b=e.gl;this.program=b.createProgram();const k=Ss(n.staticAttributes),A=a?a.getBinderAttributes():[],M=k.concat(A),D=Ln.prelude.staticUniforms?Ss(Ln.prelude.staticUniforms):[],V=n.staticUniforms?Ss(n.staticUniforms):[],H=a?a.getBinderUniforms():[],X=D.concat(V).concat(H),Q=[];for(const Se of X)Q.indexOf(Se)<0&&Q.push(Se);const ne=a?a.defines():[];
vendor: 7,925 bytes, lines 585-587
585c&&ne.push("#define OVERDRAW_INSPECTOR;"),g&&ne.push("#define TERRAIN3D;");const se=ne.concat(Ln.prelude.fragmentSource,n.fragmentSource).join(` 586`),ue=ne.concat(Ln.prelude.vertexSource,n.vertexSource).join(` 587`),Y=b.createShader(b.FRAGMENT_SHADER);if(b.isContextLost())return void(this.failedToCreate=!0);if(b.shaderSource(Y,se),b.compileShader(Y),!b.getShaderParameter(Y,b.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${b.getShaderInfoLog(Y)}`);b.attachShader(this.program,Y);const me=b.createShader(b.VERTEX_SHADER);if(b.isContextLost())return void(this.failedToCreate=!0);if(b.shaderSource(me,ue),b.compileShader(me),!b.getShaderParameter(me,b.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${b.getShaderInfoLog(me)}`);b.attachShader(this.program,me),this.attributes={};const ve={};this.numAttributes=M.length;for(let Se=0;Se<this.numAttributes;Se++)M[Se]&&(b.bindAttribLocation(this.program,Se,M[Se]),this.attributes[M[Se]]=Se);if(b.linkProgram(this.program),!b.getProgramParameter(this.program,b.LINK_STATUS))throw new Error(`Program failed to link: ${b.getProgramInfoLog(this.program)}`);b.deleteShader(me),b.deleteShader(Y);for(let Se=0;Se<Q.length;Se++){const De=Q[Se];if(De&&!ve[De]){const je=b.getUniformLocation(this.program,De);je&&(ve[De]=je)}}this.fixedUniforms=o(e,ve),this.terrainUniforms=((Se,De)=>({u_depth:new l.aH(Se,De.u_depth),u_terrain:new l.aH(Se,De.u_terrain),u_terrain_dim:new l.aI(Se,De.u_terrain_dim),u_terrain_matrix:new l.aJ(Se,De.u_terrain_matrix),u_terrain_unpack:new l.aK(Se,De.u_terrain_unpack),u_terrain_exaggeration:new l.aI(Se,De.u_terrain_exaggeration)}))(e,ve),this.binderUniforms=a?a.getUniforms(e,ve):[]}draw(e,n,a,o,c,g,b,k,A,M,D,V,H,X,Q,ne,se,ue){const Y=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(a),e.setStencilMode(o),e.setColorMode(c),e.setCullFace(g),k){e.activeTexture.set(Y.TEXTURE2),Y.bindTexture(Y.TEXTURE_2D,k.depthTexture),e.activeTexture.set(Y.TEXTURE3),Y.bindTexture(Y.TEXTURE_2D,k.texture);for(const ve in this.terrainUniforms)this.terrainUniforms[ve].set(k[ve])}for(const ve in this.fixedUniforms)this.fixedUniforms[ve].set(b[ve]);Q&&Q.setUniforms(e,this.binderUniforms,H,{zoom:X});let me=0;switch(n){case Y.LINES:me=2;break;case Y.TRIANGLES:me=3;break;case Y.LINE_STRIP:me=1}for(const ve of V.get()){const Se=ve.vaos||(ve.vaos={});(Se[A]||(Se[A]=new el)).bind(e,this,M,Q?Q.getPaintVertexBuffers():[],D,ve.vertexOffset,ne,se,ue),Y.drawElements(n,ve.primitiveLength*me,Y.UNSIGNED_SHORT,ve.primitiveOffset*me*2)}}}function Ha(h,e,n){const a=1/$t(n,1,e.transform.tileZoom),o=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,e.transform.tileZoom)/o,g=c*(n.tileID.canonical.x+n.tileID.wrap*o),b=c*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[a,h.fromScale,h.toScale],u_fade:h.t,u_pixel_coord_upper:[g>>16,b>>16],u_pixel_coord_lower:[65535&g,65535&b]}}const fa=(h,e,n,a)=>{const o=e.style.light,c=o.properties.get("position"),g=[c.x,c.y,c.z],b=function(){var A=new l.A(9);return l.A!=Float32Array&&(A[1]=0,A[2]=0,A[3]=0,A[5]=0,A[6]=0,A[7]=0),A[0]=1,A[4]=1,A[8]=1,A}();o.properties.get("anchor")==="viewport"&&function(A,M){var D=Math.sin(M),V=Math.cos(M);A[0]=V,A[1]=D,A[2]=0,A[3]=-D,A[4]=V,A[5]=0,A[6]=0,A[7]=0,A[8]=1}(b,-e.transform.angle),function(A,M,D){var V=M[0],H=M[1],X=M[2];A[0]=V*D[0]+H*D[3]+X*D[6],A[1]=V*D[1]+H*D[4]+X*D[7],A[2]=V*D[2]+H*D[5]+X*D[8]}(g,g,b);const k=o.properties.get("color");return{u_matrix:h,u_lightpos:g,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[k.r,k.g,k.b],u_vertical_gradient:+n,u_opacity:a}},Wa=(h,e,n,a,o,c,g)=>l.e(fa(h,e,n,a),Ha(c,e,g),{u_height_factor:-Math.pow(2,o.overscaledZ)/g.tileSize/8}),Ts=h=>({u_matrix:h}),fu=(h,e,n,a)=>l.e(Ts(h),Ha(n,e,a)),Hc=(h,e)=>({u_matrix:h,u_world:e}),mu=(h,e,n,a,o)=>l.e(fu(h,e,n,a),{u_world:o}),Wc=(h,e,n,a)=>{const o=h.transform;let c,g;if(a.paint.get("circle-pitch-alignment")==="map"){const b=$t(n,1,o.zoom);c=!0,g=[b,b]}else c=!1,g=o.pixelsToGLUnits;return{u_camera_to_center_distance:o.cameraToCenterDistance,u_scale_with_map:+(a.paint.get("circle-pitch-scale")==="map"),u_matrix:h.translatePosMatrix(e.posMatrix,n,a.paint.get("circle-translate"),a.paint.get("circle-translate-anchor")),u_pitch_with_map:+c,u_device_pixel_ratio:h.pixelRatio,u_extrude_scale:g}},Yn=(h,e,n)=>({u_matrix:h,u_inv_matrix:e,u_camera_to_center_distance:n.cameraToCenterDistance,u_viewport_size:[n.width,n.height]}),ma=(h,e,n=1)=>({u_matrix:h,u_color:e,u_overlay:0,u_overlay_scale:n}),fr=h=>({u_matrix:h}),mr=(h,e,n,a)=>({u_matrix:h,u_extrude_scale:$t(e,1,n),u_intensity:a}),Xa=(h,e,n,a)=>{const o=l.H();l.aP(o,0,h.width,h.height,0,0,1);const c=h.context.gl;return{u_matrix:o,u_world:[c.drawingBufferWidth,c.drawingBufferHeight],u_image:n,u_color_ramp:a,u_opacity:e.paint.get("heatmap-opacity")}};function Ka(h,e){const n=Math.pow(2,e.canonical.z),a=e.canonical.y;return[new l.Z(0,a/n).toLngLat().lat,new l.Z(0,(a+1)/n).toLngLat().lat]}const Ya=(h,e,n,a)=>{const o=h.transform;return{u_matrix:yu(h,e,n,a),u_ratio:1/$t(e,1,o.zoom),u_device_pixel_ratio:h.pixelRatio,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},gu=(h,e,n,a,o)=>l.e(Ya(h,e,n,o),{u_image:0,u_image_height:a}),zs=(h,e,n,a,o)=>{const c=h.transform,g=_u(e,c);return{u_matrix:yu(h,e,n,o),u_texsize:e.imageAtlasTexture.size,u_ratio:1/$t(e,1,c.zoom),u_device_pixel_ratio:h.pixelRatio,u_image:0,u_scale:[g,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/c.pixelsToGLUnits[0],1/c.pixelsToGLUnits[1]]}},Xc=(h,e,n,a,o,c)=>{const g=h.lineAtlas,b=_u(e,h.transform),k=n.layout.get("line-cap")==="round",A=g.getDash(a.from,k),M=g.getDash(a.to,k),D=A.width*o.fromScale,V=M.width*o.toScale;return l.e(Ya(h,e,n,c),{u_patternscale_a:[b/D,-A.height/2],u_patternscale_b:[b/V,-M.height/2],u_sdfgamma:g.width/(256*Math.min(D,V)*h.pixelRatio)/2,u_image:0,u_tex_y_a:A.y,u_tex_y_b:M.y,u_mix:o.t})};function _u(h,e){return 1/$t(h,1,e.tileZoom)}function yu(h,e,n,a){return h.translatePosMatrix(a?a.posMatrix:e.tileID.posMatrix,e,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}const Kc=(h,e,n,a,o)=>{return{u_matrix:h,u_tl_parent:e,u_scale_parent:n,u_buffer_scale:1,u_fade_t:a.mix,u_opacity:a.opacity*o.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:o.paint.get("raster-brightness-min"),u_brightness_high:o.paint.get("raster-brightness-max"),u_saturation_factor:(g=o.paint.get("raster-saturation"),g>0?1-1/(1.001-g):-g),u_contrast_factor:(c=o.paint.get("raster-contrast"),c>0?1/(1-c):1+c),u_spin_weights:Yc(o.paint.get("raster-hue-rotate"))};var c,g};function Yc(h){h*=Math.PI/180;const e=Math.sin(h),n=Math.cos(h);return[(2*n+1)/3,(-Math.sqrt(3)*e-n+1)/3,(Math.sqrt(3)*e-n+1)/3]}const vu=(h,e,n,a,o,c,g,b,k,A,M,D,V,H)=>{const X=g.transform;return{u_is_size_zoom_constant:+(h==="constant"||h==="source"),u_is_size_feature_constant:+(h==="constant"||h==="camera"),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:X.cameraToCenterDistance,u_pitch:X.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:X.width/X.height,u_fade_change:g.options.fadeDuration?g.symbolFadeChange:1,u_matrix:b,u_label_plane_matrix:k,u_coord_matrix:A,u_is_text:+D,u_pitch_with_map:+a,u_is_along_line:o,u_is_variable_anchor:c,u_texsize:V,u_texture:0,u_translation:M,u_pitched_scale:H}},ga=(h,e,n,a,o,c,g,b,k,A,M,D,V,H,X)=>{const Q=g.transform;return l.e(vu(h,e,n,a,o,c,g,b,k,A,M,D,V,X),{u_gamma_scale:a?Math.cos(Q._pitch)*Q.cameraToCenterDistance:1,u_device_pixel_ratio:g.pixelRatio,u_is_halo:1})},rl=(h,e,n,a,o,c,g,b,k,A,M,D,V,H)=>l.e(ga(h,e,n,a,o,c,g,b,k,A,M,!0,D,!0,H),{u_texsize_icon:V,u_texture_icon:1}),Ja=(h,e,n)=>({u_matrix:h,u_opacity:e,u_color:n}),nl=(h,e,n,a,o,c)=>l.e(function(g,b,k,A){const M=k.imageManager.getPattern(g.from.toString()),D=k.imageManager.getPattern(g.to.toString()),{width:V,height:H}=k.imageManager.getPixelSize(),X=Math.pow(2,A.tileID.overscaledZ
vendor: 5,993 bytes, line 587
587),Q=A.tileSize*Math.pow(2,k.transform.tileZoom)/X,ne=Q*(A.tileID.canonical.x+A.tileID.wrap*X),se=Q*A.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:M.tl,u_pattern_br_a:M.br,u_pattern_tl_b:D.tl,u_pattern_br_b:D.br,u_texsize:[V,H],u_mix:b.t,u_pattern_size_a:M.displaySize,u_pattern_size_b:D.displaySize,u_scale_a:b.fromScale,u_scale_b:b.toScale,u_tile_units_to_pixels:1/$t(A,1,k.transform.tileZoom),u_pixel_coord_upper:[ne>>16,se>>16],u_pixel_coord_lower:[65535&ne,65535&se]}}(a,c,n,o),{u_matrix:h,u_opacity:e}),sl={fillExtrusion:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_lightpos:new l.aN(h,e.u_lightpos),u_lightintensity:new l.aI(h,e.u_lightintensity),u_lightcolor:new l.aN(h,e.u_lightcolor),u_vertical_gradient:new l.aI(h,e.u_vertical_gradient),u_opacity:new l.aI(h,e.u_opacity)}),fillExtrusionPattern:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_lightpos:new l.aN(h,e.u_lightpos),u_lightintensity:new l.aI(h,e.u_lightintensity),u_lightcolor:new l.aN(h,e.u_lightcolor),u_vertical_gradient:new l.aI(h,e.u_vertical_gradient),u_height_factor:new l.aI(h,e.u_height_factor),u_image:new l.aH(h,e.u_image),u_texsize:new l.aO(h,e.u_texsize),u_pixel_coord_upper:new l.aO(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new l.aO(h,e.u_pixel_coord_lower),u_scale:new l.aN(h,e.u_scale),u_fade:new l.aI(h,e.u_fade),u_opacity:new l.aI(h,e.u_opacity)}),fill:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix)}),fillPattern:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_image:new l.aH(h,e.u_image),u_texsize:new l.aO(h,e.u_texsize),u_pixel_coord_upper:new l.aO(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new l.aO(h,e.u_pixel_coord_lower),u_scale:new l.aN(h,e.u_scale),u_fade:new l.aI(h,e.u_fade)}),fillOutline:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_world:new l.aO(h,e.u_world)}),fillOutlinePattern:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_world:new l.aO(h,e.u_world),u_image:new l.aH(h,e.u_image),u_texsize:new l.aO(h,e.u_texsize),u_pixel_coord_upper:new l.aO(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new l.aO(h,e.u_pixel_coord_lower),u_scale:new l.aN(h,e.u_scale),u_fade:new l.aI(h,e.u_fade)}),circle:(h,e)=>({u_camera_to_center_distance:new l.aI(h,e.u_camera_to_center_distance),u_scale_with_map:new l.aH(h,e.u_scale_with_map),u_pitch_with_map:new l.aH(h,e.u_pitch_with_map),u_extrude_scale:new l.aO(h,e.u_extrude_scale),u_device_pixel_ratio:new l.aI(h,e.u_device_pixel_ratio),u_matrix:new l.aJ(h,e.u_matrix)}),collisionBox:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_pixel_extrude_scale:new l.aO(h,e.u_pixel_extrude_scale)}),collisionCircle:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_inv_matrix:new l.aJ(h,e.u_inv_matrix),u_camera_to_center_distance:new l.aI(h,e.u_camera_to_center_distance),u_viewport_size:new l.aO(h,e.u_viewport_size)}),debug:(h,e)=>({u_color:new l.aL(h,e.u_color),u_matrix:new l.aJ(h,e.u_matrix),u_overlay:new l.aH(h,e.u_overlay),u_overlay_scale:new l.aI(h,e.u_overlay_scale)}),clippingMask:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix)}),heatmap:(h,e)=>({u_extrude_scale:new l.aI(h,e.u_extrude_scale),u_intensity:new l.aI(h,e.u_intensity),u_matrix:new l.aJ(h,e.u_matrix)}),heatmapTexture:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_world:new l.aO(h,e.u_world),u_image:new l.aH(h,e.u_image),u_color_ramp:new l.aH(h,e.u_color_ramp),u_opacity:new l.aI(h,e.u_opacity)}),hillshade:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_image:new l.aH(h,e.u_image),u_latrange:new l.aO(h,e.u_latrange),u_light:new l.aO(h,e.u_light),u_shadow:new l.aL(h,e.u_shadow),u_highlight:new l.aL(h,e.u_highlight),u_accent:new l.aL(h,e.u_accent)}),hillshadePrepare:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_image:new l.aH(h,e.u_image),u_dimension:new l.aO(h,e.u_dimension),u_zoom:new l.aI(h,e.u_zoom),u_unpack:new l.aK(h,e.u_unpack)}),line:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_ratio:new l.aI(h,e.u_ratio),u_device_pixel_ratio:new l.aI(h,e.u_device_pixel_ratio),u_units_to_pixels:new l.aO(h,e.u_units_to_pixels)}),lineGradient:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_ratio:new l.aI(h,e.u_ratio),u_device_pixel_ratio:new l.aI(h,e.u_device_pixel_ratio),u_units_to_pixels:new l.aO(h,e.u_units_to_pixels),u_image:new l.aH(h,e.u_image),u_image_height:new l.aI(h,e.u_image_height)}),linePattern:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_texsize:new l.aO(h,e.u_texsize),u_ratio:new l.aI(h,e.u_ratio),u_device_pixel_ratio:new l.aI(h,e.u_device_pixel_ratio),u_image:new l.aH(h,e.u_image),u_units_to_pixels:new l.aO(h,e.u_units_to_pixels),u_scale:new l.aN(h,e.u_scale),u_fade:new l.aI(h,e.u_fade)}),lineSDF:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_ratio:new l.aI(h,e.u_ratio),u_device_pixel_ratio:new l.aI(h,e.u_device_pixel_ratio),u_units_to_pixels:new l.aO(h,e.u_units_to_pixels),u_patternscale_a:new l.aO(h,e.u_patternscale_a),u_patternscale_b:new l.aO(h,e.u_patternscale_b),u_sdfgamma:new l.aI(h,e.u_sdfgamma),u_image:new l.aH(h,e.u_image),u_tex_y_a:new l.aI(h,e.u_tex_y_a),u_tex_y_b:new l.aI(h,e.u_tex_y_b),u_mix:new l.aI(h,e.u_mix)}),raster:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_tl_parent:new l.aO(h,e.u_tl_parent),u_scale_parent:new l.aI(h,e.u_scale_parent),u_buffer_scale:new l.aI(h,e.u_buffer_scale),u_fade_t:new l.aI(h,e.u_fade_t),u_opacity:new l.aI(h,e.u_opacity),u_image0:new l.aH(h,e.u_image0),u_image1:new l.aH(h,e.u_image1),u_brightness_low:new l.aI(h,e.u_brightness_low),u_brightness_high:new l.aI(h,e.u_brightness_high),u_saturation_factor:new l.aI(h,e.u_saturation_factor),u_contrast_factor:new l.aI(h,e.u_contrast_factor),u_spin_weights:new l.aN(h,e.u_spin_weights)}),symbolIcon:(h,e)=>({u_is_size_zoom_constant:new l.aH(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aH(h,e.u_is_size_feature_constant),u_size_t:new l.aI(h,e.u_size_t),u_size:new l.aI(h,e.u_size),u_camera_to_center_distance:new l.aI(h,e.u_camera_to_center_distance),u_pitch:new l.aI(h,e.u_pitch),u_rotate_symbol:new l.aH(h,e.u_rotate_symbol),u_aspect_ratio:new l.aI(h,e.u_aspect_ratio),u_fade_change:new l.aI(h,e.u_fade_change),u_matrix:new l.aJ(h,e.u_matrix),u_label_plane_matrix:new l.aJ(h,e.u_label_plane_matrix
vendor: 19,837 bytes, line 587
587),u_coord_matrix:new l.aJ(h,e.u_coord_matrix),u_is_text:new l.aH(h,e.u_is_text),u_pitch_with_map:new l.aH(h,e.u_pitch_with_map),u_is_along_line:new l.aH(h,e.u_is_along_line),u_is_variable_anchor:new l.aH(h,e.u_is_variable_anchor),u_texsize:new l.aO(h,e.u_texsize),u_texture:new l.aH(h,e.u_texture),u_translation:new l.aO(h,e.u_translation),u_pitched_scale:new l.aI(h,e.u_pitched_scale)}),symbolSDF:(h,e)=>({u_is_size_zoom_constant:new l.aH(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aH(h,e.u_is_size_feature_constant),u_size_t:new l.aI(h,e.u_size_t),u_size:new l.aI(h,e.u_size),u_camera_to_center_distance:new l.aI(h,e.u_camera_to_center_distance),u_pitch:new l.aI(h,e.u_pitch),u_rotate_symbol:new l.aH(h,e.u_rotate_symbol),u_aspect_ratio:new l.aI(h,e.u_aspect_ratio),u_fade_change:new l.aI(h,e.u_fade_change),u_matrix:new l.aJ(h,e.u_matrix),u_label_plane_matrix:new l.aJ(h,e.u_label_plane_matrix),u_coord_matrix:new l.aJ(h,e.u_coord_matrix),u_is_text:new l.aH(h,e.u_is_text),u_pitch_with_map:new l.aH(h,e.u_pitch_with_map),u_is_along_line:new l.aH(h,e.u_is_along_line),u_is_variable_anchor:new l.aH(h,e.u_is_variable_anchor),u_texsize:new l.aO(h,e.u_texsize),u_texture:new l.aH(h,e.u_texture),u_gamma_scale:new l.aI(h,e.u_gamma_scale),u_device_pixel_ratio:new l.aI(h,e.u_device_pixel_ratio),u_is_halo:new l.aH(h,e.u_is_halo),u_translation:new l.aO(h,e.u_translation),u_pitched_scale:new l.aI(h,e.u_pitched_scale)}),symbolTextAndIcon:(h,e)=>({u_is_size_zoom_constant:new l.aH(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aH(h,e.u_is_size_feature_constant),u_size_t:new l.aI(h,e.u_size_t),u_size:new l.aI(h,e.u_size),u_camera_to_center_distance:new l.aI(h,e.u_camera_to_center_distance),u_pitch:new l.aI(h,e.u_pitch),u_rotate_symbol:new l.aH(h,e.u_rotate_symbol),u_aspect_ratio:new l.aI(h,e.u_aspect_ratio),u_fade_change:new l.aI(h,e.u_fade_change),u_matrix:new l.aJ(h,e.u_matrix),u_label_plane_matrix:new l.aJ(h,e.u_label_plane_matrix),u_coord_matrix:new l.aJ(h,e.u_coord_matrix),u_is_text:new l.aH(h,e.u_is_text),u_pitch_with_map:new l.aH(h,e.u_pitch_with_map),u_is_along_line:new l.aH(h,e.u_is_along_line),u_is_variable_anchor:new l.aH(h,e.u_is_variable_anchor),u_texsize:new l.aO(h,e.u_texsize),u_texsize_icon:new l.aO(h,e.u_texsize_icon),u_texture:new l.aH(h,e.u_texture),u_texture_icon:new l.aH(h,e.u_texture_icon),u_gamma_scale:new l.aI(h,e.u_gamma_scale),u_device_pixel_ratio:new l.aI(h,e.u_device_pixel_ratio),u_is_halo:new l.aH(h,e.u_is_halo),u_translation:new l.aO(h,e.u_translation),u_pitched_scale:new l.aI(h,e.u_pitched_scale)}),background:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_opacity:new l.aI(h,e.u_opacity),u_color:new l.aL(h,e.u_color)}),backgroundPattern:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_opacity:new l.aI(h,e.u_opacity),u_image:new l.aH(h,e.u_image),u_pattern_tl_a:new l.aO(h,e.u_pattern_tl_a),u_pattern_br_a:new l.aO(h,e.u_pattern_br_a),u_pattern_tl_b:new l.aO(h,e.u_pattern_tl_b),u_pattern_br_b:new l.aO(h,e.u_pattern_br_b),u_texsize:new l.aO(h,e.u_texsize),u_mix:new l.aI(h,e.u_mix),u_pattern_size_a:new l.aO(h,e.u_pattern_size_a),u_pattern_size_b:new l.aO(h,e.u_pattern_size_b),u_scale_a:new l.aI(h,e.u_scale_a),u_scale_b:new l.aI(h,e.u_scale_b),u_pixel_coord_upper:new l.aO(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new l.aO(h,e.u_pixel_coord_lower),u_tile_units_to_pixels:new l.aI(h,e.u_tile_units_to_pixels)}),terrain:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_texture:new l.aH(h,e.u_texture),u_ele_delta:new l.aI(h,e.u_ele_delta),u_fog_matrix:new l.aJ(h,e.u_fog_matrix),u_fog_color:new l.aL(h,e.u_fog_color),u_fog_ground_blend:new l.aI(h,e.u_fog_ground_blend),u_fog_ground_blend_opacity:new l.aI(h,e.u_fog_ground_blend_opacity),u_horizon_color:new l.aL(h,e.u_horizon_color),u_horizon_fog_blend:new l.aI(h,e.u_horizon_fog_blend)}),terrainDepth:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_ele_delta:new l.aI(h,e.u_ele_delta)}),terrainCoords:(h,e)=>({u_matrix:new l.aJ(h,e.u_matrix),u_texture:new l.aH(h,e.u_texture),u_terrain_coords_id:new l.aI(h,e.u_terrain_coords_id),u_ele_delta:new l.aI(h,e.u_ele_delta)}),sky:(h,e)=>({u_sky_color:new l.aL(h,e.u_sky_color),u_horizon_color:new l.aL(h,e.u_horizon_color),u_horizon:new l.aI(h,e.u_horizon),u_sky_horizon_blend:new l.aI(h,e.u_sky_horizon_blend)})};class mn{constructor(e,n,a){this.context=e;const o=e.gl;this.buffer=o.createBuffer(),this.dynamicDraw=!!a,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),o.bufferData(o.ELEMENT_ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?o.DYNAMIC_DRAW:o.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){const n=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),n.bufferSubData(n.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Jc={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class al{constructor(e,n,a,o){this.length=n.length,this.attributes=a,this.itemSize=n.bytesPerElement,this.dynamicDraw=o,this.context=e;const c=e.gl;this.buffer=c.createBuffer(),e.bindVertexBuffer.set(this.buffer),c.bufferData(c.ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?c.DYNAMIC_DRAW:c.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);const n=this.context.gl;this.bind(),n.bufferSubData(n.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,n){for(let a=0;a<this.attributes.length;a++){const o=n.attributes[this.attributes[a].name];o!==void 0&&e.enableVertexAttribArray(o)}}setVertexAttribPointers(e,n,a){for(let o=0;o<this.attributes.length;o++){const c=this.attributes[o],g=n.attributes[c.name];g!==void 0&&e.vertexAttribPointer(g,c.components,e[Jc[c.type]],!1,this.itemSize,c.offset+this.itemSize*(a||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Jn=new WeakMap;function Rn(h){var e;if(Jn.has(h))return Jn.get(h);{const n=(e=h.getParameter(h.VERSION))===null||e===void 0?void 0:e.startsWith("WebGL 2.0");return Jn.set(h,n),n}}class Jt{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Qa extends Jt{getDefault(){return l.aM.transparent}set(e){const n=this.current;(e.r!==n.r||e.g!==n.g||e.b!==n.b||e.a!==n.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class Qc extends Jt{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class Cs extends Jt{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class eh extends Jt{getDefault(){return[!0,!0,!0,!0]}set(e){const n=this.current;(e[0]!==n[0]||e[1]!==n[1]||e[2]!==n[2]||e[3]!==n[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class xu extends Jt{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class th extends Jt{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class bu extends Jt{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){const n=this.current;(e.func!==n.func||e.ref!==n.ref||e.mask!==n.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class ol extends Jt{getDefault(){const e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){const n=this.current;(e[0]!==n[0]||e[1]!==n[1]||e[2]!==n[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class wu extends Jt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const n=this.gl;e?n.enable(n.STENCIL_TEST):n.disable(n.STENCIL_TEST),this.current=e,this.dirty=!1}}class ku extends Jt{getDefault(){return[0,1]}set(e){const n=this.current;(e[0]!==n[0]||e[1]!==n[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class Su extends Jt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const n=this.gl;e?n.enable(n.DEPTH_TEST):n.disable(n.DEPTH_TEST),this.current=e,this.dirty=!1}}class Tu extends Jt{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class Qn extends Jt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const n=this.gl;e?n.enable(n.BLEND):n.disable(n.BLEND),this.current=e,this.dirty=!1}}class zu extends Jt{getDefault(){const e=this.gl;return[e.ONE,e.ZERO]}set(e){const n=this.current;(e[0]!==n[0]||e[1]!==n[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class ih extends Jt{getDefault(){return l.aM.transparent}set(e){const n=this.current;(e.r!==n.r||e.g!==n.g||e.b!==n.b||e.a!==n.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class Cu extends Jt{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class _a extends Jt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const n=this.gl;e?n.enable(n.CULL_FACE):n.disable(n.CULL_FACE),this.current=e,this.dirty=!1}}class rh extends Jt{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class eo extends Jt{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class nh extends Jt{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class sh extends Jt{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class Au extends Jt{getDefault(){const e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){const n=this.current;(e[0]!==n[0]||e[1]!==n[1]||e[2]!==n[2]||e[3]!==n[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class Pu extends Jt{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const n=this.gl;n.bindFramebuffer(n.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class Iu extends Jt{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const n=this.gl;n.bindRenderbuffer(n.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class ll extends Jt{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const n=this.gl;n.bindTexture(n.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class Eu extends Jt{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const n=this.gl;n.bindBuffer(n.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class to extends Jt{getDefault(){return null}set(e){const n=this.gl;n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class Tn extends Jt{getDefault(){return null}set(e){var n;if(e===this.current&&!this.dirty)return;const a=this.gl;Rn(a)?a.bindVertexArray(e):(n=a.getExtension("OES_vertex_array_object"))===null||n===void 0||n.bindVertexArrayOES(e),this.current=e,this.dirty=!1}}class ul extends Jt{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;const n=this.gl;n.pixelStorei(n.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class cl extends Jt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const n=this.gl;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class hl extends Jt{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const n=this.gl;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class io extends Jt{constructor(e,n){super(e),this.context=e,this.parent=n}getDefault(){return null}}class dl extends io{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const n=this.gl;n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class es extends io{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const n=this.gl;n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class pl extends io{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const n=this.gl;n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class ah{constructor(e,n,a,o,c){this.context=e,this.width=n,this.height=a;const g=e.gl,b=this.framebuffer=g.createFramebuffer();if(this.colorAttachment=new dl(e,b),o)this.depthAttachment=c?new pl(e,b):new es(e,b);else if(c)throw new Error("Stencil cannot be set without depth");if(g.checkFramebufferStatus(g.FRAMEBUFFER)!==g.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const e=this.context.gl,n=this.colorAttachment.get();if(n&&e.deleteTexture(n),this.depthAttachment){const a=this.depthAttachment.get();a&&e.deleteRenderbuffer(a)}e.deleteFramebuffer(this.framebuffer)}}class Ai{constructor(e,n,a){this.blendFunction=e,this.blendColor=n,this.mask=a}}Ai.Replace=[1,0],Ai.disabled=new Ai(Ai.Replace,l.aM.transparent,[!1,!1,!1,!1]),Ai.unblended=new Ai(Ai.Replace,l.aM.transparent,[!0,!0,!0,!0]),Ai.alphaBlended=new Ai([1,771],l.aM.transparent,[!0,!0,!0,!0]);class oh{constructor(e){var n,a;if(this.gl=e,this.clearColor=new Qa(this),this.clearDepth=new Qc(this),this.clearStencil=new Cs(this),this.colorMask=new eh(this),this.depthMask=new xu(this),this.stencilMask=new th(this),this.stencilFunc=new bu(this),this.stencilOp=new ol(this),this.stencilTest=new wu(this),this.depthRange=new ku(this),this.depthTest=new Su(this),this.depthFunc=new Tu(this),this.blend=new Qn(this),this.blendFunc=new zu(this),this.blendColor=new ih(this),this.blendEquation=new Cu(this),this.cullFace=new _a(this),this.cullFaceSide=new rh(this),this.frontFace=new eo(this),this.program=new nh(this),this.activeTexture=new sh(this),this.viewport=new Au(this),this.bindFramebuffer=new Pu(this),this.bindRenderbuffer=new Iu(this),this.bindTexture=new ll(this),this.bindVertexBuffer=new Eu(this),this.bindElementBuffer=new to(this),this.bindVertexArray=new Tn(this),this.pixelStoreUnpack=new ul(this),this.pixelStoreUnpackPremultiplyAlpha=new cl(this),this.pixelStoreUnpackFlipY=new hl(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),Rn(e)){this.HALF_FLOAT=e.HALF_FLOAT;const o=e.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(n=e.RGBA16F)!==null&&n!==void 0?n:o==null?void 0:o.RGBA16F_EXT,this.RGB16F=(a=e.RGB16F)!==null&&a!==void 0?a:o==null?void 0:o.RGB16F_EXT,e.getExtension("EXT_color_buffer_float")}else{e.getExtension("EXT_color_buffer_half_float"),e.getExtension("OES_texture_half_float_linear");const o=e.getExtension("OES_texture_half_float");this.HALF_FLOAT=o==null?void 0:o.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(e,n){return new mn(this,e,n)}createVertexBuffer(e,n,a){return new al(this,e,n,a)}createRenderbuffer(e,n,a){const o=this.gl,c=o.createRenderbuffer();return this.bindRenderbuffer.set(c),o.renderbufferStorage(o.RENDERBUFFER,e,n,a),this.bindRenderbuffer.set(null),c}createFramebuffer(e,n,a,o){return new ah(this,e,n,a,o)}clear({color:e,depth:n,stencil:a}){const o=this.gl;let c=0;e&&(c|=o.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),n!==void 0&&(c|=o.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(n),this.depthMask.set(!0)),a!==void 0&&(c|=o.STENCIL_BUFFER_BIT,this.clearStencil.set(a),this.stencilMask.set(255)),o.clear(c)}setCullFace(e){e.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(e){l.aE(e.blendFunction,Ai.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){var e;return Rn(this.gl)?this.gl.createVertexArray():(e=this.gl.getExtension("OES_vertex_array_object"))===null||e===void 0?void 0:e.createVertexArrayOES()}deleteVertexArray(e){var n;return Rn(this.gl)?this.gl.deleteVertexArray(e):(n=this.gl.getExtension("OES_vertex_array_object"))===null||n===void 0?void 0:n.deleteVertexArrayOES(e)}unbindVAO(){this.bindVertexArray.set(null)}}class Bt{constructor(e,n,a){this.func=e,this.mask=n,this.range=a}}Bt.ReadOnly=!1,Bt.ReadWrite=!0,Bt.disabled=new Bt(519,Bt.ReadOnly,[0,1]);const ro=7680;class di{constructor(e,n,a,o,c,g){this.test=e,this.ref=n,this.mask=a,this.fail=o,this.depthFail=c,this.pass=g}}di.disabled=new di({func:519,mask:0},0,0,ro,ro,ro);class si{constructor(e,n,a){this.enable=e,this.mode=n,this.frontFace=a}}let ts;function ya(h,e,n,a,o){const c=h.context,g=c.gl,b=h.useProgram("collisionBox"),k=[];let A=0,M=0;for(let se=0;se<a.length;se++){const ue=a[se],Y=e.getTile(ue).getBucket(n);if(!Y)continue;const me=o?Y.textCollisionBox:Y.iconCollisionBox,ve=Y.collisionCircleArray;
vendor: 4,393 bytes, line 587
587if(ve.length>0){const Se=l.H();l.aQ(Se,Y.placementInvProjMatrix,h.transform.glCoordMatrix),l.aQ(Se,Se,Y.placementViewportMatrix),k.push({circleArray:ve,circleOffset:M,transform:ue.posMatrix,invTransform:Se,coord:ue}),A+=ve.length/4,M=A}me&&b.draw(c,g.LINES,Bt.disabled,di.disabled,h.colorModeForRenderPass(),si.disabled,{u_matrix:ue.posMatrix,u_pixel_extrude_scale:[1/(D=h.transform).width,1/D.height]},h.style.map.terrain&&h.style.map.terrain.getTerrainData(ue),n.id,me.layoutVertexBuffer,me.indexBuffer,me.segments,null,h.transform.zoom,null,null,me.collisionVertexBuffer)}var D;if(!o||!k.length)return;const V=h.useProgram("collisionCircle"),H=new l.aR;H.resize(4*A),H._trim();let X=0;for(const se of k)for(let ue=0;ue<se.circleArray.length/4;ue++){const Y=4*ue,me=se.circleArray[Y+0],ve=se.circleArray[Y+1],Se=se.circleArray[Y+2],De=se.circleArray[Y+3];H.emplace(X++,me,ve,Se,De,0),H.emplace(X++,me,ve,Se,De,1),H.emplace(X++,me,ve,Se,De,2),H.emplace(X++,me,ve,Se,De,3)}(!ts||ts.length<2*A)&&(ts=function(se){const ue=2*se,Y=new l.aT;Y.resize(ue),Y._trim();for(let me=0;me<ue;me++){const ve=6*me;Y.uint16[ve+0]=4*me+0,Y.uint16[ve+1]=4*me+1,Y.uint16[ve+2]=4*me+2,Y.uint16[ve+3]=4*me+2,Y.uint16[ve+4]=4*me+3,Y.uint16[ve+5]=4*me+0}return Y}(A));const Q=c.createIndexBuffer(ts,!0),ne=c.createVertexBuffer(H,l.aS.members,!0);for(const se of k){const ue=Yn(se.transform,se.invTransform,h.transform);V.draw(c,g.TRIANGLES,Bt.disabled,di.disabled,h.colorModeForRenderPass(),si.disabled,ue,h.style.map.terrain&&h.style.map.terrain.getTerrainData(se.coord),n.id,ne,Q,l.a0.simpleSegment(0,2*se.circleOffset,se.circleArray.length,se.circleArray.length/2),null,h.transform.zoom,null,null,null)}ne.destroy(),Q.destroy()}si.disabled=new si(!1,1029,2305),si.backCCW=new si(!0,1029,2305);const va=l.an(new Float32Array(16));function fl(h,e,n,a,o,c){const{horizontalAlign:g,verticalAlign:b}=l.au(h);return new l.P((-(g-.5)*e/o+a[0])*c,(-(b-.5)*n/o+a[1])*c)}function is(h,e,n,a,o,c){const g=e.tileAnchorPoint.add(new l.P(e.translation[0],e.translation[1]));if(e.pitchWithMap){let b=a.mult(c);n||(b=b.rotate(-o));const k=g.add(b);return te(k.x,k.y,e.labelPlaneMatrix,e.getElevation).point}if(n){const b=Ie(e.tileAnchorPoint.x+1,e.tileAnchorPoint.y,e).point.sub(h),k=Math.atan(b.y/b.x)+(b.x<0?Math.PI:0);return h.add(a.rotate(k))}return h.add(a)}function As(h,e,n,a,o,c,g,b,k,A,M,D,V,H){const X=h.text.placedSymbolArray,Q=h.text.dynamicLayoutVertexArray,ne=h.icon.dynamicLayoutVertexArray,se={};Q.clear();for(let ue=0;ue<X.length;ue++){const Y=X.get(ue),me=Y.hidden||!Y.crossTileID||h.allowVerticalPlacement&&!Y.placedOrientation?null:a[Y.crossTileID];if(me){const ve=new l.P(Y.anchorX,Y.anchorY),Se={getElevation:H,width:o.width,height:o.height,labelPlaneMatrix:c,pitchWithMap:n,projection:M,tileAnchorPoint:ve,translation:D,unwrappedTileID:V},De=n?te(ve.x,ve.y,g,H):Ie(ve.x,ve.y,Se),je=$(o.cameraToCenterDistance,De.signedDistanceFromCamera);let Qe=l.ai(h.textSizeData,k,Y)*je/l.ap;n&&(Qe*=h.tilePixelRatio/b);const{width:nt,height:Xe,anchor:We,textOffset:ht,textBoxScale:zt}=me,Ye=fl(We,nt,Xe,ht,zt,Qe),it=M.getPitchedTextCorrection(o,ve.add(new l.P(D[0],D[1])),V),St=is(De.point,Se,e,Ye,o.angle,it),gi=h.allowVerticalPlacement&&Y.placedOrientation===l.ah.vertical?Math.PI/2:0;for(let Dt=0;Dt<Y.numGlyphs;Dt++)l.aj(Q,St,gi);A&&Y.associatedIconIndex>=0&&(se[Y.associatedIconIndex]={shiftedAnchor:St,angle:gi})}else vt(Y.numGlyphs,Q)}if(A){ne.clear();const ue=h.icon.placedSymbolArray;for(let Y=0;Y<ue.length;Y++){const me=ue.get(Y);if(me.hidden)vt(me.numGlyphs,ne);else{const ve=se[Y];if(ve)for(let Se=0;Se<me.numGlyphs;Se++)l.aj(ne,ve.shiftedAnchor,ve.angle);else vt(me.numGlyphs,ne)}}h.icon.dynamicLayoutVertexBuffer.updateData(ne)}h.text.dynamicLayoutVertexBuffer.updateData(Q)}function Or(h,e,n){return n.iconsInText&&e?"symbolTextAndIcon":h?"symbolSDF":"symbolIcon"}function ml(h,e,n,a,o,c,g,b,k,A,M,D){const V=h.context,H=V.gl,X=h.transform,Q=Xn(),ne=b==="map",se=k==="map",ue=b!=="viewport"&&n.layout.get("symbol-placement")!=="point",Y=ne&&!se&&!ue,me=!se&&ue,ve=!n.layout.get("symbol-sort-key").isConstant();let Se=!1;const De=h.depthModeForSublayer(0,Bt.ReadOnly),je=n._unevaluatedLayout.hasValue("text-variable-anchor")||n._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Qe=[],nt=Q.getCircleRadiusCorrection(X);for(const Xe of a){const We=e.getTile(Xe),ht=We.getBucket(n);if(!ht)continue;
587const zt=o?ht.text:ht.icon;if(!zt||!zt.segments.get().length||!zt.hasVisibleVertices)continue;const Ye=zt.programConfigurations.get(n.id),it=o||ht.sdfIcons,St=o?ht.textSizeData:ht.iconSizeData,gi=se||X.pitch!==0,Dt=h.useProgram(Or(it,o,ht),Ye),jt=l.ag(St,X.zoom),_i=h.style.map.terrain&&h.style.map.terrain.getTerrainData(Xe);let Ki,en,yi,gr,lr=[0,0],Yi=null;if(o)en=We.glyphAtlasTexture,yi=H.LINEAR,Ki=We.glyphAtlasTexture.size,ht.iconsInText&&(lr=We.imageAtlasTexture.size,Yi=We.imageAtlasTexture,gr=gi||h.options.rotating||h.options.zooming||St.kind==="composite"||St.kind==="camera"?H.LINEAR:H.NEAREST);else{const Ut=n.layout.get("icon-size").constantOr(0)!==1||ht.iconsNeedLinear;en=We.imageAtlasTexture,yi=it||h.options.rotating||h.options.zooming||Ut||gi?H.LINEAR:H.NEAREST,Ki=We.imageAtlasTexture.size}const ur=$t(We,1,h.transform.zoom),yn=me?Xe.posMatrix:va,Us=Dn(yn,se,ne,h.transform,ur),ko=fn(yn,se,ne,h.transform,ur),Gs=fn(Xe.posMatrix,se,ne,h.transform,ur),Vr=Q.translatePosition(h.transform,We,c,g),So=je&&ht.hasTextData(),jl=n.layout.get("icon-text-fit")!=="none"&&So&&ht.hasIconData();if(ue){const Ut=h.style.map.terrain?(qs,Zs)=>h.style.map.terrain.getElevation(Xe,qs,Zs):null,os=n.layout.get("text-rotation-alignment")==="map";Z(ht,Xe.posMatrix,h,o,Us,Gs,se,A,os,Q,Xe.toUnwrapped(),X.width,X.height,Vr,Ut)}const Nr=Xe.posMatrix,Ur=o&&je||jl,Bn=ue||Ur?va:Us,tn=ko,qi=it&&n.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Ji;Ji=it?ht.iconsInText?rl(St.kind,jt,Y,se,ue,Ur,h,Nr,Bn,tn,Vr,Ki,lr,nt):ga(St.kind,jt,Y,se,ue,Ur,h,Nr,Bn,tn,Vr,o,Ki,!0,nt):vu(St.kind,jt,Y,se,ue,Ur,h,Nr,Bn,tn,Vr,o,Ki,nt);const Er={program:Dt,buffers:zt,uniformValues:Ji,atlasTexture:en,atlasTextureIcon:Yi,atlasInterpolation:yi,atlasInterpolationIcon:gr,isSDF:it,hasHalo:qi};if(ve&&ht.canOverlap){Se=!0;const Ut=zt.segments.get();for(const os of Ut)Qe.push({segments:new l.a0([os]),sortKey:os.sortKey,state:Er,terrainData:_i})}else Qe.push({segments:zt.segments,sortKey:0,state:Er,terrainData:_i})}Se&&Qe.sort((Xe,We)=>Xe.sortKey-We.sortKey);for(const Xe of Qe){const We=Xe.state;if(V.activeTexture.set(H.TEXTURE0),We.atlasTexture.bind(We.atlasInterpolation,H.CLAMP_TO_EDGE),We.atlasTextureIcon&&(V.activeTexture.set(H.TEXTURE1),We.atlasTextureIcon&&We.atlasTextureIcon.bind(We.atlasInterpolationIcon,H.CLAMP_TO_EDGE)),We.isSDF){const ht=We.uniformValues;We.hasHalo&&(ht.u_is_halo=1,gl(We.buffers,Xe.segments,n,h,We.program,De,M,D,ht,Xe.terrainData)),ht.u_is_halo=0}gl(We.buffers,Xe.segments,n,h,We.program,De,M,D,We.uniformValues,Xe.terrainData)}}function gl(h,e,n,a,o,c,g,b,k,A){const M=a.context;o.draw(M,M.gl.TRIANGLES,c,g,b,si.disabled,k,A,n.id,h.layoutVertexBuffer,h.indexBuffer,e,n.paint,a.transform.zoom,h.programConfigurations.get(n.id),h.dynamicLayoutVertexBuffer,h.opacityVertexBuffer)}function _l(h,e,n,a){const o=h.context,c=o.gl,g=di.disabled,b=new Ai([c.ONE,c.ONE],l.aM.transparent,[!0,!0,!0,!0]),k=e.getBucket(n);if(!k)return;const A=a.key;let M=n.heatmapFbos.get(A);M||(M=xa(o,e.tileSize,e.tileSize),n.heatmapFbos.set(A,M)),o.bindFramebuffer.set(M.framebuffer),o.viewport.set([0,0,e.tileSize,e.tileSize]),o.clear({color:l.aM.transparent});const D=k.programConfigurations.get(n.id),V=h.useProgram("heatmap",D),H=h.style.map.terrain.getTerrainData(a);V.draw(o,c.TRIANGLES,Bt.disabled,g,b,si.disabled,mr(a.posMatrix,e,h.transform.zoom,n.paint.get("heatmap-intensity")),H,n.id,k.layoutVertexBuffer,k.indexBuffer,k.segments,n.paint,h.transform.zoom,D)}function rs(h,e,n){const a=h.context,o=a.gl;a.setColorMode(h.colorModeForRenderPass());const c=ba(a,e),g=n.key,b=e.heatmapFbos.get(g);b&&(a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,b.colorAttachment.get()),a.activeTexture.set(o.TEXTURE1),c.bind(o.LINEAR,o.CLAMP_TO_EDGE),h.useProgram("heatmapTexture").draw(a,o.TRIANGLES,Bt.disabled,di.disabled,h.colorModeForRenderPass(),si.disabled,Xa(h,e,0,1),null,e.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments,e.paint,h.transform.zoom),b.destroy(),e.heatmapFbos.delete(g))}function xa(h,e,n){var a,o;const c=h.gl,g=c.createTexture();c.bindTexture(c.TEXTURE_2D,g),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);const b=(a=h.HALF_FLOAT)!==null&&a!==void 0?a:c.UNSIGNED_BYTE,k=(o=h.RGBA16F)!==null&&o!==void 0?o:c.RGBA;c.texImage2D(c.TEXTURE_2D,0,k,e,n,0,c.RGBA,b,null);const A=h.createFramebuffer(e,n,!1,!1);return A.colorAttachment.set(g),A}function ba(h,e){return e.colorRampTexture||(e.colorRampTexture=new Pt(h,e.colorRamp,h.gl.RGBA)),e.colorRampTexture}function Ps(h,e,n,a,o){if(!n||!a||!a.imageAtlas)return;const c=a.imageAtlas.patternPositions;let g=c[n.to.toString()],b=c[n.from.toString()];if(!g&&b&&(g=b),!b&&g&&(b=g),!g||!b){const k=o.getPaintProperty(e);g=c[k],b=c[k]}g&&b&&h.setConstantPatternPositions(g,b)}function wa(h,e,n,a,o,c,g){const b=h.context.gl,k="fill-pattern",A=n.paint.get(k),M=A&&A.constantOr(1),D=n.getCrossfadeParameters();let V,H,X,Q,ne;g?(H=M&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",V=b.LINES):(H=M?"fillPattern":"fill",V=b.TRIANGLES);const se=A.constantOr(null);for(const ue of a){const Y=e.getTile(ue);if(M&&!Y.patternsLoaded())continue;const me=Y.getBucket(n);if(!me)continue;const ve=me.programConfigurations.get(n.id),Se=h.useProgram(H,ve),De=h.style.map.terrain&&h.style.map.terrain.getTerrainData(ue);M&&(h.context.activeTexture.set(b.TEXTURE0),Y.imageAtlasTexture.bind(b.LINEAR,b.CLAMP_TO_EDGE),ve.updatePaintBuffers(D)),Ps(ve,k,se,Y,n);const je=De?ue:null,Qe=h.translatePosMatrix(je?je.posMatrix:ue.posMatrix,Y,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(g){Q=me.indexBuffer2,ne=me.segments2;const nt=[b.drawingBufferWidth,b.drawingBufferHeight];X=H==="fillOutlinePattern"&&M?mu(Qe,h,D,Y,nt):Hc(Qe,nt)}else Q=me.indexBuffer,ne=me.segments,X=M?fu(Qe,h,D,Y):Ts(Qe);Se.draw(h.context,V,o,h.stencilModeForClipping(ue),c,si.disabled,X,De,n.id,me.layoutVertexBuffer,Q,ne,n.paint,h.transform.zoom,ve)}}
vendor: 11,751 bytes, line 587
587function no(h,e,n,a,o,c,g){const b=h.context,k=b.gl,A="fill-extrusion-pattern",M=n.paint.get(A),D=M.constantOr(1),V=n.getCrossfadeParameters(),H=n.paint.get("fill-extrusion-opacity"),X=M.constantOr(null);for(const Q of a){const ne=e.getTile(Q),se=ne.getBucket(n);if(!se)continue;const ue=h.style.map.terrain&&h.style.map.terrain.getTerrainData(Q),Y=se.programConfigurations.get(n.id),me=h.useProgram(D?"fillExtrusionPattern":"fillExtrusion",Y);D&&(h.context.activeTexture.set(k.TEXTURE0),ne.imageAtlasTexture.bind(k.LINEAR,k.CLAMP_TO_EDGE),Y.updatePaintBuffers(V)),Ps(Y,A,X,ne,n);const ve=h.translatePosMatrix(Q.posMatrix,ne,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),Se=n.paint.get("fill-extrusion-vertical-gradient"),De=D?Wa(ve,h,Se,H,Q,V,ne):fa(ve,h,Se,H);me.draw(b,b.gl.TRIANGLES,o,c,g,si.backCCW,De,ue,n.id,se.layoutVertexBuffer,se.indexBuffer,se.segments,n.paint,h.transform.zoom,Y,h.style.map.terrain&&se.centroidVertexBuffer)}}function Is(h,e,n,a,o,c,g){const b=h.context,k=b.gl,A=n.fbo;if(!A)return;const M=h.useProgram("hillshade"),D=h.style.map.terrain&&h.style.map.terrain.getTerrainData(e);b.activeTexture.set(k.TEXTURE0),k.bindTexture(k.TEXTURE_2D,A.colorAttachment.get()),M.draw(b,k.TRIANGLES,o,c,g,si.disabled,((V,H,X,Q)=>{const ne=X.paint.get("hillshade-shadow-color"),se=X.paint.get("hillshade-highlight-color"),ue=X.paint.get("hillshade-accent-color");let Y=X.paint.get("hillshade-illumination-direction")*(Math.PI/180);X.paint.get("hillshade-illumination-anchor")==="viewport"&&(Y-=V.transform.angle);const me=!V.options.moving;return{u_matrix:Q?Q.posMatrix:V.transform.calculatePosMatrix(H.tileID.toUnwrapped(),me),u_image:0,u_latrange:Ka(0,H.tileID),u_light:[X.paint.get("hillshade-exaggeration"),Y],u_shadow:ne,u_highlight:se,u_accent:ue}})(h,n,a,D?e:null),D,a.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments)}function Es(h,e,n,a,o,c){const g=h.context,b=g.gl,k=e.dem;if(k&&k.data){const A=k.dim,M=k.stride,D=k.getPixels();if(g.activeTexture.set(b.TEXTURE1),g.pixelStoreUnpackPremultiplyAlpha.set(!1),e.demTexture=e.demTexture||h.getTileTexture(M),e.demTexture){const H=e.demTexture;H.update(D,{premultiply:!1}),H.bind(b.NEAREST,b.CLAMP_TO_EDGE)}else e.demTexture=new Pt(g,D,b.RGBA,{premultiply:!1}),e.demTexture.bind(b.NEAREST,b.CLAMP_TO_EDGE);g.activeTexture.set(b.TEXTURE0);let V=e.fbo;if(!V){const H=new Pt(g,{width:A,height:A,data:null},b.RGBA);H.bind(b.LINEAR,b.CLAMP_TO_EDGE),V=e.fbo=g.createFramebuffer(A,A,!0,!1),V.colorAttachment.set(H.texture)}g.bindFramebuffer.set(V.framebuffer),g.viewport.set([0,0,A,A]),h.useProgram("hillshadePrepare").draw(g,b.TRIANGLES,a,o,c,si.disabled,((H,X)=>{const Q=X.stride,ne=l.H();return l.aP(ne,0,l.X,-l.X,0,0,1),l.J(ne,ne,[0,-l.X,0]),{u_matrix:ne,u_image:1,u_dimension:[Q,Q],u_zoom:H.overscaledZ,u_unpack:X.getUnpackVector()}})(e.tileID,k),null,n.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments),e.needsHillshadePrepare=!1}}function Mu(h,e,n,a,o,c){const g=a.paint.get("raster-fade-duration");if(!c&&g>0){const b=F.now(),k=(b-h.timeAdded)/g,A=e?(b-e.timeAdded)/g:-1,M=n.getSource(),D=o.coveringZoomLevel({tileSize:M.tileSize,roundZoom:M.roundZoom}),V=!e||Math.abs(e.tileID.overscaledZ-D)>Math.abs(h.tileID.overscaledZ-D),H=V&&h.refreshedUponExpiration?1:l.ac(V?k:1-A,0,1);return h.refreshedUponExpiration&&k>=1&&(h.refreshedUponExpiration=!1),e?{opacity:1,mix:1-H}:{opacity:H,mix:0}}return{opacity:1,mix:0}}const yl=new l.aM(1,0,0,1),Xt=new l.aM(0,1,0,1),so=new l.aM(0,0,1,1),lh=new l.aM(1,0,1,1),Du=new l.aM(0,1,1,1);function Ms(h,e,n,a){ao(h,0,e+n/2,h.transform.width,n,a)}function Lu(h,e,n,a){ao(h,e-n/2,0,n,h.transform.height,a)}function ao(h,e,n,a,o,c){const g=h.context,b=g.gl;b.enable(b.SCISSOR_TEST),b.scissor(e*h.pixelRatio,n*h.pixelRatio,a*h.pixelRatio,o*h.pixelRatio),g.clear({color:c}),b.disable(b.SCISSOR_TEST)}function Ru(h,e,n){const a=h.context,o=a.gl,c=n.posMatrix,g=h.useProgram("debug"),b=Bt.disabled,k=di.disabled,A=h.colorModeForRenderPass(),M="$debug",D=h.style.map.terrain&&h.style.map.terrain.getTerrainData(n);a.activeTexture.set(o.TEXTURE0);const V=e.getTileByID(n.key).latestRawTileData,H=Math.floor((V&&V.byteLength||0)/1024),X=e.getTile(n).tileSize,Q=512/Math.min(X,512)*(n.overscaledZ/h.transform.zoom)*.5;let ne=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(ne+=` => ${n.overscaledZ}`),function(se,ue){se.initDebugOverlayCanvas();const Y=se.debugOverlayCanvas,me=se.context.gl,ve=se.debugOverlayCanvas.getContext("2d");ve.clearRect(0,0,Y.width,Y.height),ve.shadowColor="white",ve.shadowBlur=2,ve.lineWidth=1.5,ve.strokeStyle="white",ve.textBaseline="top",ve.font="bold 36px Open Sans, sans-serif",ve.fillText(ue,5,5),ve.strokeText(ue,5,5),se.debugOverlayTexture.update(Y),se.debugOverlayTexture.bind(me.LINEAR,me.CLAMP_TO_EDGE)}(h,`${ne} ${H}kB`),g.draw(a,o.TRIANGLES,b,k,Ai.alphaBlended,si.disabled,ma(c,l.aM.transparent,Q),null,M,h.debugBuffer,h.quadTriangleIndexBuffer,h.debugSegments),g.draw(a,o.LINE_STRIP,b,k,A,si.disabled,ma(c,l.aM.red),D,M,h.debugBuffer,h.tileBorderIndexBuffer,h.debugSegments)}function Bu(h,e,n){const a=h.context,o=a.gl,c=h.colorModeForRenderPass(),g=new Bt(o.LEQUAL,Bt.ReadWrite,h.depthRangeFor3D),b=h.useProgram("terrain"),k=e.getTerrainMesh();a.bindFramebuffer.set(null),a.viewport.set([0,0,h.width,h.height]);for(const A of n){const M=h.renderToTexture.getTexture(A),D=e.getTerrainData(A.tileID);a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,M.texture);const V=h.transform.calculatePosMatrix(A.tileID.toUnwrapped()),H=e.getMeshFrameDelta(h.transform.zoom),X=h.transform.calculateFogMatrix(A.tileID.toUnwrapped()),Q=tl(V,H,X,h.style.sky,h.transform.pitch);b.draw(a,o.TRIANGLES,g,di.disabled,c,si.backCCW,Q,D,"terrain",k.vertexBuffer,k.indexBuffer,k.segments)}}class oo{constructor(e,n,a){this.vertexBuffer=e,this.indexBuffer=n,this.segments=a}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class lo{constructor(e,n){this.context=new oh(e),this.transform=n,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:l.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ut.maxUnderzooming+ut.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Qo}resize(e,n,a){if(this.width=Math.floor(e*a),this.height=Math.floor(n*a),this.pixelRatio=a,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const o of this.style._order)this.style._layers[o].resize()}setup(){const e=this.context,n=new l.aX;n.emplaceBack(0,0),n.emplaceBack(l.X,0),n.emplaceBack(0,l.X),n.emplaceBack(l.X,l.X),this.tileExtentBuffer=e.createVertexBuffer(n,Kn.members),this.tileExtentSegments=l.a0.simpleSegment(0,0,4,2);const a=new l.aX;a.emplaceBack(0,0),a.emplaceBack(l.X,0),a.emplaceBack(0,l.X),a.emplaceBack(l.X,l.X),this.debugBuffer=e.createVertexBuffer(a,Kn.members),this.debugSegments=l.a0.simpleSegment(0,0,4,5);const o=new l.$;o.emplaceBack(0,0,0,0),o.emplaceBack(l.X,0,l.X,0),o.emplaceBack(0,l.X,0,l.X),o.emplaceBack(l.X,l.X,l.X,l.X),this.rasterBoundsBuffer=e.createVertexBuffer(o,ki.members),this.rasterBoundsSegments=l.a0.simpleSegment(0,0,4,2);const c=new l.aX;c.emplaceBack(0,0),c.emplaceBack(1,0),c.emplaceBack(0,1),c.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(c,Kn.members),this.viewportSegments=l.a0.simpleSegment(0,0,4,2);const g=new l.aZ;g.emplaceBack(0),g.emplaceBack(1),g.emplaceBack(3),g.emplaceBack(2),g.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(g);const b=new l.aY;b.emplaceBack(0,1,2),b.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(b);const k=this.context.gl;this.stencilClearMode=new di({func:k.ALWAYS,mask:0},0,255,k.ZERO,k.ZERO,k.ZERO)}clearStencil(){const e=this.context,n=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const a=l.H();l.aP(a,0,this.width,this.height,0,0,1),l.K(a,a,[n.drawingBufferWidth,n.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,n.TRIANGLES,Bt.disabled,this.stencilClearMode,Ai.disabled,si.disabled,fr(a),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,n){if(this.currentStencilSource===e.source||!e.isTileClipped()||!n||!n.length)return;this.currentStencilSource=e.source;const a=this.context,o=a.gl;this.nextStencilID+n.length>256&&this.clearStencil(),a.setColorMode(Ai.disabled),a.setDepthMode(Bt.disabled);const c=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const g of n){const b=this._tileClippingMaskIDs[g.key]=this.nextStencilID++,k=this.style.map.terrain&&this.style.map.terrain.getTerrainData(g);c.draw(a,o.TRIANGLES,Bt.disabled,new di({func:o.ALWAYS,mask:0},b,255,o.KEEP,o.KEEP,o.REPLACE),Ai.disabled,si.disabled,fr(g.posMatrix),k,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const e=this.nextStencilID++,n=this.context.gl;return new di({func:n.NOTEQUAL,mask:255},e,255,n.KEEP,n.KEEP,n.REPLACE)}stencilModeForClipping(e){const n=this.context.gl;return new di({func:n.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,n.KEEP,n.KEEP,n.REPLACE)}stencilConfigForOverlap(e){const n=this.context.gl,a=e.sort((g,b)=>b.overscaledZ-g.overscaledZ),o=a[a.length-1].overscaledZ,c=a[0].overscaledZ-o+1;if(c>1){this.currentStencilSource=void 0,this.nextStencilID+c>256&&this.clearStencil();const g={};for(let b=0;b<c;b++)g[b+o]=new di({func:n.GEQUAL,mask:255},b+this.nextStencilID,255,n.KEEP,n.KEEP,n.REPLACE);return this.nextStencilID+=c,[g,a]}return[{[o]:di.disabled},a]}colorModeForRenderPass(){const e=this.context.gl;return this._showOverdrawInspector?new Ai([e.CONSTANT_COLOR,e.ONE],new l.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Ai.unblended:Ai.alphaBlended}depthModeForSublayer(e,n,a){if(!this.opaquePassEnabledForLayer())return Bt.disabled;const o=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new Bt(a||this.context.gl.LEQUAL,n,[o,o])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(e,n){this.style=e,this.options=n,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(F.now()),this.imageManager.beginFrame();const a=this.style._order,o=this.style.sourceCaches,c={},g={},b={};for(const k in o){const A=o[k];A.used&&A.prepare(this.context),c[k]=A.getVisibleCoordinates(),g[k]=c[k].slice().reverse(),b[k]=A.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let k=0;k<a.length;k++)if(this.style._layers[a[k]].is3D()){this.opaquePassCutoff=k;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const k of a){const A=this.style._layers[k];if(!A.hasOffscreenPass()||A.isHidden(this.transform.zoom))continue;const M=g[A.source];(A.type==="custom"||M.length)&&this.renderLayer(this,o[A.source],A,M)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:n.showOverdrawInspector?l.aM.black:l.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(k,A){const M=k.context,D=M.gl,V=((se,ue,Y)=>({u_sky_color:se.properties.get("sky-color"),u_horizon_color:se.properties.get("horizon-color"),u_horizon:(ue.height/2+ue.getHorizon())*Y,u_sky_horizon_blend:se.properties.get("sky-horizon-blend")*ue.height/2*Y}))(A,k.style.map.transform,k.pixelRatio),H=new Bt(D.LEQUAL,Bt.ReadWrite,[0,1]),X=di.disabled,Q=k.colorModeForRenderPass(),ne=k.useProgram("sky");
587if(!A.mesh){const se=new l.aX;se.emplaceBack(-1,-1),se.emplaceBack(1,-1),se.emplaceBack(1,1),se.emplaceBack(-1,1);const ue=new l.aY;ue.emplaceBack(0,1,2),ue.emplaceBack(0,2,3),A.mesh=new oo(M.createVertexBuffer(se,Kn.members),M.createIndexBuffer(ue),l.a0.simpleSegment(0,0,se.length,ue.length))}ne.draw(M,D.TRIANGLES,H,X,Q,si.disabled,V,void 0,"sky",A.mesh.vertexBuffer,A.mesh.indexBuffer,A.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=n.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=a.length-1;this.currentLayer>=0;this.currentLayer--){const k=this.style._layers[a[this.currentLayer]],A=o[k.source],M=c[k.source];this._renderTileClippingMasks(k,M),this.renderLayer(this,A,k,M)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<a.length;this.currentLayer++){const k=this.style._layers[a[this.currentLayer]],A=o[k.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(k))continue;const M=(k.type==="symbol"?b:g)[k.source];this._renderTileClippingMasks(k,c[k.source]),this.renderLayer(this,A,k,M)}if(this.options.showTileBoundaries){const k=function(A,M){let D=null;const V=Object.values(A._layers).flatMap(ne=>ne.source&&!ne.isHidden(M)?[A.sourceCaches[ne.source]]:[]),H=V.filter(ne=>ne.getSource().type==="vector"),X=V.filter(ne=>ne.getSource().type!=="vector"),Q=ne=>{(!D||D.getSource().maxzoom<ne.getSource().maxzoom)&&(D=ne)};return H.forEach(ne=>Q(ne)),D||X.forEach(ne=>Q(ne)),D}(this.style,this.transform.zoom);k&&function(A,M,D){for(let V=0;V<D.length;V++)Ru(A,M,D[V])}(this,k,k.getVisibleCoordinates())}this.options.showPadding&&function(k){const A=k.transform.padding;Ms(k,k.transform.height-(A.top||0),3,yl),Ms(k,A.bottom||0,3,Xt),Lu(k,A.left||0,3,so),Lu(k,k.transform.width-(A.right||0),3,lh);const M=k.transform.centerPoint;(function(D,V,H,X){ao(D,V-1,H-10,2,20,X),ao(D,V-10,H-1,20,2,X)})(k,M.x,k.transform.height-M.y,Du)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(e){if(!this.style||!this.style.map||!this.style.map.terrain)return;const n=this.terrainFacilitator.matrix,a=this.transform.modelViewProjectionMatrix;let o=this.terrainFacilitator.dirty;o||(o=e?!l.a_(n,a):!l.a$(n,a)),o||(o=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),o&&(l.b0(n,a),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(c,g){const b=c.context,k=b.gl,A=Ai.unblended,M=new Bt(k.LEQUAL,Bt.ReadWrite,[0,1]),D=g.getTerrainMesh(),V=g.sourceCache.getRenderableTiles(),H=c.useProgram("terrainDepth");b.bindFramebuffer.set(g.getFramebuffer("depth").framebuffer),b.viewport.set([0,0,c.width/devicePixelRatio,c.height/devicePixelRatio]),b.clear({color:l.aM.transparent,depth:1});for(const X of V){const Q=g.getTerrainData(X.tileID),ne={u_matrix:c.transform.calculatePosMatrix(X.tileID.toUnwrapped()),u_ele_delta:g.getMeshFrameDelta(c.transform.zoom)};H.draw(b,k.TRIANGLES,M,di.disabled,A,si.backCCW,ne,Q,"terrain",D.vertexBuffer,D.indexBuffer,D.segments)}b.bindFramebuffer.set(null),b.viewport.set([0,0,c.width,c.height])}(this,this.style.map.terrain),function(c,g){const b=c.context,k=b.gl,A=Ai.unblended,M=new Bt(k.LEQUAL,Bt.ReadWrite,[0,1]),D=g.getTerrainMesh(),V=g.getCoordsTexture(),H=g.sourceCache.getRenderableTiles(),X=c.useProgram("terrainCoords");b.bindFramebuffer.set(g.getFramebuffer("coords").framebuffer),b.viewport.set([0,0,c.width/devicePixelRatio,c.height/devicePixelRatio]),b.clear({color:l.aM.transparent,depth:1}),g.coordsIndex=[];for(const Q of H){const ne=g.getTerrainData(Q.tileID);b.activeTexture.set(k.TEXTURE0),k.bindTexture(k.TEXTURE_2D,V.texture);const se={u_matrix:c.transform.calculatePosMatrix(Q.tileID.toUnwrapped()),u_terrain_coords_id:(255-g.coordsIndex.length)/255,u_texture:0,u_ele_delta:g.getMeshFrameDelta(c.transform.zoom)};X.draw(b,k.TRIANGLES,M,di.disabled,A,si.backCCW,se,ne,"terrain",D.vertexBuffer,D.indexBuffer,D.segments),g.coordsIndex.push(Q.tileID.key)}b.bindFramebuffer.set(null),b.viewport.set([0,0,c.width,c.height])}(this,this.style.map.terrain))}renderLayer(e,n,a,o){if(!a.isHidden(this.transform.zoom)&&(a.type==="background"||a.type==="custom"||(
587o||[]).length))switch(this.id=a.id,a.type){case"symbol":(function(c,g,b,k,A){if(c.renderPass!=="translucent")return;const M=di.disabled,D=c.colorModeForRenderPass();(b._unevaluatedLayout.hasValue("text-variable-anchor")||b._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(V,H,X,Q,ne,se,ue,Y,me){const ve=H.transform,Se=Xn(),De=ne==="map",je=se==="map";for(const Qe of V){const nt=Q.getTile(Qe),Xe=nt.getBucket(X);if(!Xe||!Xe.text||!Xe.text.segments.get().length)continue;const We=l.ag(Xe.textSizeData,ve.zoom),ht=$t(nt,1,H.transform.zoom),zt=Dn(Qe.posMatrix,je,De,H.transform,ht),Ye=X.layout.get("icon-text-fit")!=="none"&&Xe.hasIconData();if(We){const it=Math.pow(2,ve.zoom-nt.tileID.overscaledZ),St=H.style.map.terrain?(Dt,jt)=>H.style.map.terrain.getElevation(Qe,Dt,jt):null,gi=Se.translatePosition(ve,nt,ue,Y);As(Xe,De,je,me,ve,zt,Qe.posMatrix,it,We,Ye,Se,gi,Qe.toUnwrapped(),St)}}}(k,c,b,g,b.layout.get("text-rotation-alignment"),b.layout.get("text-pitch-alignment"),b.paint.get("text-translate"),b.paint.get("text-translate-anchor"),A),b.paint.get("icon-opacity").constantOr(1)!==0&&ml(c,g,b,k,!1,b.paint.get("icon-translate"),b.paint.get("icon-translate-anchor"),b.layout.get("icon-rotation-alignment"),b.layout.get("icon-pitch-alignment"),b.layout.get("icon-keep-upright"),M,D),b.paint.get("text-opacity").constantOr(1)!==0&&ml(c,g,b,k,!0,b.paint.get("text-translate"),b.paint.get("text-translate-anchor"),b.layout.get("text-rotation-alignment"),b.layout.get("text-pitch-alignment"),b.layout.get("text-keep-upright"),M,D),g.map.showCollisionBoxes&&(ya(c,g,b,k,!0),ya(c,g,b,k,!1))})(e,n,a,o,this.style.placement.variableOffsets);break;case"circle":(function(c,g,b,k){if(c.renderPass!=="translucent")return;const A=b.paint.get("circle-opacity"),M=b.paint.get("circle-stroke-width"),D=b.paint.get("circle-stroke-opacity"),V=!b.layout.get("circle-sort-key").isConstant();if(A.constantOr(1)===0&&(M.constantOr(1)===0||D.constantOr(1)===0))return;const H=c.context,X=H.gl,Q=c.depthModeForSublayer(0,Bt.ReadOnly),ne=di.disabled,se=c.colorModeForRenderPass(),ue=[];for(let Y=0;Y<k.length;Y++){const me=k[Y],ve=g.getTile(me),Se=ve.getBucket(b);if(!Se)continue;const De=Se.programConfigurations.get(b.id),je=c.useProgram("circle",De),Qe=Se.layoutVertexBuffer,nt=Se.indexBuffer,Xe=c.style.map.terrain&&c.style.map.terrain.getTerrainData(me),We={programConfiguration:De,program:je,layoutVertexBuffer:Qe,indexBuffer:nt,uniformValues:Wc(c,me,ve,b),terrainData:Xe};if(V){const ht=Se.segments.get();for(const zt of ht)ue.push({segments:new l.a0([zt]),sortKey:zt.sortKey,state:We})}else ue.push({segments:Se.segments,sortKey:0,state:We})}V&&ue.sort((Y,me)=>Y.sortKey-me.sortKey);for(const Y of ue){const{programConfiguration:me,program:ve,layoutVertexBuffer:Se,indexBuffer:De,uniformValues:je,terrainData:Qe}=Y.state;ve.draw(H,X.TRIANGLES,Q,ne,se,si.disabled,je,Qe,b.id,Se,De,Y.segments,b.paint,c.transform.zoom,me)}})(e,n,a,o);break;case"heatmap":(function(c,g,b,k){if(b.paint.get("heatmap-opacity")===0)return;const A=c.context;if(c.style.map.terrain){for(const M of k){const D=g.getTile(M);g.hasRenderableParent(M)||(c.renderPass==="offscreen"?_l(c,D,b,M):c.renderPass==="translucent"&&rs(c,b,M))}A.viewport.set([0,0,c.width,c.height])}else c.renderPass==="offscreen"?function(M,D,V,H){const X=M.context,Q=X.gl,ne=di.disabled,se=new Ai([Q.ONE,Q.ONE],l.aM.transparent,[!0,!0,!0,!0]);(function(ue,Y,me){const ve=ue.gl;ue.activeTexture.set(ve.TEXTURE1),ue.viewport.set([0,0,Y.width/4,Y.height/4]);let Se=me.heatmapFbos.get(l.aU);Se?(ve.bindTexture(ve.TEXTURE_2D,Se.colorAttachment.get()),ue.bindFramebuffer.set(Se.framebuffer)):(Se=xa(ue,Y.width/4,Y.height/4),me.heatmapFbos.set(l.aU,Se))})(X,M,V),X.clear({color:l.aM.transparent});for(let ue=0;ue<H.length;ue++){const Y=H[ue];if(D.hasRenderableParent(Y))continue;const me=D.getTile(Y),ve=me.getBucket(V);if(!ve)continue;const Se=ve.programConfigurations.get(V.id),De=M.useProgram("heatmap",Se),{zoom:je}=M.transform;De.draw(X,Q.TRIANGLES,Bt.disabled,ne,se,si.disabled,mr(Y.posMatrix,me,je,V.paint.get("heatmap-intensity")),null,V.id,ve.layoutVertexBuffer,ve.indexBuffer,ve.segments,V.paint,M.transform.zoom,Se)}X.viewport.set([0,0,M.width,M.height])}(c,g,b,k):c.renderPass==="translucent"&&function(M,D){const V=M.context,H=V.gl;V.setColorMode(M.colorModeForRenderPass());const X=D.heatmapFbos.get(l.aU);X&&(V.activeTexture.set(H.TEXTURE0),H.bindTexture(H.TEXTURE_2D,X.colorAttachment.get()),V.activeTexture.set(H.TEXTURE1),ba(V,D).bind(H.LINEAR,H.CLAMP_TO_EDGE),M.useProgram("heatmapTexture").draw(V,H.TRIANGLES,Bt.disabled,di.disabled,M.colorModeForRenderPass(),si.disabled,Xa(M,D,0,1),null,D.id,M.viewportBuffer,M.quadTriangleIndexBuffer,M.viewportSegments,D.paint,M.transform.zoom))}(c,b)})(e,n,a,o);break;case"line":(function(c,g,b,k){if(c.renderPass!=="translucent")return;const A=b.paint.get("line-opacity"),M=b.paint.get("line-width");if(A.constantOr(1)===0||M.constantOr(1)===0)return;const D=c.depthModeForSublayer(0,Bt.ReadOnly),V=c.colorModeForRenderPass(),H=b.paint.get("line-dasharray"),X=b.paint.get("line-pattern"),Q=X.constantOr(1),ne=b.paint.get("line-gradient"),se=b.getCrossfadeParameters(),ue=Q?"linePattern":H?"lineSDF":ne?"lineGradient":"line",Y=c.context,me=Y.gl;let ve=!0;for(const Se of k){const De=g.getTile(Se);if(Q&&!De.patternsLoaded())continue;const je=De.getBucket(b);if(!je)continue;const Qe=je.programConfigurations.get(b.id),nt=c.context.program.get(),Xe=c.useProgram(ue,Qe),We=ve||Xe.program!==nt,ht=c.style.map.terrain&&c.style.map.terrain.getTerrainData(Se),zt=X.constantOr(null);if(zt&&De.imageAtlas){const St=De.imageAtlas,gi=St.patternPositions[zt.to.toString()],Dt=St.patternPositions[zt.from.toString()];gi&&Dt&&Qe.setConstantPatternPositions(gi,Dt)}const Ye=ht?Se:null,it=Q?zs(c,De,b,se,Ye):H?Xc(c,De,b,H,se,Ye):ne?gu(c,De,b,je.lineClipsArray.length,Ye):Ya(c,De,b,Ye);if(Q)Y.activeTexture.set(me.TEXTURE0),De.imageAtlasTexture.bind(me.LINEAR,me.CLAMP_TO_EDGE),Qe.updatePaintBuffers(se);else if(H&&(We||c.lineAtlas.dirty))Y.activeTexture.set(me.TEXTURE0),c.lineAtlas.bind(Y);else if(ne){const St=je.gradients[b.id];let gi=St.texture;if(b.gradientVersion!==St.version){let Dt=256;if(b.stepInterpolant){const jt=g.getSource().maxzoom,_i=Se.canonical.z===jt?Math.ceil(1<<c.transform.maxZoom-Se.canonical.z):1;Dt=l.ac(l.aV(je.maxLineLength/l.X*1024*_i),256,Y.maxTextureSize)}St.gradient=l.aW({expression:b.gradientExpression(),evaluationKey:"lineProgress",resolution:Dt,image:St.gradient||void 0,clips:je.lineClipsArray}),St.texture?St.texture.update(St.gradient):St.texture=new Pt(Y,St.gradient,me.RGBA),St.version=b.gradientVersion,gi=St.texture}Y.activeTexture.set(me.TEXTURE0),gi.bind(b.stepInterpolant?me.NEAREST:me.LINEAR,me.CLAMP_TO_EDGE)}Xe.draw(Y,me.TRIANGLES,D,c.stencilModeForClipping(Se),V,si.disabled,it,ht,b.id,je.layoutVertexBuffer,je.indexBuffer,je.segments,b.paint,c.transform.zoom,Qe,je.layoutVertexBuffer2),ve=!1}})(e,n,a,o);break;case"fill":(function(c,g,b,k){const A=b.paint.get("fill-color"),M=b.paint.get("fill-opacity");if(M.constantOr(1)===0)return;const D=c.colorModeForRenderPass(),V=b.paint.get("fill-pattern"),H=c.opaquePassEnabledForLayer()&&!V.constantOr(1)&&A.constantOr(l.aM.transparent).a===1&&M.constantOr(0)===1?"opaque":"translucent";if(c.renderPass===H){const X=c.depthModeForSublayer(1,c.renderPass==="opaque"?Bt.ReadWrite:Bt.ReadOnly);wa(c,g,b,k,X,D,!1)}if(c.renderPass==="translucent"&&b.paint.get("fill-antialias")){const X=c.depthModeForSublayer(b.getPaintProperty("fill-outline-color")?2:0,Bt.ReadOnly);wa(c,g,b,k,X,D,!0)}})(e,n,a,o);break;case"fill-extrusion":(function(c,g,b,k){const A=b.paint.get("fill-extrusion-opacity");if(A!==0&&c.renderPass==="translucent"){const M=new Bt(c.context.gl.LEQUAL,Bt.ReadWrite,c.depthRangeFor3D);if(A!==1||b.paint.get("fill-extrusion-pattern").constantOr(1))no(c,g,b,k,M,di.disabled,Ai.disabled),no(c,g,b,k,M,c.stencilModeFor3D(),c.colorModeForRenderPass());else{const D=c.colorModeForRenderPass();no(c,g,b,k,M,di.disabled,D)}}})(e,n,a,o);break;case"hillshade":(function(c,g,b,k){if(c.renderPass!=="offscreen"&&c.renderPass!=="translucent")return;const A=c.context,M=c.depthModeForSublayer(0,Bt.ReadOnly),D=c.colorModeForRenderPass(),[V,H]=c.renderPass==="translucent"?
587c.stencilConfigForOverlap(k):[{},k];for(const X of H){const Q=g.getTile(X);Q.needsHillshadePrepare!==void 0&&Q.needsHillshadePrepare&&c.renderPass==="offscreen"?Es(c,Q,b,M,di.disabled,D):c.renderPass==="translucent"&&Is(c,X,Q,b,M,V[X.overscaledZ],D)}A.viewport.set([0,0,c.width,c.height])})(e,n,a,o);break;case"raster":(function(c,g,b,k){if(c.renderPass!=="translucent"||b.paint.get("raster-opacity")===0||!k.length)return;const A=c.context,M=A.gl,D=g.getSource(),V=c.useProgram("raster"),H=c.colorModeForRenderPass(),[X,Q]=D instanceof qt?[{},k]:c.stencilConfigForOverlap(k),ne=Q[Q.length-1].overscaledZ,se=!c.options.moving;for(const ue of Q){const Y=c.depthModeForSublayer(ue.overscaledZ-ne,b.paint.get("raster-opacity")===1?Bt.ReadWrite:Bt.ReadOnly,M.LESS),me=g.getTile(ue);me.registerFadeDuration(b.paint.get("raster-fade-duration"));const ve=g.findLoadedParent(ue,0),Se=g.findLoadedSibling(ue),De=Mu(me,ve||Se||null,g,b,c.transform,c.style.map.terrain);let je,Qe;const nt=b.paint.get("raster-resampling")==="nearest"?M.NEAREST:M.LINEAR;A.activeTexture.set(M.TEXTURE0),me.texture.bind(nt,M.CLAMP_TO_EDGE,M.LINEAR_MIPMAP_NEAREST),A.activeTexture.set(M.TEXTURE1),ve?(ve.texture.bind(nt,M.CLAMP_TO_EDGE,M.LINEAR_MIPMAP_NEAREST),je=Math.pow(2,ve.tileID.overscaledZ-me.tileID.overscaledZ),Qe=[me.tileID.canonical.x*je%1,me.tileID.canonical.y*je%1]):me.texture.bind(nt,M.CLAMP_TO_EDGE,M.LINEAR_MIPMAP_NEAREST),me.texture.useMipmap&&A.extTextureFilterAnisotropic&&c.transform.pitch>20&&M.texParameterf(M.TEXTURE_2D,A.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,A.extTextureFilterAnisotropicMax);const Xe=c.style.map.terrain&&c.style.map.terrain.getTerrainData(ue),We=Xe?ue:null,ht=We?We.posMatrix:c.transform.calculatePosMatrix(ue.toUnwrapped(),se),zt=Kc(ht,Qe||[0,0],je||1,De,b);D instanceof qt?V.draw(A,M.TRIANGLES,Y,di.disabled,H,si.disabled,zt,Xe,b.id,D.boundsBuffer,c.quadTriangleIndexBuffer,D.boundsSegments):V.draw(A,M.TRIANGLES,Y,X[ue.overscaledZ],H,si.disabled,zt,Xe,b.id,c.rasterBoundsBuffer,c.quadTriangleIndexBuffer,c.rasterBoundsSegments)}})(e,n,a,o);break;case"background":(function(c,g,b,k){const A=b.paint.get("background-color"),M=b.paint.get("background-opacity");if(M===0)return;const D=c.context,V=D.gl,H=c.transform,X=H.tileSize,Q=b.paint.get("background-pattern");if(c.isPatternMissing(Q))return;const ne=!Q&&A.a===1&&M===1&&c.opaquePassEnabledForLayer()?"opaque":"translucent";if(c.renderPass!==ne)return;const se=di.disabled,ue=c.depthModeForSublayer(0,ne==="opaque"?Bt.ReadWrite:Bt.ReadOnly),Y=c.colorModeForRenderPass(),me=c.useProgram(Q?"backgroundPattern":"background"),ve=k||H.coveringTiles({tileSize:X,terrain:c.style.map.terrain});Q&&(D.activeTexture.set(V.TEXTURE0),c.imageManager.bind(c.context));const Se=b.getCrossfadeParameters();for(const De of ve){const je=k?De.posMatrix:c.transform.calculatePosMatrix(De.toUnwrapped()),Qe=Q?nl(je,M,c,Q,{tileID:De,tileSize:X},Se):Ja(je,M,A),nt=c.style.map.terrain&&c.style.map.terrain.getTerrainData(De);me.draw(D,V.TRIANGLES,ue,se,Y,si.disabled,Qe,nt,b.id,c.tileExtentBuffer,c.quadTriangleIndexBuffer,c.tileExtentSegments)}})(e,0,a,o);break;case"custom":(function(c,g,b){const k=c.context,A=b.implementation;if(c.renderPass==="offscreen"){const M=A.prerender;M&&(c.setCustomLayerDefaults(),k.setColorMode(c.colorModeForRenderPass()),M.call(A,k.gl,c.transform.customLayerMatrix()),k.setDirty(),c.setBaseState())}else if(c.renderPass==="translucent"){c.setCustomLayerDefaults(),k.setColorMode(c.colorModeForRenderPass()),k.setStencilMode(di.disabled);const M=A.renderingMode==="3d"?new Bt(c.context.gl.LEQUAL,Bt.ReadWrite,c.depthRangeFor3D):c.depthModeForSublayer(0,Bt.ReadOnly);k.setDepthMode(M),A.render(k.gl,c.transform.customLayerMatrix(),{farZ:c.transform.farZ,nearZ:c.transform.nearZ,fov:c.transform._fov,modelViewProjectionMatrix:c.transform.modelViewProjectionMatrix,projectionMatrix:c.transform.projectionMatrix}),k.setDirty(),c.setBaseState(),k.bindFramebuffer.set(null)}})(e,0,a)}}translatePosMatrix(e,n,a,o,c){if(!a[0]&&!a[1])return e;const g=c?o==="map"?this.transform.angle:0:o==="viewport"?-this.transform.angle:0;if(g){const A=Math.sin(g),M=Math.cos(g);
vendor: 9,785 bytes, line 587
587a=[a[0]*M-a[1]*A,a[0]*A+a[1]*M]}const b=[c?a[0]:$t(n,a[0],this.transform.zoom),c?a[1]:$t(n,a[1],this.transform.zoom),0],k=new Float32Array(16);return l.J(k,e,b),k}saveTileTexture(e){const n=this._tileTextures[e.size[0]];n?n.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){const n=this._tileTextures[e];return n&&n.length>0?n.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;const n=this.imageManager.getPattern(e.from.toString()),a=this.imageManager.getPattern(e.to.toString());return!n||!a}useProgram(e,n){this.cache=this.cache||{};const a=e+(n?n.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[a]||(this.cache[a]=new il(this.context,Ln[e],n,sl[e],this._showOverdrawInspector,this.style.map.terrain)),this.cache[a]}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(){const e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new Pt(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:e,drawingBufferHeight:n}=this.context.gl;return this.width!==e||this.height!==n}}class Ds{constructor(e,n){this.points=e,this.planes=n}static fromInvProjectionMatrix(e,n,a){const o=Math.pow(2,a),c=[[-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(b=>{const k=1/(b=l.af([],b,e))[3]/n*o;return l.b1(b,b,[k,k,1/b[3],k])}),g=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(b=>{const k=function(V,H){var X=H[0],Q=H[1],ne=H[2],se=X*X+Q*Q+ne*ne;return se>0&&(se=1/Math.sqrt(se)),V[0]=H[0]*se,V[1]=H[1]*se,V[2]=H[2]*se,V}([],function(V,H,X){var Q=H[0],ne=H[1],se=H[2],ue=X[0],Y=X[1],me=X[2];return V[0]=ne*me-se*Y,V[1]=se*ue-Q*me,V[2]=Q*Y-ne*ue,V}([],Ge([],c[b[0]],c[b[1]]),Ge([],c[b[2]],c[b[1]]))),A=-((M=k)[0]*(D=c[b[1]])[0]+M[1]*D[1]+M[2]*D[2]);var M,D;return k.concat(A)});return new Ds(c,g)}}class Ls{constructor(e,n){this.min=e,this.max=n,this.center=function(a,o,c){return a[0]=.5*o[0],a[1]=.5*o[1],a[2]=.5*o[2],a}([],function(a,o,c){return a[0]=o[0]+c[0],a[1]=o[1]+c[1],a[2]=o[2]+c[2],a}([],this.min,this.max))}quadrant(e){const n=[e%2==0,e<2],a=Ue(this.min),o=Ue(this.max);for(let c=0;c<n.length;c++)a[c]=n[c]?this.min[c]:this.center[c],o[c]=n[c]?this.center[c]:this.max[c];return o[2]=this.max[2],new Ls(a,o)}distanceX(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]}distanceY(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]}intersects(e){const n=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let a=!0;for(let o=0;o<e.planes.length;o++){const c=e.planes[o];let g=0;for(let b=0;b<n.length;b++)l.b2(c,n[b])>=0&&g++;if(g===0)return 0;g!==n.length&&(a=!1)}if(a)return 2;for(let o=0;o<3;o++){let c=Number.MAX_VALUE,g=-Number.MAX_VALUE;for(let b=0;b<e.points.length;b++){const k=e.points[b][o]-this.min[o];c=Math.min(c,k),g=Math.max(g,k)}if(g<0||c>this.max[o]-this.min[o])return 0}return 1}}class Rs{constructor(e=0,n=0,a=0,o=0){if(isNaN(e)||e<0||isNaN(n)||n<0||isNaN(a)||a<0||isNaN(o)||o<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=n,this.left=a,this.right=o}interpolate(e,n,a){return n.top!=null&&e.top!=null&&(this.top=l.y.number(e.top,n.top,a)),n.bottom!=null&&e.bottom!=null&&(this.bottom=l.y.number(e.bottom,n.bottom,a)),n.left!=null&&e.left!=null&&(this.left=l.y.number(e.left,n.left,a)),n.right!=null&&e.right!=null&&(this.right=l.y.number(e.right,n.right,a)),this}getCenter(e,n){const a=l.ac((this.left+e-this.right)/2,0,e),o=l.ac((this.top+n-this.bottom)/2,0,n);return new l.P(a,o)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Rs(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const vl=85.051129;class Bs{constructor(e,n,a,o,c){this.tileSize=512,this._renderWorldCopies=c===void 0||!!c,this._minZoom=e||0,this._maxZoom=n||22,this._minPitch=a??0,this._maxPitch=o??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new l.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Rs,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const e=new Bs(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.apply(this),e}apply(e){this.tileSize=e.tileSize,this.latRange=e.latRange,this.lngRange=e.lngRange,this.width=e.width,this.height=e.height,this._center=e._center,this._elevation=e._elevation,this.minElevationForCurrentTile=e.minElevationForCurrentTile,this.zoom=e.zoom,this.angle=e.angle,this._fov=e._fov,this._pitch=e._pitch,this._unmodified=e._unmodified,this._edgeInsets=e._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new l.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(e){const n=-l.b3(e,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=function(){var a=new l.A(4);return l.A!=Float32Array&&(a[1]=0,a[2]=0),a[0]=1,a[3]=1,a}(),function(a,o,c){var g=o[0],b=o[1],k=o[2],A=o[3],M=Math.sin(c),D=Math.cos(c);a[0]=g*D+k*M,a[1]=b*D+A*M,a[2]=g*-M+k*D,a[3]=b*-M+A*D}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(e){const n=l.ac(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(e){const n=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==n&&(this._unmodified=!1,this._zoom=n,this.tileZoom=Math.max(0,Math.floor(n)),this.scale=this.zoomScale(n),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,n,a){this._unmodified=!1,this._edgeInsets.interpolate(e,n,a),this._constrain(),this._calcMatrices()}coveringZoomLevel(e){const n=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,n)}getVisibleUnwrappedCoordinates(e){const n=[new l.b4(0,e)];if(this._renderWorldCopies){const a=this.pointCoordinate(new l.P(0,0)),o=this.pointCoordinate(new l.P(this.width,0)),c=this.pointCoordinate(new l.P(this.width,this.height)),g=this.pointCoordinate(new l.P(0,this.height)),b=Math.floor(Math.min(a.x,o.x,c.x,g.x)),k=Math.floor(Math.max(a.x,o.x,c.x,g.x)),A=1;for(let M=b-A;M<=k+A;M++)M!==0&&n.push(new l.b4(M,e))}return n}coveringTiles(e){var n,a;let o=this.coveringZoomLevel(e);const c=o;if(e.minzoom!==void 0&&o<e.minzoom)return[];e.maxzoom!==void 0&&o>e.maxzoom&&(o=e.maxzoom);const g=this.pointCoordinate(this.getCameraPoint()),b=l.Z.fromLngLat(this.center),k=Math.pow(2,o),A=[k*g.x,k*g.y,0],M=[k*b.x,k*b.y,0],D=Ds.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,o);let V=e.minzoom||0;!e.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(V=o);const H=e.terrain?2/Math.min(this.tileSize,e.tileSize)*this.tileSize:3,X=Y=>({aabb:new Ls([Y*k,0,0],[(Y+1)*k,k,0]),zoom:0,x:0,y:0,wrap:Y,fullyVisible:!1}),Q=[],ne=[],se=o,ue=e.reparseOverscaled?c:o;if(this._renderWorldCopies)for(let Y=1;Y<=3;Y++)Q.push(X(-Y)),Q.push(X(Y));for(Q.push(X(0));Q.length>0;){const Y=Q.pop(),me=Y.x,ve=Y.y;let Se=Y.fullyVisible;if(!Se){const Xe=Y.aabb.intersects(D);if(Xe===0)continue;
587Se=Xe===2}const De=e.terrain?A:M,je=Y.aabb.distanceX(De),Qe=Y.aabb.distanceY(De),nt=Math.max(Math.abs(je),Math.abs(Qe));if(Y.zoom===se||nt>H+(1<<se-Y.zoom)-2&&Y.zoom>=V){const Xe=se-Y.zoom,We=A[0]-.5-(me<<Xe),ht=A[1]-.5-(ve<<Xe);ne.push({tileID:new l.S(Y.zoom===se?ue:Y.zoom,Y.wrap,Y.zoom,me,ve),distanceSq:P([M[0]-.5-me,M[1]-.5-ve]),tileDistanceToCamera:Math.sqrt(We*We+ht*ht)})}else for(let Xe=0;Xe<4;Xe++){const We=(me<<1)+Xe%2,ht=(ve<<1)+(Xe>>1),zt=Y.zoom+1;let Ye=Y.aabb.quadrant(Xe);if(e.terrain){const it=new l.S(zt,Y.wrap,zt,We,ht),St=e.terrain.getMinMaxElevation(it),gi=(n=St.minElevation)!==null&&n!==void 0?n:this.elevation,Dt=(a=St.maxElevation)!==null&&a!==void 0?a:this.elevation;Ye=new Ls([Ye.min[0],Ye.min[1],gi],[Ye.max[0],Ye.max[1],Dt])}Q.push({aabb:Ye,zoom:zt,x:We,y:ht,wrap:Y.wrap,fullyVisible:Se})}}return ne.sort((Y,me)=>Y.distanceSq-me.distanceSq).map(Y=>Y.tileID)}resize(e,n){this.width=e,this.height=n,this.pixelsToGLUnits=[2/e,-2/n],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(e){const n=l.ac(e.lat,-85.051129,vl);return new l.P(l.O(e.lng)*this.worldSize,l.Q(n)*this.worldSize)}unproject(e){return new l.Z(e.x/this.worldSize,e.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(e){const n=this.elevation,a=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,o=this.pointLocation(this.centerPoint,e),c=e.getElevationForLngLatZoom(o,this.tileZoom);if(!(this.elevation-c))return;const g=a+n-c,b=Math.cos(this._pitch)*this.cameraToCenterDistance/g/l.b5(1,o.lat),k=this.scaleZoom(b/this.tileSize);this._elevation=c,this._center=o,this.zoom=k}setLocationAtPoint(e,n){const a=this.pointCoordinate(n),o=this.pointCoordinate(this.centerPoint),c=this.locationCoordinate(e),g=new l.Z(c.x-(a.x-o.x),c.y-(a.y-o.y));this.center=this.coordinateLocation(g),this._renderWorldCopies&&
vendor: 12,174 bytes, line 587
587(this.center=this.center.wrap())}locationPoint(e,n){return n?this.coordinatePoint(this.locationCoordinate(e),n.getElevationForLngLatZoom(e,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(e))}pointLocation(e,n){return this.coordinateLocation(this.pointCoordinate(e,n))}locationCoordinate(e){return l.Z.fromLngLat(e)}coordinateLocation(e){return e&&e.toLngLat()}pointCoordinate(e,n){if(n){const V=n.pointCoordinate(e);if(V!=null)return V}const a=[e.x,e.y,0,1],o=[e.x,e.y,1,1];l.af(a,a,this.pixelMatrixInverse),l.af(o,o,this.pixelMatrixInverse);const c=a[3],g=o[3],b=a[1]/c,k=o[1]/g,A=a[2]/c,M=o[2]/g,D=A===M?0:(0-A)/(M-A);return new l.Z(l.y.number(a[0]/c,o[0]/g,D)/this.worldSize,l.y.number(b,k,D)/this.worldSize)}coordinatePoint(e,n=0,a=this.pixelMatrix){const o=[e.x*this.worldSize,e.y*this.worldSize,n,1];return l.af(o,o,a),new l.P(o[0]/o[3],o[1]/o[3])}getBounds(){const e=Math.max(0,this.height/2-this.getHorizon());return new Ce().extend(this.pointLocation(new l.P(0,e))).extend(this.pointLocation(new l.P(this.width,e))).extend(this.pointLocation(new l.P(this.width,this.height))).extend(this.pointLocation(new l.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,vl])}calculateTileMatrix(e){const n=e.canonical,a=this.worldSize/this.zoomScale(n.z),o=n.x+Math.pow(2,n.z)*e.wrap,c=l.an(new Float64Array(16));return l.J(c,c,[o*a,n.y*a,0]),l.K(c,c,[a/l.X,a/l.X,1]),c}calculatePosMatrix(e,n=!1){const a=e.key,o=n?this._alignedPosMatrixCache:this._posMatrixCache;if(o[a])return o[a];const c=this.calculateTileMatrix(e);return l.L(c,n?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,c),o[a]=new Float32Array(c),o[a]}calculateFogMatrix(e){const n=e.key,a=this._fogMatrixCache;if(a[n])return a[n];const o=this.calculateTileMatrix(e);return l.L(o,this.fogMatrix,o),a[n]=new Float32Array(o),a[n]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(e,n){n=l.ac(+n,this.minZoom,this.maxZoom);const a={center:new l.N(e.lng,e.lat),zoom:n};let o=this.lngRange;!this._renderWorldCopies&&o===null&&(o=[-179.9999999999,179.9999999999]);const c=this.tileSize*this.zoomScale(a.zoom);let g=0,b=c,k=0,A=c,M=0,D=0;const{x:V,y:H}=this.size;if(this.latRange){const Y=this.latRange;g=l.Q(Y[1])*c,b=l.Q(Y[0])*c,b-g<H&&(M=H/(b-g))}o&&(k=l.b3(l.O(o[0])*c,0,c),A=l.b3(l.O(o[1])*c,0,c),A<k&&(A+=c),A-k<V&&(D=V/(A-k)));const{x:X,y:Q}=this.project.call({worldSize:c},e);let ne,se;const ue=Math.max(D||0,M||0);if(ue){const Y=new l.P(D?(A+k)/2:X,M?(b+g)/2:Q);return a.center=this.unproject.call({worldSize:c},Y).wrap(),a.zoom+=this.scaleZoom(ue),a}if(this.latRange){const Y=H/2;Q-Y<g&&(se=g+Y),Q+Y>b&&(se=b-Y)}if(o){const Y=(k+A)/2;let me=X;this._renderWorldCopies&&(me=l.b3(X,Y-c/2,Y+c/2));const ve=V/2;me-ve<k&&(ne=k+ve),me+ve>A&&(ne=A-ve)}if(ne!==void 0||se!==void 0){const Y=new l.P(ne??X,se??Q);a.center=this.unproject.call({worldSize:c},Y).wrap()}return a}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const e=this._unmodified,{center:n,zoom:a}=this.getConstrained(this.center,this.zoom);this.center=n,this.zoom=a,this._unmodified=e,this._constraining=!1}_calcMatrices(){if(!this.height)return;const e=this.centerOffset,n=this.point.x,a=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=l.b5(1,this.center.lat)*this.worldSize;let o=l.an(new Float64Array(16));l.K(o,o,[this.width/2,-this.height/2,1]),l.J(o,o,[1,-1,0]),this.labelPlaneMatrix=o,o=l.an(new Float64Array(16)),l.K(o,o,[1,-1,1]),l.J(o,o,[-1,-1,0]),l.K(o,o,[2/this.width,2/this.height,1]),this.glCoordMatrix=o;const c=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),g=Math.min(this.elevation,this.minElevationForCurrentTile),b=c-g*this._pixelPerMeter/Math.cos(this._pitch),k=g<0?b:c,A=Math.PI/2+this._pitch,M=this._fov*(.5+e.y/this.height),D=Math.sin(M)*k/Math.sin(l.ac(Math.PI-A-M,.01,Math.PI-.01)),V=this.getHorizon(),H=2*Math.atan(V/this.cameraToCenterDistance)*(.5+e.y/(2*V)),X=Math.sin(H)*k/Math.sin(l.ac(Math.PI-A-H,.01,Math.PI-.01)),Q=Math.min(D,X);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Q+k),this.nearZ=this.height/50,o=new Float64Array(16),l.b6(o,this._fov,this.width/this.height,this.nearZ,this.farZ),o[8]=2*-e.x/this.width,o[9]=2*e.y/this.height,this.projectionMatrix=l.ae(o),l.K(o,o,[1,-1,1]),l.J(o,o,[0,0,-this.cameraToCenterDistance]),l.b7(o,o,this._pitch),l.ad(o,o,this.angle),l.J(o,o,[-n,-a,0]),this.mercatorMatrix=l.K([],o,[this.worldSize,this.worldSize,this.worldSize]),l.K(o,o,[1,1,this._pixelPerMeter]),this.pixelMatrix=l.L(new Float64Array(16),this.labelPlaneMatrix,o),l.J(o,o,[0,0,-this.elevation]),this.modelViewProjectionMatrix=o,this.invModelViewProjectionMatrix=l.as([],o),this.fogMatrix=new Float64Array(16),l.b6(this.fogMatrix,this._fov,this.width/this.height,c,this.farZ),this.fogMatrix[8]=2*-e.x/this.width,this.fogMatrix[9]=2*e.y/this.height,l.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),l.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),l.b7(this.fogMatrix,this.fogMatrix,this._pitch),l.ad(this.fogMatrix,this.fogMatrix,this.angle),l.J(this.fogMatrix,this.fogMatrix,[-n,-a,0]),l.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),l.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=l.L(new Float64Array(16),this.labelPlaneMatrix,o);const ne=this.width%2/2,se=this.height%2/2,ue=Math.cos(this.angle),Y=Math.sin(this.angle),me=n-Math.round(n)+ue*ne+Y*se,ve=a-Math.round(a)+ue*se+Y*ne,Se=new Float64Array(o);if(l.J(Se,Se,[me>.5?me-1:me,ve>.5?ve-1:ve,0]),this.alignedModelViewProjectionMatrix=Se,o=l.as(new Float64Array(16),this.pixelMatrix),!o)throw new Error("failed to invert matrix");this.pixelMatrixInverse=o,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const e=this.pointCoordinate(new l.P(0,0)),n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return l.af(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new l.P(0,e))}getCameraQueryGeometry(e){const n=this.getCameraPoint();if(e.length===1)return[e[0],n];{let a=n.x,o=n.y,c=n.x,g=n.y;for(const b of e)a=Math.min(a,b.x),o=Math.min(o,b.y),c=Math.max(c,b.x),g=Math.max(g,b.y);return[new l.P(a,o),new l.P(c,o),new l.P(c,g),new l.P(a,g),new l.P(a,o)]}}lngLatToCameraDepth(e,n){const a=this.locationCoordinate(e),o=[a.x*this.worldSize,a.y*this.worldSize,n,1];return l.af(o,o,this.modelViewProjectionMatrix),o[2]/o[3]}}function ka(h,e){let n,a=!1,o=null,c=null;const g=()=>{o=null,a&&(h.apply(c,n),o=setTimeout(g,e),a=!1)};return(...b)=>(a=!0,c=this,n=b,o||g(),o)}class uo{constructor(e){this._getCurrentHash=()=>{const n=window.location.hash.replace("#","");if(this._hashName){let a;return n.split("&").map(o=>o.split("=")).forEach(o=>{o[0]===this._hashName&&(a=o)}),(a&&a[1]||"").split("/")}return n.split("/")},this._onHashChange=()=>{const n=this._getCurrentHash();if(n.length>=3&&!n.some(a=>isNaN(a))){const a=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(n[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+n[2],+n[1]],zoom:+n[0],bearing:a,pitch:+(n[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const n=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,n)},this._removeHash=()=>{const n=this._getCurrentHash();if(n.length===0)return;const a=n.join("/");let o=a;o.split("&").length>0&&(o=o.split("&")[0]),this._hashName&&(o=`${this._hashName}=${a}`);let c=window.location.hash.replace(o,"");c.startsWith("#&")?c=c.slice(0,1)+c.slice(2):c==="#"&&(c="");let g=window.location.href.replace(/(#.+)?$/,c);g=g.replace("&&","&"),window.history.replaceState(window.history.state,null,g)},this._updateHash=ka(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){const n=this._map.getCenter(),a=Math.round(100*this._map.getZoom())/100,o=Math.ceil((a*Math.LN2+Math.log(512/360/.5))/Math.LN10),c=Math.pow(10,o),g=Math.round(n.lng*c)/c,b=Math.round(n.lat*c)/c,k=this._map.getBearing(),A=this._map.getPitch();let M="";if(M+=e?`/${g}/${b}/${a}`:`${a}/${b}/${g}`,(k||A)&&(M+="/"+Math.round(10*k)/10),A&&(M+=`/${Math.round(A)}`),this._hashName){const D=this._hashName;let V=!1;const H=window.location.hash.slice(1).split("&").map(X=>{const Q=X.split("=")[0];return Q===D?(V=!0,`${Q}=${M}`):X}).filter(X=>X);return V||H.push(`${D}=${M}`),`#${H.join("&")}`}return`#${M}`}}const co={linearity:.3,easing:l.b8(0,0,.3,1)},xl=l.e({deceleration:2500,maxSpeed:1400},co),uh=l.e({deceleration:20,maxSpeed:1400},co),Fu=l.e({deceleration:1e3,maxSpeed:360},co),ho=l.e({deceleration:1e3,maxSpeed:90},co);class bl{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:F.now(),settings:e})}_drainInertiaBuffer(){const e=this._inertiaBuffer,n=F.now();for(;e.length>0&&n-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const n={zoom:0,bearing:0,pitch:0,pan:new l.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:c}of this._inertiaBuffer)n.zoom+=c.zoomDelta||0,n.bearing+=c.bearingDelta||0,n.pitch+=c.pitchDelta||0,c.panDelta&&n.pan._add(c.panDelta),c.around&&(n.around=c.around),c.pinchAround&&(n.pinchAround=c.pinchAround);const a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,o={};if(n.pan.mag()){const c=Ta(n.pan.mag(),a,l.e({},xl,e||{}));o.offset=n.pan.mult(c.amount/n.pan.mag()),o.center=this._map.transform.center,Sa(o,c)}if(n.zoom){const c=Ta(n.zoom,a,uh);o.zoom=this._map.transform.zoom+c.amount,Sa(o,c)}if(n.bearing){const c=Ta(n.bearing,a,Fu);o.bearing=this._map.transform.bearing+l.ac(c.amount,-179,179),Sa(o,c)}if(n.pitch){const c=Ta(n.pitch,a,ho);o.pitch=this._map.transform.pitch+c.amount,Sa(o,c)}if(o.zoom||o.bearing){const c=n.pinchAround===void 0?n.around:n.pinchAround;o.around=c?this._map.unproject(c):this._map.getCenter()}return this.clear(),l.e(o,{noMoveStart:!0})}}function Sa(h,e){(!h.duration||h.duration<e.duration)&&(h.duration=e.duration,h.easing=e.easing)}function Ta(h,e,n){const{maxSpeed:a,linearity:o,deceleration:c}=n,g=l.ac(h*o/(e/1e3),-a,a),b=Math.abs(g)/(c*o);return{easing:n.easing,duration:1e3*b,amount:g*(b/2)}}class Xi extends l.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,n,a,o={}){const c=T.mousePos(n.getCanvas(),a),g=n.unproject(c);super(e,l.e({point:c,lngLat:g,originalEvent:a},o)),this._defaultPrevented=!1,this.target=n}}class ns extends l.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,n,a){const o=e==="touchend"?a.changedTouches:a.touches,c=T.touchPos(n.getCanvasContainer(),o),g=c.map(k=>n.unproject(k)),b=c.reduce((k,A,M,D)=>k.add(A.div(D.length)),new l.P(0,0));super(e,{points:c,point:b,lngLats:g,lngLat:n.unproject(b),originalEvent:a}),this._defaultPrevented=!1}}class Ou extends l.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,n,a){super(e,{originalEvent:a}),this._defaultPrevented=!1}}class $u{constructor(e,n){this._map=e,this._clickTolerance=n.clickTolerance}reset(){delete this._mousedownPos}
vendor: 12,184 bytes, line 587
587wheel(e){return this._firePreventable(new Ou(e.type,this._map,e))}mousedown(e,n){return this._mousedownPos=n,this._firePreventable(new Xi(e.type,this._map,e))}mouseup(e){this._map.fire(new Xi(e.type,this._map,e))}click(e,n){this._mousedownPos&&this._mousedownPos.dist(n)>=this._clickTolerance||this._map.fire(new Xi(e.type,this._map,e))}dblclick(e){return this._firePreventable(new Xi(e.type,this._map,e))}mouseover(e){this._map.fire(new Xi(e.type,this._map,e))}mouseout(e){this._map.fire(new Xi(e.type,this._map,e))}touchstart(e){return this._firePreventable(new ns(e.type,this._map,e))}touchmove(e){this._map.fire(new ns(e.type,this._map,e))}touchend(e){this._map.fire(new ns(e.type,this._map,e))}touchcancel(e){this._map.fire(new ns(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Pi{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new Xi(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Xi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new Xi(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Jr{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.pointLocation(l.P.convert(e),this._map.terrain)}}class Pr{constructor(e,n){this._map=e,this._tr=new Jr(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=n.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,n){this.isEnabled()&&e.shiftKey&&e.button===0&&(T.disableDrag(),this._startPos=this._lastPos=n,this._active=!0)}mousemoveWindow(e,n){if(!this._active)return;const a=n;if(this._lastPos.equals(a)||!this._box&&a.dist(this._startPos)<this._clickTolerance)return;const o=this._startPos;this._lastPos=a,this._box||(this._box=T.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",e));const c=Math.min(o.x,a.x),g=Math.max(o.x,a.x),b=Math.min(o.y,a.y),k=Math.max(o.y,a.y);T.setTransform(this._box,`translate(${c}px,${b}px)`),this._box.style.width=g-c+"px",this._box.style.height=k-b+"px"}mouseupWindow(e,n){if(!this._active||e.button!==0)return;const a=this._startPos,o=n;if(this.reset(),T.suppressClick(),a.x!==o.x||a.y!==o.y)return this._map.fire(new l.k("boxzoomend",{originalEvent:e})),{cameraAnimation:c=>c.fitScreenCoordinates(a,o,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(T.remove(this._box),this._box=null),T.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,n){return this._map.fire(new l.k(e,{originalEvent:n}))}}function za(h,e){if(h.length!==e.length)throw new Error(`The number of touches and points are not equal - touches ${h.length}, points ${e.length}`);const n={};for(let a=0;a<h.length;a++)n[h[a].identifier]=e[a];return n}class wl{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,n,a){(this.centroid||a.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=e.timeStamp),a.length===this.numTouches&&(this.centroid=function(o){const c=new l.P(0,0);for(const g of o)c._add(g);return c.div(o.length)}(n),this.touches=za(a,n)))}touchmove(e,n,a){if(this.aborted||!this.centroid)return;const o=za(a,n);for(const c in this.touches){const g=o[c];(!g||g.dist(this.touches[c])>30)&&(this.aborted=!0)}}touchend(e,n,a){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),a.length===0){const o=!this.aborted&&this.centroid;if(this.reset(),o)return o}}}class po{constructor(e){this.singleTap=new wl(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,n,a){this.singleTap.touchstart(e,n,a)}touchmove(e,n,a){this.singleTap.touchmove(e,n,a)}touchend(e,n,a){const o=this.singleTap.touchend(e,n,a);if(o){const c=e.timeStamp-this.lastTime<500,g=!this.lastTap||this.lastTap.dist(o)<30;if(c&&g||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=o,this.count===this.numTaps)return this.reset(),o}}}class Fs{constructor(e){this._tr=new Jr(e),this._zoomIn=new po({numTouches:1,numTaps:2}),this._zoomOut=new po({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,n,a){this._zoomIn.touchstart(e,n,a),this._zoomOut.touchstart(e,n,a)}touchmove(e,n,a){this._zoomIn.touchmove(e,n,a),this._zoomOut.touchmove(e,n,a)}touchend(e,n,a){const o=this._zoomIn.touchend(e,n,a),c=this._zoomOut.touchend(e,n,a),g=this._tr;return o?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:b=>b.easeTo({duration:300,zoom:g.zoom+1,around:g.unproject(o)},{originalEvent:e})}):c?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:b=>b.easeTo({duration:300,zoom:g.zoom-1,around:g.unproject(c)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class zn{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){const n=this._moveFunction(...e);if(n.bearingDelta||n.pitchDelta||n.around||n.panDelta)return this._active=!0,n}dragStart(e,n){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=n.length?n[0]:n,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,n){if(!this.isEnabled())return;const a=this._lastPoint;if(!a)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);const o=n.length?n[0]:n;return!this._moved&&o.dist(a)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=o,this._move(a,o))}dragEnd(e){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(e)&&(this._moved&&T.suppressClick(),this.reset(e))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const kl={0:1,2:2};class fo{constructor(e){this._correctEvent=e.checkCorrectEvent}startMove(e){const n=T.mouseButton(e);this._eventButton=n}endMove(e){delete this._eventButton}isValidStartEvent(e){return this._correctEvent(e)}isValidMoveEvent(e){return!function(n,a){const o=kl[a];return n.buttons===void 0||(n.buttons&o)!==o}(e,this._eventButton)}isValidEndEvent(e){return T.mouseButton(e)===this._eventButton}}class Sl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(e){return e.targetTouches.length===1}_isSameTouchEvent(e){return e.targetTouches[0].identifier===this._firstTouch}startMove(e){this._firstTouch=e.targetTouches[0].identifier}endMove(e){delete this._firstTouch}isValidStartEvent(e){return this._isOneFingerTouch(e)}isValidMoveEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}isValidEndEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}}const mo=h=>{h.mousedown=h.dragStart,h.mousemoveWindow=h.dragMove,h.mouseup=h.dragEnd,h.contextmenu=e=>{e.preventDefault()}},Tl=({enable:h,clickTolerance:e,bearingDegreesPerPixelMoved:n=.8})=>{const a=new fo({checkCorrectEvent:o=>T.mouseButton(o)===0&&o.ctrlKey||T.mouseButton(o)===2});return new zn({clickTolerance:e,move:(o,c)=>({bearingDelta:(c.x-o.x)*n}),moveStateManager:a,enable:h,assignEvents:mo})},zl=({enable:h,clickTolerance:e,pitchDegreesPerPixelMoved:n=-.5})=>{const a=new fo({checkCorrectEvent:o=>T.mouseButton(o)===0&&o.ctrlKey||T.mouseButton(o)===2});return new zn({clickTolerance:e,move:(o,c)=>({pitchDelta:(c.y-o.y)*n}),moveStateManager:a,enable:h,assignEvents:mo})};class ss{constructor(e,n){this._clickTolerance=e.clickTolerance||1,this._map=n,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new l.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,n,a){return this._calculateTransform(e,n,a)}touchmove(e,n,a){if(this._active){if(!this._shouldBePrevented(a.length))return e.preventDefault(),this._calculateTransform(e,n,a);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,n,a){this._calculateTransform(e,n,a),this._active&&this._shouldBePrevented(a.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,n,a){a.length>0&&(this._active=!0);const o=za(a,n),c=new l.P(0,0),g=new l.P(0,0);let b=0;for(const A in o){const M=o[A],D=this._touches[A];D&&(c._add(M),g._add(M.sub(D)),b++,o[A]=M)}if(this._touches=o,this._shouldBePrevented(b)||!g.mag())return;const k=g.div(b);return this._sum._add(k),this._sum.mag()<this._clickTolerance?void 0:{around:c.div(b),panDelta:k}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class go{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(e,n,a){this._firstTwoTouches||a.length<2||(this._firstTwoTouches=[a[0].identifier,a[1].identifier],this._start([n[0],n[1]]))}touchmove(e,n,a){if(!this._firstTwoTouches)return;e.preventDefault();const[o,c]=this._firstTwoTouches,g=Ca(a,n,o),b=Ca(a,n,c);if(!g||!b)return;const k=this._aroundCenter?null:g.add(b).div(2);return this._move([g,b],k,e)}touchend(e,n,a){if(!this._firstTwoTouches)return;const[o,c]=this._firstTwoTouches,g=Ca(a,n,o),b=Ca(a,n,c);g&&b||(this._active&&T.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&e.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Ca(h,e,n){for(let a=0;a<h.length;a++)if(h[a].identifier===n)return e[a]}function Cl(h,e){return Math.log(h/e)/Math.LN2}class Al extends go{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,n){const a=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(Math.abs(Cl(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Cl(this._distance,a),pinchAround:n}}}function Pl(h,e){return 180*h.angleWith(e)/Math.PI}class Il extends go{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,n,a){const o=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Pl(this._vector,o),pinchAround:n}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());const n=25/(Math.PI*this._minDiameter)*360,a=Pl(e,this._startVector);return Math.abs(a)<n}}function _o(h){return Math.abs(h.y)>Math.abs(h.x)}class Aa extends go{constructor(e){super(),this._currentTouchCount=0,this._map=e}
587reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,n,a){super.touchstart(e,n,a),this._currentTouchCount=a.length}_start(e){this._lastPoints=e,_o(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,n,a){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const o=e[0].sub(this._lastPoints[0]),c=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(o,c,a.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(o.y+c.y)/2*-.5}):void 0}gestureBeginsVertically(e,n,a){if(this._valid!==void 0)return this._valid;const o=e.mag()>=2,c=n.mag()>=2;if(!o&&!c)return;if(!o||!c)return this._firstMove===void 0&&(this._firstMove=a),a-this._firstMove<100&&void 0;const g=e.y>0==n.y>0;return _o(e)&&_o(n)&&g}}const ju={panStep:100,bearingStep:15,pitchStep:10};class $r{constructor(e){this._tr=new Jr(e);const n=ju;this._panStep=n.panStep,this._bearingStep=n.bearingStep,this._pitchStep=n.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let n=0,a=0,o=0,c=0,g=0;switch(e.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:e.shiftKey?a=-1:(e.preventDefault(),c=-1);break;case 39:e.shiftKey?a=1:(e.preventDefault(),c=1);break;case 38:e.shiftKey?o=1:(e.preventDefault(),g=-1);break;case 40:e.shiftKey?o=-1:(e.preventDefault(),g=1);break;default:return}return this._rotationDisabled&&(a=0,o=0),{cameraAnimation:b=>{const k=this._tr;b.easeTo({duration:300,easeId:"keyboardHandler",easing:gn,zoom:n?Math.round(k.zoom)+n*(e.shiftKey?2:1):k.zoom,bearing:k.bearing+a*this._bearingStep,pitch:k.pitch+o*this._pitchStep,offset:[-c*this._panStep,-g*this._panStep],center:k.center},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function gn(h){return h*(2-h)}const El=4.000244140625;class Qr{constructor(e,n){this._onTimeout=a=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(a)},this._map=e,this._tr=new Jr(e),this._triggerRenderFrame=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let n=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY;const a=F.now(),o=a-(this._lastWheelEventTime||0);this._lastWheelEventTime=a,n!==0&&n%El==0?this._type="wheel":n!==0&&Math.abs(n)<4?this._type="trackpad":o>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(o*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),e.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=e,this._delta-=n,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const n=T.mousePos(this._map.getCanvas(),e),a=this._tr;this._around=n.y>a.transform.height/2-a.transform.getHorizon()?l.N.convert(this._aroundCenter?a.center:a.unproject(n)):l.N.convert(a.center),this._aroundPoint=a.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const e=this._tr.transform;if(this._delta!==0){const k=this._type==="wheel"&&Math.abs(this._delta)>El?this._wheelZoomRate:this._defaultZoomRate;let A=2/(1+Math.exp(-Math.abs(this._delta*k)));this._delta<0&&A!==0&&(A=1/A);const M=typeof this._targetZoom=="number"?e.zoomScale(this._targetZoom):e.scale;this._targetZoom=Math.min(e.maxZoom,Math.max(e.minZoom,e.scaleZoom(M*A))),this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const n=typeof this._targetZoom=="number"?this._targetZoom:e.zoom,a=this._startZoom,o=this._easing;let c,g=!1;const b=F.now()-this._lastWheelEventTime;if(this._type==="wheel"&&a&&o&&b){const k=Math.min(b/200,1),A=o(k);c=l.y.number(a,n,A),k<1?this._frameId||(this._frameId=!0):g=!0}else c=n,g=!0;return this._active=!0,g&&(this._active=!1,this._finishTimeout=setTimeout(()=>
vendor: 6,457 bytes, line 587
587{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!g,zoomDelta:c-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let n=l.b9;if(this._prevEase){const a=this._prevEase,o=(F.now()-a.start)/a.duration,c=a.easing(o+.01)-a.easing(o),g=.27/Math.sqrt(c*c+1e-4)*.01,b=Math.sqrt(.0729-g*g);n=l.b8(g,b,.25,1)}return this._prevEase={start:F.now(),duration:e,easing:n},n}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class as{constructor(e,n){this._clickZoom=e,this._tapZoom=n}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 ch{constructor(e){this._tr=new Jr(e),this.reset()}reset(){this._active=!1}dblclick(e,n){return e.preventDefault(),{cameraAnimation:a=>{a.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(n)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class hh{constructor(){this._tap=new po({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,n,a){if(!this._swipePoint)if(this._tapTime){const o=n[0],c=e.timeStamp-this._tapTime<500,g=this._tapPoint.dist(o)<30;c&&g?a.length>0&&(this._swipePoint=o,this._swipeTouch=a[0].identifier):this.reset()}else this._tap.touchstart(e,n,a)}touchmove(e,n,a){if(this._tapTime){if(this._swipePoint){if(a[0].identifier!==this._swipeTouch)return;const o=n[0],c=o.y-this._swipePoint.y;return this._swipePoint=o,e.preventDefault(),this._active=!0,{zoomDelta:c/128}}}else this._tap.touchmove(e,n,a)}touchend(e,n,a){if(this._tapTime)this._swipePoint&&a.length===0&&this.reset();else{const o=this._tap.touchend(e,n,a);o&&(this._tapTime=e.timeStamp,this._tapPoint=o)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Vu{constructor(e,n,a){this._el=e,this._mousePan=n,this._touchPan=a}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Nu{constructor(e,n,a){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=n,this._mousePitch=a}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Ml{constructor(e,n,a,o){this._el=e,this._touchZoom=n,this._touchRotate=a,this._tapDragZoom=o,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Os{constructor(e,n){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=e,this._options=n,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=T.create("div","maplibregl-cooperative-gesture-screen",e);let n=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(n=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const a=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),o=document.createElement("div");o.className="maplibregl-desktop-message",o.textContent=n,this._container.appendChild(o);const c=document.createElement("div");c.className="maplibregl-mobile-message",c.textContent=a,this._container.appendChild(c),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(T.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,n){this._enabled&&(this._map.fire(new l.k("cooperativegestureprevented",{gestureType:e,originalEvent:n})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const jr=h=>h.zoom||h.drag||h.pitch||h.rotate;class ot extends l.k{}function yo(h){return h.panDelta&&h.panDelta.mag()||h.zoomDelta||h.bearingDelta||h.pitchDelta}class Dl{constructor(e,n){this.handleWindowEvent=o=>{this.handleEvent(o,`${o.type}Window`)},this.handleEvent=(o,c)=>{if(o.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const g=o.type==="renderFrame"?void 0:o,b={needsRenderFrame:!1},k={},A={},M=o.touches,D=M?this._getMapTouches(M):void 0,V=D?T.touchPos(this._map.getCanvas(),D):T.mousePos(this._map.getCanvas(),o);for(const{handlerName:Q,handler:ne,allowed:se}of this._handlers){if(!ne.isEnabled())continue;let ue;this._blockedByActive(A,se,Q)?ne.reset():ne[c||o.type]&&(ue=ne[c||o.type](o,V,D),this.mergeHandlerResult(b,k,ue,Q,g),ue&&ue.needsRenderFrame&&this._triggerRe
vendor: 5,022 bytes, line 587
587nderFrame()),(ue||ne.isActive())&&(A[Q]=ne)}const H={};for(const Q in this._previousActiveHandlers)A[Q]||(H[Q]=g);this._previousActiveHandlers=A,(Object.keys(H).length||yo(b))&&(this._changes.push([b,k,H]),this._triggerRenderFrame()),(Object.keys(A).length||yo(b))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:X}=b;X&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],X(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new bl(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n);const a=this._el;this._listeners=[[a,"touchstart",{passive:!0}],[a,"touchmove",{passive:!1}],[a,"touchend",void 0],[a,"touchcancel",void 0],[a,"mousedown",void 0],[a,"mousemove",void 0],[a,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[a,"mouseover",void 0],[a,"mouseout",void 0],[a,"dblclick",void 0],[a,"click",void 0],[a,"keydown",{capture:!1}],[a,"keyup",void 0],[a,"wheel",{passive:!1}],[a,"contextmenu",void 0],[window,"blur",void 0]];for(const[o,c,g]of this._listeners)T.addEventListener(o,c,o===document?this.handleWindowEvent:this.handleEvent,g)}destroy(){for(const[e,n,a]of this._listeners)T.removeEventListener(e,n,e===document?this.handleWindowEvent:this.handleEvent,a)}_addDefaultHandlers(e){const n=this._map,a=n.getCanvasContainer();this._add("mapEvent",new $u(n,e));const o=n.boxZoom=new Pr(n,e);this._add("boxZoom",o),e.interactive&&e.boxZoom&&o.enable();const c=n.cooperativeGestures=new Os(n,e.cooperativeGestures);this._add("cooperativeGestures",c),e.cooperativeGestures&&c.enable();const g=new Fs(n),b=new ch(n);n.doubleClickZoom=new as(b,g),this._add("tapZoom",g),this._add("clickZoom",b),e.interactive&&e.doubleClickZoom&&n.doubleClickZoom.enable();const k=new hh;this._add("tapDragZoom",k);const A=n.touchPitch=new Aa(n);this._add("touchPitch",A),e.interactive&&e.touchPitch&&n.touchPitch.enable(e.touchPitch);const M=Tl(e),D=zl(e);n.dragRotate=new Nu(e,M,D),this._add("mouseRotate",M,["mousePitch"]),this._add("mousePitch",D,["mouseRotate"]),e.interactive&&e.dragRotate&&n.dragRotate.enable();const V=(({enable:ue,clickTolerance:Y})=>{const me=new fo({checkCorrectEvent:ve=>T.mouseButton(ve)===0&&!ve.ctrlKey});return new zn({clickTolerance:Y,move:(ve,Se)=>({around:Se,panDelta:Se.sub(ve)}),activateOnStart:!0,moveStateManager:me,enable:ue,assignEvents:mo})})(e),H=new ss(e,n);n.dragPan=new Vu(a,V,H),this._add("mousePan",V),this._add("touchPan",H,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&n.dragPan.enable(e.dragPan);const X=new Il,Q=new Al;n.touchZoomRotate=new Ml(a,Q,X,k),this._add("touchRotate",X,["touchPan","touchZoom"]),this._add("touchZoom",Q,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&n.touchZoomRotate.enable(e.touchZoomRotate);const ne=n.scrollZoom=new Qr(n,()=>this._triggerRenderFrame());this._add("scrollZoom",ne,["mousePan"]),e.interactive&&e.scrollZoom&&n.scrollZoom.enable(e.scrollZoom);const se=n.keyboard=new $r(n);this._add("keyboard",se),e.interactive&&e.keyboard&&n.keyboard.enable(),this._add("blockableMapEvent",new Pi(n))}_add(e,n,a){this._handlers.push({handlerName:e,handler:n,allowed:a}),this._handlersById[e]=n}stop(e){if(!this._updatingCamera){for(const{handler:n}of this._handlers)n.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!jr(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,n,a){for(const o in e)if(o!==a&&(!n||n.indexOf(o)<0))return!0;return!1}_getMapTouches(e){const n=[];for(const a of e)this._el.contains(a.target)&&n.push(a);return n}mergeHandlerResult(e,n,a,o,c){if(!a)return;l.e(e,a);const g={handlerName:o,originalEvent:a.originalEvent||c};a.zoomDelta!==void 0&&(n.zoom=g),a.panDelta!==void 0&&(n.drag=g),a.pitchDelta!==void 0&&(n.pitch=g),a.bearingDelta!==void 0&&(n.rotate=g)}_applyChanges(){const e={},n={},a={};for(const[o,c,g]of this._changes)o.panDelta&&(e.panDelta=(e.panDelta||new l.P(0,0))._add(o.panDelta)),o.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+o.zoomDelta),o.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+o.bearingDelta),o.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+o.pitchDelta),o.around!==void 0&&(e.around=o.around),o.pinchAround!==void 0&&(e.pinchAround=o.pinchAround),o.noInertia&&(e.noInertia=o.noInertia),l.e(n,c),l.e(a,g);this._updateMapTransform(e,n,a),this._changes=[]}_updateMapTransform(e,n,a){const o=this._map,c=o._getTransformForUpdate(),g=o.terrain;if(!(yo(e)||g&&this._terrainMovement))return this._fireEvents(n,a,!0);let{panDelta:b,zoomDelta:k,bearingDelta:A,pitchDelta:M,around:D,pinchAround:V}=e;V!==void 0&&(D=V),o._stop(!0),D=D||o.transform.centerPoint;const H=c.pointLocation(b?D.sub(b):D);
vendor: 1,996 bytes, line 587
587A&&(c.bearing+=A),M&&(c.pitch+=M),k&&(c.zoom+=k),g?this._terrainMovement||!n.drag&&!n.zoom?n.drag&&this._terrainMovement?c.center=c.pointLocation(c.centerPoint.sub(b)):c.setLocationAtPoint(H,D):(this._terrainMovement=!0,this._map._elevationFreeze=!0,c.setLocationAtPoint(H,D)):c.setLocationAtPoint(H,D),o._applyUpdatedTransform(c),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(n,a,!0)}_fireEvents(e,n,a){const o=jr(this._eventsInProgress),c=jr(e),g={};for(const D in e){const{originalEvent:V}=e[D];this._eventsInProgress[D]||(g[`${D}start`]=V),this._eventsInProgress[D]=e[D]}!o&&c&&this._fireEvent("movestart",c.originalEvent);for(const D in g)this._fireEvent(D,g[D]);c&&this._fireEvent("move",c.originalEvent);for(const D in e){const{originalEvent:V}=e[D];this._fireEvent(D,V)}const b={};let k;for(const D in this._eventsInProgress){const{handlerName:V,originalEvent:H}=this._eventsInProgress[D];this._handlersById[V].isActive()||(delete this._eventsInProgress[D],k=n[V]||H,b[`${D}end`]=k)}for(const D in b)this._fireEvent(D,b[D]);const A=jr(this._eventsInProgress),M=(o||c)&&!A;if(M&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const D=this._map._getTransformForUpdate();D.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(D)}if(a&&M){this._updatingCamera=!0;const D=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),V=H=>H!==0&&-this._bearingSnap<H&&H<this._bearingSnap;!D||!D.essential&&F.prefersReducedMotion?(this._map.fire(new l.k("moveend",{originalEvent:k})),V(this._map.getBearing())&&this._map.resetNorth()):(V(D.bearing||this._map.getBearing())&&(D.bearing=0),D.freezeElevation=!0,this._map.easeTo(D,{originalEvent:k})),this._updatingCamera=!1}}_fireEvent(e,n){this._map.fire(new l.k(e,n?{originalEvent:n}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(e=>{delete this._frameId,this.handleEvent(new ot("renderFrame",{timeStamp:e})),this._applyChanges()})}
587_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Uu extends l.E{constructor(e,n){super(),this._renderFrameCallback=()=>{const a=Math.min((F.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(a)),a<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=n.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new l.N(this.transform.center.lng,this.transform.center.lat)}setCenter(e,n){return this.jumpTo({center:e},n)}panBy(e,n,a){return e=l.P.convert(e).mult(-1),this.panTo(this.transform.center,l.e({offset:e},n),a)}panTo(e,n,a){return this.easeTo(l.e({center:e},n),a)}getZoom(){return this.transform.zoom}setZoom(e,n){return this.jumpTo({zoom:e},n),this}zoomTo(e,n,a){return this.easeTo(l.e({zoom:e},n),a)}zoomIn(e,n){return this.zoomTo(this.getZoom()+1,e,n),this}zoomOut(e,n){return this.zoomTo(this.getZoom()-1,e,n),this}getBearing(){return this.transform.bearing}setBearing(e,n){return this.jumpTo({bearing:e},n),this}getPadding(){return this.transform.padding}setPadding(e,n){return this.jumpTo({padding:e},n),this}rotateTo(e,n,a){return this.easeTo(l.e({bearing:e},n),a)}resetNorth(e,n){return this.rotateTo(0,l.e({duration:1e3},e),n),this}resetNorthPitch(e,n){return this.easeTo(l.e({bearing:0,pitch:0,duration:1e3},e),n),this}snapToNorth(e,n){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,n):this}getPitch(){return this.transform.pitch}setPitch(e,n){return this.jumpTo({pitch:e},n),this}cameraForBounds(e,n){e=Ce.convert(e).adjustAntiMeridian();const a=n&&n.bearing||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),a,n)}_cameraForBoxAndBearing(e,n,a,o){const c={top:0,bottom:0,right:0,left:0};if(typeof(o=l.e({padding:c,offset:[0,0],maxZoom:this.transform.maxZoom},o)).padding=="number"){const Xe=o.padding;o.padding={top:Xe,bottom:Xe,right:Xe,left:Xe}}o.padding=l.e(c,o.padding);const g=this.transform,b=g.padding,k=new Ce(e,n),A=g.project(k.getNorthWest()),M=g.project(k.getNorthEast()),D=g.project(k.getSouthEast()),V=g.project(k.getSouthWest
vendor: 7,307 bytes, line 587
587()),H=l.ba(-a),X=A.rotate(H),Q=M.rotate(H),ne=D.rotate(H),se=V.rotate(H),ue=new l.P(Math.max(X.x,Q.x,se.x,ne.x),Math.max(X.y,Q.y,se.y,ne.y)),Y=new l.P(Math.min(X.x,Q.x,se.x,ne.x),Math.min(X.y,Q.y,se.y,ne.y)),me=ue.sub(Y),ve=(g.width-(b.left+b.right+o.padding.left+o.padding.right))/me.x,Se=(g.height-(b.top+b.bottom+o.padding.top+o.padding.bottom))/me.y;if(Se<0||ve<0)return void l.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const De=Math.min(g.scaleZoom(g.scale*Math.min(ve,Se)),o.maxZoom),je=l.P.convert(o.offset),Qe=new l.P((o.padding.left-o.padding.right)/2,(o.padding.top-o.padding.bottom)/2).rotate(l.ba(a)),nt=je.add(Qe).mult(g.scale/g.zoomScale(De));return{center:g.unproject(A.add(D).div(2).sub(nt)),zoom:De,bearing:a}}fitBounds(e,n,a){return this._fitInternal(this.cameraForBounds(e,n),n,a)}fitScreenCoordinates(e,n,a,o,c){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(l.P.convert(e)),this.transform.pointLocation(l.P.convert(n)),a,o),o,c)}_fitInternal(e,n,a){return e?(delete(n=l.e(e,n)).padding,n.linear?this.easeTo(n,a):this.flyTo(n,a)):this}jumpTo(e,n){this.stop();const a=this._getTransformForUpdate();let o=!1,c=!1,g=!1;return"zoom"in e&&a.zoom!==+e.zoom&&(o=!0,a.zoom=+e.zoom),e.center!==void 0&&(a.center=l.N.convert(e.center)),"bearing"in e&&a.bearing!==+e.bearing&&(c=!0,a.bearing=+e.bearing),"pitch"in e&&a.pitch!==+e.pitch&&(g=!0,a.pitch=+e.pitch),e.padding==null||a.isPaddingEqual(e.padding)||(a.padding=e.padding),this._applyUpdatedTransform(a),this.fire(new l.k("movestart",n)).fire(new l.k("move",n)),o&&this.fire(new l.k("zoomstart",n)).fire(new l.k("zoom",n)).fire(new l.k("zoomend",n)),c&&this.fire(new l.k("rotatestart",n)).fire(new l.k("rotate",n)).fire(new l.k("rotateend",n)),g&&this.fire(new l.k("pitchstart",n)).fire(new l.k("pitch",n)).fire(new l.k("pitchend",n)),this.fire(new l.k("moveend",n))}calculateCameraOptionsFromTo(e,n,a,o=0){const c=l.Z.fromLngLat(e,n),g=l.Z.fromLngLat(a,o),b=g.x-c.x,k=g.y-c.y,A=g.z-c.z,M=Math.hypot(b,k,A);if(M===0)throw new Error("Can't calculate camera options with same From and To");const D=Math.hypot(b,k),V=this.transform.scaleZoom(this.transform.cameraToCenterDistance/M/this.transform.tileSize),H=180*Math.atan2(b,-k)/Math.PI;let X=180*Math.acos(D/M)/Math.PI;return X=A<0?90-X:90+X,{center:g.toLngLat(),zoom:V,pitch:X,bearing:H}}easeTo(e,n){var a;this._stop(!1,e.easeId),((e=l.e({offset:[0,0],duration:500,easing:l.b9},e)).animate===!1||!e.essential&&F.prefersReducedMotion)&&(e.duration=0);const o=this._getTransformForUpdate(),c=o.zoom,g=o.bearing,b=o.pitch,k=o.padding,A="bearing"in e?this._normalizeBearing(e.bearing,g):g,M="pitch"in e?+e.pitch:b,D="padding"in e?e.padding:o.padding,V=l.P.convert(e.offset);let H=o.centerPoint.add(V);const X=o.pointLocation(H),{center:Q,zoom:ne}=o.getConstrained(l.N.convert(e.center||X),(a=e.zoom)!==null&&a!==void 0?a:c);this._normalizeCenter(Q,o);const se=o.project(X),ue=o.project(Q).sub(se),Y=o.zoomScale(ne-c);let me,ve;e.around&&(me=l.N.convert(e.around),ve=o.locationPoint(me));const Se={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||ne!==c,this._rotating=this._rotating||g!==A,this._pitching=this._pitching||M!==b,this._padding=!o.isPaddingEqual(D),this._easeId=e.easeId,this._prepareEase(n,e.noMoveStart,Se),this.terrain&&this._prepareElevation(Q),this._ease(De=>{if(this._zooming&&(o.zoom=l.y.number(c,ne,De)),this._rotating&&(o.bearing=l.y.number(g,A,De)),this._pitching&&(o.pitch=l.y.number(b,M,De)),this._padding&&(o.interpolatePadding(k,D,De),H=o.centerPoint.add(V)),this.terrain&&!e.freezeElevation&&this._updateElevation(De),me)o.setLocationAtPoint(me,ve);else{const je=o.zoomScale(o.zoom-c),Qe=ne>c?Math.min(2,Y):Math.max(.5,Y),nt=Math.pow(Qe,1-De),Xe=o.unproject(se.add(ue.mult(De*nt)).mult(je));o.setLocationAtPoint(o.renderWorldCopies?Xe.wrap():Xe,H)}this._applyUpdatedTransform(o),this._fireMoveEvents(n)},De=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(n,De)},e),this}_prepareEase(e,n,a={}){this._moving=!0,n||a.moving||this.fire(new l.k("movestart",e)),this._zooming&&!a.zooming&&this.fire(new l.k("zoomstart",e)),this._rotating&&!a.rotating&&this.fire(new l.k("rotatestart",e)),this._pitching&&!a.pitching&&this.fire(new l.k("pitchstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const n=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&n!==this._elevationTarget){const a=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(a-(n-(a*e+this._elevationStart))/(1-e)),this._elevationTarget=n}this.transform.elevation=l.y.number(this._elevationStart,this._elevationTarget,e)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){const n=e.getCameraPosition(),a=this.terrain.getElevationForLngLatZoom(n.lngLat,e.zoom);if(n.altitude<a){const o=this.calculateCameraOptionsFromTo(n.lngLat,a,e.center,e.elevation);return{pitch:o.pitch,zoom:o.zoom}}return{}}_applyUpdatedTransform(e){const n=[];if(this.terrain&&n.push(o=>this._elevateCameraIfInsideTerrain(o)),this.transformCameraUpdate&&n.push(o=>this.transformCameraUpdate(o)),!n.length)return;const a=e.clone();for(const o of n){const c=a.clone(),{center:g,zoom:b,pitch:k,bearing:A,elevation:M}=o(c);g&&(c.center=g),b!==void 0&&(c.zoom=b),k!==void 0&&(c.pitch=k),A!==void 0&&(c.bearing=A),M!==void 0&&(c.elevation=M),a.apply(c)}this.transform.apply(a)}_fireMoveEvents(e){this.fire(new l.k("move",e)),this._zooming&&this.fire(new l.k("zoom",e)),this._rotating&&this.fire(new l.k("rotate",e)),this._pitching&&this.fire(new l.k("pitch",e))}_afterEase(e,n){if(this._easeId&&n&&this._easeId===n)return;delete this._easeId;const a=this._zooming,o=this._rotating,c=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,a&&this.fire(new l.k("zoomend",e)),o&&this.fire(new l.k("rotateend",e)),c&&this.fire(new l.k("pitchend",e)),this.fire(new l.k("moveend",e))}flyTo(e,n){var a;if(!e.essential&&F.prefersReducedMotion){const it=l.M(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(it,n)}this.stop(),e=l.e({offset:[0,0],speed:1.2,curve:1.42,easing:l.b9},e);const o=this._getTransformForUpdate(),c=o.zoom,g=o.bearing,b=o.pitch,k=o.padding,A="bearing"in e?this._normalizeBearing(e.bearing,g):g,M="pitch"in e?+e.pitch:b,D="padding"in e?e.padding:o.padding,V=l.P.convert(e.offset);let H=o.centerPoint.add(V);const X=o.pointLocation(H),{center:Q,zoom:ne}=o.getConstrained(l.N.convert(e.center||X),(a=e.zoom)!==null&&a!==void 0?a:c);this._normalizeCenter(Q,o);const se=o.zoomScale(ne-c),ue=o.project(X),Y=o.project(Q).sub(ue);let me=e.curve;
587const ve=Math.max(o.width,o.height),Se=ve/se,De=Y.mag();if("minZoom"in e){const it=l.ac(Math.min(e.minZoom,c,ne),o.minZoom,o.maxZoom),St=ve/o.zoomScale(it-c);me=Math.sqrt(St/De*2)}const je=me*me;function Qe(it){const St=(Se*Se-ve*ve+(it?-1:1)*je*je*De*De)/(2*(it?Se:ve)*je*De);return Math.log(Math.sqrt(St*St+1)-St)}function nt(it){return(Math.exp(it)-Math.exp(-it))/2}function Xe(it){return(Math.exp(it)+Math.exp(-it))/2}const We=Qe(!1);let ht=function(it){return Xe(We)/Xe(We+me*it)},zt=function(it){return ve*((Xe(We)*(nt(St=We+me*it)/Xe(St))-nt(We))/je)/De;var St},Ye=(Qe(!0)-We)/me;if(Math.abs(De)<1e-6||!isFinite(Ye)){if(Math.abs(ve-Se)<1e-6)return this.easeTo(e,n);const it=Se<ve?-1:1;Ye=Math.abs(Math.log(Se/ve))/me,zt=()=>0,ht=St=>Math.exp(it*me*St)}return e.duration="duration"in e?+e.duration:1e3*Ye/("screenSpeed"in e?+e.screenSpeed/me:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=g!==A,this._pitching=M!==b,this._padding=!o.isPaddingEqual(D),this._prepareEase(n,!1),this.terrain&&this._prepareElevation(Q),this._ease(it=>{const St=it*Ye,gi=1/ht(St);o.zoom=it===1?ne:c+o.scaleZoom(gi),this._rotating&&(o.bearing=l.y.number(g,A,it)),this._pitching&&(o.pitch=l.y.number(b,M,it)),this._padding&&(o.interpolatePadding(k,D,it),H=o.centerPoint.add(V)),this.terrain&&!e.freezeElevation&&this._updateElevation(it);const Dt=it===1?Q:o.unproject(ue.add(Y.mult(zt(St))).mult(gi));o.setLocationAtPoint(o.renderWorldCopies?Dt.wrap():Dt,H),this._applyUpdatedTransform(o),this._fireMoveEvents(n)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(n)},e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,n){var a;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const o=this._onEaseEnd;delete this._onEaseEnd,o.call(this,n)}return e||(a=this.handlers)===null||a===void 0||a.stop(!1),this}_ease(e,n,a){a.animate===!1||a.duration===0?(e(1),n()):(this._easeStart=F.now(),this._easeOptions=a,this._onEaseFrame=e,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,n){e=l.b3(e,-180,180);const a=Math.abs(e-n);return Math.abs(e-360-n)<a&&(e-=360),Math.abs(e+360-n)<a&&(e+=360),e}_normalizeCenter(e,n){if(!n.renderWorldCopies||n.lngRange)return;const a=e.lng-n.center.lng;e.lng+=a>180?-360:a<-180?360:0}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLatZoom(l.N.convert(e),this.transform.tileZoom)-this.transform.elevation:null}}const $s={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class js{constructor(e=$s){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=n=>{!n||n.sourceDataType!=="metadata"&&n.sourceDataType!=="visibility"&&n.dataType!=="style"&&n.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=T.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=T.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=T.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(){T.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,n){const a=this._map._getUIString(`AttributionControl.${n}`);e.title=a,e.setAttribute("aria-label",a)}_updateAttributions(){if(!this._map.style)return;let e=[];
vendor: 21,949 bytes, line 587
587if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(o=>typeof o!="string"?"":o)):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){const o=this._map.style.stylesheet;this.styleOwner=o.owner,this.styleId=o.id}const n=this._map.style.sourceCaches;for(const o in n){const c=n[o];if(c.used||c.usedForTerrain){const g=c.getSource();g.attribution&&e.indexOf(g.attribution)<0&&e.push(g.attribution)}}e=e.filter(o=>String(o).trim()),e.sort((o,c)=>o.length-c.length),e=e.filter((o,c)=>{for(let g=c+1;g<e.length;g++)if(e[g].indexOf(o)>=0)return!1;return!0});const a=e.join(" | ");a!==this._attribHTML&&(this._attribHTML=a,e.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Ll{constructor(e={}){this._updateCompact=()=>{const n=this._container.children;if(n.length){const a=n[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&a.classList.add("maplibregl-compact"):a.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=T.create("div","maplibregl-ctrl");const n=T.create("a","maplibregl-ctrl-logo");return n.target="_blank",n.rel="noopener nofollow",n.href="https://maplibre.org/",n.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),n.setAttribute("rel","noopener nofollow"),this._container.appendChild(n),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){T.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Nt{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const n=++this._id;return this._queue.push({callback:e,id:n,cancelled:!1}),n}remove(e){const n=this._currentlyRunning,a=n?this._queue.concat(n):this._queue;for(const o of a)if(o.id===e)return void(o.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const n=this._currentlyRunning=this._queue;this._queue=[];for(const a of n)if(!a.cancelled&&(a.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Rl=l.Y([{name:"a_pos3d",type:"Int16",components:3}]);class dh extends l.E{constructor(e){super(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,e.usedForTerrain=!0,e.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,n){this.sourceCache.update(e,n),this._renderableTilesKeys=[];const a={};for(const o of e.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:n}))a[o.key]=!0,this._renderableTilesKeys.push(o.key),this._tiles[o.key]||(o.posMatrix=new Float64Array(16),l.aP(o.posMatrix,0,l.X,0,l.X,0,1),this._tiles[o.key]=new ar(o,this.tileSize));for(const o in this._tiles)a[o]||delete this._tiles[o]}freeRtt(e){for(const n in this._tiles){const a=this._tiles[n];(!e||a.tileID.equals(e)||a.tileID.isChildOf(e)||e.isChildOf(a.tileID))&&(a.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e){const n={};for(const a of this._renderableTilesKeys){const o=this._tiles[a].tileID;if(o.canonical.equals(e.canonical)){const c=e.clone();c.posMatrix=new Float64Array(16),l.aP(c.posMatrix,0,l.X,0,l.X,0,1),n[a]=c}else if(o.canonical.isChildOf(e.canonical)){const c=e.clone();c.posMatrix=new Float64Array(16);const g=o.canonical.z-e.canonical.z,b=o.canonical.x-(o.canonical.x>>g<<g),k=o.canonical.y-(o.canonical.y>>g<<g),A=l.X>>g;l.aP(c.posMatrix,0,A,0,A,0,1),l.J(c.posMatrix,c.posMatrix,[-b*A,-k*A,0]),n[a]=c}else if(e.canonical.isChildOf(o.canonical)){const c=e.clone();c.posMatrix=new Float64Array(16);const g=e.canonical.z-o.canonical.z,b=e.canonical.x-(e.canonical.x>>g<<g),k=e.canonical.y-(e.canonical.y>>g<<g),A=l.X>>g;l.aP(c.posMatrix,0,l.X,0,l.X,0,1),l.J(c.posMatrix,c.posMatrix,[b*A,k*A,0]),l.K(c.posMatrix,c.posMatrix,[1/2**g,1/2**g,0]),n[a]=c}}return n}getSourceTile(e,n){const a=this.sourceCache._source;let o=e.overscaledZ-this.deltaZoom;if(o>a.maxzoom&&(o=a.maxzoom),o<a.minzoom)return null;this._sourceTileCache[e.key]||(this._sourceTileCache[e.key]=e.scaledTo(o).key);let c=this.sourceCache.getTileByID(this._sourceTileCache[e.key]);if((!c||!c.dem)&&n)for(;o>=a.minzoom&&(!c||!c.dem);)c=this.sourceCache.getTileByID(e.scaledTo(o--).key);return c}tilesAfterTime(e=Date.now()){return Object.values(this._tiles).filter(n=>n.timeAdded>=e)}}class Bl{constructor(e,n,a){this.painter=e,this.sourceCache=new dh(n),this.options=a,this.exaggeration=typeof a.exaggeration=="number"?a.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,n,a,o=l.X){var c;if(!(n>=0&&n<o&&a>=0&&a<o))return 0;const g=this.getTerrainData(e),b=(c=g.tile)===null||c===void 0?void 0:c.dem;if(!b)return 0;const k=function(X,Q,ne){var se=Q[0],ue=Q[1];return X[0]=ne[0]*se+ne[4]*ue+ne[12],X[1]=ne[1]*se+ne[5]*ue+ne[13],X}([],[n/o*l.X,a/o*l.X],g.u_terrain_matrix),A=[k[0]*b.dim,k[1]*b.dim],M=Math.floor(A[0]),D=Math.floor(A[1]),V=A[0]-M,H=A[1]-D;return b.get(M,D)*(1-V)*(1-H)+b.get(M+1,D)*V*(1-H)+b.get(M,D+1)*(1-V)*H+b.get(M+1,D+1)*V*H}getElevationForLngLatZoom(e,n){if(!l.bb(n,e.wrap()))return 0;const{tileID:a,mercatorX:o,mercatorY:c}=this._getOverscaledTileIDFromLngLatZoom(e,n);return this.getElevation(a,o%l.X,c%l.X,l.X)}getElevation(e,n,a,o=l.X){return this.getDEMElevation(e,n,a,o)*this.exaggeration}getTerrainData(e){if(!this._emptyDemTexture){const o=this.painter.context,c=new l.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new Pt(o,c,o.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new Pt(o,new l.R({width:1,height:1}),o.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(o.gl.NEAREST,o.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=l.an([])}const n=this.sourceCache.getSourceTile(e,!0);if(n&&n.dem&&(!n.demTexture||n.needsTerrainPrepare)){const o=this.painter.context;n.demTexture=this.painter.getTileTexture(n.dem.stride),n.demTexture?n.demTexture.update(n.dem.getPixels(),{premultiply:!1}):n.demTexture=new Pt(o,n.dem.getPixels(),o.gl.RGBA,{premultiply:!1}),n.demTexture.bind(o.gl.NEAREST,o.gl.CLAMP_TO_EDGE),n.needsTerrainPrepare=!1}const a=n&&n+n.tileID.key+e.key;if(a&&!this._demMatrixCache[a]){const o=this.sourceCache.sourceCache._source.maxzoom;let c=e.canonical.z-n.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=o?c=e.canonical.z-o:l.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const g=e.canonical.x-(e.canonical.x>>c<<c),b=e.canonical.y-(e.canonical.y>>c<<c),k=l.bc(new Float64Array(16),[1/(l.X<<c),1/(l.X<<c),0]);l.J(k,k,[g*l.X,b*l.X,0]),this._demMatrixCache[e.key]={matrix:k,coord:e}}return{u_depth:2,u_terrain:3,u_terrain_dim:n&&n.dem&&n.dem.dim||1,u_terrain_matrix:a?this._demMatrixCache[e.key].matrix:this._emptyDemMatrix,u_terrain_unpack:n&&n.dem&&n.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(n&&n.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:n}}getFramebuffer(e){const n=this.painter,a=n.width/devicePixelRatio,o=n.height/devicePixelRatio;return!this._fbo||this._fbo.width===a&&this._fbo.height===o||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new Pt(n.context,{width:a,height:o,data:null},n.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(n.context.gl.NEAREST,n.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new Pt(n.context,{width:a,height:o,data:null},n.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(n.context.gl.NEAREST,n.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=n.context.createFramebuffer(a,o,!0,!1),this._fbo.depthAttachment.set(n.context.createRenderbuffer(n.context.gl.DEPTH_COMPONENT16,a,o))),this._fbo.colorAttachment.set(e==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const e=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const n=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let c=0,g=0;c<this._coordsTextureSize;c++)for(let b=0;b<this._coordsTextureSize;b++,g+=4)n[g+0]=255&b,n[g+1]=255&c,n[g+2]=b>>8<<4|c>>8,n[g+3]=0;const a=new l.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(n.buffer)),o=new Pt(e,a,e.gl.RGBA,{premultiply:!1});return o.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=o,o}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);const n=new Uint8Array(4),a=this.painter.context,o=a.gl,c=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),g=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),b=Math.round(this.painter.height/devicePixelRatio);a.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),o.readPixels(c,b-g-1,1,1,o.RGBA,o.UNSIGNED_BYTE,n),a.bindFramebuffer.set(null);const k=n[0]+(n[2]>>4<<8),A=n[1]+((15&n[2])<<8),M=this.coordsIndex[255-n[3]],D=M&&this.sourceCache.getTileByID(M);if(!D)return null;const V=this._coordsTextureSize,H=(1<<D.tileID.canonical.z)*V;return new l.Z((D.tileID.canonical.x*V+k)/H+D.tileID.wrap,(D.tileID.canonical.y*V+A)/H,this.getElevation(D.tileID,k,A,V))}depthAtPoint(e){const n=new Uint8Array(4),a=this.painter.context,o=a.gl;return a.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),o.readPixels(e.x,this.painter.height/devicePixelRatio-e.y-1,1,1,o.RGBA,o.UNSIGNED_BYTE,n),a.bindFramebuffer.set(null),(n[0]/16777216+n[1]/65536+n[2]/256+n[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const e=this.painter.context,n=new l.bd,a=new l.aY,o=this.meshSize,c=l.X/o,g=o*o;for(let D=0;D<=o;D++)for(let V=0;V<=o;V++)n.emplaceBack(V*c,D*c,0);for(let D=0;D<g;D+=o+1)for(let V=0;V<o;V++)a.emplaceBack(V+D,o+V+D+1,o+V+D+2),a.emplaceBack(V+D,o+V+D+2,V+D+1);const b=n.length,k=b+2*(o+1);for(const D of[0,1])for(let V=0;V<=o;V++)for(const H of[0,1])n.emplaceBack(V*c,D*l.X,H);for(let D=0;D<2*o;D+=2)a.emplaceBack(k+D,k+D+1,k+D+3),a.emplaceBack(k+D,k+D+3,k+D+2),a.emplaceBack(b+D,b+D+3,b+D+1),a.emplaceBack(b+D,b+D+2,b+D+3);const A=n.length,M=A+2*(o+1);for(const D of[0,1])for(let V=0;V<=o;V++)for(const H of[0,1])n.emplaceBack(D*l.X,V*c,H);for(let D=0;D<2*o;D+=2)a.emplaceBack(A+D,A+D+1,A+D+3),a.emplaceBack(A+D,A+D+3,A+D+2),a.emplaceBack(M+D,M+D+3,M+D+1),a.emplaceBack(M+D,M+D+2,M+D+3);return this._mesh=new oo(e.createVertexBuffer(n,Rl.members),e.createIndexBuffer(a),l.a0.simpleSegment(0,0,n.length,a.length)),this._mesh}getMeshFrameDelta(e){return 2*Math.PI*l.be/Math.pow(2,e)/5}getMinTileElevationForLngLatZoom(e,n){var a;const{tileID:o}=this._getOverscaledTileIDFromLngLatZoom(e,n);return(a=this.getMinMaxElevation(o).minElevation)!==null&&a!==void 0?a:0}getMinMaxElevation(e){const n=this.getTerrainData(e).tile,a={minElevation:null,maxElevation:null};return n&&n.dem&&(a.minElevation=n.dem.min*this.exaggeration,a.maxElevation=n.dem.max*this.exaggeration),a}_getOverscaledTileIDFromLngLatZoom(e,n){const a=l.Z.fromLngLat(e.wrap()),o=(1<<n)*l.X,c=a.x*o,g=a.y*o,b=Math.floor(c/l.X),k=Math.floor(g/l.X);return{tileID:new l.S(n,0,n,b,k),mercatorX:c,mercatorY:g}}}class ph{constructor(e,n,a){this._context=e,this._size=n,this._tileSize=a,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const e of this._objects)e.texture.destroy(),e.fbo.destroy()}_createObject(e){const n=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),a=new Pt(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return a.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),n.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),n.colorAttachment.set(a.texture),{id:e,fbo:n,texture:a,stamp:-1,inUse:!1}}getObjectForId(e){return this._objects[e]}useObject(e){e.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(n=>e.id!==n),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(const n of this._recentlyUsed)if(!this._objects[n].inUse)return this._objects[n];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(const e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(e=>!e.inUse)===!1}}const Vs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Gu{constructor(e,n){this.painter=e,this.terrain=n,this.pool=new ph(e.context,30,n.sourceCache.tileSize*n.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,n){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter(a=>!e._layers[a].isHidden(n)),this._coordsDescendingInv={};for(const a in e.sourceCaches){this._coordsDescendingInv[a]={};const o=e.sourceCaches[a].getVisibleCoordinates();for(const c of o){const g=this.terrain.sourceCache.getTerrainCoords(c);for(const b in g)this._coordsDescendingInv[a][b]||(this._coordsDescendingInv[a][b]=[]),this._coordsDescendingInv[a][b].push(g[b])}}this._coordsDescendingInvStr={};for(const a of e._order){const o=e._layers[a],c=o.source;if(Vs[o.type]&&!this._coordsDescendingInvStr[c]){this._coordsDescendingInvStr[c]={};for(const g in this._coordsDescendingInv[c])this._coordsDescendingInvStr[c][g]=this._coordsDescendingInv[c][g].map(b=>b.key).sort().join()}}for(const a of this._renderableTiles)for(const o in this._coordsDescendingInvStr){const c=this._coordsDescendingInvStr[o][a.tileID.key];c&&c!==a.rttCoords[o]&&(a.rtt=[])}}renderLayer(e){if(e.isHidden(this.painter.transform.zoom))return!1;const n=e.type,a=this.painter,o=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(Vs[n]&&(this._prevType&&Vs[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(e.id),!o))return!0;if(Vs[this._prevType]||Vs[n]&&o){this._prevType=n;const c=this._stacks.length-1,g=this._stacks[c]||[];for(const b of this._renderableTiles){if(this.pool.isFull()&&(Bu(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(b),b.rtt[c]){const A=this.pool.getObjectForId(b.rtt[c].id);if(A.stamp===b.rtt[c].stamp){this.pool.useObject(A);continue}}const k=this.pool.getOrCreateFreeObject();this.pool.useObject(k),this.pool.stampObject(k),b.rtt[c]={id:k.id,stamp:k.stamp},a.context.bindFramebuffer.set(k.fbo.framebuffer),a.context.clear({color:l.aM.transparent,stencil:0}),a.currentStencilSource=void 0;for(let A=0;A<g.length;A++){const M=a.style._layers[g[A]],D=M.source?this._coordsDescendingInv[M.source][b.tileID.key]:[b.tileID];a.context.viewport.set([0,0,k.fbo.width,k.fbo.height]),a._renderTileClippingMasks(M,D),a.renderLayer(a,a.style.sourceCaches[M.source],M,D),M.source&&(b.rttCoords[M.source]=this._coordsDescendingInvStr[M.source][b.tileID.key])}}return Bu(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Vs[n]}return!1}}const Fl={"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","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use â + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},qu=U,fh={hash:!1,interactive:!0,bearingSnap:7,attributionControl:$s,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!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],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:l.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ol=h=>{h.touchstart=h.dragStart,h.touchmoveWindow=h.dragMove,h.touchend=h.dragEnd},mh={showCompass:!0,showZoom:!0,visualizePitch:!1};class gh{constructor(e,n,a=!1){this.mousedown=g=>{this.startMouse(l.e({},g,{ctrlKey:!0,preventDefault:()=>g.preventDefault()}),T.mousePos(this.element,g)),T.addEventListener(window,"mousemove",this.mousemove),T.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=g=>{this.moveMouse(g,T.mousePos(this.element,g))},this.mouseup=g=>{this.mouseRotate.dragEnd(g),this.mousePitch&&this.mousePitch.dragEnd(g),this.offTemp()},this.touchstart=g=>{g.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=T.touchPos(this.element,g.targetTouches)[0],this.startTouch(g,this._startPos),T.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),T.addEventListener(window,"touchend",this.touchend))},this.touchmove=g=>{g.targetTouches.length!==1?this.reset():(this._lastPos=T.touchPos(this.element,g.targetTouches)[0],this.moveTouch(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.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const o=e.dragRotate._mouseRotate.getClickTolerance(),c=e.dragRotate._mousePitch.getClickTolerance();this.element=n,this.mouseRotate=Tl({clickTolerance:o,enable:!0}),this.touchRotate=(({enable:g,clickTolerance:b,bearingDegreesPerPixelMoved:k=.8})=>{const A=new Sl;return new zn({clickTolerance:b,move:(M,D)=>({bearingDelta:(D.x-M.x)*k}),moveStateManager:A,enable:g,assignEvents:Ol})})({clickTolerance:o,enable:!0}),this.map=e,a&&(this.mousePitch=zl({clickTolerance:c,enable:!0}),this.touchPitch=(({enable:g,clickTolerance:b,pitchDegreesPerPixelMoved:k=-.5})=>{const A=new Sl;return new zn({clickTolerance:b,move:(M,D)=>({pitchDelta:(D.y-M.y)*k}),moveStateManager:A,enable:g,assignEvents:Ol})})({clickTolerance:c,enable:!0})),T.addEventListener(n,"mousedown",this.mousedown),T.addEventListener(n,"touchstart",this.touchstart,{passive:!1}),T.addEventListener(n,"touchcancel",this.reset)}startMouse(e,n){this.mouseRotate.dragStart(e,n),this.mousePitch&&this.mousePitch.dragStart(e,n),T.disableDrag()}startTouch(e,n){this.touchRotate.dragStart(e,n),this.touchPitch&&this.touchPitch.dragStart(e,n),T.disableDrag()}moveMouse(e,n){const a=this.map,{bearingDelta:o}=this.mouseRotate.dragMove(e,n)||{};if(o&&a.setBearing(a.getBearing()+o),this.mousePitch){const{pitchDelta:c}=this.mousePitch.dragMove(e,n)||{};c&&a.setPitch(a.getPitch()+c)}}moveTouch(e,n){const a=this.map,{bearingDelta:o}=this.touchRotate.dragMove(e,n)||{};if(o&&a.setBearing(a.getBearing()+o),this.touchPitch){const{pitchDelta:c}=this.touchPitch.dragMove(e,n)||{};c&&a.setPitch(a.getPitch()+c)}}off(){const e=this.element;T.removeEventListener(e,"mousedown",this.mousedown),T.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),T.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),T.removeEventListener(window,"touchend",this.touchend),T.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){T.enableDrag(),T.removeEventListener(window,"mousemove",this.mousemove),T.removeEventListener(window,"mouseup",this.mouseup),T.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),T.removeEventListener(window,"touchend",this.touchend)}}let Ir;function mi(h,e,n){const a=new l.N(h.lng,h.lat);if(h=new l.N(h.lng,h.lat),e){const o=new l.N(h.lng-360,h.lat),c=new l.N(h.lng+360,h.lat),g=n.locationPoint(h).distSqr(e);n.locationPoint(o).distSqr(e)<g?h=o:n.locationPoint(c).distSqr(e)<g&&(h=c)}for(;Math.abs(h.lng-n.center.lng)>180;){const o=n.locationPoint(h);if(o.x>=0&&o.y>=0&&o.x<=n.width&&o.y<=n.height)break;h.lng>n.center.lng?h.lng-=360:h.lng+=360}return h.lng!==a.lng&&n.locationPoint(h).y>n.height/2-n.getHorizon()?h:a}
587const Ns={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 vo(h,e,n){const a=h.classList;for(const o in Ns)a.remove(`maplibregl-${n}-anchor-${o}`);a.add(`maplibregl-${n}-anchor-${e}`)}class xo extends l.E{constructor(e){if(super(),this._onKeyPress=n=>{const a=n.code,o=n.charCode||n.keyCode;a!=="Space"&&a!=="Enter"&&o!==32&&o!==13||this.togglePopup()},this._onMapClick=n=>{const a=n.originalEvent.target,o=this._element;this._popup&&(a===o||o.contains(a))&&this.togglePopup()},this._update=n=>{var a;if(!this._map)return;const o=this._map.loaded()&&!this._map.isMoving();((n==null?void 0:n.type)==="terrain"||(n==null?void 0:n.type)==="render"&&!o)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?mi(this._lngLat,this._flatPos,this._map.transform):(a=this._lngLat)===null||a===void 0?void 0:a.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let c="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?c=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(c=`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||n&&n.type!=="moveend"||(this._pos=this._pos.round()),T.setTransform(this._element,`${Ns[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${g} ${c}`),F.frameAsync(new AbortController).then(()=>{this._updateOpacity(n&&n.type==="moveend")}).catch(()=>{})},this._onMove=n=>{if(!this._isDragging){const a=this._clickTolerance||this._map._clickTolerance;this._isDragging=n.point.dist(this._pointerdownPos)>=a}this._isDragging&&(this._pos=n.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new l.k("dragstart"))),this.fire(new l.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new l.k("dragend")),this._state="inactive"},this._addDragHandler=n=>{this._element.contains(n.originalEvent.target)&&(n.preventDefault(),this._positionDelta=n.point.sub(this._pos).add(this._offset),this._pointerdownPos=n.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(e==null?void 0:e.opacity,e==null?void 0:e.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=l.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=T.create("div");const n=T.createNS("http://www.w3.org/2000/svg","svg"),a=41,o=27;n.setAttributeNS(null,"display","block"),n.setAttributeNS(null,"height",`${a}px`),n.setAttributeNS(null,"width",`${o}px`),n.setAttributeNS(null,"viewBox",`0 0 ${o} ${a}`);const c=T.createNS("http://www.w3.org/2000/svg","g");c.setAttributeNS(null,"stroke","none"),c.setAttributeNS(null,"stroke-width","1"),c.setAttributeNS(null,"fill","none"),c.setAttributeNS(null,"fill-rule","evenodd");const g=T.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"fill-rule","nonzero");const b=T.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"transform","translate(3.0, 29.0)"),b.setAttributeNS(null,"fill","#000000");const k=[{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(const se of k){const ue=T.createNS("http://www.w3.org/2000/svg","ellipse");ue.setAttributeNS(null,"opacity","0.04"),ue.setAttributeNS(null,"cx","10.5"),ue.setAttributeNS(null,"cy","5.80029008"),ue.setAttributeNS(null,"rx",se.rx),ue.setAttributeNS(null,"ry",se.ry),b.appendChild(ue)}const A=T.createNS("http://www.w3.org/2000/svg","g");A.setAttributeNS(null,"fill",this._color);const M=T.createNS("http://www.w3.org/2000/svg","path");M.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"),A.appendChild(M);const D=T.createNS("http://www.w3.org/2000/svg","g");D.setAttributeNS(null,"opacity","0.25"),D.setAttributeNS(null,"fill","#000000");const V=T.createNS("http://www.w3.org/2000/svg","path");V.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"),D.appendChild(V);const H=T.createNS("http://www.w3.org/2000/svg","g");H.setAttributeNS(null,"transform","translate(6.0, 7.0)"),H.setAttributeNS(null,"fill","#FFFFFF");const X=T.createNS("http://www.w3.org/2000/svg","g");X.setAttributeNS(null,"transform","translate(8.0, 8.0)");const Q=T.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");const ne=T.createNS("http://www.w3.org/2000/svg","circle");ne.setAttributeNS(null,"fill","#FFFFFF"),ne.setAttributeNS(null,"cx","5.5"),ne.setAttributeNS(null,"cy","5.5"),ne.setAttributeNS(null,"r","5.4999962"),X.appendChild(Q),X.appendChild(ne),g.appendChild(b),g.appendChild(A),g.appendChild(D),g.appendChild(H
587),g.appendChild(X),n.appendChild(g),n.setAttributeNS(null,"height",a*this._scale+"px"),n.setAttributeNS(null,"width",o*this._scale+"px"),this._element.appendChild(n),this._offset=l.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",n=>{n.preventDefault()}),this._element.addEventListener("mousedown",n=>{n.preventDefault()}),vo(this._element,this._anchor,"marker"),e&&e.className)for(const n of e.className.split(" "))this._element.classList.add(n);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),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("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),T.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=l.N.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const o=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[o,-1*(38.1-13.5+o)],"bottom-right":[-o,-1*(38.1-13.5+o)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){const e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var n,a;if(!(!((n=this._map)===null||n===void 0)&&n.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const o=this._map,c=o.terrain.depthAtPoint(this._pos),g=o.terrain.getElevationForLngLatZoom(this._lngLat,o.transform.tileZoom);if(o.transform.lngLatToCameraDepth(this._lngLat,g)-c<.006)return void(this._element.style.opacity=this._opacity);const b=-this._offset.y/o.transform._pixelPerMeter,k=Math.sin(o.getPitch()*Math.PI/180)*b,A=o.terrain.depthAtPoint(new l.P(this._pos.x,this._pos.y-this._offset.y)),M=o.transform.lngLatToCameraDepth(this._lngLat,g+k)-A>.006;!((a=this._popup)===null||a===void 0)&&a.isOpen()&&M&&this._popup.remove(),this._element.style.opacity=M?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=l.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,n){return e===void 0&&n===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=e),n!==void 0&&(this._opacityWhenCovered=n),this._map&&this._updateOpacity(!0),this}}const Zu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0}
vendor: 6,126 bytes, line 587
587;let Pa=0,Ia=!1;const _n={maxWidth:100,unit:"metric"};function Ea(h,e,n){const a=n&&n.maxWidth||100,o=h._container.clientHeight/2,c=h.unproject([0,o]),g=h.unproject([a,o]),b=c.distanceTo(g);if(n&&n.unit==="imperial"){const k=3.2808*b;k>5280?ct(e,a,k/5280,h._getUIString("ScaleControl.Miles")):ct(e,a,k,h._getUIString("ScaleControl.Feet"))}else n&&n.unit==="nautical"?ct(e,a,b/1852,h._getUIString("ScaleControl.NauticalMiles")):b>=1e3?ct(e,a,b/1e3,h._getUIString("ScaleControl.Kilometers")):ct(e,a,b,h._getUIString("ScaleControl.Meters"))}function ct(h,e,n,a){const o=function(c){const g=Math.pow(10,`${Math.floor(c)}`.length-1);let b=c/g;return b=b>=10?10:b>=5?5:b>=3?3:b>=2?2:b>=1?1:function(k){const A=Math.pow(10,Math.ceil(-Math.log(k)/Math.LN10));return Math.round(k*A)/A}(b),g*b}(n);h.style.width=e*(o/n)+"px",h.innerHTML=`${o} ${a}`}const bt={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},bo=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function wo(h){if(h){if(typeof h=="number"){const e=Math.round(Math.abs(h)/Math.SQRT2);return{center:new l.P(0,0),top:new l.P(0,h),"top-left":new l.P(e,e),"top-right":new l.P(-e,e),bottom:new l.P(0,-h),"bottom-left":new l.P(e,-e),"bottom-right":new l.P(-e,-e),left:new l.P(h,0),right:new l.P(-h,0)}}if(h instanceof l.P||Array.isArray(h)){const e=l.P.convert(h);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:l.P.convert(h.center||[0,0]),top:l.P.convert(h.top||[0,0]),"top-left":l.P.convert(h["top-left"]||[0,0]),"top-right":l.P.convert(h["top-right"]||[0,0]),bottom:l.P.convert(h.bottom||[0,0]),"bottom-left":l.P.convert(h["bottom-left"]||[0,0]),"bottom-right":l.P.convert(h["bottom-right"]||[0,0]),left:l.P.convert(h.left||[0,0]),right:l.P.convert(h.right||[0,0])}}return wo(new l.P(0,0))}const $l=U;w.AJAXError=l.bh,w.Evented=l.E,w.LngLat=l.N,w.MercatorCoordinate=l.Z,w.Point=l.P,w.addProtocol=l.bi,w.config=l.a,w.removeProtocol=l.bj,w.AttributionControl=js,w.BoxZoomHandler=Pr,w.CanvasSource=Gt,w.CooperativeGesturesHandler=Os,w.DoubleClickZoomHandler=as,w.DragPanHandler=Vu,w.DragRotateHandler=Nu,w.EdgeInsets=Rs,w.FullscreenControl=class extends l.E{constructor(h={}){super(),this._onFullscreenChange=()=>{var e;let n=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((e=n==null?void 0:n.shadowRoot)===null||e===void 0)&&e.fullscreenElement;)n=n.shadowRoot.fullscreenElement;n===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,h&&h.container&&(h.container instanceof HTMLElement?this._container=h.container:l.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(h){return this._map=h,this._container||(this._container=this._map.getContainer()),this._controlContainer=T.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){T.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const h=this._fullscreenButton=T.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);T.create("span","maplibregl-ctrl-icon",h).setAttribute("aria-hidden","true"),h.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const h=this._getTitle();this._fullscreenButton.setAttribute("aria-label",h),this._fullscreenButton.title=h}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new l.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new l.k("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()}},w.GeoJSONSource=Oe,w.GeolocateControl=class extends l.E{constructor(h){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new l.k("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_E
587RROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(e),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new l.k("geolocate",e)),this._finish()}},this._updateCamera=e=>{const n=new l.N(e.coords.longitude,e.coords.latitude),a=e.coords.accuracy,o=this._map.getBearing(),c=l.e({bearing:o},this.options.fitBoundsOptions),g=Ce.fromLngLat(n,a);this._map.fitBounds(g,c,{geolocateSource:!0})},this._updateMarker=e=>{if(e){const n=new l.N(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=e.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=e=>{if(this._map){if(this.options.trackUserLocation)if(e.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(e.code===3&&Ia)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new l.k("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=T.create("button","maplibregl-ctrl-geolocate",this._container),T.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(e===!1){l.w("Geolocation support is not available so the GeolocateControl will be disabled.");const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}else{const n=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=T.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new xo({element:this._dotElement}),this._circleElement=T.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new xo({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",n=>{n.geolocateSource||this._watchState!=="ACTIVE_LOCK"||n.originalEvent&&n.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 l.k("trackuserlocationend")),this.fire(new l.k("userlocationlostfocus")))})}},this.options=l.e({},Zu,h)}onAdd(h){return this._map=h,this._container=T.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return l._(this,arguments,void 0,function*(e=!1){if(Ir!==void 0&&!e)return Ir;if(window.navigator.permissions===void 0)return Ir=!!window.navigator.geolocation,Ir;try{Ir=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Ir=!!window.navigator.geolocation}return Ir})}().then(e=>this._finishSetupUI(e)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),T.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Pa=0,Ia=!1}_isOutOfMapMaxBounds(h){const e=this._map.getMaxBounds(),n=h.coords;return e&&(n.longitude<e.getWest()||n.longitude>e.getEast()||n.latitude<e.getSouth()||n.latitude>e.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
587RROR",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(){const h=this._map.getBounds(),e=h.getSouthEast(),n=h.getNorthEast(),a=e.distanceTo(n),o=Math.ceil(this._accuracy/(a/this._map._container.clientHeight)*2);this._circleElement.style.width=`${o}px`,this._circleElement.style.height=`${o}px`}trigger(){if(!this._setup)return l.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new l.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Pa--,Ia=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new l.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new l.k("trackuserlocationstart")),this.fire(new l.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let h;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Pa++,Pa>1?(h={maximumAge:6e5,timeout:0},Ia=!0):(h=this.options.positionOptions,Ia=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,h)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},w.Hash=uo,w.ImageSource=qt,w.KeyboardHandler=$r,w.LngLatBounds=Ce,w.LogoControl=Ll,w.Map=class extends Uu{constructor(h){l.bf.mark(l.bg.create);const e=Object.assign(Object.assign({},fh),h);if(e.minZoom!=null&&e.maxZoom!=null&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(e.minPitch!=null&&e.maxPitch!=null&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(e.minPitch!=null&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(e.maxPitch!=null&&e.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Bs(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies),{bearingSnap:e.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Nt,this._controls=[],this._mapId=l.a4(),this._contextLost=n=>{n.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new l.k("webglcontextlost",{originalEvent:n}))},this._contextRestored=n=>{this._setupPainter(),this.resize(),this._update(),this.fire(new l.k("webglcontextrestored",{originalEvent:n}))},this._onMapScroll=n=>{if(n.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()}
587,this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._maxTileCacheZoomLevels=e.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=e.preserveDrawingBuffer===!0,this._antialias=e.antialias===!0,this._trackResize=e.trackResize===!0,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles===!0,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions===!0,this._collectResourceTiming=e.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Fl),e.locale),this._clickTolerance=e.clickTolerance,this._overridePixelRatio=e.pixelRatio,this._maxCanvasSize=e.maxCanvasSize,this.transformCameraUpdate=e.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=e.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=le.addThrottleControl(()=>this.isMoving()),this._requestManager=new Ze(e.transformRequest),typeof e.container=="string"){if(this._container=document.getElementById(e.container),!this._container)throw new Error(`Container '${e.container}' not found.`)}else{if(!(e.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let n=!1;const a=ka(o=>{this._trackResize&&!this._removed&&(this.resize(o),this.redraw())},50);this._resizeObserver=new ResizeObserver(o=>{n?a(o):n=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Dl(this,e),this._hash=e.hash&&new uo(typeof e.hash=="string"&&e.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,l.e({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,this._validateStyle=e.validateStyle,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new js(typeof e.attributionControl=="boolean"?void 0:e.attributionControl)),e.maplibreLogo&&this.addControl(new Ll,e.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",n=>{this._update(n.dataType==="style"),this.fire(new l.k(`${n.dataType}data`,n))}),this.on("dataloading",n=>{this.fire(new l.k(`${n.dataType}dataloading`,n))}),this.on("dataabort",n=>{this.fire(new l.k("sourcedataabort",n))})}_getMapId(){return this._mapId}addControl(h,e){if(e===void 0&&(e=h.getDefaultPosition?h.getDefaultPosition():"top-right"),!h||!h.onAdd)return this.fire(new l.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const n=h.onAdd(this);this._controls.push(h);const a=this._controlPositions[e];return e.indexOf("bottom")!==-1?a.insertBefore(n,a.firstChild):a.appendChild(n),this}removeControl(h){if(!h||!h.onRemove)return this.fire(new l.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const e=this._controls.indexOf(h);return e>-1&&this._controls.splice(e,1),h.onRemove(this),this}hasControl(h){return this._controls.indexOf(h)>-1}calculateCameraOptionsFromTo(h,e,n,a){return a==null&&this.terrain&&(a=this.terrain.getElevationForLngLatZoom(n,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(h,e,n,a)}resize(h){var e;const n=this._containerDimensions(),a=n[0],o=n[1],c=this._getClampedPixelRatio(a,o);if(this._resizeCanvas(a,o,c),this.painter.resize(a,o,c),this.painter.overLimit()){const b=this.painter.context.gl;this._maxCanvasSize=[b.drawingBufferWidth,b.drawingBufferHeight];const k=this._getClampedPixelRatio(a,o);this._resizeCanvas(a,o,k),this.painter.resize(a,o,k)}this.transform.resize(a,o),(e=this._requestedCameraState)===null||e===void 0||e.resize(a,o);const g=!this._moving;return g&&(this.stop(),this.fire(new l.k("movestart",h)).fire(new l.k("move",h))),this.fire(new l.k("resize",h)),g&&this.fire(new l.k("moveend",h)),this}_getClampedPixelRatio(h,e){const{0:n,1:a}=this._maxCanvasSize,o=this.getPixelRatio(),c=h*o,g=e*o;return Math.min(c>n?n/c:1,g>a?a/g:1)*o}getPixelRatio(){var h;
vendor: 4,751 bytes, line 587
587return(h=this._overridePixelRatio)!==null&&h!==void 0?h:devicePixelRatio}setPixelRatio(h){this._overridePixelRatio=h,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(h){return this.transform.setMaxBounds(Ce.convert(h)),this._update()}setMinZoom(h){if((h=h??-2)>=-2&&h<=this.transform.maxZoom)return this.transform.minZoom=h,this._update(),this.getZoom()<h&&this.setZoom(h),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(h){if((h=h??22)>=this.transform.minZoom)return this.transform.maxZoom=h,this._update(),this.getZoom()>h&&this.setZoom(h),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(h){if((h=h??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(h>=0&&h<=this.transform.maxPitch)return this.transform.minPitch=h,this._update(),this.getPitch()<h&&this.setPitch(h),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(h){if((h=h??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(h>=this.transform.minPitch)return this.transform.maxPitch=h,this._update(),this.getPitch()>h&&this.setPitch(h),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(h){return this.transform.renderWorldCopies=h,this._update()}project(h){return this.transform.locationPoint(l.N.convert(h),this.style&&this.terrain)}unproject(h){return this.transform.pointLocation(l.P.convert(h),this.terrain)}isMoving(){var h;return this._moving||((h=this.handlers)===null||h===void 0?void 0:h.isMoving())}isZooming(){var h;return this._zooming||((h=this.handlers)===null||h===void 0?void 0:h.isZooming())}isRotating(){var h;return this._rotating||((h=this.handlers)===null||h===void 0?void 0:h.isRotating())}_createDelegatedListener(h,e,n){if(h==="mouseenter"||h==="mouseover"){let a=!1;return{layers:e,listener:n,delegates:{mousemove:c=>{const g=e.filter(k=>this.getLayer(k)),b=g.length!==0?this.queryRenderedFeatures(c.point,{layers:g}):[];b.length?a||(a=!0,n.call(this,new Xi(h,this,c.originalEvent,{features:b}))):a=!1},mouseout:()=>{a=!1}}}}if(h==="mouseleave"||h==="mouseout"){let a=!1;return{layers:e,listener:n,delegates:{mousemove:g=>{const b=e.filter(k=>this.getLayer(k));(b.length!==0?this.queryRenderedFeatures(g.point,{layers:b}):[]).length?a=!0:a&&(a=!1,n.call(this,new Xi(h,this,g.originalEvent)))},mouseout:g=>{a&&(a=!1,n.call(this,new Xi(h,this,g.originalEvent)))}}}}{const a=o=>{const c=e.filter(b=>this.getLayer(b)),g=c.length!==0?this.queryRenderedFeatures(o.point,{layers:c}):[];g.length&&(o.features=g,n.call(this,o),delete o.features)};return{layers:e,listener:n,delegates:{[h]:a}}}}_saveDelegatedListener(h,e){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[h]=this._delegatedListeners[h]||[],this._delegatedListeners[h].push(e)}_removeDelegatedListener(h,e,n){if(!this._delegatedListeners||!this._delegatedListeners[h])return;const a=this._delegatedListeners[h];for(let o=0;o<a.length;o++){const c=a[o];if(c.listener===n&&c.layers.length===e.length&&c.layers.every(g=>e.includes(g))){for(const g in c.delegates)this.off(g,c.delegates[g]);return void a.splice(o,1)}}}on(h,e,n){if(n===void 0)return super.on(h,e);const a=this._createDelegatedListener(h,typeof e=="string"?[e]:e,n);this._saveDelegatedListener(h,a);for(const o in a.delegates)this.on(o,a.delegates[o]);return this}once(h,e,n){if(n===void 0)return super.once(h,e);const a=typeof e=="string"?[e]:e,o=this._createDelegatedListener(h,a,n);for(const c in o.delegates){const g=o.delegates[c];o.delegates[c]=(...b)=>{this._removeDelegatedListener(h,a,n),g(...b)}}this._saveDelegatedListener(h,o);for(const c in o.delegates)this.once(c,o.delegates[c]);return this}off(h,e,n){return n===void 0?super.off(h,e):(this._removeDelegatedListener(h,typeof e=="string"?[e]:e,n),this)}queryRenderedFeatures(h,e){if(!this.style)return[];let n;const a=h instanceof l.P||Array.isArray(h),o=a?h:[[0,0],[this.transform.width,this.transform.height]];if(e=e||(a?{}:h)||{},o instanceof l.P||typeof o[0]=="number")n=[l.P.convert(o)];else{const c=l.P.convert(o[0]),g=l.P.convert(o[1]);n=[c,new l.P(g.x,c.y),g,new l.P(c.x,g.y),c]}return this.style.queryRenderedFeatures(n,e,this.transform)}querySourceFeatures(h,e){return this.style.querySourceFeatures(h,e)}setStyle(h,e){return(e=l.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._val
587idateStyle},e)).diff!==!1&&e.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&h?(this._diffStyle(h,e),this):(this._localIdeographFontFamily=e.localIdeographFontFamily,this._updateStyle(h,e))}setTransformRequest(h){return this._requestManager.setTransformRequest(h),this}_getUIString(h){const e=this._locale[h];if(e==null)throw new Error(`Missing UI string '${h}'`);return e}_updateStyle(h,e){if(e.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(h,e));const n=this.style&&e.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!h)),h?(this.style=new Za(this,e||{}),this.style.setEventedParent(this,{style:this.style}),typeof h=="string"?this.style.loadURL(h,e,n):this.style.loadJSON(h,e,n),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Za(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(h,e){if(typeof h=="string"){const n=this._requestManager.transformRequest(h,"Style");l.h(n,new AbortController).then(a=>{this._updateDiff(a.data,e)}).catch(a=>{a&&this.fire(new l.j(a))})}else typeof h=="object"&&this._updateDiff(h,e)}_updateDiff(h,e){try{this.style.setState(h,e)&&this._update(!0)}catch(n){l.w(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`),this._updateStyle(h,e)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():l.w("There is no style added to the map.")}addSource(h,e){return this._lazyInitEmptyStyle(),this.style.addSource(h,e),this._update(!0)}isSourceLoaded(h){const e=this.style&&this.style.sourceCaches[h];if(e!==void 0)return e.loaded();this.fire(new l.j(new Error(`There is no source with ID '${h}'`)))}setTerrain(h){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),h){const e=this.style.sourceCaches[h.source];if(!e)throw new Error(`cannot load terrain, because there exists no source with ID: ${h.source}`);this.terrain===null&&e.reload();for(const n in this.style._layers){const a=this.style._layers[n];a.type==="hillshade"&&a.source===h.source&&l.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Bl(this.painter,e,h),this.painter.renderToTexture=new Gu(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=n=>{n.dataType==="style"?this.terrain.sourceCache.freeRtt():n.dataType==="source"&&n.tile&&(n.sourceId!==h.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(n.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.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new l.k("terrain",{terrain:h})),this}getTerrain(){var h,e;return(e=(h=this.terrain)===null||h===void 0?void 0:h.options)!==null&&e!==void 0?e:null}areTilesLoaded(){const h=this.style&&this.style.sourceCaches;for(const e in h){const n=h[e]._tiles;for(const a in n){const o=n[a];if(o.state!=="loaded"&&o.state!=="errored")return!1}}return!0}removeSource(h){return this.style.removeSource(h),this._update(!0)}getSource(h){return this.style.getSource(h)}addImage(h,e,n={}){const{pixelRatio:a=1,sdf:o=!1,stretchX:c,stretchY:g,content:b,textFitWidth:k,textFitHeight:A}=n;if(this._lazyInitEmptyStyle(),!(e instanceof HTMLImageElement||l.b(e))){if(e.width===void 0||e.height===void 0)return this.fire(new l.j(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`")));{const{width:M,height:D,data:V}=e,H=e;return this.style.addImage(h,{data:new l.R({width:M,height:D},new Uint8Array(V)),pixelRatio:a,stretchX:c,stretchY:g,content:b,textFitWidth:k,textFitHeight:A,sdf:o,version:0,userImage:H}),H.onAdd&&H.onAdd(this,h),this}}{const{width:M,height:D,data:V}
vendor: 16,538 bytes, line 587
587=F.getImageData(e);this.style.addImage(h,{data:new l.R({width:M,height:D},V),pixelRatio:a,stretchX:c,stretchY:g,content:b,textFitWidth:k,textFitHeight:A,sdf:o,version:0})}}updateImage(h,e){const n=this.style.getImage(h);if(!n)return this.fire(new l.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const a=e instanceof HTMLImageElement||l.b(e)?F.getImageData(e):e,{width:o,height:c,data:g}=a;if(o===void 0||c===void 0)return this.fire(new l.j(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(o!==n.data.width||c!==n.data.height)return this.fire(new l.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const b=!(e instanceof HTMLImageElement||l.b(e));return n.data.replace(g,b),this.style.updateImage(h,n),this}getImage(h){return this.style.getImage(h)}hasImage(h){return h?!!this.style.getImage(h):(this.fire(new l.j(new Error("Missing required image id"))),!1)}removeImage(h){this.style.removeImage(h)}loadImage(h){return le.getImage(this._requestManager.transformRequest(h,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(h,e){return this._lazyInitEmptyStyle(),this.style.addLayer(h,e),this._update(!0)}moveLayer(h,e){return this.style.moveLayer(h,e),this._update(!0)}removeLayer(h){return this.style.removeLayer(h),this._update(!0)}getLayer(h){return this.style.getLayer(h)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(h,e,n){return this.style.setLayerZoomRange(h,e,n),this._update(!0)}setFilter(h,e,n={}){return this.style.setFilter(h,e,n),this._update(!0)}getFilter(h){return this.style.getFilter(h)}setPaintProperty(h,e,n,a={}){return this.style.setPaintProperty(h,e,n,a),this._update(!0)}getPaintProperty(h,e){return this.style.getPaintProperty(h,e)}setLayoutProperty(h,e,n,a={}){return this.style.setLayoutProperty(h,e,n,a),this._update(!0)}getLayoutProperty(h,e){return this.style.getLayoutProperty(h,e)}setGlyphs(h,e={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(h,e),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(h,e,n={}){return this._lazyInitEmptyStyle(),this.style.addSprite(h,e,n,a=>{a||this._update(!0)}),this}removeSprite(h){return this._lazyInitEmptyStyle(),this.style.removeSprite(h),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(h,e={}){return this._lazyInitEmptyStyle(),this.style.setSprite(h,e,n=>{n||this._update(!0)}),this}setLight(h,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(h,e),this._update(!0)}getLight(){return this.style.getLight()}setSky(h){return this._lazyInitEmptyStyle(),this.style.setSky(h),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(h,e){return this.style.setFeatureState(h,e),this._update()}removeFeatureState(h,e){return this.style.removeFeatureState(h,e),this._update()}getFeatureState(h){return this.style.getFeatureState(h)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let h=0,e=0;return this._container&&(h=this._container.clientWidth||400,e=this._container.clientHeight||300),[h,e]}_setupContainer(){const h=this._container;h.classList.add("maplibregl-map");const e=this._canvasContainer=T.create("div","maplibregl-canvas-container",h);this._interactive&&e.classList.add("maplibregl-interactive"),this._canvas=T.create("canvas","maplibregl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const n=this._containerDimensions(),a=this._getClampedPixelRatio(n[0],n[1]);this._resizeCanvas(n[0],n[1],a);const o=this._controlContainer=T.create("div","maplibregl-control-container",h),c=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(g=>{c[g]=T.create("div",`maplibregl-ctrl-${g} `,o)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(h,e,n){this._canvas.width=Math.floor(n*h),this._canvas.height=Math.floor(n*e),this._canvas.style.width=`${h}px`,this._canvas.style.height=`${e}px`}_setupPainter(){const h={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let e=null;this._canvas.addEventListener("webglcontextcreationerror",a=>{e={requestedAttributes:h},a&&(e.statusMessage=a.statusMessage,e.type=a.type)},{once:!0});const n=this._canvas.getContext("webgl2",h)||this._canvas.getContext("webgl",h);if(!n){const a="Failed to initialize WebGL";throw e?(e.message=a,new Error(JSON.stringify(e))):new Error(a)}this.painter=new lo(n,this.transform),re.testSupport(n)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(h){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||h,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(h){return this._update(),this._renderTaskQueue.add(h)}_cancelRenderFrame(h){this._renderTaskQueue.remove(h)}_render(h){const e=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(h),this._removed)return;let n=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const o=this.transform.zoom,c=F.now();this.style.zoomHistory.update(o,c);const g=new l.z(o,{now:c,fadeDuration:e,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),b=g.crossFadingFactor();b===1&&b===this._crossFadingFactor||(n=!0,this._crossFadingFactor=b),this.style.update(g)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,e,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:e,showPadding:this.showPadding}),this.fire(new l.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,l.bf.mark(l.bg.load),this.fire(new l.k("load"))),this.style&&(this.style.hasTransitions()||n)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const a=this._sourcesDirty||this._styleDirty||this._placementDirty;return a||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new l.k("idle")),!this._loaded||this._fullyLoaded||a||(this._fullyLoaded=!0,l.bf.mark(l.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var h;this._hash&&this._hash.remove();for(const n of this._controls)n.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),le.removeThrottleControl(this._imageQueueHandle),(h=this._resizeObserver)===null||h===void 0||h.disconnect();const e=this.painter.context.gl.getExtension("WEBGL_lose_context");e!=null&&e.loseContext&&e.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),T.remove(this._canvasContainer),T.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),l.bf.clearMetrics(),this._removed=!0,this.fire(new l.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,F.frameAsync(this._frameRequest).then(h=>{l.bf.frame(h),this._frameRequest=null,this._render(h)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(h){this._showTileBoundaries!==h&&(this._showTileBoundaries=h,this._update())}get showPadding(){return!!this._showPadding}set showPadding(h){this._showPadding!==h&&(this._showPadding=h,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(h){this._showCollisionBoxes!==h&&(this._showCollisionBoxes=h,h?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(h){this._showOverdrawInspector!==h&&(this._showOverdrawInspector=h,this._update())}get repaint(){return!!this._repaint}set repaint(h){this._repaint!==h&&(this._repaint=h,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(h){this._vertices=h,this._update()}get version(){return qu}getCameraTargetElevation(){return this.transform.elevation}},w.MapMouseEvent=Xi,w.MapTouchEvent=ns,w.MapWheelEvent=Ou,w.Marker=xo,w.NavigationControl=class{constructor(h){this._updateZoomButtons=()=>{const e=this._map.getZoom(),n=e===this._map.getMaxZoom(),a=e===this._map.getMinZoom();this._zoomInButton.disabled=n,this._zoomOutButton.disabled=a,this._zoomInButton.setAttribute("aria-disabled",n.toString()),this._zoomOutButton.setAttribute("aria-disabled",a.toString())},this._rotateCompassArrow=()=>{const e=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=e},this._setButtonTitle=(e,n)=>{const a=this._map._getUIString(`NavigationControl.${n}`);e.title=a,e.setAttribute("aria-label",a)},this.options=l.e({},mh,h),this._container=T.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),T.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),T.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=T.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(h){return this._map=h,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new gh(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){T.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._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(h,e){const n=T.create("button",h,this._container);return n.type="button",n.addEventListener("click",e),n}},w.Popup=class extends l.E{constructor(h){super(),this.remove=()=>(this._content&&T.remove(this._content),this._container&&(T.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new l.k("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{var n;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=T.create("div","maplibregl-popup",this._map.getContainer()),this._tip=T.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const b of this.options.className.split(" "))this._container.classList.add(b);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=this._map.transform.renderWorldCopies&&!this._trackPointer?mi(this._lngLat,this._flatPos,this._map.transform):(n=this._lngLat)===null||n===void 0?void 0:n.wrap(),this._trackPointer&&!e)return;const a=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationPoint(this._lngLat));let o=this.options.anchor;const c=wo(this.options.offset);if(!o){const b=this._container.offsetWidth,k=this._container.offsetHeight;let A;A=a.y+c.bottom.y<k?["top"]:a.y>this._map.transform.height-k?["bottom"]:[],a.x<b/2?A.push("left"):a.x>this._map.transform.width-b/2&&A.push("right"),o=A.length===0?"bottom":A.join("-")}let g=a.add(c[o]);this.options.subpixelPositioning||(g=g.round()),T.setTransform(this._container,`${Ns[o]} translate(${g.x}px,${g.y}px)`),vo(this._container,o,"popup")},this._onClose=()=>{this.remove()},this.options=l.e(Object.create(bt),h)}addTo(h){return this._map&&this.remove(),this._map=h,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new l.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(h){return this._lngLat=l.N.convert(h),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(h){return this.setDOMContent(document.createTextNode(h))}setHTML(h){const e=document.createDocumentFragment(),n=document.createElement("body");let a;for(n.innerHTML=h;a=n.firstChild,a;)e.appendChild(a);return this.setDOMContent(e)}getMaxWidth(){var h;
587return(h=this._container)===null||h===void 0?void 0:h.style.maxWidth}setMaxWidth(h){return this.options.maxWidth=h,this._update(),this}setDOMContent(h){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=T.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(h),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(h){return this._container&&this._container.classList.add(h),this}removeClassName(h){return this._container&&this._container.classList.remove(h),this}setOffset(h){return this.options.offset=h,this._update(),this}toggleClassName(h){if(this._container)return this._container.classList.toggle(h)}setSubpixelPositioning(h){this.options.subpixelPositioning=h}_createCloseButton(){this.options.closeButton&&(this._closeButton=T.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const h=this._container.querySelector(bo);h&&h.focus()}},w.RasterDEMTileSource=yt,w.RasterTileSource=Le,w.ScaleControl=class{constructor(h){this._onMove=()=>{Ea(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,Ea(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},_n),h)}getDefaultPosition(){return"bottom-left"}onAdd(h){return this._map=h,this._container=T.create("div","maplibregl-ctrl maplibregl-ctrl-scale",h.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){T.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},w.ScrollZoomHandler=Qr,w.Style=Za,w.TerrainControl=class{constructor(h){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=h}onAdd(h){return this._map=h,this._container=T.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=T.create("button","maplibregl-ctrl-terrain",this._container),T.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(){T.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},w.TwoFingersTouchPitchHandler=Aa,w.TwoFingersTouchRotateHandler=Il,w.TwoFingersTouchZoomHandler=Al,w.TwoFingersTouchZoomRotateHandler=Ml,w.VectorTileSource=Ee,w.VideoSource=ei,w.addSourceType=(h,e)=>l._(void 0,void 0,void 0,function*(){if(Ft(h))throw new Error(`A source type called "${h}" already exists.`);((n,a)=>{Zt[n]=a})(h,e)}),w.clearPrewarmedResources=function(){const h=Hi;h&&(h.isPreloaded()&&h.numActive()===1?(h.release(Zr),Hi=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()"))},w.getMaxParallelImageRequests=function(){return l.a.MAX_PARALLEL_IMAGE_REQUESTS},w.getRTLTextPluginStatus=function(){return Fi().getRTLTextPluginStatus()},w.getVersion=function(){return $l},w.getWorkerCount=function(){return Sr.workerCount},w.getWorkerUrl=function(){return l.a.WORKER_URL},w.importScriptInWorkers=function(h){return Wn().broadcast("IS",h)},w.prewarm=function(){hn().acquire(Zr)},w.setMaxParallelImageRequests=function(h){l.a.MAX_PARALLEL_IMAGE_REQUESTS=h},w.setRTLTextPlugin=function(h,e){return Fi().setRTLTextPlugin(h,e)},w.setWorkerCount=function(h){Sr.workerCount=h},w.setWorkerUrl=function(h){l.a.WORKER_URL=h}});var L=y;return L})}(kc)),kc.exports}var bc=u2();const c2={class:"relative flex w-full flex-1"},h2={class:"flex-1"},d2={id:"map",class:"relative h-full w-full"},p2={class:"absolute z-10 sm:max-w-[20rem] max-w-[16rem] text-white bg-govPrimary p-6 rounded-br-[2rem] h-[13rem] max-h-[13rem]"}
587,f2={key:0,class:"sm:text-[1.2rem] text-[1.2rem] sm:leading-[1.6rem] leading-[1.4rem] font-semibold mb-2"},m2={key:1,class:"mt-16 z-11"},g2={class:"absolute flex bottom-0 left-[9.8rem] w-fit z-[100]"},b2=Ke({__name:"map",setup(f){var Ce,dn;yy({title:"Interactieve kaart van zorg in Nederland, met data van CBS en TNO."});const{backgroundMapState:_}=lg(),{filterCorporatiewoningState:y}=ug(),{filterAanpasbareWoningState:x}=cg(),{filterOptopState:C}=hg(),L=Zo("footer");L.value=!1;const w=[{image:"Woningvoorraad_en_gezinssamenstelling",title:"Woningvoorraad en gezinssamenstelling",description:"Krijg een beeld van de eigendomsverhoudingen binnen de woningvoorraad: het aandeel koop- en huurwoningen en de gezinssamenstelling per gebied. Hiermee wordt inzichtelijk of de balans tussen koop en huur voldoende is om de woningvoorraad toegankelijk en toekomstbestendig te houden. De informatie helpt bij het beoordelen of en hoe overleg met woningcorporaties zinvol is en welke rol dit speelt binnen het huidige en toekomstige gemeentelijk beleid.",legend:"Inzicht in de verhouding tussen koop en huur en de gezinssamenstelling helpt bij het beoordelen van de toegankelijkheid en toekomstbestendigheid van de woningvoorraad.",property:"p_koopwon",min:0,max:100,unit:"%"},{image:"Afstand_tot_voorzieningen_voor_ADL",title:"Afstand tot voorzieningen voor Algemene Dagelijkse Levensbehoeften",description:"Toegang tot essentiële dagelijkse voorzieningen, zoals een supermarkt, huisarts en apotheek, is een voorwaarde voor zelfstandig wonen, zeker voor ouderen. De kaartlaag âADL-voorzieningenâ toont de gemiddelde afstand van inwoners tot deze voorzieningen, gemeten over de weg. Dit biedt beleidsmakers inzicht in de mate van fysieke toegankelijkheid binnen een gebied en helpt om kansen en knelpunten in nabijheid te signaleren. Zo kan gericht beleid worden ontwikkeld om de leefomgeving geschikt te maken voor een vergrijzende bevolking en gebieden te identificeren waar mogelijkheden zijn of ontwikkeld kunnen worden voor geclusterd wonen.",legend:'Hoe goed zijn ADL-voorzieningen bereikbaar, wat inzicht geeft in de fysieke toegankelijkheid en aanknopingspunten biedt voor beleid gericht op zelfstandig wonen en vergrijzing."',property:"af_gem_aas",min:.4,max:2.7,unit:"km"},{image:"Toegankelijkheid_woningen",title:"Toegankelijkheid woningen",description:"Is de woning toegankelijk en wat kost het om een woning toegankelijk te maken? Buurtrapportages: Hoeveel toegankelijke woningen heeft de buurt en hoeveel hiervan zijn huur of koop? Wat kosten de aanpassingen? Hoeveel vraag zal er in de buurt of gemeente zijn door demografische veranderingen? ",legend:"Is de woning toegankelijk, wat zijn de aanpassingskosten, en hoe verhouden het lokale aanbod en de verwachte vraag zich tot elkaar?",property:"p_ster_2en3",min:0,max:100,unit:"%"},{image:"Panden_langdurige_zorgorganisaties",title:"Panden langdurige zorgorganisaties",description:"Wordt in een pand verblijfszorg aangeboden en is het onderdeel van een langdurige zorginstelling? Dan is het pand per definitie toegankelijk. Een overzicht van panden met langdurige verblijfszorg geeft beleidsmakers inzicht in waar zorginstellingen actief zijn, tot welke sector ze behoren en hoeveel zorgwoningen er beschikbaar zijn per regio of gemeente. Dit is essentieel om aanbod en vraag goed op elkaar af te stemmen, knelpunten te signaleren en gericht te sturen op voldoende en toegankelijke zorginfrastructuur.",legend:"Een overzicht van panden met langdurige verblijfszorg laat zien waar zorginstellingen actief zijn en ondersteunt bij het afstemmen van vraag en aanbod in de zorginfrastructuur.",property:"aantal_verblijfszorginstellingen_per_65plus",min:4,max:6.6},{image:"Huidige_zorgvraag",title:"Huidige zorgvraag",description:"Actuele informatie over de zorgvraag vanuit de Wmo is voor beleidsmakers cruciaal om effectief te kunnen sturen op toegankelijkheid, betaalbaarheid en passende ondersteuning. Inzicht in type en omvang van hulpvragen, zoals huishoudelijke hulp of begeleiding, helpt bij het tijdig signaleren van trends, knelpunten en veranderende behoeften. Dit maakt het mogelijk om beleid beter af te stemmen op de lokale situatie, middelen doelgericht in te zetten en samenwerkingen met zorgaanbieders te versterken.",legend:"Actuele zorgvraaginformatie WMO en WLZ kan bijdragen aan het gericht verbeteren van toegankelijkheid, betaalbaarheid en passende ondersteuning.",property:"nizvvper65plus",min:1.8,max:2.9},{image:"Toekomstige_zorgvraag",title:"Toekomstige zorgvraag",description:"De verwachte ontwikkeling van de zorgvraag tot op buurtniveau. Het aandeel 65-plussers, demografische ontwikkelingen en de mantelzorgratio (op basis van de huidige en toekomstige Older-Old Support Ratio - OOSR) geven richting aan waar de druk op informele en formele zorg toeneemt. Ook het aantal WLZ-zorgindicaties per buurt biedt handvatten voor het inschatten van de zorgbehoefte. Deze informatie ondersteunt beleidsmakers bij het tijdig inspelen op de vraag naar geschikte en aanpasbare woningen, geclusterde woonvormen en bij het bepalen van gebieden die prioriteit verdienen voor samenwerking met zorg- en woningpartners.",legend:"Waar neemt per buurt de zorgvraag naar verwachting toe, op basis van vergrijzing, mantelzorgratio en WLZ-indicaties. ",property:"tzv_p6
5875_2023",min:15,max:32,unit:"%"},{image:"Geclusterde_woningen",title:"Geclusterd wonen",description:"Geclusterde woonvormen bestaan uit zelfstandige woningen met gedeelde voorzieningen, gericht op ontmoeting en wederzijdse ondersteuning voor ouderen of mensen met een huidige of toekomstige zorgvraag. Ze vormen een belangrijke schakel tussen zelfstandig wonen en het verpleeghuis. Voor beleidsmakers is inzicht in de spreiding van deze woonvormen cruciaal om gericht te sturen op passende woonzorgoplossingen, de doorstroming te bevorderen en het beleid rond langer thuis wonen nu en in de toekomst effectief vorm te geven.",legend:"Geclusterde woonvormen bieden een tussenoplossing tussen zelfstandig wonen en verpleeghuiszorg en helpen bij het sturen op passend woonzorgbeleid.",property:"aandeel_zorgindicaties_in_cluster_totaal",min:10,max:24},{image:"Geschiktheidsgids_geclusterd_wonen",title:"Geschiktheidsgids geclusterd wonen",description:"De geschiktheidsgids geclusterd wonen biedt beleidsmakers, corporaties en zorgorganisaties handvatten om geschikte gebieden en locaties voor geclusterd wonen voor ouderen te identificeren en geeft inzicht in de onderliggende indicatoren die de locaties geschikt dan wel ongeschikt maken. De huidige gids in ontwikkeld voor geclusterde woon initiatieven voor ouderen in de sociale huur. Hoe hoger de score, hoe geschikter de buurt is om initiatieven te realiseren. Gebruik de vergelijker om buurten en of gemeentes met elkaar te vergelijken.",legend:"De geschiktheid van de buurt om geclusterde woonvormen in de sociale huur te realiseren wordt uitgedrukt in een geschiktheidsscore tussen 0 en 100. Hoe hoger de score hoe geschikter de buurt en hoe donkerder de kleur op de kaart. Let op: Grijze buurten hebben te weinig data; hier wordt de score van de gemeente weergegeven.",property:"p_gewogenindicatoren_met_waarde",min:0,max:100}],l="https://zorgopdekaart.nl/geoserver",U=vy(),W=Fe(void 0),G=Fe(.6),F=Fe(!1);let T;const re={},fe=Fe(0),ye=Fe(1),de=at(()=>`${U.query.property??""}`),ge=at(()=>{var Ee;return de.value?(Ee=Af.filter(Le=>Le.attribute==de.value)[0])==null?void 0:Ee.label:""}),ae=at(()=>w.filter(Ee=>Ee.property===de.value)[0]),le=Fe(void 0),Ze=Fe(((Ce=ae.value)==null?void 0:Ce.min)??0),Ue=Fe(((dn=ae.value)==null?void 0:dn.max)??10);let wt=Fe(0),Ge=Fe(de.value);const P=at(()=>{const Ee=[];return y.value&&Ee.push(["!=",["get","corporatiewoning"],"nee"]),C.value&&Ee.push([">",["coalesce",["to-number",["get","aantal_optop_woningen"]],0],0]),x.value&&Ee.push([">",["coalesce",["to-number",["get","n_ster_2"]],0],0]),Ee.length===0?null:Ee.length===1?Ee[0]:["all",...Ee]});Qt(de,()=>{W.value=void 0,le.value&&(le.value.remove(),le.value=void 0);const Ee=document.getElementsByClassName("maplibregl-popup");for(;Ee.length>0;)Ee[0].remove();if(ae.value&&(Ze.value=ae.value.min,Ue.value=ae.value.max),ge.value=="Panden langdurige zorgorganisaties"&&!T.getSource("zorgpanden")?(T.getLayer("BAG-fill")&&T.removeLayer("BAG-fill"),T.getLayer("BAG-line")&&T.removeLayer("BAG-line"),T.getSource("BAG")&&T.removeSource("BAG"),ge.value=="Panden langdurige zorgorganisaties"&&(kn(T),ri(T))):(!ge.value||ge.value!="Panden langdurige zorgorganisaties"&&!T.getSource("BAG"))&&(T.getLayer("zorgpanden-fill")&&T.removeLayer("zorgpanden-fill"),T.getLayer("zorgpanden-line")&&T.removeLayer("zorgpanden-line"),T.getSource("zorgpanden")&&T.removeSource("zorgpanden"),T.getLayer("zorgregios_clusters-circle")&&T.removeLayer("zorgregios_clusters-circle"),T.getLayer("zorgregios_clusters-symbol")&&T.removeLayer("zorgregios_clusters-symbol"),T.getSource("zorgregios_clusters")&&T.removeSource("zorgregios_clusters"),Sr(T),Br()),de.value=="af_gem_aas"&&!T.getLayer("ADL_voorzieningen-symbol")?(Zr(T),hn(T),pr(T),T.getLayer("BAG-fill")&&(T.moveLayer("postcode6-fill","BAG-fill"),T.moveLayer("postcode6-line","BAG-fill"),T.moveLayer("ADL_heatmap-raster","BAG-fill"))):(T.getLayer("ADL_voorzieningen-symbol")&&T.removeLayer("ADL_voorzieningen-symbol"),T.getSource("ADL_voorzieningen")&&T.removeSource("ADL_voorzieningen"),T.getLayer("ADL_heatmap-raster")&&T.removeLayer("ADL_heatmap-raster"),T.getSource("ADL_heatmap")&&T.removeSource("ADL_heatmap"),T.getLayer("postcode6-fill")&&T.removeLayer("postcode6-fill"),T.getLayer("postcode6-line")&&T.removeLayer("postcode6-line"),T.getSource("postcode6")&&T.removeSource("postcode6")),ge.value=="Huidige zorgvraag"&&!T.getSource("zorgregios_pattern")&&!T.getSource("gemeenten_pattern")&&!T.getSource("buurten_pattern")?(hi(T),Ui(T),wn(T)):(T.getLayer("zorgregios_pattern-fill")&&T.removeLayer("zorgregios_pattern-fill"),T.getLayer("zorgregios_pattern-line")&&T.removeLayer("zorgregios_pattern-line"),T.getSource("zorgregios_pattern")&&T.removeSource("zorgregios_pattern"),T.getLayer("gemeenten_pattern-fill")&&T.removeLayer("gemeenten_pattern-fill"),T.getLayer("gemeenten_pattern-line")&&T.removeLayer("gemeenten_pattern-line"),T.getSource("gemeenten_pattern")&&T.removeSource("gemeenten_pattern"),T.getLayer("buurten_pattern-fill")&&T.removeLayer("buurten_pattern-fill"),T.getLayer("buurten_pattern-line")&&T.removeLayer("buurten_pattern-line"),T.getSource("buurten_pattern")&&T.removeSource("buurten_pattern")),ge.value!="Geschiktheidsgids geclusterd wonen")T.getLayer("panden_wooncluster-fill")&&T.removeLayer("panden_wooncluster-fill"),T.getLayer("panden_wooncluster-line")&&T.removeLayer("panden_wooncluster-line"),T.getSource("panden_wooncluster")&&T.removeSource("panden_wooncluster"),T.getLayer("buurten_wooncluster-fill")&&T.removeLayer("buurten_wooncluster-fill"),T.getLayer("buurten_wooncluster-line")&&T.removeLayer("buurten_wooncluster-line"),T.getSource("buurten_wooncluster")&&T.removeSource("buurten_wooncluster"),T.getLayer("gemeenten_wooncluster-fill")&&T.removeLayer("gemeenten_wooncluster-fill"),T.getLayer("gemeenten_wooncluster-line")&&T.removeLayer("gemeenten_wooncluster-line"),T.getSource("gemeenten_wooncluster")&&T.removeSource("gemeenten_wooncluster"),T.getLayer("zorgregio_wooncluster-fill")&&T.removeLayer("zorgregio_wooncluster-fill"),T.getLayer("zorgregio_wooncluster-line")&&T.removeLayer("zorgregio_wooncluster-line"),T.getSource("zorgregio_wooncluster")&&T.removeSource("zorgregio_wooncluster"),T.getSource("buurten")||li(T),T.getSource("gemeenten")||Di(T),T.getSource("zorgregios")||Lt(T);else{T.getLayer("buurten-fill")&&T.removeLayer("buurten-fill"),T.getLayer("buurten-line")&&T.removeLayer("buurten-line"),T.getSource("buurten")&&T.removeSource("buurten"),T.getLayer("gemeenten-fill")&&T.removeLayer("gemeenten-fill"),T.getLayer("gemeenten-line")&&T.removeLayer("gemeenten-line"),T.getSource("gemeenten")&&T.removeSource("gemeenten"),T.getLayer("zorgregios-fill")&&T.removeLayer("zorgregios-fill"),T.getLayer("zorgregios-line")&&T.removeLayer("zorgregios-line"),T.getSource("zorgregios")&&T.removeSource("zorgregios"),T.getLayer("BAG-fill")&&T.removeLayer("BAG-fill"),T.getLayer("BAG-line")&&T.removeLayer("BAG-line"),T.getSource("BAG")&&T.removeSource("BAG"),Hi(T),dr(T),xi(T),wi(T),setTimeout(()=>sr(),100);return}de.value!="aantal_verblijfszorginstellingen_per_65plus"&&de.value!="aandeel_zorgindicaties_in_cluster_totaal"&&!T.getSource("buurten")?(li(T),T.getLayer("gemeenten-fill")&&(T.moveLayer("buurten-fill","gemeenten-fill"),T.moveLayer("buurten-line","gemeenten-fill"))):de.value!="aantal_verblijfszorginstellingen_per_65plus"&&de.value!="aandeel_zorgindicaties_in_cluster_totaal"&&T.getSource("buurten")?T.getLayer("buurten-fill")&&T.getLayer("gemeenten-fill")&&(T.moveLayer("buurten-fill","gemeenten-fill"),T.moveLayer("buurten-line","gemeenten-fill")):(de.value=="aantal_verblijfszorginstellingen_per_65plus"||de.value=="aandeel_zorgindicaties_in_cluster_totaal"&&T.getSource("buurten"))&&(T.getLayer("buurten-fill")&&T.removeLayer("buurten-fill"),T.getLayer("buurten-line")&&T.removeLayer("buurten-line"),T.getSource("buurten")&&T.removeSource("buurten")),ge.value=="Toekomstige zorgvraag"&&(Ge.value=de.value),sr(),Hr()}),Qt(Ze,()=>sr()),Qt(Ue,()=>sr()),Qt(_,Ee=>{if(!T)return;const Le=Ee?"wms-nl-sat":"wms-nl",yt=Ee?"wms-nl":"wms-nl-sat";T.addLayer({id:Le,type:"raster",source:Le,paint:{}},yt),T.removeLayer(yt)}),Qt(y,Ee=>{Ee==!0?(T.setFilter("BAG-fill",["!=",["get","corporatiewoning"],"nee"]),T.setFilter("BAG-line",["!=",["get","corporatiewoning"],"nee"]),ge.value=="Geschiktheidsgids geclusterd wonen"&&(T.setFilter("panden_wooncluster-fill",P.value),T.setFilter("panden_wooncluster-line",P.value))):(T.setFilter("BAG-fill",null),T.setFilter("BAG-line",null),ge.value=="Geschiktheidsgids geclusterd wonen"&&(T.setFilter("panden_wooncluster-fill",P.value),T.setFilter("panden_wooncluster-line",P.value)))}),Qt(C,Ee=>{T.setFilter("panden_wooncluster-fill",P.value),T.setFilter("panden_wooncluster-line",P.value)}),Qt(x,Ee=>{T.setFilter("panden_wooncluster-fill",P.value),T.setFilter("panden_wooncluster-line",P.value)}),Qt(Ge,Ee=>
587{Ee&&(Te(),sr())});const Te=()=>{wt.value=T.getZoom();const Ee=de.value;wt.value>9&&wt.value<12&&Ee=="aantal_verblijfszorginstellingen_per_65plus"?(Ue.value=19,Ze.value=1,sr()):wt.value>12&&Ee=="aantal_verblijfszorginstellingen_per_65plus"?Ue.value=0:wt.value>9&&Ee=="aandeel_zorgindicaties_in_cluster_totaal"?(Ze.value=1,Ue.value=37):Ee=="aantal_verblijfszorginstellingen_per_65plus"||Ee=="aandeel_zorgindicaties_in_cluster_totaal"?(Ue.value=ae.value.max,Ze.value=ae.value.min):Ee=="nizvvper65plus"&&wt.value>9?(Ze.value=.4,Ue.value=3.8):Ee=="nizvvperplus65"?(Ze.value=1.8,Ue.value=2.9):Ee=="tzv_p65_2023"&&wt.value>12?(Ze.value=0,Ue.value=100):Ee=="tzv_p65_2023"&&wt.value>9?(Ze.value=10,Ue.value=43):Ee=="af_gem_aas"&&wt.value>12?(Ze.value=0,Ue.value=11.5):Ee=="af_gem_aas"&&(Ze.value=0,Ue.value=2.7)},Ae=Fe(!1);function Pt(){wt.value=T.getZoom(),Ae.value=wt.value>=13.5}function _t(Ee,Le,yt){const Oe=((Ee==null?void 0:Ee.features)||[])[0],ki=Oe==null?void 0:Oe.geometry,qt=((ki==null?void 0:ki.coordinates)||[]).slice();let ei=Oe.properties[Le];if((yt=="Adres"||yt=="Zorgorganisatie")&&Oe.properties.straatnamen&&Oe.properties.straatnamen.includes(",")){let ut=Oe.properties.straatnamen.split(",");ut=ut.slice(0,-1).join(", ")+", en "+ut[ut.length-1],ei=`Pand met ${Oe.properties.aantal_woningen_in_pand} woningen gelegen aan ${ut}.`}else(yt=="Adres"||yt=="Zorgorganisatie")&&Oe.properties.aantal_woningen_in_pand>1&&!Oe.properties.straatnamen.includes(",")?ei=`Pand met ${Oe.properties.aantal_woningen_in_pand} woningen gelegen aan ${Oe.properties.straatnamen}.`:(yt=="Adres"||yt=="Zorgorganisatie")&&Oe.properties.aantal_woningen_in_pand<=1?ei=Oe.properties.straatnamen+" "+Oe.properties.huisnummer:yt=="Zorgorganisatie"&&Oe.properties.straat&&(ei=Oe.properties.straat+" "+Oe.properties.huisnummer);const Gt=aa(ei),Zt=Oe.properties[de.value],Ft=Af.filter(ut=>ut.attribute===de.value),Be=Ft.length!==0?Ft[0]:{label:""},Si=Ge.value.substring(8,12),ni="tzv_p80_"+Si,Fi="tzv_oosr_"+Si;for(;Math.abs(Ee.lngLat.lng-qt[0])>180;)qt[0]+=Ee.lngLat.lng>qt[0]?360:-360;const ar=de.value?parseFloat(Zt)<0?"":Be.label=="Toegankelijkheid woningen"?` 588 <p class="text-sm">3 sterren woningen: ${Oe.properties.p_ster_3}%</p> 589 <p class="text-sm">2 sterren woningen: ${Oe.properties.p_ster_2}%</p> 590 <p class="text-sm">1 ster woningen: ${Oe.properties.p_ster_1}%</p> `:Be.label=="Woningvoorraad en gezinssamenstelling"?` 591 <p class="text-sm">Percentage koopwoningen:</p> 592 <p class="text-xl">${fi(Zt)}${ae.value.unit}</p> `:Be.label=="Panden langdurige zorgorganisaties"&&Oe.properties.aantal_verblijfszorginstellingen_per_65plus?` 593 <p class="text-sm font-semibold">Ouderenzorg (VV): </p> 594 <p class="text-sm">Aantal panden: ${Oe.properties.nr_vhz_instellingen} </p> 595 <p class="text-sm">Zorgcapaciteit per aantal 65-plussers: ${Oe.properties.aantal_verpleeghuizen_per_65plus.toFixed(1)}% </p> 596 <p class="text-sm font-semibold pt-2">Langdurige zorg panden (GGZ, GHZ en VV): </p> 597 <p class="text-sm">Aantal panden: ${Oe.properties.nr_instellingen}</p> 598 <p class="text-sm">Zorgcapaciteit per aantal 65-plussers: ${Oe.properties.aantal_verblijfszorginstellingen_per_65plus.toFixed(1)}% </p> `:Be.label=="Panden langdurige zorgorganisaties"?` 599 <p class="text-sm font-semibold">Ouderenzorg (VV): </p> 600 <p class="text-sm">Aantal panden: ${Oe.properties.nr_vhz_instellingen} </p> 601 <p class="text-sm font-semibold pt-2">Langdurige zorg panden (GGZ, GHZ en VV): </p> 602 <p class="text-sm">Aantal panden: ${Oe.properties.nr_instellingen}</p> `:Be.label=="Geclusterd wonen"&&Oe.properties.aantal_clusters_vv?` 603 <p class="text-sm font-semibold">Ouderenzorg (VV): </p> 604 <p class="text-sm">Aantal clusters: ${Oe.properties.aantal_clusters_vv} </p> 605 <p class="text-sm">Aandeel zorgindicaties woonachtig in cluster: ${Oe.properties.aandeel_zorgindicaties_in_cluster_vv.toFixed(1)}% </p> 606 <p class="text-sm font-semibold pt-2">Langdurige zorg (GGZ, GHZ en VV): </p> 607 <p class="text-sm">
607Aantal clusters: ${Oe.properties.aantal_clusters_totaal} </p> 608 <p class="text-sm">Aandeel zorgindicaties woonachtig in cluster: ${Oe.properties.aandeel_zorgindicaties_in_cluster_totaal.toFixed(1)}% </p> `:Be.label=="Huidige zorgvraag"&&Oe.properties.nizvvper65plus?` 609 <p class="text-sm font-semibold"> Zorgindicaties (niet in zorginstelling) per aantal 65-plussers: </p> 610 <p class="text-sm">Ouderenzorg (VV): ${fi(Oe.properties.nizvvper65plus)}% </p> 611 <p class="text-sm">Totaal (GGZ, GHZ en VV): ${fi(Oe.properties.niztotaalper65plus)}% </p> 612 <p class="text-sm pt-2">WMO gebruik per aantal 65-plussers: ${fi(Oe.properties.aantal_wmoper65plus)}% </p> 613 <p class="text-sm">Mantelzorgratio (OOSR): ${Tr(Oe.properties.OOSR)} </p> `:Be.label=="Huidige zorgvraag"&&Oe.properties.nr_instellingen?` 614 <p class="text-sm pt-2">WMO gebruik per aantal 65-plussers: ${fi(Oe.properties.aantal_wmoper65plus)}% </p> 615 <p class="text-sm">Mantelzorgratio (OOSR): ${Tr(Oe.properties.OOSR)} </p> 616 <div class="flex flex-row mt-2"> 617 <img src="/icons/411.001-ZorgopdeKaart-iconen-uitroepteken.svg" class="text-lg w-4"/> 618 <p class="text-xs italic font-semibold ml-2"> Disclaimer: </p> 619 </div> 620 <p class="text-xs italic"> WMO gebruik is mogelijk hoger dan verwacht door de aanwezigheid van langdurige zorgpanden in deze buurt. </p>`:Be.label=="Huidige zorgvraag"?` 621 <p class="text-sm pt-2">WMO gebruik per aantal 65-plussers: ${fi(Oe.properties.aantal_wmoper65plus)}% </p> 622 <p class="text-sm">Mantelzorgratio (OOSR): ${Tr(Oe.properties.OOSR)} </p> `:Be.label=="Toekomstige zorgvraag"&&Si!="2023"&&Oe.properties[Fi]?` 623 <p class="text-sm pt-2">Aandeel 65-plussers: ${fi(Oe.properties[Ge.value])}% </p> 624 <p class="text-sm"> Verschil t.o.v. 2023: ${fi(Oe.properties[Ge.value]-Oe.properties.tzv_p65_2023)}% </p> 625 <p class="text-sm pt-2">Aandeel 80-plussers: ${fi(Oe.properties[ni])}% </p> 626 <p class="text-sm"> Verschil t.o.v. 2023: ${fi(Oe.properties[ni]-Oe.properties.tzv_p80_2023)}% </p> 627 <p class="text-sm pt-2">Mantelzorgratio (OOSR): ${fi(Oe.properties[Fi])}% </p> 628 <p class="text-sm"> Verschil t.o.v. 2023: ${(Oe.properties[Fi]-Oe.properties.tzv_oosr_2023).toFixed(1)}% </p> `:Be.label=="Toekomstige zorgvraag"&&Si=="2023"&&Oe.properties[Fi]?` 629 <p class="text-sm">Aandeel 65-plussers: ${fi(Oe.properties[Ge.value])}% </p> 630 <p class="text-sm">Aandeel 80-plussers: ${fi(Oe.properties[ni])}% </p> 631 <p class="text-sm">Mantelzorgratio (OOSR): ${fi(Oe.properties[Fi])}% </p> `:Be.label=="Toekomstige zorgvraag"&&Si=="2023"?` 632 <p class="text-sm">Aandeel 65-plussers: ${fi(Oe.properties[Ge.value])}% </p> 633 <p class="text-sm">Aandeel 80-plussers: ${fi(Oe.properties[ni])}% </p> 634 <p class="text-sm">Mantelzorgratio (OOSR) 2022: ${Tr(Oe.properties.OOSR)} </p> `:Be.label=="Toekomstige zorgvraag"?` 635 <p class="text-sm pt-2">Aandeel 65-plussers: ${fi(Oe.properties[Ge.value])}% </p> 636 <p class="text-sm"> Verschil t.o.v. 2023: ${fi(Oe.properties[Ge.value]-Oe.properties.tzv_p65_2023)}% </p> 637 <p class="text-sm pt-2">Aandeel 80-plussers: ${fi(Oe.properties[ni])}% </p> 638 <p class="text-sm"> Verschil t.o.v. 2023: ${fi(Oe.properties[ni]-Oe.properties.tzv_p80_2023)}% </p> `:Oe.properties.postcode?` 639 <p class="text-sm">Aantal (makkelijk) aanpasbare woningen: ${Oe.properties.n_ster_2} </p> `:Be.label=="Geschiktheidsgids geclusterd wonen"?` 640 <p class="text-sm"> Geschiktheidsscore: ${fi(Oe.properties.p_gewogenindicatoren_met_waarde)} </p>`:` 641 <p class="text-sm">${Be.label}:</p> 642 <p class="text-xl">${fi(Zt.toFixed(1))}${ae.value.unit}</p> `:"",Ve=!Oe.properties.straat&&yt=="Adres"?` 643 <div class="px-4 text-govblue"> 644 <h2 class="font-bold">${yt}</h2> 645 <h2 class="text-lg font-semibold mb-2">Niet beschikbaar</h2> 646 </div>`:Be.label=="Geschiktheidsgids geclusterd wonen"&&yt=="Buurt"?` 647 <div class="px-4 text-govblue"> 648 <h2 class="font-bold">${yt}</h2> 649 <h2 class="text-lg font-semibold mb-2">${Gt}</h2> 650 <p class="text-sm pb-2"> Geschiktheidsscore: ${fi(Oe.properties.p_gewogenindicatoren_met_waarde)} </p> 651 <p class="text-xs italic"> Beste indicator*: </p> <p class="text-xs"> ${Oe.properties.beste_indicator} </p> 652 <p class="text-xs italic pt-1"> Slechtse indicator*: </p> <p class="text-xs"> ${Oe.properties.slechste_indicator} </p> 653 <h2 class="pt-2 font-bold">Gemeente</h2> 654 <h2 class="text-lg font-semibold mb-2">${Oe.properties.gm_naam}</h2> 655 <p class="text-sm"> Geschiktheidsscore: ${fi(Oe.properties.p_gewogenindicatoren_met_waarde_gemeente)} </p> 656 <p class="text-xs italic pt-2 text-gray-400">
656 *Buurt - Gemeente op indicatorwaarde niveau (waardes tussen 0-1), waarbij de beste indicator het meest positief verschilt, en de slechtste indicator het meest negatief. </p> 657 </div>`:yt=="Buurt"?` 658 <div class="px-4 text-govblue"> 659 <h2 class="font-bold">${yt}</h2> 660 <h2 class="text-lg font-semibold mb-2">${Gt}</h2> 661 <h2 class="pt-1 font-bold">Gemeente</h2> 662 <h2 class="text-lg font-semibold mb-2">${Oe.properties.gm_naam}</h2> 663 <p class="pt-2"> ${ar} </p> 664 </div>`:Zt?` 665 <div class="px-4 text-govblue"> 666 <h2 class="font-bold">${yt}</h2> 667 <h2 class="text-lg font-semibold mb-2">${Gt}</h2> 668 ${ar} 669 </div>`:Oe.properties.zorgorganisatie&&Oe.properties.is_ghz?`<div class="px-4 text-govblue"> 670 <h2 class="font-bold">${Oe.properties.zorgorganisatie}</h2> 671 <h2 class="text-lg font-semibold mb-2">${Gt}</h2> 672 <p class="text-xl pt-2"> GHZ </p> 673 </div>`:Oe.properties.zorgorganisatie&&Oe.properties.is_ggz?`<div class="px-4 text-govblue"> 674 <h2 class="font-bold">${Oe.properties.zorgorganisatie}</h2> 675 <h2 class="text-lg font-semibold mb-2">${Gt}</h2> 676 <p class="text-xl pt-2"> GGZ </p> 677 </div>`:Oe.properties.zorgorganisatie&&Oe.properties.is_vv?`<div class="px-4 text-govblue"> 678 <h2 class="font-bold">${Oe.properties.zorgorganisatie}</h2> 679 <h2 class="text-lg font-semibold mb-2">${Gt}</h2> 680 <p class="text-xl pt-2"> VV </p> 681 </div>`:yt=="Postcode"?` 682 <div class="px-4 text-govblue"> 683 <h2 class="font-bold">${yt}</h2> 684 <h2 class="text-lg font-semibold mb-2">${Gt}</h2> 685 ${ar} 686 </div>`:!Zt&&yt!="Adres"?` 687 <h2 class="font-bold text-govblue">${yt}</h2> 688 <h2 class="text-lg font-semibold mb-2 text-govblue">${Gt} </h2> 689 <p class="text-govblue font-italic"> Geen data beschikbaar </p>`:` 690 <h2 class="font-bold text-govblue">${yt}</h2> 691 <h2 class="text-lg font-semibold mb-2 text-govblue">${Gt} </h2>`,ft=new bc.Popup().setLngLat(Ee.lngLat).setHTML(Ve);return ft.addTo(T),ft}const Ct=(Ee,{sourceName:Le,sourceLayer:yt,url:Oe,fillPaint:ki,linePaint:qt,circlePaint:ei,symbolLayout:Gt,filter:Zt,layout:Ft,minzoom:Be,maxzoom:Si})=>{const ni=`${Le}-fill`,Fi=`${Le}-line`;if(Le=="zorgregios_clusters"){Ee.addSource(Le,{type:"geojson",data:Oe,cluster:!0,clusterMaxZoom:12,clusterRadius:70});const ft=`${Le}-circle`,ut=`${Le}-symbol`;Ee.addLayer({id:ft,type:"circle",source:Le,filter:Zt,paint:ei,minzoom:Be,maxzoom:Si}),Ee.addLayer({id:ut,type:"symbol",source:Le,filter:Zt,layout:Gt,minzoom:Be,maxzoom:Si})}else if(Le=="ADL_voorzieningen"){Ee.addSource(Le,{type:"vector",tiles:[Oe],scheme:"tms"});
691const ft=`${Le}-symbol`;Ee.addLayer({id:ft,type:"symbol",source:Le,"source-layer":yt,layout:Ft,minzoom:Be,maxzoom:Si})}else if(Le=="ADL_heatmap"){Ee.addSource(Le,{type:"raster",tiles:[Oe],tileSize:256});const ft=`${Le}-raster`;Ee.addLayer({id:ft,type:"raster",source:Le,"source-layer":yt,minzoom:Be,maxzoom:Si})}else Ee.addSource(Le,{type:"vector",tiles:[Oe],scheme:"tms"}),Ee.addLayer({id:ni,type:"fill",source:Le,"source-layer":yt,paint:ki,minzoom:Be,maxzoom:Si}),Ee.addLayer({id:Fi,type:"line",source:Le,"source-layer":yt,paint:qt,minzoom:Be,maxzoom:Si}),Zt&&(Ee.setFilter(ni,Zt),Ee.setFilter(Fi,Zt));Ee.off("zoom",Te),Ee.off("zoom",Pt),Ee.on("zoom",Te),Ee.on("zoom",Pt);const ar=re[ni];ar&&Ee.off("click",ni,ar);const Ve=ft=>{let ut=Ee.queryRenderedFeatures(ft.point).map(Wi=>Wi.source);if(ut.includes("BAG")&&Le==="BAG"||!ut.includes("BAG")&&ut[ut.length-1]===Le&&ut[0]!="zorgpanden"&&ut[0]!="postcode6"||!ut.includes("BAG")&&Le==="zorgpanden"||!ut.includes("BAG")&&Le==="postcode6"){switch(le.value&&(le.value.remove(),le.value=void 0),Le){case"BAG":le.value=_t(ft,"pand_id","Adres");break;case"postcode6":le.value=_t(ft,"postcode","Postcode");break;case"buurten":le.value=_t(ft,"bu_naam","Buurt");break;case"gemeenten":le.value=_t(ft,"gm_naam","Gemeente");break;case"zorgregios":le.value=_t(ft,"zorgregio_naam","Zorgregio");break;case"zorgpanden":le.value=_t(ft,"zorgorganisatie","Zorgorganisatie");break;case"panden_wooncluster":le.value=_t(ft,"pand_id","Adres");break;case"buurten_wooncluster":le.value=_t(ft,"bu_naam","Buurt");break;case"gemeenten_wooncluster":le.value=_t(ft,"gm_naam","Gemeente");break;case"zorgregio_wooncluster":le.value=_t(ft,"zorgregio_naam","Zorgregio");break}W.value=ft.features[0].properties}};re[ni]=Ve,Ee.on("click",ni,Ve)},Lt=Ee=>{Ct(Ee,{sourceName:"zorgregios",sourceLayer:"zorgregio_vestigingen",url:`${l}/gwc/service/tms/1.0.0/zodk:zorgregio_vestigingen@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-color":"transparent","fill-opacity":["step",["zoom"],G.value,9,0]},linePaint:{"line-color":"black","line-width":["step",["zoom"],1,9,2]},minzoom:7,maxzoom:12})},wi=Ee=>{Ct(Ee,{sourceName:"zorgregio_wooncluster",sourceLayer:"wooncluster_zorgregio",url:`${l}/gwc/service/tms/1.0.0/zodk:wooncluster_zorgregio@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-color":"transparent","fill-opacity":["step",["zoom"],G.value,9,0]},linePaint:{"line-color":"black","line-width":["step",["zoom"],1,9,2]},minzoom:7,maxzoom:12})},ri=Ee=>{Ct(Ee,{sourceName:"zorgregios_clusters",url:`${l}/zodk/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=zodk%3Alocatie_zorgpanden_2022&outputFormat=application%2Fjson&srsname=EPSG:4326`,filter:["has","point_count"],circlePaint:{"circle-color":"#f092cd","circle-radius":["interpolate",["linear"],["get","point_count"],2,13,500,45]},symbolLayout:{"text-field":"{point_count}","text-font":["DIN Offc Pro Medium","Arial Unicode MS Bold"],"text-size":12},minzoom:7,maxzoom:13.5})},hi=Ee=>{Ct(Ee,{sourceName:"zorgregios_pattern",sourceLayer:"zorgregio_vestigingen",url:`${l}/gwc/service/tms/1.0.0/zodk:zorgregio_vestigingen@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-pattern":["case",[">=",["get","aantal_wmoper65plus"],23],"pattern5",[">=",["get","aantal_wmoper65plus"],21],"pattern4",[">=",["get","aantal_wmoper65plus"],19],"pattern3",[">=",["get","aantal_wmoper65plus"],17],"pattern2",[">=",["get","aantal_wmoper65plus"],15],"pattern1","transparent"]},linePaint:{"line-color":"black","line-width":1},minzoom:7,maxzoom:9})},Di=Ee=>{Ct(Ee,{sourceName:"gemeenten",sourceLayer:"gemeente_vestigingen",url:`${l}/gwc/service/tms/1.0.0/zodk:gemeente_vestigingen@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-color":"transparent","fill-opacity":["step",["zoom"],G.value,12,0]},linePaint:{"line-color":"grey","line-width":["step",["zoom"],1.3,9,2]},minzoom:9,maxzoom:15})},xi=Ee=>{Ct(Ee,{sourceName:"gemeenten_wooncluster",sourceLayer:"wooncluster_gemeente",url:`${l}/gwc/service/tms/1.0.0/zodk:wooncluster_gemeente@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-color":"transparent","fill-opacity":["step",["zoom"],G.value,12,0]},linePaint:{"line-color":"grey","line-width":["step",["zoom"],1.3,9,2]},minzoom:9,maxzoom:15})},Ui=Ee=>{Ct(Ee,{sourceName:"gemeenten_pattern",sourceLayer:"gemeente_vestigingen",url:`${l}
691/gwc/service/tms/1.0.0/zodk:gemeente_vestigingen@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-pattern":["case",[">=",["get","aantal_wmoper65plus"],30],"pattern5",[">=",["get","aantal_wmoper65plus"],24],"pattern4",[">=",["get","aantal_wmoper65plus"],18],"pattern3",[">=",["get","aantal_wmoper65plus"],12],"pattern2",[">=",["get","aantal_wmoper65plus"],6],"pattern1","transparent"]},linePaint:{"line-color":"transparent","line-width":1.3},minzoom:9,maxzoom:12})},li=Ee=>{Ct(Ee,{sourceName:"buurten",sourceLayer:"buurt_vestigingen",url:`${l}/gwc/service/tms/1.0.0/zodk:buurt_vestigingen@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-color":"transparent","fill-opacity":G.value},linePaint:{"line-color":"#FE6100","line-width":1.3},minzoom:12,maxzoom:18})},dr=Ee=>{Ct(Ee,{sourceName:"buurten_wooncluster",sourceLayer:"wooncluster_buurt",url:`${l}/gwc/service/tms/1.0.0/zodk:wooncluster_buurt@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-color":"transparent","fill-opacity":G.value},linePaint:{"line-color":"#FE6100","line-width":1.3},minzoom:12,maxzoom:18})},wn=Ee=>{Ct(Ee,{sourceName:"buurten_pattern",sourceLayer:"buurt_vestigingen",url:`${l}/gwc/service/tms/1.0.0/zodk:buurt_vestigingen@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-pattern":["case",[">=",["get","aantal_wmoper65plus"],32],"pattern5",[">=",["get","aantal_wmoper65plus"],24],"pattern4",[">=",["get","aantal_wmoper65plus"],16],"pattern3",[">=",["get","aantal_wmoper65plus"],8],"pattern2",[">=",["get","aantal_wmoper65plus"],0],"pattern1","transparent"]},linePaint:{"line-color":"transparent","line-width":1.3},minzoom:12,maxzoom:18})},Zr=Ee=>{Ct(Ee,{sourceName:"postcode6",sourceLayer:"pc6_sterren",url:`${l}/gwc/service/tms/1.0.0/zodk:pc6_sterren@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-color":"transparent","fill-opacity":G.value},linePaint:{"line-color":"#3e8eb3","line-width":1.3},minzoom:13.5,maxzoom:18})},Sr=Ee=>{Ct(Ee,{sourceName:"BAG",sourceLayer:"pand_sterren_2022",url:`${l}/gwc/service/tms/1.0.0/zodk:pand_sterren_2022@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-color":["case",["all",["has","n_ster_3"]],"#76d2b6",["all",["has","n_ster_0"],["has","n_ster_2"]],"#E69F00",["all",["has","n_ster_2"]],"#f9e11e",["all",["has","n_ster_1"]],"#f092cd",["all",["has","n_ster_0"]],"#B30B0B","transparent"],"fill-opacity":G.value},linePaint:{"line-color":["case",["all",["has","n_ster_3"]],"black",["all",["has","n_ster_2"]],"black",["all",["has","n_ster_1"]],"black",["all",["has","n_ster_0"]],"black","transparent"],"line-width":.8},filter:["all",["has","gebruiksdoelen"],["in","woonfunctie",["get","gebruiksdoelen"]]],minzoom:13.5,maxzoom:24})},kn=Ee=>{Ct(Ee,{sourceName:"zorgpanden",sourceLayer:"zorgpanden_2022",url:`${l}/gwc/service/tms/1.0.0/zodk:zorgpanden_2022@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-color":"#3ddbd9"},linePaint:{"line-color":"black","line-width":1},minzoom:13,maxzoom:18})},Hi=Ee=>{Ct(Ee,{sourceName:"panden_wooncluster",sourceLayer:"wooncluster_pand",url:`${l}/gwc/service/tms/1.0.0/zodk:wooncluster_pand@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,fillPaint:{"fill-color":["case",["all",["has","n_ster_3"]],"#76d2b6",["all",["has","n_ster_0"],["has","n_ster_2"]],"#E69F00",["all",["has","n_ster_2"]],"#f9e11e",["all",["has","n_ster_1"]],"#f092cd",["all",["has","n_ster_0"]],"#B30B0B","transparent"],"fill-opacity":G.value},linePaint:{"line-color":["case",["all",["has","n_ster_3"]],"black",["all",["has","n_ster_2"]],"black",["all",["has","n_ster_1"]],"black",["all",["has","n_ster_0"]],"black","transparent"],"line-width":.8},minzoom:13,maxzoom:18})},pr=Ee=>{Ct(Ee,{sourceName:"ADL_voorzieningen",sourceLayer:"adl_voorzieningen",url:`${l}/gwc/service/tms/1.0.0/zodk:adl_voorzieningen@EPSG:3857@pbf/{z}/{x}/{y}.pbf`,layout:{"icon-image":["case",["==",["get","type"],"huisarts"],"huisarts",["==",["get","type"],"apotheek"],"apotheek",["==",["get","type"],"supermarkt"],"supermarkt",["==",["get","subtype"],"Bus"],"bus",["==",["get","subtype"],"Trein"],"trein",["==",["get","subtype"],"Tram"],"tram",["==",["get","subtype"],"Veerboot"],"veerboot",["==",["get","subtype"],"Metro"],"metro","pattern1"],"icon-size":.8},minzoom:13.5,maxzoom:18})},hn=Ee=>{Ct(Ee,{sourceName:"ADL_heatmap",sourceLayer:"adl_voorzieningen_heatmap",url:`${l}/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=zodk:adl_voorzieningen_heatmap&FORMAT=image/png&TILEMATRIXSET=EPSG:3857&TILEMATRIX=EPSG:3857:{z}&TILEROW={y}&TILECOL={x}`,minzoom:13.5,maxzoom:18})};nr(async()=>{const Le=await(await fetch("/bag_standaardvisualisatie.json")).json();Le.glyphs="https://api.maptiler.com/fonts/{fontstack}/{range}.pbf?key=CAaX6EUBMS5JOqX5wbLg",T=new bc.Map({container:"map",style:Le,center:[5.2,52],zoom:8,maxBounds:[[0,48],[10,56]],attributionControl:!1}),T.on("load",async yt=>{const Oe=[{name:"pattern1",path:"/patterns/Pattern_1.png"},{name:"pattern2",path:"/patterns/Pattern_4.png"},{name:"pattern3",path:"/patterns/Pattern_2.png"},{name:"pattern4",path:"/patterns/Pattern_3.png"},{name:"pattern5",path:"/patterns/Pattern_5.png"},{name:"apotheek",path:"/icons/apotheek_wit.png"},{name:"huisarts",path:"/icons/huisarts_wit.png"},{name:"supermarkt",path:"/icons/supermarkt_wit.png"},{name:"bus",path:"/icons/bus_wit.png"},{name:"trein",path:"/icons/trein_wit.png"},{name:"tram",path:"/icons/tram_wit.png"},{name:"veerboot",path:"/icons/veerboot_wit.png"},{name:"metro",path:"/icons/metro_wit.png"}];for(const ki of Oe){const qt=await T.loadImage(ki.path);T.addImage(ki.name,qt.data)}de.value!="aandeel_zorgindicaties_in_cluster_totaal"&&de.value!="aantal_verblijfszorginstellingen_per_65plus"&&de.value!="p_gewogenindicatoren_met_waarde"&&li(T),de.value=="p_gewogenindicatoren_met_waarde"&&(Hi(T),dr(T),xi(T),wi(T)),Di(T),Lt(T),de.value=="nizvvper65plus"&&(wn(T),hi(T),Ui(T)),de.value=="af_gem_aas"&&(Zr(T),hn(T)),de.value=="aantal_verblijfszorginstellingen_per_65plus"?(ri(T),kn(T)):de.value!="p_gewogenindicatoren_met_waarde"&&(Sr(T),Br()),de.value=="af_gem_aas"&&(pr(T),Hr()),setTimeout(sr,de.value=="p_gewogenindicatoren_met_waarde"?200:0)}),T.addControl(new bc.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}))});const sr=()=>{const Ee=T.getZoom();let Le;if(T.getLayer("buurten-fill")?Le=Ee<9?"zorgregios-fill":Ee<12?"gemeenten-fill":"buurten-fill":T.getLayer("buurten_wooncluster-fill")?Le=Ee<9?"zorgregio_wooncluster-fill":Ee<12?"gemeenten_wooncluster-fill":"buurten_wooncluster-fill":Le=Ee<9?"zorgregios-fill":"gemeenten-fill",!T.getLayer(Le)){console.warn(`Layer ${Le} does not exist, skipping colorMap`);return}const yt=T.queryRenderedFeatures({layers:[Le]});console.log(yt);const Oe=Ge&&ge.value=="Toekomstige zorgvraag"?Ge.value:de.value,ki=yt.map(Gt=>Number(Gt.properties[Oe]));ye.value=Math.max(...ki),fe.value=Math.min(...ki);const qt=["to-number",["get",Oe]],ei=["case",["!",["has",Oe]],"grey",["<",qt,Ze.value],"transparent",[">",qt,Ue.value],"transparent",["interpolate",["linear"],qt,Ze.value,"#fff",Ue.value,"#154273"]];T.getLayer("gemeenten_wooncluster-fill")?T.setPaintProperty("gemeenten_wooncluster-fill","fill-color",ei):T.getLayer("gemeenten-fill")&&T.setPaintProperty("gemeenten-fill","fill-color",ei),T.getLayer("zorgregio_wooncluster-fill")?T.setPaintProperty("zorgregio_wooncluster-fill","fill-color",ei):T.getLayer("zorgregios-fill")&&T.setPaintProperty("zorgregios-fill","fill-color",ei),T.getLayer("buurten-fill")&&T.setPaintProperty("buurten-fill","fill-color",ei),T.getLayer("buurten_wooncluster-fill")&&T.setPaintProperty("buurten_wooncluster-fill","fill-color",ei)};function Wn(){le.value&&le.value.remove(),W.value=void 0}function Br(){let Ee=13.5;de.value=="aandeel_zorgindicaties_in_cluster_totaal"&&(Ee=12),T.setLayerZoomRange("BAG-fill",Ee,24),T.setLayerZoomRange("BAG-line",Ee,24)}function Hr(){let Ee=18;de.value=="af_gem_aas"&&(Ee=13.5),T.getLayer("buurten-fill")?(T.setLayerZoomRange("buurten-fill",12,Ee),T.setLayerZoomRange("buurten-line",12,Ee)):T.getLayer("buurten_wooncluster-fill")&&(T.setLayerZoomRange("buurten_wooncluster-fill",12,Ee),T.setLayerZoomRange("buurten_wooncluster-line",12,Ee))}function Tr(Ee){return Ee?`${Ee.toFixed(1)}%`:"Niet beschikbaar"}async function Mn(Ee){const yt=/POINT\(([0-9.]*) ([0-9.]*)\)/.exec(Ee.centroide_ll)??[],Oe=+yt[1],ki=+yt[2],qt=new bc.LngLat(Oe,ki);if(Ee.type=="buurt"){let ei=function(){const Gt=T.project(qt),Zt=T.queryRenderedFeatures(Gt,{layers:["buurten-fill"]});Zt.length>0&&(W.value=Zt[0].properties,_t({lngLat:qt,features:Zt},"bu_naam","Buurt"))};T.setZoom(13),T.setCenter(qt),setTimeout(ei,700)}else if(Ee.type=="gemeente"){let ei=function(){const Gt=T.project(qt),Zt=T.queryRenderedFeatures(Gt,{layers:["gemeenten-fill"]});Zt.length>0&&(W.value=Zt[0].properties,_t({lngLat:qt,features:Zt},"gm_naam","Gemeente"))};T.setZoom(11),T.setCenter(qt),setTimeout(ei,700)}else if(Ee.type=="adres"){let ei=function(){const Gt=T.project(qt),Zt=T.queryRenderedFeatures(Gt);Zt.length>0&&(W.value=Zt[0].properties,_t({lngLat:qt,features:Zt},"pand_id","Adres"))};T.setZoom(16),T.setCenter(qt),setTimeout(ei,700)}else{let ei=function(){const Gt=T.project(qt),Zt=T.queryRenderedFeatures(Gt,{layers:["buurten-fill"]});Zt.length>0&&(W.value=Zt[0].properties,_t({lngLat:qt,features:Zt},"bu_naam","Buurt"))};T.setZoom(13),T.setCenter(qt),setTimeout(ei,700)}}return(Ee,Le)=>{var Zt;const yt=zd,Oe=xy,ki=J1,qt=nw,ei=Ww,Gt=o2;return be(),qe("div",c2,[I("div",h2,[I("div",d2,[I("div",p2,[B(de)?(be(),qe("h1",f2,Et(B(ge)),1
691)):At("",!0),pe(yt,{onClick:Le[0]||(Le[0]=Ft=>{F.value=!B(F),L.value=!1}),class:"mb-4 cursor-pointer sm:text-sm font-semibold text-sm text-white hover:text-govSecondary hover:bg-transparent focus:text-govSecondary focus:bg-transparent",tabindex:"0",onKeyup:[Le[1]||(Le[1]=Nn(Ft=>{F.value=!B(F),L.value=!1},["enter"])),Le[2]||(Le[2]=Nn(Ft=>{F.value=!B(F),L.value=!1},["space"]))]},{default:ee(()=>Le[13]||(Le[13]=[kr(" Selecteer een ander thema op de kaart ")])),_:1}),pe(Oe,{onSelectPdokResult:Mn,class:"absolute z-20"}),B(ge)=="Toekomstige zorgvraag"?(be(),qe("div",m2,[Le[14]||(Le[14]=I("h2",{class:"pt-2 text-lg"},"Toon data van het jaar",-1)),au(I("input",{type:"radio",id:"toekomstige_zorgvraag_2023",value:"tzv_p65_2023","onUpdate:modelValue":Le[3]||(Le[3]=Ft=>wr(Ge)?Ge.value=Ft:Ge=Ft)},null,512),[[ou,B(Ge)]]),Le[15]||(Le[15]=I("label",{for:"toekomstige_zorgvraag_2023",class:"mr-2"}," 2023 ",-1)),au(I("input",{type:"radio",id:"toekomstige_zorgvraag_2025",value:"tzv_p65_2025","onUpdate:modelValue":Le[4]||(Le[4]=Ft=>wr(Ge)?Ge.value=Ft:Ge=Ft)},null,512),[[ou,B(Ge)]]),Le[16]||(Le[16]=I("label",{for:"toekomstige_zorgvraag_2025",class:"mr-2"}," 2025 ",-1)),au(I("input",{type:"radio",id:"toekomstige_zorgvraag_2030",value:"tzv_p65_2030","onUpdate:modelValue":Le[5]||(Le[5]=Ft=>wr(Ge)?Ge.value=Ft:Ge=Ft)},null,512),[[ou,B(Ge)]]),Le[17]||(Le[17]=I("label",{for:"toekomstige_zorgvraag_2030",class:"mr-2"}," 2030 ",-1)),au(I("input",{type:"radio",id:"toekomstige_zorgvraag_2035",value:"tzv_p65_2035","onUpdate:modelValue":Le[6]||(Le[6]=Ft=>wr(Ge)?Ge.value=Ft:Ge=Ft)},null,512),[[ou,B(Ge)]]),Le[18]||(Le[18]=I("label",{for:"toekomstige_zorgvraag_2035",class:"mr-2"}," 2035 ",-1)),au(I("input",{type:"radio",id:"toekomstige_zorgvraag_2040",value:"tzv_p65_2040","onUpdate:modelValue":Le[7]||(Le[7]=Ft=>wr(Ge)?Ge.value=Ft:Ge=Ft)},null,512),[[ou,B(Ge)]]),Le[19]||(Le[19]=I("label",{for:"toekomstige_zorgvraag_2040"}," 2040 ",-1))])):At("",!0)]),pe(ki,{activeTheme:B(ge),modelValue:B(W),"onUpdate:modelValue":Le[8]||(Le[8]=Ft=>wr(W)?W.value=Ft:null),onClosePanel:Wn},null,8,["activeTheme","modelValue"]),pe(qt,{show:B(F),"onUpdate:show":Le[9]||(Le[9]=Ft=>wr(F)?F.value=Ft:null)},null,8,["show"])]),pe(ei,{"show-map-selector":B(F),"onUpdate:showMapSelector":Le[10]||(Le[10]=Ft=>wr(F)?F.value=Ft:null),"min-lim":B(Ze),"onUpdate:minLim":Le[11]||(Le[11]=Ft=>wr(Ze)?Ze.value=Ft:null),"max-lim":B(Ue),"onUpdate:maxLim":Le[12]||(Le[12]=Ft=>wr(Ue)?Ue.value=Ft:null),label:B(ge),title:B(ge),description:(Zt=w.filter(Ft=>Ft.property===B(de))[0])==null?void 0:Zt.legend,zoomlevel:B(wt),attribute_selected_year_tzv:B(Ge)},null,8,["show-map-selector","min-lim","max-lim","label","title","description","zoomlevel","attribute_selected_year_tzv"]),I("div",g2,[B(Ae)?(be(),Ne(Gt,{key:0,icon:"tabler:filter",label:"Filter",theme:B(ge)},null,8,["theme"])):At("",!0),pe(Gt,{img:"/icons/411.001-ZorgopdeKaart-iconen-informatie.svg",label:"Toelichting",theme:B(ge)},null,8,["theme"])])])])}}});export{b2 as default};
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.