From 0a604ede174d79f0c8d14c8fe9c140995238cdd6 Mon Sep 17 00:00:00 2001 From: qazsato Date: Sat, 27 Jul 2024 21:54:55 +0900 Subject: [PATCH] fix draw timing --- docs/200.html | 14 +-- docs/404.html | 14 +-- docs/_payload.json | 2 +- docs/assets/{Di1SuN-O.js => BAXeh9PG.js} | 2 +- docs/assets/{Djj1s0de.js => CO7BEIdq.js} | 2 +- docs/assets/{1LWmkWKD.js => DGAPDmwC.js} | 26 ++--- docs/assets/{d-UY-aAO.js => DNUVdy4O.js} | 2 +- docs/assets/builds/latest.json | 2 +- .../7c1674ba-d3ab-42f8-a69a-13907389b823.json | 1 - .../c3c07807-23c8-44e3-8c81-d82fca11e41f.json | 1 + ...{entry.vUUp6RlE.css => entry.l94Ot5Oz.css} | 2 +- docs/index.html | 18 +-- packages/docs/components/MeshMap.vue | 108 ++++++++---------- 13 files changed, 91 insertions(+), 103 deletions(-) rename docs/assets/{Di1SuN-O.js => BAXeh9PG.js} (97%) rename docs/assets/{Djj1s0de.js => CO7BEIdq.js} (97%) rename docs/assets/{1LWmkWKD.js => DGAPDmwC.js} (92%) rename docs/assets/{d-UY-aAO.js => DNUVdy4O.js} (93%) delete mode 100644 docs/assets/builds/meta/7c1674ba-d3ab-42f8-a69a-13907389b823.json create mode 100644 docs/assets/builds/meta/c3c07807-23c8-44e3-8c81-d82fca11e41f.json rename docs/assets/{entry.vUUp6RlE.css => entry.l94Ot5Oz.css} (99%) diff --git a/docs/200.html b/docs/200.html index 540081b..376b166 100644 --- a/docs/200.html +++ b/docs/200.html @@ -5,12 +5,12 @@ - + - - - - -
- \ No newline at end of file + \ No newline at end of file diff --git a/docs/404.html b/docs/404.html index 540081b..376b166 100644 --- a/docs/404.html +++ b/docs/404.html @@ -5,12 +5,12 @@ - + - - - - -
- \ No newline at end of file + \ No newline at end of file diff --git a/docs/_payload.json b/docs/_payload.json index 59331f6..06c5b39 100644 --- a/docs/_payload.json +++ b/docs/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1722084082668] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1722084855323] \ No newline at end of file diff --git a/docs/assets/Di1SuN-O.js b/docs/assets/BAXeh9PG.js similarity index 97% rename from docs/assets/Di1SuN-O.js rename to docs/assets/BAXeh9PG.js index 6cc1cc0..79495a2 100644 --- a/docs/assets/Di1SuN-O.js +++ b/docs/assets/BAXeh9PG.js @@ -1 +1 @@ -import{_ as a,u as o,o as s,c as i,a as e,t as r,p as u,f as c}from"./1LWmkWKD.js";const l=t=>(u("data-v-1e3620c9"),t=t(),c(),t),d={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},p=l(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),h={class:"max-w-520px text-center"},g=["textContent"],b=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const n=t;return o({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(m,x)=>(s(),i("div",d,[p,e("div",h,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:r(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:r(t.description)},null,8,b)])]))}},k=a(f,[["__scopeId","data-v-1e3620c9"]]);export{k as default}; +import{_ as a,u as o,o as s,c as i,a as e,t as r,p as u,f as c}from"./DGAPDmwC.js";const l=t=>(u("data-v-1e3620c9"),t=t(),c(),t),d={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},p=l(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),h={class:"max-w-520px text-center"},g=["textContent"],b=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const n=t;return o({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(m,x)=>(s(),i("div",d,[p,e("div",h,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:r(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:r(t.description)},null,8,b)])]))}},k=a(f,[["__scopeId","data-v-1e3620c9"]]);export{k as default}; diff --git a/docs/assets/Djj1s0de.js b/docs/assets/CO7BEIdq.js similarity index 97% rename from docs/assets/Djj1s0de.js rename to docs/assets/CO7BEIdq.js index 1cd313f..1f46f64 100644 --- a/docs/assets/Djj1s0de.js +++ b/docs/assets/CO7BEIdq.js @@ -1 +1 @@ -import{_ as r,u as s,o as i,c as u,a as e,t as o,b as c,w as d,d as l,e as p,p as h,f as b}from"./1LWmkWKD.js";const f=t=>(h("data-v-922baad2"),t=t(),b(),t),g={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},x=f(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),m={class:"max-w-520px text-center z-20"},y=["textContent"],_=["textContent"],k={class:"w-full flex items-center justify-center"},w={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return s({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(z,S)=>{const a=p;return i(),u("div",g,[x,e("div",m,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:o(t.statusCode)},null,8,y),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:o(t.description)},null,8,_),e("div",k,[c(a,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:d(()=>[l(o(t.backHome),1)]),_:1})])])])}}},C=r(w,[["__scopeId","data-v-922baad2"]]);export{C as default}; +import{_ as r,u as s,o as i,c as u,a as e,t as o,b as c,w as d,d as l,e as p,p as h,f as b}from"./DGAPDmwC.js";const f=t=>(h("data-v-922baad2"),t=t(),b(),t),g={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},x=f(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),m={class:"max-w-520px text-center z-20"},y=["textContent"],_=["textContent"],k={class:"w-full flex items-center justify-center"},w={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return s({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(z,S)=>{const a=p;return i(),u("div",g,[x,e("div",m,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:o(t.statusCode)},null,8,y),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:o(t.description)},null,8,_),e("div",k,[c(a,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:d(()=>[l(o(t.backHome),1)]),_:1})])])])}}},C=r(w,[["__scopeId","data-v-922baad2"]]);export{C as default}; diff --git a/docs/assets/1LWmkWKD.js b/docs/assets/DGAPDmwC.js similarity index 92% rename from docs/assets/1LWmkWKD.js rename to docs/assets/DGAPDmwC.js index 8a8f43c..193c5f0 100644 --- a/docs/assets/1LWmkWKD.js +++ b/docs/assets/DGAPDmwC.js @@ -1,23 +1,23 @@ -const __vite__fileDeps=["./d-UY-aAO.js","./IconCSS.Z2BAHt_z.css","./Djj1s0de.js","./error-404.CjGVuf6H.css","./Di1SuN-O.js","./error-500.DFBAsgKS.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +const __vite__fileDeps=["./DNUVdy4O.js","./IconCSS.Z2BAHt_z.css","./CO7BEIdq.js","./error-404.CjGVuf6H.css","./BAXeh9PG.js","./error-500.DFBAsgKS.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); var wE=Object.defineProperty;var EE=(e,n,s)=>n in e?wE(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s;var za=(e,n,s)=>EE(e,typeof n!="symbol"?n+"":n,s);/** * @vue/shared v3.4.29 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function mg(e,n){const s=new Set(e.split(","));return u=>s.has(u)}const $i={},Ql=[],Xn=()=>{},SE=()=>!1,lh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),gg=e=>e.startsWith("onUpdate:"),mr=Object.assign,yg=(e,n)=>{const s=e.indexOf(n);s>-1&&e.splice(s,1)},IE=Object.prototype.hasOwnProperty,ci=(e,n)=>IE.call(e,n),jt=Array.isArray,ec=e=>wf(e)==="[object Map]",ex=e=>wf(e)==="[object Set]",Ut=e=>typeof e=="function",ir=e=>typeof e=="string",Ka=e=>typeof e=="symbol",Fi=e=>e!==null&&typeof e=="object",_g=e=>(Fi(e)||Ut(e))&&Ut(e.then)&&Ut(e.catch),tx=Object.prototype.toString,wf=e=>tx.call(e),TE=e=>wf(e).slice(8,-1),ix=e=>wf(e)==="[object Object]",vg=e=>ir(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,tc=mg(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ef=e=>{const n=Object.create(null);return s=>n[s]||(n[s]=e(s))},CE=/-(\w)/g,Ro=Ef(e=>e.replace(CE,(n,s)=>s?s.toUpperCase():"")),AE=/\B([A-Z])/g,_c=Ef(e=>e.replace(AE,"-$1").toLowerCase()),Sf=Ef(e=>e.charAt(0).toUpperCase()+e.slice(1)),Qp=Ef(e=>e?`on${Sf(e)}`:""),Ys=(e,n)=>!Object.is(e,n),em=(e,...n)=>{for(let s=0;s{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,writable:u,value:s})},ME=e=>{const n=parseFloat(e);return isNaN(n)?e:n},nx=e=>{const n=ir(e)?Number(e):NaN;return isNaN(n)?e:n};let i0;const ox=()=>i0||(i0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ha(e){if(jt(e)){const n={};for(let s=0;s{if(s){const u=s.split(LE);u.length>1&&(n[u[0].trim()]=u[1].trim())}}),n}function Wt(e){let n="";if(ir(e))n=e;else if(jt(e))for(let s=0;sir(e)?e:e==null?"":jt(e)||Fi(e)&&(e.toString===tx||!Ut(e.toString))?JSON.stringify(e,ax,2):String(e),ax=(e,n)=>n&&n.__v_isRef?ax(e,n.value):ec(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((s,[u,h],g)=>(s[tm(u,g)+" =>"]=h,s),{})}:ex(n)?{[`Set(${n.size})`]:[...n.values()].map(s=>tm(s))}:Ka(n)?tm(n):Fi(n)&&!jt(n)&&!ix(n)?String(n):n,tm=(e,n="")=>{var s;return Ka(e)?`Symbol(${(s=e.description)!=null?s:n})`:e};/** +**//*! #__NO_SIDE_EFFECTS__ */function mg(e,n){const s=new Set(e.split(","));return u=>s.has(u)}const $i={},Ql=[],Xn=()=>{},SE=()=>!1,lh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),gg=e=>e.startsWith("onUpdate:"),gr=Object.assign,yg=(e,n)=>{const s=e.indexOf(n);s>-1&&e.splice(s,1)},IE=Object.prototype.hasOwnProperty,ci=(e,n)=>IE.call(e,n),jt=Array.isArray,ec=e=>wf(e)==="[object Map]",ex=e=>wf(e)==="[object Set]",Ut=e=>typeof e=="function",ir=e=>typeof e=="string",Ka=e=>typeof e=="symbol",Fi=e=>e!==null&&typeof e=="object",_g=e=>(Fi(e)||Ut(e))&&Ut(e.then)&&Ut(e.catch),tx=Object.prototype.toString,wf=e=>tx.call(e),TE=e=>wf(e).slice(8,-1),ix=e=>wf(e)==="[object Object]",vg=e=>ir(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,tc=mg(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ef=e=>{const n=Object.create(null);return s=>n[s]||(n[s]=e(s))},CE=/-(\w)/g,Ro=Ef(e=>e.replace(CE,(n,s)=>s?s.toUpperCase():"")),AE=/\B([A-Z])/g,_c=Ef(e=>e.replace(AE,"-$1").toLowerCase()),Sf=Ef(e=>e.charAt(0).toUpperCase()+e.slice(1)),Qp=Ef(e=>e?`on${Sf(e)}`:""),Ys=(e,n)=>!Object.is(e,n),em=(e,...n)=>{for(let s=0;s{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,writable:u,value:s})},ME=e=>{const n=parseFloat(e);return isNaN(n)?e:n},nx=e=>{const n=ir(e)?Number(e):NaN;return isNaN(n)?e:n};let i0;const ox=()=>i0||(i0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ha(e){if(jt(e)){const n={};for(let s=0;s{if(s){const u=s.split(LE);u.length>1&&(n[u[0].trim()]=u[1].trim())}}),n}function Zt(e){let n="";if(ir(e))n=e;else if(jt(e))for(let s=0;sir(e)?e:e==null?"":jt(e)||Fi(e)&&(e.toString===tx||!Ut(e.toString))?JSON.stringify(e,ax,2):String(e),ax=(e,n)=>n&&n.__v_isRef?ax(e,n.value):ec(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((s,[u,h],g)=>(s[tm(u,g)+" =>"]=h,s),{})}:ex(n)?{[`Set(${n.size})`]:[...n.values()].map(s=>tm(s))}:Ka(n)?tm(n):Fi(n)&&!jt(n)&&!ix(n)?String(n):n,tm=(e,n="")=>{var s;return Ka(e)?`Symbol(${(s=e.description)!=null?s:n})`:e};/** * @vue/reactivity v3.4.29 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let zn;class lx{constructor(n=!1){this.detached=n,this._active=!0,this.effects=[],this.cleanups=[],this.parent=zn,!n&&zn&&(this.index=(zn.scopes||(zn.scopes=[])).push(this)-1)}get active(){return this._active}run(n){if(this._active){const s=zn;try{return zn=this,n()}finally{zn=s}}}on(){zn=this}off(){zn=this.parent}stop(n){if(this._active){let s,u;for(s=0,u=this.effects.length;s=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),ea()}return this._dirtyLevel>=5}set dirty(n){this._dirtyLevel=n?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let n=Ks,s=$a;try{return Ks=!0,$a=this,this._runnings++,r0(this),this.fn()}finally{n0(this),this._runnings--,$a=s,Ks=n}}stop(){this.active&&(r0(this),n0(this),this.onStop&&this.onStop(),this.active=!1)}}function VE(e){return e.value}function r0(e){e._trackId++,e._depsLength=0}function n0(e){if(e.deps.length>e._depsLength){for(let n=e._depsLength;n0){u._dirtyLevel=2;continue}let h;u._dirtyLevel{const s=new Map;return s.cleanup=e,s.computed=n,s},Yd=new WeakMap,Ua=Symbol(""),Tm=Symbol("");function En(e,n,s){if(Ks&&$a){let u=Yd.get(e);u||Yd.set(e,u=new Map);let h=u.get(s);h||u.set(s,h=px(()=>u.delete(s))),dx($a,h)}}function us(e,n,s,u,h,g){const m=Yd.get(e);if(!m)return;let c=[];if(n==="clear")c=[...m.values()];else if(s==="length"&&jt(e)){const I=Number(u);m.forEach((k,M)=>{(M==="length"||!Ka(M)&&M>=I)&&c.push(k)})}else switch(s!==void 0&&c.push(m.get(s)),n){case"add":jt(e)?vg(s)&&c.push(m.get("length")):(c.push(m.get(Ua)),ec(e)&&c.push(m.get(Tm)));break;case"delete":jt(e)||(c.push(m.get(Ua)),ec(e)&&c.push(m.get(Tm)));break;case"set":ec(e)&&c.push(m.get(Ua));break}bg();for(const I of c)I&&fx(I,5);wg()}function NE(e,n){const s=Yd.get(e);return s&&s.get(n)}const jE=mg("__proto__,__v_isRef,__isVue"),mx=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ka)),o0=$E();function $E(){const e={};return["includes","indexOf","lastIndexOf"].forEach(n=>{e[n]=function(...s){const u=Ft(this);for(let g=0,m=this.length;g{e[n]=function(...s){Qs(),bg();const u=Ft(this)[n].apply(this,s);return wg(),ea(),u}}),e}function UE(e){Ka(e)||(e=String(e));const n=Ft(this);return En(n,"has",e),n.hasOwnProperty(e)}class gx{constructor(n=!1,s=!1){this._isReadonly=n,this._isShallow=s}get(n,s,u){const h=this._isReadonly,g=this._isShallow;if(s==="__v_isReactive")return!h;if(s==="__v_isReadonly")return h;if(s==="__v_isShallow")return g;if(s==="__v_raw")return u===(h?g?iS:xx:g?vx:_x).get(n)||Object.getPrototypeOf(n)===Object.getPrototypeOf(u)?n:void 0;const m=jt(n);if(!h){if(m&&ci(o0,s))return Reflect.get(o0,s,u);if(s==="hasOwnProperty")return UE}const c=Reflect.get(n,s,u);return(Ka(s)?mx.has(s):jE(s))||(h||En(n,"get",s),g)?c:gr(c)?m&&vg(s)?c:c.value:Fi(c)?h?bx(c):Oo(c):c}}class yx extends gx{constructor(n=!1){super(!1,n)}set(n,s,u,h){let g=n[s];if(!this._isShallow){const I=ac(g);if(!Qd(u)&&!ac(u)&&(g=Ft(g),u=Ft(u)),!jt(n)&&gr(g)&&!gr(u))return I?!1:(g.value=u,!0)}const m=jt(n)&&vg(s)?Number(s)e,If=e=>Reflect.getPrototypeOf(e);function Sd(e,n,s=!1,u=!1){e=e.__v_raw;const h=Ft(e),g=Ft(n);s||(Ys(n,g)&&En(h,"get",n),En(h,"get",g));const{has:m}=If(h),c=u?Eg:s?Tg:Qu;if(m.call(h,n))return c(e.get(n));if(m.call(h,g))return c(e.get(g));e!==h&&e.get(n)}function Id(e,n=!1){const s=this.__v_raw,u=Ft(s),h=Ft(e);return n||(Ys(e,h)&&En(u,"has",e),En(u,"has",h)),e===h?s.has(e):s.has(e)||s.has(h)}function Td(e,n=!1){return e=e.__v_raw,!n&&En(Ft(e),"iterate",Ua),Reflect.get(e,"size",e)}function s0(e){e=Ft(e);const n=Ft(this);return If(n).has.call(n,e)||(n.add(e),us(n,"add",e,e)),this}function a0(e,n){n=Ft(n);const s=Ft(this),{has:u,get:h}=If(s);let g=u.call(s,e);g||(e=Ft(e),g=u.call(s,e));const m=h.call(s,e);return s.set(e,n),g?Ys(n,m)&&us(s,"set",e,n):us(s,"add",e,n),this}function l0(e){const n=Ft(this),{has:s,get:u}=If(n);let h=s.call(n,e);h||(e=Ft(e),h=s.call(n,e)),u&&u.call(n,e);const g=n.delete(e);return h&&us(n,"delete",e,void 0),g}function c0(){const e=Ft(this),n=e.size!==0,s=e.clear();return n&&us(e,"clear",void 0,void 0),s}function Cd(e,n){return function(u,h){const g=this,m=g.__v_raw,c=Ft(m),I=n?Eg:e?Tg:Qu;return!e&&En(c,"iterate",Ua),m.forEach((k,M)=>u.call(h,I(k),I(M),g))}}function Ad(e,n,s){return function(...u){const h=this.__v_raw,g=Ft(h),m=ec(g),c=e==="entries"||e===Symbol.iterator&&m,I=e==="keys"&&m,k=h[e](...u),M=s?Eg:n?Tg:Qu;return!n&&En(g,"iterate",I?Tm:Ua),{next(){const{value:A,done:z}=k.next();return z?{value:A,done:z}:{value:c?[M(A[0]),M(A[1])]:M(A),done:z}},[Symbol.iterator](){return this}}}}function Vs(e){return function(...n){return e==="delete"?!1:e==="clear"?void 0:this}}function WE(){const e={get(g){return Sd(this,g)},get size(){return Td(this)},has:Id,add:s0,set:a0,delete:l0,clear:c0,forEach:Cd(!1,!1)},n={get(g){return Sd(this,g,!1,!0)},get size(){return Td(this)},has:Id,add:s0,set:a0,delete:l0,clear:c0,forEach:Cd(!1,!0)},s={get(g){return Sd(this,g,!0)},get size(){return Td(this,!0)},has(g){return Id.call(this,g,!0)},add:Vs("add"),set:Vs("set"),delete:Vs("delete"),clear:Vs("clear"),forEach:Cd(!0,!1)},u={get(g){return Sd(this,g,!0,!0)},get size(){return Td(this,!0)},has(g){return Id.call(this,g,!0)},add:Vs("add"),set:Vs("set"),delete:Vs("delete"),clear:Vs("clear"),forEach:Cd(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(g=>{e[g]=Ad(g,!1,!1),s[g]=Ad(g,!0,!1),n[g]=Ad(g,!1,!0),u[g]=Ad(g,!0,!0)}),[e,s,n,u]}const[XE,KE,JE,YE]=WE();function Sg(e,n){const s=n?e?YE:JE:e?KE:XE;return(u,h,g)=>h==="__v_isReactive"?!e:h==="__v_isReadonly"?e:h==="__v_raw"?u:Reflect.get(ci(s,h)&&h in u?s:u,h,g)}const QE={get:Sg(!1,!1)},eS={get:Sg(!1,!0)},tS={get:Sg(!0,!1)};const _x=new WeakMap,vx=new WeakMap,xx=new WeakMap,iS=new WeakMap;function rS(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nS(e){return e.__v_skip||!Object.isExtensible(e)?0:rS(TE(e))}function Oo(e){return ac(e)?e:Ig(e,!1,HE,QE,_x)}function Yl(e){return Ig(e,!1,ZE,eS,vx)}function bx(e){return Ig(e,!0,GE,tS,xx)}function Ig(e,n,s,u,h){if(!Fi(e)||e.__v_raw&&!(n&&e.__v_isReactive))return e;const g=h.get(e);if(g)return g;const m=nS(e);if(m===0)return e;const c=new Proxy(e,m===2?u:s);return h.set(e,c),c}function $u(e){return ac(e)?$u(e.__v_raw):!!(e&&e.__v_isReactive)}function ac(e){return!!(e&&e.__v_isReadonly)}function Qd(e){return!!(e&&e.__v_isShallow)}function wx(e){return e?!!e.__v_raw:!1}function Ft(e){const n=e&&e.__v_raw;return n?Ft(n):e}function oS(e){return Object.isExtensible(e)&&rx(e,"__v_skip",!0),e}const Qu=e=>Fi(e)?Oo(e):e,Tg=e=>Fi(e)?bx(e):e;class Ex{constructor(n,s,u,h){this.getter=n,this._setter=s,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new xg(()=>n(this._value),()=>Uu(this,this.effect._dirtyLevel===3?3:4)),this.effect.computed=this,this.effect.active=this._cacheable=!h,this.__v_isReadonly=u}get value(){const n=Ft(this);return(!n._cacheable||n.effect.dirty)&&Ys(n._value,n._value=n.effect.run())&&Uu(n,5),Sx(n),n.effect._dirtyLevel>=2&&Uu(n,3),n._value}set value(n){this._setter(n)}get _dirty(){return this.effect.dirty}set _dirty(n){this.effect.dirty=n}}function sS(e,n,s=!1){let u,h;const g=Ut(e);return g?(u=e,h=Xn):(u=e.get,h=e.set),new Ex(u,h,g||!h,s)}function Sx(e){var n;Ks&&$a&&(e=Ft(e),dx($a,(n=e.dep)!=null?n:e.dep=px(()=>e.dep=void 0,e instanceof Ex?e:void 0)))}function Uu(e,n=5,s,u){e=Ft(e);const h=e.dep;h&&fx(h,n)}function gr(e){return!!(e&&e.__v_isRef===!0)}function Lt(e){return Ix(e,!1)}function lc(e){return Ix(e,!0)}function Ix(e,n){return gr(e)?e:new aS(e,n)}class aS{constructor(n,s){this.__v_isShallow=s,this.dep=void 0,this.__v_isRef=!0,this._rawValue=s?n:Ft(n),this._value=s?n:Qu(n)}get value(){return Sx(this),this._value}set value(n){const s=this.__v_isShallow||Qd(n)||ac(n);n=s?n:Ft(n),Ys(n,this._rawValue)&&(this._rawValue,this._rawValue=n,this._value=s?n:Qu(n),Uu(this,5))}}function u0(e){Uu(e,5)}function ii(e){return gr(e)?e.value:e}function im(e){return Ut(e)?e():ii(e)}const lS={get:(e,n,s)=>ii(Reflect.get(e,n,s)),set:(e,n,s,u)=>{const h=e[n];return gr(h)&&!gr(s)?(h.value=s,!0):Reflect.set(e,n,s,u)}};function Tx(e){return $u(e)?e:new Proxy(e,lS)}class cS{constructor(n,s,u){this._object=n,this._key=s,this._defaultValue=u,this.__v_isRef=!0}get value(){const n=this._object[this._key];return n===void 0?this._defaultValue:n}set value(n){this._object[this._key]=n}get dep(){return NE(Ft(this._object),this._key)}}class uS{constructor(n){this._getter=n,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function zo(e,n,s){return gr(e)?e:Ut(e)?new uS(e):Fi(e)&&arguments.length>1?hS(e,n,s):Lt(e)}function hS(e,n,s){const u=e[n];return gr(u)?u:new cS(e,n,s)}/** +**/let zn;class lx{constructor(n=!1){this.detached=n,this._active=!0,this.effects=[],this.cleanups=[],this.parent=zn,!n&&zn&&(this.index=(zn.scopes||(zn.scopes=[])).push(this)-1)}get active(){return this._active}run(n){if(this._active){const s=zn;try{return zn=this,n()}finally{zn=s}}}on(){zn=this}off(){zn=this.parent}stop(n){if(this._active){let s,u;for(s=0,u=this.effects.length;s=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),ea()}return this._dirtyLevel>=5}set dirty(n){this._dirtyLevel=n?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let n=Ks,s=$a;try{return Ks=!0,$a=this,this._runnings++,r0(this),this.fn()}finally{n0(this),this._runnings--,$a=s,Ks=n}}stop(){this.active&&(r0(this),n0(this),this.onStop&&this.onStop(),this.active=!1)}}function VE(e){return e.value}function r0(e){e._trackId++,e._depsLength=0}function n0(e){if(e.deps.length>e._depsLength){for(let n=e._depsLength;n0){u._dirtyLevel=2;continue}let h;u._dirtyLevel{const s=new Map;return s.cleanup=e,s.computed=n,s},Yd=new WeakMap,Ua=Symbol(""),Tm=Symbol("");function En(e,n,s){if(Ks&&$a){let u=Yd.get(e);u||Yd.set(e,u=new Map);let h=u.get(s);h||u.set(s,h=px(()=>u.delete(s))),dx($a,h)}}function us(e,n,s,u,h,g){const m=Yd.get(e);if(!m)return;let c=[];if(n==="clear")c=[...m.values()];else if(s==="length"&&jt(e)){const I=Number(u);m.forEach((k,M)=>{(M==="length"||!Ka(M)&&M>=I)&&c.push(k)})}else switch(s!==void 0&&c.push(m.get(s)),n){case"add":jt(e)?vg(s)&&c.push(m.get("length")):(c.push(m.get(Ua)),ec(e)&&c.push(m.get(Tm)));break;case"delete":jt(e)||(c.push(m.get(Ua)),ec(e)&&c.push(m.get(Tm)));break;case"set":ec(e)&&c.push(m.get(Ua));break}bg();for(const I of c)I&&fx(I,5);wg()}function NE(e,n){const s=Yd.get(e);return s&&s.get(n)}const jE=mg("__proto__,__v_isRef,__isVue"),mx=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ka)),o0=$E();function $E(){const e={};return["includes","indexOf","lastIndexOf"].forEach(n=>{e[n]=function(...s){const u=Ft(this);for(let g=0,m=this.length;g{e[n]=function(...s){Qs(),bg();const u=Ft(this)[n].apply(this,s);return wg(),ea(),u}}),e}function UE(e){Ka(e)||(e=String(e));const n=Ft(this);return En(n,"has",e),n.hasOwnProperty(e)}class gx{constructor(n=!1,s=!1){this._isReadonly=n,this._isShallow=s}get(n,s,u){const h=this._isReadonly,g=this._isShallow;if(s==="__v_isReactive")return!h;if(s==="__v_isReadonly")return h;if(s==="__v_isShallow")return g;if(s==="__v_raw")return u===(h?g?iS:xx:g?vx:_x).get(n)||Object.getPrototypeOf(n)===Object.getPrototypeOf(u)?n:void 0;const m=jt(n);if(!h){if(m&&ci(o0,s))return Reflect.get(o0,s,u);if(s==="hasOwnProperty")return UE}const c=Reflect.get(n,s,u);return(Ka(s)?mx.has(s):jE(s))||(h||En(n,"get",s),g)?c:yr(c)?m&&vg(s)?c:c.value:Fi(c)?h?bx(c):Oo(c):c}}class yx extends gx{constructor(n=!1){super(!1,n)}set(n,s,u,h){let g=n[s];if(!this._isShallow){const I=ac(g);if(!Qd(u)&&!ac(u)&&(g=Ft(g),u=Ft(u)),!jt(n)&&yr(g)&&!yr(u))return I?!1:(g.value=u,!0)}const m=jt(n)&&vg(s)?Number(s)e,If=e=>Reflect.getPrototypeOf(e);function Sd(e,n,s=!1,u=!1){e=e.__v_raw;const h=Ft(e),g=Ft(n);s||(Ys(n,g)&&En(h,"get",n),En(h,"get",g));const{has:m}=If(h),c=u?Eg:s?Tg:Qu;if(m.call(h,n))return c(e.get(n));if(m.call(h,g))return c(e.get(g));e!==h&&e.get(n)}function Id(e,n=!1){const s=this.__v_raw,u=Ft(s),h=Ft(e);return n||(Ys(e,h)&&En(u,"has",e),En(u,"has",h)),e===h?s.has(e):s.has(e)||s.has(h)}function Td(e,n=!1){return e=e.__v_raw,!n&&En(Ft(e),"iterate",Ua),Reflect.get(e,"size",e)}function s0(e){e=Ft(e);const n=Ft(this);return If(n).has.call(n,e)||(n.add(e),us(n,"add",e,e)),this}function a0(e,n){n=Ft(n);const s=Ft(this),{has:u,get:h}=If(s);let g=u.call(s,e);g||(e=Ft(e),g=u.call(s,e));const m=h.call(s,e);return s.set(e,n),g?Ys(n,m)&&us(s,"set",e,n):us(s,"add",e,n),this}function l0(e){const n=Ft(this),{has:s,get:u}=If(n);let h=s.call(n,e);h||(e=Ft(e),h=s.call(n,e)),u&&u.call(n,e);const g=n.delete(e);return h&&us(n,"delete",e,void 0),g}function c0(){const e=Ft(this),n=e.size!==0,s=e.clear();return n&&us(e,"clear",void 0,void 0),s}function Cd(e,n){return function(u,h){const g=this,m=g.__v_raw,c=Ft(m),I=n?Eg:e?Tg:Qu;return!e&&En(c,"iterate",Ua),m.forEach((k,M)=>u.call(h,I(k),I(M),g))}}function Ad(e,n,s){return function(...u){const h=this.__v_raw,g=Ft(h),m=ec(g),c=e==="entries"||e===Symbol.iterator&&m,I=e==="keys"&&m,k=h[e](...u),M=s?Eg:n?Tg:Qu;return!n&&En(g,"iterate",I?Tm:Ua),{next(){const{value:A,done:z}=k.next();return z?{value:A,done:z}:{value:c?[M(A[0]),M(A[1])]:M(A),done:z}},[Symbol.iterator](){return this}}}}function Vs(e){return function(...n){return e==="delete"?!1:e==="clear"?void 0:this}}function ZE(){const e={get(g){return Sd(this,g)},get size(){return Td(this)},has:Id,add:s0,set:a0,delete:l0,clear:c0,forEach:Cd(!1,!1)},n={get(g){return Sd(this,g,!1,!0)},get size(){return Td(this)},has:Id,add:s0,set:a0,delete:l0,clear:c0,forEach:Cd(!1,!0)},s={get(g){return Sd(this,g,!0)},get size(){return Td(this,!0)},has(g){return Id.call(this,g,!0)},add:Vs("add"),set:Vs("set"),delete:Vs("delete"),clear:Vs("clear"),forEach:Cd(!0,!1)},u={get(g){return Sd(this,g,!0,!0)},get size(){return Td(this,!0)},has(g){return Id.call(this,g,!0)},add:Vs("add"),set:Vs("set"),delete:Vs("delete"),clear:Vs("clear"),forEach:Cd(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(g=>{e[g]=Ad(g,!1,!1),s[g]=Ad(g,!0,!1),n[g]=Ad(g,!1,!0),u[g]=Ad(g,!0,!0)}),[e,s,n,u]}const[XE,KE,JE,YE]=ZE();function Sg(e,n){const s=n?e?YE:JE:e?KE:XE;return(u,h,g)=>h==="__v_isReactive"?!e:h==="__v_isReadonly"?e:h==="__v_raw"?u:Reflect.get(ci(s,h)&&h in u?s:u,h,g)}const QE={get:Sg(!1,!1)},eS={get:Sg(!1,!0)},tS={get:Sg(!0,!1)};const _x=new WeakMap,vx=new WeakMap,xx=new WeakMap,iS=new WeakMap;function rS(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nS(e){return e.__v_skip||!Object.isExtensible(e)?0:rS(TE(e))}function Oo(e){return ac(e)?e:Ig(e,!1,HE,QE,_x)}function Yl(e){return Ig(e,!1,WE,eS,vx)}function bx(e){return Ig(e,!0,GE,tS,xx)}function Ig(e,n,s,u,h){if(!Fi(e)||e.__v_raw&&!(n&&e.__v_isReactive))return e;const g=h.get(e);if(g)return g;const m=nS(e);if(m===0)return e;const c=new Proxy(e,m===2?u:s);return h.set(e,c),c}function $u(e){return ac(e)?$u(e.__v_raw):!!(e&&e.__v_isReactive)}function ac(e){return!!(e&&e.__v_isReadonly)}function Qd(e){return!!(e&&e.__v_isShallow)}function wx(e){return e?!!e.__v_raw:!1}function Ft(e){const n=e&&e.__v_raw;return n?Ft(n):e}function oS(e){return Object.isExtensible(e)&&rx(e,"__v_skip",!0),e}const Qu=e=>Fi(e)?Oo(e):e,Tg=e=>Fi(e)?bx(e):e;class Ex{constructor(n,s,u,h){this.getter=n,this._setter=s,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new xg(()=>n(this._value),()=>Uu(this,this.effect._dirtyLevel===3?3:4)),this.effect.computed=this,this.effect.active=this._cacheable=!h,this.__v_isReadonly=u}get value(){const n=Ft(this);return(!n._cacheable||n.effect.dirty)&&Ys(n._value,n._value=n.effect.run())&&Uu(n,5),Sx(n),n.effect._dirtyLevel>=2&&Uu(n,3),n._value}set value(n){this._setter(n)}get _dirty(){return this.effect.dirty}set _dirty(n){this.effect.dirty=n}}function sS(e,n,s=!1){let u,h;const g=Ut(e);return g?(u=e,h=Xn):(u=e.get,h=e.set),new Ex(u,h,g||!h,s)}function Sx(e){var n;Ks&&$a&&(e=Ft(e),dx($a,(n=e.dep)!=null?n:e.dep=px(()=>e.dep=void 0,e instanceof Ex?e:void 0)))}function Uu(e,n=5,s,u){e=Ft(e);const h=e.dep;h&&fx(h,n)}function yr(e){return!!(e&&e.__v_isRef===!0)}function Lt(e){return Ix(e,!1)}function lc(e){return Ix(e,!0)}function Ix(e,n){return yr(e)?e:new aS(e,n)}class aS{constructor(n,s){this.__v_isShallow=s,this.dep=void 0,this.__v_isRef=!0,this._rawValue=s?n:Ft(n),this._value=s?n:Qu(n)}get value(){return Sx(this),this._value}set value(n){const s=this.__v_isShallow||Qd(n)||ac(n);n=s?n:Ft(n),Ys(n,this._rawValue)&&(this._rawValue,this._rawValue=n,this._value=s?n:Qu(n),Uu(this,5))}}function u0(e){Uu(e,5)}function ii(e){return yr(e)?e.value:e}function im(e){return Ut(e)?e():ii(e)}const lS={get:(e,n,s)=>ii(Reflect.get(e,n,s)),set:(e,n,s,u)=>{const h=e[n];return yr(h)&&!yr(s)?(h.value=s,!0):Reflect.set(e,n,s,u)}};function Tx(e){return $u(e)?e:new Proxy(e,lS)}class cS{constructor(n,s,u){this._object=n,this._key=s,this._defaultValue=u,this.__v_isRef=!0}get value(){const n=this._object[this._key];return n===void 0?this._defaultValue:n}set value(n){this._object[this._key]=n}get dep(){return NE(Ft(this._object),this._key)}}class uS{constructor(n){this._getter=n,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function zo(e,n,s){return yr(e)?e:Ut(e)?new uS(e):Fi(e)&&arguments.length>1?hS(e,n,s):Lt(e)}function hS(e,n,s){const u=e[n];return yr(u)?u:new cS(e,n,s)}/** * @vue/runtime-core v3.4.29 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Js(e,n,s,u){try{return u?e(...u):e()}catch(h){vc(h,n,s)}}function Jn(e,n,s,u){if(Ut(e)){const h=Js(e,n,s,u);return h&&_g(h)&&h.catch(g=>{vc(g,n,s)}),h}if(jt(e)){const h=[];for(let g=0;g>>1,h=on[u],g=th(h);gLo&&on.splice(n,1)}function Am(e){jt(e)?ic.push(...e):(!Gs||!Gs.includes(e,e.allowRecurse?Va+1:Va))&&ic.push(e),Ax()}function h0(e,n,s=eh?Lo+1:0){for(;sth(s)-th(u));if(ic.length=0,Gs){Gs.push(...n);return}for(Gs=n,Va=0;Vae.id==null?1/0:e.id,mS=(e,n)=>{const s=th(e)-th(n);if(s===0){if(e.pre&&!n.pre)return-1;if(n.pre&&!e.pre)return 1}return s};function Mx(e){Cm=!1,eh=!0,on.sort(mS);try{for(Lo=0;Loir(q)?q.trim():q)),A&&(h=s.map(ME))}let c,I=u[c=Qp(n)]||u[c=Qp(Ro(n))];!I&&g&&(I=u[c=Qp(_c(n))]),I&&Jn(I,e,6,h);const k=u[c+"Once"];if(k){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Jn(k,e,6,h)}}function kx(e,n,s=!1){const u=n.emitsCache,h=u.get(e);if(h!==void 0)return h;const g=e.emits;let m={},c=!1;if(!Ut(e)){const I=k=>{const M=kx(k,n,!0);M&&(c=!0,mr(m,M))};!s&&n.mixins.length&&n.mixins.forEach(I),e.extends&&I(e.extends),e.mixins&&e.mixins.forEach(I)}return!g&&!c?(Fi(e)&&u.set(e,null),null):(jt(g)?g.forEach(I=>m[I]=null):mr(m,g),Fi(e)&&u.set(e,m),m)}function Cf(e,n){return!e||!lh(n)?!1:(n=n.slice(2).replace(/Once$/,""),ci(e,n[0].toLowerCase()+n.slice(1))||ci(e,_c(n))||ci(e,n))}let Er=null,Af=null;function tf(e){const n=Er;return Er=e,Af=e&&e.type.__scopeId||null,n}function Lx(e){Af=e}function Px(){Af=null}function Rr(e,n=Er,s){if(!n||e._n)return e;const u=(...h)=>{u._d&&T0(-1);const g=tf(n);let m;try{m=e(...h)}finally{tf(g),u._d&&T0(1)}return m};return u._n=!0,u._c=!0,u._d=!0,u}function rm(e){const{type:n,vnode:s,proxy:u,withProxy:h,propsOptions:[g],slots:m,attrs:c,emit:I,render:k,renderCache:M,props:A,data:z,setupState:q,ctx:K,inheritAttrs:J}=e,se=tf(e);let ke,ye;try{if(s.shapeFlag&4){const fe=h||u,Z=fe;ke=Wn(k.call(Z,fe,M,A,q,z,K)),ye=c}else{const fe=n;ke=Wn(fe.length>1?fe(A,{attrs:c,slots:m,emit:I}):fe(A,null)),ye=n.props?c:_S(c)}}catch(fe){Gu.length=0,vc(fe,e,1),ke=ri(Ur)}let W=ke;if(ye&&J!==!1){const fe=Object.keys(ye),{shapeFlag:Z}=W;fe.length&&Z&7&&(g&&fe.some(gg)&&(ye=vS(ye,g)),W=Bo(W,ye,!1,!0))}return s.dirs&&(W=Bo(W,null,!1,!0),W.dirs=W.dirs?W.dirs.concat(s.dirs):s.dirs),s.transition&&(W.transition=s.transition),ke=W,tf(se),ke}function yS(e,n=!0){let s;for(let u=0;u{let n;for(const s in e)(s==="class"||s==="style"||lh(s))&&((n||(n={}))[s]=e[s]);return n},vS=(e,n)=>{const s={};for(const u in e)(!gg(u)||!(u.slice(9)in n))&&(s[u]=e[u]);return s};function xS(e,n,s){const{props:u,children:h,component:g}=e,{props:m,children:c,patchFlag:I}=n,k=g.emitsOptions;if(n.dirs||n.transition)return!0;if(s&&I>=0){if(I&1024)return!0;if(I&16)return u?d0(u,m,k):!!m;if(I&8){const M=n.dynamicProps;for(let A=0;Ae.__isSuspense;let km=0;const wS={name:"Suspense",__isSuspense:!0,process(e,n,s,u,h,g,m,c,I,k){if(e==null)SS(n,s,u,h,g,m,c,I,k);else{if(g&&g.deps>0&&!e.suspense.isInFallback){n.suspense=e.suspense,n.suspense.vnode=n,n.el=e.el;return}IS(e,n,s,u,h,m,c,I,k)}},hydrate:TS,create:Mg,normalize:CS},ES=wS;function ih(e,n){const s=e.props&&e.props[n];Ut(s)&&s()}function SS(e,n,s,u,h,g,m,c,I){const{p:k,o:{createElement:M}}=I,A=M("div"),z=e.suspense=Mg(e,h,u,n,A,s,g,m,c,I);k(null,z.pendingBranch=e.ssContent,A,null,u,z,g,m),z.deps>0?(ih(e,"onPending"),ih(e,"onFallback"),k(null,e.ssFallback,n,s,u,null,g,m),rc(z,e.ssFallback)):z.resolve(!1,!0)}function IS(e,n,s,u,h,g,m,c,{p:I,um:k,o:{createElement:M}}){const A=n.suspense=e.suspense;A.vnode=n,n.el=e.el;const z=n.ssContent,q=n.ssFallback,{activeBranch:K,pendingBranch:J,isInFallback:se,isHydrating:ke}=A;if(J)A.pendingBranch=z,Po(z,J)?(I(J,z,A.hiddenContainer,null,h,A,g,m,c),A.deps<=0?A.resolve():se&&(ke||(I(K,q,s,u,h,null,g,m,c),rc(A,q)))):(A.pendingId=km++,ke?(A.isHydrating=!1,A.activeBranch=J):k(J,h,A),A.deps=0,A.effects.length=0,A.hiddenContainer=M("div"),se?(I(null,z,A.hiddenContainer,null,h,A,g,m,c),A.deps<=0?A.resolve():(I(K,q,s,u,h,null,g,m,c),rc(A,q))):K&&Po(z,K)?(I(K,z,s,u,h,A,g,m,c),A.resolve(!0)):(I(null,z,A.hiddenContainer,null,h,A,g,m,c),A.deps<=0&&A.resolve()));else if(K&&Po(z,K))I(K,z,s,u,h,A,g,m,c),rc(A,z);else if(ih(n,"onPending"),A.pendingBranch=z,z.shapeFlag&512?A.pendingId=z.component.suspenseId:A.pendingId=km++,I(null,z,A.hiddenContainer,null,h,A,g,m,c),A.deps<=0)A.resolve();else{const{timeout:ye,pendingId:W}=A;ye>0?setTimeout(()=>{A.pendingId===W&&A.fallback(q)},ye):ye===0&&A.fallback(q)}}function Mg(e,n,s,u,h,g,m,c,I,k,M=!1){const{p:A,m:z,um:q,n:K,o:{parentNode:J,remove:se}}=k;let ke;const ye=AS(e);ye&&n&&n.pendingBranch&&(ke=n.pendingId,n.deps++);const W=e.props?nx(e.props.timeout):void 0,fe=g,Z={vnode:e,parent:n,parentComponent:s,namespace:m,container:u,hiddenContainer:h,deps:0,pendingId:km++,timeout:typeof W=="number"?W:-1,activeBranch:null,pendingBranch:null,isInFallback:!M,isHydrating:M,isUnmounted:!1,effects:[],resolve(ee=!1,Se=!1){const{vnode:Ee,activeBranch:Le,pendingBranch:pe,pendingId:Ie,effects:Ae,parentComponent:De,container:Ge}=Z;let rt=!1;Z.isHydrating?Z.isHydrating=!1:ee||(rt=Le&&pe.transition&&pe.transition.mode==="out-in",rt&&(Le.transition.afterLeave=()=>{Ie===Z.pendingId&&(z(pe,Ge,g===fe?K(Le):g,0),Am(Ae))}),Le&&(J(Le.el)!==Z.hiddenContainer&&(g=K(Le)),q(Le,De,Z,!0)),rt||z(pe,Ge,g,0)),rc(Z,pe),Z.pendingBranch=null,Z.isInFallback=!1;let Xe=Z.parent,dt=!1;for(;Xe;){if(Xe.pendingBranch){Xe.effects.push(...Ae),dt=!0;break}Xe=Xe.parent}!dt&&!rt&&Am(Ae),Z.effects=[],ye&&n&&n.pendingBranch&&ke===n.pendingId&&(n.deps--,n.deps===0&&!Se&&n.resolve()),ih(Ee,"onResolve")},fallback(ee){if(!Z.pendingBranch)return;const{vnode:Se,activeBranch:Ee,parentComponent:Le,container:pe,namespace:Ie}=Z;ih(Se,"onFallback");const Ae=K(Ee),De=()=>{Z.isInFallback&&(A(null,ee,pe,Ae,Le,null,Ie,c,I),rc(Z,ee))},Ge=ee.transition&&ee.transition.mode==="out-in";Ge&&(Ee.transition.afterLeave=De),Z.isInFallback=!0,q(Ee,Le,null,!0),Ge||De()},move(ee,Se,Ee){Z.activeBranch&&z(Z.activeBranch,ee,Se,Ee),Z.container=ee},next(){return Z.activeBranch&&K(Z.activeBranch)},registerDep(ee,Se,Ee){const Le=!!Z.pendingBranch;Le&&Z.deps++;const pe=ee.vnode.el;ee.asyncDep.catch(Ie=>{vc(Ie,ee,0)}).then(Ie=>{if(ee.isUnmounted||Z.isUnmounted||Z.pendingId!==ee.suspenseId)return;ee.asyncResolved=!0;const{vnode:Ae}=ee;Fm(ee,Ie,!1),pe&&(Ae.el=pe);const De=!pe&&ee.subTree.el;Se(ee,Ae,J(pe||ee.subTree.el),pe?null:K(ee.subTree),Z,m,Ee),De&&se(De),Ag(ee,Ae.el),Le&&--Z.deps===0&&Z.resolve()})},unmount(ee,Se){Z.isUnmounted=!0,Z.activeBranch&&q(Z.activeBranch,s,ee,Se),Z.pendingBranch&&q(Z.pendingBranch,s,ee,Se)}};return Z}function TS(e,n,s,u,h,g,m,c,I){const k=n.suspense=Mg(n,u,s,e.parentNode,document.createElement("div"),null,h,g,m,c,!0),M=I(e,k.pendingBranch=n.ssContent,s,k,g,m);return k.deps===0&&k.resolve(!1,!0),M}function CS(e){const{shapeFlag:n,children:s}=e,u=n&32;e.ssContent=p0(u?s.default:s),e.ssFallback=u?p0(s.fallback):ri(Ur)}function p0(e){let n;if(Ut(e)){const s=uc&&e._c;s&&(e._d=!1,At()),e=e(),s&&(e._d=!0,n=Kn,lb())}return jt(e)&&(e=yS(e)),e=Wn(e),n&&!e.dynamicChildren&&(e.dynamicChildren=n.filter(s=>s!==e)),e}function Ox(e,n){n&&n.pendingBranch?jt(e)?n.effects.push(...e):n.effects.push(e):Am(e)}function rc(e,n){e.activeBranch=n;const{vnode:s,parentComponent:u}=e;let h=n.el;for(;!h&&n.component;)n=n.component.subTree,h=n.el;s.el=h,u&&u.subTree===s&&(u.vnode.el=h,Ag(u,h))}function AS(e){const n=e.props&&e.props.suspensible;return n!=null&&n!==!1}function Mf(e,n,s=br,u=!1){if(s){const h=s[e]||(s[e]=[]),g=n.__weh||(n.__weh=(...m)=>{Qs();const c=Ga(s),I=Jn(n,s,e,m);return c(),ea(),I});return u?h.unshift(g):h.push(g),g}}const ps=e=>(n,s=br)=>{(!uh||e==="sp")&&Mf(e,(...u)=>n(...u),s)},MS=ps("bm"),an=ps("m"),kS=ps("bu"),LS=ps("u"),kf=ps("bum"),Ja=ps("um"),PS=ps("sp"),zS=ps("rtg"),DS=ps("rtc");function Bx(e,n=br){Mf("ec",e,n)}function RS(e,n){if(Er===null)return e;const s=Pf(Er),u=e.dirs||(e.dirs=[]);for(let h=0;hn(m,c,void 0,g));else{const m=Object.keys(e);h=new Array(m.length);for(let c=0,I=m.length;c!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function rf(e){Ut(e)&&(e={loader:e});const{loader:n,loadingComponent:s,errorComponent:u,delay:h=200,timeout:g,suspensible:m=!0,onError:c}=e;let I=null,k,M=0;const A=()=>(M++,I=null,z()),z=()=>{let q;return I||(q=I=n().catch(K=>{if(K=K instanceof Error?K:new Error(String(K)),c)return new Promise((J,se)=>{c(K,()=>J(A()),()=>se(K),M+1)});throw K}).then(K=>q!==I&&I?I:(K&&(K.__esModule||K[Symbol.toStringTag]==="Module")&&(K=K.default),k=K,K)))};return Ui({name:"AsyncComponentWrapper",__asyncLoader:z,get __asyncResolved(){return k},setup(){const q=br;if(k)return()=>nm(k,q);const K=ye=>{I=null,vc(ye,q,13,!u)};if(m&&q.suspense||uh)return z().then(ye=>()=>nm(ye,q)).catch(ye=>(K(ye),()=>u?ri(u,{error:ye}):null));const J=Lt(!1),se=Lt(),ke=Lt(!!h);return h&&setTimeout(()=>{ke.value=!1},h),g!=null&&setTimeout(()=>{if(!J.value&&!se.value){const ye=new Error(`Async component timed out after ${g}ms.`);K(ye),se.value=ye}},g),z().then(()=>{J.value=!0,q.parent&&ch(q.parent.vnode)&&(q.parent.effect.dirty=!0,Tf(q.parent.update))}).catch(ye=>{K(ye),se.value=ye}),()=>{if(J.value&&k)return nm(k,q);if(se.value&&u)return ri(u,{error:se.value});if(s&&!ke.value)return ri(s)}}})}function nm(e,n){const{ref:s,props:u,children:h,ce:g}=n.vnode,m=ri(e,u,h);return m.ref=s,m.ce=g,delete n.vnode.ce,m}function vr(e,n,s={},u,h){if(Er.isCE||Er.parent&&nc(Er.parent)&&Er.parent.isCE)return n!=="default"&&(s.name=n),ri("slot",s,u&&u());let g=e[n];g&&g._c&&(g._d=!1),At();const m=g&&Fx(g(s)),c=ki(xr,{key:s.key||m&&m.key||`_${n}`},m||(u?u():[]),m&&e._===1?64:-2);return!h&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),g&&g._c&&(g._d=!0),c}function Fx(e){return e.some(n=>rh(n)?!(n.type===Ur||n.type===xr&&!Fx(n.children)):!0)?e:null}const Lm=e=>e?hb(e)?Pf(e):Lm(e.parent):null,qu=mr(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Lm(e.parent),$root:e=>Lm(e.root),$emit:e=>e.emit,$options:e=>kg(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Tf(e.update)}),$nextTick:e=>e.n||(e.n=$r.bind(e.proxy)),$watch:e=>lI.bind(e)}),om=(e,n)=>e!==$i&&!e.__isScriptSetup&&ci(e,n),BS={get({_:e},n){if(n==="__v_skip")return!0;const{ctx:s,setupState:u,data:h,props:g,accessCache:m,type:c,appContext:I}=e;let k;if(n[0]!=="$"){const q=m[n];if(q!==void 0)switch(q){case 1:return u[n];case 2:return h[n];case 4:return s[n];case 3:return g[n]}else{if(om(u,n))return m[n]=1,u[n];if(h!==$i&&ci(h,n))return m[n]=2,h[n];if((k=e.propsOptions[0])&&ci(k,n))return m[n]=3,g[n];if(s!==$i&&ci(s,n))return m[n]=4,s[n];Pm&&(m[n]=0)}}const M=qu[n];let A,z;if(M)return n==="$attrs"&&En(e.attrs,"get",""),M(e);if((A=c.__cssModules)&&(A=A[n]))return A;if(s!==$i&&ci(s,n))return m[n]=4,s[n];if(z=I.config.globalProperties,ci(z,n))return z[n]},set({_:e},n,s){const{data:u,setupState:h,ctx:g}=e;return om(h,n)?(h[n]=s,!0):u!==$i&&ci(u,n)?(u[n]=s,!0):ci(e.props,n)||n[0]==="$"&&n.slice(1)in e?!1:(g[n]=s,!0)},has({_:{data:e,setupState:n,accessCache:s,ctx:u,appContext:h,propsOptions:g}},m){let c;return!!s[m]||e!==$i&&ci(e,m)||om(n,m)||(c=g[0])&&ci(c,m)||ci(u,m)||ci(qu,m)||ci(h.config.globalProperties,m)},defineProperty(e,n,s){return s.get!=null?e._.accessCache[n]=0:ci(s,"value")&&this.set(e,n,s.value,null),Reflect.defineProperty(e,n,s)}};function FS(){return VS().attrs}function VS(){const e=ia();return e.setupContext||(e.setupContext=fb(e))}function m0(e){return jt(e)?e.reduce((n,s)=>(n[s]=null,n),{}):e}function NS(e){const n=ia();let s=e();return Bm(),_g(s)&&(s=s.catch(u=>{throw Ga(n),u})),[s,()=>Ga(n)]}let Pm=!0;function jS(e){const n=kg(e),s=e.proxy,u=e.ctx;Pm=!1,n.beforeCreate&&g0(n.beforeCreate,e,"bc");const{data:h,computed:g,methods:m,watch:c,provide:I,inject:k,created:M,beforeMount:A,mounted:z,beforeUpdate:q,updated:K,activated:J,deactivated:se,beforeDestroy:ke,beforeUnmount:ye,destroyed:W,unmounted:fe,render:Z,renderTracked:ee,renderTriggered:Se,errorCaptured:Ee,serverPrefetch:Le,expose:pe,inheritAttrs:Ie,components:Ae,directives:De,filters:Ge}=n;if(k&&$S(k,u,null),m)for(const dt in m){const nt=m[dt];Ut(nt)&&(u[dt]=nt.bind(s))}if(h){const dt=h.call(s,s);Fi(dt)&&(e.data=Oo(dt))}if(Pm=!0,g)for(const dt in g){const nt=g[dt],ei=Ut(nt)?nt.bind(s,s):Ut(nt.get)?nt.get.bind(s,s):Xn,$t=!Ut(nt)&&Ut(nt.set)?nt.set.bind(s):Xn,Vt=je({get:ei,set:$t});Object.defineProperty(u,dt,{enumerable:!0,configurable:!0,get:()=>Vt.value,set:Nt=>Vt.value=Nt})}if(c)for(const dt in c)Vx(c[dt],u,s,dt);if(I){const dt=Ut(I)?I.call(s):I;Reflect.ownKeys(dt).forEach(nt=>{ta(nt,dt[nt])})}M&&g0(M,e,"c");function Xe(dt,nt){jt(nt)?nt.forEach(ei=>dt(ei.bind(s))):nt&&dt(nt.bind(s))}if(Xe(MS,A),Xe(an,z),Xe(kS,q),Xe(LS,K),Xe(tb,J),Xe(ib,se),Xe(Bx,Ee),Xe(DS,ee),Xe(zS,Se),Xe(kf,ye),Xe(Ja,fe),Xe(PS,Le),jt(pe))if(pe.length){const dt=e.exposed||(e.exposed={});pe.forEach(nt=>{Object.defineProperty(dt,nt,{get:()=>s[nt],set:ei=>s[nt]=ei})})}else e.exposed||(e.exposed={});Z&&e.render===Xn&&(e.render=Z),Ie!=null&&(e.inheritAttrs=Ie),Ae&&(e.components=Ae),De&&(e.directives=De)}function $S(e,n,s=Xn){jt(e)&&(e=zm(e));for(const u in e){const h=e[u];let g;Fi(h)?"default"in h?g=Hr(h.from||u,h.default,!0):g=Hr(h.from||u):g=Hr(h),gr(g)?Object.defineProperty(n,u,{enumerable:!0,configurable:!0,get:()=>g.value,set:m=>g.value=m}):n[u]=g}}function g0(e,n,s){Jn(jt(e)?e.map(u=>u.bind(n.proxy)):e.bind(n.proxy),n,s)}function Vx(e,n,s,u){const h=u.includes(".")?eb(s,u):()=>s[u];if(ir(e)){const g=n[e];Ut(g)&&Ji(h,g)}else if(Ut(e))Ji(h,e.bind(s));else if(Fi(e))if(jt(e))e.forEach(g=>Vx(g,n,s,u));else{const g=Ut(e.handler)?e.handler.bind(s):n[e.handler];Ut(g)&&Ji(h,g,e)}}function kg(e){const n=e.type,{mixins:s,extends:u}=n,{mixins:h,optionsCache:g,config:{optionMergeStrategies:m}}=e.appContext,c=g.get(n);let I;return c?I=c:!h.length&&!s&&!u?I=n:(I={},h.length&&h.forEach(k=>nf(I,k,m,!0)),nf(I,n,m)),Fi(n)&&g.set(n,I),I}function nf(e,n,s,u=!1){const{mixins:h,extends:g}=n;g&&nf(e,g,s,!0),h&&h.forEach(m=>nf(e,m,s,!0));for(const m in n)if(!(u&&m==="expose")){const c=US[m]||s&&s[m];e[m]=c?c(e[m],n[m]):n[m]}return e}const US={data:y0,props:_0,emits:_0,methods:ju,computed:ju,beforeCreate:gn,created:gn,beforeMount:gn,mounted:gn,beforeUpdate:gn,updated:gn,beforeDestroy:gn,beforeUnmount:gn,destroyed:gn,unmounted:gn,activated:gn,deactivated:gn,errorCaptured:gn,serverPrefetch:gn,components:ju,directives:ju,watch:HS,provide:y0,inject:qS};function y0(e,n){return n?e?function(){return mr(Ut(e)?e.call(this,this):e,Ut(n)?n.call(this,this):n)}:n:e}function qS(e,n){return ju(zm(e),zm(n))}function zm(e){if(jt(e)){const n={};for(let s=0;s1)return s&&Ut(n)?n.call(u&&u.proxy):n}}function jx(){return!!(br||Er||oc)}const $x={},Ux=()=>Object.create($x),qx=e=>Object.getPrototypeOf(e)===$x;function WS(e,n,s,u=!1){const h={},g=Ux();e.propsDefaults=Object.create(null),Hx(e,n,h,g);for(const m in e.propsOptions[0])m in h||(h[m]=void 0);s?e.props=u?h:Yl(h):e.type.props?e.props=h:e.props=g,e.attrs=g}function XS(e,n,s,u){const{props:h,attrs:g,vnode:{patchFlag:m}}=e,c=Ft(h),[I]=e.propsOptions;let k=!1;if((u||m>0)&&!(m&16)){if(m&8){const M=e.vnode.dynamicProps;for(let A=0;A{I=!0;const[z,q]=Gx(A,n,!0);mr(m,z),q&&c.push(...q)};!s&&n.mixins.length&&n.mixins.forEach(M),e.extends&&M(e.extends),e.mixins&&e.mixins.forEach(M)}if(!g&&!I)return Fi(e)&&u.set(e,Ql),Ql;if(jt(g))for(let M=0;M-1,q[1]=J<0||K-1||ci(q,"default"))&&c.push(A)}}}const k=[m,c];return Fi(e)&&u.set(e,k),k}function v0(e){return e[0]!=="$"&&!tc(e)}function x0(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function b0(e,n){return x0(e)===x0(n)}function w0(e,n){return jt(n)?n.findIndex(s=>b0(s,e)):Ut(n)&&b0(n,e)?0:-1}const Zx=e=>e[0]==="_"||e==="$stable",Lg=e=>jt(e)?e.map(Wn):[Wn(e)],KS=(e,n,s)=>{if(n._n)return n;const u=Rr((...h)=>Lg(n(...h)),s);return u._c=!1,u},Wx=(e,n,s)=>{const u=e._ctx;for(const h in e){if(Zx(h))continue;const g=e[h];if(Ut(g))n[h]=KS(h,g,u);else if(g!=null){const m=Lg(g);n[h]=()=>m}}},Xx=(e,n)=>{const s=Lg(n);e.slots.default=()=>s},JS=(e,n)=>{const s=e.slots=Ux();if(e.vnode.shapeFlag&32){const u=n._;u?(mr(s,n),rx(s,"_",u,!0)):Wx(n,s)}else n&&Xx(e,n)},YS=(e,n,s)=>{const{vnode:u,slots:h}=e;let g=!0,m=$i;if(u.shapeFlag&32){const c=n._;c?s&&c===1?g=!1:(mr(h,n),!s&&c===1&&delete h._):(g=!n.$stable,Wx(n,h)),m=n}else n&&(Xx(e,n),m={default:1});if(g)for(const c in h)!Zx(c)&&m[c]==null&&delete h[c]};function of(e,n,s,u,h=!1){if(jt(e)){e.forEach((z,q)=>of(z,n&&(jt(n)?n[q]:n),s,u,h));return}if(nc(u)&&!h)return;const g=u.shapeFlag&4?Pf(u.component):u.el,m=h?null:g,{i:c,r:I}=e,k=n&&n.r,M=c.refs===$i?c.refs={}:c.refs,A=c.setupState;if(k!=null&&k!==I&&(ir(k)?(M[k]=null,ci(A,k)&&(A[k]=null)):gr(k)&&(k.value=null)),Ut(I))Js(I,c,12,[m,M]);else{const z=ir(I),q=gr(I);if(z||q){const K=()=>{if(e.f){const J=z?ci(A,I)?A[I]:M[I]:I.value;h?jt(J)&&yg(J,g):jt(J)?J.includes(g)||J.push(g):z?(M[I]=[g],ci(A,I)&&(A[I]=M[I])):(I.value=[g],e.k&&(M[e.k]=I.value))}else z?(M[I]=m,ci(A,I)&&(A[I]=m)):q&&(I.value=m,e.k&&(M[e.k]=m))};m?(K.id=-1,wn(K,s)):K()}}}let E0=!1;const Xl=()=>{E0||(console.error("Hydration completed but contains mismatches."),E0=!0)},QS=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",eI=e=>e.namespaceURI.includes("MathML"),Md=e=>{if(QS(e))return"svg";if(eI(e))return"mathml"},kd=e=>e.nodeType===8;function tI(e){const{mt:n,p:s,o:{patchProp:u,createText:h,nextSibling:g,parentNode:m,remove:c,insert:I,createComment:k}}=e,M=(W,fe)=>{if(!fe.hasChildNodes()){s(null,W,fe),ef(),fe._vnode=W;return}A(fe.firstChild,W,null,null,null),ef(),fe._vnode=W},A=(W,fe,Z,ee,Se,Ee=!1)=>{Ee=Ee||!!fe.dynamicChildren;const Le=kd(W)&&W.data==="[",pe=()=>J(W,fe,Z,ee,Se,Le),{type:Ie,ref:Ae,shapeFlag:De,patchFlag:Ge}=fe;let rt=W.nodeType;fe.el=W,Ge===-2&&(Ee=!1,fe.dynamicChildren=null);let Xe=null;switch(Ie){case cc:rt!==3?fe.children===""?(I(fe.el=h(""),m(W),W),Xe=W):Xe=pe():(W.data!==fe.children&&(Xl(),W.data=fe.children),Xe=g(W));break;case Ur:ye(W)?(Xe=g(W),ke(fe.el=W.content.firstChild,W,Z)):rt!==8||Le?Xe=pe():Xe=g(W);break;case Hu:if(Le&&(W=g(W),rt=W.nodeType),rt===1||rt===3){Xe=W;const dt=!fe.children.length;for(let nt=0;nt{Ee=Ee||!!fe.dynamicChildren;const{type:Le,props:pe,patchFlag:Ie,shapeFlag:Ae,dirs:De,transition:Ge}=fe,rt=Le==="input"||Le==="option";if(rt||Ie!==-1){De&&ko(fe,null,Z,"created");let Xe=!1;if(ye(W)){Xe=Jx(ee,Ge)&&Z&&Z.vnode.props&&Z.vnode.props.appear;const nt=W.content.firstChild;Xe&&Ge.beforeEnter(nt),ke(nt,W,Z),fe.el=W=nt}if(Ae&16&&!(pe&&(pe.innerHTML||pe.textContent))){let nt=q(W.firstChild,fe,W,Z,ee,Se,Ee);for(;nt;){Xl();const ei=nt;nt=nt.nextSibling,c(ei)}}else Ae&8&&W.textContent!==fe.children&&(Xl(),W.textContent=fe.children);if(pe)if(rt||!Ee||Ie&48)for(const nt in pe)(rt&&(nt.endsWith("value")||nt==="indeterminate")||lh(nt)&&!tc(nt)||nt[0]===".")&&u(W,nt,null,pe[nt],void 0,void 0,Z);else pe.onClick&&u(W,"onClick",null,pe.onClick,void 0,void 0,Z);let dt;(dt=pe&&pe.onVnodeBeforeMount)&&Zn(dt,Z,fe),De&&ko(fe,null,Z,"beforeMount"),((dt=pe&&pe.onVnodeMounted)||De||Xe)&&Ox(()=>{dt&&Zn(dt,Z,fe),Xe&&Ge.enter(W),De&&ko(fe,null,Z,"mounted")},ee)}return W.nextSibling},q=(W,fe,Z,ee,Se,Ee,Le)=>{Le=Le||!!fe.dynamicChildren;const pe=fe.children,Ie=pe.length;for(let Ae=0;Ae{const{slotScopeIds:Le}=fe;Le&&(Se=Se?Se.concat(Le):Le);const pe=m(W),Ie=q(g(W),fe,pe,Z,ee,Se,Ee);return Ie&&kd(Ie)&&Ie.data==="]"?g(fe.anchor=Ie):(Xl(),I(fe.anchor=k("]"),pe,Ie),Ie)},J=(W,fe,Z,ee,Se,Ee)=>{if(Xl(),fe.el=null,Ee){const Ie=se(W);for(;;){const Ae=g(W);if(Ae&&Ae!==Ie)c(Ae);else break}}const Le=g(W),pe=m(W);return c(W),s(null,fe,pe,Le,Z,ee,Md(pe),Se),Le},se=(W,fe="[",Z="]")=>{let ee=0;for(;W;)if(W=g(W),W&&kd(W)&&(W.data===fe&&ee++,W.data===Z)){if(ee===0)return g(W);ee--}return W},ke=(W,fe,Z)=>{const ee=fe.parentNode;ee&&ee.replaceChild(W,fe);let Se=Z;for(;Se;)Se.vnode.el===fe&&(Se.vnode.el=Se.subTree.el=W),Se=Se.parent},ye=W=>W.nodeType===1&&W.tagName.toLowerCase()==="template";return[M,A]}const wn=Ox;function iI(e){return Kx(e)}function rI(e){return Kx(e,tI)}function Kx(e,n){const s=ox();s.__VUE__=!0;const{insert:u,remove:h,patchProp:g,createElement:m,createText:c,createComment:I,setText:k,setElementText:M,parentNode:A,nextSibling:z,setScopeId:q=Xn,insertStaticContent:K}=e,J=(ce,ge,Be,ae=null,He=null,tt=null,Ze=void 0,$e=null,Qe=!!ge.dynamicChildren)=>{if(ce===ge)return;ce&&!Po(ce,ge)&&(ae=Li(ce),Nt(ce,He,tt,!0),ce=null),ge.patchFlag===-2&&(Qe=!1,ge.dynamicChildren=null);const{type:We,ref:pt,shapeFlag:St}=ge;switch(We){case cc:se(ce,ge,Be,ae);break;case Ur:ke(ce,ge,Be,ae);break;case Hu:ce==null&&ye(ge,Be,ae,Ze);break;case xr:Ae(ce,ge,Be,ae,He,tt,Ze,$e,Qe);break;default:St&1?Z(ce,ge,Be,ae,He,tt,Ze,$e,Qe):St&6?De(ce,ge,Be,ae,He,tt,Ze,$e,Qe):(St&64||St&128)&&We.process(ce,ge,Be,ae,He,tt,Ze,$e,Qe,cr)}pt!=null&&He&&of(pt,ce&&ce.ref,tt,ge||ce,!ge)},se=(ce,ge,Be,ae)=>{if(ce==null)u(ge.el=c(ge.children),Be,ae);else{const He=ge.el=ce.el;ge.children!==ce.children&&k(He,ge.children)}},ke=(ce,ge,Be,ae)=>{ce==null?u(ge.el=I(ge.children||""),Be,ae):ge.el=ce.el},ye=(ce,ge,Be,ae)=>{[ce.el,ce.anchor]=K(ce.children,ge,Be,ae,ce.el,ce.anchor)},W=({el:ce,anchor:ge},Be,ae)=>{let He;for(;ce&&ce!==ge;)He=z(ce),u(ce,Be,ae),ce=He;u(ge,Be,ae)},fe=({el:ce,anchor:ge})=>{let Be;for(;ce&&ce!==ge;)Be=z(ce),h(ce),ce=Be;h(ge)},Z=(ce,ge,Be,ae,He,tt,Ze,$e,Qe)=>{ge.type==="svg"?Ze="svg":ge.type==="math"&&(Ze="mathml"),ce==null?ee(ge,Be,ae,He,tt,Ze,$e,Qe):Le(ce,ge,He,tt,Ze,$e,Qe)},ee=(ce,ge,Be,ae,He,tt,Ze,$e)=>{let Qe,We;const{props:pt,shapeFlag:St,transition:vt,dirs:Mt}=ce;if(Qe=ce.el=m(ce.type,tt,pt&&pt.is,pt),St&8?M(Qe,ce.children):St&16&&Ee(ce.children,Qe,null,ae,He,sm(ce,tt),Ze,$e),Mt&&ko(ce,null,ae,"created"),Se(Qe,ce,ce.scopeId,Ze,ae),pt){for(const Ne in pt)Ne!=="value"&&!tc(Ne)&&g(Qe,Ne,null,pt[Ne],tt,ce.children,ae,He,hi);"value"in pt&&g(Qe,"value",null,pt.value,tt),(We=pt.onVnodeBeforeMount)&&Zn(We,ae,ce)}Mt&&ko(ce,null,ae,"beforeMount");const qt=Jx(He,vt);qt&&vt.beforeEnter(Qe),u(Qe,ge,Be),((We=pt&&pt.onVnodeMounted)||qt||Mt)&&wn(()=>{We&&Zn(We,ae,ce),qt&&vt.enter(Qe),Mt&&ko(ce,null,ae,"mounted")},He)},Se=(ce,ge,Be,ae,He)=>{if(Be&&q(ce,Be),ae)for(let tt=0;tt{for(let We=Qe;We{const $e=ge.el=ce.el;let{patchFlag:Qe,dynamicChildren:We,dirs:pt}=ge;Qe|=ce.patchFlag&16;const St=ce.props||$i,vt=ge.props||$i;let Mt;if(Be&&Da(Be,!1),(Mt=vt.onVnodeBeforeUpdate)&&Zn(Mt,Be,ge,ce),pt&&ko(ge,ce,Be,"beforeUpdate"),Be&&Da(Be,!0),We?pe(ce.dynamicChildren,We,$e,Be,ae,sm(ge,He),tt):Ze||nt(ce,ge,$e,null,Be,ae,sm(ge,He),tt,!1),Qe>0){if(Qe&16)Ie($e,ge,St,vt,Be,ae,He);else if(Qe&2&&St.class!==vt.class&&g($e,"class",null,vt.class,He),Qe&4&&g($e,"style",St.style,vt.style,He),Qe&8){const qt=ge.dynamicProps;for(let Ne=0;Ne{Mt&&Zn(Mt,Be,ge,ce),pt&&ko(ge,ce,Be,"updated")},ae)},pe=(ce,ge,Be,ae,He,tt,Ze)=>{for(let $e=0;$e{if(Be!==ae){if(Be!==$i)for(const $e in Be)!tc($e)&&!($e in ae)&&g(ce,$e,Be[$e],null,Ze,ge.children,He,tt,hi);for(const $e in ae){if(tc($e))continue;const Qe=ae[$e],We=Be[$e];Qe!==We&&$e!=="value"&&g(ce,$e,We,Qe,Ze,ge.children,He,tt,hi)}"value"in ae&&g(ce,"value",Be.value,ae.value,Ze)}},Ae=(ce,ge,Be,ae,He,tt,Ze,$e,Qe)=>{const We=ge.el=ce?ce.el:c(""),pt=ge.anchor=ce?ce.anchor:c("");let{patchFlag:St,dynamicChildren:vt,slotScopeIds:Mt}=ge;Mt&&($e=$e?$e.concat(Mt):Mt),ce==null?(u(We,Be,ae),u(pt,Be,ae),Ee(ge.children||[],Be,pt,He,tt,Ze,$e,Qe)):St>0&&St&64&&vt&&ce.dynamicChildren?(pe(ce.dynamicChildren,vt,Be,He,tt,Ze,$e),(ge.key!=null||He&&ge===He.subTree)&&Yx(ce,ge,!0)):nt(ce,ge,Be,pt,He,tt,Ze,$e,Qe)},De=(ce,ge,Be,ae,He,tt,Ze,$e,Qe)=>{ge.slotScopeIds=$e,ce==null?ge.shapeFlag&512?He.ctx.activate(ge,Be,ae,Ze,Qe):Ge(ge,Be,ae,He,tt,Ze,Qe):rt(ce,ge,Qe)},Ge=(ce,ge,Be,ae,He,tt,Ze)=>{const $e=ce.component=yI(ce,ae,He);if(ch(ce)&&($e.ctx.renderer=cr),_I($e),$e.asyncDep){if(He&&He.registerDep($e,Xe,Ze),!ce.el){const Qe=$e.subTree=ri(Ur);ke(null,Qe,ge,Be)}}else Xe($e,ce,ge,Be,He,tt,Ze)},rt=(ce,ge,Be)=>{const ae=ge.component=ce.component;if(xS(ce,ge,Be))if(ae.asyncDep&&!ae.asyncResolved){dt(ae,ge,Be);return}else ae.next=ge,pS(ae.update),ae.effect.dirty=!0,ae.update();else ge.el=ce.el,ae.vnode=ge},Xe=(ce,ge,Be,ae,He,tt,Ze)=>{const $e=()=>{if(ce.isMounted){let{next:pt,bu:St,u:vt,parent:Mt,vnode:qt}=ce;{const Gr=Qx(ce);if(Gr){pt&&(pt.el=qt.el,dt(ce,pt,Ze)),Gr.asyncDep.then(()=>{ce.isUnmounted||$e()});return}}let Ne=pt,Ht;Da(ce,!1),pt?(pt.el=qt.el,dt(ce,pt,Ze)):pt=qt,St&&em(St),(Ht=pt.props&&pt.props.onVnodeBeforeUpdate)&&Zn(Ht,Mt,pt,qt),Da(ce,!0);const si=rm(ce),ur=ce.subTree;ce.subTree=si,J(ur,si,A(ur.el),Li(ur),ce,He,tt),pt.el=si.el,Ne===null&&Ag(ce,si.el),vt&&wn(vt,He),(Ht=pt.props&&pt.props.onVnodeUpdated)&&wn(()=>Zn(Ht,Mt,pt,qt),He)}else{let pt;const{el:St,props:vt}=ge,{bm:Mt,m:qt,parent:Ne}=ce,Ht=nc(ge);if(Da(ce,!1),Mt&&em(Mt),!Ht&&(pt=vt&&vt.onVnodeBeforeMount)&&Zn(pt,Ne,ge),Da(ce,!0),St&&rr){const si=()=>{ce.subTree=rm(ce),rr(St,ce.subTree,ce,He,null)};Ht?ge.type.__asyncLoader().then(()=>!ce.isUnmounted&&si()):si()}else{const si=ce.subTree=rm(ce);J(null,si,Be,ae,ce,He,tt),ge.el=si.el}if(qt&&wn(qt,He),!Ht&&(pt=vt&&vt.onVnodeMounted)){const si=ge;wn(()=>Zn(pt,Ne,si),He)}(ge.shapeFlag&256||Ne&&nc(Ne.vnode)&&Ne.vnode.shapeFlag&256)&&ce.a&&wn(ce.a,He),ce.isMounted=!0,ge=Be=ae=null}},Qe=ce.effect=new xg($e,Xn,()=>Tf(We),ce.scope),We=ce.update=()=>{Qe.dirty&&Qe.run()};We.id=ce.uid,Da(ce,!0),We()},dt=(ce,ge,Be)=>{ge.component=ce;const ae=ce.vnode.props;ce.vnode=ge,ce.next=null,XS(ce,ge.props,ae,Be),YS(ce,ge.children,Be),Qs(),h0(ce),ea()},nt=(ce,ge,Be,ae,He,tt,Ze,$e,Qe=!1)=>{const We=ce&&ce.children,pt=ce?ce.shapeFlag:0,St=ge.children,{patchFlag:vt,shapeFlag:Mt}=ge;if(vt>0){if(vt&128){$t(We,St,Be,ae,He,tt,Ze,$e,Qe);return}else if(vt&256){ei(We,St,Be,ae,He,tt,Ze,$e,Qe);return}}Mt&8?(pt&16&&hi(We,He,tt),St!==We&&M(Be,St)):pt&16?Mt&16?$t(We,St,Be,ae,He,tt,Ze,$e,Qe):hi(We,He,tt,!0):(pt&8&&M(Be,""),Mt&16&&Ee(St,Be,ae,He,tt,Ze,$e,Qe))},ei=(ce,ge,Be,ae,He,tt,Ze,$e,Qe)=>{ce=ce||Ql,ge=ge||Ql;const We=ce.length,pt=ge.length,St=Math.min(We,pt);let vt;for(vt=0;vtpt?hi(ce,He,tt,!0,!1,St):Ee(ge,Be,ae,He,tt,Ze,$e,Qe,St)},$t=(ce,ge,Be,ae,He,tt,Ze,$e,Qe)=>{let We=0;const pt=ge.length;let St=ce.length-1,vt=pt-1;for(;We<=St&&We<=vt;){const Mt=ce[We],qt=ge[We]=Qe?Ws(ge[We]):Wn(ge[We]);if(Po(Mt,qt))J(Mt,qt,Be,null,He,tt,Ze,$e,Qe);else break;We++}for(;We<=St&&We<=vt;){const Mt=ce[St],qt=ge[vt]=Qe?Ws(ge[vt]):Wn(ge[vt]);if(Po(Mt,qt))J(Mt,qt,Be,null,He,tt,Ze,$e,Qe);else break;St--,vt--}if(We>St){if(We<=vt){const Mt=vt+1,qt=Mtvt)for(;We<=St;)Nt(ce[We],He,tt,!0),We++;else{const Mt=We,qt=We,Ne=new Map;for(We=qt;We<=vt;We++){const di=ge[We]=Qe?Ws(ge[We]):Wn(ge[We]);di.key!=null&&Ne.set(di.key,We)}let Ht,si=0;const ur=vt-qt+1;let Gr=!1,Ye=0;const Ot=new Array(ur);for(We=0;We=ur){Nt(di,He,tt,!0);continue}let Ei;if(di.key!=null)Ei=Ne.get(di.key);else for(Ht=qt;Ht<=vt;Ht++)if(Ot[Ht-qt]===0&&Po(di,ge[Ht])){Ei=Ht;break}Ei===void 0?Nt(di,He,tt,!0):(Ot[Ei-qt]=We+1,Ei>=Ye?Ye=Ei:Gr=!0,J(di,ge[Ei],Be,null,He,tt,Ze,$e,Qe),si++)}const zt=Gr?nI(Ot):Ql;for(Ht=zt.length-1,We=ur-1;We>=0;We--){const di=qt+We,Ei=ge[di],Bt=di+1{const{el:tt,type:Ze,transition:$e,children:Qe,shapeFlag:We}=ce;if(We&6){Vt(ce.component.subTree,ge,Be,ae);return}if(We&128){ce.suspense.move(ge,Be,ae);return}if(We&64){Ze.move(ce,ge,Be,cr);return}if(Ze===xr){u(tt,ge,Be);for(let St=0;St$e.enter(tt),He);else{const{leave:St,delayLeave:vt,afterLeave:Mt}=$e,qt=()=>u(tt,ge,Be),Ne=()=>{St(tt,()=>{qt(),Mt&&Mt()})};vt?vt(tt,qt,Ne):Ne()}else u(tt,ge,Be)},Nt=(ce,ge,Be,ae=!1,He=!1)=>{const{type:tt,props:Ze,ref:$e,children:Qe,dynamicChildren:We,shapeFlag:pt,patchFlag:St,dirs:vt,memoIndex:Mt}=ce;if($e!=null&&of($e,null,Be,ce,!0),Mt!=null&&(ge.renderCache[Mt]=void 0),pt&256){ge.ctx.deactivate(ce);return}const qt=pt&1&&vt,Ne=!nc(ce);let Ht;if(Ne&&(Ht=Ze&&Ze.onVnodeBeforeUnmount)&&Zn(Ht,ge,ce),pt&6)zi(ce.component,Be,ae);else{if(pt&128){ce.suspense.unmount(Be,ae);return}qt&&ko(ce,null,ge,"beforeUnmount"),pt&64?ce.type.remove(ce,ge,Be,He,cr,ae):We&&(tt!==xr||St>0&&St&64)?hi(We,ge,Be,!1,!0):(tt===xr&&St&384||!He&&pt&16)&&hi(Qe,ge,Be),ae&&wi(ce)}(Ne&&(Ht=Ze&&Ze.onVnodeUnmounted)||qt)&&wn(()=>{Ht&&Zn(Ht,ge,ce),qt&&ko(ce,null,ge,"unmounted")},Be)},wi=ce=>{const{type:ge,el:Be,anchor:ae,transition:He}=ce;if(ge===xr){Xi(Be,ae);return}if(ge===Hu){fe(ce);return}const tt=()=>{h(Be),He&&!He.persisted&&He.afterLeave&&He.afterLeave()};if(ce.shapeFlag&1&&He&&!He.persisted){const{leave:Ze,delayLeave:$e}=He,Qe=()=>Ze(Be,tt);$e?$e(ce.el,tt,Qe):Qe()}else tt()},Xi=(ce,ge)=>{let Be;for(;ce!==ge;)Be=z(ce),h(ce),ce=Be;h(ge)},zi=(ce,ge,Be)=>{const{bum:ae,scope:He,update:tt,subTree:Ze,um:$e,m:Qe,a:We}=ce;S0(Qe),S0(We),ae&&em(ae),He.stop(),tt&&(tt.active=!1,Nt(Ze,ce,ge,Be)),$e&&wn($e,ge),wn(()=>{ce.isUnmounted=!0},ge),ge&&ge.pendingBranch&&!ge.isUnmounted&&ce.asyncDep&&!ce.asyncResolved&&ce.suspenseId===ge.pendingId&&(ge.deps--,ge.deps===0&&ge.resolve())},hi=(ce,ge,Be,ae=!1,He=!1,tt=0)=>{for(let Ze=tt;Zece.shapeFlag&6?Li(ce.component.subTree):ce.shapeFlag&128?ce.suspense.next():z(ce.anchor||ce.el);let Di=!1;const Or=(ce,ge,Be)=>{ce==null?ge._vnode&&Nt(ge._vnode,null,null,!0):J(ge._vnode||null,ce,ge,null,null,null,Be),Di||(Di=!0,h0(),ef(),Di=!1),ge._vnode=ce},cr={p:J,um:Nt,m:Vt,r:wi,mt:Ge,mc:Ee,pc:nt,pbc:pe,n:Li,o:e};let Br,rr;return n&&([Br,rr]=n(cr)),{render:Or,hydrate:Br,createApp:ZS(Or,Br)}}function sm({type:e,props:n},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&n&&n.encoding&&n.encoding.includes("html")?void 0:s}function Da({effect:e,update:n},s){e.allowRecurse=n.allowRecurse=s}function Jx(e,n){return(!e||e&&!e.pendingBranch)&&n&&!n.persisted}function Yx(e,n,s=!1){const u=e.children,h=n.children;if(jt(u)&&jt(h))for(let g=0;g>1,e[s[c]]0&&(n[u]=s[g-1]),s[g]=u)}}for(g=s.length,m=s[g-1];g-- >0;)s[g]=m,m=n[m];return s}function Qx(e){const n=e.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:Qx(n)}function S0(e){if(e)for(let n=0;nHr(oI);function Qn(e,n){return Lf(e,null,n)}function aI(e,n){return Lf(e,null,{flush:"post"})}const Ld={};function Ji(e,n,s){return Lf(e,n,s)}function Lf(e,n,{immediate:s,deep:u,flush:h,once:g,onTrack:m,onTrigger:c}=$i){if(n&&g){const ee=n;n=(...Se)=>{ee(...Se),Z()}}const I=br,k=ee=>u===!0?ee:Xs(ee,u===!1?1:void 0);let M,A=!1,z=!1;if(gr(e)?(M=()=>e.value,A=Qd(e)):$u(e)?(M=()=>k(e),A=!0):jt(e)?(z=!0,A=e.some(ee=>$u(ee)||Qd(ee)),M=()=>e.map(ee=>{if(gr(ee))return ee.value;if($u(ee))return k(ee);if(Ut(ee))return Js(ee,I,2)})):Ut(e)?n?M=()=>Js(e,I,2):M=()=>(q&&q(),Jn(e,I,3,[K])):M=Xn,n&&u){const ee=M;M=()=>Xs(ee())}let q,K=ee=>{q=W.onStop=()=>{Js(ee,I,4),q=W.onStop=void 0}},J;if(uh)if(K=Xn,n?s&&Jn(n,I,3,[M(),z?[]:void 0,K]):M(),h==="sync"){const ee=sI();J=ee.__watcherHandles||(ee.__watcherHandles=[])}else return Xn;let se=z?new Array(e.length).fill(Ld):Ld;const ke=()=>{if(!(!W.active||!W.dirty))if(n){const ee=W.run();(u||A||(z?ee.some((Se,Ee)=>Ys(Se,se[Ee])):Ys(ee,se)))&&(q&&q(),Jn(n,I,3,[ee,se===Ld?void 0:z&&se[0]===Ld?[]:se,K]),se=ee)}else W.run()};ke.allowRecurse=!!n;let ye;h==="sync"?ye=ke:h==="post"?ye=()=>wn(ke,I&&I.suspense):(ke.pre=!0,I&&(ke.id=I.uid),ye=()=>Tf(ke));const W=new xg(M,Xn,ye),fe=cx(),Z=()=>{W.stop(),fe&&yg(fe.effects,W)};return n?s?ke():se=W.run():h==="post"?wn(W.run.bind(W),I&&I.suspense):W.run(),J&&J.push(Z),Z}function lI(e,n,s){const u=this.proxy,h=ir(e)?e.includes(".")?eb(u,e):()=>u[e]:e.bind(u,u);let g;Ut(n)?g=n:(g=n.handler,s=n);const m=Ga(this),c=Lf(h,g.bind(u),s);return m(),c}function eb(e,n){const s=n.split(".");return()=>{let u=e;for(let h=0;h{Xs(u,n,s)});else if(ix(e)){for(const u in e)Xs(e[u],n,s);for(const u of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,u)&&Xs(e[u],n,s)}return e}const ch=e=>e.type.__isKeepAlive;function tb(e,n){rb(e,"a",n)}function ib(e,n){rb(e,"da",n)}function rb(e,n,s=br){const u=e.__wdc||(e.__wdc=()=>{let h=s;for(;h;){if(h.isDeactivated)return;h=h.parent}return e()});if(Mf(n,u,s),s){let h=s.parent;for(;h&&h.parent;)ch(h.parent.vnode)&&cI(u,n,s,h),h=h.parent}}function cI(e,n,s,u){const h=Mf(n,e,u,!0);Ja(()=>{yg(u[n],h)},s)}const Zs=Symbol("_leaveCb"),Pd=Symbol("_enterCb");function uI(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return an(()=>{e.isMounted=!0}),kf(()=>{e.isUnmounting=!0}),e}const Hn=[Function,Array],nb={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Hn,onEnter:Hn,onAfterEnter:Hn,onEnterCancelled:Hn,onBeforeLeave:Hn,onLeave:Hn,onAfterLeave:Hn,onLeaveCancelled:Hn,onBeforeAppear:Hn,onAppear:Hn,onAfterAppear:Hn,onAppearCancelled:Hn},ob=e=>{const n=e.subTree;return n.component?ob(n.component):n},hI={name:"BaseTransition",props:nb,setup(e,{slots:n}){const s=ia(),u=uI();return()=>{const h=n.default&&ab(n.default(),!0);if(!h||!h.length)return;let g=h[0];if(h.length>1){for(const z of h)if(z.type!==Ur){g=z;break}}const m=Ft(e),{mode:c}=m;if(u.isLeaving)return am(g);const I=I0(g);if(!I)return am(g);let k=Rm(I,m,u,s,z=>k=z);sf(I,k);const M=s.subTree,A=M&&I0(M);if(A&&A.type!==Ur&&!Po(I,A)&&ob(s).type!==Ur){const z=Rm(A,m,u,s);if(sf(A,z),c==="out-in"&&I.type!==Ur)return u.isLeaving=!0,z.afterLeave=()=>{u.isLeaving=!1,s.update.active!==!1&&(s.effect.dirty=!0,s.update())},am(g);c==="in-out"&&I.type!==Ur&&(z.delayLeave=(q,K,J)=>{const se=sb(u,A);se[String(A.key)]=A,q[Zs]=()=>{K(),q[Zs]=void 0,delete k.delayedLeave},k.delayedLeave=J})}return g}}},dI=hI;function sb(e,n){const{leavingVNodes:s}=e;let u=s.get(n.type);return u||(u=Object.create(null),s.set(n.type,u)),u}function Rm(e,n,s,u,h){const{appear:g,mode:m,persisted:c=!1,onBeforeEnter:I,onEnter:k,onAfterEnter:M,onEnterCancelled:A,onBeforeLeave:z,onLeave:q,onAfterLeave:K,onLeaveCancelled:J,onBeforeAppear:se,onAppear:ke,onAfterAppear:ye,onAppearCancelled:W}=n,fe=String(e.key),Z=sb(s,e),ee=(Le,pe)=>{Le&&Jn(Le,u,9,pe)},Se=(Le,pe)=>{const Ie=pe[1];ee(Le,pe),jt(Le)?Le.every(Ae=>Ae.length<=1)&&Ie():Le.length<=1&&Ie()},Ee={mode:m,persisted:c,beforeEnter(Le){let pe=I;if(!s.isMounted)if(g)pe=se||I;else return;Le[Zs]&&Le[Zs](!0);const Ie=Z[fe];Ie&&Po(e,Ie)&&Ie.el[Zs]&&Ie.el[Zs](),ee(pe,[Le])},enter(Le){let pe=k,Ie=M,Ae=A;if(!s.isMounted)if(g)pe=ke||k,Ie=ye||M,Ae=W||A;else return;let De=!1;const Ge=Le[Pd]=rt=>{De||(De=!0,rt?ee(Ae,[Le]):ee(Ie,[Le]),Ee.delayedLeave&&Ee.delayedLeave(),Le[Pd]=void 0)};pe?Se(pe,[Le,Ge]):Ge()},leave(Le,pe){const Ie=String(e.key);if(Le[Pd]&&Le[Pd](!0),s.isUnmounting)return pe();ee(z,[Le]);let Ae=!1;const De=Le[Zs]=Ge=>{Ae||(Ae=!0,pe(),Ge?ee(J,[Le]):ee(K,[Le]),Le[Zs]=void 0,Z[Ie]===e&&delete Z[Ie])};Z[Ie]=e,q?Se(q,[Le,De]):De()},clone(Le){const pe=Rm(Le,n,s,u,h);return h&&h(pe),pe}};return Ee}function am(e){if(ch(e))return e=Bo(e),e.children=null,e}function I0(e){if(!ch(e))return e;const{shapeFlag:n,children:s}=e;if(s){if(n&16)return s[0];if(n&32&&Ut(s.default))return s.default()}}function sf(e,n){e.shapeFlag&6&&e.component?sf(e.component.subTree,n):e.shapeFlag&128?(e.ssContent.transition=n.clone(e.ssContent),e.ssFallback.transition=n.clone(e.ssFallback)):e.transition=n}function ab(e,n=!1,s){let u=[],h=0;for(let g=0;g1)for(let g=0;ge.__isTeleport,xr=Symbol.for("v-fgt"),cc=Symbol.for("v-txt"),Ur=Symbol.for("v-cmt"),Hu=Symbol.for("v-stc"),Gu=[];let Kn=null;function At(e=!1){Gu.push(Kn=e?null:[])}function lb(){Gu.pop(),Kn=Gu[Gu.length-1]||null}let uc=1;function T0(e){uc+=e}function cb(e){return e.dynamicChildren=uc>0?Kn||Ql:null,lb(),uc>0&&Kn&&Kn.push(e),e}function Mi(e,n,s,u,h,g){return cb(lr(e,n,s,u,h,g,!0))}function ki(e,n,s,u,h){return cb(ri(e,n,s,u,h,!0))}function rh(e){return e?e.__v_isVNode===!0:!1}function Po(e,n){return e.type===n.type&&e.key===n.key}const ub=({key:e})=>e??null,jd=({ref:e,ref_key:n,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ir(e)||gr(e)||Ut(e)?{i:Er,r:e,k:n,f:!!s}:e:null);function lr(e,n=null,s=null,u=0,h=null,g=e===xr?0:1,m=!1,c=!1){const I={__v_isVNode:!0,__v_skip:!0,type:e,props:n,key:n&&ub(n),ref:n&&jd(n),scopeId:Af,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:g,patchFlag:u,dynamicProps:h,dynamicChildren:null,appContext:null,ctx:Er};return c?(Pg(I,s),g&128&&e.normalize(I)):s&&(I.shapeFlag|=ir(s)?8:16),uc>0&&!m&&Kn&&(I.patchFlag>0||g&6)&&I.patchFlag!==32&&Kn.push(I),I}const ri=pI;function pI(e,n=null,s=null,u=0,h=null,g=!1){if((!e||e===Dx)&&(e=Ur),rh(e)){const c=Bo(e,n,!0);return s&&Pg(c,s),uc>0&&!g&&Kn&&(c.shapeFlag&6?Kn[Kn.indexOf(e)]=c:Kn.push(c)),c.patchFlag=-2,c}if(wI(e)&&(e=e.__vccOpts),n){n=af(n);let{class:c,style:I}=n;c&&!ir(c)&&(n.class=Wt(c)),Fi(I)&&(wx(I)&&!jt(I)&&(I=mr({},I)),n.style=Ha(I))}const m=ir(e)?1:bS(e)?128:fI(e)?64:Fi(e)?4:Ut(e)?2:0;return lr(e,n,s,u,h,m,g,!0)}function af(e){return e?wx(e)||qx(e)?mr({},e):e:null}function Bo(e,n,s=!1,u=!1){const{props:h,ref:g,patchFlag:m,children:c,transition:I}=e,k=n?fo(h||{},n):h,M={__v_isVNode:!0,__v_skip:!0,type:e.type,props:k,key:k&&ub(k),ref:n&&n.ref?s&&g?jt(g)?g.concat(jd(n)):[g,jd(n)]:jd(n):g,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:n&&e.type!==xr?m===-1?16:m|16:m,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:I,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Bo(e.ssContent),ssFallback:e.ssFallback&&Bo(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return I&&u&&sf(M,I.clone(M)),M}function hs(e=" ",n=0){return ri(cc,null,e,n)}function Dr(e="",n=!1){return n?(At(),ki(Ur,null,e)):ri(Ur,null,e)}function Wn(e){return e==null||typeof e=="boolean"?ri(Ur):jt(e)?ri(xr,null,e.slice()):typeof e=="object"?Ws(e):ri(cc,null,String(e))}function Ws(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bo(e)}function Pg(e,n){let s=0;const{shapeFlag:u}=e;if(n==null)n=null;else if(jt(n))s=16;else if(typeof n=="object")if(u&65){const h=n.default;h&&(h._c&&(h._d=!1),Pg(e,h()),h._c&&(h._d=!0));return}else{s=32;const h=n._;!h&&!qx(n)?n._ctx=Er:h===3&&Er&&(Er.slots._===1?n._=1:(n._=2,e.patchFlag|=1024))}else Ut(n)?(n={default:n,_ctx:Er},s=32):(n=String(n),u&64?(s=16,n=[hs(n)]):s=8);e.children=n,e.shapeFlag|=s}function fo(...e){const n={};for(let s=0;sbr||Er;let lf,Om;{const e=ox(),n=(s,u)=>{let h;return(h=e[s])||(h=e[s]=[]),h.push(u),g=>{h.length>1?h.forEach(m=>m(g)):h[0](g)}};lf=n("__VUE_INSTANCE_SETTERS__",s=>br=s),Om=n("__VUE_SSR_SETTERS__",s=>uh=s)}const Ga=e=>{const n=br;return lf(e),e.scope.on(),()=>{e.scope.off(),lf(n)}},Bm=()=>{br&&br.scope.off(),lf(null)};function hb(e){return e.vnode.shapeFlag&4}let uh=!1;function _I(e,n=!1){n&&Om(n);const{props:s,children:u}=e.vnode,h=hb(e);WS(e,s,h,n),JS(e,u);const g=h?vI(e,n):void 0;return n&&Om(!1),g}function vI(e,n){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,BS);const{setup:u}=s;if(u){const h=e.setupContext=u.length>1?fb(e):null,g=Ga(e);Qs();const m=Js(u,e,0,[e.props,h]);if(ea(),g(),_g(m)){if(m.then(Bm,Bm),n)return m.then(c=>{Fm(e,c,n)}).catch(c=>{vc(c,e,0)});e.asyncDep=m}else Fm(e,m,n)}else db(e,n)}function Fm(e,n,s){Ut(n)?e.type.__ssrInlineRender?e.ssrRender=n:e.render=n:Fi(n)&&(e.setupState=Tx(n)),db(e,s)}let C0;function db(e,n,s){const u=e.type;if(!e.render){if(!n&&C0&&!u.render){const h=u.template||kg(e).template;if(h){const{isCustomElement:g,compilerOptions:m}=e.appContext.config,{delimiters:c,compilerOptions:I}=u,k=mr(mr({isCustomElement:g,delimiters:c},m),I);u.render=C0(h,k)}}e.render=u.render||Xn}{const h=Ga(e);Qs();try{jS(e)}finally{ea(),h()}}}const xI={get(e,n){return En(e,"get",""),e[n]}};function fb(e){const n=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,xI),slots:e.slots,emit:e.emit,expose:n}}function Pf(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Tx(oS(e.exposed)),{get(n,s){if(s in n)return n[s];if(s in qu)return qu[s](e)},has(n,s){return s in n||s in qu}})):e.proxy}function bI(e,n=!0){return Ut(e)?e.displayName||e.name:e.name||n&&e.__name}function wI(e){return Ut(e)&&"__vccOpts"in e}const je=(e,n)=>sS(e,n,uh);function Fn(e,n,s){const u=arguments.length;return u===2?Fi(n)&&!jt(n)?rh(n)?ri(e,null,[n]):ri(e,n):ri(e,null,n):(u>3?s=Array.prototype.slice.call(arguments,2):u===3&&rh(s)&&(s=[s]),ri(e,n,s))}const pb="3.4.29";/** +**/function Js(e,n,s,u){try{return u?e(...u):e()}catch(h){vc(h,n,s)}}function Jn(e,n,s,u){if(Ut(e)){const h=Js(e,n,s,u);return h&&_g(h)&&h.catch(g=>{vc(g,n,s)}),h}if(jt(e)){const h=[];for(let g=0;g>>1,h=on[u],g=th(h);gLo&&on.splice(n,1)}function Am(e){jt(e)?ic.push(...e):(!Gs||!Gs.includes(e,e.allowRecurse?Va+1:Va))&&ic.push(e),Ax()}function h0(e,n,s=eh?Lo+1:0){for(;sth(s)-th(u));if(ic.length=0,Gs){Gs.push(...n);return}for(Gs=n,Va=0;Vae.id==null?1/0:e.id,mS=(e,n)=>{const s=th(e)-th(n);if(s===0){if(e.pre&&!n.pre)return-1;if(n.pre&&!e.pre)return 1}return s};function Mx(e){Cm=!1,eh=!0,on.sort(mS);try{for(Lo=0;Loir(q)?q.trim():q)),A&&(h=s.map(ME))}let c,I=u[c=Qp(n)]||u[c=Qp(Ro(n))];!I&&g&&(I=u[c=Qp(_c(n))]),I&&Jn(I,e,6,h);const k=u[c+"Once"];if(k){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Jn(k,e,6,h)}}function kx(e,n,s=!1){const u=n.emitsCache,h=u.get(e);if(h!==void 0)return h;const g=e.emits;let m={},c=!1;if(!Ut(e)){const I=k=>{const M=kx(k,n,!0);M&&(c=!0,gr(m,M))};!s&&n.mixins.length&&n.mixins.forEach(I),e.extends&&I(e.extends),e.mixins&&e.mixins.forEach(I)}return!g&&!c?(Fi(e)&&u.set(e,null),null):(jt(g)?g.forEach(I=>m[I]=null):gr(m,g),Fi(e)&&u.set(e,m),m)}function Cf(e,n){return!e||!lh(n)?!1:(n=n.slice(2).replace(/Once$/,""),ci(e,n[0].toLowerCase()+n.slice(1))||ci(e,_c(n))||ci(e,n))}let Sr=null,Af=null;function tf(e){const n=Sr;return Sr=e,Af=e&&e.type.__scopeId||null,n}function Lx(e){Af=e}function Px(){Af=null}function Rr(e,n=Sr,s){if(!n||e._n)return e;const u=(...h)=>{u._d&&T0(-1);const g=tf(n);let m;try{m=e(...h)}finally{tf(g),u._d&&T0(1)}return m};return u._n=!0,u._c=!0,u._d=!0,u}function rm(e){const{type:n,vnode:s,proxy:u,withProxy:h,propsOptions:[g],slots:m,attrs:c,emit:I,render:k,renderCache:M,props:A,data:z,setupState:q,ctx:K,inheritAttrs:J}=e,se=tf(e);let ke,ye;try{if(s.shapeFlag&4){const fe=h||u,W=fe;ke=Zn(k.call(W,fe,M,A,q,z,K)),ye=c}else{const fe=n;ke=Zn(fe.length>1?fe(A,{attrs:c,slots:m,emit:I}):fe(A,null)),ye=n.props?c:_S(c)}}catch(fe){Gu.length=0,vc(fe,e,1),ke=ri(Ur)}let Z=ke;if(ye&&J!==!1){const fe=Object.keys(ye),{shapeFlag:W}=Z;fe.length&&W&7&&(g&&fe.some(gg)&&(ye=vS(ye,g)),Z=Bo(Z,ye,!1,!0))}return s.dirs&&(Z=Bo(Z,null,!1,!0),Z.dirs=Z.dirs?Z.dirs.concat(s.dirs):s.dirs),s.transition&&(Z.transition=s.transition),ke=Z,tf(se),ke}function yS(e,n=!0){let s;for(let u=0;u{let n;for(const s in e)(s==="class"||s==="style"||lh(s))&&((n||(n={}))[s]=e[s]);return n},vS=(e,n)=>{const s={};for(const u in e)(!gg(u)||!(u.slice(9)in n))&&(s[u]=e[u]);return s};function xS(e,n,s){const{props:u,children:h,component:g}=e,{props:m,children:c,patchFlag:I}=n,k=g.emitsOptions;if(n.dirs||n.transition)return!0;if(s&&I>=0){if(I&1024)return!0;if(I&16)return u?d0(u,m,k):!!m;if(I&8){const M=n.dynamicProps;for(let A=0;Ae.__isSuspense;let km=0;const wS={name:"Suspense",__isSuspense:!0,process(e,n,s,u,h,g,m,c,I,k){if(e==null)SS(n,s,u,h,g,m,c,I,k);else{if(g&&g.deps>0&&!e.suspense.isInFallback){n.suspense=e.suspense,n.suspense.vnode=n,n.el=e.el;return}IS(e,n,s,u,h,m,c,I,k)}},hydrate:TS,create:Mg,normalize:CS},ES=wS;function ih(e,n){const s=e.props&&e.props[n];Ut(s)&&s()}function SS(e,n,s,u,h,g,m,c,I){const{p:k,o:{createElement:M}}=I,A=M("div"),z=e.suspense=Mg(e,h,u,n,A,s,g,m,c,I);k(null,z.pendingBranch=e.ssContent,A,null,u,z,g,m),z.deps>0?(ih(e,"onPending"),ih(e,"onFallback"),k(null,e.ssFallback,n,s,u,null,g,m),rc(z,e.ssFallback)):z.resolve(!1,!0)}function IS(e,n,s,u,h,g,m,c,{p:I,um:k,o:{createElement:M}}){const A=n.suspense=e.suspense;A.vnode=n,n.el=e.el;const z=n.ssContent,q=n.ssFallback,{activeBranch:K,pendingBranch:J,isInFallback:se,isHydrating:ke}=A;if(J)A.pendingBranch=z,Po(z,J)?(I(J,z,A.hiddenContainer,null,h,A,g,m,c),A.deps<=0?A.resolve():se&&(ke||(I(K,q,s,u,h,null,g,m,c),rc(A,q)))):(A.pendingId=km++,ke?(A.isHydrating=!1,A.activeBranch=J):k(J,h,A),A.deps=0,A.effects.length=0,A.hiddenContainer=M("div"),se?(I(null,z,A.hiddenContainer,null,h,A,g,m,c),A.deps<=0?A.resolve():(I(K,q,s,u,h,null,g,m,c),rc(A,q))):K&&Po(z,K)?(I(K,z,s,u,h,A,g,m,c),A.resolve(!0)):(I(null,z,A.hiddenContainer,null,h,A,g,m,c),A.deps<=0&&A.resolve()));else if(K&&Po(z,K))I(K,z,s,u,h,A,g,m,c),rc(A,z);else if(ih(n,"onPending"),A.pendingBranch=z,z.shapeFlag&512?A.pendingId=z.component.suspenseId:A.pendingId=km++,I(null,z,A.hiddenContainer,null,h,A,g,m,c),A.deps<=0)A.resolve();else{const{timeout:ye,pendingId:Z}=A;ye>0?setTimeout(()=>{A.pendingId===Z&&A.fallback(q)},ye):ye===0&&A.fallback(q)}}function Mg(e,n,s,u,h,g,m,c,I,k,M=!1){const{p:A,m:z,um:q,n:K,o:{parentNode:J,remove:se}}=k;let ke;const ye=AS(e);ye&&n&&n.pendingBranch&&(ke=n.pendingId,n.deps++);const Z=e.props?nx(e.props.timeout):void 0,fe=g,W={vnode:e,parent:n,parentComponent:s,namespace:m,container:u,hiddenContainer:h,deps:0,pendingId:km++,timeout:typeof Z=="number"?Z:-1,activeBranch:null,pendingBranch:null,isInFallback:!M,isHydrating:M,isUnmounted:!1,effects:[],resolve(ee=!1,Se=!1){const{vnode:Ee,activeBranch:Le,pendingBranch:pe,pendingId:Ie,effects:Ae,parentComponent:De,container:Ge}=W;let rt=!1;W.isHydrating?W.isHydrating=!1:ee||(rt=Le&&pe.transition&&pe.transition.mode==="out-in",rt&&(Le.transition.afterLeave=()=>{Ie===W.pendingId&&(z(pe,Ge,g===fe?K(Le):g,0),Am(Ae))}),Le&&(J(Le.el)!==W.hiddenContainer&&(g=K(Le)),q(Le,De,W,!0)),rt||z(pe,Ge,g,0)),rc(W,pe),W.pendingBranch=null,W.isInFallback=!1;let Xe=W.parent,dt=!1;for(;Xe;){if(Xe.pendingBranch){Xe.effects.push(...Ae),dt=!0;break}Xe=Xe.parent}!dt&&!rt&&Am(Ae),W.effects=[],ye&&n&&n.pendingBranch&&ke===n.pendingId&&(n.deps--,n.deps===0&&!Se&&n.resolve()),ih(Ee,"onResolve")},fallback(ee){if(!W.pendingBranch)return;const{vnode:Se,activeBranch:Ee,parentComponent:Le,container:pe,namespace:Ie}=W;ih(Se,"onFallback");const Ae=K(Ee),De=()=>{W.isInFallback&&(A(null,ee,pe,Ae,Le,null,Ie,c,I),rc(W,ee))},Ge=ee.transition&&ee.transition.mode==="out-in";Ge&&(Ee.transition.afterLeave=De),W.isInFallback=!0,q(Ee,Le,null,!0),Ge||De()},move(ee,Se,Ee){W.activeBranch&&z(W.activeBranch,ee,Se,Ee),W.container=ee},next(){return W.activeBranch&&K(W.activeBranch)},registerDep(ee,Se,Ee){const Le=!!W.pendingBranch;Le&&W.deps++;const pe=ee.vnode.el;ee.asyncDep.catch(Ie=>{vc(Ie,ee,0)}).then(Ie=>{if(ee.isUnmounted||W.isUnmounted||W.pendingId!==ee.suspenseId)return;ee.asyncResolved=!0;const{vnode:Ae}=ee;Fm(ee,Ie,!1),pe&&(Ae.el=pe);const De=!pe&&ee.subTree.el;Se(ee,Ae,J(pe||ee.subTree.el),pe?null:K(ee.subTree),W,m,Ee),De&&se(De),Ag(ee,Ae.el),Le&&--W.deps===0&&W.resolve()})},unmount(ee,Se){W.isUnmounted=!0,W.activeBranch&&q(W.activeBranch,s,ee,Se),W.pendingBranch&&q(W.pendingBranch,s,ee,Se)}};return W}function TS(e,n,s,u,h,g,m,c,I){const k=n.suspense=Mg(n,u,s,e.parentNode,document.createElement("div"),null,h,g,m,c,!0),M=I(e,k.pendingBranch=n.ssContent,s,k,g,m);return k.deps===0&&k.resolve(!1,!0),M}function CS(e){const{shapeFlag:n,children:s}=e,u=n&32;e.ssContent=p0(u?s.default:s),e.ssFallback=u?p0(s.fallback):ri(Ur)}function p0(e){let n;if(Ut(e)){const s=uc&&e._c;s&&(e._d=!1,At()),e=e(),s&&(e._d=!0,n=Kn,lb())}return jt(e)&&(e=yS(e)),e=Zn(e),n&&!e.dynamicChildren&&(e.dynamicChildren=n.filter(s=>s!==e)),e}function Ox(e,n){n&&n.pendingBranch?jt(e)?n.effects.push(...e):n.effects.push(e):Am(e)}function rc(e,n){e.activeBranch=n;const{vnode:s,parentComponent:u}=e;let h=n.el;for(;!h&&n.component;)n=n.component.subTree,h=n.el;s.el=h,u&&u.subTree===s&&(u.vnode.el=h,Ag(u,h))}function AS(e){const n=e.props&&e.props.suspensible;return n!=null&&n!==!1}function Mf(e,n,s=wr,u=!1){if(s){const h=s[e]||(s[e]=[]),g=n.__weh||(n.__weh=(...m)=>{Qs();const c=Ga(s),I=Jn(n,s,e,m);return c(),ea(),I});return u?h.unshift(g):h.push(g),g}}const ps=e=>(n,s=wr)=>{(!uh||e==="sp")&&Mf(e,(...u)=>n(...u),s)},MS=ps("bm"),an=ps("m"),kS=ps("bu"),LS=ps("u"),kf=ps("bum"),Ja=ps("um"),PS=ps("sp"),zS=ps("rtg"),DS=ps("rtc");function Bx(e,n=wr){Mf("ec",e,n)}function RS(e,n){if(Sr===null)return e;const s=Pf(Sr),u=e.dirs||(e.dirs=[]);for(let h=0;hn(m,c,void 0,g));else{const m=Object.keys(e);h=new Array(m.length);for(let c=0,I=m.length;c!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function rf(e){Ut(e)&&(e={loader:e});const{loader:n,loadingComponent:s,errorComponent:u,delay:h=200,timeout:g,suspensible:m=!0,onError:c}=e;let I=null,k,M=0;const A=()=>(M++,I=null,z()),z=()=>{let q;return I||(q=I=n().catch(K=>{if(K=K instanceof Error?K:new Error(String(K)),c)return new Promise((J,se)=>{c(K,()=>J(A()),()=>se(K),M+1)});throw K}).then(K=>q!==I&&I?I:(K&&(K.__esModule||K[Symbol.toStringTag]==="Module")&&(K=K.default),k=K,K)))};return Ui({name:"AsyncComponentWrapper",__asyncLoader:z,get __asyncResolved(){return k},setup(){const q=wr;if(k)return()=>nm(k,q);const K=ye=>{I=null,vc(ye,q,13,!u)};if(m&&q.suspense||uh)return z().then(ye=>()=>nm(ye,q)).catch(ye=>(K(ye),()=>u?ri(u,{error:ye}):null));const J=Lt(!1),se=Lt(),ke=Lt(!!h);return h&&setTimeout(()=>{ke.value=!1},h),g!=null&&setTimeout(()=>{if(!J.value&&!se.value){const ye=new Error(`Async component timed out after ${g}ms.`);K(ye),se.value=ye}},g),z().then(()=>{J.value=!0,q.parent&&ch(q.parent.vnode)&&(q.parent.effect.dirty=!0,Tf(q.parent.update))}).catch(ye=>{K(ye),se.value=ye}),()=>{if(J.value&&k)return nm(k,q);if(se.value&&u)return ri(u,{error:se.value});if(s&&!ke.value)return ri(s)}}})}function nm(e,n){const{ref:s,props:u,children:h,ce:g}=n.vnode,m=ri(e,u,h);return m.ref=s,m.ce=g,delete n.vnode.ce,m}function br(e,n,s={},u,h){if(Sr.isCE||Sr.parent&&nc(Sr.parent)&&Sr.parent.isCE)return n!=="default"&&(s.name=n),ri("slot",s,u&&u());let g=e[n];g&&g._c&&(g._d=!1),At();const m=g&&Fx(g(s)),c=ki(mr,{key:s.key||m&&m.key||`_${n}`},m||(u?u():[]),m&&e._===1?64:-2);return!h&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),g&&g._c&&(g._d=!0),c}function Fx(e){return e.some(n=>rh(n)?!(n.type===Ur||n.type===mr&&!Fx(n.children)):!0)?e:null}const Lm=e=>e?hb(e)?Pf(e):Lm(e.parent):null,qu=gr(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Lm(e.parent),$root:e=>Lm(e.root),$emit:e=>e.emit,$options:e=>kg(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Tf(e.update)}),$nextTick:e=>e.n||(e.n=$r.bind(e.proxy)),$watch:e=>lI.bind(e)}),om=(e,n)=>e!==$i&&!e.__isScriptSetup&&ci(e,n),BS={get({_:e},n){if(n==="__v_skip")return!0;const{ctx:s,setupState:u,data:h,props:g,accessCache:m,type:c,appContext:I}=e;let k;if(n[0]!=="$"){const q=m[n];if(q!==void 0)switch(q){case 1:return u[n];case 2:return h[n];case 4:return s[n];case 3:return g[n]}else{if(om(u,n))return m[n]=1,u[n];if(h!==$i&&ci(h,n))return m[n]=2,h[n];if((k=e.propsOptions[0])&&ci(k,n))return m[n]=3,g[n];if(s!==$i&&ci(s,n))return m[n]=4,s[n];Pm&&(m[n]=0)}}const M=qu[n];let A,z;if(M)return n==="$attrs"&&En(e.attrs,"get",""),M(e);if((A=c.__cssModules)&&(A=A[n]))return A;if(s!==$i&&ci(s,n))return m[n]=4,s[n];if(z=I.config.globalProperties,ci(z,n))return z[n]},set({_:e},n,s){const{data:u,setupState:h,ctx:g}=e;return om(h,n)?(h[n]=s,!0):u!==$i&&ci(u,n)?(u[n]=s,!0):ci(e.props,n)||n[0]==="$"&&n.slice(1)in e?!1:(g[n]=s,!0)},has({_:{data:e,setupState:n,accessCache:s,ctx:u,appContext:h,propsOptions:g}},m){let c;return!!s[m]||e!==$i&&ci(e,m)||om(n,m)||(c=g[0])&&ci(c,m)||ci(u,m)||ci(qu,m)||ci(h.config.globalProperties,m)},defineProperty(e,n,s){return s.get!=null?e._.accessCache[n]=0:ci(s,"value")&&this.set(e,n,s.value,null),Reflect.defineProperty(e,n,s)}};function FS(){return VS().attrs}function VS(){const e=ia();return e.setupContext||(e.setupContext=fb(e))}function m0(e){return jt(e)?e.reduce((n,s)=>(n[s]=null,n),{}):e}function NS(e){const n=ia();let s=e();return Bm(),_g(s)&&(s=s.catch(u=>{throw Ga(n),u})),[s,()=>Ga(n)]}let Pm=!0;function jS(e){const n=kg(e),s=e.proxy,u=e.ctx;Pm=!1,n.beforeCreate&&g0(n.beforeCreate,e,"bc");const{data:h,computed:g,methods:m,watch:c,provide:I,inject:k,created:M,beforeMount:A,mounted:z,beforeUpdate:q,updated:K,activated:J,deactivated:se,beforeDestroy:ke,beforeUnmount:ye,destroyed:Z,unmounted:fe,render:W,renderTracked:ee,renderTriggered:Se,errorCaptured:Ee,serverPrefetch:Le,expose:pe,inheritAttrs:Ie,components:Ae,directives:De,filters:Ge}=n;if(k&&$S(k,u,null),m)for(const dt in m){const nt=m[dt];Ut(nt)&&(u[dt]=nt.bind(s))}if(h){const dt=h.call(s,s);Fi(dt)&&(e.data=Oo(dt))}if(Pm=!0,g)for(const dt in g){const nt=g[dt],ei=Ut(nt)?nt.bind(s,s):Ut(nt.get)?nt.get.bind(s,s):Xn,$t=!Ut(nt)&&Ut(nt.set)?nt.set.bind(s):Xn,Vt=je({get:ei,set:$t});Object.defineProperty(u,dt,{enumerable:!0,configurable:!0,get:()=>Vt.value,set:Nt=>Vt.value=Nt})}if(c)for(const dt in c)Vx(c[dt],u,s,dt);if(I){const dt=Ut(I)?I.call(s):I;Reflect.ownKeys(dt).forEach(nt=>{ta(nt,dt[nt])})}M&&g0(M,e,"c");function Xe(dt,nt){jt(nt)?nt.forEach(ei=>dt(ei.bind(s))):nt&&dt(nt.bind(s))}if(Xe(MS,A),Xe(an,z),Xe(kS,q),Xe(LS,K),Xe(tb,J),Xe(ib,se),Xe(Bx,Ee),Xe(DS,ee),Xe(zS,Se),Xe(kf,ye),Xe(Ja,fe),Xe(PS,Le),jt(pe))if(pe.length){const dt=e.exposed||(e.exposed={});pe.forEach(nt=>{Object.defineProperty(dt,nt,{get:()=>s[nt],set:ei=>s[nt]=ei})})}else e.exposed||(e.exposed={});W&&e.render===Xn&&(e.render=W),Ie!=null&&(e.inheritAttrs=Ie),Ae&&(e.components=Ae),De&&(e.directives=De)}function $S(e,n,s=Xn){jt(e)&&(e=zm(e));for(const u in e){const h=e[u];let g;Fi(h)?"default"in h?g=Hr(h.from||u,h.default,!0):g=Hr(h.from||u):g=Hr(h),yr(g)?Object.defineProperty(n,u,{enumerable:!0,configurable:!0,get:()=>g.value,set:m=>g.value=m}):n[u]=g}}function g0(e,n,s){Jn(jt(e)?e.map(u=>u.bind(n.proxy)):e.bind(n.proxy),n,s)}function Vx(e,n,s,u){const h=u.includes(".")?eb(s,u):()=>s[u];if(ir(e)){const g=n[e];Ut(g)&&er(h,g)}else if(Ut(e))er(h,e.bind(s));else if(Fi(e))if(jt(e))e.forEach(g=>Vx(g,n,s,u));else{const g=Ut(e.handler)?e.handler.bind(s):n[e.handler];Ut(g)&&er(h,g,e)}}function kg(e){const n=e.type,{mixins:s,extends:u}=n,{mixins:h,optionsCache:g,config:{optionMergeStrategies:m}}=e.appContext,c=g.get(n);let I;return c?I=c:!h.length&&!s&&!u?I=n:(I={},h.length&&h.forEach(k=>nf(I,k,m,!0)),nf(I,n,m)),Fi(n)&&g.set(n,I),I}function nf(e,n,s,u=!1){const{mixins:h,extends:g}=n;g&&nf(e,g,s,!0),h&&h.forEach(m=>nf(e,m,s,!0));for(const m in n)if(!(u&&m==="expose")){const c=US[m]||s&&s[m];e[m]=c?c(e[m],n[m]):n[m]}return e}const US={data:y0,props:_0,emits:_0,methods:ju,computed:ju,beforeCreate:gn,created:gn,beforeMount:gn,mounted:gn,beforeUpdate:gn,updated:gn,beforeDestroy:gn,beforeUnmount:gn,destroyed:gn,unmounted:gn,activated:gn,deactivated:gn,errorCaptured:gn,serverPrefetch:gn,components:ju,directives:ju,watch:HS,provide:y0,inject:qS};function y0(e,n){return n?e?function(){return gr(Ut(e)?e.call(this,this):e,Ut(n)?n.call(this,this):n)}:n:e}function qS(e,n){return ju(zm(e),zm(n))}function zm(e){if(jt(e)){const n={};for(let s=0;s1)return s&&Ut(n)?n.call(u&&u.proxy):n}}function jx(){return!!(wr||Sr||oc)}const $x={},Ux=()=>Object.create($x),qx=e=>Object.getPrototypeOf(e)===$x;function ZS(e,n,s,u=!1){const h={},g=Ux();e.propsDefaults=Object.create(null),Hx(e,n,h,g);for(const m in e.propsOptions[0])m in h||(h[m]=void 0);s?e.props=u?h:Yl(h):e.type.props?e.props=h:e.props=g,e.attrs=g}function XS(e,n,s,u){const{props:h,attrs:g,vnode:{patchFlag:m}}=e,c=Ft(h),[I]=e.propsOptions;let k=!1;if((u||m>0)&&!(m&16)){if(m&8){const M=e.vnode.dynamicProps;for(let A=0;A{I=!0;const[z,q]=Gx(A,n,!0);gr(m,z),q&&c.push(...q)};!s&&n.mixins.length&&n.mixins.forEach(M),e.extends&&M(e.extends),e.mixins&&e.mixins.forEach(M)}if(!g&&!I)return Fi(e)&&u.set(e,Ql),Ql;if(jt(g))for(let M=0;M-1,q[1]=J<0||K-1||ci(q,"default"))&&c.push(A)}}}const k=[m,c];return Fi(e)&&u.set(e,k),k}function v0(e){return e[0]!=="$"&&!tc(e)}function x0(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function b0(e,n){return x0(e)===x0(n)}function w0(e,n){return jt(n)?n.findIndex(s=>b0(s,e)):Ut(n)&&b0(n,e)?0:-1}const Wx=e=>e[0]==="_"||e==="$stable",Lg=e=>jt(e)?e.map(Zn):[Zn(e)],KS=(e,n,s)=>{if(n._n)return n;const u=Rr((...h)=>Lg(n(...h)),s);return u._c=!1,u},Zx=(e,n,s)=>{const u=e._ctx;for(const h in e){if(Wx(h))continue;const g=e[h];if(Ut(g))n[h]=KS(h,g,u);else if(g!=null){const m=Lg(g);n[h]=()=>m}}},Xx=(e,n)=>{const s=Lg(n);e.slots.default=()=>s},JS=(e,n)=>{const s=e.slots=Ux();if(e.vnode.shapeFlag&32){const u=n._;u?(gr(s,n),rx(s,"_",u,!0)):Zx(n,s)}else n&&Xx(e,n)},YS=(e,n,s)=>{const{vnode:u,slots:h}=e;let g=!0,m=$i;if(u.shapeFlag&32){const c=n._;c?s&&c===1?g=!1:(gr(h,n),!s&&c===1&&delete h._):(g=!n.$stable,Zx(n,h)),m=n}else n&&(Xx(e,n),m={default:1});if(g)for(const c in h)!Wx(c)&&m[c]==null&&delete h[c]};function of(e,n,s,u,h=!1){if(jt(e)){e.forEach((z,q)=>of(z,n&&(jt(n)?n[q]:n),s,u,h));return}if(nc(u)&&!h)return;const g=u.shapeFlag&4?Pf(u.component):u.el,m=h?null:g,{i:c,r:I}=e,k=n&&n.r,M=c.refs===$i?c.refs={}:c.refs,A=c.setupState;if(k!=null&&k!==I&&(ir(k)?(M[k]=null,ci(A,k)&&(A[k]=null)):yr(k)&&(k.value=null)),Ut(I))Js(I,c,12,[m,M]);else{const z=ir(I),q=yr(I);if(z||q){const K=()=>{if(e.f){const J=z?ci(A,I)?A[I]:M[I]:I.value;h?jt(J)&&yg(J,g):jt(J)?J.includes(g)||J.push(g):z?(M[I]=[g],ci(A,I)&&(A[I]=M[I])):(I.value=[g],e.k&&(M[e.k]=I.value))}else z?(M[I]=m,ci(A,I)&&(A[I]=m)):q&&(I.value=m,e.k&&(M[e.k]=m))};m?(K.id=-1,wn(K,s)):K()}}}let E0=!1;const Xl=()=>{E0||(console.error("Hydration completed but contains mismatches."),E0=!0)},QS=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",eI=e=>e.namespaceURI.includes("MathML"),Md=e=>{if(QS(e))return"svg";if(eI(e))return"mathml"},kd=e=>e.nodeType===8;function tI(e){const{mt:n,p:s,o:{patchProp:u,createText:h,nextSibling:g,parentNode:m,remove:c,insert:I,createComment:k}}=e,M=(Z,fe)=>{if(!fe.hasChildNodes()){s(null,Z,fe),ef(),fe._vnode=Z;return}A(fe.firstChild,Z,null,null,null),ef(),fe._vnode=Z},A=(Z,fe,W,ee,Se,Ee=!1)=>{Ee=Ee||!!fe.dynamicChildren;const Le=kd(Z)&&Z.data==="[",pe=()=>J(Z,fe,W,ee,Se,Le),{type:Ie,ref:Ae,shapeFlag:De,patchFlag:Ge}=fe;let rt=Z.nodeType;fe.el=Z,Ge===-2&&(Ee=!1,fe.dynamicChildren=null);let Xe=null;switch(Ie){case cc:rt!==3?fe.children===""?(I(fe.el=h(""),m(Z),Z),Xe=Z):Xe=pe():(Z.data!==fe.children&&(Xl(),Z.data=fe.children),Xe=g(Z));break;case Ur:ye(Z)?(Xe=g(Z),ke(fe.el=Z.content.firstChild,Z,W)):rt!==8||Le?Xe=pe():Xe=g(Z);break;case Hu:if(Le&&(Z=g(Z),rt=Z.nodeType),rt===1||rt===3){Xe=Z;const dt=!fe.children.length;for(let nt=0;nt{Ee=Ee||!!fe.dynamicChildren;const{type:Le,props:pe,patchFlag:Ie,shapeFlag:Ae,dirs:De,transition:Ge}=fe,rt=Le==="input"||Le==="option";if(rt||Ie!==-1){De&&ko(fe,null,W,"created");let Xe=!1;if(ye(Z)){Xe=Jx(ee,Ge)&&W&&W.vnode.props&&W.vnode.props.appear;const nt=Z.content.firstChild;Xe&&Ge.beforeEnter(nt),ke(nt,Z,W),fe.el=Z=nt}if(Ae&16&&!(pe&&(pe.innerHTML||pe.textContent))){let nt=q(Z.firstChild,fe,Z,W,ee,Se,Ee);for(;nt;){Xl();const ei=nt;nt=nt.nextSibling,c(ei)}}else Ae&8&&Z.textContent!==fe.children&&(Xl(),Z.textContent=fe.children);if(pe)if(rt||!Ee||Ie&48)for(const nt in pe)(rt&&(nt.endsWith("value")||nt==="indeterminate")||lh(nt)&&!tc(nt)||nt[0]===".")&&u(Z,nt,null,pe[nt],void 0,void 0,W);else pe.onClick&&u(Z,"onClick",null,pe.onClick,void 0,void 0,W);let dt;(dt=pe&&pe.onVnodeBeforeMount)&&Wn(dt,W,fe),De&&ko(fe,null,W,"beforeMount"),((dt=pe&&pe.onVnodeMounted)||De||Xe)&&Ox(()=>{dt&&Wn(dt,W,fe),Xe&&Ge.enter(Z),De&&ko(fe,null,W,"mounted")},ee)}return Z.nextSibling},q=(Z,fe,W,ee,Se,Ee,Le)=>{Le=Le||!!fe.dynamicChildren;const pe=fe.children,Ie=pe.length;for(let Ae=0;Ae{const{slotScopeIds:Le}=fe;Le&&(Se=Se?Se.concat(Le):Le);const pe=m(Z),Ie=q(g(Z),fe,pe,W,ee,Se,Ee);return Ie&&kd(Ie)&&Ie.data==="]"?g(fe.anchor=Ie):(Xl(),I(fe.anchor=k("]"),pe,Ie),Ie)},J=(Z,fe,W,ee,Se,Ee)=>{if(Xl(),fe.el=null,Ee){const Ie=se(Z);for(;;){const Ae=g(Z);if(Ae&&Ae!==Ie)c(Ae);else break}}const Le=g(Z),pe=m(Z);return c(Z),s(null,fe,pe,Le,W,ee,Md(pe),Se),Le},se=(Z,fe="[",W="]")=>{let ee=0;for(;Z;)if(Z=g(Z),Z&&kd(Z)&&(Z.data===fe&&ee++,Z.data===W)){if(ee===0)return g(Z);ee--}return Z},ke=(Z,fe,W)=>{const ee=fe.parentNode;ee&&ee.replaceChild(Z,fe);let Se=W;for(;Se;)Se.vnode.el===fe&&(Se.vnode.el=Se.subTree.el=Z),Se=Se.parent},ye=Z=>Z.nodeType===1&&Z.tagName.toLowerCase()==="template";return[M,A]}const wn=Ox;function iI(e){return Kx(e)}function rI(e){return Kx(e,tI)}function Kx(e,n){const s=ox();s.__VUE__=!0;const{insert:u,remove:h,patchProp:g,createElement:m,createText:c,createComment:I,setText:k,setElementText:M,parentNode:A,nextSibling:z,setScopeId:q=Xn,insertStaticContent:K}=e,J=(ce,ge,Be,ae=null,He=null,tt=null,We=void 0,$e=null,Qe=!!ge.dynamicChildren)=>{if(ce===ge)return;ce&&!Po(ce,ge)&&(ae=Li(ce),Nt(ce,He,tt,!0),ce=null),ge.patchFlag===-2&&(Qe=!1,ge.dynamicChildren=null);const{type:Ze,ref:pt,shapeFlag:St}=ge;switch(Ze){case cc:se(ce,ge,Be,ae);break;case Ur:ke(ce,ge,Be,ae);break;case Hu:ce==null&&ye(ge,Be,ae,We);break;case mr:Ae(ce,ge,Be,ae,He,tt,We,$e,Qe);break;default:St&1?W(ce,ge,Be,ae,He,tt,We,$e,Qe):St&6?De(ce,ge,Be,ae,He,tt,We,$e,Qe):(St&64||St&128)&&Ze.process(ce,ge,Be,ae,He,tt,We,$e,Qe,cr)}pt!=null&&He&&of(pt,ce&&ce.ref,tt,ge||ce,!ge)},se=(ce,ge,Be,ae)=>{if(ce==null)u(ge.el=c(ge.children),Be,ae);else{const He=ge.el=ce.el;ge.children!==ce.children&&k(He,ge.children)}},ke=(ce,ge,Be,ae)=>{ce==null?u(ge.el=I(ge.children||""),Be,ae):ge.el=ce.el},ye=(ce,ge,Be,ae)=>{[ce.el,ce.anchor]=K(ce.children,ge,Be,ae,ce.el,ce.anchor)},Z=({el:ce,anchor:ge},Be,ae)=>{let He;for(;ce&&ce!==ge;)He=z(ce),u(ce,Be,ae),ce=He;u(ge,Be,ae)},fe=({el:ce,anchor:ge})=>{let Be;for(;ce&&ce!==ge;)Be=z(ce),h(ce),ce=Be;h(ge)},W=(ce,ge,Be,ae,He,tt,We,$e,Qe)=>{ge.type==="svg"?We="svg":ge.type==="math"&&(We="mathml"),ce==null?ee(ge,Be,ae,He,tt,We,$e,Qe):Le(ce,ge,He,tt,We,$e,Qe)},ee=(ce,ge,Be,ae,He,tt,We,$e)=>{let Qe,Ze;const{props:pt,shapeFlag:St,transition:vt,dirs:Mt}=ce;if(Qe=ce.el=m(ce.type,tt,pt&&pt.is,pt),St&8?M(Qe,ce.children):St&16&&Ee(ce.children,Qe,null,ae,He,sm(ce,tt),We,$e),Mt&&ko(ce,null,ae,"created"),Se(Qe,ce,ce.scopeId,We,ae),pt){for(const Ne in pt)Ne!=="value"&&!tc(Ne)&&g(Qe,Ne,null,pt[Ne],tt,ce.children,ae,He,hi);"value"in pt&&g(Qe,"value",null,pt.value,tt),(Ze=pt.onVnodeBeforeMount)&&Wn(Ze,ae,ce)}Mt&&ko(ce,null,ae,"beforeMount");const qt=Jx(He,vt);qt&&vt.beforeEnter(Qe),u(Qe,ge,Be),((Ze=pt&&pt.onVnodeMounted)||qt||Mt)&&wn(()=>{Ze&&Wn(Ze,ae,ce),qt&&vt.enter(Qe),Mt&&ko(ce,null,ae,"mounted")},He)},Se=(ce,ge,Be,ae,He)=>{if(Be&&q(ce,Be),ae)for(let tt=0;tt{for(let Ze=Qe;Ze{const $e=ge.el=ce.el;let{patchFlag:Qe,dynamicChildren:Ze,dirs:pt}=ge;Qe|=ce.patchFlag&16;const St=ce.props||$i,vt=ge.props||$i;let Mt;if(Be&&Da(Be,!1),(Mt=vt.onVnodeBeforeUpdate)&&Wn(Mt,Be,ge,ce),pt&&ko(ge,ce,Be,"beforeUpdate"),Be&&Da(Be,!0),Ze?pe(ce.dynamicChildren,Ze,$e,Be,ae,sm(ge,He),tt):We||nt(ce,ge,$e,null,Be,ae,sm(ge,He),tt,!1),Qe>0){if(Qe&16)Ie($e,ge,St,vt,Be,ae,He);else if(Qe&2&&St.class!==vt.class&&g($e,"class",null,vt.class,He),Qe&4&&g($e,"style",St.style,vt.style,He),Qe&8){const qt=ge.dynamicProps;for(let Ne=0;Ne{Mt&&Wn(Mt,Be,ge,ce),pt&&ko(ge,ce,Be,"updated")},ae)},pe=(ce,ge,Be,ae,He,tt,We)=>{for(let $e=0;$e{if(Be!==ae){if(Be!==$i)for(const $e in Be)!tc($e)&&!($e in ae)&&g(ce,$e,Be[$e],null,We,ge.children,He,tt,hi);for(const $e in ae){if(tc($e))continue;const Qe=ae[$e],Ze=Be[$e];Qe!==Ze&&$e!=="value"&&g(ce,$e,Ze,Qe,We,ge.children,He,tt,hi)}"value"in ae&&g(ce,"value",Be.value,ae.value,We)}},Ae=(ce,ge,Be,ae,He,tt,We,$e,Qe)=>{const Ze=ge.el=ce?ce.el:c(""),pt=ge.anchor=ce?ce.anchor:c("");let{patchFlag:St,dynamicChildren:vt,slotScopeIds:Mt}=ge;Mt&&($e=$e?$e.concat(Mt):Mt),ce==null?(u(Ze,Be,ae),u(pt,Be,ae),Ee(ge.children||[],Be,pt,He,tt,We,$e,Qe)):St>0&&St&64&&vt&&ce.dynamicChildren?(pe(ce.dynamicChildren,vt,Be,He,tt,We,$e),(ge.key!=null||He&&ge===He.subTree)&&Yx(ce,ge,!0)):nt(ce,ge,Be,pt,He,tt,We,$e,Qe)},De=(ce,ge,Be,ae,He,tt,We,$e,Qe)=>{ge.slotScopeIds=$e,ce==null?ge.shapeFlag&512?He.ctx.activate(ge,Be,ae,We,Qe):Ge(ge,Be,ae,He,tt,We,Qe):rt(ce,ge,Qe)},Ge=(ce,ge,Be,ae,He,tt,We)=>{const $e=ce.component=yI(ce,ae,He);if(ch(ce)&&($e.ctx.renderer=cr),_I($e),$e.asyncDep){if(He&&He.registerDep($e,Xe,We),!ce.el){const Qe=$e.subTree=ri(Ur);ke(null,Qe,ge,Be)}}else Xe($e,ce,ge,Be,He,tt,We)},rt=(ce,ge,Be)=>{const ae=ge.component=ce.component;if(xS(ce,ge,Be))if(ae.asyncDep&&!ae.asyncResolved){dt(ae,ge,Be);return}else ae.next=ge,pS(ae.update),ae.effect.dirty=!0,ae.update();else ge.el=ce.el,ae.vnode=ge},Xe=(ce,ge,Be,ae,He,tt,We)=>{const $e=()=>{if(ce.isMounted){let{next:pt,bu:St,u:vt,parent:Mt,vnode:qt}=ce;{const Gr=Qx(ce);if(Gr){pt&&(pt.el=qt.el,dt(ce,pt,We)),Gr.asyncDep.then(()=>{ce.isUnmounted||$e()});return}}let Ne=pt,Ht;Da(ce,!1),pt?(pt.el=qt.el,dt(ce,pt,We)):pt=qt,St&&em(St),(Ht=pt.props&&pt.props.onVnodeBeforeUpdate)&&Wn(Ht,Mt,pt,qt),Da(ce,!0);const si=rm(ce),ur=ce.subTree;ce.subTree=si,J(ur,si,A(ur.el),Li(ur),ce,He,tt),pt.el=si.el,Ne===null&&Ag(ce,si.el),vt&&wn(vt,He),(Ht=pt.props&&pt.props.onVnodeUpdated)&&wn(()=>Wn(Ht,Mt,pt,qt),He)}else{let pt;const{el:St,props:vt}=ge,{bm:Mt,m:qt,parent:Ne}=ce,Ht=nc(ge);if(Da(ce,!1),Mt&&em(Mt),!Ht&&(pt=vt&&vt.onVnodeBeforeMount)&&Wn(pt,Ne,ge),Da(ce,!0),St&&rr){const si=()=>{ce.subTree=rm(ce),rr(St,ce.subTree,ce,He,null)};Ht?ge.type.__asyncLoader().then(()=>!ce.isUnmounted&&si()):si()}else{const si=ce.subTree=rm(ce);J(null,si,Be,ae,ce,He,tt),ge.el=si.el}if(qt&&wn(qt,He),!Ht&&(pt=vt&&vt.onVnodeMounted)){const si=ge;wn(()=>Wn(pt,Ne,si),He)}(ge.shapeFlag&256||Ne&&nc(Ne.vnode)&&Ne.vnode.shapeFlag&256)&&ce.a&&wn(ce.a,He),ce.isMounted=!0,ge=Be=ae=null}},Qe=ce.effect=new xg($e,Xn,()=>Tf(Ze),ce.scope),Ze=ce.update=()=>{Qe.dirty&&Qe.run()};Ze.id=ce.uid,Da(ce,!0),Ze()},dt=(ce,ge,Be)=>{ge.component=ce;const ae=ce.vnode.props;ce.vnode=ge,ce.next=null,XS(ce,ge.props,ae,Be),YS(ce,ge.children,Be),Qs(),h0(ce),ea()},nt=(ce,ge,Be,ae,He,tt,We,$e,Qe=!1)=>{const Ze=ce&&ce.children,pt=ce?ce.shapeFlag:0,St=ge.children,{patchFlag:vt,shapeFlag:Mt}=ge;if(vt>0){if(vt&128){$t(Ze,St,Be,ae,He,tt,We,$e,Qe);return}else if(vt&256){ei(Ze,St,Be,ae,He,tt,We,$e,Qe);return}}Mt&8?(pt&16&&hi(Ze,He,tt),St!==Ze&&M(Be,St)):pt&16?Mt&16?$t(Ze,St,Be,ae,He,tt,We,$e,Qe):hi(Ze,He,tt,!0):(pt&8&&M(Be,""),Mt&16&&Ee(St,Be,ae,He,tt,We,$e,Qe))},ei=(ce,ge,Be,ae,He,tt,We,$e,Qe)=>{ce=ce||Ql,ge=ge||Ql;const Ze=ce.length,pt=ge.length,St=Math.min(Ze,pt);let vt;for(vt=0;vtpt?hi(ce,He,tt,!0,!1,St):Ee(ge,Be,ae,He,tt,We,$e,Qe,St)},$t=(ce,ge,Be,ae,He,tt,We,$e,Qe)=>{let Ze=0;const pt=ge.length;let St=ce.length-1,vt=pt-1;for(;Ze<=St&&Ze<=vt;){const Mt=ce[Ze],qt=ge[Ze]=Qe?Zs(ge[Ze]):Zn(ge[Ze]);if(Po(Mt,qt))J(Mt,qt,Be,null,He,tt,We,$e,Qe);else break;Ze++}for(;Ze<=St&&Ze<=vt;){const Mt=ce[St],qt=ge[vt]=Qe?Zs(ge[vt]):Zn(ge[vt]);if(Po(Mt,qt))J(Mt,qt,Be,null,He,tt,We,$e,Qe);else break;St--,vt--}if(Ze>St){if(Ze<=vt){const Mt=vt+1,qt=Mtvt)for(;Ze<=St;)Nt(ce[Ze],He,tt,!0),Ze++;else{const Mt=Ze,qt=Ze,Ne=new Map;for(Ze=qt;Ze<=vt;Ze++){const di=ge[Ze]=Qe?Zs(ge[Ze]):Zn(ge[Ze]);di.key!=null&&Ne.set(di.key,Ze)}let Ht,si=0;const ur=vt-qt+1;let Gr=!1,Ye=0;const Ot=new Array(ur);for(Ze=0;Ze=ur){Nt(di,He,tt,!0);continue}let Si;if(di.key!=null)Si=Ne.get(di.key);else for(Ht=qt;Ht<=vt;Ht++)if(Ot[Ht-qt]===0&&Po(di,ge[Ht])){Si=Ht;break}Si===void 0?Nt(di,He,tt,!0):(Ot[Si-qt]=Ze+1,Si>=Ye?Ye=Si:Gr=!0,J(di,ge[Si],Be,null,He,tt,We,$e,Qe),si++)}const zt=Gr?nI(Ot):Ql;for(Ht=zt.length-1,Ze=ur-1;Ze>=0;Ze--){const di=qt+Ze,Si=ge[di],Bt=di+1{const{el:tt,type:We,transition:$e,children:Qe,shapeFlag:Ze}=ce;if(Ze&6){Vt(ce.component.subTree,ge,Be,ae);return}if(Ze&128){ce.suspense.move(ge,Be,ae);return}if(Ze&64){We.move(ce,ge,Be,cr);return}if(We===mr){u(tt,ge,Be);for(let St=0;St$e.enter(tt),He);else{const{leave:St,delayLeave:vt,afterLeave:Mt}=$e,qt=()=>u(tt,ge,Be),Ne=()=>{St(tt,()=>{qt(),Mt&&Mt()})};vt?vt(tt,qt,Ne):Ne()}else u(tt,ge,Be)},Nt=(ce,ge,Be,ae=!1,He=!1)=>{const{type:tt,props:We,ref:$e,children:Qe,dynamicChildren:Ze,shapeFlag:pt,patchFlag:St,dirs:vt,memoIndex:Mt}=ce;if($e!=null&&of($e,null,Be,ce,!0),Mt!=null&&(ge.renderCache[Mt]=void 0),pt&256){ge.ctx.deactivate(ce);return}const qt=pt&1&&vt,Ne=!nc(ce);let Ht;if(Ne&&(Ht=We&&We.onVnodeBeforeUnmount)&&Wn(Ht,ge,ce),pt&6)zi(ce.component,Be,ae);else{if(pt&128){ce.suspense.unmount(Be,ae);return}qt&&ko(ce,null,ge,"beforeUnmount"),pt&64?ce.type.remove(ce,ge,Be,He,cr,ae):Ze&&(tt!==mr||St>0&&St&64)?hi(Ze,ge,Be,!1,!0):(tt===mr&&St&384||!He&&pt&16)&&hi(Qe,ge,Be),ae&&Ei(ce)}(Ne&&(Ht=We&&We.onVnodeUnmounted)||qt)&&wn(()=>{Ht&&Wn(Ht,ge,ce),qt&&ko(ce,null,ge,"unmounted")},Be)},Ei=ce=>{const{type:ge,el:Be,anchor:ae,transition:He}=ce;if(ge===mr){Xi(Be,ae);return}if(ge===Hu){fe(ce);return}const tt=()=>{h(Be),He&&!He.persisted&&He.afterLeave&&He.afterLeave()};if(ce.shapeFlag&1&&He&&!He.persisted){const{leave:We,delayLeave:$e}=He,Qe=()=>We(Be,tt);$e?$e(ce.el,tt,Qe):Qe()}else tt()},Xi=(ce,ge)=>{let Be;for(;ce!==ge;)Be=z(ce),h(ce),ce=Be;h(ge)},zi=(ce,ge,Be)=>{const{bum:ae,scope:He,update:tt,subTree:We,um:$e,m:Qe,a:Ze}=ce;S0(Qe),S0(Ze),ae&&em(ae),He.stop(),tt&&(tt.active=!1,Nt(We,ce,ge,Be)),$e&&wn($e,ge),wn(()=>{ce.isUnmounted=!0},ge),ge&&ge.pendingBranch&&!ge.isUnmounted&&ce.asyncDep&&!ce.asyncResolved&&ce.suspenseId===ge.pendingId&&(ge.deps--,ge.deps===0&&ge.resolve())},hi=(ce,ge,Be,ae=!1,He=!1,tt=0)=>{for(let We=tt;Wece.shapeFlag&6?Li(ce.component.subTree):ce.shapeFlag&128?ce.suspense.next():z(ce.anchor||ce.el);let Di=!1;const Or=(ce,ge,Be)=>{ce==null?ge._vnode&&Nt(ge._vnode,null,null,!0):J(ge._vnode||null,ce,ge,null,null,null,Be),Di||(Di=!0,h0(),ef(),Di=!1),ge._vnode=ce},cr={p:J,um:Nt,m:Vt,r:Ei,mt:Ge,mc:Ee,pc:nt,pbc:pe,n:Li,o:e};let Br,rr;return n&&([Br,rr]=n(cr)),{render:Or,hydrate:Br,createApp:WS(Or,Br)}}function sm({type:e,props:n},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&n&&n.encoding&&n.encoding.includes("html")?void 0:s}function Da({effect:e,update:n},s){e.allowRecurse=n.allowRecurse=s}function Jx(e,n){return(!e||e&&!e.pendingBranch)&&n&&!n.persisted}function Yx(e,n,s=!1){const u=e.children,h=n.children;if(jt(u)&&jt(h))for(let g=0;g>1,e[s[c]]0&&(n[u]=s[g-1]),s[g]=u)}}for(g=s.length,m=s[g-1];g-- >0;)s[g]=m,m=n[m];return s}function Qx(e){const n=e.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:Qx(n)}function S0(e){if(e)for(let n=0;nHr(oI);function Qn(e,n){return Lf(e,null,n)}function aI(e,n){return Lf(e,null,{flush:"post"})}const Ld={};function er(e,n,s){return Lf(e,n,s)}function Lf(e,n,{immediate:s,deep:u,flush:h,once:g,onTrack:m,onTrigger:c}=$i){if(n&&g){const ee=n;n=(...Se)=>{ee(...Se),W()}}const I=wr,k=ee=>u===!0?ee:Xs(ee,u===!1?1:void 0);let M,A=!1,z=!1;if(yr(e)?(M=()=>e.value,A=Qd(e)):$u(e)?(M=()=>k(e),A=!0):jt(e)?(z=!0,A=e.some(ee=>$u(ee)||Qd(ee)),M=()=>e.map(ee=>{if(yr(ee))return ee.value;if($u(ee))return k(ee);if(Ut(ee))return Js(ee,I,2)})):Ut(e)?n?M=()=>Js(e,I,2):M=()=>(q&&q(),Jn(e,I,3,[K])):M=Xn,n&&u){const ee=M;M=()=>Xs(ee())}let q,K=ee=>{q=Z.onStop=()=>{Js(ee,I,4),q=Z.onStop=void 0}},J;if(uh)if(K=Xn,n?s&&Jn(n,I,3,[M(),z?[]:void 0,K]):M(),h==="sync"){const ee=sI();J=ee.__watcherHandles||(ee.__watcherHandles=[])}else return Xn;let se=z?new Array(e.length).fill(Ld):Ld;const ke=()=>{if(!(!Z.active||!Z.dirty))if(n){const ee=Z.run();(u||A||(z?ee.some((Se,Ee)=>Ys(Se,se[Ee])):Ys(ee,se)))&&(q&&q(),Jn(n,I,3,[ee,se===Ld?void 0:z&&se[0]===Ld?[]:se,K]),se=ee)}else Z.run()};ke.allowRecurse=!!n;let ye;h==="sync"?ye=ke:h==="post"?ye=()=>wn(ke,I&&I.suspense):(ke.pre=!0,I&&(ke.id=I.uid),ye=()=>Tf(ke));const Z=new xg(M,Xn,ye),fe=cx(),W=()=>{Z.stop(),fe&&yg(fe.effects,Z)};return n?s?ke():se=Z.run():h==="post"?wn(Z.run.bind(Z),I&&I.suspense):Z.run(),J&&J.push(W),W}function lI(e,n,s){const u=this.proxy,h=ir(e)?e.includes(".")?eb(u,e):()=>u[e]:e.bind(u,u);let g;Ut(n)?g=n:(g=n.handler,s=n);const m=Ga(this),c=Lf(h,g.bind(u),s);return m(),c}function eb(e,n){const s=n.split(".");return()=>{let u=e;for(let h=0;h{Xs(u,n,s)});else if(ix(e)){for(const u in e)Xs(e[u],n,s);for(const u of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,u)&&Xs(e[u],n,s)}return e}const ch=e=>e.type.__isKeepAlive;function tb(e,n){rb(e,"a",n)}function ib(e,n){rb(e,"da",n)}function rb(e,n,s=wr){const u=e.__wdc||(e.__wdc=()=>{let h=s;for(;h;){if(h.isDeactivated)return;h=h.parent}return e()});if(Mf(n,u,s),s){let h=s.parent;for(;h&&h.parent;)ch(h.parent.vnode)&&cI(u,n,s,h),h=h.parent}}function cI(e,n,s,u){const h=Mf(n,e,u,!0);Ja(()=>{yg(u[n],h)},s)}const Ws=Symbol("_leaveCb"),Pd=Symbol("_enterCb");function uI(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return an(()=>{e.isMounted=!0}),kf(()=>{e.isUnmounting=!0}),e}const Hn=[Function,Array],nb={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Hn,onEnter:Hn,onAfterEnter:Hn,onEnterCancelled:Hn,onBeforeLeave:Hn,onLeave:Hn,onAfterLeave:Hn,onLeaveCancelled:Hn,onBeforeAppear:Hn,onAppear:Hn,onAfterAppear:Hn,onAppearCancelled:Hn},ob=e=>{const n=e.subTree;return n.component?ob(n.component):n},hI={name:"BaseTransition",props:nb,setup(e,{slots:n}){const s=ia(),u=uI();return()=>{const h=n.default&&ab(n.default(),!0);if(!h||!h.length)return;let g=h[0];if(h.length>1){for(const z of h)if(z.type!==Ur){g=z;break}}const m=Ft(e),{mode:c}=m;if(u.isLeaving)return am(g);const I=I0(g);if(!I)return am(g);let k=Rm(I,m,u,s,z=>k=z);sf(I,k);const M=s.subTree,A=M&&I0(M);if(A&&A.type!==Ur&&!Po(I,A)&&ob(s).type!==Ur){const z=Rm(A,m,u,s);if(sf(A,z),c==="out-in"&&I.type!==Ur)return u.isLeaving=!0,z.afterLeave=()=>{u.isLeaving=!1,s.update.active!==!1&&(s.effect.dirty=!0,s.update())},am(g);c==="in-out"&&I.type!==Ur&&(z.delayLeave=(q,K,J)=>{const se=sb(u,A);se[String(A.key)]=A,q[Ws]=()=>{K(),q[Ws]=void 0,delete k.delayedLeave},k.delayedLeave=J})}return g}}},dI=hI;function sb(e,n){const{leavingVNodes:s}=e;let u=s.get(n.type);return u||(u=Object.create(null),s.set(n.type,u)),u}function Rm(e,n,s,u,h){const{appear:g,mode:m,persisted:c=!1,onBeforeEnter:I,onEnter:k,onAfterEnter:M,onEnterCancelled:A,onBeforeLeave:z,onLeave:q,onAfterLeave:K,onLeaveCancelled:J,onBeforeAppear:se,onAppear:ke,onAfterAppear:ye,onAppearCancelled:Z}=n,fe=String(e.key),W=sb(s,e),ee=(Le,pe)=>{Le&&Jn(Le,u,9,pe)},Se=(Le,pe)=>{const Ie=pe[1];ee(Le,pe),jt(Le)?Le.every(Ae=>Ae.length<=1)&&Ie():Le.length<=1&&Ie()},Ee={mode:m,persisted:c,beforeEnter(Le){let pe=I;if(!s.isMounted)if(g)pe=se||I;else return;Le[Ws]&&Le[Ws](!0);const Ie=W[fe];Ie&&Po(e,Ie)&&Ie.el[Ws]&&Ie.el[Ws](),ee(pe,[Le])},enter(Le){let pe=k,Ie=M,Ae=A;if(!s.isMounted)if(g)pe=ke||k,Ie=ye||M,Ae=Z||A;else return;let De=!1;const Ge=Le[Pd]=rt=>{De||(De=!0,rt?ee(Ae,[Le]):ee(Ie,[Le]),Ee.delayedLeave&&Ee.delayedLeave(),Le[Pd]=void 0)};pe?Se(pe,[Le,Ge]):Ge()},leave(Le,pe){const Ie=String(e.key);if(Le[Pd]&&Le[Pd](!0),s.isUnmounting)return pe();ee(z,[Le]);let Ae=!1;const De=Le[Ws]=Ge=>{Ae||(Ae=!0,pe(),Ge?ee(J,[Le]):ee(K,[Le]),Le[Ws]=void 0,W[Ie]===e&&delete W[Ie])};W[Ie]=e,q?Se(q,[Le,De]):De()},clone(Le){const pe=Rm(Le,n,s,u,h);return h&&h(pe),pe}};return Ee}function am(e){if(ch(e))return e=Bo(e),e.children=null,e}function I0(e){if(!ch(e))return e;const{shapeFlag:n,children:s}=e;if(s){if(n&16)return s[0];if(n&32&&Ut(s.default))return s.default()}}function sf(e,n){e.shapeFlag&6&&e.component?sf(e.component.subTree,n):e.shapeFlag&128?(e.ssContent.transition=n.clone(e.ssContent),e.ssFallback.transition=n.clone(e.ssFallback)):e.transition=n}function ab(e,n=!1,s){let u=[],h=0;for(let g=0;g1)for(let g=0;ge.__isTeleport,mr=Symbol.for("v-fgt"),cc=Symbol.for("v-txt"),Ur=Symbol.for("v-cmt"),Hu=Symbol.for("v-stc"),Gu=[];let Kn=null;function At(e=!1){Gu.push(Kn=e?null:[])}function lb(){Gu.pop(),Kn=Gu[Gu.length-1]||null}let uc=1;function T0(e){uc+=e}function cb(e){return e.dynamicChildren=uc>0?Kn||Ql:null,lb(),uc>0&&Kn&&Kn.push(e),e}function wi(e,n,s,u,h,g){return cb(lr(e,n,s,u,h,g,!0))}function ki(e,n,s,u,h){return cb(ri(e,n,s,u,h,!0))}function rh(e){return e?e.__v_isVNode===!0:!1}function Po(e,n){return e.type===n.type&&e.key===n.key}const ub=({key:e})=>e??null,jd=({ref:e,ref_key:n,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ir(e)||yr(e)||Ut(e)?{i:Sr,r:e,k:n,f:!!s}:e:null);function lr(e,n=null,s=null,u=0,h=null,g=e===mr?0:1,m=!1,c=!1){const I={__v_isVNode:!0,__v_skip:!0,type:e,props:n,key:n&&ub(n),ref:n&&jd(n),scopeId:Af,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:g,patchFlag:u,dynamicProps:h,dynamicChildren:null,appContext:null,ctx:Sr};return c?(Pg(I,s),g&128&&e.normalize(I)):s&&(I.shapeFlag|=ir(s)?8:16),uc>0&&!m&&Kn&&(I.patchFlag>0||g&6)&&I.patchFlag!==32&&Kn.push(I),I}const ri=pI;function pI(e,n=null,s=null,u=0,h=null,g=!1){if((!e||e===Dx)&&(e=Ur),rh(e)){const c=Bo(e,n,!0);return s&&Pg(c,s),uc>0&&!g&&Kn&&(c.shapeFlag&6?Kn[Kn.indexOf(e)]=c:Kn.push(c)),c.patchFlag=-2,c}if(wI(e)&&(e=e.__vccOpts),n){n=af(n);let{class:c,style:I}=n;c&&!ir(c)&&(n.class=Zt(c)),Fi(I)&&(wx(I)&&!jt(I)&&(I=gr({},I)),n.style=Ha(I))}const m=ir(e)?1:bS(e)?128:fI(e)?64:Fi(e)?4:Ut(e)?2:0;return lr(e,n,s,u,h,m,g,!0)}function af(e){return e?wx(e)||qx(e)?gr({},e):e:null}function Bo(e,n,s=!1,u=!1){const{props:h,ref:g,patchFlag:m,children:c,transition:I}=e,k=n?fo(h||{},n):h,M={__v_isVNode:!0,__v_skip:!0,type:e.type,props:k,key:k&&ub(k),ref:n&&n.ref?s&&g?jt(g)?g.concat(jd(n)):[g,jd(n)]:jd(n):g,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:n&&e.type!==mr?m===-1?16:m|16:m,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:I,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Bo(e.ssContent),ssFallback:e.ssFallback&&Bo(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return I&&u&&sf(M,I.clone(M)),M}function hs(e=" ",n=0){return ri(cc,null,e,n)}function xr(e="",n=!1){return n?(At(),ki(Ur,null,e)):ri(Ur,null,e)}function Zn(e){return e==null||typeof e=="boolean"?ri(Ur):jt(e)?ri(mr,null,e.slice()):typeof e=="object"?Zs(e):ri(cc,null,String(e))}function Zs(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bo(e)}function Pg(e,n){let s=0;const{shapeFlag:u}=e;if(n==null)n=null;else if(jt(n))s=16;else if(typeof n=="object")if(u&65){const h=n.default;h&&(h._c&&(h._d=!1),Pg(e,h()),h._c&&(h._d=!0));return}else{s=32;const h=n._;!h&&!qx(n)?n._ctx=Sr:h===3&&Sr&&(Sr.slots._===1?n._=1:(n._=2,e.patchFlag|=1024))}else Ut(n)?(n={default:n,_ctx:Sr},s=32):(n=String(n),u&64?(s=16,n=[hs(n)]):s=8);e.children=n,e.shapeFlag|=s}function fo(...e){const n={};for(let s=0;swr||Sr;let lf,Om;{const e=ox(),n=(s,u)=>{let h;return(h=e[s])||(h=e[s]=[]),h.push(u),g=>{h.length>1?h.forEach(m=>m(g)):h[0](g)}};lf=n("__VUE_INSTANCE_SETTERS__",s=>wr=s),Om=n("__VUE_SSR_SETTERS__",s=>uh=s)}const Ga=e=>{const n=wr;return lf(e),e.scope.on(),()=>{e.scope.off(),lf(n)}},Bm=()=>{wr&&wr.scope.off(),lf(null)};function hb(e){return e.vnode.shapeFlag&4}let uh=!1;function _I(e,n=!1){n&&Om(n);const{props:s,children:u}=e.vnode,h=hb(e);ZS(e,s,h,n),JS(e,u);const g=h?vI(e,n):void 0;return n&&Om(!1),g}function vI(e,n){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,BS);const{setup:u}=s;if(u){const h=e.setupContext=u.length>1?fb(e):null,g=Ga(e);Qs();const m=Js(u,e,0,[e.props,h]);if(ea(),g(),_g(m)){if(m.then(Bm,Bm),n)return m.then(c=>{Fm(e,c,n)}).catch(c=>{vc(c,e,0)});e.asyncDep=m}else Fm(e,m,n)}else db(e,n)}function Fm(e,n,s){Ut(n)?e.type.__ssrInlineRender?e.ssrRender=n:e.render=n:Fi(n)&&(e.setupState=Tx(n)),db(e,s)}let C0;function db(e,n,s){const u=e.type;if(!e.render){if(!n&&C0&&!u.render){const h=u.template||kg(e).template;if(h){const{isCustomElement:g,compilerOptions:m}=e.appContext.config,{delimiters:c,compilerOptions:I}=u,k=gr(gr({isCustomElement:g,delimiters:c},m),I);u.render=C0(h,k)}}e.render=u.render||Xn}{const h=Ga(e);Qs();try{jS(e)}finally{ea(),h()}}}const xI={get(e,n){return En(e,"get",""),e[n]}};function fb(e){const n=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,xI),slots:e.slots,emit:e.emit,expose:n}}function Pf(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Tx(oS(e.exposed)),{get(n,s){if(s in n)return n[s];if(s in qu)return qu[s](e)},has(n,s){return s in n||s in qu}})):e.proxy}function bI(e,n=!0){return Ut(e)?e.displayName||e.name:e.name||n&&e.__name}function wI(e){return Ut(e)&&"__vccOpts"in e}const je=(e,n)=>sS(e,n,uh);function Fn(e,n,s){const u=arguments.length;return u===2?Fi(n)&&!jt(n)?rh(n)?ri(e,null,[n]):ri(e,n):ri(e,null,n):(u>3?s=Array.prototype.slice.call(arguments,2):u===3&&rh(s)&&(s=[s]),ri(e,n,s))}const pb="3.4.29";/** * @vue/runtime-dom v3.4.29 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const EI="http://www.w3.org/2000/svg",SI="http://www.w3.org/1998/Math/MathML",ls=typeof document<"u"?document:null,A0=ls&&ls.createElement("template"),II={insert:(e,n,s)=>{n.insertBefore(e,s||null)},remove:e=>{const n=e.parentNode;n&&n.removeChild(e)},createElement:(e,n,s,u)=>{const h=n==="svg"?ls.createElementNS(EI,e):n==="mathml"?ls.createElementNS(SI,e):s?ls.createElement(e,{is:s}):ls.createElement(e);return e==="select"&&u&&u.multiple!=null&&h.setAttribute("multiple",u.multiple),h},createText:e=>ls.createTextNode(e),createComment:e=>ls.createComment(e),setText:(e,n)=>{e.nodeValue=n},setElementText:(e,n)=>{e.textContent=n},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ls.querySelector(e),setScopeId(e,n){e.setAttribute(n,"")},insertStaticContent(e,n,s,u,h,g){const m=s?s.previousSibling:n.lastChild;if(h&&(h===g||h.nextSibling))for(;n.insertBefore(h.cloneNode(!0),s),!(h===g||!(h=h.nextSibling)););else{A0.innerHTML=u==="svg"?`${e}`:u==="mathml"?`${e}`:e;const c=A0.content;if(u==="svg"||u==="mathml"){const I=c.firstChild;for(;I.firstChild;)c.appendChild(I.firstChild);c.removeChild(I)}n.insertBefore(c,s)}return[m?m.nextSibling:n.firstChild,s?s.previousSibling:n.lastChild]}},Ns="transition",Lu="animation",nh=Symbol("_vtc"),zg=(e,{slots:n})=>Fn(dI,TI(e),n);zg.displayName="Transition";const mb={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};zg.props=mr({},nb,mb);const Ra=(e,n=[])=>{jt(e)?e.forEach(s=>s(...n)):e&&e(...n)},M0=e=>e?jt(e)?e.some(n=>n.length>1):e.length>1:!1;function TI(e){const n={};for(const Ae in e)Ae in mb||(n[Ae]=e[Ae]);if(e.css===!1)return n;const{name:s="v",type:u,duration:h,enterFromClass:g=`${s}-enter-from`,enterActiveClass:m=`${s}-enter-active`,enterToClass:c=`${s}-enter-to`,appearFromClass:I=g,appearActiveClass:k=m,appearToClass:M=c,leaveFromClass:A=`${s}-leave-from`,leaveActiveClass:z=`${s}-leave-active`,leaveToClass:q=`${s}-leave-to`}=e,K=CI(h),J=K&&K[0],se=K&&K[1],{onBeforeEnter:ke,onEnter:ye,onEnterCancelled:W,onLeave:fe,onLeaveCancelled:Z,onBeforeAppear:ee=ke,onAppear:Se=ye,onAppearCancelled:Ee=W}=n,Le=(Ae,De,Ge)=>{Oa(Ae,De?M:c),Oa(Ae,De?k:m),Ge&&Ge()},pe=(Ae,De)=>{Ae._isLeaving=!1,Oa(Ae,A),Oa(Ae,q),Oa(Ae,z),De&&De()},Ie=Ae=>(De,Ge)=>{const rt=Ae?Se:ye,Xe=()=>Le(De,Ae,Ge);Ra(rt,[De,Xe]),k0(()=>{Oa(De,Ae?I:g),js(De,Ae?M:c),M0(rt)||L0(De,u,J,Xe)})};return mr(n,{onBeforeEnter(Ae){Ra(ke,[Ae]),js(Ae,g),js(Ae,m)},onBeforeAppear(Ae){Ra(ee,[Ae]),js(Ae,I),js(Ae,k)},onEnter:Ie(!1),onAppear:Ie(!0),onLeave(Ae,De){Ae._isLeaving=!0;const Ge=()=>pe(Ae,De);js(Ae,A),js(Ae,z),kI(),k0(()=>{Ae._isLeaving&&(Oa(Ae,A),js(Ae,q),M0(fe)||L0(Ae,u,se,Ge))}),Ra(fe,[Ae,Ge])},onEnterCancelled(Ae){Le(Ae,!1),Ra(W,[Ae])},onAppearCancelled(Ae){Le(Ae,!0),Ra(Ee,[Ae])},onLeaveCancelled(Ae){pe(Ae),Ra(Z,[Ae])}})}function CI(e){if(e==null)return null;if(Fi(e))return[lm(e.enter),lm(e.leave)];{const n=lm(e);return[n,n]}}function lm(e){return nx(e)}function js(e,n){n.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[nh]||(e[nh]=new Set)).add(n)}function Oa(e,n){n.split(/\s+/).forEach(u=>u&&e.classList.remove(u));const s=e[nh];s&&(s.delete(n),s.size||(e[nh]=void 0))}function k0(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let AI=0;function L0(e,n,s,u){const h=e._endId=++AI,g=()=>{h===e._endId&&u()};if(s)return setTimeout(g,s);const{type:m,timeout:c,propCount:I}=MI(e,n);if(!m)return u();const k=m+"end";let M=0;const A=()=>{e.removeEventListener(k,z),g()},z=q=>{q.target===e&&++M>=I&&A()};setTimeout(()=>{M(s[K]||"").split(", "),h=u(`${Ns}Delay`),g=u(`${Ns}Duration`),m=P0(h,g),c=u(`${Lu}Delay`),I=u(`${Lu}Duration`),k=P0(c,I);let M=null,A=0,z=0;n===Ns?m>0&&(M=Ns,A=m,z=g.length):n===Lu?k>0&&(M=Lu,A=k,z=I.length):(A=Math.max(m,k),M=A>0?m>k?Ns:Lu:null,z=M?M===Ns?g.length:I.length:0);const q=M===Ns&&/\b(transform|all)(,|$)/.test(u(`${Ns}Property`).toString());return{type:M,timeout:A,propCount:z,hasTransform:q}}function P0(e,n){for(;e.lengthz0(s)+z0(e[u])))}function z0(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function kI(){return document.body.offsetHeight}function LI(e,n,s){const u=e[nh];u&&(n=(n?[n,...u]:[...u]).join(" ")),n==null?e.removeAttribute("class"):s?e.setAttribute("class",n):e.className=n}const cf=Symbol("_vod"),gb=Symbol("_vsh"),PI={beforeMount(e,{value:n},{transition:s}){e[cf]=e.style.display==="none"?"":e.style.display,s&&n?s.beforeEnter(e):Pu(e,n)},mounted(e,{value:n},{transition:s}){s&&n&&s.enter(e)},updated(e,{value:n,oldValue:s},{transition:u}){!n!=!s&&(u?n?(u.beforeEnter(e),Pu(e,!0),u.enter(e)):u.leave(e,()=>{Pu(e,!1)}):Pu(e,n))},beforeUnmount(e,{value:n}){Pu(e,n)}};function Pu(e,n){e.style.display=n?e[cf]:"none",e[gb]=!n}const yb=Symbol("");function xD(e){const n=ia();if(!n)return;const s=n.ut=(h=e(n.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${n.uid}"]`)).forEach(g=>Nm(g,h))},u=()=>{const h=e(n.proxy);Vm(n.subTree,h),s(h)};an(()=>{aI(u);const h=new MutationObserver(u);h.observe(n.subTree.el.parentNode,{childList:!0}),Ja(()=>h.disconnect())})}function Vm(e,n){if(e.shapeFlag&128){const s=e.suspense;e=s.activeBranch,s.pendingBranch&&!s.isHydrating&&s.effects.push(()=>{Vm(s.activeBranch,n)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Nm(e.el,n);else if(e.type===xr)e.children.forEach(s=>Vm(s,n));else if(e.type===Hu){let{el:s,anchor:u}=e;for(;s&&(Nm(s,n),s!==u);)s=s.nextSibling}}function Nm(e,n){if(e.nodeType===1){const s=e.style;let u="";for(const h in n)s.setProperty(`--${h}`,n[h]),u+=`--${h}: ${n[h]};`;s[yb]=u}}const zI=/(^|;)\s*display\s*:/;function DI(e,n,s){const u=e.style,h=ir(s);let g=!1;if(s&&!h){if(n)if(ir(n))for(const m of n.split(";")){const c=m.slice(0,m.indexOf(":")).trim();s[c]==null&&$d(u,c,"")}else for(const m in n)s[m]==null&&$d(u,m,"");for(const m in s)m==="display"&&(g=!0),$d(u,m,s[m])}else if(h){if(n!==s){const m=u[yb];m&&(s+=";"+m),u.cssText=s,g=zI.test(s)}}else n&&e.removeAttribute("style");cf in e&&(e[cf]=g?u.display:"",e[gb]&&(u.display="none"))}const D0=/\s*!important$/;function $d(e,n,s){if(jt(s))s.forEach(u=>$d(e,n,u));else if(s==null&&(s=""),n.startsWith("--"))e.setProperty(n,s);else{const u=RI(e,n);D0.test(s)?e.setProperty(_c(u),s.replace(D0,""),"important"):e[u]=s}}const R0=["Webkit","Moz","ms"],cm={};function RI(e,n){const s=cm[n];if(s)return s;let u=Ro(n);if(u!=="filter"&&u in e)return cm[n]=u;u=Sf(u);for(let h=0;hum||(jI.then(()=>um=0),um=Date.now());function UI(e,n){const s=u=>{if(!u._vts)u._vts=Date.now();else if(u._vts<=s.attached)return;Jn(qI(u,s.value),n,5,[u])};return s.value=e,s.attached=$I(),s}function qI(e,n){if(jt(n)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},n.map(u=>h=>!h._stopped&&u&&u(h))}else return n}const N0=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,HI=(e,n,s,u,h,g,m,c,I)=>{const k=h==="svg";n==="class"?LI(e,u,k):n==="style"?DI(e,s,u):lh(n)?gg(n)||VI(e,n,s,u,m):(n[0]==="."?(n=n.slice(1),!0):n[0]==="^"?(n=n.slice(1),!1):GI(e,n,u,k))?(OI(e,n,u,g,m,c,I),(n==="value"||n==="checked"||n==="selected")&&B0(e,n,u,k,m,n!=="value")):(n==="true-value"?e._trueValue=u:n==="false-value"&&(e._falseValue=u),B0(e,n,u,k))};function GI(e,n,s,u){if(u)return!!(n==="innerHTML"||n==="textContent"||n in e&&N0(n)&&Ut(s));if(n==="spellcheck"||n==="draggable"||n==="translate"||n==="form"||n==="list"&&e.tagName==="INPUT"||n==="type"&&e.tagName==="TEXTAREA")return!1;if(n==="width"||n==="height"){const h=e.tagName;if(h==="IMG"||h==="VIDEO"||h==="CANVAS"||h==="SOURCE")return!1}return N0(n)&&ir(s)?!1:n in e}const _b=mr({patchProp:HI},II);let Zu,j0=!1;function ZI(){return Zu||(Zu=iI(_b))}function WI(){return Zu=j0?Zu:rI(_b),j0=!0,Zu}const XI=(...e)=>{const n=ZI().createApp(...e),{mount:s}=n;return n.mount=u=>{const h=xb(u);if(!h)return;const g=n._component;!Ut(g)&&!g.render&&!g.template&&(g.template=h.innerHTML),h.innerHTML="";const m=s(h,!1,vb(h));return h instanceof Element&&(h.removeAttribute("v-cloak"),h.setAttribute("data-v-app","")),m},n},KI=(...e)=>{const n=WI().createApp(...e),{mount:s}=n;return n.mount=u=>{const h=xb(u);if(h)return s(h,!0,vb(h))},n};function vb(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function xb(e){return ir(e)?document.querySelector(e):e}const JI=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,YI=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,QI=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function eT(e,n){if(e==="__proto__"||e==="constructor"&&n&&typeof n=="object"&&"prototype"in n){tT(e);return}return n}function tT(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function uf(e,n={}){if(typeof e!="string")return e;const s=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return s.slice(1,-1);if(s.length<=9){const u=s.toLowerCase();if(u==="true")return!0;if(u==="false")return!1;if(u==="undefined")return;if(u==="null")return null;if(u==="nan")return Number.NaN;if(u==="infinity")return Number.POSITIVE_INFINITY;if(u==="-infinity")return Number.NEGATIVE_INFINITY}if(!QI.test(e)){if(n.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(JI.test(e)||YI.test(e)){if(n.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,eT)}return JSON.parse(e)}catch(u){if(n.strict)throw u;return e}}const iT=/#/g,rT=/&/g,nT=/\//g,oT=/=/g,Dg=/\+/g,sT=/%5e/gi,aT=/%60/gi,lT=/%7c/gi,cT=/%20/gi;function uT(e){return encodeURI(""+e).replace(lT,"|")}function jm(e){return uT(typeof e=="string"?e:JSON.stringify(e)).replace(Dg,"%2B").replace(cT,"+").replace(iT,"%23").replace(rT,"%26").replace(aT,"`").replace(sT,"^").replace(nT,"%2F")}function hm(e){return jm(e).replace(oT,"%3D")}function hf(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function hT(e){return hf(e.replace(Dg," "))}function dT(e){return hf(e.replace(Dg," "))}function Rg(e=""){const n={};e[0]==="?"&&(e=e.slice(1));for(const s of e.split("&")){const u=s.match(/([^=]+)=?(.*)/)||[];if(u.length<2)continue;const h=hT(u[1]);if(h==="__proto__"||h==="constructor")continue;const g=dT(u[2]||"");n[h]===void 0?n[h]=g:Array.isArray(n[h])?n[h].push(g):n[h]=[n[h],g]}return n}function fT(e,n){return(typeof n=="number"||typeof n=="boolean")&&(n=String(n)),n?Array.isArray(n)?n.map(s=>`${hm(e)}=${jm(s)}`).join("&"):`${hm(e)}=${jm(n)}`:hm(e)}function bb(e){return Object.keys(e).filter(n=>e[n]!==void 0).map(n=>fT(n,e[n])).filter(Boolean).join("&")}const pT=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,mT=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,gT=/^([/\\]\s*){2,}[^/\\]/,yT=/^[\s\0]*(blob|data|javascript|vbscript):$/i,_T=/\/$|\/\?|\/#/,vT=/^\.?\//;function ra(e,n={}){return typeof n=="boolean"&&(n={acceptRelative:n}),n.strict?pT.test(e):mT.test(e)||(n.acceptRelative?gT.test(e):!1)}function xT(e){return!!e&&yT.test(e)}function $m(e="",n){return n?_T.test(e):e.endsWith("/")}function zf(e="",n){if(!n)return($m(e)?e.slice(0,-1):e)||"/";if(!$m(e,!0))return e||"/";let s=e,u="";const h=e.indexOf("#");h>=0&&(s=e.slice(0,h),u=e.slice(h));const[g,...m]=s.split("?");return((g.endsWith("/")?g.slice(0,-1):g)||"/")+(m.length>0?`?${m.join("?")}`:"")+u}function df(e="",n){if(!n)return e.endsWith("/")?e:e+"/";if($m(e,!0))return e||"/";let s=e,u="";const h=e.indexOf("#");if(h>=0&&(s=e.slice(0,h),u=e.slice(h),!s))return u;const[g,...m]=s.split("?");return g+"/"+(m.length>0?`?${m.join("?")}`:"")+u}function bT(e=""){return e.startsWith("/")}function $0(e=""){return bT(e)?e:"/"+e}function wT(e,n){if(wb(n)||ra(e))return e;const s=zf(n);return e.startsWith(s)?e:hh(s,e)}function ET(e,n){if(wb(n))return e;const s=zf(n);if(!e.startsWith(s))return e;const u=e.slice(s.length);return u[0]==="/"?u:"/"+u}function Og(e,n){const s=TT(e),u={...Rg(s.search),...n};return s.search=bb(u),Ib(s)}function wb(e){return!e||e==="/"}function ST(e){return e&&e!=="/"}function hh(e,...n){let s=e||"";for(const u of n.filter(h=>ST(h)))if(s){const h=u.replace(vT,"");s=df(s)+h}else s=u;return s}function Eb(...e){var m,c,I,k;const n=/\/(?!\/)/,s=e.filter(Boolean),u=[];let h=0;for(const M of s)if(!(!M||M==="/")){for(const[A,z]of M.split(n).entries())if(!(!z||z===".")){if(z===".."){if(u.length===1&&ra(u[0]))continue;u.pop(),h--;continue}if(A===1&&((m=u[u.length-1])!=null&&m.endsWith(":/"))){u[u.length-1]+="/"+z;continue}u.push(z),h++}}let g=u.join("/");return h>=0?(c=s[0])!=null&&c.startsWith("/")&&!g.startsWith("/")?g="/"+g:(I=s[0])!=null&&I.startsWith("./")&&!g.startsWith("./")&&(g="./"+g):g="../".repeat(-1*h)+g,(k=s[s.length-1])!=null&&k.endsWith("/")&&!g.endsWith("/")&&(g+="/"),g}function IT(e,n,s={}){return s.trailingSlash||(e=df(e),n=df(n)),s.leadingSlash||(e=$0(e),n=$0(n)),s.encoding||(e=hf(e),n=hf(n)),e===n}const Sb=Symbol.for("ufo:protocolRelative");function TT(e="",n){const s=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(s){const[,A,z=""]=s;return{protocol:A.toLowerCase(),pathname:z,href:A+z,auth:"",host:"",search:"",hash:""}}if(!ra(e,{acceptRelative:!0}))return U0(e);const[,u="",h,g=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,m="",c=""]=g.match(/([^#/?]*)(.*)?/)||[],{pathname:I,search:k,hash:M}=U0(c.replace(/\/(?=[A-Za-z]:)/,""));return{protocol:u.toLowerCase(),auth:h?h.slice(0,Math.max(0,h.length-1)):"",host:m,pathname:I,search:k,hash:M,[Sb]:!u}}function U0(e=""){const[n="",s="",u=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:n,search:s,hash:u}}function Ib(e){const n=e.pathname||"",s=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",u=e.hash||"",h=e.auth?e.auth+"@":"",g=e.host||"";return(e.protocol||e[Sb]?(e.protocol||"")+"//":"")+h+g+n+s+u}class CT extends Error{constructor(n,s){super(n,s),this.name="FetchError",s!=null&&s.cause&&!this.cause&&(this.cause=s.cause)}}function AT(e){var I,k,M,A,z;const n=((I=e.error)==null?void 0:I.message)||((k=e.error)==null?void 0:k.toString())||"",s=((M=e.request)==null?void 0:M.method)||((A=e.options)==null?void 0:A.method)||"GET",u=((z=e.request)==null?void 0:z.url)||String(e.request)||"/",h=`[${s}] ${JSON.stringify(u)}`,g=e.response?`${e.response.status} ${e.response.statusText}`:"",m=`${h}: ${g}${n?` ${n}`:""}`,c=new CT(m,e.error?{cause:e.error}:void 0);for(const q of["request","options","response"])Object.defineProperty(c,q,{get(){return e[q]}});for(const[q,K]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(c,q,{get(){return e.response&&e.response[K]}});return c}const MT=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function q0(e="GET"){return MT.has(e.toUpperCase())}function kT(e){if(e===void 0)return!1;const n=typeof e;return n==="string"||n==="number"||n==="boolean"||n===null?!0:n!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const LT=new Set(["image/svg","application/xml","application/xhtml","application/html"]),PT=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function zT(e=""){if(!e)return"json";const n=e.split(";").shift()||"";return PT.test(n)?"json":LT.has(n)||n.startsWith("text/")?"text":"blob"}function DT(e,n,s=globalThis.Headers){const u={...n,...e};if(n!=null&&n.params&&(e!=null&&e.params)&&(u.params={...n==null?void 0:n.params,...e==null?void 0:e.params}),n!=null&&n.query&&(e!=null&&e.query)&&(u.query={...n==null?void 0:n.query,...e==null?void 0:e.query}),n!=null&&n.headers&&(e!=null&&e.headers)){u.headers=new s((n==null?void 0:n.headers)||{});for(const[h,g]of new s((e==null?void 0:e.headers)||{}))u.headers.set(h,g)}return u}const RT=new Set([408,409,425,429,500,502,503,504]),OT=new Set([101,204,205,304]);function Tb(e={}){const{fetch:n=globalThis.fetch,Headers:s=globalThis.Headers,AbortController:u=globalThis.AbortController}=e;async function h(c){const I=c.error&&c.error.name==="AbortError"&&!c.options.timeout||!1;if(c.options.retry!==!1&&!I){let M;typeof c.options.retry=="number"?M=c.options.retry:M=q0(c.options.method)?0:1;const A=c.response&&c.response.status||500;if(M>0&&(Array.isArray(c.options.retryStatusCodes)?c.options.retryStatusCodes.includes(A):RT.has(A))){const z=c.options.retryDelay||0;return z>0&&await new Promise(q=>setTimeout(q,z)),g(c.request,{...c.options,retry:M-1})}}const k=AT(c);throw Error.captureStackTrace&&Error.captureStackTrace(k,g),k}const g=async function(I,k={}){var q;const M={request:I,options:DT(k,e.defaults,s),response:void 0,error:void 0};M.options.method=(q=M.options.method)==null?void 0:q.toUpperCase(),M.options.onRequest&&await M.options.onRequest(M),typeof M.request=="string"&&(M.options.baseURL&&(M.request=wT(M.request,M.options.baseURL)),(M.options.query||M.options.params)&&(M.request=Og(M.request,{...M.options.params,...M.options.query}))),M.options.body&&q0(M.options.method)&&(kT(M.options.body)?(M.options.body=typeof M.options.body=="string"?M.options.body:JSON.stringify(M.options.body),M.options.headers=new s(M.options.headers||{}),M.options.headers.has("content-type")||M.options.headers.set("content-type","application/json"),M.options.headers.has("accept")||M.options.headers.set("accept","application/json")):("pipeTo"in M.options.body&&typeof M.options.body.pipeTo=="function"||typeof M.options.body.pipe=="function")&&("duplex"in M.options||(M.options.duplex="half")));let A;if(!M.options.signal&&M.options.timeout){const K=new u;A=setTimeout(()=>K.abort(),M.options.timeout),M.options.signal=K.signal}try{M.response=await n(M.request,M.options)}catch(K){return M.error=K,M.options.onRequestError&&await M.options.onRequestError(M),await h(M)}finally{A&&clearTimeout(A)}if(M.response.body&&!OT.has(M.response.status)&&M.options.method!=="HEAD"){const K=(M.options.parseResponse?"json":M.options.responseType)||zT(M.response.headers.get("content-type")||"");switch(K){case"json":{const J=await M.response.text(),se=M.options.parseResponse||uf;M.response._data=se(J);break}case"stream":{M.response._data=M.response.body;break}default:M.response._data=await M.response[K]()}}return M.options.onResponse&&await M.options.onResponse(M),!M.options.ignoreResponseError&&M.response.status>=400&&M.response.status<600?(M.options.onResponseError&&await M.options.onResponseError(M),await h(M)):M.response},m=async function(I,k){return(await g(I,k))._data};return m.raw=g,m.native=(...c)=>n(...c),m.create=(c={})=>Tb({...e,defaults:{...e.defaults,...c}}),m}const Bg=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),BT=Bg.fetch||(()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!"))),FT=Bg.Headers,VT=Bg.AbortController,NT=Tb({fetch:BT,Headers:FT,AbortController:VT}),jT=NT,$T=()=>{var e;return((e=window==null?void 0:window.__NUXT__)==null?void 0:e.config)||{}},ff=$T().app,UT=()=>ff.baseURL,qT=()=>ff.buildAssetsDir,Fg=(...e)=>Eb(Cb(),qT(),...e),Cb=(...e)=>{const n=ff.cdnURL||ff.baseURL;return e.length?Eb(n,...e):n};globalThis.__buildAssetsURL=Fg,globalThis.__publicAssetsURL=Cb;globalThis.$fetch||(globalThis.$fetch=jT.create({baseURL:UT()}));function Um(e,n={},s){for(const u in e){const h=e[u],g=s?`${s}:${u}`:u;typeof h=="object"&&h!==null?Um(h,n,g):typeof h=="function"&&(n[g]=h)}return n}const HT={run:e=>e()},GT=()=>HT,Ab=typeof console.createTask<"u"?console.createTask:GT;function ZT(e,n){const s=n.shift(),u=Ab(s);return e.reduce((h,g)=>h.then(()=>u.run(()=>g(...n))),Promise.resolve())}function WT(e,n){const s=n.shift(),u=Ab(s);return Promise.all(e.map(h=>u.run(()=>h(...n))))}function dm(e,n){for(const s of[...e])s(n)}class XT{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(n,s,u={}){if(!n||typeof s!="function")return()=>{};const h=n;let g;for(;this._deprecatedHooks[n];)g=this._deprecatedHooks[n],n=g.to;if(g&&!u.allowDeprecated){let m=g.message;m||(m=`${h} hook has been deprecated`+(g.to?`, please use ${g.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(m)||(console.warn(m),this._deprecatedMessages.add(m))}if(!s.name)try{Object.defineProperty(s,"name",{get:()=>"_"+n.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[n]=this._hooks[n]||[],this._hooks[n].push(s),()=>{s&&(this.removeHook(n,s),s=void 0)}}hookOnce(n,s){let u,h=(...g)=>(typeof u=="function"&&u(),u=void 0,h=void 0,s(...g));return u=this.hook(n,h),u}removeHook(n,s){if(this._hooks[n]){const u=this._hooks[n].indexOf(s);u!==-1&&this._hooks[n].splice(u,1),this._hooks[n].length===0&&delete this._hooks[n]}}deprecateHook(n,s){this._deprecatedHooks[n]=typeof s=="string"?{to:s}:s;const u=this._hooks[n]||[];delete this._hooks[n];for(const h of u)this.hook(n,h)}deprecateHooks(n){Object.assign(this._deprecatedHooks,n);for(const s in n)this.deprecateHook(s,n[s])}addHooks(n){const s=Um(n),u=Object.keys(s).map(h=>this.hook(h,s[h]));return()=>{for(const h of u.splice(0,u.length))h()}}removeHooks(n){const s=Um(n);for(const u in s)this.removeHook(u,s[u])}removeAllHooks(){for(const n in this._hooks)delete this._hooks[n]}callHook(n,...s){return s.unshift(n),this.callHookWith(ZT,n,...s)}callHookParallel(n,...s){return s.unshift(n),this.callHookWith(WT,n,...s)}callHookWith(n,s,...u){const h=this._before||this._after?{name:s,args:u,context:{}}:void 0;this._before&&dm(this._before,h);const g=n(s in this._hooks?[...this._hooks[s]]:[],u);return g instanceof Promise?g.finally(()=>{this._after&&h&&dm(this._after,h)}):(this._after&&h&&dm(this._after,h),g)}beforeEach(n){return this._before=this._before||[],this._before.push(n),()=>{if(this._before!==void 0){const s=this._before.indexOf(n);s!==-1&&this._before.splice(s,1)}}}afterEach(n){return this._after=this._after||[],this._after.push(n),()=>{if(this._after!==void 0){const s=this._after.indexOf(n);s!==-1&&this._after.splice(s,1)}}}}function Mb(){return new XT}function KT(e={}){let n,s=!1;const u=m=>{if(n&&n!==m)throw new Error("Context conflict")};let h;if(e.asyncContext){const m=e.AsyncLocalStorage||globalThis.AsyncLocalStorage;m?h=new m:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const g=()=>{if(h&&n===void 0){const m=h.getStore();if(m!==void 0)return m}return n};return{use:()=>{const m=g();if(m===void 0)throw new Error("Context is not available");return m},tryUse:()=>g(),set:(m,c)=>{c||u(m),n=m,s=!0},unset:()=>{n=void 0,s=!1},call:(m,c)=>{u(m),n=m;try{return h?h.run(m,c):c()}finally{s||(n=void 0)}},async callAsync(m,c){n=m;const I=()=>{n=m},k=()=>n===m?I:void 0;qm.add(k);try{const M=h?h.run(m,c):c();return s||(n=void 0),await M}finally{qm.delete(k)}}}}function JT(e={}){const n={};return{get(s,u={}){return n[s]||(n[s]=KT({...e,...u})),n[s],n[s]}}}const pf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},H0="__unctx__",YT=pf[H0]||(pf[H0]=JT()),QT=(e,n={})=>YT.get(e,n),G0="__unctx_async_handlers__",qm=pf[G0]||(pf[G0]=new Set);function kb(e){const n=[];for(const h of qm){const g=h();g&&n.push(g)}const s=()=>{for(const h of n)h()};let u=e();return u&&typeof u=="object"&&"catch"in u&&(u=u.catch(h=>{throw s(),h})),[u,s]}const eC={componentName:"NuxtLink"},tC=null,iC="#__nuxt",Lb="nuxt-app",Z0=36e5;function Pb(e=Lb){return QT(e,{asyncContext:!1})}const rC="__nuxt_plugin";function nC(e){let n=0;const s={_name:Lb,_scope:OE(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.12.2"},get vue(){return s.vueApp.version}},payload:Yl({data:Yl({}),state:Oo({}),once:new Set,_errors:Yl({})}),static:{data:{}},runWithContext(h){return s._scope.active&&!cx()?s._scope.run(()=>W0(s,h)):W0(s,h)},isHydrating:!0,deferHydration(){if(!s.isHydrating)return()=>{};n++;let h=!1;return()=>{if(!h&&(h=!0,n--,n===0))return s.isHydrating=!1,s.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:Yl({}),_payloadRevivers:{},...e};if(window.__NUXT__)for(const h in window.__NUXT__)switch(h){case"data":case"state":case"_errors":Object.assign(s.payload[h],window.__NUXT__[h]);break;default:s.payload[h]=window.__NUXT__[h]}s.hooks=Mb(),s.hook=s.hooks.hook,s.callHook=s.hooks.callHook,s.provide=(h,g)=>{const m="$"+h;zd(s,m,g),zd(s.vueApp.config.globalProperties,m,g)},zd(s.vueApp,"$nuxt",s),zd(s.vueApp.config.globalProperties,"$nuxt",s);{window.addEventListener("nuxt.preloadError",g=>{s.callHook("app:chunkError",{error:g.payload})}),window.useNuxtApp=window.useNuxtApp||Wi;const h=s.hook("app:error",(...g)=>{console.error("[nuxt] error caught during app initialization",...g)});s.hook("app:mounted",h)}const u=s.payload.config;return s.provide("config",u),s}function oC(e,n){n.hooks&&e.hooks.addHooks(n.hooks)}async function sC(e,n){if(typeof n=="function"){const{provide:s}=await e.runWithContext(()=>n(e))||{};if(s&&typeof s=="object")for(const u in s)e.provide(u,s[u])}}async function aC(e,n){const s=[],u=[],h=[],g=[];let m=0;async function c(I){var M;const k=((M=I.dependsOn)==null?void 0:M.filter(A=>n.some(z=>z._name===A)&&!s.includes(A)))??[];if(k.length>0)u.push([new Set(k),I]);else{const A=sC(e,I).then(async()=>{I._name&&(s.push(I._name),await Promise.all(u.map(async([z,q])=>{z.has(I._name)&&(z.delete(I._name),z.size===0&&(m++,await c(q)))})))});I.parallel?h.push(A.catch(z=>g.push(z))):await A}}for(const I of n)oC(e,I);for(const I of n)await c(I);if(await Promise.all(h),m)for(let I=0;I{}),e,{[rC]:!0,_name:n})}function W0(e,n,s){const u=()=>n();return Pb(e._name).set(e),e.vueApp.runWithContext(u)}function lC(e){var s;let n;return jx()&&(n=(s=ia())==null?void 0:s.appContext.app.$nuxt),n=n||Pb(e).tryUse(),n||null}function Wi(e){const n=lC(e);if(!n)throw new Error("[nuxt] instance unavailable");return n}function hc(e){return Wi().$config}function zd(e,n,s){Object.defineProperty(e,n,{get:()=>s})}const X0=Object.freeze({ignoreUnknown:!1,respectType:!1,respectFunctionNames:!1,respectFunctionProperties:!1,unorderedObjects:!0,unorderedArrays:!1,unorderedSets:!1,excludeKeys:void 0,excludeValues:void 0,replacer:void 0});function K0(e,n){n?n={...X0,...n}:n=X0;const s=zb(n);return s.dispatch(e),s.toString()}const cC=Object.freeze(["prototype","__proto__","constructor"]);function zb(e){let n="",s=new Map;const u=h=>{n+=h};return{toString(){return n},getContext(){return s},dispatch(h){return e.replacer&&(h=e.replacer(h)),this[h===null?"null":typeof h](h)},object(h){if(h&&typeof h.toJSON=="function")return this.object(h.toJSON());const g=Object.prototype.toString.call(h);let m="";const c=g.length;c<10?m="unknown:["+g+"]":m=g.slice(8,c-1),m=m.toLowerCase();let I=null;if((I=s.get(h))===void 0)s.set(h,s.size);else return this.dispatch("[CIRCULAR:"+I+"]");if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(h))return u("buffer:"),u(h.toString("utf8"));if(m!=="object"&&m!=="function"&&m!=="asyncfunction")this[m]?this[m](h):e.ignoreUnknown||this.unkown(h,m);else{let k=Object.keys(h);e.unorderedObjects&&(k=k.sort());let M=[];e.respectType!==!1&&!J0(h)&&(M=cC),e.excludeKeys&&(k=k.filter(z=>!e.excludeKeys(z)),M=M.filter(z=>!e.excludeKeys(z))),u("object:"+(k.length+M.length)+":");const A=z=>{this.dispatch(z),u(":"),e.excludeValues||this.dispatch(h[z]),u(",")};for(const z of k)A(z);for(const z of M)A(z)}},array(h,g){if(g=g===void 0?e.unorderedArrays!==!1:g,u("array:"+h.length+":"),!g||h.length<=1){for(const I of h)this.dispatch(I);return}const m=new Map,c=h.map(I=>{const k=zb(e);k.dispatch(I);for(const[M,A]of k.getContext())m.set(M,A);return k.toString()});return s=m,c.sort(),this.array(c,!1)},date(h){return u("date:"+h.toJSON())},symbol(h){return u("symbol:"+h.toString())},unkown(h,g){if(u(g),!!h&&(u(":"),h&&typeof h.entries=="function"))return this.array(Array.from(h.entries()),!0)},error(h){return u("error:"+h.toString())},boolean(h){return u("bool:"+h)},string(h){u("string:"+h.length+":"),u(h)},function(h){u("fn:"),J0(h)?this.dispatch("[native]"):this.dispatch(h.toString()),e.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(h.name)),e.respectFunctionProperties&&this.object(h)},number(h){return u("number:"+h)},xml(h){return u("xml:"+h.toString())},null(){return u("Null")},undefined(){return u("Undefined")},regexp(h){return u("regex:"+h.toString())},uint8array(h){return u("uint8array:"),this.dispatch(Array.prototype.slice.call(h))},uint8clampedarray(h){return u("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(h))},int8array(h){return u("int8array:"),this.dispatch(Array.prototype.slice.call(h))},uint16array(h){return u("uint16array:"),this.dispatch(Array.prototype.slice.call(h))},int16array(h){return u("int16array:"),this.dispatch(Array.prototype.slice.call(h))},uint32array(h){return u("uint32array:"),this.dispatch(Array.prototype.slice.call(h))},int32array(h){return u("int32array:"),this.dispatch(Array.prototype.slice.call(h))},float32array(h){return u("float32array:"),this.dispatch(Array.prototype.slice.call(h))},float64array(h){return u("float64array:"),this.dispatch(Array.prototype.slice.call(h))},arraybuffer(h){return u("arraybuffer:"),this.dispatch(new Uint8Array(h))},url(h){return u("url:"+h.toString())},map(h){u("map:");const g=[...h];return this.array(g,e.unorderedSets!==!1)},set(h){u("set:");const g=[...h];return this.array(g,e.unorderedSets!==!1)},file(h){return u("file:"),this.dispatch([h.name,h.size,h.type,h.lastModfied])},blob(){if(e.ignoreUnknown)return u("[blob]");throw new Error(`Hashing Blob objects is currently not supported +**/const EI="http://www.w3.org/2000/svg",SI="http://www.w3.org/1998/Math/MathML",ls=typeof document<"u"?document:null,A0=ls&&ls.createElement("template"),II={insert:(e,n,s)=>{n.insertBefore(e,s||null)},remove:e=>{const n=e.parentNode;n&&n.removeChild(e)},createElement:(e,n,s,u)=>{const h=n==="svg"?ls.createElementNS(EI,e):n==="mathml"?ls.createElementNS(SI,e):s?ls.createElement(e,{is:s}):ls.createElement(e);return e==="select"&&u&&u.multiple!=null&&h.setAttribute("multiple",u.multiple),h},createText:e=>ls.createTextNode(e),createComment:e=>ls.createComment(e),setText:(e,n)=>{e.nodeValue=n},setElementText:(e,n)=>{e.textContent=n},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ls.querySelector(e),setScopeId(e,n){e.setAttribute(n,"")},insertStaticContent(e,n,s,u,h,g){const m=s?s.previousSibling:n.lastChild;if(h&&(h===g||h.nextSibling))for(;n.insertBefore(h.cloneNode(!0),s),!(h===g||!(h=h.nextSibling)););else{A0.innerHTML=u==="svg"?`${e}`:u==="mathml"?`${e}`:e;const c=A0.content;if(u==="svg"||u==="mathml"){const I=c.firstChild;for(;I.firstChild;)c.appendChild(I.firstChild);c.removeChild(I)}n.insertBefore(c,s)}return[m?m.nextSibling:n.firstChild,s?s.previousSibling:n.lastChild]}},Ns="transition",Lu="animation",nh=Symbol("_vtc"),zg=(e,{slots:n})=>Fn(dI,TI(e),n);zg.displayName="Transition";const mb={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};zg.props=gr({},nb,mb);const Ra=(e,n=[])=>{jt(e)?e.forEach(s=>s(...n)):e&&e(...n)},M0=e=>e?jt(e)?e.some(n=>n.length>1):e.length>1:!1;function TI(e){const n={};for(const Ae in e)Ae in mb||(n[Ae]=e[Ae]);if(e.css===!1)return n;const{name:s="v",type:u,duration:h,enterFromClass:g=`${s}-enter-from`,enterActiveClass:m=`${s}-enter-active`,enterToClass:c=`${s}-enter-to`,appearFromClass:I=g,appearActiveClass:k=m,appearToClass:M=c,leaveFromClass:A=`${s}-leave-from`,leaveActiveClass:z=`${s}-leave-active`,leaveToClass:q=`${s}-leave-to`}=e,K=CI(h),J=K&&K[0],se=K&&K[1],{onBeforeEnter:ke,onEnter:ye,onEnterCancelled:Z,onLeave:fe,onLeaveCancelled:W,onBeforeAppear:ee=ke,onAppear:Se=ye,onAppearCancelled:Ee=Z}=n,Le=(Ae,De,Ge)=>{Oa(Ae,De?M:c),Oa(Ae,De?k:m),Ge&&Ge()},pe=(Ae,De)=>{Ae._isLeaving=!1,Oa(Ae,A),Oa(Ae,q),Oa(Ae,z),De&&De()},Ie=Ae=>(De,Ge)=>{const rt=Ae?Se:ye,Xe=()=>Le(De,Ae,Ge);Ra(rt,[De,Xe]),k0(()=>{Oa(De,Ae?I:g),js(De,Ae?M:c),M0(rt)||L0(De,u,J,Xe)})};return gr(n,{onBeforeEnter(Ae){Ra(ke,[Ae]),js(Ae,g),js(Ae,m)},onBeforeAppear(Ae){Ra(ee,[Ae]),js(Ae,I),js(Ae,k)},onEnter:Ie(!1),onAppear:Ie(!0),onLeave(Ae,De){Ae._isLeaving=!0;const Ge=()=>pe(Ae,De);js(Ae,A),js(Ae,z),kI(),k0(()=>{Ae._isLeaving&&(Oa(Ae,A),js(Ae,q),M0(fe)||L0(Ae,u,se,Ge))}),Ra(fe,[Ae,Ge])},onEnterCancelled(Ae){Le(Ae,!1),Ra(Z,[Ae])},onAppearCancelled(Ae){Le(Ae,!0),Ra(Ee,[Ae])},onLeaveCancelled(Ae){pe(Ae),Ra(W,[Ae])}})}function CI(e){if(e==null)return null;if(Fi(e))return[lm(e.enter),lm(e.leave)];{const n=lm(e);return[n,n]}}function lm(e){return nx(e)}function js(e,n){n.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[nh]||(e[nh]=new Set)).add(n)}function Oa(e,n){n.split(/\s+/).forEach(u=>u&&e.classList.remove(u));const s=e[nh];s&&(s.delete(n),s.size||(e[nh]=void 0))}function k0(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let AI=0;function L0(e,n,s,u){const h=e._endId=++AI,g=()=>{h===e._endId&&u()};if(s)return setTimeout(g,s);const{type:m,timeout:c,propCount:I}=MI(e,n);if(!m)return u();const k=m+"end";let M=0;const A=()=>{e.removeEventListener(k,z),g()},z=q=>{q.target===e&&++M>=I&&A()};setTimeout(()=>{M(s[K]||"").split(", "),h=u(`${Ns}Delay`),g=u(`${Ns}Duration`),m=P0(h,g),c=u(`${Lu}Delay`),I=u(`${Lu}Duration`),k=P0(c,I);let M=null,A=0,z=0;n===Ns?m>0&&(M=Ns,A=m,z=g.length):n===Lu?k>0&&(M=Lu,A=k,z=I.length):(A=Math.max(m,k),M=A>0?m>k?Ns:Lu:null,z=M?M===Ns?g.length:I.length:0);const q=M===Ns&&/\b(transform|all)(,|$)/.test(u(`${Ns}Property`).toString());return{type:M,timeout:A,propCount:z,hasTransform:q}}function P0(e,n){for(;e.lengthz0(s)+z0(e[u])))}function z0(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function kI(){return document.body.offsetHeight}function LI(e,n,s){const u=e[nh];u&&(n=(n?[n,...u]:[...u]).join(" ")),n==null?e.removeAttribute("class"):s?e.setAttribute("class",n):e.className=n}const cf=Symbol("_vod"),gb=Symbol("_vsh"),PI={beforeMount(e,{value:n},{transition:s}){e[cf]=e.style.display==="none"?"":e.style.display,s&&n?s.beforeEnter(e):Pu(e,n)},mounted(e,{value:n},{transition:s}){s&&n&&s.enter(e)},updated(e,{value:n,oldValue:s},{transition:u}){!n!=!s&&(u?n?(u.beforeEnter(e),Pu(e,!0),u.enter(e)):u.leave(e,()=>{Pu(e,!1)}):Pu(e,n))},beforeUnmount(e,{value:n}){Pu(e,n)}};function Pu(e,n){e.style.display=n?e[cf]:"none",e[gb]=!n}const yb=Symbol("");function xD(e){const n=ia();if(!n)return;const s=n.ut=(h=e(n.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${n.uid}"]`)).forEach(g=>Nm(g,h))},u=()=>{const h=e(n.proxy);Vm(n.subTree,h),s(h)};an(()=>{aI(u);const h=new MutationObserver(u);h.observe(n.subTree.el.parentNode,{childList:!0}),Ja(()=>h.disconnect())})}function Vm(e,n){if(e.shapeFlag&128){const s=e.suspense;e=s.activeBranch,s.pendingBranch&&!s.isHydrating&&s.effects.push(()=>{Vm(s.activeBranch,n)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Nm(e.el,n);else if(e.type===mr)e.children.forEach(s=>Vm(s,n));else if(e.type===Hu){let{el:s,anchor:u}=e;for(;s&&(Nm(s,n),s!==u);)s=s.nextSibling}}function Nm(e,n){if(e.nodeType===1){const s=e.style;let u="";for(const h in n)s.setProperty(`--${h}`,n[h]),u+=`--${h}: ${n[h]};`;s[yb]=u}}const zI=/(^|;)\s*display\s*:/;function DI(e,n,s){const u=e.style,h=ir(s);let g=!1;if(s&&!h){if(n)if(ir(n))for(const m of n.split(";")){const c=m.slice(0,m.indexOf(":")).trim();s[c]==null&&$d(u,c,"")}else for(const m in n)s[m]==null&&$d(u,m,"");for(const m in s)m==="display"&&(g=!0),$d(u,m,s[m])}else if(h){if(n!==s){const m=u[yb];m&&(s+=";"+m),u.cssText=s,g=zI.test(s)}}else n&&e.removeAttribute("style");cf in e&&(e[cf]=g?u.display:"",e[gb]&&(u.display="none"))}const D0=/\s*!important$/;function $d(e,n,s){if(jt(s))s.forEach(u=>$d(e,n,u));else if(s==null&&(s=""),n.startsWith("--"))e.setProperty(n,s);else{const u=RI(e,n);D0.test(s)?e.setProperty(_c(u),s.replace(D0,""),"important"):e[u]=s}}const R0=["Webkit","Moz","ms"],cm={};function RI(e,n){const s=cm[n];if(s)return s;let u=Ro(n);if(u!=="filter"&&u in e)return cm[n]=u;u=Sf(u);for(let h=0;hum||(jI.then(()=>um=0),um=Date.now());function UI(e,n){const s=u=>{if(!u._vts)u._vts=Date.now();else if(u._vts<=s.attached)return;Jn(qI(u,s.value),n,5,[u])};return s.value=e,s.attached=$I(),s}function qI(e,n){if(jt(n)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},n.map(u=>h=>!h._stopped&&u&&u(h))}else return n}const N0=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,HI=(e,n,s,u,h,g,m,c,I)=>{const k=h==="svg";n==="class"?LI(e,u,k):n==="style"?DI(e,s,u):lh(n)?gg(n)||VI(e,n,s,u,m):(n[0]==="."?(n=n.slice(1),!0):n[0]==="^"?(n=n.slice(1),!1):GI(e,n,u,k))?(OI(e,n,u,g,m,c,I),(n==="value"||n==="checked"||n==="selected")&&B0(e,n,u,k,m,n!=="value")):(n==="true-value"?e._trueValue=u:n==="false-value"&&(e._falseValue=u),B0(e,n,u,k))};function GI(e,n,s,u){if(u)return!!(n==="innerHTML"||n==="textContent"||n in e&&N0(n)&&Ut(s));if(n==="spellcheck"||n==="draggable"||n==="translate"||n==="form"||n==="list"&&e.tagName==="INPUT"||n==="type"&&e.tagName==="TEXTAREA")return!1;if(n==="width"||n==="height"){const h=e.tagName;if(h==="IMG"||h==="VIDEO"||h==="CANVAS"||h==="SOURCE")return!1}return N0(n)&&ir(s)?!1:n in e}const _b=gr({patchProp:HI},II);let Wu,j0=!1;function WI(){return Wu||(Wu=iI(_b))}function ZI(){return Wu=j0?Wu:rI(_b),j0=!0,Wu}const XI=(...e)=>{const n=WI().createApp(...e),{mount:s}=n;return n.mount=u=>{const h=xb(u);if(!h)return;const g=n._component;!Ut(g)&&!g.render&&!g.template&&(g.template=h.innerHTML),h.innerHTML="";const m=s(h,!1,vb(h));return h instanceof Element&&(h.removeAttribute("v-cloak"),h.setAttribute("data-v-app","")),m},n},KI=(...e)=>{const n=ZI().createApp(...e),{mount:s}=n;return n.mount=u=>{const h=xb(u);if(h)return s(h,!0,vb(h))},n};function vb(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function xb(e){return ir(e)?document.querySelector(e):e}const JI=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,YI=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,QI=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function eT(e,n){if(e==="__proto__"||e==="constructor"&&n&&typeof n=="object"&&"prototype"in n){tT(e);return}return n}function tT(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function uf(e,n={}){if(typeof e!="string")return e;const s=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return s.slice(1,-1);if(s.length<=9){const u=s.toLowerCase();if(u==="true")return!0;if(u==="false")return!1;if(u==="undefined")return;if(u==="null")return null;if(u==="nan")return Number.NaN;if(u==="infinity")return Number.POSITIVE_INFINITY;if(u==="-infinity")return Number.NEGATIVE_INFINITY}if(!QI.test(e)){if(n.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(JI.test(e)||YI.test(e)){if(n.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,eT)}return JSON.parse(e)}catch(u){if(n.strict)throw u;return e}}const iT=/#/g,rT=/&/g,nT=/\//g,oT=/=/g,Dg=/\+/g,sT=/%5e/gi,aT=/%60/gi,lT=/%7c/gi,cT=/%20/gi;function uT(e){return encodeURI(""+e).replace(lT,"|")}function jm(e){return uT(typeof e=="string"?e:JSON.stringify(e)).replace(Dg,"%2B").replace(cT,"+").replace(iT,"%23").replace(rT,"%26").replace(aT,"`").replace(sT,"^").replace(nT,"%2F")}function hm(e){return jm(e).replace(oT,"%3D")}function hf(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function hT(e){return hf(e.replace(Dg," "))}function dT(e){return hf(e.replace(Dg," "))}function Rg(e=""){const n={};e[0]==="?"&&(e=e.slice(1));for(const s of e.split("&")){const u=s.match(/([^=]+)=?(.*)/)||[];if(u.length<2)continue;const h=hT(u[1]);if(h==="__proto__"||h==="constructor")continue;const g=dT(u[2]||"");n[h]===void 0?n[h]=g:Array.isArray(n[h])?n[h].push(g):n[h]=[n[h],g]}return n}function fT(e,n){return(typeof n=="number"||typeof n=="boolean")&&(n=String(n)),n?Array.isArray(n)?n.map(s=>`${hm(e)}=${jm(s)}`).join("&"):`${hm(e)}=${jm(n)}`:hm(e)}function bb(e){return Object.keys(e).filter(n=>e[n]!==void 0).map(n=>fT(n,e[n])).filter(Boolean).join("&")}const pT=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,mT=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,gT=/^([/\\]\s*){2,}[^/\\]/,yT=/^[\s\0]*(blob|data|javascript|vbscript):$/i,_T=/\/$|\/\?|\/#/,vT=/^\.?\//;function ra(e,n={}){return typeof n=="boolean"&&(n={acceptRelative:n}),n.strict?pT.test(e):mT.test(e)||(n.acceptRelative?gT.test(e):!1)}function xT(e){return!!e&&yT.test(e)}function $m(e="",n){return n?_T.test(e):e.endsWith("/")}function zf(e="",n){if(!n)return($m(e)?e.slice(0,-1):e)||"/";if(!$m(e,!0))return e||"/";let s=e,u="";const h=e.indexOf("#");h>=0&&(s=e.slice(0,h),u=e.slice(h));const[g,...m]=s.split("?");return((g.endsWith("/")?g.slice(0,-1):g)||"/")+(m.length>0?`?${m.join("?")}`:"")+u}function df(e="",n){if(!n)return e.endsWith("/")?e:e+"/";if($m(e,!0))return e||"/";let s=e,u="";const h=e.indexOf("#");if(h>=0&&(s=e.slice(0,h),u=e.slice(h),!s))return u;const[g,...m]=s.split("?");return g+"/"+(m.length>0?`?${m.join("?")}`:"")+u}function bT(e=""){return e.startsWith("/")}function $0(e=""){return bT(e)?e:"/"+e}function wT(e,n){if(wb(n)||ra(e))return e;const s=zf(n);return e.startsWith(s)?e:hh(s,e)}function ET(e,n){if(wb(n))return e;const s=zf(n);if(!e.startsWith(s))return e;const u=e.slice(s.length);return u[0]==="/"?u:"/"+u}function Og(e,n){const s=TT(e),u={...Rg(s.search),...n};return s.search=bb(u),Ib(s)}function wb(e){return!e||e==="/"}function ST(e){return e&&e!=="/"}function hh(e,...n){let s=e||"";for(const u of n.filter(h=>ST(h)))if(s){const h=u.replace(vT,"");s=df(s)+h}else s=u;return s}function Eb(...e){var m,c,I,k;const n=/\/(?!\/)/,s=e.filter(Boolean),u=[];let h=0;for(const M of s)if(!(!M||M==="/")){for(const[A,z]of M.split(n).entries())if(!(!z||z===".")){if(z===".."){if(u.length===1&&ra(u[0]))continue;u.pop(),h--;continue}if(A===1&&((m=u[u.length-1])!=null&&m.endsWith(":/"))){u[u.length-1]+="/"+z;continue}u.push(z),h++}}let g=u.join("/");return h>=0?(c=s[0])!=null&&c.startsWith("/")&&!g.startsWith("/")?g="/"+g:(I=s[0])!=null&&I.startsWith("./")&&!g.startsWith("./")&&(g="./"+g):g="../".repeat(-1*h)+g,(k=s[s.length-1])!=null&&k.endsWith("/")&&!g.endsWith("/")&&(g+="/"),g}function IT(e,n,s={}){return s.trailingSlash||(e=df(e),n=df(n)),s.leadingSlash||(e=$0(e),n=$0(n)),s.encoding||(e=hf(e),n=hf(n)),e===n}const Sb=Symbol.for("ufo:protocolRelative");function TT(e="",n){const s=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(s){const[,A,z=""]=s;return{protocol:A.toLowerCase(),pathname:z,href:A+z,auth:"",host:"",search:"",hash:""}}if(!ra(e,{acceptRelative:!0}))return U0(e);const[,u="",h,g=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,m="",c=""]=g.match(/([^#/?]*)(.*)?/)||[],{pathname:I,search:k,hash:M}=U0(c.replace(/\/(?=[A-Za-z]:)/,""));return{protocol:u.toLowerCase(),auth:h?h.slice(0,Math.max(0,h.length-1)):"",host:m,pathname:I,search:k,hash:M,[Sb]:!u}}function U0(e=""){const[n="",s="",u=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:n,search:s,hash:u}}function Ib(e){const n=e.pathname||"",s=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",u=e.hash||"",h=e.auth?e.auth+"@":"",g=e.host||"";return(e.protocol||e[Sb]?(e.protocol||"")+"//":"")+h+g+n+s+u}class CT extends Error{constructor(n,s){super(n,s),this.name="FetchError",s!=null&&s.cause&&!this.cause&&(this.cause=s.cause)}}function AT(e){var I,k,M,A,z;const n=((I=e.error)==null?void 0:I.message)||((k=e.error)==null?void 0:k.toString())||"",s=((M=e.request)==null?void 0:M.method)||((A=e.options)==null?void 0:A.method)||"GET",u=((z=e.request)==null?void 0:z.url)||String(e.request)||"/",h=`[${s}] ${JSON.stringify(u)}`,g=e.response?`${e.response.status} ${e.response.statusText}`:"",m=`${h}: ${g}${n?` ${n}`:""}`,c=new CT(m,e.error?{cause:e.error}:void 0);for(const q of["request","options","response"])Object.defineProperty(c,q,{get(){return e[q]}});for(const[q,K]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(c,q,{get(){return e.response&&e.response[K]}});return c}const MT=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function q0(e="GET"){return MT.has(e.toUpperCase())}function kT(e){if(e===void 0)return!1;const n=typeof e;return n==="string"||n==="number"||n==="boolean"||n===null?!0:n!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const LT=new Set(["image/svg","application/xml","application/xhtml","application/html"]),PT=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function zT(e=""){if(!e)return"json";const n=e.split(";").shift()||"";return PT.test(n)?"json":LT.has(n)||n.startsWith("text/")?"text":"blob"}function DT(e,n,s=globalThis.Headers){const u={...n,...e};if(n!=null&&n.params&&(e!=null&&e.params)&&(u.params={...n==null?void 0:n.params,...e==null?void 0:e.params}),n!=null&&n.query&&(e!=null&&e.query)&&(u.query={...n==null?void 0:n.query,...e==null?void 0:e.query}),n!=null&&n.headers&&(e!=null&&e.headers)){u.headers=new s((n==null?void 0:n.headers)||{});for(const[h,g]of new s((e==null?void 0:e.headers)||{}))u.headers.set(h,g)}return u}const RT=new Set([408,409,425,429,500,502,503,504]),OT=new Set([101,204,205,304]);function Tb(e={}){const{fetch:n=globalThis.fetch,Headers:s=globalThis.Headers,AbortController:u=globalThis.AbortController}=e;async function h(c){const I=c.error&&c.error.name==="AbortError"&&!c.options.timeout||!1;if(c.options.retry!==!1&&!I){let M;typeof c.options.retry=="number"?M=c.options.retry:M=q0(c.options.method)?0:1;const A=c.response&&c.response.status||500;if(M>0&&(Array.isArray(c.options.retryStatusCodes)?c.options.retryStatusCodes.includes(A):RT.has(A))){const z=c.options.retryDelay||0;return z>0&&await new Promise(q=>setTimeout(q,z)),g(c.request,{...c.options,retry:M-1})}}const k=AT(c);throw Error.captureStackTrace&&Error.captureStackTrace(k,g),k}const g=async function(I,k={}){var q;const M={request:I,options:DT(k,e.defaults,s),response:void 0,error:void 0};M.options.method=(q=M.options.method)==null?void 0:q.toUpperCase(),M.options.onRequest&&await M.options.onRequest(M),typeof M.request=="string"&&(M.options.baseURL&&(M.request=wT(M.request,M.options.baseURL)),(M.options.query||M.options.params)&&(M.request=Og(M.request,{...M.options.params,...M.options.query}))),M.options.body&&q0(M.options.method)&&(kT(M.options.body)?(M.options.body=typeof M.options.body=="string"?M.options.body:JSON.stringify(M.options.body),M.options.headers=new s(M.options.headers||{}),M.options.headers.has("content-type")||M.options.headers.set("content-type","application/json"),M.options.headers.has("accept")||M.options.headers.set("accept","application/json")):("pipeTo"in M.options.body&&typeof M.options.body.pipeTo=="function"||typeof M.options.body.pipe=="function")&&("duplex"in M.options||(M.options.duplex="half")));let A;if(!M.options.signal&&M.options.timeout){const K=new u;A=setTimeout(()=>K.abort(),M.options.timeout),M.options.signal=K.signal}try{M.response=await n(M.request,M.options)}catch(K){return M.error=K,M.options.onRequestError&&await M.options.onRequestError(M),await h(M)}finally{A&&clearTimeout(A)}if(M.response.body&&!OT.has(M.response.status)&&M.options.method!=="HEAD"){const K=(M.options.parseResponse?"json":M.options.responseType)||zT(M.response.headers.get("content-type")||"");switch(K){case"json":{const J=await M.response.text(),se=M.options.parseResponse||uf;M.response._data=se(J);break}case"stream":{M.response._data=M.response.body;break}default:M.response._data=await M.response[K]()}}return M.options.onResponse&&await M.options.onResponse(M),!M.options.ignoreResponseError&&M.response.status>=400&&M.response.status<600?(M.options.onResponseError&&await M.options.onResponseError(M),await h(M)):M.response},m=async function(I,k){return(await g(I,k))._data};return m.raw=g,m.native=(...c)=>n(...c),m.create=(c={})=>Tb({...e,defaults:{...e.defaults,...c}}),m}const Bg=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),BT=Bg.fetch||(()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!"))),FT=Bg.Headers,VT=Bg.AbortController,NT=Tb({fetch:BT,Headers:FT,AbortController:VT}),jT=NT,$T=()=>{var e;return((e=window==null?void 0:window.__NUXT__)==null?void 0:e.config)||{}},ff=$T().app,UT=()=>ff.baseURL,qT=()=>ff.buildAssetsDir,Fg=(...e)=>Eb(Cb(),qT(),...e),Cb=(...e)=>{const n=ff.cdnURL||ff.baseURL;return e.length?Eb(n,...e):n};globalThis.__buildAssetsURL=Fg,globalThis.__publicAssetsURL=Cb;globalThis.$fetch||(globalThis.$fetch=jT.create({baseURL:UT()}));function Um(e,n={},s){for(const u in e){const h=e[u],g=s?`${s}:${u}`:u;typeof h=="object"&&h!==null?Um(h,n,g):typeof h=="function"&&(n[g]=h)}return n}const HT={run:e=>e()},GT=()=>HT,Ab=typeof console.createTask<"u"?console.createTask:GT;function WT(e,n){const s=n.shift(),u=Ab(s);return e.reduce((h,g)=>h.then(()=>u.run(()=>g(...n))),Promise.resolve())}function ZT(e,n){const s=n.shift(),u=Ab(s);return Promise.all(e.map(h=>u.run(()=>h(...n))))}function dm(e,n){for(const s of[...e])s(n)}class XT{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(n,s,u={}){if(!n||typeof s!="function")return()=>{};const h=n;let g;for(;this._deprecatedHooks[n];)g=this._deprecatedHooks[n],n=g.to;if(g&&!u.allowDeprecated){let m=g.message;m||(m=`${h} hook has been deprecated`+(g.to?`, please use ${g.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(m)||(console.warn(m),this._deprecatedMessages.add(m))}if(!s.name)try{Object.defineProperty(s,"name",{get:()=>"_"+n.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[n]=this._hooks[n]||[],this._hooks[n].push(s),()=>{s&&(this.removeHook(n,s),s=void 0)}}hookOnce(n,s){let u,h=(...g)=>(typeof u=="function"&&u(),u=void 0,h=void 0,s(...g));return u=this.hook(n,h),u}removeHook(n,s){if(this._hooks[n]){const u=this._hooks[n].indexOf(s);u!==-1&&this._hooks[n].splice(u,1),this._hooks[n].length===0&&delete this._hooks[n]}}deprecateHook(n,s){this._deprecatedHooks[n]=typeof s=="string"?{to:s}:s;const u=this._hooks[n]||[];delete this._hooks[n];for(const h of u)this.hook(n,h)}deprecateHooks(n){Object.assign(this._deprecatedHooks,n);for(const s in n)this.deprecateHook(s,n[s])}addHooks(n){const s=Um(n),u=Object.keys(s).map(h=>this.hook(h,s[h]));return()=>{for(const h of u.splice(0,u.length))h()}}removeHooks(n){const s=Um(n);for(const u in s)this.removeHook(u,s[u])}removeAllHooks(){for(const n in this._hooks)delete this._hooks[n]}callHook(n,...s){return s.unshift(n),this.callHookWith(WT,n,...s)}callHookParallel(n,...s){return s.unshift(n),this.callHookWith(ZT,n,...s)}callHookWith(n,s,...u){const h=this._before||this._after?{name:s,args:u,context:{}}:void 0;this._before&&dm(this._before,h);const g=n(s in this._hooks?[...this._hooks[s]]:[],u);return g instanceof Promise?g.finally(()=>{this._after&&h&&dm(this._after,h)}):(this._after&&h&&dm(this._after,h),g)}beforeEach(n){return this._before=this._before||[],this._before.push(n),()=>{if(this._before!==void 0){const s=this._before.indexOf(n);s!==-1&&this._before.splice(s,1)}}}afterEach(n){return this._after=this._after||[],this._after.push(n),()=>{if(this._after!==void 0){const s=this._after.indexOf(n);s!==-1&&this._after.splice(s,1)}}}}function Mb(){return new XT}function KT(e={}){let n,s=!1;const u=m=>{if(n&&n!==m)throw new Error("Context conflict")};let h;if(e.asyncContext){const m=e.AsyncLocalStorage||globalThis.AsyncLocalStorage;m?h=new m:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const g=()=>{if(h&&n===void 0){const m=h.getStore();if(m!==void 0)return m}return n};return{use:()=>{const m=g();if(m===void 0)throw new Error("Context is not available");return m},tryUse:()=>g(),set:(m,c)=>{c||u(m),n=m,s=!0},unset:()=>{n=void 0,s=!1},call:(m,c)=>{u(m),n=m;try{return h?h.run(m,c):c()}finally{s||(n=void 0)}},async callAsync(m,c){n=m;const I=()=>{n=m},k=()=>n===m?I:void 0;qm.add(k);try{const M=h?h.run(m,c):c();return s||(n=void 0),await M}finally{qm.delete(k)}}}}function JT(e={}){const n={};return{get(s,u={}){return n[s]||(n[s]=KT({...e,...u})),n[s],n[s]}}}const pf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},H0="__unctx__",YT=pf[H0]||(pf[H0]=JT()),QT=(e,n={})=>YT.get(e,n),G0="__unctx_async_handlers__",qm=pf[G0]||(pf[G0]=new Set);function kb(e){const n=[];for(const h of qm){const g=h();g&&n.push(g)}const s=()=>{for(const h of n)h()};let u=e();return u&&typeof u=="object"&&"catch"in u&&(u=u.catch(h=>{throw s(),h})),[u,s]}const eC={componentName:"NuxtLink"},tC=null,iC="#__nuxt",Lb="nuxt-app",W0=36e5;function Pb(e=Lb){return QT(e,{asyncContext:!1})}const rC="__nuxt_plugin";function nC(e){let n=0;const s={_name:Lb,_scope:OE(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.12.2"},get vue(){return s.vueApp.version}},payload:Yl({data:Yl({}),state:Oo({}),once:new Set,_errors:Yl({})}),static:{data:{}},runWithContext(h){return s._scope.active&&!cx()?s._scope.run(()=>Z0(s,h)):Z0(s,h)},isHydrating:!0,deferHydration(){if(!s.isHydrating)return()=>{};n++;let h=!1;return()=>{if(!h&&(h=!0,n--,n===0))return s.isHydrating=!1,s.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:Yl({}),_payloadRevivers:{},...e};if(window.__NUXT__)for(const h in window.__NUXT__)switch(h){case"data":case"state":case"_errors":Object.assign(s.payload[h],window.__NUXT__[h]);break;default:s.payload[h]=window.__NUXT__[h]}s.hooks=Mb(),s.hook=s.hooks.hook,s.callHook=s.hooks.callHook,s.provide=(h,g)=>{const m="$"+h;zd(s,m,g),zd(s.vueApp.config.globalProperties,m,g)},zd(s.vueApp,"$nuxt",s),zd(s.vueApp.config.globalProperties,"$nuxt",s);{window.addEventListener("nuxt.preloadError",g=>{s.callHook("app:chunkError",{error:g.payload})}),window.useNuxtApp=window.useNuxtApp||Zi;const h=s.hook("app:error",(...g)=>{console.error("[nuxt] error caught during app initialization",...g)});s.hook("app:mounted",h)}const u=s.payload.config;return s.provide("config",u),s}function oC(e,n){n.hooks&&e.hooks.addHooks(n.hooks)}async function sC(e,n){if(typeof n=="function"){const{provide:s}=await e.runWithContext(()=>n(e))||{};if(s&&typeof s=="object")for(const u in s)e.provide(u,s[u])}}async function aC(e,n){const s=[],u=[],h=[],g=[];let m=0;async function c(I){var M;const k=((M=I.dependsOn)==null?void 0:M.filter(A=>n.some(z=>z._name===A)&&!s.includes(A)))??[];if(k.length>0)u.push([new Set(k),I]);else{const A=sC(e,I).then(async()=>{I._name&&(s.push(I._name),await Promise.all(u.map(async([z,q])=>{z.has(I._name)&&(z.delete(I._name),z.size===0&&(m++,await c(q)))})))});I.parallel?h.push(A.catch(z=>g.push(z))):await A}}for(const I of n)oC(e,I);for(const I of n)await c(I);if(await Promise.all(h),m)for(let I=0;I{}),e,{[rC]:!0,_name:n})}function Z0(e,n,s){const u=()=>n();return Pb(e._name).set(e),e.vueApp.runWithContext(u)}function lC(e){var s;let n;return jx()&&(n=(s=ia())==null?void 0:s.appContext.app.$nuxt),n=n||Pb(e).tryUse(),n||null}function Zi(e){const n=lC(e);if(!n)throw new Error("[nuxt] instance unavailable");return n}function hc(e){return Zi().$config}function zd(e,n,s){Object.defineProperty(e,n,{get:()=>s})}const X0=Object.freeze({ignoreUnknown:!1,respectType:!1,respectFunctionNames:!1,respectFunctionProperties:!1,unorderedObjects:!0,unorderedArrays:!1,unorderedSets:!1,excludeKeys:void 0,excludeValues:void 0,replacer:void 0});function K0(e,n){n?n={...X0,...n}:n=X0;const s=zb(n);return s.dispatch(e),s.toString()}const cC=Object.freeze(["prototype","__proto__","constructor"]);function zb(e){let n="",s=new Map;const u=h=>{n+=h};return{toString(){return n},getContext(){return s},dispatch(h){return e.replacer&&(h=e.replacer(h)),this[h===null?"null":typeof h](h)},object(h){if(h&&typeof h.toJSON=="function")return this.object(h.toJSON());const g=Object.prototype.toString.call(h);let m="";const c=g.length;c<10?m="unknown:["+g+"]":m=g.slice(8,c-1),m=m.toLowerCase();let I=null;if((I=s.get(h))===void 0)s.set(h,s.size);else return this.dispatch("[CIRCULAR:"+I+"]");if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(h))return u("buffer:"),u(h.toString("utf8"));if(m!=="object"&&m!=="function"&&m!=="asyncfunction")this[m]?this[m](h):e.ignoreUnknown||this.unkown(h,m);else{let k=Object.keys(h);e.unorderedObjects&&(k=k.sort());let M=[];e.respectType!==!1&&!J0(h)&&(M=cC),e.excludeKeys&&(k=k.filter(z=>!e.excludeKeys(z)),M=M.filter(z=>!e.excludeKeys(z))),u("object:"+(k.length+M.length)+":");const A=z=>{this.dispatch(z),u(":"),e.excludeValues||this.dispatch(h[z]),u(",")};for(const z of k)A(z);for(const z of M)A(z)}},array(h,g){if(g=g===void 0?e.unorderedArrays!==!1:g,u("array:"+h.length+":"),!g||h.length<=1){for(const I of h)this.dispatch(I);return}const m=new Map,c=h.map(I=>{const k=zb(e);k.dispatch(I);for(const[M,A]of k.getContext())m.set(M,A);return k.toString()});return s=m,c.sort(),this.array(c,!1)},date(h){return u("date:"+h.toJSON())},symbol(h){return u("symbol:"+h.toString())},unkown(h,g){if(u(g),!!h&&(u(":"),h&&typeof h.entries=="function"))return this.array(Array.from(h.entries()),!0)},error(h){return u("error:"+h.toString())},boolean(h){return u("bool:"+h)},string(h){u("string:"+h.length+":"),u(h)},function(h){u("fn:"),J0(h)?this.dispatch("[native]"):this.dispatch(h.toString()),e.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(h.name)),e.respectFunctionProperties&&this.object(h)},number(h){return u("number:"+h)},xml(h){return u("xml:"+h.toString())},null(){return u("Null")},undefined(){return u("Undefined")},regexp(h){return u("regex:"+h.toString())},uint8array(h){return u("uint8array:"),this.dispatch(Array.prototype.slice.call(h))},uint8clampedarray(h){return u("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(h))},int8array(h){return u("int8array:"),this.dispatch(Array.prototype.slice.call(h))},uint16array(h){return u("uint16array:"),this.dispatch(Array.prototype.slice.call(h))},int16array(h){return u("int16array:"),this.dispatch(Array.prototype.slice.call(h))},uint32array(h){return u("uint32array:"),this.dispatch(Array.prototype.slice.call(h))},int32array(h){return u("int32array:"),this.dispatch(Array.prototype.slice.call(h))},float32array(h){return u("float32array:"),this.dispatch(Array.prototype.slice.call(h))},float64array(h){return u("float64array:"),this.dispatch(Array.prototype.slice.call(h))},arraybuffer(h){return u("arraybuffer:"),this.dispatch(new Uint8Array(h))},url(h){return u("url:"+h.toString())},map(h){u("map:");const g=[...h];return this.array(g,e.unorderedSets!==!1)},set(h){u("set:");const g=[...h];return this.array(g,e.unorderedSets!==!1)},file(h){return u("file:"),this.dispatch([h.name,h.size,h.type,h.lastModfied])},blob(){if(e.ignoreUnknown)return u("[blob]");throw new Error(`Hashing Blob objects is currently not supported Use "options.replacer" or "options.ignoreUnknown" -`)},domwindow(){return u("domwindow")},bigint(h){return u("bigint:"+h.toString())},process(){return u("process")},timer(){return u("timer")},pipe(){return u("pipe")},tcp(){return u("tcp")},udp(){return u("udp")},tty(){return u("tty")},statwatcher(){return u("statwatcher")},securecontext(){return u("securecontext")},connection(){return u("connection")},zlib(){return u("zlib")},context(){return u("context")},nodescript(){return u("nodescript")},httpparser(){return u("httpparser")},dataview(){return u("dataview")},signal(){return u("signal")},fsevent(){return u("fsevent")},tlswrap(){return u("tlswrap")}}}const Db="[native code] }",uC=Db.length;function J0(e){return typeof e!="function"?!1:Function.prototype.toString.call(e).slice(-uC)===Db}function hC(e,n,s={}){return e===n||K0(e,s)===K0(n,s)}function dC(e,n){return{ctx:{table:e},matchAll:s=>Ob(s,e)}}function Rb(e){const n={};for(const s in e)n[s]=s==="dynamic"?new Map(Object.entries(e[s]).map(([u,h])=>[u,Rb(h)])):new Map(Object.entries(e[s]));return n}function fC(e){return dC(Rb(e))}function Ob(e,n,s){e.endsWith("/")&&(e=e.slice(0,-1)||"/");const u=[];for(const[g,m]of Y0(n.wildcard))(e===g||e.startsWith(g+"/"))&&u.push(m);for(const[g,m]of Y0(n.dynamic))if(e.startsWith(g+"/")){const c="/"+e.slice(g.length).split("/").splice(2).join("/");u.push(...Ob(c,m))}const h=n.static.get(e);return h&&u.push(h),u.filter(Boolean)}function Y0(e){return[...e.entries()].sort((n,s)=>n[0].length-s[0].length)}function fm(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Hm(e,n,s=".",u){if(!fm(n))return Hm(e,{},s,u);const h=Object.assign({},n);for(const g in e){if(g==="__proto__"||g==="constructor")continue;const m=e[g];m!=null&&(u&&u(h,g,m,s)||(Array.isArray(m)&&Array.isArray(h[g])?h[g]=[...m,...h[g]]:fm(m)&&fm(h[g])?h[g]=Hm(m,h[g],(s?`${s}.`:"")+g.toString(),u):h[g]=m))}return h}function Vg(e){return(...n)=>n.reduce((s,u)=>Hm(s,u,"",e),{})}const Df=Vg(),pC=Vg((e,n,s)=>{if(e[n]!==void 0&&typeof s=="function")return e[n]=s(e[n]),!0});function mC(e,n){try{return n in e}catch{return!1}}var gC=Object.defineProperty,yC=(e,n,s)=>n in e?gC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,Fa=(e,n,s)=>(yC(e,typeof n!="symbol"?n+"":n,s),s);class Gm extends Error{constructor(n,s={}){super(n,s),Fa(this,"statusCode",500),Fa(this,"fatal",!1),Fa(this,"unhandled",!1),Fa(this,"statusMessage"),Fa(this,"data"),Fa(this,"cause"),s.cause&&!this.cause&&(this.cause=s.cause)}toJSON(){const n={message:this.message,statusCode:Zm(this.statusCode,500)};return this.statusMessage&&(n.statusMessage=Bb(this.statusMessage)),this.data!==void 0&&(n.data=this.data),n}}Fa(Gm,"__h3_error__",!0);function _C(e){if(typeof e=="string")return new Gm(e);if(vC(e))return e;const n=new Gm(e.message??e.statusMessage??"",{cause:e.cause||e});if(mC(e,"stack"))try{Object.defineProperty(n,"stack",{get(){return e.stack}})}catch{try{n.stack=e.stack}catch{}}if(e.data&&(n.data=e.data),e.statusCode?n.statusCode=Zm(e.statusCode,n.statusCode):e.status&&(n.statusCode=Zm(e.status,n.statusCode)),e.statusMessage?n.statusMessage=e.statusMessage:e.statusText&&(n.statusMessage=e.statusText),n.statusMessage){const s=n.statusMessage;Bb(n.statusMessage)!==s&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(n.fatal=e.fatal),e.unhandled!==void 0&&(n.unhandled=e.unhandled),n}function vC(e){var n;return((n=e==null?void 0:e.constructor)==null?void 0:n.__h3_error__)===!0}const xC=/[^\u0009\u0020-\u007E]/g;function Bb(e=""){return e.replace(xC,"")}function Zm(e,n=200){return!e||(typeof e=="string"&&(e=Number.parseInt(e,10)),e<100||e>999)?n:e}const Fb=Symbol("route"),Fo=()=>{var e;return(e=Wi())==null?void 0:e.$router},Ng=()=>jx()?Hr(Fb,Wi()._route):Wi()._route;const bC=()=>{try{if(Wi()._processingMiddleware)return!0}catch{return!1}return!1},Vb=(e,n)=>{e||(e="/");const s=typeof e=="string"?e:Og(e.path||"/",e.query||{})+(e.hash||"");if(n!=null&&n.open){const{target:c="_blank",windowFeatures:I={}}=n.open,k=Object.entries(I).filter(([M,A])=>A!==void 0).map(([M,A])=>`${M.toLowerCase()}=${A}`).join(", ");return open(s,c,k),Promise.resolve()}const u=(n==null?void 0:n.external)||ra(s,{acceptRelative:!0});if(u){if(!(n!=null&&n.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const{protocol:c}=new URL(s,window.location.href);if(c&&xT(c))throw new Error(`Cannot navigate to a URL with '${c}' protocol.`)}const h=bC();if(!u&&h)return e;const g=Fo(),m=Wi();return u?(m._scope.stop(),n!=null&&n.replace?location.replace(s):location.href=s,h?m.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):n!=null&&n.replace?g.replace(e):g.push(e)},Nb="__nuxt_error",jg=()=>zo(Wi().payload,"error"),wC=e=>{const n=$g(e);try{const s=Wi(),u=jg();s.hooks.callHook("app:error",n),u.value=u.value||n}catch{throw n}return n},EC=async(e={})=>{const n=Wi(),s=jg();n.callHook("app:error:cleared",e),e.redirect&&await Fo().replace(e.redirect),s.value=tC},SC=e=>!!e&&typeof e=="object"&&Nb in e,$g=e=>{const n=_C(e);return Object.defineProperty(n,Nb,{value:!0,configurable:!1,writable:!1}),n},IC=-1,TC=-2,CC=-3,AC=-4,MC=-5,kC=-6;function LC(e,n){return PC(JSON.parse(e),n)}function PC(e,n){if(typeof e=="number")return h(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const s=e,u=Array(s.length);function h(g,m=!1){if(g===IC)return;if(g===CC)return NaN;if(g===AC)return 1/0;if(g===MC)return-1/0;if(g===kC)return-0;if(m)throw new Error("Invalid input");if(g in u)return u[g];const c=s[g];if(!c||typeof c!="object")u[g]=c;else if(Array.isArray(c))if(typeof c[0]=="string"){const I=c[0],k=n==null?void 0:n[I];if(k)return u[g]=k(h(c[1]));switch(I){case"Date":u[g]=new Date(c[1]);break;case"Set":const M=new Set;u[g]=M;for(let q=1;q>>9)+65536).toString(16).substring(1,8).toLowerCase()}function Q0(e){return e._h||Ug(e._d?e._d:`${e.tag}:${e.textContent||e.innerHTML||""}:${Object.entries(e.props).map(([n,s])=>`${n}:${String(s)}`).join(",")}`)}function $b(e,n){const{props:s,tag:u}=e;if(OC.includes(u))return u;if(u==="link"&&s.rel==="canonical")return"canonical";if(s.charset)return"charset";const h=["id"];u==="meta"&&h.push("name","property","http-equiv");for(const g of h)if(typeof s[g]<"u"){const m=String(s[g]);return`${u}:${g}:${m}`}return!1}function ev(e,n){return e==null?n||null:typeof e=="function"?e(n):e}async function FC(e,n,s){const u={tag:e,props:await Ub(typeof n=="object"&&typeof n!="function"&&!(n instanceof Promise)?{...n}:{[["script","noscript","style"].includes(e)?"innerHTML":"textContent"]:n},["templateParams","titleTemplate"].includes(e))};return jb.forEach(h=>{const g=typeof u.props[h]<"u"?u.props[h]:s[h];typeof g<"u"&&((!["innerHTML","textContent","children"].includes(h)||DC.includes(u.tag))&&(u[h==="children"?"innerHTML":h]=g),delete u.props[h])}),u.props.body&&(u.tagPosition="bodyClose",delete u.props.body),u.tag==="script"&&typeof u.innerHTML=="object"&&(u.innerHTML=JSON.stringify(u.innerHTML),u.props.type=u.props.type||"application/json"),Array.isArray(u.props.content)?u.props.content.map(h=>({...u,props:{...u.props,content:h}})):u}function VC(e,n){var u;const s=e==="class"?" ":";";return typeof n=="object"&&!Array.isArray(n)&&(n=Object.entries(n).filter(([,h])=>h).map(([h,g])=>e==="style"?`${h}:${g}`:h)),(u=String(Array.isArray(n)?n.join(s):n))==null?void 0:u.split(s).filter(h=>h.trim()).filter(Boolean).join(s)}async function Ub(e,n){for(const s of Object.keys(e)){if(["class","style"].includes(s)){e[s]=VC(s,e[s]);continue}if(e[s]instanceof Promise&&(e[s]=await e[s]),!n&&!jb.includes(s)){const u=String(e[s]),h=s.startsWith("data-");u==="true"||u===""?e[s]=h?"true":!0:e[s]||(h&&u==="false"?e[s]="false":delete e[s])}}return e}const NC=10;async function jC(e){const n=[];return Object.entries(e.resolvedInput).filter(([s,u])=>typeof u<"u"&&RC.includes(s)).forEach(([s,u])=>{const h=zC(u);n.push(...h.map(g=>FC(s,g,e)).flat())}),(await Promise.all(n)).flat().filter(Boolean).map((s,u)=>(s._e=e._i,e.mode&&(s._m=e.mode),s._p=(e._i<I&&I[k]||void 0,n):c=n[m],typeof c<"u"?(c||"").replace(/"/g,'\\"'):!1}let h=e;try{h=decodeURI(e)}catch{}return(h.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEach(m=>{const c=u(m.slice(1));typeof c=="string"&&(e=e.replace(new RegExp(`\\${m}(\\W|$)`,"g"),(I,k)=>`${c}${k}`).trim())}),e.includes($s)&&(e.endsWith($s)&&(e=e.slice(0,-$s.length).trim()),e.startsWith($s)&&(e=e.slice($s.length).trim()),e=e.replace(new RegExp(`\\${$s}\\s*\\${$s}`,"g"),$s),e=qd(e,{separator:s},s)),e}async function qb(e,n={}){var M;const s=n.document||e.resolvedOptions.document;if(!s||!e.dirty)return;const u={shouldRender:!0,tags:[]};if(await e.hooks.callHook("dom:beforeRender",u),!u.shouldRender)return;const h=(await e.resolveTags()).map(A=>({tag:A,id:Ud.includes(A.tag)?Q0(A):A.tag,shouldRender:!0}));let g=e._dom;if(!g){g={elMap:{htmlAttrs:s.documentElement,bodyAttrs:s.body}};for(const A of["body","head"]){const z=(M=s[A])==null?void 0:M.children,q=[];for(const K of[...z].filter(J=>Ud.includes(J.tagName.toLowerCase()))){const J={tag:K.tagName.toLowerCase(),props:await Ub(K.getAttributeNames().reduce((ye,W)=>({...ye,[W]:K.getAttribute(W)}),{})),innerHTML:K.innerHTML};let se=1,ke=$b(J);for(;ke&&q.find(ye=>ye._d===ke);)ke=`${ke}:${se++}`;J._d=ke||void 0,q.push(J),g.elMap[K.getAttribute("data-hid")||Q0(J)]=K}}}g.pendingSideEffects={...g.sideEffects||{}},g.sideEffects={};function m(A,z,q){const K=`${A}:${z}`;g.sideEffects[K]=q,delete g.pendingSideEffects[K]}function c({id:A,$el:z,tag:q}){const K=q.tag.endsWith("Attrs");g.elMap[A]=z,K||(["textContent","innerHTML"].forEach(J=>{q[J]&&q[J]!==z[J]&&(z[J]=q[J])}),m(A,"el",()=>{var J;(J=g.elMap[A])==null||J.remove(),delete g.elMap[A]}));for(const[J,se]of Object.entries(q._eventHandlers||{}))z.getAttribute(`data-${J}`)!==""&&((q.tag==="bodyAttrs"?s.defaultView:z).addEventListener(J.replace("on",""),se.bind(z)),z.setAttribute(`data-${J}`,""));Object.entries(q.props).forEach(([J,se])=>{const ke=`attr:${J}`;if(J==="class")for(const ye of(se||"").split(" ").filter(Boolean))K&&m(A,`${ke}:${ye}`,()=>z.classList.remove(ye)),!z.classList.contains(ye)&&z.classList.add(ye);else if(J==="style")for(const ye of(se||"").split(";").filter(Boolean)){const[W,...fe]=ye.split(":").map(Z=>Z.trim());m(A,`${ke}:${ye}:${W}`,()=>{z.style.removeProperty(W)}),z.style.setProperty(W,fe.join(":"))}else z.getAttribute(J)!==se&&z.setAttribute(J,se===!0?"":String(se)),K&&m(A,ke,()=>z.removeAttribute(J))})}const I=[],k={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const A of h){const{tag:z,shouldRender:q,id:K}=A;if(q){if(z.tag==="title"){s.title=z.textContent;continue}A.$el=A.$el||g.elMap[K],A.$el?c(A):Ud.includes(z.tag)&&I.push(A)}}for(const A of I){const z=A.tag.tagPosition||"head";A.$el=s.createElement(A.tag.tag),c(A),k[z]=k[z]||s.createDocumentFragment(),k[z].appendChild(A.$el)}for(const A of h)await e.hooks.callHook("dom:renderTag",A,s,m);k.head&&s.head.appendChild(k.head),k.bodyOpen&&s.body.insertBefore(k.bodyOpen,s.body.firstChild),k.bodyClose&&s.body.appendChild(k.bodyClose),Object.values(g.pendingSideEffects).forEach(A=>A()),e._dom=g,e.dirty=!1,await e.hooks.callHook("dom:rendered",{renders:h})}async function UC(e,n={}){const s=n.delayFn||(u=>setTimeout(u,10));return e._domUpdatePromise=e._domUpdatePromise||new Promise(u=>s(async()=>{await qb(e,n),delete e._domUpdatePromise,u()}))}function qC(e){return n=>{var u,h;const s=((h=(u=n.resolvedOptions.document)==null?void 0:u.head.querySelector('script[id="unhead:payload"]'))==null?void 0:h.innerHTML)||!1;return s&&n.push(JSON.parse(s)),{mode:"client",hooks:{"entries:updated":function(g){UC(g,e)}}}}}const HC=["templateParams","htmlAttrs","bodyAttrs"],GC={hooks:{"tag:normalise":function({tag:e}){["hid","vmid","key"].forEach(u=>{e.props[u]&&(e.key=e.props[u],delete e.props[u])});const s=$b(e)||(e.key?`${e.tag}:${e.key}`:!1);s&&(e._d=s)},"tags:resolve":function(e){const n={};e.tags.forEach(u=>{const h=(u.key?`${u.tag}:${u.key}`:u._d)||u._p,g=n[h];if(g){let c=u==null?void 0:u.tagDuplicateStrategy;if(!c&&HC.includes(u.tag)&&(c="merge"),c==="merge"){const I=g.props;["class","style"].forEach(k=>{I[k]&&(u.props[k]?(k==="style"&&!I[k].endsWith(";")&&(I[k]+=";"),u.props[k]=`${I[k]} ${u.props[k]}`):u.props[k]=I[k])}),n[h].props={...I,...u.props};return}else if(u._e===g._e){g._duped=g._duped||[],u._d=`${g._d}:${g._duped.length+1}`,g._duped.push(u);return}else if(mf(u)>mf(g))return}const m=Object.keys(u.props).length+(u.innerHTML?1:0)+(u.textContent?1:0);if(Ud.includes(u.tag)&&m===0){delete n[h];return}n[h]=u});const s=[];Object.values(n).forEach(u=>{const h=u._duped;delete u._duped,s.push(u),h&&s.push(...h)}),e.tags=s,e.tags=e.tags.filter(u=>!(u.tag==="meta"&&(u.props.name||u.props.property)&&!u.props.content))}}},ZC={mode:"server",hooks:{"tags:resolve":function(e){const n={};e.tags.filter(s=>["titleTemplate","templateParams","title"].includes(s.tag)&&s._m==="server").forEach(s=>{n[s.tag]=s.tag.startsWith("title")?s.textContent:s.props}),Object.keys(n).length&&e.tags.push({tag:"script",innerHTML:JSON.stringify(n),props:{id:"unhead:payload",type:"application/json"}})}}},WC=["script","link","bodyAttrs"],XC=e=>({hooks:{"tags:resolve":function(n){for(const s of n.tags.filter(u=>WC.includes(u.tag)))Object.entries(s.props).forEach(([u,h])=>{u.startsWith("on")&&typeof h=="function"&&(e.ssr&&rv.includes(u)?s.props[u]=`this.dataset.${u}fired = true`:delete s.props[u],s._eventHandlers=s._eventHandlers||{},s._eventHandlers[u]=h)}),e.ssr&&s._eventHandlers&&(s.props.src||s.props.href)&&(s.key=s.key||Ug(s.props.src||s.props.href))},"dom:renderTag":function({$el:n,tag:s}){var u,h;for(const g of Object.keys((n==null?void 0:n.dataset)||{}).filter(m=>rv.some(c=>`${c}fired`===m))){const m=g.replace("fired","");(h=(u=s._eventHandlers)==null?void 0:u[m])==null||h.call(n,new Event(m.replace("on","")))}}}}),KC=["link","style","script","noscript"],JC={hooks:{"tag:normalise":({tag:e})=>{e.key&&KC.includes(e.tag)&&(e.props["data-hid"]=e._h=Ug(e.key))}}},YC={hooks:{"tags:resolve":e=>{const n=s=>{var u;return(u=e.tags.find(h=>h._d===s))==null?void 0:u._p};for(const{prefix:s,offset:u}of $C)for(const h of e.tags.filter(g=>typeof g.tagPriority=="string"&&g.tagPriority.startsWith(s))){const g=n(h.tagPriority.replace(s,""));typeof g<"u"&&(h._p=g+u)}e.tags.sort((s,u)=>s._p-u._p).sort((s,u)=>mf(s)-mf(u))}}},QC={meta:"content",link:"href",htmlAttrs:"lang"},eA=e=>({hooks:{"tags:resolve":n=>{var c;const{tags:s}=n,u=(c=s.find(I=>I.tag==="title"))==null?void 0:c.textContent,h=s.findIndex(I=>I.tag==="templateParams"),g=h!==-1?s[h].props:{},m=g.separator||"|";delete g.separator,g.pageTitle=qd(g.pageTitle||u||"",g,m);for(const I of s.filter(k=>k.processTemplateParams!==!1)){const k=QC[I.tag];k&&typeof I.props[k]=="string"?I.props[k]=qd(I.props[k],g,m):(I.processTemplateParams===!0||["titleTemplate","title"].includes(I.tag))&&["innerHTML","textContent"].forEach(M=>{typeof I[M]=="string"&&(I[M]=qd(I[M],g,m))})}e._templateParams=g,e._separator=m,n.tags=s.filter(I=>I.tag!=="templateParams")}}}),tA={hooks:{"tags:resolve":e=>{const{tags:n}=e;let s=n.findIndex(h=>h.tag==="titleTemplate");const u=n.findIndex(h=>h.tag==="title");if(u!==-1&&s!==-1){const h=ev(n[s].textContent,n[u].textContent);h!==null?n[u].textContent=h||n[u].textContent:delete n[u]}else if(s!==-1){const h=ev(n[s].textContent);h!==null&&(n[s].textContent=h,n[s].tag="title",s=-1)}s!==-1&&delete n[s],e.tags=n.filter(Boolean)}}},iA={hooks:{"tags:afterResolve":function(e){for(const n of e.tags)typeof n.innerHTML=="string"&&(n.innerHTML&&["application/ld+json","application/json"].includes(n.props.type)?n.innerHTML=n.innerHTML.replace(/{c.dirty=!0,n.callHook("entries:updated",c)};let h=0,g=[];const m=[],c={plugins:m,dirty:!1,resolvedOptions:e,hooks:n,headEntries(){return g},use(I){const k=typeof I=="function"?I(c):I;(!k.key||!m.some(M=>M.key===k.key))&&(m.push(k),nv(k.mode,s)&&n.addHooks(k.hooks||{}))},push(I,k){k==null||delete k.head;const M={_i:h++,input:I,...k};return nv(M.mode,s)&&(g.push(M),u()),{dispose(){g=g.filter(A=>A._i!==M._i),n.callHook("entries:updated",c),u()},patch(A){g=g.map(z=>(z._i===M._i&&(z.input=M.input=A),z)),u()}}},async resolveTags(){const I={tags:[],entries:[...g]};await n.callHook("entries:resolve",I);for(const k of I.entries){const M=k.resolvedInput||k.input;if(k.resolvedInput=await(k.transform?k.transform(M):M),k.resolvedInput)for(const A of await jC(k)){const z={tag:A,entry:k,resolvedOptions:c.resolvedOptions};await n.callHook("tag:normalise",z),I.tags.push(z.tag)}}return await n.callHook("tags:beforeResolve",I),await n.callHook("tags:resolve",I),await n.callHook("tags:afterResolve",I),I.tags},ssr:s};return[GC,ZC,XC,JC,YC,eA,tA,iA,...(e==null?void 0:e.plugins)||[]].forEach(I=>c.use(I)),c.hooks.callHook("init",c),c}function oA(){return Hb}const sA=pb.startsWith("3");function aA(e){return typeof e=="function"?e():ii(e)}function gf(e,n=""){if(e instanceof Promise)return e;const s=aA(e);return!e||!s?s:Array.isArray(s)?s.map(u=>gf(u,n)):typeof s=="object"?Object.fromEntries(Object.entries(s).map(([u,h])=>u==="titleTemplate"||u.startsWith("on")?[u,ii(h)]:[u,gf(h,u)])):s}const lA={hooks:{"entries:resolve":function(e){for(const n of e.entries)n.resolvedInput=gf(n.input)}}},Gb="usehead";function cA(e){return{install(s){sA&&(s.config.globalProperties.$unhead=e,s.config.globalProperties.$head=e,s.provide(Gb,e))}}.install}function uA(e={}){e.domDelayFn=e.domDelayFn||(s=>$r(()=>setTimeout(()=>s(),0)));const n=rA(e);return n.use(lA),n.install=cA(n),n}const Wm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Xm="__unhead_injection_handler__";function hA(e){Wm[Xm]=e}function dA(){if(Xm in Wm)return Wm[Xm]();const e=Hr(Gb);return e||oA()}function fA(e,n={}){const s=n.head||dA();if(s)return s.ssr?s.push(e,n):pA(s,e,n)}function pA(e,n,s={}){const u=Lt(!1),h=Lt({});Qn(()=>{h.value=u.value?{}:gf(n)});const g=e.push(h.value,s);return Ji(h,c=>{g.patch(c)}),ia()&&(kf(()=>{g.dispose()}),ib(()=>{u.value=!0}),tb(()=>{u.value=!1})),g}let Hd,Gd;function mA(){return Hd=$fetch(Fg(`builds/meta/${hc().app.buildId}.json`),{responseType:"json"}),Hd.then(e=>{Gd=fC(e.matcher)}).catch(e=>{console.error("[nuxt] Error fetching app manifest.",e)}),Hd}function Rf(){return Hd||mA()}async function qg(e){if(await Rf(),!Gd)return console.error("[nuxt] Error creating app manifest matcher.",Gd),{};try{return Df({},...Gd.matchAll(e).reverse())}catch(n){return console.error("[nuxt] Error matching route rules.",n),{}}}async function ov(e,n={}){const s=await yA(e,n),u=Wi(),h=u._payloadCache=u._payloadCache||{};return s in h||(h[s]=Wb(e).then(g=>g?Zb(s).then(m=>m||(delete h[s],null)):(h[s]=null,null))),h[s]}const gA="_payload.json";async function yA(e,n={}){const s=new URL(e,"http://localhost");if(s.host!=="localhost"||ra(s.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+e);const u=hc(),h=n.hash||(n.fresh?Date.now():u.app.buildId),g=u.app.cdnURL,m=g&&await Wb(e)?g:u.app.baseURL;return hh(m,s.pathname,gA+(h?`?${h}`:""))}async function Zb(e){const n=fetch(e).then(s=>s.text().then(Xb));try{return await n}catch(s){console.warn("[nuxt] Cannot load payload ",e,s)}return null}async function Wb(e=Ng().path){if(e=zf(e),(await Rf()).prerendered.includes(e))return!0;const s=await qg(e);return!!s.prerender&&!s.redirect}let Dd=null;async function _A(){if(Dd)return Dd;const e=document.getElementById("__NUXT_DATA__");if(!e)return{};const n=await Xb(e.textContent||""),s=e.dataset.src?await Zb(e.dataset.src):void 0;return Dd={...n,...s,...window.__NUXT__},Dd}async function Xb(e){return await LC(e,Wi()._payloadRevivers)}function vA(e,n){Wi()._payloadRevivers[e]=n}const sv={NuxtError:e=>$g(e),EmptyShallowRef:e=>lc(e==="_"?void 0:e==="0n"?BigInt(0):uf(e)),EmptyRef:e=>Lt(e==="_"?void 0:e==="0n"?BigInt(0):uf(e)),ShallowRef:e=>lc(e),ShallowReactive:e=>Yl(e),Ref:e=>Lt(e),Reactive:e=>Oo(e)},xA=go({name:"nuxt:revive-payload:client",order:-30,async setup(e){let n,s;for(const u in sv)vA(u,sv[u]);Object.assign(e.payload,([n,s]=kb(()=>e.runWithContext(_A)),n=await n,s(),n)),window.__NUXT__=e.payload}}),bA=[],wA=go({name:"nuxt:head",enforce:"pre",setup(e){const n=uA({plugins:bA});hA(()=>Wi().vueApp._context.provides.usehead),e.vueApp.use(n);{let s=!0;const u=async()=>{s=!1,await qb(n)};n.hooks.hook("dom:beforeRender",h=>{h.shouldRender=!s}),e.hooks.hook("page:start",()=>{s=!0}),e.hooks.hook("page:finish",()=>{e.isHydrating||u()}),e.hooks.hook("app:error",u),e.hooks.hook("app:suspense:resolve",u)}}}),EA=async e=>{let n,s;const u=([n,s]=kb(()=>qg(e.path)),n=await n,s(),n);if(u.redirect)return ra(u.redirect,{acceptRelative:!0})?(window.location.href=u.redirect,!1):u.redirect},SA=[EA];function pm(e){typeof e=="object"&&(e=Ib({pathname:e.path||"",search:bb(e.query||{}),hash:e.hash||""}));const n=new URL(e.toString(),window.location.href);return{path:n.pathname,fullPath:e,query:Rg(n.search),hash:n.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:e}}const IA=go({name:"nuxt:router",enforce:"pre",setup(e){const n=ET(window.location.pathname,hc().app.baseURL)+window.location.search+window.location.hash,s=[],u={"navigate:before":[],"resolve:before":[],"navigate:after":[],error:[]},h=(A,z)=>(u[A].push(z),()=>u[A].splice(u[A].indexOf(z),1)),g=hc().app.baseURL,m=Oo(pm(n));async function c(A,z){try{const q=pm(A);for(const K of u["navigate:before"]){const J=await K(q,m);if(J===!1||J instanceof Error)return;if(typeof J=="string"&&J.length)return c(J,!0)}for(const K of u["resolve:before"])await K(q,m);Object.assign(m,q),window.history[z?"replaceState":"pushState"]({},"",hh(g,q.fullPath)),e.isHydrating||await e.runWithContext(EC);for(const K of u["navigate:after"])await K(q,m)}catch(q){for(const K of u.error)await K(q)}}const k={currentRoute:je(()=>m),isReady:()=>Promise.resolve(),options:{},install:()=>Promise.resolve(),push:A=>c(A,!1),replace:A=>c(A,!0),back:()=>window.history.go(-1),go:A=>window.history.go(A),forward:()=>window.history.go(1),beforeResolve:A=>h("resolve:before",A),beforeEach:A=>h("navigate:before",A),afterEach:A=>h("navigate:after",A),onError:A=>h("error",A),resolve:pm,addRoute:(A,z)=>{s.push(z)},getRoutes:()=>s,hasRoute:A=>s.some(z=>z.name===A),removeRoute:A=>{const z=s.findIndex(q=>q.name===A);z!==-1&&s.splice(z,1)}};e.vueApp.component("RouterLink",Ui({functional:!0,props:{to:{type:String,required:!0},custom:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:String},setup:(A,{slots:z})=>{const q=()=>c(A.to,A.replace);return()=>{var J;const K=k.resolve(A.to);return A.custom?(J=z.default)==null?void 0:J.call(z,{href:A.to,navigate:q,route:K}):Fn("a",{href:A.to,onClick:se=>(se.preventDefault(),q())},z)}}})),window.addEventListener("popstate",A=>{const z=A.target.location;k.replace(z.href.replace(z.origin,""))}),e._route=m,e._middleware=e._middleware||{global:[],named:{}};const M=e.payload.state._layout;return e.hooks.hookOnce("app:created",async()=>{k.beforeEach(async(A,z)=>{A.meta=Oo(A.meta||{}),e.isHydrating&&M&&!ac(A.meta.layout)&&(A.meta.layout=M),e._processingMiddleware=!0;{const q=new Set([...SA,...e._middleware.global]);{const K=await e.runWithContext(()=>qg(A.path));if(K.appMiddleware)for(const J in K.appMiddleware){const se=e._middleware.named[J];if(!se)return;K.appMiddleware[J]?q.add(se):q.delete(se)}}for(const K of q){const J=await e.runWithContext(()=>K(A,z));if(J!==!0&&(J||J===!1))return J}}}),k.afterEach(()=>{delete e._processingMiddleware}),await k.replace(n),IT(m.fullPath,n)||await e.runWithContext(()=>Vb(m.fullPath))}),{provide:{route:m,router:k}}}}),Km=globalThis.requestIdleCallback||(e=>{const n=Date.now(),s={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))};return setTimeout(()=>{e(s)},1)}),TA=globalThis.cancelIdleCallback||(e=>{clearTimeout(e)}),Hg=e=>{const n=Wi();n.isHydrating?n.hooks.hookOnce("app:suspense:resolve",()=>{Km(()=>e())}):Km(()=>e())},CA=go({name:"nuxt:payload",setup(e){Fo().beforeResolve(async(n,s)=>{if(n.path===s.path)return;const u=await ov(n.path);u&&Object.assign(e.static.data,u.data)}),Hg(()=>{var n;e.hooks.hook("link:prefetch",async s=>{const{hostname:u}=new URL(s,window.location.href);u===window.location.hostname&&await ov(s)}),((n=navigator.connection)==null?void 0:n.effectiveType)!=="slow-2g"&&setTimeout(Rf,1e3)})}}),AA=go(e=>{let n;async function s(){const u=await Rf();n&&clearTimeout(n),n=setTimeout(s,Z0);try{const h=await $fetch(Fg("builds/latest.json")+`?${Date.now()}`);h.id!==u.id&&e.hooks.callHook("app:manifest:update",h)}catch{}}Hg(()=>{n=setTimeout(s,Z0)})}),MA="modulepreload",kA=function(e,n){return e[0]==="."?new URL(e,n).href:e},av={},LA=function(n,s,u){let h=Promise.resolve();if(s&&s.length>0){const g=document.getElementsByTagName("link"),m=document.querySelector("meta[property=csp-nonce]"),c=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));h=Promise.all(s.map(I=>{if(I=kA(I,u),I in av)return;av[I]=!0;const k=I.endsWith(".css"),M=k?'[rel="stylesheet"]':"";if(!!u)for(let q=g.length-1;q>=0;q--){const K=g[q];if(K.href===I&&(!k||K.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${I}"]${M}`))return;const z=document.createElement("link");if(z.rel=k?"stylesheet":MA,k||(z.as="script",z.crossOrigin=""),z.href=I,c&&z.setAttribute("nonce",c),document.head.appendChild(z),k)return new Promise((q,K)=>{z.addEventListener("load",q),z.addEventListener("error",()=>K(new Error(`Unable to preload CSS for ${I}`)))})}))}return h.then(()=>n()).catch(g=>{const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=g,window.dispatchEvent(m),!m.defaultPrevented)throw g})},yf=(...e)=>LA(...e).catch(n=>{const s=new Event("nuxt.preloadError");throw s.payload=n,window.dispatchEvent(s),n}),PA=rf(()=>yf(()=>Promise.resolve().then(()=>zL),void 0,import.meta.url).then(e=>e.default||e.default||e)),zA=rf(()=>yf(()=>import("./d-UY-aAO.js"),__vite__mapDeps([0,1]),import.meta.url).then(e=>e.default||e.default||e)),DA=[["Icon",PA],["IconCSS",zA]],RA=go({name:"nuxt:global-components",setup(e){for(const[n,s]of DA)e.vueApp.component(n,s),e.vueApp.component("Lazy"+n,s)}});function Jm(e){return typeof e=="function"?e():ii(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ym=()=>{};function OA(e,n){function s(...u){return new Promise((h,g)=>{Promise.resolve(e(()=>n.apply(this,u),{fn:n,thisArg:this,args:u})).then(h).catch(g)})}return s}function BA(e,n={}){let s,u,h=Ym;const g=c=>{clearTimeout(c),h(),h=Ym};return c=>{const I=Jm(e),k=Jm(n.maxWait);return s&&g(s),I<=0||k!==void 0&&k<=0?(u&&(g(u),u=null),Promise.resolve(c())):new Promise((M,A)=>{h=n.rejectOnCancel?A:M,k&&!u&&(u=setTimeout(()=>{s&&g(s),u=null,M(c())},k)),s=setTimeout(()=>{u&&g(u),u=null,M(c())},I)})}}function Kb(e,n=200,s={}){return OA(BA(n,s),e)}function FA(e,n,s){let u;gr(s)?u={evaluating:s}:u=s||{};const{lazy:h=!1,evaluating:g=void 0,shallow:m=!0,onError:c=Ym}=u,I=Lt(!h),k=m?lc(n):Lt(n);let M=0;return Qn(async A=>{if(!I.value)return;M++;const z=M;let q=!1;g&&Promise.resolve().then(()=>{g.value=!0});try{const K=await e(J=>{A(()=>{g&&(g.value=!1),q||J()})});z===M&&(k.value=K)}catch(K){c(K)}finally{g&&z===M&&(g.value=!1),q=!0}}),h?je(()=>(I.value=!0,k.value)):k}function lv(e){var n;const s=Jm(e);return(n=s==null?void 0:s.$el)!=null?n:s}const VA=Symbol("nuxt-ui.slideover"),NA=go(e=>{const n=lc({component:"div",props:{}});e.vueApp.provide(VA,n)}),jA=Symbol("nuxt-ui.modal"),$A=go(e=>{const n=lc({component:"div",props:{}});e.vueApp.provide(jA,n)}),UA={ui:{primary:"red",gray:"neutral",icons:{dynamic:!0}}},qA={nuxt:{},ui:{primary:"green",gray:"cool",colors:["red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose","primary"],strategy:"merge"}},tr=pC(UA,qA);function Of(){const e=Wi();return e._appConfig||(e._appConfig=Oo(tr)),e._appConfig}const Gg="-";function HA(e){const n=ZA(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:u}=e;function h(m){const c=m.split(Gg);return c[0]===""&&c.length!==1&&c.shift(),Jb(c,n)||GA(m)}function g(m,c){const I=s[m]||[];return c&&u[m]?[...I,...u[m]]:I}return{getClassGroupId:h,getConflictingClassGroupIds:g}}function Jb(e,n){var m;if(e.length===0)return n.classGroupId;const s=e[0],u=n.nextPart.get(s),h=u?Jb(e.slice(1),u):void 0;if(h)return h;if(n.validators.length===0)return;const g=e.join(Gg);return(m=n.validators.find(({validator:c})=>c(g)))==null?void 0:m.classGroupId}const cv=/^\[(.+)\]$/;function GA(e){if(cv.test(e)){const n=cv.exec(e)[1],s=n==null?void 0:n.substring(0,n.indexOf(":"));if(s)return"arbitrary.."+s}}function ZA(e){const{theme:n,prefix:s}=e,u={nextPart:new Map,validators:[]};return XA(Object.entries(e.classGroups),s).forEach(([g,m])=>{Qm(m,u,g,n)}),u}function Qm(e,n,s,u){e.forEach(h=>{if(typeof h=="string"){const g=h===""?n:uv(n,h);g.classGroupId=s;return}if(typeof h=="function"){if(WA(h)){Qm(h(u),n,s,u);return}n.validators.push({validator:h,classGroupId:s});return}Object.entries(h).forEach(([g,m])=>{Qm(m,uv(n,g),s,u)})})}function uv(e,n){let s=e;return n.split(Gg).forEach(u=>{s.nextPart.has(u)||s.nextPart.set(u,{nextPart:new Map,validators:[]}),s=s.nextPart.get(u)}),s}function WA(e){return e.isThemeGetter}function XA(e,n){return n?e.map(([s,u])=>{const h=u.map(g=>typeof g=="string"?n+g:typeof g=="object"?Object.fromEntries(Object.entries(g).map(([m,c])=>[n+m,c])):g);return[s,h]}):e}function KA(e){if(e<1)return{get:()=>{},set:()=>{}};let n=0,s=new Map,u=new Map;function h(g,m){s.set(g,m),n++,n>e&&(n=0,u=s,s=new Map)}return{get(g){let m=s.get(g);if(m!==void 0)return m;if((m=u.get(g))!==void 0)return h(g,m),m},set(g,m){s.has(g)?s.set(g,m):h(g,m)}}}const Yb="!";function JA(e){const n=e.separator,s=n.length===1,u=n[0],h=n.length;return function(m){const c=[];let I=0,k=0,M;for(let J=0;Jk?M-k:void 0;return{modifiers:c,hasImportantModifier:z,baseClassName:q,maybePostfixModifierPosition:K}}}function YA(e){if(e.length<=1)return e;const n=[];let s=[];return e.forEach(u=>{u[0]==="["?(n.push(...s.sort(),u),s=[]):s.push(u)}),n.push(...s.sort()),n}function QA(e){return{cache:KA(e.cacheSize),splitModifiers:JA(e),...HA(e)}}const eM=/\s+/;function tM(e,n){const{splitModifiers:s,getClassGroupId:u,getConflictingClassGroupIds:h}=n,g=new Set;return e.trim().split(eM).map(m=>{const{modifiers:c,hasImportantModifier:I,baseClassName:k,maybePostfixModifierPosition:M}=s(m);let A=u(M?k.substring(0,M):k),z=!!M;if(!A){if(!M)return{isTailwindClass:!1,originalClassName:m};if(A=u(k),!A)return{isTailwindClass:!1,originalClassName:m};z=!1}const q=YA(c).join(":");return{isTailwindClass:!0,modifierId:I?q+Yb:q,classGroupId:A,originalClassName:m,hasPostfixModifier:z}}).reverse().filter(m=>{if(!m.isTailwindClass)return!0;const{modifierId:c,classGroupId:I,hasPostfixModifier:k}=m,M=c+I;return g.has(M)?!1:(g.add(M),h(I,k).forEach(A=>g.add(c+A)),!0)}).reverse().map(m=>m.originalClassName).join(" ")}function wr(){let e=0,n,s,u="";for(;eA(M),e());return s=QA(k),u=s.cache.get,h=s.cache.set,g=c,c(I)}function c(I){const k=u(I);if(k)return k;const M=tM(I,s);return h(I,M),M}return function(){return g(wr.apply(null,arguments))}}function ji(e){const n=s=>s[e]||[];return n.isThemeGetter=!0,n}const e1=/^\[(?:([a-z-]+):)?(.+)\]$/i,iM=/^\d+\/\d+$/,rM=new Set(["px","full","screen"]),nM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oM=/\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$/,sM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,aM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function rs(e){return ja(e)||rM.has(e)||iM.test(e)}function Us(e){return xc(e,"length",gM)}function ja(e){return!!e&&!Number.isNaN(Number(e))}function Rd(e){return xc(e,"number",ja)}function zu(e){return!!e&&Number.isInteger(Number(e))}function cM(e){return e.endsWith("%")&&ja(e.slice(0,-1))}function Qt(e){return e1.test(e)}function qs(e){return nM.test(e)}const uM=new Set(["length","size","percentage"]);function hM(e){return xc(e,uM,t1)}function dM(e){return xc(e,"position",t1)}const fM=new Set(["image","url"]);function pM(e){return xc(e,fM,_M)}function mM(e){return xc(e,"",yM)}function Du(){return!0}function xc(e,n,s){const u=e1.exec(e);return u?u[1]?typeof n=="string"?u[1]===n:n.has(u[1]):s(u[2]):!1}function gM(e){return oM.test(e)&&!sM.test(e)}function t1(){return!1}function yM(e){return aM.test(e)}function _M(e){return lM.test(e)}function tg(){const e=ji("colors"),n=ji("spacing"),s=ji("blur"),u=ji("brightness"),h=ji("borderColor"),g=ji("borderRadius"),m=ji("borderSpacing"),c=ji("borderWidth"),I=ji("contrast"),k=ji("grayscale"),M=ji("hueRotate"),A=ji("invert"),z=ji("gap"),q=ji("gradientColorStops"),K=ji("gradientColorStopPositions"),J=ji("inset"),se=ji("margin"),ke=ji("opacity"),ye=ji("padding"),W=ji("saturate"),fe=ji("scale"),Z=ji("sepia"),ee=ji("skew"),Se=ji("space"),Ee=ji("translate"),Le=()=>["auto","contain","none"],pe=()=>["auto","hidden","clip","visible","scroll"],Ie=()=>["auto",Qt,n],Ae=()=>[Qt,n],De=()=>["",rs,Us],Ge=()=>["auto",ja,Qt],rt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Xe=()=>["solid","dashed","dotted","double","none"],dt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],nt=()=>["start","end","center","between","around","evenly","stretch"],ei=()=>["","0",Qt],$t=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Vt=()=>[ja,Rd],Nt=()=>[ja,Qt];return{cacheSize:500,separator:":",theme:{colors:[Du],spacing:[rs,Us],blur:["none","",qs,Qt],brightness:Vt(),borderColor:[e],borderRadius:["none","","full",qs,Qt],borderSpacing:Ae(),borderWidth:De(),contrast:Vt(),grayscale:ei(),hueRotate:Nt(),invert:ei(),gap:Ae(),gradientColorStops:[e],gradientColorStopPositions:[cM,Us],inset:Ie(),margin:Ie(),opacity:Vt(),padding:Ae(),saturate:Vt(),scale:Vt(),sepia:ei(),skew:Nt(),space:Ae(),translate:Ae()},classGroups:{aspect:[{aspect:["auto","square","video",Qt]}],container:["container"],columns:[{columns:[qs]}],"break-after":[{"break-after":$t()}],"break-before":[{"break-before":$t()}],"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:[...rt(),Qt]}],overflow:[{overflow:pe()}],"overflow-x":[{"overflow-x":pe()}],"overflow-y":[{"overflow-y":pe()}],overscroll:[{overscroll:Le()}],"overscroll-x":[{"overscroll-x":Le()}],"overscroll-y":[{"overscroll-y":Le()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[J]}],"inset-x":[{"inset-x":[J]}],"inset-y":[{"inset-y":[J]}],start:[{start:[J]}],end:[{end:[J]}],top:[{top:[J]}],right:[{right:[J]}],bottom:[{bottom:[J]}],left:[{left:[J]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",zu,Qt]}],basis:[{basis:Ie()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Qt]}],grow:[{grow:ei()}],shrink:[{shrink:ei()}],order:[{order:["first","last","none",zu,Qt]}],"grid-cols":[{"grid-cols":[Du]}],"col-start-end":[{col:["auto",{span:["full",zu,Qt]},Qt]}],"col-start":[{"col-start":Ge()}],"col-end":[{"col-end":Ge()}],"grid-rows":[{"grid-rows":[Du]}],"row-start-end":[{row:["auto",{span:[zu,Qt]},Qt]}],"row-start":[{"row-start":Ge()}],"row-end":[{"row-end":Ge()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Qt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Qt]}],gap:[{gap:[z]}],"gap-x":[{"gap-x":[z]}],"gap-y":[{"gap-y":[z]}],"justify-content":[{justify:["normal",...nt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...nt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...nt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[ye]}],px:[{px:[ye]}],py:[{py:[ye]}],ps:[{ps:[ye]}],pe:[{pe:[ye]}],pt:[{pt:[ye]}],pr:[{pr:[ye]}],pb:[{pb:[ye]}],pl:[{pl:[ye]}],m:[{m:[se]}],mx:[{mx:[se]}],my:[{my:[se]}],ms:[{ms:[se]}],me:[{me:[se]}],mt:[{mt:[se]}],mr:[{mr:[se]}],mb:[{mb:[se]}],ml:[{ml:[se]}],"space-x":[{"space-x":[Se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Qt,n]}],"min-w":[{"min-w":[Qt,n,"min","max","fit"]}],"max-w":[{"max-w":[Qt,n,"none","full","min","max","fit","prose",{screen:[qs]},qs]}],h:[{h:[Qt,n,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Qt,n,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Qt,n,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Qt,n,"auto","min","max","fit"]}],"font-size":[{text:["base",qs,Us]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rd]}],"font-family":[{font:[Du]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Qt]}],"line-clamp":[{"line-clamp":["none",ja,Rd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rs,Qt]}],"list-image":[{"list-image":["none",Qt]}],"list-style-type":[{list:["none","disc","decimal",Qt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[ke]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Xe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rs,Us]}],"underline-offset":[{"underline-offset":["auto",rs,Qt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Ae()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Qt]}],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",Qt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[ke]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...rt(),dM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[K]}],"gradient-via-pos":[{via:[K]}],"gradient-to-pos":[{to:[K]}],"gradient-from":[{from:[q]}],"gradient-via":[{via:[q]}],"gradient-to":[{to:[q]}],rounded:[{rounded:[g]}],"rounded-s":[{"rounded-s":[g]}],"rounded-e":[{"rounded-e":[g]}],"rounded-t":[{"rounded-t":[g]}],"rounded-r":[{"rounded-r":[g]}],"rounded-b":[{"rounded-b":[g]}],"rounded-l":[{"rounded-l":[g]}],"rounded-ss":[{"rounded-ss":[g]}],"rounded-se":[{"rounded-se":[g]}],"rounded-ee":[{"rounded-ee":[g]}],"rounded-es":[{"rounded-es":[g]}],"rounded-tl":[{"rounded-tl":[g]}],"rounded-tr":[{"rounded-tr":[g]}],"rounded-br":[{"rounded-br":[g]}],"rounded-bl":[{"rounded-bl":[g]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[ke]}],"border-style":[{border:[...Xe(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[ke]}],"divide-style":[{divide:Xe()}],"border-color":[{border:[h]}],"border-color-x":[{"border-x":[h]}],"border-color-y":[{"border-y":[h]}],"border-color-t":[{"border-t":[h]}],"border-color-r":[{"border-r":[h]}],"border-color-b":[{"border-b":[h]}],"border-color-l":[{"border-l":[h]}],"divide-color":[{divide:[h]}],"outline-style":[{outline:["",...Xe()]}],"outline-offset":[{"outline-offset":[rs,Qt]}],"outline-w":[{outline:[rs,Us]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:De()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[ke]}],"ring-offset-w":[{"ring-offset":[rs,Us]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qs,mM]}],"shadow-color":[{shadow:[Du]}],opacity:[{opacity:[ke]}],"mix-blend":[{"mix-blend":[...dt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":dt()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[u]}],contrast:[{contrast:[I]}],"drop-shadow":[{"drop-shadow":["","none",qs,Qt]}],grayscale:[{grayscale:[k]}],"hue-rotate":[{"hue-rotate":[M]}],invert:[{invert:[A]}],saturate:[{saturate:[W]}],sepia:[{sepia:[Z]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[u]}],"backdrop-contrast":[{"backdrop-contrast":[I]}],"backdrop-grayscale":[{"backdrop-grayscale":[k]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[M]}],"backdrop-invert":[{"backdrop-invert":[A]}],"backdrop-opacity":[{"backdrop-opacity":[ke]}],"backdrop-saturate":[{"backdrop-saturate":[W]}],"backdrop-sepia":[{"backdrop-sepia":[Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[m]}],"border-spacing-x":[{"border-spacing-x":[m]}],"border-spacing-y":[{"border-spacing-y":[m]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Qt]}],duration:[{duration:Nt()}],ease:[{ease:["linear","in","out","in-out",Qt]}],delay:[{delay:Nt()}],animate:[{animate:["none","spin","ping","pulse","bounce",Qt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[fe]}],"scale-x":[{"scale-x":[fe]}],"scale-y":[{"scale-y":[fe]}],rotate:[{rotate:[zu,Qt]}],"translate-x":[{"translate-x":[Ee]}],"translate-y":[{"translate-y":[Ee]}],"skew-x":[{"skew-x":[ee]}],"skew-y":[{"skew-y":[ee]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Qt]}],accent:[{accent:["auto",e]}],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",Qt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Ae()}],"scroll-mx":[{"scroll-mx":Ae()}],"scroll-my":[{"scroll-my":Ae()}],"scroll-ms":[{"scroll-ms":Ae()}],"scroll-me":[{"scroll-me":Ae()}],"scroll-mt":[{"scroll-mt":Ae()}],"scroll-mr":[{"scroll-mr":Ae()}],"scroll-mb":[{"scroll-mb":Ae()}],"scroll-ml":[{"scroll-ml":Ae()}],"scroll-p":[{"scroll-p":Ae()}],"scroll-px":[{"scroll-px":Ae()}],"scroll-py":[{"scroll-py":Ae()}],"scroll-ps":[{"scroll-ps":Ae()}],"scroll-pe":[{"scroll-pe":Ae()}],"scroll-pt":[{"scroll-pt":Ae()}],"scroll-pr":[{"scroll-pr":Ae()}],"scroll-pb":[{"scroll-pb":Ae()}],"scroll-pl":[{"scroll-pl":Ae()}],"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"]}],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",Qt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[rs,Us,Rd]}],stroke:[{stroke:[e,"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-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"]}}}function vM(e,{cacheSize:n,prefix:s,separator:u,extend:h={},override:g={}}){Zd(e,"cacheSize",n),Zd(e,"prefix",s),Zd(e,"separator",u);for(const m in g)xM(e[m],g[m]);for(const m in h)bM(e[m],h[m]);return e}function Zd(e,n,s){s!==void 0&&(e[n]=s)}function xM(e,n){if(n)for(const s in n)Zd(e,s,n[s])}function bM(e,n){if(n)for(const s in n){const u=n[s];u!==void 0&&(e[s]=(e[s]||[]).concat(u))}}function wM(e,...n){return typeof e=="function"?eg(tg,e,...n):eg(()=>vM(tg(),e),...n)}const dc=eg(tg);function EM(e,n){const s={...e};for(const u of n)delete s[u];return s}function i1(e,n,s){typeof n=="string"&&(n=n.split(".").map(h=>{const g=Number(h);return isNaN(g)?h:g}));let u=e;for(const h of n){if(u==null)return s;u=u[h]}return u!==void 0?u:s}const Zg={to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1}},SM=e=>Object.keys(Zg).reduce((s,u)=>(e[u]!==void 0&&(s[u]=e[u]),s),{}),IM=wM({extend:{classGroups:{icons:[e=>/^i-/.test(e)]}}}),TM=Vg((e,n,s,u)=>{if(u==="default"||u.startsWith("default.")||u==="popper"||u.startsWith("popper.")||u.endsWith("avatar")&&n==="size"||u.endsWith("chip")&&n==="size"||u.endsWith("badge")&&n==="size"||n==="color"||n==="variant")return!1;if(typeof e[n]=="string"&&typeof s=="string"&&e[n]&&s)return e[n]=IM(e[n],s),!0});function Ya(e,...n){return e==="override"?Df({},...n):TM({},...n)}function hv(e){const n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(n,function(u,h,g,m){return h+h+g+g+m+m});const s=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return s?`${parseInt(s[1],16)} ${parseInt(s[2],16)} ${parseInt(s[3],16)}`:null}function CM(e){const n=parseFloat(e);return isNaN(n)?e:n}const AM="inherit",MM="currentColor",kM="transparent",LM="#000",PM="#fff",zM={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},DM={50:"rgb(var(--color-gray-50) / )",100:"rgb(var(--color-gray-100) / )",200:"rgb(var(--color-gray-200) / )",300:"rgb(var(--color-gray-300) / )",400:"rgb(var(--color-gray-400) / )",500:"rgb(var(--color-gray-500) / )",600:"rgb(var(--color-gray-600) / )",700:"rgb(var(--color-gray-700) / )",800:"rgb(var(--color-gray-800) / )",900:"rgb(var(--color-gray-900) / )",950:"rgb(var(--color-gray-950) / )"},RM={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},OM={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},BM={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},FM={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},VM={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},NM={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},jM={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},$M={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},UM={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},qM={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},HM={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},GM={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},ZM={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},WM={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},XM={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},KM={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},JM={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},YM={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},QM={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},ek={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},tk={50:"rgb(var(--color-primary-50) / )",100:"rgb(var(--color-primary-100) / )",200:"rgb(var(--color-primary-200) / )",300:"rgb(var(--color-primary-300) / )",400:"rgb(var(--color-primary-400) / )",500:"rgb(var(--color-primary-500) / )",600:"rgb(var(--color-primary-600) / )",700:"rgb(var(--color-primary-700) / )",800:"rgb(var(--color-primary-800) / )",900:"rgb(var(--color-primary-900) / )",950:"rgb(var(--color-primary-950) / )",DEFAULT:"rgb(var(--color-primary-DEFAULT) / )"},ik={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},Od={inherit:AM,current:MM,transparent:kM,black:LM,white:PM,slate:zM,gray:DM,zinc:RM,neutral:OM,stone:BM,red:FM,orange:VM,amber:NM,yellow:jM,lime:$M,green:UM,emerald:qM,teal:HM,cyan:GM,sky:ZM,blue:WM,indigo:XM,violet:KM,purple:JM,fuchsia:YM,pink:QM,rose:ek,primary:tk,cool:ik},rk=go(()=>{const e=Of(),n=Wi(),s=je(()=>{const h=Od[e.ui.primary],g=Od[e.ui.gray];return h||console.warn(`[@nuxt/ui] Primary color '${e.ui.primary}' not found in Tailwind config`),g||console.warn(`[@nuxt/ui] Gray color '${e.ui.gray}' not found in Tailwind config`),`:root { +`)},domwindow(){return u("domwindow")},bigint(h){return u("bigint:"+h.toString())},process(){return u("process")},timer(){return u("timer")},pipe(){return u("pipe")},tcp(){return u("tcp")},udp(){return u("udp")},tty(){return u("tty")},statwatcher(){return u("statwatcher")},securecontext(){return u("securecontext")},connection(){return u("connection")},zlib(){return u("zlib")},context(){return u("context")},nodescript(){return u("nodescript")},httpparser(){return u("httpparser")},dataview(){return u("dataview")},signal(){return u("signal")},fsevent(){return u("fsevent")},tlswrap(){return u("tlswrap")}}}const Db="[native code] }",uC=Db.length;function J0(e){return typeof e!="function"?!1:Function.prototype.toString.call(e).slice(-uC)===Db}function hC(e,n,s={}){return e===n||K0(e,s)===K0(n,s)}function dC(e,n){return{ctx:{table:e},matchAll:s=>Ob(s,e)}}function Rb(e){const n={};for(const s in e)n[s]=s==="dynamic"?new Map(Object.entries(e[s]).map(([u,h])=>[u,Rb(h)])):new Map(Object.entries(e[s]));return n}function fC(e){return dC(Rb(e))}function Ob(e,n,s){e.endsWith("/")&&(e=e.slice(0,-1)||"/");const u=[];for(const[g,m]of Y0(n.wildcard))(e===g||e.startsWith(g+"/"))&&u.push(m);for(const[g,m]of Y0(n.dynamic))if(e.startsWith(g+"/")){const c="/"+e.slice(g.length).split("/").splice(2).join("/");u.push(...Ob(c,m))}const h=n.static.get(e);return h&&u.push(h),u.filter(Boolean)}function Y0(e){return[...e.entries()].sort((n,s)=>n[0].length-s[0].length)}function fm(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Hm(e,n,s=".",u){if(!fm(n))return Hm(e,{},s,u);const h=Object.assign({},n);for(const g in e){if(g==="__proto__"||g==="constructor")continue;const m=e[g];m!=null&&(u&&u(h,g,m,s)||(Array.isArray(m)&&Array.isArray(h[g])?h[g]=[...m,...h[g]]:fm(m)&&fm(h[g])?h[g]=Hm(m,h[g],(s?`${s}.`:"")+g.toString(),u):h[g]=m))}return h}function Vg(e){return(...n)=>n.reduce((s,u)=>Hm(s,u,"",e),{})}const Df=Vg(),pC=Vg((e,n,s)=>{if(e[n]!==void 0&&typeof s=="function")return e[n]=s(e[n]),!0});function mC(e,n){try{return n in e}catch{return!1}}var gC=Object.defineProperty,yC=(e,n,s)=>n in e?gC(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,Fa=(e,n,s)=>(yC(e,typeof n!="symbol"?n+"":n,s),s);class Gm extends Error{constructor(n,s={}){super(n,s),Fa(this,"statusCode",500),Fa(this,"fatal",!1),Fa(this,"unhandled",!1),Fa(this,"statusMessage"),Fa(this,"data"),Fa(this,"cause"),s.cause&&!this.cause&&(this.cause=s.cause)}toJSON(){const n={message:this.message,statusCode:Wm(this.statusCode,500)};return this.statusMessage&&(n.statusMessage=Bb(this.statusMessage)),this.data!==void 0&&(n.data=this.data),n}}Fa(Gm,"__h3_error__",!0);function _C(e){if(typeof e=="string")return new Gm(e);if(vC(e))return e;const n=new Gm(e.message??e.statusMessage??"",{cause:e.cause||e});if(mC(e,"stack"))try{Object.defineProperty(n,"stack",{get(){return e.stack}})}catch{try{n.stack=e.stack}catch{}}if(e.data&&(n.data=e.data),e.statusCode?n.statusCode=Wm(e.statusCode,n.statusCode):e.status&&(n.statusCode=Wm(e.status,n.statusCode)),e.statusMessage?n.statusMessage=e.statusMessage:e.statusText&&(n.statusMessage=e.statusText),n.statusMessage){const s=n.statusMessage;Bb(n.statusMessage)!==s&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(n.fatal=e.fatal),e.unhandled!==void 0&&(n.unhandled=e.unhandled),n}function vC(e){var n;return((n=e==null?void 0:e.constructor)==null?void 0:n.__h3_error__)===!0}const xC=/[^\u0009\u0020-\u007E]/g;function Bb(e=""){return e.replace(xC,"")}function Wm(e,n=200){return!e||(typeof e=="string"&&(e=Number.parseInt(e,10)),e<100||e>999)?n:e}const Fb=Symbol("route"),Fo=()=>{var e;return(e=Zi())==null?void 0:e.$router},Ng=()=>jx()?Hr(Fb,Zi()._route):Zi()._route;const bC=()=>{try{if(Zi()._processingMiddleware)return!0}catch{return!1}return!1},Vb=(e,n)=>{e||(e="/");const s=typeof e=="string"?e:Og(e.path||"/",e.query||{})+(e.hash||"");if(n!=null&&n.open){const{target:c="_blank",windowFeatures:I={}}=n.open,k=Object.entries(I).filter(([M,A])=>A!==void 0).map(([M,A])=>`${M.toLowerCase()}=${A}`).join(", ");return open(s,c,k),Promise.resolve()}const u=(n==null?void 0:n.external)||ra(s,{acceptRelative:!0});if(u){if(!(n!=null&&n.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const{protocol:c}=new URL(s,window.location.href);if(c&&xT(c))throw new Error(`Cannot navigate to a URL with '${c}' protocol.`)}const h=bC();if(!u&&h)return e;const g=Fo(),m=Zi();return u?(m._scope.stop(),n!=null&&n.replace?location.replace(s):location.href=s,h?m.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):n!=null&&n.replace?g.replace(e):g.push(e)},Nb="__nuxt_error",jg=()=>zo(Zi().payload,"error"),wC=e=>{const n=$g(e);try{const s=Zi(),u=jg();s.hooks.callHook("app:error",n),u.value=u.value||n}catch{throw n}return n},EC=async(e={})=>{const n=Zi(),s=jg();n.callHook("app:error:cleared",e),e.redirect&&await Fo().replace(e.redirect),s.value=tC},SC=e=>!!e&&typeof e=="object"&&Nb in e,$g=e=>{const n=_C(e);return Object.defineProperty(n,Nb,{value:!0,configurable:!1,writable:!1}),n},IC=-1,TC=-2,CC=-3,AC=-4,MC=-5,kC=-6;function LC(e,n){return PC(JSON.parse(e),n)}function PC(e,n){if(typeof e=="number")return h(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const s=e,u=Array(s.length);function h(g,m=!1){if(g===IC)return;if(g===CC)return NaN;if(g===AC)return 1/0;if(g===MC)return-1/0;if(g===kC)return-0;if(m)throw new Error("Invalid input");if(g in u)return u[g];const c=s[g];if(!c||typeof c!="object")u[g]=c;else if(Array.isArray(c))if(typeof c[0]=="string"){const I=c[0],k=n==null?void 0:n[I];if(k)return u[g]=k(h(c[1]));switch(I){case"Date":u[g]=new Date(c[1]);break;case"Set":const M=new Set;u[g]=M;for(let q=1;q>>9)+65536).toString(16).substring(1,8).toLowerCase()}function Q0(e){return e._h||Ug(e._d?e._d:`${e.tag}:${e.textContent||e.innerHTML||""}:${Object.entries(e.props).map(([n,s])=>`${n}:${String(s)}`).join(",")}`)}function $b(e,n){const{props:s,tag:u}=e;if(OC.includes(u))return u;if(u==="link"&&s.rel==="canonical")return"canonical";if(s.charset)return"charset";const h=["id"];u==="meta"&&h.push("name","property","http-equiv");for(const g of h)if(typeof s[g]<"u"){const m=String(s[g]);return`${u}:${g}:${m}`}return!1}function ev(e,n){return e==null?n||null:typeof e=="function"?e(n):e}async function FC(e,n,s){const u={tag:e,props:await Ub(typeof n=="object"&&typeof n!="function"&&!(n instanceof Promise)?{...n}:{[["script","noscript","style"].includes(e)?"innerHTML":"textContent"]:n},["templateParams","titleTemplate"].includes(e))};return jb.forEach(h=>{const g=typeof u.props[h]<"u"?u.props[h]:s[h];typeof g<"u"&&((!["innerHTML","textContent","children"].includes(h)||DC.includes(u.tag))&&(u[h==="children"?"innerHTML":h]=g),delete u.props[h])}),u.props.body&&(u.tagPosition="bodyClose",delete u.props.body),u.tag==="script"&&typeof u.innerHTML=="object"&&(u.innerHTML=JSON.stringify(u.innerHTML),u.props.type=u.props.type||"application/json"),Array.isArray(u.props.content)?u.props.content.map(h=>({...u,props:{...u.props,content:h}})):u}function VC(e,n){var u;const s=e==="class"?" ":";";return typeof n=="object"&&!Array.isArray(n)&&(n=Object.entries(n).filter(([,h])=>h).map(([h,g])=>e==="style"?`${h}:${g}`:h)),(u=String(Array.isArray(n)?n.join(s):n))==null?void 0:u.split(s).filter(h=>h.trim()).filter(Boolean).join(s)}async function Ub(e,n){for(const s of Object.keys(e)){if(["class","style"].includes(s)){e[s]=VC(s,e[s]);continue}if(e[s]instanceof Promise&&(e[s]=await e[s]),!n&&!jb.includes(s)){const u=String(e[s]),h=s.startsWith("data-");u==="true"||u===""?e[s]=h?"true":!0:e[s]||(h&&u==="false"?e[s]="false":delete e[s])}}return e}const NC=10;async function jC(e){const n=[];return Object.entries(e.resolvedInput).filter(([s,u])=>typeof u<"u"&&RC.includes(s)).forEach(([s,u])=>{const h=zC(u);n.push(...h.map(g=>FC(s,g,e)).flat())}),(await Promise.all(n)).flat().filter(Boolean).map((s,u)=>(s._e=e._i,e.mode&&(s._m=e.mode),s._p=(e._i<I&&I[k]||void 0,n):c=n[m],typeof c<"u"?(c||"").replace(/"/g,'\\"'):!1}let h=e;try{h=decodeURI(e)}catch{}return(h.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEach(m=>{const c=u(m.slice(1));typeof c=="string"&&(e=e.replace(new RegExp(`\\${m}(\\W|$)`,"g"),(I,k)=>`${c}${k}`).trim())}),e.includes($s)&&(e.endsWith($s)&&(e=e.slice(0,-$s.length).trim()),e.startsWith($s)&&(e=e.slice($s.length).trim()),e=e.replace(new RegExp(`\\${$s}\\s*\\${$s}`,"g"),$s),e=qd(e,{separator:s},s)),e}async function qb(e,n={}){var M;const s=n.document||e.resolvedOptions.document;if(!s||!e.dirty)return;const u={shouldRender:!0,tags:[]};if(await e.hooks.callHook("dom:beforeRender",u),!u.shouldRender)return;const h=(await e.resolveTags()).map(A=>({tag:A,id:Ud.includes(A.tag)?Q0(A):A.tag,shouldRender:!0}));let g=e._dom;if(!g){g={elMap:{htmlAttrs:s.documentElement,bodyAttrs:s.body}};for(const A of["body","head"]){const z=(M=s[A])==null?void 0:M.children,q=[];for(const K of[...z].filter(J=>Ud.includes(J.tagName.toLowerCase()))){const J={tag:K.tagName.toLowerCase(),props:await Ub(K.getAttributeNames().reduce((ye,Z)=>({...ye,[Z]:K.getAttribute(Z)}),{})),innerHTML:K.innerHTML};let se=1,ke=$b(J);for(;ke&&q.find(ye=>ye._d===ke);)ke=`${ke}:${se++}`;J._d=ke||void 0,q.push(J),g.elMap[K.getAttribute("data-hid")||Q0(J)]=K}}}g.pendingSideEffects={...g.sideEffects||{}},g.sideEffects={};function m(A,z,q){const K=`${A}:${z}`;g.sideEffects[K]=q,delete g.pendingSideEffects[K]}function c({id:A,$el:z,tag:q}){const K=q.tag.endsWith("Attrs");g.elMap[A]=z,K||(["textContent","innerHTML"].forEach(J=>{q[J]&&q[J]!==z[J]&&(z[J]=q[J])}),m(A,"el",()=>{var J;(J=g.elMap[A])==null||J.remove(),delete g.elMap[A]}));for(const[J,se]of Object.entries(q._eventHandlers||{}))z.getAttribute(`data-${J}`)!==""&&((q.tag==="bodyAttrs"?s.defaultView:z).addEventListener(J.replace("on",""),se.bind(z)),z.setAttribute(`data-${J}`,""));Object.entries(q.props).forEach(([J,se])=>{const ke=`attr:${J}`;if(J==="class")for(const ye of(se||"").split(" ").filter(Boolean))K&&m(A,`${ke}:${ye}`,()=>z.classList.remove(ye)),!z.classList.contains(ye)&&z.classList.add(ye);else if(J==="style")for(const ye of(se||"").split(";").filter(Boolean)){const[Z,...fe]=ye.split(":").map(W=>W.trim());m(A,`${ke}:${ye}:${Z}`,()=>{z.style.removeProperty(Z)}),z.style.setProperty(Z,fe.join(":"))}else z.getAttribute(J)!==se&&z.setAttribute(J,se===!0?"":String(se)),K&&m(A,ke,()=>z.removeAttribute(J))})}const I=[],k={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const A of h){const{tag:z,shouldRender:q,id:K}=A;if(q){if(z.tag==="title"){s.title=z.textContent;continue}A.$el=A.$el||g.elMap[K],A.$el?c(A):Ud.includes(z.tag)&&I.push(A)}}for(const A of I){const z=A.tag.tagPosition||"head";A.$el=s.createElement(A.tag.tag),c(A),k[z]=k[z]||s.createDocumentFragment(),k[z].appendChild(A.$el)}for(const A of h)await e.hooks.callHook("dom:renderTag",A,s,m);k.head&&s.head.appendChild(k.head),k.bodyOpen&&s.body.insertBefore(k.bodyOpen,s.body.firstChild),k.bodyClose&&s.body.appendChild(k.bodyClose),Object.values(g.pendingSideEffects).forEach(A=>A()),e._dom=g,e.dirty=!1,await e.hooks.callHook("dom:rendered",{renders:h})}async function UC(e,n={}){const s=n.delayFn||(u=>setTimeout(u,10));return e._domUpdatePromise=e._domUpdatePromise||new Promise(u=>s(async()=>{await qb(e,n),delete e._domUpdatePromise,u()}))}function qC(e){return n=>{var u,h;const s=((h=(u=n.resolvedOptions.document)==null?void 0:u.head.querySelector('script[id="unhead:payload"]'))==null?void 0:h.innerHTML)||!1;return s&&n.push(JSON.parse(s)),{mode:"client",hooks:{"entries:updated":function(g){UC(g,e)}}}}}const HC=["templateParams","htmlAttrs","bodyAttrs"],GC={hooks:{"tag:normalise":function({tag:e}){["hid","vmid","key"].forEach(u=>{e.props[u]&&(e.key=e.props[u],delete e.props[u])});const s=$b(e)||(e.key?`${e.tag}:${e.key}`:!1);s&&(e._d=s)},"tags:resolve":function(e){const n={};e.tags.forEach(u=>{const h=(u.key?`${u.tag}:${u.key}`:u._d)||u._p,g=n[h];if(g){let c=u==null?void 0:u.tagDuplicateStrategy;if(!c&&HC.includes(u.tag)&&(c="merge"),c==="merge"){const I=g.props;["class","style"].forEach(k=>{I[k]&&(u.props[k]?(k==="style"&&!I[k].endsWith(";")&&(I[k]+=";"),u.props[k]=`${I[k]} ${u.props[k]}`):u.props[k]=I[k])}),n[h].props={...I,...u.props};return}else if(u._e===g._e){g._duped=g._duped||[],u._d=`${g._d}:${g._duped.length+1}`,g._duped.push(u);return}else if(mf(u)>mf(g))return}const m=Object.keys(u.props).length+(u.innerHTML?1:0)+(u.textContent?1:0);if(Ud.includes(u.tag)&&m===0){delete n[h];return}n[h]=u});const s=[];Object.values(n).forEach(u=>{const h=u._duped;delete u._duped,s.push(u),h&&s.push(...h)}),e.tags=s,e.tags=e.tags.filter(u=>!(u.tag==="meta"&&(u.props.name||u.props.property)&&!u.props.content))}}},WC={mode:"server",hooks:{"tags:resolve":function(e){const n={};e.tags.filter(s=>["titleTemplate","templateParams","title"].includes(s.tag)&&s._m==="server").forEach(s=>{n[s.tag]=s.tag.startsWith("title")?s.textContent:s.props}),Object.keys(n).length&&e.tags.push({tag:"script",innerHTML:JSON.stringify(n),props:{id:"unhead:payload",type:"application/json"}})}}},ZC=["script","link","bodyAttrs"],XC=e=>({hooks:{"tags:resolve":function(n){for(const s of n.tags.filter(u=>ZC.includes(u.tag)))Object.entries(s.props).forEach(([u,h])=>{u.startsWith("on")&&typeof h=="function"&&(e.ssr&&rv.includes(u)?s.props[u]=`this.dataset.${u}fired = true`:delete s.props[u],s._eventHandlers=s._eventHandlers||{},s._eventHandlers[u]=h)}),e.ssr&&s._eventHandlers&&(s.props.src||s.props.href)&&(s.key=s.key||Ug(s.props.src||s.props.href))},"dom:renderTag":function({$el:n,tag:s}){var u,h;for(const g of Object.keys((n==null?void 0:n.dataset)||{}).filter(m=>rv.some(c=>`${c}fired`===m))){const m=g.replace("fired","");(h=(u=s._eventHandlers)==null?void 0:u[m])==null||h.call(n,new Event(m.replace("on","")))}}}}),KC=["link","style","script","noscript"],JC={hooks:{"tag:normalise":({tag:e})=>{e.key&&KC.includes(e.tag)&&(e.props["data-hid"]=e._h=Ug(e.key))}}},YC={hooks:{"tags:resolve":e=>{const n=s=>{var u;return(u=e.tags.find(h=>h._d===s))==null?void 0:u._p};for(const{prefix:s,offset:u}of $C)for(const h of e.tags.filter(g=>typeof g.tagPriority=="string"&&g.tagPriority.startsWith(s))){const g=n(h.tagPriority.replace(s,""));typeof g<"u"&&(h._p=g+u)}e.tags.sort((s,u)=>s._p-u._p).sort((s,u)=>mf(s)-mf(u))}}},QC={meta:"content",link:"href",htmlAttrs:"lang"},eA=e=>({hooks:{"tags:resolve":n=>{var c;const{tags:s}=n,u=(c=s.find(I=>I.tag==="title"))==null?void 0:c.textContent,h=s.findIndex(I=>I.tag==="templateParams"),g=h!==-1?s[h].props:{},m=g.separator||"|";delete g.separator,g.pageTitle=qd(g.pageTitle||u||"",g,m);for(const I of s.filter(k=>k.processTemplateParams!==!1)){const k=QC[I.tag];k&&typeof I.props[k]=="string"?I.props[k]=qd(I.props[k],g,m):(I.processTemplateParams===!0||["titleTemplate","title"].includes(I.tag))&&["innerHTML","textContent"].forEach(M=>{typeof I[M]=="string"&&(I[M]=qd(I[M],g,m))})}e._templateParams=g,e._separator=m,n.tags=s.filter(I=>I.tag!=="templateParams")}}}),tA={hooks:{"tags:resolve":e=>{const{tags:n}=e;let s=n.findIndex(h=>h.tag==="titleTemplate");const u=n.findIndex(h=>h.tag==="title");if(u!==-1&&s!==-1){const h=ev(n[s].textContent,n[u].textContent);h!==null?n[u].textContent=h||n[u].textContent:delete n[u]}else if(s!==-1){const h=ev(n[s].textContent);h!==null&&(n[s].textContent=h,n[s].tag="title",s=-1)}s!==-1&&delete n[s],e.tags=n.filter(Boolean)}}},iA={hooks:{"tags:afterResolve":function(e){for(const n of e.tags)typeof n.innerHTML=="string"&&(n.innerHTML&&["application/ld+json","application/json"].includes(n.props.type)?n.innerHTML=n.innerHTML.replace(/{c.dirty=!0,n.callHook("entries:updated",c)};let h=0,g=[];const m=[],c={plugins:m,dirty:!1,resolvedOptions:e,hooks:n,headEntries(){return g},use(I){const k=typeof I=="function"?I(c):I;(!k.key||!m.some(M=>M.key===k.key))&&(m.push(k),nv(k.mode,s)&&n.addHooks(k.hooks||{}))},push(I,k){k==null||delete k.head;const M={_i:h++,input:I,...k};return nv(M.mode,s)&&(g.push(M),u()),{dispose(){g=g.filter(A=>A._i!==M._i),n.callHook("entries:updated",c),u()},patch(A){g=g.map(z=>(z._i===M._i&&(z.input=M.input=A),z)),u()}}},async resolveTags(){const I={tags:[],entries:[...g]};await n.callHook("entries:resolve",I);for(const k of I.entries){const M=k.resolvedInput||k.input;if(k.resolvedInput=await(k.transform?k.transform(M):M),k.resolvedInput)for(const A of await jC(k)){const z={tag:A,entry:k,resolvedOptions:c.resolvedOptions};await n.callHook("tag:normalise",z),I.tags.push(z.tag)}}return await n.callHook("tags:beforeResolve",I),await n.callHook("tags:resolve",I),await n.callHook("tags:afterResolve",I),I.tags},ssr:s};return[GC,WC,XC,JC,YC,eA,tA,iA,...(e==null?void 0:e.plugins)||[]].forEach(I=>c.use(I)),c.hooks.callHook("init",c),c}function oA(){return Hb}const sA=pb.startsWith("3");function aA(e){return typeof e=="function"?e():ii(e)}function gf(e,n=""){if(e instanceof Promise)return e;const s=aA(e);return!e||!s?s:Array.isArray(s)?s.map(u=>gf(u,n)):typeof s=="object"?Object.fromEntries(Object.entries(s).map(([u,h])=>u==="titleTemplate"||u.startsWith("on")?[u,ii(h)]:[u,gf(h,u)])):s}const lA={hooks:{"entries:resolve":function(e){for(const n of e.entries)n.resolvedInput=gf(n.input)}}},Gb="usehead";function cA(e){return{install(s){sA&&(s.config.globalProperties.$unhead=e,s.config.globalProperties.$head=e,s.provide(Gb,e))}}.install}function uA(e={}){e.domDelayFn=e.domDelayFn||(s=>$r(()=>setTimeout(()=>s(),0)));const n=rA(e);return n.use(lA),n.install=cA(n),n}const Zm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Xm="__unhead_injection_handler__";function hA(e){Zm[Xm]=e}function dA(){if(Xm in Zm)return Zm[Xm]();const e=Hr(Gb);return e||oA()}function fA(e,n={}){const s=n.head||dA();if(s)return s.ssr?s.push(e,n):pA(s,e,n)}function pA(e,n,s={}){const u=Lt(!1),h=Lt({});Qn(()=>{h.value=u.value?{}:gf(n)});const g=e.push(h.value,s);return er(h,c=>{g.patch(c)}),ia()&&(kf(()=>{g.dispose()}),ib(()=>{u.value=!0}),tb(()=>{u.value=!1})),g}let Hd,Gd;function mA(){return Hd=$fetch(Fg(`builds/meta/${hc().app.buildId}.json`),{responseType:"json"}),Hd.then(e=>{Gd=fC(e.matcher)}).catch(e=>{console.error("[nuxt] Error fetching app manifest.",e)}),Hd}function Rf(){return Hd||mA()}async function qg(e){if(await Rf(),!Gd)return console.error("[nuxt] Error creating app manifest matcher.",Gd),{};try{return Df({},...Gd.matchAll(e).reverse())}catch(n){return console.error("[nuxt] Error matching route rules.",n),{}}}async function ov(e,n={}){const s=await yA(e,n),u=Zi(),h=u._payloadCache=u._payloadCache||{};return s in h||(h[s]=Zb(e).then(g=>g?Wb(s).then(m=>m||(delete h[s],null)):(h[s]=null,null))),h[s]}const gA="_payload.json";async function yA(e,n={}){const s=new URL(e,"http://localhost");if(s.host!=="localhost"||ra(s.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+e);const u=hc(),h=n.hash||(n.fresh?Date.now():u.app.buildId),g=u.app.cdnURL,m=g&&await Zb(e)?g:u.app.baseURL;return hh(m,s.pathname,gA+(h?`?${h}`:""))}async function Wb(e){const n=fetch(e).then(s=>s.text().then(Xb));try{return await n}catch(s){console.warn("[nuxt] Cannot load payload ",e,s)}return null}async function Zb(e=Ng().path){if(e=zf(e),(await Rf()).prerendered.includes(e))return!0;const s=await qg(e);return!!s.prerender&&!s.redirect}let Dd=null;async function _A(){if(Dd)return Dd;const e=document.getElementById("__NUXT_DATA__");if(!e)return{};const n=await Xb(e.textContent||""),s=e.dataset.src?await Wb(e.dataset.src):void 0;return Dd={...n,...s,...window.__NUXT__},Dd}async function Xb(e){return await LC(e,Zi()._payloadRevivers)}function vA(e,n){Zi()._payloadRevivers[e]=n}const sv={NuxtError:e=>$g(e),EmptyShallowRef:e=>lc(e==="_"?void 0:e==="0n"?BigInt(0):uf(e)),EmptyRef:e=>Lt(e==="_"?void 0:e==="0n"?BigInt(0):uf(e)),ShallowRef:e=>lc(e),ShallowReactive:e=>Yl(e),Ref:e=>Lt(e),Reactive:e=>Oo(e)},xA=go({name:"nuxt:revive-payload:client",order:-30,async setup(e){let n,s;for(const u in sv)vA(u,sv[u]);Object.assign(e.payload,([n,s]=kb(()=>e.runWithContext(_A)),n=await n,s(),n)),window.__NUXT__=e.payload}}),bA=[],wA=go({name:"nuxt:head",enforce:"pre",setup(e){const n=uA({plugins:bA});hA(()=>Zi().vueApp._context.provides.usehead),e.vueApp.use(n);{let s=!0;const u=async()=>{s=!1,await qb(n)};n.hooks.hook("dom:beforeRender",h=>{h.shouldRender=!s}),e.hooks.hook("page:start",()=>{s=!0}),e.hooks.hook("page:finish",()=>{e.isHydrating||u()}),e.hooks.hook("app:error",u),e.hooks.hook("app:suspense:resolve",u)}}}),EA=async e=>{let n,s;const u=([n,s]=kb(()=>qg(e.path)),n=await n,s(),n);if(u.redirect)return ra(u.redirect,{acceptRelative:!0})?(window.location.href=u.redirect,!1):u.redirect},SA=[EA];function pm(e){typeof e=="object"&&(e=Ib({pathname:e.path||"",search:bb(e.query||{}),hash:e.hash||""}));const n=new URL(e.toString(),window.location.href);return{path:n.pathname,fullPath:e,query:Rg(n.search),hash:n.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:e}}const IA=go({name:"nuxt:router",enforce:"pre",setup(e){const n=ET(window.location.pathname,hc().app.baseURL)+window.location.search+window.location.hash,s=[],u={"navigate:before":[],"resolve:before":[],"navigate:after":[],error:[]},h=(A,z)=>(u[A].push(z),()=>u[A].splice(u[A].indexOf(z),1)),g=hc().app.baseURL,m=Oo(pm(n));async function c(A,z){try{const q=pm(A);for(const K of u["navigate:before"]){const J=await K(q,m);if(J===!1||J instanceof Error)return;if(typeof J=="string"&&J.length)return c(J,!0)}for(const K of u["resolve:before"])await K(q,m);Object.assign(m,q),window.history[z?"replaceState":"pushState"]({},"",hh(g,q.fullPath)),e.isHydrating||await e.runWithContext(EC);for(const K of u["navigate:after"])await K(q,m)}catch(q){for(const K of u.error)await K(q)}}const k={currentRoute:je(()=>m),isReady:()=>Promise.resolve(),options:{},install:()=>Promise.resolve(),push:A=>c(A,!1),replace:A=>c(A,!0),back:()=>window.history.go(-1),go:A=>window.history.go(A),forward:()=>window.history.go(1),beforeResolve:A=>h("resolve:before",A),beforeEach:A=>h("navigate:before",A),afterEach:A=>h("navigate:after",A),onError:A=>h("error",A),resolve:pm,addRoute:(A,z)=>{s.push(z)},getRoutes:()=>s,hasRoute:A=>s.some(z=>z.name===A),removeRoute:A=>{const z=s.findIndex(q=>q.name===A);z!==-1&&s.splice(z,1)}};e.vueApp.component("RouterLink",Ui({functional:!0,props:{to:{type:String,required:!0},custom:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:String},setup:(A,{slots:z})=>{const q=()=>c(A.to,A.replace);return()=>{var J;const K=k.resolve(A.to);return A.custom?(J=z.default)==null?void 0:J.call(z,{href:A.to,navigate:q,route:K}):Fn("a",{href:A.to,onClick:se=>(se.preventDefault(),q())},z)}}})),window.addEventListener("popstate",A=>{const z=A.target.location;k.replace(z.href.replace(z.origin,""))}),e._route=m,e._middleware=e._middleware||{global:[],named:{}};const M=e.payload.state._layout;return e.hooks.hookOnce("app:created",async()=>{k.beforeEach(async(A,z)=>{A.meta=Oo(A.meta||{}),e.isHydrating&&M&&!ac(A.meta.layout)&&(A.meta.layout=M),e._processingMiddleware=!0;{const q=new Set([...SA,...e._middleware.global]);{const K=await e.runWithContext(()=>qg(A.path));if(K.appMiddleware)for(const J in K.appMiddleware){const se=e._middleware.named[J];if(!se)return;K.appMiddleware[J]?q.add(se):q.delete(se)}}for(const K of q){const J=await e.runWithContext(()=>K(A,z));if(J!==!0&&(J||J===!1))return J}}}),k.afterEach(()=>{delete e._processingMiddleware}),await k.replace(n),IT(m.fullPath,n)||await e.runWithContext(()=>Vb(m.fullPath))}),{provide:{route:m,router:k}}}}),Km=globalThis.requestIdleCallback||(e=>{const n=Date.now(),s={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))};return setTimeout(()=>{e(s)},1)}),TA=globalThis.cancelIdleCallback||(e=>{clearTimeout(e)}),Hg=e=>{const n=Zi();n.isHydrating?n.hooks.hookOnce("app:suspense:resolve",()=>{Km(()=>e())}):Km(()=>e())},CA=go({name:"nuxt:payload",setup(e){Fo().beforeResolve(async(n,s)=>{if(n.path===s.path)return;const u=await ov(n.path);u&&Object.assign(e.static.data,u.data)}),Hg(()=>{var n;e.hooks.hook("link:prefetch",async s=>{const{hostname:u}=new URL(s,window.location.href);u===window.location.hostname&&await ov(s)}),((n=navigator.connection)==null?void 0:n.effectiveType)!=="slow-2g"&&setTimeout(Rf,1e3)})}}),AA=go(e=>{let n;async function s(){const u=await Rf();n&&clearTimeout(n),n=setTimeout(s,W0);try{const h=await $fetch(Fg("builds/latest.json")+`?${Date.now()}`);h.id!==u.id&&e.hooks.callHook("app:manifest:update",h)}catch{}}Hg(()=>{n=setTimeout(s,W0)})}),MA="modulepreload",kA=function(e,n){return e[0]==="."?new URL(e,n).href:e},av={},LA=function(n,s,u){let h=Promise.resolve();if(s&&s.length>0){const g=document.getElementsByTagName("link"),m=document.querySelector("meta[property=csp-nonce]"),c=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));h=Promise.all(s.map(I=>{if(I=kA(I,u),I in av)return;av[I]=!0;const k=I.endsWith(".css"),M=k?'[rel="stylesheet"]':"";if(!!u)for(let q=g.length-1;q>=0;q--){const K=g[q];if(K.href===I&&(!k||K.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${I}"]${M}`))return;const z=document.createElement("link");if(z.rel=k?"stylesheet":MA,k||(z.as="script",z.crossOrigin=""),z.href=I,c&&z.setAttribute("nonce",c),document.head.appendChild(z),k)return new Promise((q,K)=>{z.addEventListener("load",q),z.addEventListener("error",()=>K(new Error(`Unable to preload CSS for ${I}`)))})}))}return h.then(()=>n()).catch(g=>{const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=g,window.dispatchEvent(m),!m.defaultPrevented)throw g})},yf=(...e)=>LA(...e).catch(n=>{const s=new Event("nuxt.preloadError");throw s.payload=n,window.dispatchEvent(s),n}),PA=rf(()=>yf(()=>Promise.resolve().then(()=>zL),void 0,import.meta.url).then(e=>e.default||e.default||e)),zA=rf(()=>yf(()=>import("./DNUVdy4O.js"),__vite__mapDeps([0,1]),import.meta.url).then(e=>e.default||e.default||e)),DA=[["Icon",PA],["IconCSS",zA]],RA=go({name:"nuxt:global-components",setup(e){for(const[n,s]of DA)e.vueApp.component(n,s),e.vueApp.component("Lazy"+n,s)}});function Jm(e){return typeof e=="function"?e():ii(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ym=()=>{};function OA(e,n){function s(...u){return new Promise((h,g)=>{Promise.resolve(e(()=>n.apply(this,u),{fn:n,thisArg:this,args:u})).then(h).catch(g)})}return s}function BA(e,n={}){let s,u,h=Ym;const g=c=>{clearTimeout(c),h(),h=Ym};return c=>{const I=Jm(e),k=Jm(n.maxWait);return s&&g(s),I<=0||k!==void 0&&k<=0?(u&&(g(u),u=null),Promise.resolve(c())):new Promise((M,A)=>{h=n.rejectOnCancel?A:M,k&&!u&&(u=setTimeout(()=>{s&&g(s),u=null,M(c())},k)),s=setTimeout(()=>{u&&g(u),u=null,M(c())},I)})}}function Kb(e,n=200,s={}){return OA(BA(n,s),e)}function FA(e,n,s){let u;yr(s)?u={evaluating:s}:u=s||{};const{lazy:h=!1,evaluating:g=void 0,shallow:m=!0,onError:c=Ym}=u,I=Lt(!h),k=m?lc(n):Lt(n);let M=0;return Qn(async A=>{if(!I.value)return;M++;const z=M;let q=!1;g&&Promise.resolve().then(()=>{g.value=!0});try{const K=await e(J=>{A(()=>{g&&(g.value=!1),q||J()})});z===M&&(k.value=K)}catch(K){c(K)}finally{g&&z===M&&(g.value=!1),q=!0}}),h?je(()=>(I.value=!0,k.value)):k}function lv(e){var n;const s=Jm(e);return(n=s==null?void 0:s.$el)!=null?n:s}const VA=Symbol("nuxt-ui.slideover"),NA=go(e=>{const n=lc({component:"div",props:{}});e.vueApp.provide(VA,n)}),jA=Symbol("nuxt-ui.modal"),$A=go(e=>{const n=lc({component:"div",props:{}});e.vueApp.provide(jA,n)}),UA={ui:{primary:"red",gray:"neutral",icons:{dynamic:!0}}},qA={nuxt:{},ui:{primary:"green",gray:"cool",colors:["red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose","primary"],strategy:"merge"}},tr=pC(UA,qA);function Of(){const e=Zi();return e._appConfig||(e._appConfig=Oo(tr)),e._appConfig}const Gg="-";function HA(e){const n=WA(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:u}=e;function h(m){const c=m.split(Gg);return c[0]===""&&c.length!==1&&c.shift(),Jb(c,n)||GA(m)}function g(m,c){const I=s[m]||[];return c&&u[m]?[...I,...u[m]]:I}return{getClassGroupId:h,getConflictingClassGroupIds:g}}function Jb(e,n){var m;if(e.length===0)return n.classGroupId;const s=e[0],u=n.nextPart.get(s),h=u?Jb(e.slice(1),u):void 0;if(h)return h;if(n.validators.length===0)return;const g=e.join(Gg);return(m=n.validators.find(({validator:c})=>c(g)))==null?void 0:m.classGroupId}const cv=/^\[(.+)\]$/;function GA(e){if(cv.test(e)){const n=cv.exec(e)[1],s=n==null?void 0:n.substring(0,n.indexOf(":"));if(s)return"arbitrary.."+s}}function WA(e){const{theme:n,prefix:s}=e,u={nextPart:new Map,validators:[]};return XA(Object.entries(e.classGroups),s).forEach(([g,m])=>{Qm(m,u,g,n)}),u}function Qm(e,n,s,u){e.forEach(h=>{if(typeof h=="string"){const g=h===""?n:uv(n,h);g.classGroupId=s;return}if(typeof h=="function"){if(ZA(h)){Qm(h(u),n,s,u);return}n.validators.push({validator:h,classGroupId:s});return}Object.entries(h).forEach(([g,m])=>{Qm(m,uv(n,g),s,u)})})}function uv(e,n){let s=e;return n.split(Gg).forEach(u=>{s.nextPart.has(u)||s.nextPart.set(u,{nextPart:new Map,validators:[]}),s=s.nextPart.get(u)}),s}function ZA(e){return e.isThemeGetter}function XA(e,n){return n?e.map(([s,u])=>{const h=u.map(g=>typeof g=="string"?n+g:typeof g=="object"?Object.fromEntries(Object.entries(g).map(([m,c])=>[n+m,c])):g);return[s,h]}):e}function KA(e){if(e<1)return{get:()=>{},set:()=>{}};let n=0,s=new Map,u=new Map;function h(g,m){s.set(g,m),n++,n>e&&(n=0,u=s,s=new Map)}return{get(g){let m=s.get(g);if(m!==void 0)return m;if((m=u.get(g))!==void 0)return h(g,m),m},set(g,m){s.has(g)?s.set(g,m):h(g,m)}}}const Yb="!";function JA(e){const n=e.separator,s=n.length===1,u=n[0],h=n.length;return function(m){const c=[];let I=0,k=0,M;for(let J=0;Jk?M-k:void 0;return{modifiers:c,hasImportantModifier:z,baseClassName:q,maybePostfixModifierPosition:K}}}function YA(e){if(e.length<=1)return e;const n=[];let s=[];return e.forEach(u=>{u[0]==="["?(n.push(...s.sort(),u),s=[]):s.push(u)}),n.push(...s.sort()),n}function QA(e){return{cache:KA(e.cacheSize),splitModifiers:JA(e),...HA(e)}}const eM=/\s+/;function tM(e,n){const{splitModifiers:s,getClassGroupId:u,getConflictingClassGroupIds:h}=n,g=new Set;return e.trim().split(eM).map(m=>{const{modifiers:c,hasImportantModifier:I,baseClassName:k,maybePostfixModifierPosition:M}=s(m);let A=u(M?k.substring(0,M):k),z=!!M;if(!A){if(!M)return{isTailwindClass:!1,originalClassName:m};if(A=u(k),!A)return{isTailwindClass:!1,originalClassName:m};z=!1}const q=YA(c).join(":");return{isTailwindClass:!0,modifierId:I?q+Yb:q,classGroupId:A,originalClassName:m,hasPostfixModifier:z}}).reverse().filter(m=>{if(!m.isTailwindClass)return!0;const{modifierId:c,classGroupId:I,hasPostfixModifier:k}=m,M=c+I;return g.has(M)?!1:(g.add(M),h(I,k).forEach(A=>g.add(c+A)),!0)}).reverse().map(m=>m.originalClassName).join(" ")}function Er(){let e=0,n,s,u="";for(;eA(M),e());return s=QA(k),u=s.cache.get,h=s.cache.set,g=c,c(I)}function c(I){const k=u(I);if(k)return k;const M=tM(I,s);return h(I,M),M}return function(){return g(Er.apply(null,arguments))}}function ji(e){const n=s=>s[e]||[];return n.isThemeGetter=!0,n}const e1=/^\[(?:([a-z-]+):)?(.+)\]$/i,iM=/^\d+\/\d+$/,rM=new Set(["px","full","screen"]),nM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oM=/\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$/,sM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,aM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function rs(e){return ja(e)||rM.has(e)||iM.test(e)}function Us(e){return xc(e,"length",gM)}function ja(e){return!!e&&!Number.isNaN(Number(e))}function Rd(e){return xc(e,"number",ja)}function zu(e){return!!e&&Number.isInteger(Number(e))}function cM(e){return e.endsWith("%")&&ja(e.slice(0,-1))}function Qt(e){return e1.test(e)}function qs(e){return nM.test(e)}const uM=new Set(["length","size","percentage"]);function hM(e){return xc(e,uM,t1)}function dM(e){return xc(e,"position",t1)}const fM=new Set(["image","url"]);function pM(e){return xc(e,fM,_M)}function mM(e){return xc(e,"",yM)}function Du(){return!0}function xc(e,n,s){const u=e1.exec(e);return u?u[1]?typeof n=="string"?u[1]===n:n.has(u[1]):s(u[2]):!1}function gM(e){return oM.test(e)&&!sM.test(e)}function t1(){return!1}function yM(e){return aM.test(e)}function _M(e){return lM.test(e)}function tg(){const e=ji("colors"),n=ji("spacing"),s=ji("blur"),u=ji("brightness"),h=ji("borderColor"),g=ji("borderRadius"),m=ji("borderSpacing"),c=ji("borderWidth"),I=ji("contrast"),k=ji("grayscale"),M=ji("hueRotate"),A=ji("invert"),z=ji("gap"),q=ji("gradientColorStops"),K=ji("gradientColorStopPositions"),J=ji("inset"),se=ji("margin"),ke=ji("opacity"),ye=ji("padding"),Z=ji("saturate"),fe=ji("scale"),W=ji("sepia"),ee=ji("skew"),Se=ji("space"),Ee=ji("translate"),Le=()=>["auto","contain","none"],pe=()=>["auto","hidden","clip","visible","scroll"],Ie=()=>["auto",Qt,n],Ae=()=>[Qt,n],De=()=>["",rs,Us],Ge=()=>["auto",ja,Qt],rt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Xe=()=>["solid","dashed","dotted","double","none"],dt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],nt=()=>["start","end","center","between","around","evenly","stretch"],ei=()=>["","0",Qt],$t=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Vt=()=>[ja,Rd],Nt=()=>[ja,Qt];return{cacheSize:500,separator:":",theme:{colors:[Du],spacing:[rs,Us],blur:["none","",qs,Qt],brightness:Vt(),borderColor:[e],borderRadius:["none","","full",qs,Qt],borderSpacing:Ae(),borderWidth:De(),contrast:Vt(),grayscale:ei(),hueRotate:Nt(),invert:ei(),gap:Ae(),gradientColorStops:[e],gradientColorStopPositions:[cM,Us],inset:Ie(),margin:Ie(),opacity:Vt(),padding:Ae(),saturate:Vt(),scale:Vt(),sepia:ei(),skew:Nt(),space:Ae(),translate:Ae()},classGroups:{aspect:[{aspect:["auto","square","video",Qt]}],container:["container"],columns:[{columns:[qs]}],"break-after":[{"break-after":$t()}],"break-before":[{"break-before":$t()}],"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:[...rt(),Qt]}],overflow:[{overflow:pe()}],"overflow-x":[{"overflow-x":pe()}],"overflow-y":[{"overflow-y":pe()}],overscroll:[{overscroll:Le()}],"overscroll-x":[{"overscroll-x":Le()}],"overscroll-y":[{"overscroll-y":Le()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[J]}],"inset-x":[{"inset-x":[J]}],"inset-y":[{"inset-y":[J]}],start:[{start:[J]}],end:[{end:[J]}],top:[{top:[J]}],right:[{right:[J]}],bottom:[{bottom:[J]}],left:[{left:[J]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",zu,Qt]}],basis:[{basis:Ie()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Qt]}],grow:[{grow:ei()}],shrink:[{shrink:ei()}],order:[{order:["first","last","none",zu,Qt]}],"grid-cols":[{"grid-cols":[Du]}],"col-start-end":[{col:["auto",{span:["full",zu,Qt]},Qt]}],"col-start":[{"col-start":Ge()}],"col-end":[{"col-end":Ge()}],"grid-rows":[{"grid-rows":[Du]}],"row-start-end":[{row:["auto",{span:[zu,Qt]},Qt]}],"row-start":[{"row-start":Ge()}],"row-end":[{"row-end":Ge()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Qt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Qt]}],gap:[{gap:[z]}],"gap-x":[{"gap-x":[z]}],"gap-y":[{"gap-y":[z]}],"justify-content":[{justify:["normal",...nt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...nt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...nt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[ye]}],px:[{px:[ye]}],py:[{py:[ye]}],ps:[{ps:[ye]}],pe:[{pe:[ye]}],pt:[{pt:[ye]}],pr:[{pr:[ye]}],pb:[{pb:[ye]}],pl:[{pl:[ye]}],m:[{m:[se]}],mx:[{mx:[se]}],my:[{my:[se]}],ms:[{ms:[se]}],me:[{me:[se]}],mt:[{mt:[se]}],mr:[{mr:[se]}],mb:[{mb:[se]}],ml:[{ml:[se]}],"space-x":[{"space-x":[Se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Qt,n]}],"min-w":[{"min-w":[Qt,n,"min","max","fit"]}],"max-w":[{"max-w":[Qt,n,"none","full","min","max","fit","prose",{screen:[qs]},qs]}],h:[{h:[Qt,n,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Qt,n,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Qt,n,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Qt,n,"auto","min","max","fit"]}],"font-size":[{text:["base",qs,Us]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rd]}],"font-family":[{font:[Du]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Qt]}],"line-clamp":[{"line-clamp":["none",ja,Rd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rs,Qt]}],"list-image":[{"list-image":["none",Qt]}],"list-style-type":[{list:["none","disc","decimal",Qt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[ke]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Xe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rs,Us]}],"underline-offset":[{"underline-offset":["auto",rs,Qt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Ae()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Qt]}],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",Qt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[ke]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...rt(),dM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[K]}],"gradient-via-pos":[{via:[K]}],"gradient-to-pos":[{to:[K]}],"gradient-from":[{from:[q]}],"gradient-via":[{via:[q]}],"gradient-to":[{to:[q]}],rounded:[{rounded:[g]}],"rounded-s":[{"rounded-s":[g]}],"rounded-e":[{"rounded-e":[g]}],"rounded-t":[{"rounded-t":[g]}],"rounded-r":[{"rounded-r":[g]}],"rounded-b":[{"rounded-b":[g]}],"rounded-l":[{"rounded-l":[g]}],"rounded-ss":[{"rounded-ss":[g]}],"rounded-se":[{"rounded-se":[g]}],"rounded-ee":[{"rounded-ee":[g]}],"rounded-es":[{"rounded-es":[g]}],"rounded-tl":[{"rounded-tl":[g]}],"rounded-tr":[{"rounded-tr":[g]}],"rounded-br":[{"rounded-br":[g]}],"rounded-bl":[{"rounded-bl":[g]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[ke]}],"border-style":[{border:[...Xe(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[ke]}],"divide-style":[{divide:Xe()}],"border-color":[{border:[h]}],"border-color-x":[{"border-x":[h]}],"border-color-y":[{"border-y":[h]}],"border-color-t":[{"border-t":[h]}],"border-color-r":[{"border-r":[h]}],"border-color-b":[{"border-b":[h]}],"border-color-l":[{"border-l":[h]}],"divide-color":[{divide:[h]}],"outline-style":[{outline:["",...Xe()]}],"outline-offset":[{"outline-offset":[rs,Qt]}],"outline-w":[{outline:[rs,Us]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:De()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[ke]}],"ring-offset-w":[{"ring-offset":[rs,Us]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qs,mM]}],"shadow-color":[{shadow:[Du]}],opacity:[{opacity:[ke]}],"mix-blend":[{"mix-blend":[...dt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":dt()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[u]}],contrast:[{contrast:[I]}],"drop-shadow":[{"drop-shadow":["","none",qs,Qt]}],grayscale:[{grayscale:[k]}],"hue-rotate":[{"hue-rotate":[M]}],invert:[{invert:[A]}],saturate:[{saturate:[Z]}],sepia:[{sepia:[W]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[u]}],"backdrop-contrast":[{"backdrop-contrast":[I]}],"backdrop-grayscale":[{"backdrop-grayscale":[k]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[M]}],"backdrop-invert":[{"backdrop-invert":[A]}],"backdrop-opacity":[{"backdrop-opacity":[ke]}],"backdrop-saturate":[{"backdrop-saturate":[Z]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[m]}],"border-spacing-x":[{"border-spacing-x":[m]}],"border-spacing-y":[{"border-spacing-y":[m]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Qt]}],duration:[{duration:Nt()}],ease:[{ease:["linear","in","out","in-out",Qt]}],delay:[{delay:Nt()}],animate:[{animate:["none","spin","ping","pulse","bounce",Qt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[fe]}],"scale-x":[{"scale-x":[fe]}],"scale-y":[{"scale-y":[fe]}],rotate:[{rotate:[zu,Qt]}],"translate-x":[{"translate-x":[Ee]}],"translate-y":[{"translate-y":[Ee]}],"skew-x":[{"skew-x":[ee]}],"skew-y":[{"skew-y":[ee]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Qt]}],accent:[{accent:["auto",e]}],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",Qt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Ae()}],"scroll-mx":[{"scroll-mx":Ae()}],"scroll-my":[{"scroll-my":Ae()}],"scroll-ms":[{"scroll-ms":Ae()}],"scroll-me":[{"scroll-me":Ae()}],"scroll-mt":[{"scroll-mt":Ae()}],"scroll-mr":[{"scroll-mr":Ae()}],"scroll-mb":[{"scroll-mb":Ae()}],"scroll-ml":[{"scroll-ml":Ae()}],"scroll-p":[{"scroll-p":Ae()}],"scroll-px":[{"scroll-px":Ae()}],"scroll-py":[{"scroll-py":Ae()}],"scroll-ps":[{"scroll-ps":Ae()}],"scroll-pe":[{"scroll-pe":Ae()}],"scroll-pt":[{"scroll-pt":Ae()}],"scroll-pr":[{"scroll-pr":Ae()}],"scroll-pb":[{"scroll-pb":Ae()}],"scroll-pl":[{"scroll-pl":Ae()}],"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"]}],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",Qt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[rs,Us,Rd]}],stroke:[{stroke:[e,"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-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"]}}}function vM(e,{cacheSize:n,prefix:s,separator:u,extend:h={},override:g={}}){Wd(e,"cacheSize",n),Wd(e,"prefix",s),Wd(e,"separator",u);for(const m in g)xM(e[m],g[m]);for(const m in h)bM(e[m],h[m]);return e}function Wd(e,n,s){s!==void 0&&(e[n]=s)}function xM(e,n){if(n)for(const s in n)Wd(e,s,n[s])}function bM(e,n){if(n)for(const s in n){const u=n[s];u!==void 0&&(e[s]=(e[s]||[]).concat(u))}}function wM(e,...n){return typeof e=="function"?eg(tg,e,...n):eg(()=>vM(tg(),e),...n)}const dc=eg(tg);function EM(e,n){const s={...e};for(const u of n)delete s[u];return s}function i1(e,n,s){typeof n=="string"&&(n=n.split(".").map(h=>{const g=Number(h);return isNaN(g)?h:g}));let u=e;for(const h of n){if(u==null)return s;u=u[h]}return u!==void 0?u:s}const Wg={to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1}},SM=e=>Object.keys(Wg).reduce((s,u)=>(e[u]!==void 0&&(s[u]=e[u]),s),{}),IM=wM({extend:{classGroups:{icons:[e=>/^i-/.test(e)]}}}),TM=Vg((e,n,s,u)=>{if(u==="default"||u.startsWith("default.")||u==="popper"||u.startsWith("popper.")||u.endsWith("avatar")&&n==="size"||u.endsWith("chip")&&n==="size"||u.endsWith("badge")&&n==="size"||n==="color"||n==="variant")return!1;if(typeof e[n]=="string"&&typeof s=="string"&&e[n]&&s)return e[n]=IM(e[n],s),!0});function Ya(e,...n){return e==="override"?Df({},...n):TM({},...n)}function hv(e){const n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(n,function(u,h,g,m){return h+h+g+g+m+m});const s=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return s?`${parseInt(s[1],16)} ${parseInt(s[2],16)} ${parseInt(s[3],16)}`:null}function CM(e){const n=parseFloat(e);return isNaN(n)?e:n}const AM="inherit",MM="currentColor",kM="transparent",LM="#000",PM="#fff",zM={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},DM={50:"rgb(var(--color-gray-50) / )",100:"rgb(var(--color-gray-100) / )",200:"rgb(var(--color-gray-200) / )",300:"rgb(var(--color-gray-300) / )",400:"rgb(var(--color-gray-400) / )",500:"rgb(var(--color-gray-500) / )",600:"rgb(var(--color-gray-600) / )",700:"rgb(var(--color-gray-700) / )",800:"rgb(var(--color-gray-800) / )",900:"rgb(var(--color-gray-900) / )",950:"rgb(var(--color-gray-950) / )"},RM={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},OM={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},BM={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},FM={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},VM={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},NM={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},jM={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},$M={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},UM={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},qM={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},HM={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},GM={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},WM={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},ZM={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},XM={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},KM={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},JM={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},YM={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},QM={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},ek={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},tk={50:"rgb(var(--color-primary-50) / )",100:"rgb(var(--color-primary-100) / )",200:"rgb(var(--color-primary-200) / )",300:"rgb(var(--color-primary-300) / )",400:"rgb(var(--color-primary-400) / )",500:"rgb(var(--color-primary-500) / )",600:"rgb(var(--color-primary-600) / )",700:"rgb(var(--color-primary-700) / )",800:"rgb(var(--color-primary-800) / )",900:"rgb(var(--color-primary-900) / )",950:"rgb(var(--color-primary-950) / )",DEFAULT:"rgb(var(--color-primary-DEFAULT) / )"},ik={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},Od={inherit:AM,current:MM,transparent:kM,black:LM,white:PM,slate:zM,gray:DM,zinc:RM,neutral:OM,stone:BM,red:FM,orange:VM,amber:NM,yellow:jM,lime:$M,green:UM,emerald:qM,teal:HM,cyan:GM,sky:WM,blue:ZM,indigo:XM,violet:KM,purple:JM,fuchsia:YM,pink:QM,rose:ek,primary:tk,cool:ik},rk=go(()=>{const e=Of(),n=Zi(),s=je(()=>{const h=Od[e.ui.primary],g=Od[e.ui.gray];return h||console.warn(`[@nuxt/ui] Primary color '${e.ui.primary}' not found in Tailwind config`),g||console.warn(`[@nuxt/ui] Gray color '${e.ui.gray}' not found in Tailwind config`),`:root { ${Object.entries(h||Od.green).map(([m,c])=>`--color-primary-${m}: ${hv(c)};`).join(` `)} --color-primary-DEFAULT: var(--color-primary-500); @@ -29,17 +29,17 @@ ${Object.entries(g||Od.cool).map(([m,c])=>`--color-gray-${m}: ${hv(c)};`).join(` .dark { --color-primary-DEFAULT: var(--color-primary-400); } -`}),u={style:[{innerHTML:()=>s.value,tagPriority:-2,id:"nuxt-ui-colors"}]};if(n.isHydrating&&!n.payload.serverRendered){const h=document.createElement("style");h.innerHTML=s.value,h.setAttribute("data-nuxt-ui-colors",""),document.head.appendChild(h),u.script=[{innerHTML:"document.head.removeChild(document.querySelector('[data-nuxt-ui-colors]'))"}]}fA(u)}),nk="$s";function Wg(...e){const n=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(n);const[s,u]=e;if(!s||typeof s!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+s);if(u!==void 0&&typeof u!="function")throw new Error("[nuxt] [useState] init must be a function: "+u);const h=nk+s,g=Wi(),m=zo(g.payload.state,h);if(m.value===void 0&&u){const c=u();if(gr(c))return g.payload.state[h]=c,c;m.value=c}return m}const ok="__NUXT_COLOR_MODE__",sk="nuxt-color-mode",ns=window[ok]||{},ak=go(e=>{const n=Wg("color-mode",()=>Oo({preference:ns.preference,value:ns.value,unknown:!1,forced:!1})).value;Fo().afterEach(h=>{const g=h.meta.colorMode;g&&g!=="system"?(n.value=g,n.forced=!0):(g==="system"&&console.warn("You cannot force the colorMode to system at the page level."),n.forced=!1,n.value=n.preference==="system"?ns.getColorScheme():n.preference)});let s;function u(){s||!window.matchMedia||(s=window.matchMedia("(prefers-color-scheme: dark)"),s.addEventListener("change",()=>{!n.forced&&n.preference==="system"&&(n.value=ns.getColorScheme())}))}Ji(()=>n.preference,h=>{var g;n.forced||(h==="system"?(n.value=ns.getColorScheme(),u()):n.value=h,(g=window.localStorage)==null||g.setItem(sk,h))},{immediate:!0}),Ji(()=>n.value,(h,g)=>{ns.removeColorScheme(g),ns.addColorScheme(h)}),n.preference==="system"&&u(),e.hook("app:mounted",()=>{n.unknown&&(n.preference=ns.preference,n.value=ns.value,n.unknown=!1)}),e.provide("colorMode",n)});function lk(e={}){const n=e.path||window.location.pathname;let s={};try{s=uf(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(e.force||(s==null?void 0:s.path)!==n||(s==null?void 0:s.expires){u.clear()}),e.hook("app:chunkError",({error:g})=>{u.add(g)});function h(g){const c="href"in g&&g.href[0]==="#"?s.app.baseURL+g.href:hh(s.app.baseURL,g.fullPath);lk({path:c,persistState:!0})}e.hook("app:manifest:update",()=>{n.beforeResolve(h)}),n.onError((g,m)=>{u.has(g)&&h(m)})}}),uk=[xA,wA,IA,CA,AA,RA,NA,$A,rk,ak,ck];async function r1(e,n=Fo()){const{path:s,matched:u}=n.resolve(e);if(!u.length||(n._routePreloaded||(n._routePreloaded=new Set),n._routePreloaded.has(s)))return;const h=n._preloadPromises=n._preloadPromises||[];if(h.length>4)return Promise.all(h).then(()=>r1(e,n));n._routePreloaded.add(s);const g=u.map(m=>{var c;return(c=m.components)==null?void 0:c.default}).filter(m=>typeof m=="function");for(const m of g){const c=Promise.resolve(m()).catch(()=>{}).finally(()=>h.splice(h.indexOf(c)));h.push(c)}await Promise.all(h)}const hk=(...e)=>e.find(n=>n!==void 0);function dk(e){const n=e.componentName||"NuxtLink";function s(h,g){if(!h||e.trailingSlash!=="append"&&e.trailingSlash!=="remove")return h;if(typeof h=="string")return dv(h,e.trailingSlash);const m="path"in h&&h.path!==void 0?h.path:g(h).path;return{...h,name:void 0,path:dv(m,e.trailingSlash)}}function u(h){const g=Fo(),m=hc(),c=je(()=>!!h.target&&h.target!=="_self"),I=je(()=>{const J=h.to||h.href||"";return typeof J=="string"&&ra(J,{acceptRelative:!0})}),k=Mm("RouterLink"),M=k&&typeof k!="string"?k.useLink:void 0,A=je(()=>{if(h.external)return!0;const J=h.to||h.href||"";return typeof J=="object"?!1:J===""||I.value}),z=je(()=>{const J=h.to||h.href||"";return A.value?J:s(J,g.resolve)}),q=A.value||M==null?void 0:M({...h,to:z}),K=je(()=>{var J;if(!z.value||I.value)return z.value;if(A.value){const se=typeof z.value=="object"?fv(z.value):z.value;return s(se,g.resolve)}return typeof z.value=="object"?((J=g.resolve(z.value))==null?void 0:J.href)??null:s(hh(m.app.baseURL,z.value),g.resolve)});return{to:z,hasTarget:c,isAbsoluteUrl:I,isExternal:A,href:K,isActive:(q==null?void 0:q.isActive)??je(()=>z.value===g.currentRoute.value.path),isExactActive:(q==null?void 0:q.isExactActive)??je(()=>z.value===g.currentRoute.value.path),route:(q==null?void 0:q.route)??je(()=>g.resolve(z.value)),async navigate(){await Vb(K.value,{replace:h.replace,external:A.value||c.value})}}}return Ui({name:n,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},useLink:u,setup(h,{slots:g}){const m=Fo(),{to:c,href:I,navigate:k,isExternal:M,hasTarget:A,isAbsoluteUrl:z}=u(h),q=Lt(!1),K=Lt(null),J=se=>{var ke;K.value=h.custom?(ke=se==null?void 0:se.$el)==null?void 0:ke.nextElementSibling:se==null?void 0:se.$el};if(h.prefetch!==!1&&h.noPrefetch!==!0&&h.target!=="_blank"&&!pk()){const ke=Wi();let ye,W=null;an(()=>{const fe=fk();Hg(()=>{ye=Km(()=>{var Z;(Z=K==null?void 0:K.value)!=null&&Z.tagName&&(W=fe.observe(K.value,async()=>{W==null||W(),W=null;const ee=typeof c.value=="string"?c.value:M.value?fv(c.value):m.resolve(c.value).fullPath;await Promise.all([ke.hooks.callHook("link:prefetch",ee).catch(()=>{}),!M.value&&!A.value&&r1(c.value,m).catch(()=>{})]),q.value=!0}))})})}),kf(()=>{ye&&TA(ye),W==null||W(),W=null})}return()=>{var ye;if(!M.value&&!A.value){const W={ref:J,to:c.value,activeClass:h.activeClass||e.activeClass,exactActiveClass:h.exactActiveClass||e.exactActiveClass,replace:h.replace,ariaCurrentValue:h.ariaCurrentValue,custom:h.custom};return h.custom||(q.value&&(W.class=h.prefetchedClass||e.prefetchedClass),W.rel=h.rel||void 0),Fn(Mm("RouterLink"),W,g.default)}const se=h.target||null,ke=hk(h.noRel?"":h.rel,e.externalRelAttribute,z.value||A.value?"noopener noreferrer":"")||null;return h.custom?g.default?g.default({href:I.value,navigate:k,get route(){if(!I.value)return;const W=new URL(I.value,window.location.href);return{path:W.pathname,fullPath:W.pathname,get query(){return Rg(W.search)},hash:W.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:I.value}},rel:ke,target:se,isExternal:M.value||A.value,isActive:!1,isExactActive:!1}):null:Fn("a",{ref:K,href:I.value||null,rel:ke,target:se},(ye=g.default)==null?void 0:ye.call(g))}}})}const n1=dk(eC);function dv(e,n){const s=n==="append"?df:zf;return ra(e)&&!e.startsWith("http")?e:s(e,!0)}function fk(){const e=Wi();if(e._observer)return e._observer;let n=null;const s=new Map,u=(g,m)=>(n||(n=new IntersectionObserver(c=>{for(const I of c){const k=s.get(I.target);(I.isIntersecting||I.intersectionRatio>0)&&k&&k()}})),s.set(g,m),n.observe(g),()=>{s.delete(g),n.unobserve(g),s.size===0&&(n.disconnect(),n=null)});return e._observer={observe:u}}function pk(){const e=navigator.connection;return!!(e&&(e.saveData||/2g/.test(e.effectiveType)))}function fv(e){return Og(e.path||"",e.query||{})+(e.hash?"#"+e.hash:"")}const fc=(e,n,s,u,h=!1)=>{const g=FS(),m=Of(),c=je(()=>{var z;const k=im(n),M=im(s),A=im(u);return Ya((k==null?void 0:k.strategy)||((z=m.ui)==null?void 0:z.strategy),A?{wrapper:A}:{},k||{},h?i1(m.ui,e,{}):{},M||{})}),I=je(()=>EM(g,["class"]));return{ui:c,attrs:I}};function Bf({ui:e,props:n}){const s=ia();if(ta("ButtonGroupContextConsumer",!0),Hr("ButtonGroupContextConsumer",!1))return{size:je(()=>n.size),rounded:je(()=>e.value.rounded)};let h=s.parent,g;for(;h&&!g;){if(h.type.name==="ButtonGroup"){g=Hr(`group-${h.uid}`);break}h=h.parent}const m=je(()=>g==null?void 0:g.value.children.indexOf(s));return an(()=>{g==null||g.value.register(s)}),Ja(()=>{g==null||g.value.unregister(s)}),{size:je(()=>(g==null?void 0:g.value.size)||n.size),rounded:je(()=>!g||m.value===-1?e.value.rounded:g.value.children.length===1?g.value.ui.rounded:m.value===0?g.value.rounded.start:m.value===g.value.children.length-1?g.value.rounded.end:"rounded-none")}}const mk={wrapper:"relative inline-flex items-center justify-center flex-shrink-0",background:"bg-gray-100 dark:bg-gray-800",rounded:"rounded-full",text:"font-medium leading-none text-gray-900 dark:text-white truncate",placeholder:"font-medium leading-none text-gray-500 dark:text-gray-400 truncate",size:{"3xs":"h-4 w-4 text-[8px]","2xs":"h-5 w-5 text-[10px]",xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-14 w-14 text-xl","2xl":"h-16 w-16 text-2xl","3xl":"h-20 w-20 text-3xl"},chip:{base:"absolute rounded-full ring-1 ring-white dark:ring-gray-900 flex items-center justify-center text-white dark:text-gray-900 font-medium",background:"bg-{color}-500 dark:bg-{color}-400",position:{"top-right":"top-0 right-0","bottom-right":"bottom-0 right-0","top-left":"top-0 left-0","bottom-left":"bottom-0 left-0"},size:{"3xs":"h-[4px] min-w-[4px] text-[4px] p-px","2xs":"h-[5px] min-w-[5px] text-[5px] p-px",xs:"h-1.5 min-w-[0.375rem] text-[6px] p-px",sm:"h-2 min-w-[0.5rem] text-[7px] p-0.5",md:"h-2.5 min-w-[0.625rem] text-[8px] p-0.5",lg:"h-3 min-w-[0.75rem] text-[10px] p-0.5",xl:"h-3.5 min-w-[0.875rem] text-[11px] p-1","2xl":"h-4 min-w-[1rem] text-[12px] p-1","3xl":"h-5 min-w-[1.25rem] text-[14px] p-1"}},icon:{base:"text-gray-500 dark:text-gray-400 flex-shrink-0",size:{"3xs":"h-2 w-2","2xs":"h-2.5 w-2.5",xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7","2xl":"h-8 w-8","3xl":"h-10 w-10"}},default:{size:"sm",icon:null,chipColor:null,chipPosition:"top-right"}},gk={base:"inline-flex items-center",rounded:"rounded-md",font:"font-medium",size:{xs:"text-xs px-1.5 py-0.5",sm:"text-xs px-2 py-1",md:"text-sm px-2 py-1",lg:"text-sm px-2.5 py-1.5"},color:{white:{solid:"ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-900 dark:text-white bg-white dark:bg-gray-900"},gray:{solid:"ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-50 dark:bg-gray-800"},black:{solid:"text-white dark:text-gray-900 bg-gray-900 dark:bg-white"}},variant:{solid:"bg-{color}-500 dark:bg-{color}-400 text-white dark:text-gray-900",outline:"text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400",soft:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400",subtle:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400 ring-opacity-25 dark:ring-opacity-25"},default:{size:"sm",variant:"solid",color:"primary"}},yk={base:"focus:outline-none focus-visible:outline-0 disabled:cursor-not-allowed disabled:opacity-75 flex-shrink-0",font:"font-medium",rounded:"rounded-md",truncate:"text-left break-all line-clamp-1",block:"w-full flex justify-center items-center",inline:"inline-flex items-center",size:{"2xs":"text-xs",xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-sm",xl:"text-base"},gap:{"2xs":"gap-x-1",xs:"gap-x-1.5",sm:"gap-x-1.5",md:"gap-x-2",lg:"gap-x-2.5",xl:"gap-x-2.5"},padding:{"2xs":"px-2 py-1",xs:"px-2.5 py-1.5",sm:"px-2.5 py-1.5",md:"px-3 py-2",lg:"px-3.5 py-2.5",xl:"px-3.5 py-2.5"},square:{"2xs":"p-1",xs:"p-1.5",sm:"p-1.5",md:"p-2",lg:"p-2.5",xl:"p-2.5"},color:{white:{solid:"shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-900 dark:text-white bg-white hover:bg-gray-50 disabled:bg-white dark:bg-gray-900 dark:hover:bg-gray-800/50 dark:disabled:bg-gray-900 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",ghost:"text-gray-900 dark:text-white hover:bg-white dark:hover:bg-gray-900 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"},gray:{solid:"shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-50 hover:bg-gray-100 disabled:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:disabled:bg-gray-800 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",ghost:"text-gray-700 dark:text-gray-200 hover:text-gray-900 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-gray-800 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",link:"text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 underline-offset-4 hover:underline focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"},black:{solid:"shadow-sm text-white dark:text-gray-900 bg-gray-900 hover:bg-gray-800 disabled:bg-gray-900 dark:bg-white dark:hover:bg-gray-100 dark:disabled:bg-white focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",link:"text-gray-900 dark:text-white underline-offset-4 hover:underline focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"}},variant:{solid:"shadow-sm text-white dark:text-gray-900 bg-{color}-500 hover:bg-{color}-600 disabled:bg-{color}-500 dark:bg-{color}-400 dark:hover:bg-{color}-500 dark:disabled:bg-{color}-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-{color}-500 dark:focus-visible:outline-{color}-400",outline:"ring-1 ring-inset ring-current text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",soft:"text-{color}-500 dark:text-{color}-400 bg-{color}-50 hover:bg-{color}-100 disabled:bg-{color}-50 dark:bg-{color}-950 dark:hover:bg-{color}-900 dark:disabled:bg-{color}-950 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",ghost:"text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",link:"text-{color}-500 hover:text-{color}-600 disabled:text-{color}-500 dark:text-{color}-400 dark:hover:text-{color}-500 dark:disabled:text-{color}-400 underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400"},icon:{base:"flex-shrink-0",loading:"animate-spin",size:{"2xs":"h-4 w-4",xs:"h-4 w-4",sm:"h-5 w-5",md:"h-5 w-5",lg:"h-5 w-5",xl:"h-6 w-6"}},default:{size:"sm",variant:"solid",color:"primary",loadingIcon:"i-heroicons-arrow-path-20-solid"}},o1={base:"invisible before:visible before:block before:rotate-45 before:z-[-1] before:w-2 before:h-2",ring:"before:ring-1 before:ring-gray-200 dark:before:ring-gray-800",rounded:"before:rounded-sm",background:"before:bg-gray-200 dark:before:bg-gray-800",shadow:"before:shadow",placement:"group-data-[popper-placement*='right']:-left-1 group-data-[popper-placement*='left']:-right-1 group-data-[popper-placement*='top']:-bottom-1 group-data-[popper-placement*='bottom']:-top-1"},Xg={wrapper:"relative",base:"relative block w-full disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none border-0",form:"form-input",rounded:"rounded-md",placeholder:"placeholder-gray-400 dark:placeholder-gray-500",file:{base:"file:mr-1.5 file:font-medium file:text-gray-500 dark:file:text-gray-400 file:bg-transparent file:border-0 file:p-0 file:outline-none"},size:{"2xs":"text-xs",xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-sm",xl:"text-base"},gap:{"2xs":"gap-x-1",xs:"gap-x-1.5",sm:"gap-x-1.5",md:"gap-x-2",lg:"gap-x-2.5",xl:"gap-x-2.5"},padding:{"2xs":"px-2 py-1",xs:"px-2.5 py-1.5",sm:"px-2.5 py-1.5",md:"px-3 py-2",lg:"px-3.5 py-2.5",xl:"px-3.5 py-2.5"},leading:{padding:{"2xs":"ps-7",xs:"ps-8",sm:"ps-9",md:"ps-10",lg:"ps-11",xl:"ps-12"}},trailing:{padding:{"2xs":"pe-7",xs:"pe-8",sm:"pe-9",md:"pe-10",lg:"pe-11",xl:"pe-12"}},color:{white:{outline:"shadow-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-white ring-1 ring-inset ring-gray-300 dark:ring-gray-700 focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400"},gray:{outline:"shadow-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white ring-1 ring-inset ring-gray-300 dark:ring-gray-700 focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400"}},variant:{outline:"shadow-sm bg-transparent text-gray-900 dark:text-white ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400 focus:ring-2 focus:ring-{color}-500 dark:focus:ring-{color}-400",none:"bg-transparent focus:ring-0 focus:shadow-none"},icon:{base:"flex-shrink-0 text-gray-400 dark:text-gray-500",color:"text-{color}-500 dark:text-{color}-400",loading:"animate-spin",size:{"2xs":"h-4 w-4",xs:"h-4 w-4",sm:"h-5 w-5",md:"h-5 w-5",lg:"h-5 w-5",xl:"h-6 w-6"},leading:{wrapper:"absolute inset-y-0 start-0 flex items-center",pointer:"pointer-events-none",padding:{"2xs":"px-2",xs:"px-2.5",sm:"px-2.5",md:"px-3",lg:"px-3.5",xl:"px-3.5"}},trailing:{wrapper:"absolute inset-y-0 end-0 flex items-center",pointer:"pointer-events-none",padding:{"2xs":"px-2",xs:"px-2.5",sm:"px-2.5",md:"px-3",lg:"px-3.5",xl:"px-3.5"}}},default:{size:"sm",color:"white",variant:"outline",loadingIcon:"i-heroicons-arrow-path-20-solid"}},pv={container:"z-20 group",trigger:"flex items-center w-full",width:"w-full",height:"max-h-60",base:"relative focus:outline-none overflow-y-auto scroll-py-1",background:"bg-white dark:bg-gray-800",shadow:"shadow-lg",rounded:"rounded-md",padding:"p-1",ring:"ring-1 ring-gray-200 dark:ring-gray-700",empty:"text-sm text-gray-400 dark:text-gray-500 px-2 py-1.5",option:{base:"cursor-default select-none relative flex items-center justify-between gap-1",rounded:"rounded-md",padding:"px-1.5 py-1.5",size:"text-sm",color:"text-gray-900 dark:text-white",container:"flex items-center gap-1.5 min-w-0",active:"bg-gray-100 dark:bg-gray-900",inactive:"",selected:"pe-7",disabled:"cursor-not-allowed opacity-50",empty:"text-sm text-gray-400 dark:text-gray-500 px-2 py-1.5",icon:{base:"flex-shrink-0 h-5 w-5",active:"text-gray-900 dark:text-white",inactive:"text-gray-400 dark:text-gray-500"},selectedIcon:{wrapper:"absolute inset-y-0 end-0 flex items-center",padding:"pe-2",base:"h-5 w-5 text-gray-900 dark:text-white flex-shrink-0"},avatar:{base:"flex-shrink-0",size:"2xs"},chip:{base:"flex-shrink-0 w-2 h-2 mx-1 rounded-full"}},transition:{leaveActiveClass:"transition ease-in duration-100",leaveFromClass:"opacity-100",leaveToClass:"opacity-0"},popper:{placement:"bottom-end"},default:{selectedIcon:"i-heroicons-check-20-solid",trailingIcon:"i-heroicons-chevron-down-20-solid"},arrow:{...o1,ring:"before:ring-1 before:ring-gray-200 dark:before:ring-gray-700",background:"before:bg-white dark:before:bg-gray-700"}};({...Xg});const _k={...Xg,form:"form-select",placeholder:"text-gray-400 dark:text-gray-500",default:{size:"sm",color:"white",variant:"outline",loadingIcon:"i-heroicons-arrow-path-20-solid",trailingIcon:"i-heroicons-chevron-down-20-solid"}},vk={...pv,select:"inline-flex items-center text-left cursor-default",input:"block w-[calc(100%+0.5rem)] focus:ring-transparent text-sm px-3 py-1.5 text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 border-0 border-b border-gray-200 dark:border-gray-700 sticky -top-1 -mt-1 mb-1 -mx-1 z-10 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none",required:"absolute inset-0 w-px opacity-0 cursor-default",label:"block truncate",option:{...pv.option,create:"block truncate"},transition:{leaveActiveClass:"transition ease-in duration-100",leaveFromClass:"opacity-100",leaveToClass:"opacity-0"},popper:{placement:"bottom-end"},default:{selectedIcon:"i-heroicons-check-20-solid",clearSearchOnClose:!1,showCreateOptionWhen:"empty"},arrow:{...o1,ring:"before:ring-1 before:ring-gray-200 dark:before:ring-gray-700",background:"before:bg-white dark:before:bg-gray-700"}},yo=(e,n)=>{const s=e.__vccOpts||e;for(const[u,h]of n)s[u]=h;return s},Hs=Ya(tr.ui.strategy,tr.ui.badge,gk),xk=Ui({inheritAttrs:!1,props:{size:{type:String,default:()=>Hs.default.size,validator(e){return Object.keys(Hs.size).includes(e)}},color:{type:String,default:()=>Hs.default.color,validator(e){return[...tr.ui.colors,...Object.keys(Hs.color)].includes(e)}},variant:{type:String,default:()=>Hs.default.variant,validator(e){return[...Object.keys(Hs.variant),...Object.values(Hs.color).flatMap(n=>Object.keys(n))].includes(e)}},label:{type:[String,Number],default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(e){const{ui:n,attrs:s}=fc("badge",zo(e,"ui"),Hs),{size:u,rounded:h}=Bf({ui:n,props:e}),g=je(()=>{var c,I;const m=((I=(c=n.value.color)==null?void 0:c[e.color])==null?void 0:I[e.variant])||n.value.variant[e.variant];return dc(wr(n.value.base,n.value.font,h.value,n.value.size[u.value],m==null?void 0:m.replaceAll("{color}",e.color)),e.class)});return{attrs:s,badgeClass:g}}});function bk(e,n,s,u,h,g){return At(),Mi("span",fo({class:e.badgeClass},e.attrs),[vr(e.$slots,"default",{},()=>[hs(nn(e.label),1)])],16)}const s1=yo(xk,[["render",bk]]),a1=Object.freeze({left:0,top:0,width:16,height:16}),l1=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Kg=Object.freeze({...a1,...l1});Object.freeze({...Kg,body:"",hidden:!1});({...a1});const c1=Object.freeze({width:null,height:null}),u1=Object.freeze({...c1,...l1});function wk(e,n){const s={...e};for(const u in n){const h=n[u],g=typeof h;u in c1?(h===null||h&&(g==="string"||g==="number"))&&(s[u]=h):g===typeof s[u]&&(s[u]=u==="rotate"?h%4:h)}return s}const Ek=/[\s,]+/;function Sk(e,n){n.split(Ek).forEach(s=>{switch(s.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Ik(e,n=0){const s=e.replace(/^-?[0-9.]*/,"");function u(h){for(;h<0;)h+=4;return h%4}if(s===""){const h=parseInt(e);return isNaN(h)?0:u(h)}else if(s!==e){let h=0;switch(s){case"%":h=25;break;case"deg":h=90}if(h){let g=parseFloat(e.slice(0,e.length-s.length));return isNaN(g)?0:(g=g/h,g%1===0?u(g):0)}}return n}const Tk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ck=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function mv(e,n,s){if(n===1)return e;if(s=s||100,typeof e=="number")return Math.ceil(e*n*s)/s;if(typeof e!="string")return e;const u=e.split(Tk);if(u===null||!u.length)return e;const h=[];let g=u.shift(),m=Ck.test(g);for(;;){if(m){const c=parseFloat(g);isNaN(c)?h.push(g):h.push(Math.ceil(c*n*s)/s)}else h.push(g);if(g=u.shift(),g===void 0)return h.join("");m=!m}}function Ak(e,n="defs"){let s="";const u=e.indexOf("<"+n);for(;u>=0;){const h=e.indexOf(">",u),g=e.indexOf("",g);if(m===-1)break;s+=e.slice(h+1,g).trim(),e=e.slice(0,u).trim()+e.slice(m+1)}return{defs:s,content:e}}function Mk(e,n){return e?""+e+""+n:n}function kk(e,n,s){const u=Ak(e);return Mk(u.defs,n+u.content+s)}const Lk=e=>e==="unset"||e==="undefined"||e==="none";function Pk(e,n){const s={...Kg,...e},u={...u1,...n},h={left:s.left,top:s.top,width:s.width,height:s.height};let g=s.body;[s,u].forEach(J=>{const se=[],ke=J.hFlip,ye=J.vFlip;let W=J.rotate;ke?ye?W+=2:(se.push("translate("+(h.width+h.left).toString()+" "+(0-h.top).toString()+")"),se.push("scale(-1 1)"),h.top=h.left=0):ye&&(se.push("translate("+(0-h.left).toString()+" "+(h.height+h.top).toString()+")"),se.push("scale(1 -1)"),h.top=h.left=0);let fe;switch(W<0&&(W-=Math.floor(W/4)*4),W=W%4,W){case 1:fe=h.height/2+h.top,se.unshift("rotate(90 "+fe.toString()+" "+fe.toString()+")");break;case 2:se.unshift("rotate(180 "+(h.width/2+h.left).toString()+" "+(h.height/2+h.top).toString()+")");break;case 3:fe=h.width/2+h.left,se.unshift("rotate(-90 "+fe.toString()+" "+fe.toString()+")");break}W%2===1&&(h.left!==h.top&&(fe=h.left,h.left=h.top,h.top=fe),h.width!==h.height&&(fe=h.width,h.width=h.height,h.height=fe)),se.length&&(g=kk(g,'',""))});const m=u.width,c=u.height,I=h.width,k=h.height;let M,A;m===null?(A=c===null?"1em":c==="auto"?k:c,M=mv(A,I/k)):(M=m==="auto"?I:m,A=c===null?mv(M,k/I):c==="auto"?k:c);const z={},q=(J,se)=>{Lk(se)||(z[J]=se.toString())};q("width",M),q("height",A);const K=[h.left,h.top,I,k];return z.viewBox=K.join(" "),{attributes:z,viewBox:K,body:g}}const zk=/\sid="(\S+)"/g,Dk="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Rk=0;function Ok(e,n=Dk){const s=[];let u;for(;u=zk.exec(e);)s.push(u[1]);if(!s.length)return e;const h="suffix"+(Math.random()*16777216|Date.now()).toString(16);return s.forEach(g=>{const m=typeof n=="function"?n(g):n+(Rk++).toString(),c=g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+m+h+"$3")}),e=e.replace(new RegExp(h,"g"),""),e}function Bk(e,n){let s=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const u in n)s+=" "+u+'="'+n[u]+'"';return'"+e+""}function Fk(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Vk(e){return"data:image/svg+xml,"+Fk(e)}function Nk(e){return'url("'+Vk(e)+'")'}const gv={...u1,inline:!1},jk={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},$k={display:"inline-block"},ig={backgroundColor:"currentColor"},h1={backgroundColor:"transparent"},yv={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},_v={webkitMask:ig,mask:ig,background:h1};for(const e in _v){const n=_v[e];for(const s in yv)n[e+s]=yv[s]}const Wd={};["horizontal","vertical"].forEach(e=>{const n=e.slice(0,1)+"Flip";Wd[e+"-flip"]=n,Wd[e.slice(0,1)+"-flip"]=n,Wd[e+"Flip"]=n});function vv(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Uk=(e,n)=>{const s=wk(gv,n),u={...jk},h=n.mode||"svg",g={},m=n.style,c=typeof m=="object"&&!(m instanceof Array)?m:{};for(let J in n){const se=n[J];if(se!==void 0)switch(J){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":s[J]=se===!0||se==="true"||se===1;break;case"flip":typeof se=="string"&&Sk(s,se);break;case"color":g.color=se;break;case"rotate":typeof se=="string"?s[J]=Ik(se):typeof se=="number"&&(s[J]=se);break;case"ariaHidden":case"aria-hidden":se!==!0&&se!=="true"&&delete u["aria-hidden"];break;default:{const ke=Wd[J];ke?(se===!0||se==="true"||se===1)&&(s[ke]=!0):gv[J]===void 0&&(u[J]=se)}}}const I=Pk(e,s),k=I.attributes;if(s.inline&&(g.verticalAlign="-0.125em"),h==="svg"){u.style={...g,...c},Object.assign(u,k);let J=0,se=n.id;return typeof se=="string"&&(se=se.replace(/-/g,"_")),u.innerHTML=Ok(I.body,se?()=>se+"ID"+J++:"iconifyVue"),Fn("svg",u)}const{body:M,width:A,height:z}=e,q=h==="mask"||(h==="bg"?!1:M.indexOf("currentColor")!==-1),K=Bk(M,{...k,width:A+"",height:z+""});return u.style={...g,"--svg":Nk(K),width:vv(k.width),height:vv(k.height),...$k,...q?ig:h1,...c},Fn("span",u)},qk=Object.create(null),Hk=Ui({inheritAttrs:!1,render(){const e=this.$attrs,n=e.icon,s=typeof n=="string"?qk[n]:typeof n=="object"?n:null;return s===null||typeof s!="object"||typeof s.body!="string"?this.$slots.default?this.$slots.default():null:Uk({...Kg,...s},e)}}),Wu=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ff=(e,n,s,u="")=>{const h=e.split(":");if(e.slice(0,1)==="@"){if(h.length<2||h.length>3)return null;u=h.shift().slice(1)}if(h.length>3||!h.length)return null;if(h.length>1){const c=h.pop(),I=h.pop(),k={provider:h.length>0?h[0]:u,prefix:I,name:c};return n&&!Xd(k)?null:k}const g=h[0],m=g.split("-");if(m.length>1){const c={provider:u,prefix:m.shift(),name:m.join("-")};return n&&!Xd(c)?null:c}if(s&&u===""){const c={provider:u,prefix:"",name:g};return n&&!Xd(c,s)?null:c}return null},Xd=(e,n)=>e?!!((e.provider===""||e.provider.match(Wu))&&(n&&e.prefix===""||e.prefix.match(Wu))&&e.name.match(Wu)):!1,d1=Object.freeze({left:0,top:0,width:16,height:16}),_f=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Jg=Object.freeze({...d1,..._f}),rg=Object.freeze({...Jg,body:"",hidden:!1});function Gk(e,n){const s={};!e.hFlip!=!n.hFlip&&(s.hFlip=!0),!e.vFlip!=!n.vFlip&&(s.vFlip=!0);const u=((e.rotate||0)+(n.rotate||0))%4;return u&&(s.rotate=u),s}function xv(e,n){const s=Gk(e,n);for(const u in rg)u in _f?u in e&&!(u in s)&&(s[u]=_f[u]):u in n?s[u]=n[u]:u in e&&(s[u]=e[u]);return s}function Zk(e,n){const s=e.icons,u=e.aliases||Object.create(null),h=Object.create(null);function g(m){if(s[m])return h[m]=[];if(!(m in h)){h[m]=null;const c=u[m]&&u[m].parent,I=c&&g(c);I&&(h[m]=[c].concat(I))}return h[m]}return Object.keys(s).concat(Object.keys(u)).forEach(g),h}function Wk(e,n,s){const u=e.icons,h=e.aliases||Object.create(null);let g={};function m(c){g=xv(u[c]||h[c],g)}return m(n),s.forEach(m),xv(e,g)}function f1(e,n){const s=[];if(typeof e!="object"||typeof e.icons!="object")return s;e.not_found instanceof Array&&e.not_found.forEach(h=>{n(h,null),s.push(h)});const u=Zk(e);for(const h in u){const g=u[h];g&&(n(h,Wk(e,h,g)),s.push(h))}return s}const Xk={provider:"",aliases:{},not_found:{},...d1};function mm(e,n){for(const s in n)if(s in e&&typeof e[s]!=typeof n[s])return!1;return!0}function p1(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!mm(e,Xk))return null;const s=n.icons;for(const h in s){const g=s[h];if(!h.match(Wu)||typeof g.body!="string"||!mm(g,rg))return null}const u=n.aliases||Object.create(null);for(const h in u){const g=u[h],m=g.parent;if(!h.match(Wu)||typeof m!="string"||!s[m]&&!u[m]||!mm(g,rg))return null}return n}const bv=Object.create(null);function Kk(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function Za(e,n){const s=bv[e]||(bv[e]=Object.create(null));return s[n]||(s[n]=Kk(e,n))}function Yg(e,n){return p1(n)?f1(n,(s,u)=>{u?e.icons[s]=u:e.missing.add(s)}):[]}function Jk(e,n,s){try{if(typeof s.body=="string")return e.icons[n]={...s},!0}catch{}return!1}let oh=!1;function m1(e){return typeof e=="boolean"&&(oh=e),oh}function Yk(e){const n=typeof e=="string"?Ff(e,!0,oh):e;if(n){const s=Za(n.provider,n.prefix),u=n.name;return s.icons[u]||(s.missing.has(u)?null:void 0)}}function Qk(e,n){const s=Ff(e,!0,oh);if(!s)return!1;const u=Za(s.provider,s.prefix);return Jk(u,s.name,n)}function eL(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),oh&&!n&&!e.prefix){let h=!1;return p1(e)&&(e.prefix="",f1(e,(g,m)=>{m&&Qk(g,m)&&(h=!0)})),h}const s=e.prefix;if(!Xd({provider:n,prefix:s,name:"a"}))return!1;const u=Za(n,s);return!!Yg(u,e)}const tL=Object.freeze({width:null,height:null}),iL=Object.freeze({...tL,..._f});""+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);const ng=Object.create(null);function rL(e,n){ng[e]=n}function og(e){return ng[e]||ng[""]}function Qg(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ey=Object.create(null),Ru=["https://api.simplesvg.com","https://api.unisvg.com"],Kd=[];for(;Ru.length>0;)Ru.length===1||Math.random()>.5?Kd.push(Ru.shift()):Kd.push(Ru.pop());ey[""]=Qg({resources:["https://api.iconify.design"].concat(Kd)});function sg(e,n){const s=Qg(n);return s===null?!1:(ey[e]=s,!0)}function ty(e){return ey[e]}const nL=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let wv=nL();function oL(e,n){const s=ty(e);if(!s)return 0;let u;if(!s.maxURL)u=0;else{let h=0;s.resources.forEach(m=>{h=Math.max(h,m.length)});const g=n+".json?icons=";u=s.maxURL-h-s.path.length-g.length}return u}function sL(e){return e===404}const aL=(e,n,s)=>{const u=[],h=oL(e,n),g="icons";let m={type:g,provider:e,prefix:n,icons:[]},c=0;return s.forEach((I,k)=>{c+=I.length+1,c>=h&&k>0&&(u.push(m),m={type:g,provider:e,prefix:n,icons:[]},c=I.length),m.icons.push(I)}),u.push(m),u};function lL(e){if(typeof e=="string"){const n=ty(e);if(n)return n.path}return"/"}const cL=(e,n,s)=>{if(!wv){s("abort",424);return}let u=lL(n.provider);switch(n.type){case"icons":{const g=n.prefix,c=n.icons.join(","),I=new URLSearchParams({icons:c});u+=g+".json?"+I.toString();break}case"custom":{const g=n.uri;u+=g.slice(0,1)==="/"?g.slice(1):g;break}default:s("abort",400);return}let h=503;wv(e+u).then(g=>{const m=g.status;if(m!==200){setTimeout(()=>{s(sL(m)?"abort":"next",m)});return}return h=501,g.json()}).then(g=>{if(typeof g!="object"||g===null){setTimeout(()=>{g===404?s("abort",g):s("next",h)});return}setTimeout(()=>{s("success",g)})}).catch(()=>{s("next",h)})},uL={prepare:aL,send:cL};function hL(e){const n={loaded:[],missing:[],pending:[]},s=Object.create(null);e.sort((h,g)=>h.provider!==g.provider?h.provider.localeCompare(g.provider):h.prefix!==g.prefix?h.prefix.localeCompare(g.prefix):h.name.localeCompare(g.name));let u={provider:"",prefix:"",name:""};return e.forEach(h=>{if(u.name===h.name&&u.prefix===h.prefix&&u.provider===h.provider)return;u=h;const g=h.provider,m=h.prefix,c=h.name,I=s[g]||(s[g]=Object.create(null)),k=I[m]||(I[m]=Za(g,m));let M;c in k.icons?M=n.loaded:m===""||k.missing.has(c)?M=n.missing:M=n.pending;const A={provider:g,prefix:m,name:c};M.push(A)}),n}function g1(e,n){e.forEach(s=>{const u=s.loaderCallbacks;u&&(s.loaderCallbacks=u.filter(h=>h.id!==n))})}function dL(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let s=!1;const u=e.provider,h=e.prefix;n.forEach(g=>{const m=g.icons,c=m.pending.length;m.pending=m.pending.filter(I=>{if(I.prefix!==h)return!0;const k=I.name;if(e.icons[k])m.loaded.push({provider:u,prefix:h,name:k});else if(e.missing.has(k))m.missing.push({provider:u,prefix:h,name:k});else return s=!0,!0;return!1}),m.pending.length!==c&&(s||g1([e],g.id),g.callback(m.loaded.slice(0),m.missing.slice(0),m.pending.slice(0),g.abort))})}))}let fL=0;function pL(e,n,s){const u=fL++,h=g1.bind(null,s,u);if(!n.pending.length)return h;const g={id:u,icons:n,callback:e,abort:h};return s.forEach(m=>{(m.loaderCallbacks||(m.loaderCallbacks=[])).push(g)}),h}function mL(e,n=!0,s=!1){const u=[];return e.forEach(h=>{const g=typeof h=="string"?Ff(h,n,s):h;g&&u.push(g)}),u}var gL={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function yL(e,n,s,u){const h=e.resources.length,g=e.random?Math.floor(Math.random()*h):e.index;let m;if(e.random){let ee=e.resources.slice(0);for(m=[];ee.length>1;){const Se=Math.floor(Math.random()*ee.length);m.push(ee[Se]),ee=ee.slice(0,Se).concat(ee.slice(Se+1))}m=m.concat(ee)}else m=e.resources.slice(g).concat(e.resources.slice(0,g));const c=Date.now();let I="pending",k=0,M,A=null,z=[],q=[];typeof u=="function"&&q.push(u);function K(){A&&(clearTimeout(A),A=null)}function J(){I==="pending"&&(I="aborted"),K(),z.forEach(ee=>{ee.status==="pending"&&(ee.status="aborted")}),z=[]}function se(ee,Se){Se&&(q=[]),typeof ee=="function"&&q.push(ee)}function ke(){return{startTime:c,payload:n,status:I,queriesSent:k,queriesPending:z.length,subscribe:se,abort:J}}function ye(){I="failed",q.forEach(ee=>{ee(void 0,M)})}function W(){z.forEach(ee=>{ee.status==="pending"&&(ee.status="aborted")}),z=[]}function fe(ee,Se,Ee){const Le=Se!=="success";switch(z=z.filter(pe=>pe!==ee),I){case"pending":break;case"failed":if(Le||!e.dataAfterTimeout)return;break;default:return}if(Se==="abort"){M=Ee,ye();return}if(Le){M=Ee,z.length||(m.length?Z():ye());return}if(K(),W(),!e.random){const pe=e.resources.indexOf(ee.resource);pe!==-1&&pe!==e.index&&(e.index=pe)}I="completed",q.forEach(pe=>{pe(Ee)})}function Z(){if(I!=="pending")return;K();const ee=m.shift();if(ee===void 0){if(z.length){A=setTimeout(()=>{K(),I==="pending"&&(W(),ye())},e.timeout);return}ye();return}const Se={status:"pending",resource:ee,callback:(Ee,Le)=>{fe(Se,Ee,Le)}};z.push(Se),k++,A=setTimeout(Z,e.rotate),s(ee,n,Se.callback)}return setTimeout(Z),ke}function y1(e){const n={...gL,...e};let s=[];function u(){s=s.filter(c=>c().status==="pending")}function h(c,I,k){const M=yL(n,c,I,(A,z)=>{u(),k&&k(A,z)});return s.push(M),M}function g(c){return s.find(I=>c(I))||null}return{query:h,find:g,setIndex:c=>{n.index=c},getIndex:()=>n.index,cleanup:u}}function Ev(){}const gm=Object.create(null);function _L(e){if(!gm[e]){const n=ty(e);if(!n)return;const s=y1(n),u={config:n,redundancy:s};gm[e]=u}return gm[e]}function vL(e,n,s){let u,h;if(typeof e=="string"){const g=og(e);if(!g)return s(void 0,424),Ev;h=g.send;const m=_L(e);m&&(u=m.redundancy)}else{const g=Qg(e);if(g){u=y1(g);const m=e.resources?e.resources[0]:"",c=og(m);c&&(h=c.send)}}return!u||!h?(s(void 0,424),Ev):u.query(n,h,s)().abort}const Sv="iconify2",sh="iconify",_1=sh+"-count",Iv=sh+"-version",v1=36e5,xL=168,bL=50;function ag(e,n){try{return e.getItem(n)}catch{}}function iy(e,n,s){try{return e.setItem(n,s),!0}catch{}}function Tv(e,n){try{e.removeItem(n)}catch{}}function lg(e,n){return iy(e,_1,n.toString())}function cg(e){return parseInt(ag(e,_1))||0}const Vf={local:!0,session:!0},x1={local:new Set,session:new Set};let ry=!1;function wL(e){ry=e}let Bd=typeof window>"u"?{}:window;function b1(e){const n=e+"Storage";try{if(Bd&&Bd[n]&&typeof Bd[n].length=="number")return Bd[n]}catch{}Vf[e]=!1}function w1(e,n){const s=b1(e);if(!s)return;const u=ag(s,Iv);if(u!==Sv){if(u){const c=cg(s);for(let I=0;I{const I=sh+c.toString(),k=ag(s,I);if(typeof k=="string"){try{const M=JSON.parse(k);if(typeof M=="object"&&typeof M.cached=="number"&&M.cached>h&&typeof M.provider=="string"&&typeof M.data=="object"&&typeof M.data.prefix=="string"&&n(M,c))return!0}catch{}Tv(s,I)}};let m=cg(s);for(let c=m-1;c>=0;c--)g(c)||(c===m-1?(m--,lg(s,m)):x1[e].add(c))}function E1(){if(!ry){wL(!0);for(const e in Vf)w1(e,n=>{const s=n.data,u=n.provider,h=s.prefix,g=Za(u,h);if(!Yg(g,s).length)return!1;const m=s.lastModified||-1;return g.lastModifiedCached=g.lastModifiedCached?Math.min(g.lastModifiedCached,m):m,!0})}}function EL(e,n){const s=e.lastModifiedCached;if(s&&s>=n)return s===n;if(e.lastModifiedCached=n,s)for(const u in Vf)w1(u,h=>{const g=h.data;return h.provider!==e.provider||g.prefix!==e.prefix||g.lastModified===n});return!0}function SL(e,n){ry||E1();function s(u){let h;if(!Vf[u]||!(h=b1(u)))return;const g=x1[u];let m;if(g.size)g.delete(m=Array.from(g).shift());else if(m=cg(h),m>=bL||!lg(h,m+1))return;const c={cached:Math.floor(Date.now()/v1),provider:e.provider,data:n};return iy(h,sh+m.toString(),JSON.stringify(c))}n.lastModified&&!EL(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&(n=Object.assign({},n),delete n.not_found),s("local")||s("session"))}function Cv(){}function IL(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,dL(e)}))}function TL(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:s,prefix:u}=e,h=e.iconsToLoad;delete e.iconsToLoad;let g;if(!h||!(g=og(s)))return;g.prepare(s,u,h).forEach(c=>{vL(s,c,I=>{if(typeof I!="object")c.icons.forEach(k=>{e.missing.add(k)});else try{const k=Yg(e,I);if(!k.length)return;const M=e.pendingIcons;M&&k.forEach(A=>{M.delete(A)}),SL(e,I)}catch(k){console.error(k)}IL(e)})})}))}const CL=(e,n)=>{const s=mL(e,!0,m1()),u=hL(s);if(!u.pending.length){let I=!0;return n&&setTimeout(()=>{I&&n(u.loaded,u.missing,u.pending,Cv)}),()=>{I=!1}}const h=Object.create(null),g=[];let m,c;return u.pending.forEach(I=>{const{provider:k,prefix:M}=I;if(M===c&&k===m)return;m=k,c=M,g.push(Za(k,M));const A=h[k]||(h[k]=Object.create(null));A[M]||(A[M]=[])}),u.pending.forEach(I=>{const{provider:k,prefix:M,name:A}=I,z=Za(k,M),q=z.pendingIcons||(z.pendingIcons=new Set);q.has(A)||(q.add(A),h[k][M].push(A))}),g.forEach(I=>{const{provider:k,prefix:M}=I;h[k][M].length&&TL(I,h[k][M])}),n?pL(n,u,g):Cv},AL=e=>new Promise((n,s)=>{const u=typeof e=="string"?Ff(e,!0):e;if(!u){s(e);return}CL([u||e],h=>{if(h.length&&u){const g=Yk(u);if(g){n({...Jg,...g});return}}s(e)})});({...iL});const Av={backgroundColor:"currentColor"},ML={backgroundColor:"transparent"},Mv={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},kv={webkitMask:Av,mask:Av,background:ML};for(const e in kv){const n=kv[e];for(const s in Mv)n[e+s]=Mv[s]}const ym={};["horizontal","vertical"].forEach(e=>{const n=e.slice(0,1)+"Flip";ym[e+"-flip"]=n,ym[e.slice(0,1)+"-flip"]=n,ym[e+"Flip"]=n});m1(!0);rL("",uL);if(typeof document<"u"&&typeof window<"u"){E1();const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,s="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(u=>{try{(typeof u!="object"||u===null||u instanceof Array||typeof u.icons!="object"||typeof u.prefix!="string"||!eL(u))&&console.error(s)}catch{console.error(s)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let s in n){const u="IconifyProviders["+s+"] is invalid.";try{const h=n[s];if(typeof h!="object"||!h||h.resources===void 0)continue;sg(s,h)||console.error(u)}catch{console.error(u)}}}}({...Jg});const kL=["fluent-emoji-high-contrast","material-symbols-light","cryptocurrency-color","icon-park-outline","icon-park-twotone","fluent-emoji-flat","emojione-monotone","streamline-emojis","heroicons-outline","simple-line-icons","material-symbols","flat-color-icons","icon-park-solid","pepicons-pencil","heroicons-solid","pepicons-print","cryptocurrency","pixelarticons","system-uicons","bitcoin-icons","devicon-plain","entypo-social","token-branded","grommet-icons","vscode-icons","pepicons-pop","svg-spinners","fluent-emoji","simple-icons","circle-flags","medical-icon","icomoon-free","majesticons","radix-icons","humbleicons","fa6-regular","emojione-v1","skill-icons","academicons","healthicons","fluent-mdl2","teenyicons","ant-design","gravity-ui","akar-icons","lets-icons","streamline","fa6-brands","file-icons","game-icons","foundation","fa-regular","mono-icons","hugeicons","iconamoon","zondicons","mdi-light","eos-icons","gridicons","icon-park","heroicons","fa6-solid","meteocons","arcticons","dashicons","fa-brands","websymbol","fontelico","mingcute","flowbite","marketeq","bytesize","guidance","openmoji","emojione","nonicons","brandico","flagpack","fa-solid","fontisto","si-glyph","pepicons","iconoir","tdesign","clarity","octicon","codicon","pajamas","formkit","line-md","twemoji","noto-v1","fxemoji","devicon","raphael","flat-ui","topcoat","feather","tabler","carbon","lucide","memory","mynaui","circum","fluent","nimbus","entypo","icons8","subway","vaadin","solar","basil","typcn","charm","prime","quill","logos","token","covid","maki","gala","mage","ooui","noto","unjs","flag","iwwa","zmdi","bpmn","mdi","ion","uil","bxs","cil","uiw","uim","uit","uis","jam","oui","bxl","cib","cbi","cif","gis","map","geo","fad","eva","wpf","whh","ic","ph","ri","bi","bx","gg","ci","ep","fe","mi","f7","ei","wi","la","fa","oi","et","el","ls","vs","il","ps"];function LL(e=""){let n,s="";if(e[0]==="@"&&e.includes(":")&&(s=e.split(":")[0].slice(1),e=e.split(":").slice(1).join(":")),e.startsWith("i-")){e=e.replace(/^i-/,"");for(const u of kL)if(e.startsWith(u)){n=u,e=e.slice(u.length+1);break}}else if(e.includes(":")){const[u,h]=e.split(":");n=u,e=h}return{provider:s,prefix:n||"",name:e||""}}const PL=Ui({__name:"Icon",props:{name:{type:String,required:!0},size:{type:String,default:""}},async setup(e){let n,s;const u=Wi(),h=Of(),g=e;Ji(()=>{var se;return(se=h.nuxtIcon)==null?void 0:se.iconifyApiOptions},()=>{var se,ke,ye,W,fe,Z;if((ke=(se=h.nuxtIcon)==null?void 0:se.iconifyApiOptions)!=null&&ke.url){try{new URL(h.nuxtIcon.iconifyApiOptions.url)}catch{console.warn("Nuxt Icon: Invalid custom Iconify API URL");return}if((W=(ye=h.nuxtIcon)==null?void 0:ye.iconifyApiOptions)!=null&&W.publicApiFallback){sg("custom",{resources:[(fe=h.nuxtIcon)==null?void 0:fe.iconifyApiOptions.url],index:0});return}sg("",{resources:[(Z=h.nuxtIcon)==null?void 0:Z.iconifyApiOptions.url]})}},{immediate:!0});const m=Wg("icons",()=>({})),c=Lt(!1),I=je(()=>{var se,ke;return(ke=(se=h.nuxtIcon)==null?void 0:se.aliases)!=null&&ke[g.name]?h.nuxtIcon.aliases[g.name]:g.name}),k=je(()=>LL(I.value)),M=je(()=>[k.value.provider,k.value.prefix,k.value.name].filter(Boolean).join(":")),A=je(()=>{var se;return(se=m.value)==null?void 0:se[M.value]}),z=je(()=>{var se;return(se=u.vueApp)==null?void 0:se.component(I.value)}),q=je(()=>{var ke,ye,W;if(!g.size&&typeof((ke=h.nuxtIcon)==null?void 0:ke.size)=="boolean"&&!((ye=h.nuxtIcon)!=null&&ye.size))return;const se=g.size||((W=h.nuxtIcon)==null?void 0:W.size)||"1em";return String(Number(se))===se?`${se}px`:se}),K=je(()=>{var se;return((se=h==null?void 0:h.nuxtIcon)==null?void 0:se.class)??"icon"});async function J(){var se;z.value||(se=m.value)!=null&&se[M.value]||(c.value=!0,m.value[M.value]=await AL(k.value).catch(()=>{}),c.value=!1)}return Ji(I,J),!z.value&&([n,s]=NS(()=>J()),n=await n,s()),(se,ke)=>c.value?(At(),Mi("span",{key:0,class:Wt(K.value),style:Ha({width:q.value,height:q.value})},null,6)):A.value?(At(),ki(ii(Hk),{key:1,icon:A.value,class:Wt(K.value),width:q.value,height:q.value},null,8,["icon","class","width","height"])):z.value?(At(),ki(cs(z.value),{key:2,class:Wt(K.value),width:q.value,height:q.value},null,8,["class","width","height"])):(At(),Mi("span",{key:3,class:Wt(K.value),style:Ha({fontSize:q.value,lineHeight:q.value,width:q.value,height:q.value})},[vr(se.$slots,"default",{},()=>[hs(nn(e.name),1)],!0)],6))}}),S1=yo(PL,[["__scopeId","data-v-e8d572f6"]]),zL=Object.freeze(Object.defineProperty({__proto__:null,default:S1},Symbol.toStringTag,{value:"Module"})),DL=Ui({props:{name:{type:String,required:!0},dynamic:{type:Boolean,default:!1}},setup(e){const n=Of();return{dynamic:je(()=>{var u,h;return e.dynamic||((h=(u=n.ui)==null?void 0:u.icons)==null?void 0:h.dynamic)})}}});function RL(e,n,s,u,h,g){const m=S1;return e.dynamic?(At(),ki(m,{key:0,name:e.name},null,8,["name"])):(At(),Mi("span",{key:1,class:Wt(e.name)},null,2))}const na=yo(DL,[["render",RL]]),OL=Ui({inheritAttrs:!1,props:{...Zg,as:{type:String,default:"button"},type:{type:String,default:"button"},disabled:{type:Boolean,default:null},active:{type:Boolean,default:void 0},exact:{type:Boolean,default:!1},exactQuery:{type:Boolean,default:!1},exactHash:{type:Boolean,default:!1},inactiveClass:{type:String,default:void 0}},setup(e){function n(s,u,{isActive:h,isExactActive:g}){return e.exactQuery&&!hC(s.query,u.query)||e.exactHash&&s.hash!==u.hash?e.inactiveClass:e.exact&&g||!e.exact&&h?e.activeClass:e.inactiveClass}return{resolveLinkClass:n}}}),BL=["href","aria-disabled","role","rel","target","onClick"];function FL(e,n,s,u,h,g){const m=n1;return e.to?(At(),ki(m,fo({key:1},e.$props,{custom:""}),{default:Rr(({route:c,href:I,target:k,rel:M,navigate:A,isActive:z,isExactActive:q,isExternal:K})=>[lr("a",fo(e.$attrs,{href:e.disabled?void 0:I,"aria-disabled":e.disabled?"true":void 0,role:e.disabled?"link":void 0,rel:M,target:k,class:e.active!==void 0?e.active?e.activeClass:e.inactiveClass:e.resolveLinkClass(c,e.$route,{isActive:z,isExactActive:q}),onClick:J=>!K&&!e.disabled&&A(J)}),[vr(e.$slots,"default",Em(af({isActive:e.active!==void 0?e.active:e.exact?q:z})))],16,BL)]),_:3},16)):(At(),ki(cs(e.as),fo({key:0,type:e.type,disabled:e.disabled},e.$attrs,{class:e.active?e.activeClass:e.inactiveClass}),{default:Rr(()=>[vr(e.$slots,"default",Em(af({isActive:e.active})))]),_:3},16,["type","disabled","class"]))}const I1=yo(OL,[["render",FL]]),os=Ya(tr.ui.strategy,tr.ui.button,yk),VL=Ui({components:{UIcon:na,ULink:I1},inheritAttrs:!1,props:{...Zg,type:{type:String,default:"button"},block:{type:Boolean,default:!1},label:{type:String,default:null},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},padded:{type:Boolean,default:!0},size:{type:String,default:()=>os.default.size,validator(e){return Object.keys(os.size).includes(e)}},color:{type:String,default:()=>os.default.color,validator(e){return[...tr.ui.colors,...Object.keys(os.color)].includes(e)}},variant:{type:String,default:()=>os.default.variant,validator(e){return[...Object.keys(os.variant),...Object.values(os.color).flatMap(n=>Object.keys(n))].includes(e)}},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>os.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:null},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},square:{type:Boolean,default:!1},truncate:{type:Boolean,default:!1},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(e,{slots:n}){const{ui:s,attrs:u}=fc("button",zo(e,"ui"),os),{size:h,rounded:g}=Bf({ui:s,props:e}),m=je(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),c=je(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),I=je(()=>e.square||!n.default&&!e.label),k=je(()=>{var se,ke;const J=((ke=(se=s.value.color)==null?void 0:se[e.color])==null?void 0:ke[e.variant])||s.value.variant[e.variant];return dc(wr(s.value.base,s.value.font,g.value,s.value.size[h.value],s.value.gap[h.value],e.padded&&s.value[I.value?"square":"padding"][h.value],J==null?void 0:J.replaceAll("{color}",e.color),e.block?s.value.block:s.value.inline),e.class)}),M=je(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),A=je(()=>e.loading&&!m.value?e.loadingIcon:e.trailingIcon||e.icon),z=je(()=>wr(s.value.icon.base,s.value.icon.size[h.value],e.loading&&s.value.icon.loading)),q=je(()=>wr(s.value.icon.base,s.value.icon.size[h.value],e.loading&&!m.value&&s.value.icon.loading)),K=je(()=>SM(e));return{ui:s,attrs:u,isLeading:m,isTrailing:c,isSquare:I,buttonClass:k,leadingIconName:M,trailingIconName:A,leadingIconClass:z,trailingIconClass:q,linkProps:K}}});function NL(e,n,s,u,h,g){const m=na,c=I1;return At(),ki(c,fo({type:e.type,disabled:e.disabled||e.loading,class:e.buttonClass},{...e.linkProps,...e.attrs}),{default:Rr(()=>[vr(e.$slots,"leading",{disabled:e.disabled,loading:e.loading},()=>[e.isLeading&&e.leadingIconName?(At(),ki(m,{key:0,name:e.leadingIconName,class:Wt(e.leadingIconClass),"aria-hidden":"true"},null,8,["name","class"])):Dr("",!0)]),vr(e.$slots,"default",{},()=>[e.label?(At(),Mi("span",{key:0,class:Wt([e.truncate?e.ui.truncate:""])},nn(e.label),3)):Dr("",!0)]),vr(e.$slots,"trailing",{disabled:e.disabled,loading:e.loading},()=>[e.isTrailing&&e.trailingIconName?(At(),ki(m,{key:0,name:e.trailingIconName,class:Wt(e.trailingIconClass),"aria-hidden":"true"},null,8,["name","class"])):Dr("",!0)])]),_:3},16,["type","disabled","class"])}const T1=yo(VL,[["render",NL]]),C1=()=>Wg("color-mode").value,A1=e=>(Lx("data-v-82e603f3"),e=e(),Px(),e),jL={class:"px-4 flex items-center border-b border-gray-200 dark:border-gray-800"},$L={class:"app-logo flex items-center"},UL=A1(()=>lr("h1",null,"japanmesh",-1)),qL=A1(()=>lr("div",{class:"grow"},null,-1)),HL=Ui({__name:"AppHeader",setup(e){const n=C1(),s=Lt(""),u=je(()=>n.preference==="light"?"i-heroicons-sun":"i-heroicons-moon-16-solid");function h(){n.preference=n.preference==="light"?"dark":"light"}return an(()=>{fetch("https://api.github.com/repos/qazsato/japanmesh/releases/latest").then(m=>m.json()).then(m=>{s.value=m.tag_name})}),(g,m)=>{const c=n1,I=s1,k=T1;return At(),Mi("header",jL,[lr("div",$L,[ri(c,{to:"/"},{default:Rr(()=>[UL]),_:1}),ii(s)?(At(),ki(I,{key:0,label:ii(s),variant:"outline",color:"primary",size:"xs",class:"mx-2"},null,8,["label"])):Dr("",!0)]),qL,ri(k,{icon:ii(u),size:"sm",color:"gray",square:"",variant:"ghost",onClick:h,class:"mx-1"},null,8,["icon"]),ri(k,{icon:"i-simple-icons-npm",size:"sm",color:"gray",square:"",variant:"ghost",to:"https://www.npmjs.com/package/japanmesh",target:"_blank",class:"mx-1"}),ri(k,{icon:"i-simple-icons-github",size:"sm",color:"gray",square:"",variant:"ghost",to:"https://github.com/qazsato/geo-docs",target:"_blank",class:"mx-1"})])}}}),GL=yo(HL,[["__scopeId","data-v-82e603f3"]]),M1=(e,n)=>{const s=Hr("form-events",void 0),u=Hr("form-group",void 0),h=Hr("form-inputs",void 0);u&&(e!=null&&e.id&&(u.inputId.value=e==null?void 0:e.id),h&&(h.value[u.name.value]=u.inputId.value));const g=Lt(!1);function m(M,A){s&&s.emit({type:M,path:A})}function c(){m("blur",u==null?void 0:u.name.value),g.value=!0}function I(){m("change",u==null?void 0:u.name.value)}const k=Kb(()=>{(g.value||u!=null&&u.eagerValidation.value)&&m("input",u==null?void 0:u.name.value)},300);return{inputId:je(()=>(e==null?void 0:e.id)??(u==null?void 0:u.inputId.value)),name:je(()=>(e==null?void 0:e.name)??(u==null?void 0:u.name.value)),size:je(()=>{var A;const M=n.size[u==null?void 0:u.size.value]?u==null?void 0:u.size.value:null;return(e==null?void 0:e.size)??M??((A=n==null?void 0:n.default)==null?void 0:A.size)}),color:je(()=>{var M;return(M=u==null?void 0:u.error)!=null&&M.value?"red":e==null?void 0:e.color}),emitFormBlur:c,emitFormInput:k,emitFormChange:I}},ss=Ya(tr.ui.strategy,tr.ui.input,Xg),ZL=Ui({components:{UIcon:na},inheritAttrs:!1,props:{modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},id:{type:String,default:null},name:{type:String,default:null},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},autofocusDelay:{type:Number,default:100},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>ss.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:null},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},padded:{type:Boolean,default:!0},size:{type:String,default:null,validator(e){return Object.keys(ss.size).includes(e)}},color:{type:String,default:()=>ss.default.color,validator(e){return[...tr.ui.colors,...Object.keys(ss.color)].includes(e)}},variant:{type:String,default:()=>ss.default.variant,validator(e){return[...Object.keys(ss.variant),...Object.values(ss.color).flatMap(n=>Object.keys(n))].includes(e)}},inputClass:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},modelModifiers:{type:Object,default:()=>({})}},emits:["update:modelValue","blur","change"],setup(e,{emit:n,slots:s}){const{ui:u,attrs:h}=fc("input",zo(e,"ui"),ss,zo(e,"class")),{size:g,rounded:m}=Bf({ui:u,props:e}),{emitFormBlur:c,emitFormInput:I,size:k,color:M,inputId:A,name:z}=M1(e,ss),q=je(()=>g.value||k.value),K=Lt(Df({},e.modelModifiers,{trim:!1,lazy:!1,number:!1})),J=Lt(null),se=()=>{var Ge;e.autofocus&&((Ge=J.value)==null||Ge.focus())},ke=Ge=>{K.value.trim&&(Ge=Ge.trim()),(K.value.number||e.type==="number")&&(Ge=CM(Ge)),n("update:modelValue",Ge),I()},ye=Ge=>{K.value.lazy||ke(Ge.target.value)},W=Ge=>{if(e.type==="file"){const rt=Ge.target.files;n("change",rt)}else{const rt=Ge.target.value;n("change",rt),K.value.lazy&&ke(rt),K.value.trim&&(Ge.target.value=rt.trim())}},fe=Ge=>{c(),n("blur",Ge)};an(()=>{setTimeout(()=>{se()},e.autofocusDelay)});const Z=je(()=>{var rt,Xe;const Ge=((Xe=(rt=u.value.color)==null?void 0:rt[M.value])==null?void 0:Xe[e.variant])||u.value.variant[e.variant];return dc(wr(u.value.base,u.value.form,m.value,u.value.placeholder,e.type==="file"&&u.value.file.base,u.value.size[q.value],e.padded?u.value.padding[q.value]:"p-0",Ge==null?void 0:Ge.replaceAll("{color}",M.value),(ee.value||s.leading)&&u.value.leading.padding[q.value],(Se.value||s.trailing)&&u.value.trailing.padding[q.value]),e.inputClass)}),ee=je(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),Se=je(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),Ee=je(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),Le=je(()=>e.loading&&!ee.value?e.loadingIcon:e.trailingIcon||e.icon),pe=je(()=>wr(u.value.icon.leading.wrapper,u.value.icon.leading.pointer,u.value.icon.leading.padding[q.value])),Ie=je(()=>wr(u.value.icon.base,M.value&&tr.ui.colors.includes(M.value)&&u.value.icon.color.replaceAll("{color}",M.value),u.value.icon.size[q.value],e.loading&&u.value.icon.loading)),Ae=je(()=>wr(u.value.icon.trailing.wrapper,u.value.icon.trailing.pointer,u.value.icon.trailing.padding[q.value])),De=je(()=>wr(u.value.icon.base,M.value&&tr.ui.colors.includes(M.value)&&u.value.icon.color.replaceAll("{color}",M.value),u.value.icon.size[q.value],e.loading&&!ee.value&&u.value.icon.loading));return{ui:u,attrs:h,name:z,inputId:A,input:J,isLeading:ee,isTrailing:Se,inputClass:Z,leadingIconName:Ee,leadingIconClass:Ie,leadingWrapperIconClass:pe,trailingIconName:Le,trailingIconClass:De,trailingWrapperIconClass:Ae,onInput:ye,onChange:W,onBlur:fe}}}),WL=["id","name","value","type","required","placeholder","disabled"];function XL(e,n,s,u,h,g){const m=na;return At(),Mi("div",{class:Wt(e.type==="hidden"?"hidden":e.ui.wrapper)},[lr("input",fo({id:e.inputId,ref:"input",name:e.name,value:e.modelValue,type:e.type,required:e.required,placeholder:e.placeholder,disabled:e.disabled,class:e.inputClass},e.attrs,{onInput:n[0]||(n[0]=(...c)=>e.onInput&&e.onInput(...c)),onBlur:n[1]||(n[1]=(...c)=>e.onBlur&&e.onBlur(...c)),onChange:n[2]||(n[2]=(...c)=>e.onChange&&e.onChange(...c))}),null,16,WL),vr(e.$slots,"default"),e.isLeading&&e.leadingIconName||e.$slots.leading?(At(),Mi("span",{key:0,class:Wt(e.leadingWrapperIconClass)},[vr(e.$slots,"leading",{disabled:e.disabled,loading:e.loading},()=>[ri(m,{name:e.leadingIconName,class:Wt(e.leadingIconClass)},null,8,["name","class"])])],2)):Dr("",!0),e.isTrailing&&e.trailingIconName||e.$slots.trailing?(At(),Mi("span",{key:1,class:Wt(e.trailingWrapperIconClass)},[vr(e.$slots,"trailing",{disabled:e.disabled,loading:e.loading},()=>[ri(m,{name:e.trailingIconName,class:Wt(e.trailingIconClass)},null,8,["name","class"])])],2)):Dr("",!0)],2)}const KL=yo(ZL,[["render",XL]]),Ba=Ya(tr.ui.strategy,tr.ui.avatar,mk),JL=Ui({components:{UIcon:na},inheritAttrs:!1,props:{as:{type:[String,Object],default:"img"},src:{type:[String,Boolean],default:null},alt:{type:String,default:null},text:{type:String,default:null},icon:{type:String,default:()=>Ba.default.icon},size:{type:String,default:()=>Ba.default.size,validator(e){return Object.keys(Ba.size).includes(e)}},chipColor:{type:String,default:()=>Ba.default.chipColor,validator(e){return["gray",...tr.ui.colors].includes(e)}},chipPosition:{type:String,default:()=>Ba.default.chipPosition,validator(e){return Object.keys(Ba.chip.position).includes(e)}},chipText:{type:[String,Number],default:null},imgClass:{type:String,default:""},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(e){const{ui:n,attrs:s}=fc("avatar",zo(e,"ui"),Ba),u=je(()=>typeof e.src=="boolean"?null:e.src),h=je(()=>(e.alt||"").split(" ").map(A=>A.charAt(0)).join("").substring(0,2)),g=je(()=>dc(wr(n.value.wrapper,(k.value||!u.value)&&n.value.background,n.value.rounded,n.value.size[e.size]),e.class)),m=je(()=>dc(wr(n.value.rounded,n.value.size[e.size]),e.imgClass)),c=je(()=>wr(n.value.icon.base,n.value.icon.size[e.size])),I=je(()=>wr(n.value.chip.base,n.value.chip.size[e.size],n.value.chip.position[e.chipPosition],n.value.chip.background.replaceAll("{color}",e.chipColor))),k=Lt(!1);Ji(()=>e.src,()=>{k.value&&(k.value=!1)});function M(){k.value=!0}return{ui:n,attrs:s,wrapperClass:g,imgClass:m,iconClass:c,chipClass:I,url:u,placeholder:h,error:k,onError:M}}});function YL(e,n,s,u,h,g){const m=na;return At(),Mi("span",{class:Wt(e.wrapperClass)},[e.url&&!e.error?(At(),ki(cs(e.as),fo({key:0,class:e.imgClass,alt:e.alt,src:e.url},e.attrs,{onError:e.onError}),null,16,["class","alt","src","onError"])):e.text?(At(),Mi("span",{key:1,class:Wt(e.ui.text)},nn(e.text),3)):e.icon?(At(),ki(m,{key:2,name:e.icon,class:Wt(e.iconClass)},null,8,["name","class"])):e.placeholder?(At(),Mi("span",{key:3,class:Wt(e.ui.placeholder)},nn(e.placeholder),3)):Dr("",!0),e.chipColor?(At(),Mi("span",{key:4,class:Wt(e.chipClass)},nn(e.chipText),3)):Dr("",!0),vr(e.$slots,"default")],2)}const k1=yo(JL,[["render",YL]]),QL=Symbol.for("nuxt:client-only"),eP="data-n-ids",tP="-";function iP(e){var h,g,m,c,I,k;if(typeof e!="string")throw new TypeError("[nuxt] [useId] key must be a string.");e=`n${e.slice(1)}`;const n=Wi(),s=ia();if(!s)throw new TypeError("[nuxt] `useId` must be called within a component setup function.");n._id||(n._id=0),s._nuxtIdIndex||(s._nuxtIdIndex={}),(h=s._nuxtIdIndex)[e]||(h[e]=0);const u=e+tP+s._nuxtIdIndex[e]++;if(n.payload.serverRendered&&n.isHydrating&&!Hr(QL,!1)){const M=((g=s.vnode.el)==null?void 0:g.nodeType)===8&&((c=(m=s.vnode.el)==null?void 0:m.nextElementSibling)!=null&&c.getAttribute)?(I=s.vnode.el)==null?void 0:I.nextElementSibling:s.vnode.el,A=JSON.parse(((k=M==null?void 0:M.getAttribute)==null?void 0:k.call(M,eP))||"{}");if(A[u])return A[u]}return e+"_"+n._id++}function Ou(e,n,s){let u=s.initialDeps??[],h;return()=>{var g,m,c,I;let k;s.key&&((g=s.debug)!=null&&g.call(s))&&(k=Date.now());const M=e();if(!(M.length!==u.length||M.some((q,K)=>u[K]!==q)))return h;u=M;let z;if(s.key&&((m=s.debug)!=null&&m.call(s))&&(z=Date.now()),h=n(...M),s.key&&((c=s.debug)!=null&&c.call(s))){const q=Math.round((Date.now()-k)*100)/100,K=Math.round((Date.now()-z)*100)/100,J=K/16,se=(ke,ye)=>{for(ke=String(ke);ke.lengths.value,tagPriority:-2,id:"nuxt-ui-colors"}]};if(n.isHydrating&&!n.payload.serverRendered){const h=document.createElement("style");h.innerHTML=s.value,h.setAttribute("data-nuxt-ui-colors",""),document.head.appendChild(h),u.script=[{innerHTML:"document.head.removeChild(document.querySelector('[data-nuxt-ui-colors]'))"}]}fA(u)}),nk="$s";function Zg(...e){const n=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(n);const[s,u]=e;if(!s||typeof s!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+s);if(u!==void 0&&typeof u!="function")throw new Error("[nuxt] [useState] init must be a function: "+u);const h=nk+s,g=Zi(),m=zo(g.payload.state,h);if(m.value===void 0&&u){const c=u();if(yr(c))return g.payload.state[h]=c,c;m.value=c}return m}const ok="__NUXT_COLOR_MODE__",sk="nuxt-color-mode",ns=window[ok]||{},ak=go(e=>{const n=Zg("color-mode",()=>Oo({preference:ns.preference,value:ns.value,unknown:!1,forced:!1})).value;Fo().afterEach(h=>{const g=h.meta.colorMode;g&&g!=="system"?(n.value=g,n.forced=!0):(g==="system"&&console.warn("You cannot force the colorMode to system at the page level."),n.forced=!1,n.value=n.preference==="system"?ns.getColorScheme():n.preference)});let s;function u(){s||!window.matchMedia||(s=window.matchMedia("(prefers-color-scheme: dark)"),s.addEventListener("change",()=>{!n.forced&&n.preference==="system"&&(n.value=ns.getColorScheme())}))}er(()=>n.preference,h=>{var g;n.forced||(h==="system"?(n.value=ns.getColorScheme(),u()):n.value=h,(g=window.localStorage)==null||g.setItem(sk,h))},{immediate:!0}),er(()=>n.value,(h,g)=>{ns.removeColorScheme(g),ns.addColorScheme(h)}),n.preference==="system"&&u(),e.hook("app:mounted",()=>{n.unknown&&(n.preference=ns.preference,n.value=ns.value,n.unknown=!1)}),e.provide("colorMode",n)});function lk(e={}){const n=e.path||window.location.pathname;let s={};try{s=uf(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(e.force||(s==null?void 0:s.path)!==n||(s==null?void 0:s.expires){u.clear()}),e.hook("app:chunkError",({error:g})=>{u.add(g)});function h(g){const c="href"in g&&g.href[0]==="#"?s.app.baseURL+g.href:hh(s.app.baseURL,g.fullPath);lk({path:c,persistState:!0})}e.hook("app:manifest:update",()=>{n.beforeResolve(h)}),n.onError((g,m)=>{u.has(g)&&h(m)})}}),uk=[xA,wA,IA,CA,AA,RA,NA,$A,rk,ak,ck];async function r1(e,n=Fo()){const{path:s,matched:u}=n.resolve(e);if(!u.length||(n._routePreloaded||(n._routePreloaded=new Set),n._routePreloaded.has(s)))return;const h=n._preloadPromises=n._preloadPromises||[];if(h.length>4)return Promise.all(h).then(()=>r1(e,n));n._routePreloaded.add(s);const g=u.map(m=>{var c;return(c=m.components)==null?void 0:c.default}).filter(m=>typeof m=="function");for(const m of g){const c=Promise.resolve(m()).catch(()=>{}).finally(()=>h.splice(h.indexOf(c)));h.push(c)}await Promise.all(h)}const hk=(...e)=>e.find(n=>n!==void 0);function dk(e){const n=e.componentName||"NuxtLink";function s(h,g){if(!h||e.trailingSlash!=="append"&&e.trailingSlash!=="remove")return h;if(typeof h=="string")return dv(h,e.trailingSlash);const m="path"in h&&h.path!==void 0?h.path:g(h).path;return{...h,name:void 0,path:dv(m,e.trailingSlash)}}function u(h){const g=Fo(),m=hc(),c=je(()=>!!h.target&&h.target!=="_self"),I=je(()=>{const J=h.to||h.href||"";return typeof J=="string"&&ra(J,{acceptRelative:!0})}),k=Mm("RouterLink"),M=k&&typeof k!="string"?k.useLink:void 0,A=je(()=>{if(h.external)return!0;const J=h.to||h.href||"";return typeof J=="object"?!1:J===""||I.value}),z=je(()=>{const J=h.to||h.href||"";return A.value?J:s(J,g.resolve)}),q=A.value||M==null?void 0:M({...h,to:z}),K=je(()=>{var J;if(!z.value||I.value)return z.value;if(A.value){const se=typeof z.value=="object"?fv(z.value):z.value;return s(se,g.resolve)}return typeof z.value=="object"?((J=g.resolve(z.value))==null?void 0:J.href)??null:s(hh(m.app.baseURL,z.value),g.resolve)});return{to:z,hasTarget:c,isAbsoluteUrl:I,isExternal:A,href:K,isActive:(q==null?void 0:q.isActive)??je(()=>z.value===g.currentRoute.value.path),isExactActive:(q==null?void 0:q.isExactActive)??je(()=>z.value===g.currentRoute.value.path),route:(q==null?void 0:q.route)??je(()=>g.resolve(z.value)),async navigate(){await Vb(K.value,{replace:h.replace,external:A.value||c.value})}}}return Ui({name:n,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},useLink:u,setup(h,{slots:g}){const m=Fo(),{to:c,href:I,navigate:k,isExternal:M,hasTarget:A,isAbsoluteUrl:z}=u(h),q=Lt(!1),K=Lt(null),J=se=>{var ke;K.value=h.custom?(ke=se==null?void 0:se.$el)==null?void 0:ke.nextElementSibling:se==null?void 0:se.$el};if(h.prefetch!==!1&&h.noPrefetch!==!0&&h.target!=="_blank"&&!pk()){const ke=Zi();let ye,Z=null;an(()=>{const fe=fk();Hg(()=>{ye=Km(()=>{var W;(W=K==null?void 0:K.value)!=null&&W.tagName&&(Z=fe.observe(K.value,async()=>{Z==null||Z(),Z=null;const ee=typeof c.value=="string"?c.value:M.value?fv(c.value):m.resolve(c.value).fullPath;await Promise.all([ke.hooks.callHook("link:prefetch",ee).catch(()=>{}),!M.value&&!A.value&&r1(c.value,m).catch(()=>{})]),q.value=!0}))})})}),kf(()=>{ye&&TA(ye),Z==null||Z(),Z=null})}return()=>{var ye;if(!M.value&&!A.value){const Z={ref:J,to:c.value,activeClass:h.activeClass||e.activeClass,exactActiveClass:h.exactActiveClass||e.exactActiveClass,replace:h.replace,ariaCurrentValue:h.ariaCurrentValue,custom:h.custom};return h.custom||(q.value&&(Z.class=h.prefetchedClass||e.prefetchedClass),Z.rel=h.rel||void 0),Fn(Mm("RouterLink"),Z,g.default)}const se=h.target||null,ke=hk(h.noRel?"":h.rel,e.externalRelAttribute,z.value||A.value?"noopener noreferrer":"")||null;return h.custom?g.default?g.default({href:I.value,navigate:k,get route(){if(!I.value)return;const Z=new URL(I.value,window.location.href);return{path:Z.pathname,fullPath:Z.pathname,get query(){return Rg(Z.search)},hash:Z.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:I.value}},rel:ke,target:se,isExternal:M.value||A.value,isActive:!1,isExactActive:!1}):null:Fn("a",{ref:K,href:I.value||null,rel:ke,target:se},(ye=g.default)==null?void 0:ye.call(g))}}})}const n1=dk(eC);function dv(e,n){const s=n==="append"?df:zf;return ra(e)&&!e.startsWith("http")?e:s(e,!0)}function fk(){const e=Zi();if(e._observer)return e._observer;let n=null;const s=new Map,u=(g,m)=>(n||(n=new IntersectionObserver(c=>{for(const I of c){const k=s.get(I.target);(I.isIntersecting||I.intersectionRatio>0)&&k&&k()}})),s.set(g,m),n.observe(g),()=>{s.delete(g),n.unobserve(g),s.size===0&&(n.disconnect(),n=null)});return e._observer={observe:u}}function pk(){const e=navigator.connection;return!!(e&&(e.saveData||/2g/.test(e.effectiveType)))}function fv(e){return Og(e.path||"",e.query||{})+(e.hash?"#"+e.hash:"")}const fc=(e,n,s,u,h=!1)=>{const g=FS(),m=Of(),c=je(()=>{var z;const k=im(n),M=im(s),A=im(u);return Ya((k==null?void 0:k.strategy)||((z=m.ui)==null?void 0:z.strategy),A?{wrapper:A}:{},k||{},h?i1(m.ui,e,{}):{},M||{})}),I=je(()=>EM(g,["class"]));return{ui:c,attrs:I}};function Bf({ui:e,props:n}){const s=ia();if(ta("ButtonGroupContextConsumer",!0),Hr("ButtonGroupContextConsumer",!1))return{size:je(()=>n.size),rounded:je(()=>e.value.rounded)};let h=s.parent,g;for(;h&&!g;){if(h.type.name==="ButtonGroup"){g=Hr(`group-${h.uid}`);break}h=h.parent}const m=je(()=>g==null?void 0:g.value.children.indexOf(s));return an(()=>{g==null||g.value.register(s)}),Ja(()=>{g==null||g.value.unregister(s)}),{size:je(()=>(g==null?void 0:g.value.size)||n.size),rounded:je(()=>!g||m.value===-1?e.value.rounded:g.value.children.length===1?g.value.ui.rounded:m.value===0?g.value.rounded.start:m.value===g.value.children.length-1?g.value.rounded.end:"rounded-none")}}const mk={wrapper:"relative inline-flex items-center justify-center flex-shrink-0",background:"bg-gray-100 dark:bg-gray-800",rounded:"rounded-full",text:"font-medium leading-none text-gray-900 dark:text-white truncate",placeholder:"font-medium leading-none text-gray-500 dark:text-gray-400 truncate",size:{"3xs":"h-4 w-4 text-[8px]","2xs":"h-5 w-5 text-[10px]",xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-14 w-14 text-xl","2xl":"h-16 w-16 text-2xl","3xl":"h-20 w-20 text-3xl"},chip:{base:"absolute rounded-full ring-1 ring-white dark:ring-gray-900 flex items-center justify-center text-white dark:text-gray-900 font-medium",background:"bg-{color}-500 dark:bg-{color}-400",position:{"top-right":"top-0 right-0","bottom-right":"bottom-0 right-0","top-left":"top-0 left-0","bottom-left":"bottom-0 left-0"},size:{"3xs":"h-[4px] min-w-[4px] text-[4px] p-px","2xs":"h-[5px] min-w-[5px] text-[5px] p-px",xs:"h-1.5 min-w-[0.375rem] text-[6px] p-px",sm:"h-2 min-w-[0.5rem] text-[7px] p-0.5",md:"h-2.5 min-w-[0.625rem] text-[8px] p-0.5",lg:"h-3 min-w-[0.75rem] text-[10px] p-0.5",xl:"h-3.5 min-w-[0.875rem] text-[11px] p-1","2xl":"h-4 min-w-[1rem] text-[12px] p-1","3xl":"h-5 min-w-[1.25rem] text-[14px] p-1"}},icon:{base:"text-gray-500 dark:text-gray-400 flex-shrink-0",size:{"3xs":"h-2 w-2","2xs":"h-2.5 w-2.5",xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7","2xl":"h-8 w-8","3xl":"h-10 w-10"}},default:{size:"sm",icon:null,chipColor:null,chipPosition:"top-right"}},gk={base:"inline-flex items-center",rounded:"rounded-md",font:"font-medium",size:{xs:"text-xs px-1.5 py-0.5",sm:"text-xs px-2 py-1",md:"text-sm px-2 py-1",lg:"text-sm px-2.5 py-1.5"},color:{white:{solid:"ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-900 dark:text-white bg-white dark:bg-gray-900"},gray:{solid:"ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-50 dark:bg-gray-800"},black:{solid:"text-white dark:text-gray-900 bg-gray-900 dark:bg-white"}},variant:{solid:"bg-{color}-500 dark:bg-{color}-400 text-white dark:text-gray-900",outline:"text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400",soft:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400",subtle:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400 ring-opacity-25 dark:ring-opacity-25"},default:{size:"sm",variant:"solid",color:"primary"}},yk={base:"focus:outline-none focus-visible:outline-0 disabled:cursor-not-allowed disabled:opacity-75 flex-shrink-0",font:"font-medium",rounded:"rounded-md",truncate:"text-left break-all line-clamp-1",block:"w-full flex justify-center items-center",inline:"inline-flex items-center",size:{"2xs":"text-xs",xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-sm",xl:"text-base"},gap:{"2xs":"gap-x-1",xs:"gap-x-1.5",sm:"gap-x-1.5",md:"gap-x-2",lg:"gap-x-2.5",xl:"gap-x-2.5"},padding:{"2xs":"px-2 py-1",xs:"px-2.5 py-1.5",sm:"px-2.5 py-1.5",md:"px-3 py-2",lg:"px-3.5 py-2.5",xl:"px-3.5 py-2.5"},square:{"2xs":"p-1",xs:"p-1.5",sm:"p-1.5",md:"p-2",lg:"p-2.5",xl:"p-2.5"},color:{white:{solid:"shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-900 dark:text-white bg-white hover:bg-gray-50 disabled:bg-white dark:bg-gray-900 dark:hover:bg-gray-800/50 dark:disabled:bg-gray-900 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",ghost:"text-gray-900 dark:text-white hover:bg-white dark:hover:bg-gray-900 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"},gray:{solid:"shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-50 hover:bg-gray-100 disabled:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:disabled:bg-gray-800 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",ghost:"text-gray-700 dark:text-gray-200 hover:text-gray-900 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-gray-800 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",link:"text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 underline-offset-4 hover:underline focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"},black:{solid:"shadow-sm text-white dark:text-gray-900 bg-gray-900 hover:bg-gray-800 disabled:bg-gray-900 dark:bg-white dark:hover:bg-gray-100 dark:disabled:bg-white focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",link:"text-gray-900 dark:text-white underline-offset-4 hover:underline focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"}},variant:{solid:"shadow-sm text-white dark:text-gray-900 bg-{color}-500 hover:bg-{color}-600 disabled:bg-{color}-500 dark:bg-{color}-400 dark:hover:bg-{color}-500 dark:disabled:bg-{color}-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-{color}-500 dark:focus-visible:outline-{color}-400",outline:"ring-1 ring-inset ring-current text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",soft:"text-{color}-500 dark:text-{color}-400 bg-{color}-50 hover:bg-{color}-100 disabled:bg-{color}-50 dark:bg-{color}-950 dark:hover:bg-{color}-900 dark:disabled:bg-{color}-950 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",ghost:"text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",link:"text-{color}-500 hover:text-{color}-600 disabled:text-{color}-500 dark:text-{color}-400 dark:hover:text-{color}-500 dark:disabled:text-{color}-400 underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400"},icon:{base:"flex-shrink-0",loading:"animate-spin",size:{"2xs":"h-4 w-4",xs:"h-4 w-4",sm:"h-5 w-5",md:"h-5 w-5",lg:"h-5 w-5",xl:"h-6 w-6"}},default:{size:"sm",variant:"solid",color:"primary",loadingIcon:"i-heroicons-arrow-path-20-solid"}},o1={base:"invisible before:visible before:block before:rotate-45 before:z-[-1] before:w-2 before:h-2",ring:"before:ring-1 before:ring-gray-200 dark:before:ring-gray-800",rounded:"before:rounded-sm",background:"before:bg-gray-200 dark:before:bg-gray-800",shadow:"before:shadow",placement:"group-data-[popper-placement*='right']:-left-1 group-data-[popper-placement*='left']:-right-1 group-data-[popper-placement*='top']:-bottom-1 group-data-[popper-placement*='bottom']:-top-1"},Xg={wrapper:"relative",base:"relative block w-full disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none border-0",form:"form-input",rounded:"rounded-md",placeholder:"placeholder-gray-400 dark:placeholder-gray-500",file:{base:"file:mr-1.5 file:font-medium file:text-gray-500 dark:file:text-gray-400 file:bg-transparent file:border-0 file:p-0 file:outline-none"},size:{"2xs":"text-xs",xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-sm",xl:"text-base"},gap:{"2xs":"gap-x-1",xs:"gap-x-1.5",sm:"gap-x-1.5",md:"gap-x-2",lg:"gap-x-2.5",xl:"gap-x-2.5"},padding:{"2xs":"px-2 py-1",xs:"px-2.5 py-1.5",sm:"px-2.5 py-1.5",md:"px-3 py-2",lg:"px-3.5 py-2.5",xl:"px-3.5 py-2.5"},leading:{padding:{"2xs":"ps-7",xs:"ps-8",sm:"ps-9",md:"ps-10",lg:"ps-11",xl:"ps-12"}},trailing:{padding:{"2xs":"pe-7",xs:"pe-8",sm:"pe-9",md:"pe-10",lg:"pe-11",xl:"pe-12"}},color:{white:{outline:"shadow-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-white ring-1 ring-inset ring-gray-300 dark:ring-gray-700 focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400"},gray:{outline:"shadow-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white ring-1 ring-inset ring-gray-300 dark:ring-gray-700 focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400"}},variant:{outline:"shadow-sm bg-transparent text-gray-900 dark:text-white ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400 focus:ring-2 focus:ring-{color}-500 dark:focus:ring-{color}-400",none:"bg-transparent focus:ring-0 focus:shadow-none"},icon:{base:"flex-shrink-0 text-gray-400 dark:text-gray-500",color:"text-{color}-500 dark:text-{color}-400",loading:"animate-spin",size:{"2xs":"h-4 w-4",xs:"h-4 w-4",sm:"h-5 w-5",md:"h-5 w-5",lg:"h-5 w-5",xl:"h-6 w-6"},leading:{wrapper:"absolute inset-y-0 start-0 flex items-center",pointer:"pointer-events-none",padding:{"2xs":"px-2",xs:"px-2.5",sm:"px-2.5",md:"px-3",lg:"px-3.5",xl:"px-3.5"}},trailing:{wrapper:"absolute inset-y-0 end-0 flex items-center",pointer:"pointer-events-none",padding:{"2xs":"px-2",xs:"px-2.5",sm:"px-2.5",md:"px-3",lg:"px-3.5",xl:"px-3.5"}}},default:{size:"sm",color:"white",variant:"outline",loadingIcon:"i-heroicons-arrow-path-20-solid"}},pv={container:"z-20 group",trigger:"flex items-center w-full",width:"w-full",height:"max-h-60",base:"relative focus:outline-none overflow-y-auto scroll-py-1",background:"bg-white dark:bg-gray-800",shadow:"shadow-lg",rounded:"rounded-md",padding:"p-1",ring:"ring-1 ring-gray-200 dark:ring-gray-700",empty:"text-sm text-gray-400 dark:text-gray-500 px-2 py-1.5",option:{base:"cursor-default select-none relative flex items-center justify-between gap-1",rounded:"rounded-md",padding:"px-1.5 py-1.5",size:"text-sm",color:"text-gray-900 dark:text-white",container:"flex items-center gap-1.5 min-w-0",active:"bg-gray-100 dark:bg-gray-900",inactive:"",selected:"pe-7",disabled:"cursor-not-allowed opacity-50",empty:"text-sm text-gray-400 dark:text-gray-500 px-2 py-1.5",icon:{base:"flex-shrink-0 h-5 w-5",active:"text-gray-900 dark:text-white",inactive:"text-gray-400 dark:text-gray-500"},selectedIcon:{wrapper:"absolute inset-y-0 end-0 flex items-center",padding:"pe-2",base:"h-5 w-5 text-gray-900 dark:text-white flex-shrink-0"},avatar:{base:"flex-shrink-0",size:"2xs"},chip:{base:"flex-shrink-0 w-2 h-2 mx-1 rounded-full"}},transition:{leaveActiveClass:"transition ease-in duration-100",leaveFromClass:"opacity-100",leaveToClass:"opacity-0"},popper:{placement:"bottom-end"},default:{selectedIcon:"i-heroicons-check-20-solid",trailingIcon:"i-heroicons-chevron-down-20-solid"},arrow:{...o1,ring:"before:ring-1 before:ring-gray-200 dark:before:ring-gray-700",background:"before:bg-white dark:before:bg-gray-700"}};({...Xg});const _k={...Xg,form:"form-select",placeholder:"text-gray-400 dark:text-gray-500",default:{size:"sm",color:"white",variant:"outline",loadingIcon:"i-heroicons-arrow-path-20-solid",trailingIcon:"i-heroicons-chevron-down-20-solid"}},vk={...pv,select:"inline-flex items-center text-left cursor-default",input:"block w-[calc(100%+0.5rem)] focus:ring-transparent text-sm px-3 py-1.5 text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 border-0 border-b border-gray-200 dark:border-gray-700 sticky -top-1 -mt-1 mb-1 -mx-1 z-10 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none",required:"absolute inset-0 w-px opacity-0 cursor-default",label:"block truncate",option:{...pv.option,create:"block truncate"},transition:{leaveActiveClass:"transition ease-in duration-100",leaveFromClass:"opacity-100",leaveToClass:"opacity-0"},popper:{placement:"bottom-end"},default:{selectedIcon:"i-heroicons-check-20-solid",clearSearchOnClose:!1,showCreateOptionWhen:"empty"},arrow:{...o1,ring:"before:ring-1 before:ring-gray-200 dark:before:ring-gray-700",background:"before:bg-white dark:before:bg-gray-700"}},yo=(e,n)=>{const s=e.__vccOpts||e;for(const[u,h]of n)s[u]=h;return s},Hs=Ya(tr.ui.strategy,tr.ui.badge,gk),xk=Ui({inheritAttrs:!1,props:{size:{type:String,default:()=>Hs.default.size,validator(e){return Object.keys(Hs.size).includes(e)}},color:{type:String,default:()=>Hs.default.color,validator(e){return[...tr.ui.colors,...Object.keys(Hs.color)].includes(e)}},variant:{type:String,default:()=>Hs.default.variant,validator(e){return[...Object.keys(Hs.variant),...Object.values(Hs.color).flatMap(n=>Object.keys(n))].includes(e)}},label:{type:[String,Number],default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(e){const{ui:n,attrs:s}=fc("badge",zo(e,"ui"),Hs),{size:u,rounded:h}=Bf({ui:n,props:e}),g=je(()=>{var c,I;const m=((I=(c=n.value.color)==null?void 0:c[e.color])==null?void 0:I[e.variant])||n.value.variant[e.variant];return dc(Er(n.value.base,n.value.font,h.value,n.value.size[u.value],m==null?void 0:m.replaceAll("{color}",e.color)),e.class)});return{attrs:s,badgeClass:g}}});function bk(e,n,s,u,h,g){return At(),wi("span",fo({class:e.badgeClass},e.attrs),[br(e.$slots,"default",{},()=>[hs(nn(e.label),1)])],16)}const s1=yo(xk,[["render",bk]]),a1=Object.freeze({left:0,top:0,width:16,height:16}),l1=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Kg=Object.freeze({...a1,...l1});Object.freeze({...Kg,body:"",hidden:!1});({...a1});const c1=Object.freeze({width:null,height:null}),u1=Object.freeze({...c1,...l1});function wk(e,n){const s={...e};for(const u in n){const h=n[u],g=typeof h;u in c1?(h===null||h&&(g==="string"||g==="number"))&&(s[u]=h):g===typeof s[u]&&(s[u]=u==="rotate"?h%4:h)}return s}const Ek=/[\s,]+/;function Sk(e,n){n.split(Ek).forEach(s=>{switch(s.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Ik(e,n=0){const s=e.replace(/^-?[0-9.]*/,"");function u(h){for(;h<0;)h+=4;return h%4}if(s===""){const h=parseInt(e);return isNaN(h)?0:u(h)}else if(s!==e){let h=0;switch(s){case"%":h=25;break;case"deg":h=90}if(h){let g=parseFloat(e.slice(0,e.length-s.length));return isNaN(g)?0:(g=g/h,g%1===0?u(g):0)}}return n}const Tk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ck=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function mv(e,n,s){if(n===1)return e;if(s=s||100,typeof e=="number")return Math.ceil(e*n*s)/s;if(typeof e!="string")return e;const u=e.split(Tk);if(u===null||!u.length)return e;const h=[];let g=u.shift(),m=Ck.test(g);for(;;){if(m){const c=parseFloat(g);isNaN(c)?h.push(g):h.push(Math.ceil(c*n*s)/s)}else h.push(g);if(g=u.shift(),g===void 0)return h.join("");m=!m}}function Ak(e,n="defs"){let s="";const u=e.indexOf("<"+n);for(;u>=0;){const h=e.indexOf(">",u),g=e.indexOf("",g);if(m===-1)break;s+=e.slice(h+1,g).trim(),e=e.slice(0,u).trim()+e.slice(m+1)}return{defs:s,content:e}}function Mk(e,n){return e?""+e+""+n:n}function kk(e,n,s){const u=Ak(e);return Mk(u.defs,n+u.content+s)}const Lk=e=>e==="unset"||e==="undefined"||e==="none";function Pk(e,n){const s={...Kg,...e},u={...u1,...n},h={left:s.left,top:s.top,width:s.width,height:s.height};let g=s.body;[s,u].forEach(J=>{const se=[],ke=J.hFlip,ye=J.vFlip;let Z=J.rotate;ke?ye?Z+=2:(se.push("translate("+(h.width+h.left).toString()+" "+(0-h.top).toString()+")"),se.push("scale(-1 1)"),h.top=h.left=0):ye&&(se.push("translate("+(0-h.left).toString()+" "+(h.height+h.top).toString()+")"),se.push("scale(1 -1)"),h.top=h.left=0);let fe;switch(Z<0&&(Z-=Math.floor(Z/4)*4),Z=Z%4,Z){case 1:fe=h.height/2+h.top,se.unshift("rotate(90 "+fe.toString()+" "+fe.toString()+")");break;case 2:se.unshift("rotate(180 "+(h.width/2+h.left).toString()+" "+(h.height/2+h.top).toString()+")");break;case 3:fe=h.width/2+h.left,se.unshift("rotate(-90 "+fe.toString()+" "+fe.toString()+")");break}Z%2===1&&(h.left!==h.top&&(fe=h.left,h.left=h.top,h.top=fe),h.width!==h.height&&(fe=h.width,h.width=h.height,h.height=fe)),se.length&&(g=kk(g,'',""))});const m=u.width,c=u.height,I=h.width,k=h.height;let M,A;m===null?(A=c===null?"1em":c==="auto"?k:c,M=mv(A,I/k)):(M=m==="auto"?I:m,A=c===null?mv(M,k/I):c==="auto"?k:c);const z={},q=(J,se)=>{Lk(se)||(z[J]=se.toString())};q("width",M),q("height",A);const K=[h.left,h.top,I,k];return z.viewBox=K.join(" "),{attributes:z,viewBox:K,body:g}}const zk=/\sid="(\S+)"/g,Dk="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Rk=0;function Ok(e,n=Dk){const s=[];let u;for(;u=zk.exec(e);)s.push(u[1]);if(!s.length)return e;const h="suffix"+(Math.random()*16777216|Date.now()).toString(16);return s.forEach(g=>{const m=typeof n=="function"?n(g):n+(Rk++).toString(),c=g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+m+h+"$3")}),e=e.replace(new RegExp(h,"g"),""),e}function Bk(e,n){let s=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const u in n)s+=" "+u+'="'+n[u]+'"';return'"+e+""}function Fk(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Vk(e){return"data:image/svg+xml,"+Fk(e)}function Nk(e){return'url("'+Vk(e)+'")'}const gv={...u1,inline:!1},jk={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},$k={display:"inline-block"},ig={backgroundColor:"currentColor"},h1={backgroundColor:"transparent"},yv={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},_v={webkitMask:ig,mask:ig,background:h1};for(const e in _v){const n=_v[e];for(const s in yv)n[e+s]=yv[s]}const Zd={};["horizontal","vertical"].forEach(e=>{const n=e.slice(0,1)+"Flip";Zd[e+"-flip"]=n,Zd[e.slice(0,1)+"-flip"]=n,Zd[e+"Flip"]=n});function vv(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Uk=(e,n)=>{const s=wk(gv,n),u={...jk},h=n.mode||"svg",g={},m=n.style,c=typeof m=="object"&&!(m instanceof Array)?m:{};for(let J in n){const se=n[J];if(se!==void 0)switch(J){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":s[J]=se===!0||se==="true"||se===1;break;case"flip":typeof se=="string"&&Sk(s,se);break;case"color":g.color=se;break;case"rotate":typeof se=="string"?s[J]=Ik(se):typeof se=="number"&&(s[J]=se);break;case"ariaHidden":case"aria-hidden":se!==!0&&se!=="true"&&delete u["aria-hidden"];break;default:{const ke=Zd[J];ke?(se===!0||se==="true"||se===1)&&(s[ke]=!0):gv[J]===void 0&&(u[J]=se)}}}const I=Pk(e,s),k=I.attributes;if(s.inline&&(g.verticalAlign="-0.125em"),h==="svg"){u.style={...g,...c},Object.assign(u,k);let J=0,se=n.id;return typeof se=="string"&&(se=se.replace(/-/g,"_")),u.innerHTML=Ok(I.body,se?()=>se+"ID"+J++:"iconifyVue"),Fn("svg",u)}const{body:M,width:A,height:z}=e,q=h==="mask"||(h==="bg"?!1:M.indexOf("currentColor")!==-1),K=Bk(M,{...k,width:A+"",height:z+""});return u.style={...g,"--svg":Nk(K),width:vv(k.width),height:vv(k.height),...$k,...q?ig:h1,...c},Fn("span",u)},qk=Object.create(null),Hk=Ui({inheritAttrs:!1,render(){const e=this.$attrs,n=e.icon,s=typeof n=="string"?qk[n]:typeof n=="object"?n:null;return s===null||typeof s!="object"||typeof s.body!="string"?this.$slots.default?this.$slots.default():null:Uk({...Kg,...s},e)}}),Zu=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ff=(e,n,s,u="")=>{const h=e.split(":");if(e.slice(0,1)==="@"){if(h.length<2||h.length>3)return null;u=h.shift().slice(1)}if(h.length>3||!h.length)return null;if(h.length>1){const c=h.pop(),I=h.pop(),k={provider:h.length>0?h[0]:u,prefix:I,name:c};return n&&!Xd(k)?null:k}const g=h[0],m=g.split("-");if(m.length>1){const c={provider:u,prefix:m.shift(),name:m.join("-")};return n&&!Xd(c)?null:c}if(s&&u===""){const c={provider:u,prefix:"",name:g};return n&&!Xd(c,s)?null:c}return null},Xd=(e,n)=>e?!!((e.provider===""||e.provider.match(Zu))&&(n&&e.prefix===""||e.prefix.match(Zu))&&e.name.match(Zu)):!1,d1=Object.freeze({left:0,top:0,width:16,height:16}),_f=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Jg=Object.freeze({...d1,..._f}),rg=Object.freeze({...Jg,body:"",hidden:!1});function Gk(e,n){const s={};!e.hFlip!=!n.hFlip&&(s.hFlip=!0),!e.vFlip!=!n.vFlip&&(s.vFlip=!0);const u=((e.rotate||0)+(n.rotate||0))%4;return u&&(s.rotate=u),s}function xv(e,n){const s=Gk(e,n);for(const u in rg)u in _f?u in e&&!(u in s)&&(s[u]=_f[u]):u in n?s[u]=n[u]:u in e&&(s[u]=e[u]);return s}function Wk(e,n){const s=e.icons,u=e.aliases||Object.create(null),h=Object.create(null);function g(m){if(s[m])return h[m]=[];if(!(m in h)){h[m]=null;const c=u[m]&&u[m].parent,I=c&&g(c);I&&(h[m]=[c].concat(I))}return h[m]}return Object.keys(s).concat(Object.keys(u)).forEach(g),h}function Zk(e,n,s){const u=e.icons,h=e.aliases||Object.create(null);let g={};function m(c){g=xv(u[c]||h[c],g)}return m(n),s.forEach(m),xv(e,g)}function f1(e,n){const s=[];if(typeof e!="object"||typeof e.icons!="object")return s;e.not_found instanceof Array&&e.not_found.forEach(h=>{n(h,null),s.push(h)});const u=Wk(e);for(const h in u){const g=u[h];g&&(n(h,Zk(e,h,g)),s.push(h))}return s}const Xk={provider:"",aliases:{},not_found:{},...d1};function mm(e,n){for(const s in n)if(s in e&&typeof e[s]!=typeof n[s])return!1;return!0}function p1(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!mm(e,Xk))return null;const s=n.icons;for(const h in s){const g=s[h];if(!h.match(Zu)||typeof g.body!="string"||!mm(g,rg))return null}const u=n.aliases||Object.create(null);for(const h in u){const g=u[h],m=g.parent;if(!h.match(Zu)||typeof m!="string"||!s[m]&&!u[m]||!mm(g,rg))return null}return n}const bv=Object.create(null);function Kk(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function Wa(e,n){const s=bv[e]||(bv[e]=Object.create(null));return s[n]||(s[n]=Kk(e,n))}function Yg(e,n){return p1(n)?f1(n,(s,u)=>{u?e.icons[s]=u:e.missing.add(s)}):[]}function Jk(e,n,s){try{if(typeof s.body=="string")return e.icons[n]={...s},!0}catch{}return!1}let oh=!1;function m1(e){return typeof e=="boolean"&&(oh=e),oh}function Yk(e){const n=typeof e=="string"?Ff(e,!0,oh):e;if(n){const s=Wa(n.provider,n.prefix),u=n.name;return s.icons[u]||(s.missing.has(u)?null:void 0)}}function Qk(e,n){const s=Ff(e,!0,oh);if(!s)return!1;const u=Wa(s.provider,s.prefix);return Jk(u,s.name,n)}function eL(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),oh&&!n&&!e.prefix){let h=!1;return p1(e)&&(e.prefix="",f1(e,(g,m)=>{m&&Qk(g,m)&&(h=!0)})),h}const s=e.prefix;if(!Xd({provider:n,prefix:s,name:"a"}))return!1;const u=Wa(n,s);return!!Yg(u,e)}const tL=Object.freeze({width:null,height:null}),iL=Object.freeze({...tL,..._f});""+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);const ng=Object.create(null);function rL(e,n){ng[e]=n}function og(e){return ng[e]||ng[""]}function Qg(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ey=Object.create(null),Ru=["https://api.simplesvg.com","https://api.unisvg.com"],Kd=[];for(;Ru.length>0;)Ru.length===1||Math.random()>.5?Kd.push(Ru.shift()):Kd.push(Ru.pop());ey[""]=Qg({resources:["https://api.iconify.design"].concat(Kd)});function sg(e,n){const s=Qg(n);return s===null?!1:(ey[e]=s,!0)}function ty(e){return ey[e]}const nL=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let wv=nL();function oL(e,n){const s=ty(e);if(!s)return 0;let u;if(!s.maxURL)u=0;else{let h=0;s.resources.forEach(m=>{h=Math.max(h,m.length)});const g=n+".json?icons=";u=s.maxURL-h-s.path.length-g.length}return u}function sL(e){return e===404}const aL=(e,n,s)=>{const u=[],h=oL(e,n),g="icons";let m={type:g,provider:e,prefix:n,icons:[]},c=0;return s.forEach((I,k)=>{c+=I.length+1,c>=h&&k>0&&(u.push(m),m={type:g,provider:e,prefix:n,icons:[]},c=I.length),m.icons.push(I)}),u.push(m),u};function lL(e){if(typeof e=="string"){const n=ty(e);if(n)return n.path}return"/"}const cL=(e,n,s)=>{if(!wv){s("abort",424);return}let u=lL(n.provider);switch(n.type){case"icons":{const g=n.prefix,c=n.icons.join(","),I=new URLSearchParams({icons:c});u+=g+".json?"+I.toString();break}case"custom":{const g=n.uri;u+=g.slice(0,1)==="/"?g.slice(1):g;break}default:s("abort",400);return}let h=503;wv(e+u).then(g=>{const m=g.status;if(m!==200){setTimeout(()=>{s(sL(m)?"abort":"next",m)});return}return h=501,g.json()}).then(g=>{if(typeof g!="object"||g===null){setTimeout(()=>{g===404?s("abort",g):s("next",h)});return}setTimeout(()=>{s("success",g)})}).catch(()=>{s("next",h)})},uL={prepare:aL,send:cL};function hL(e){const n={loaded:[],missing:[],pending:[]},s=Object.create(null);e.sort((h,g)=>h.provider!==g.provider?h.provider.localeCompare(g.provider):h.prefix!==g.prefix?h.prefix.localeCompare(g.prefix):h.name.localeCompare(g.name));let u={provider:"",prefix:"",name:""};return e.forEach(h=>{if(u.name===h.name&&u.prefix===h.prefix&&u.provider===h.provider)return;u=h;const g=h.provider,m=h.prefix,c=h.name,I=s[g]||(s[g]=Object.create(null)),k=I[m]||(I[m]=Wa(g,m));let M;c in k.icons?M=n.loaded:m===""||k.missing.has(c)?M=n.missing:M=n.pending;const A={provider:g,prefix:m,name:c};M.push(A)}),n}function g1(e,n){e.forEach(s=>{const u=s.loaderCallbacks;u&&(s.loaderCallbacks=u.filter(h=>h.id!==n))})}function dL(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let s=!1;const u=e.provider,h=e.prefix;n.forEach(g=>{const m=g.icons,c=m.pending.length;m.pending=m.pending.filter(I=>{if(I.prefix!==h)return!0;const k=I.name;if(e.icons[k])m.loaded.push({provider:u,prefix:h,name:k});else if(e.missing.has(k))m.missing.push({provider:u,prefix:h,name:k});else return s=!0,!0;return!1}),m.pending.length!==c&&(s||g1([e],g.id),g.callback(m.loaded.slice(0),m.missing.slice(0),m.pending.slice(0),g.abort))})}))}let fL=0;function pL(e,n,s){const u=fL++,h=g1.bind(null,s,u);if(!n.pending.length)return h;const g={id:u,icons:n,callback:e,abort:h};return s.forEach(m=>{(m.loaderCallbacks||(m.loaderCallbacks=[])).push(g)}),h}function mL(e,n=!0,s=!1){const u=[];return e.forEach(h=>{const g=typeof h=="string"?Ff(h,n,s):h;g&&u.push(g)}),u}var gL={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function yL(e,n,s,u){const h=e.resources.length,g=e.random?Math.floor(Math.random()*h):e.index;let m;if(e.random){let ee=e.resources.slice(0);for(m=[];ee.length>1;){const Se=Math.floor(Math.random()*ee.length);m.push(ee[Se]),ee=ee.slice(0,Se).concat(ee.slice(Se+1))}m=m.concat(ee)}else m=e.resources.slice(g).concat(e.resources.slice(0,g));const c=Date.now();let I="pending",k=0,M,A=null,z=[],q=[];typeof u=="function"&&q.push(u);function K(){A&&(clearTimeout(A),A=null)}function J(){I==="pending"&&(I="aborted"),K(),z.forEach(ee=>{ee.status==="pending"&&(ee.status="aborted")}),z=[]}function se(ee,Se){Se&&(q=[]),typeof ee=="function"&&q.push(ee)}function ke(){return{startTime:c,payload:n,status:I,queriesSent:k,queriesPending:z.length,subscribe:se,abort:J}}function ye(){I="failed",q.forEach(ee=>{ee(void 0,M)})}function Z(){z.forEach(ee=>{ee.status==="pending"&&(ee.status="aborted")}),z=[]}function fe(ee,Se,Ee){const Le=Se!=="success";switch(z=z.filter(pe=>pe!==ee),I){case"pending":break;case"failed":if(Le||!e.dataAfterTimeout)return;break;default:return}if(Se==="abort"){M=Ee,ye();return}if(Le){M=Ee,z.length||(m.length?W():ye());return}if(K(),Z(),!e.random){const pe=e.resources.indexOf(ee.resource);pe!==-1&&pe!==e.index&&(e.index=pe)}I="completed",q.forEach(pe=>{pe(Ee)})}function W(){if(I!=="pending")return;K();const ee=m.shift();if(ee===void 0){if(z.length){A=setTimeout(()=>{K(),I==="pending"&&(Z(),ye())},e.timeout);return}ye();return}const Se={status:"pending",resource:ee,callback:(Ee,Le)=>{fe(Se,Ee,Le)}};z.push(Se),k++,A=setTimeout(W,e.rotate),s(ee,n,Se.callback)}return setTimeout(W),ke}function y1(e){const n={...gL,...e};let s=[];function u(){s=s.filter(c=>c().status==="pending")}function h(c,I,k){const M=yL(n,c,I,(A,z)=>{u(),k&&k(A,z)});return s.push(M),M}function g(c){return s.find(I=>c(I))||null}return{query:h,find:g,setIndex:c=>{n.index=c},getIndex:()=>n.index,cleanup:u}}function Ev(){}const gm=Object.create(null);function _L(e){if(!gm[e]){const n=ty(e);if(!n)return;const s=y1(n),u={config:n,redundancy:s};gm[e]=u}return gm[e]}function vL(e,n,s){let u,h;if(typeof e=="string"){const g=og(e);if(!g)return s(void 0,424),Ev;h=g.send;const m=_L(e);m&&(u=m.redundancy)}else{const g=Qg(e);if(g){u=y1(g);const m=e.resources?e.resources[0]:"",c=og(m);c&&(h=c.send)}}return!u||!h?(s(void 0,424),Ev):u.query(n,h,s)().abort}const Sv="iconify2",sh="iconify",_1=sh+"-count",Iv=sh+"-version",v1=36e5,xL=168,bL=50;function ag(e,n){try{return e.getItem(n)}catch{}}function iy(e,n,s){try{return e.setItem(n,s),!0}catch{}}function Tv(e,n){try{e.removeItem(n)}catch{}}function lg(e,n){return iy(e,_1,n.toString())}function cg(e){return parseInt(ag(e,_1))||0}const Vf={local:!0,session:!0},x1={local:new Set,session:new Set};let ry=!1;function wL(e){ry=e}let Bd=typeof window>"u"?{}:window;function b1(e){const n=e+"Storage";try{if(Bd&&Bd[n]&&typeof Bd[n].length=="number")return Bd[n]}catch{}Vf[e]=!1}function w1(e,n){const s=b1(e);if(!s)return;const u=ag(s,Iv);if(u!==Sv){if(u){const c=cg(s);for(let I=0;I{const I=sh+c.toString(),k=ag(s,I);if(typeof k=="string"){try{const M=JSON.parse(k);if(typeof M=="object"&&typeof M.cached=="number"&&M.cached>h&&typeof M.provider=="string"&&typeof M.data=="object"&&typeof M.data.prefix=="string"&&n(M,c))return!0}catch{}Tv(s,I)}};let m=cg(s);for(let c=m-1;c>=0;c--)g(c)||(c===m-1?(m--,lg(s,m)):x1[e].add(c))}function E1(){if(!ry){wL(!0);for(const e in Vf)w1(e,n=>{const s=n.data,u=n.provider,h=s.prefix,g=Wa(u,h);if(!Yg(g,s).length)return!1;const m=s.lastModified||-1;return g.lastModifiedCached=g.lastModifiedCached?Math.min(g.lastModifiedCached,m):m,!0})}}function EL(e,n){const s=e.lastModifiedCached;if(s&&s>=n)return s===n;if(e.lastModifiedCached=n,s)for(const u in Vf)w1(u,h=>{const g=h.data;return h.provider!==e.provider||g.prefix!==e.prefix||g.lastModified===n});return!0}function SL(e,n){ry||E1();function s(u){let h;if(!Vf[u]||!(h=b1(u)))return;const g=x1[u];let m;if(g.size)g.delete(m=Array.from(g).shift());else if(m=cg(h),m>=bL||!lg(h,m+1))return;const c={cached:Math.floor(Date.now()/v1),provider:e.provider,data:n};return iy(h,sh+m.toString(),JSON.stringify(c))}n.lastModified&&!EL(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&(n=Object.assign({},n),delete n.not_found),s("local")||s("session"))}function Cv(){}function IL(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,dL(e)}))}function TL(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:s,prefix:u}=e,h=e.iconsToLoad;delete e.iconsToLoad;let g;if(!h||!(g=og(s)))return;g.prepare(s,u,h).forEach(c=>{vL(s,c,I=>{if(typeof I!="object")c.icons.forEach(k=>{e.missing.add(k)});else try{const k=Yg(e,I);if(!k.length)return;const M=e.pendingIcons;M&&k.forEach(A=>{M.delete(A)}),SL(e,I)}catch(k){console.error(k)}IL(e)})})}))}const CL=(e,n)=>{const s=mL(e,!0,m1()),u=hL(s);if(!u.pending.length){let I=!0;return n&&setTimeout(()=>{I&&n(u.loaded,u.missing,u.pending,Cv)}),()=>{I=!1}}const h=Object.create(null),g=[];let m,c;return u.pending.forEach(I=>{const{provider:k,prefix:M}=I;if(M===c&&k===m)return;m=k,c=M,g.push(Wa(k,M));const A=h[k]||(h[k]=Object.create(null));A[M]||(A[M]=[])}),u.pending.forEach(I=>{const{provider:k,prefix:M,name:A}=I,z=Wa(k,M),q=z.pendingIcons||(z.pendingIcons=new Set);q.has(A)||(q.add(A),h[k][M].push(A))}),g.forEach(I=>{const{provider:k,prefix:M}=I;h[k][M].length&&TL(I,h[k][M])}),n?pL(n,u,g):Cv},AL=e=>new Promise((n,s)=>{const u=typeof e=="string"?Ff(e,!0):e;if(!u){s(e);return}CL([u||e],h=>{if(h.length&&u){const g=Yk(u);if(g){n({...Jg,...g});return}}s(e)})});({...iL});const Av={backgroundColor:"currentColor"},ML={backgroundColor:"transparent"},Mv={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},kv={webkitMask:Av,mask:Av,background:ML};for(const e in kv){const n=kv[e];for(const s in Mv)n[e+s]=Mv[s]}const ym={};["horizontal","vertical"].forEach(e=>{const n=e.slice(0,1)+"Flip";ym[e+"-flip"]=n,ym[e.slice(0,1)+"-flip"]=n,ym[e+"Flip"]=n});m1(!0);rL("",uL);if(typeof document<"u"&&typeof window<"u"){E1();const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,s="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(u=>{try{(typeof u!="object"||u===null||u instanceof Array||typeof u.icons!="object"||typeof u.prefix!="string"||!eL(u))&&console.error(s)}catch{console.error(s)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let s in n){const u="IconifyProviders["+s+"] is invalid.";try{const h=n[s];if(typeof h!="object"||!h||h.resources===void 0)continue;sg(s,h)||console.error(u)}catch{console.error(u)}}}}({...Jg});const kL=["fluent-emoji-high-contrast","material-symbols-light","cryptocurrency-color","icon-park-outline","icon-park-twotone","fluent-emoji-flat","emojione-monotone","streamline-emojis","heroicons-outline","simple-line-icons","material-symbols","flat-color-icons","icon-park-solid","pepicons-pencil","heroicons-solid","pepicons-print","cryptocurrency","pixelarticons","system-uicons","bitcoin-icons","devicon-plain","entypo-social","token-branded","grommet-icons","vscode-icons","pepicons-pop","svg-spinners","fluent-emoji","simple-icons","circle-flags","medical-icon","icomoon-free","majesticons","radix-icons","humbleicons","fa6-regular","emojione-v1","skill-icons","academicons","healthicons","fluent-mdl2","teenyicons","ant-design","gravity-ui","akar-icons","lets-icons","streamline","fa6-brands","file-icons","game-icons","foundation","fa-regular","mono-icons","hugeicons","iconamoon","zondicons","mdi-light","eos-icons","gridicons","icon-park","heroicons","fa6-solid","meteocons","arcticons","dashicons","fa-brands","websymbol","fontelico","mingcute","flowbite","marketeq","bytesize","guidance","openmoji","emojione","nonicons","brandico","flagpack","fa-solid","fontisto","si-glyph","pepicons","iconoir","tdesign","clarity","octicon","codicon","pajamas","formkit","line-md","twemoji","noto-v1","fxemoji","devicon","raphael","flat-ui","topcoat","feather","tabler","carbon","lucide","memory","mynaui","circum","fluent","nimbus","entypo","icons8","subway","vaadin","solar","basil","typcn","charm","prime","quill","logos","token","covid","maki","gala","mage","ooui","noto","unjs","flag","iwwa","zmdi","bpmn","mdi","ion","uil","bxs","cil","uiw","uim","uit","uis","jam","oui","bxl","cib","cbi","cif","gis","map","geo","fad","eva","wpf","whh","ic","ph","ri","bi","bx","gg","ci","ep","fe","mi","f7","ei","wi","la","fa","oi","et","el","ls","vs","il","ps"];function LL(e=""){let n,s="";if(e[0]==="@"&&e.includes(":")&&(s=e.split(":")[0].slice(1),e=e.split(":").slice(1).join(":")),e.startsWith("i-")){e=e.replace(/^i-/,"");for(const u of kL)if(e.startsWith(u)){n=u,e=e.slice(u.length+1);break}}else if(e.includes(":")){const[u,h]=e.split(":");n=u,e=h}return{provider:s,prefix:n||"",name:e||""}}const PL=Ui({__name:"Icon",props:{name:{type:String,required:!0},size:{type:String,default:""}},async setup(e){let n,s;const u=Zi(),h=Of(),g=e;er(()=>{var se;return(se=h.nuxtIcon)==null?void 0:se.iconifyApiOptions},()=>{var se,ke,ye,Z,fe,W;if((ke=(se=h.nuxtIcon)==null?void 0:se.iconifyApiOptions)!=null&&ke.url){try{new URL(h.nuxtIcon.iconifyApiOptions.url)}catch{console.warn("Nuxt Icon: Invalid custom Iconify API URL");return}if((Z=(ye=h.nuxtIcon)==null?void 0:ye.iconifyApiOptions)!=null&&Z.publicApiFallback){sg("custom",{resources:[(fe=h.nuxtIcon)==null?void 0:fe.iconifyApiOptions.url],index:0});return}sg("",{resources:[(W=h.nuxtIcon)==null?void 0:W.iconifyApiOptions.url]})}},{immediate:!0});const m=Zg("icons",()=>({})),c=Lt(!1),I=je(()=>{var se,ke;return(ke=(se=h.nuxtIcon)==null?void 0:se.aliases)!=null&&ke[g.name]?h.nuxtIcon.aliases[g.name]:g.name}),k=je(()=>LL(I.value)),M=je(()=>[k.value.provider,k.value.prefix,k.value.name].filter(Boolean).join(":")),A=je(()=>{var se;return(se=m.value)==null?void 0:se[M.value]}),z=je(()=>{var se;return(se=u.vueApp)==null?void 0:se.component(I.value)}),q=je(()=>{var ke,ye,Z;if(!g.size&&typeof((ke=h.nuxtIcon)==null?void 0:ke.size)=="boolean"&&!((ye=h.nuxtIcon)!=null&&ye.size))return;const se=g.size||((Z=h.nuxtIcon)==null?void 0:Z.size)||"1em";return String(Number(se))===se?`${se}px`:se}),K=je(()=>{var se;return((se=h==null?void 0:h.nuxtIcon)==null?void 0:se.class)??"icon"});async function J(){var se;z.value||(se=m.value)!=null&&se[M.value]||(c.value=!0,m.value[M.value]=await AL(k.value).catch(()=>{}),c.value=!1)}return er(I,J),!z.value&&([n,s]=NS(()=>J()),n=await n,s()),(se,ke)=>c.value?(At(),wi("span",{key:0,class:Zt(K.value),style:Ha({width:q.value,height:q.value})},null,6)):A.value?(At(),ki(ii(Hk),{key:1,icon:A.value,class:Zt(K.value),width:q.value,height:q.value},null,8,["icon","class","width","height"])):z.value?(At(),ki(cs(z.value),{key:2,class:Zt(K.value),width:q.value,height:q.value},null,8,["class","width","height"])):(At(),wi("span",{key:3,class:Zt(K.value),style:Ha({fontSize:q.value,lineHeight:q.value,width:q.value,height:q.value})},[br(se.$slots,"default",{},()=>[hs(nn(e.name),1)],!0)],6))}}),S1=yo(PL,[["__scopeId","data-v-e8d572f6"]]),zL=Object.freeze(Object.defineProperty({__proto__:null,default:S1},Symbol.toStringTag,{value:"Module"})),DL=Ui({props:{name:{type:String,required:!0},dynamic:{type:Boolean,default:!1}},setup(e){const n=Of();return{dynamic:je(()=>{var u,h;return e.dynamic||((h=(u=n.ui)==null?void 0:u.icons)==null?void 0:h.dynamic)})}}});function RL(e,n,s,u,h,g){const m=S1;return e.dynamic?(At(),ki(m,{key:0,name:e.name},null,8,["name"])):(At(),wi("span",{key:1,class:Zt(e.name)},null,2))}const na=yo(DL,[["render",RL]]),OL=Ui({inheritAttrs:!1,props:{...Wg,as:{type:String,default:"button"},type:{type:String,default:"button"},disabled:{type:Boolean,default:null},active:{type:Boolean,default:void 0},exact:{type:Boolean,default:!1},exactQuery:{type:Boolean,default:!1},exactHash:{type:Boolean,default:!1},inactiveClass:{type:String,default:void 0}},setup(e){function n(s,u,{isActive:h,isExactActive:g}){return e.exactQuery&&!hC(s.query,u.query)||e.exactHash&&s.hash!==u.hash?e.inactiveClass:e.exact&&g||!e.exact&&h?e.activeClass:e.inactiveClass}return{resolveLinkClass:n}}}),BL=["href","aria-disabled","role","rel","target","onClick"];function FL(e,n,s,u,h,g){const m=n1;return e.to?(At(),ki(m,fo({key:1},e.$props,{custom:""}),{default:Rr(({route:c,href:I,target:k,rel:M,navigate:A,isActive:z,isExactActive:q,isExternal:K})=>[lr("a",fo(e.$attrs,{href:e.disabled?void 0:I,"aria-disabled":e.disabled?"true":void 0,role:e.disabled?"link":void 0,rel:M,target:k,class:e.active!==void 0?e.active?e.activeClass:e.inactiveClass:e.resolveLinkClass(c,e.$route,{isActive:z,isExactActive:q}),onClick:J=>!K&&!e.disabled&&A(J)}),[br(e.$slots,"default",Em(af({isActive:e.active!==void 0?e.active:e.exact?q:z})))],16,BL)]),_:3},16)):(At(),ki(cs(e.as),fo({key:0,type:e.type,disabled:e.disabled},e.$attrs,{class:e.active?e.activeClass:e.inactiveClass}),{default:Rr(()=>[br(e.$slots,"default",Em(af({isActive:e.active})))]),_:3},16,["type","disabled","class"]))}const I1=yo(OL,[["render",FL]]),os=Ya(tr.ui.strategy,tr.ui.button,yk),VL=Ui({components:{UIcon:na,ULink:I1},inheritAttrs:!1,props:{...Wg,type:{type:String,default:"button"},block:{type:Boolean,default:!1},label:{type:String,default:null},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},padded:{type:Boolean,default:!0},size:{type:String,default:()=>os.default.size,validator(e){return Object.keys(os.size).includes(e)}},color:{type:String,default:()=>os.default.color,validator(e){return[...tr.ui.colors,...Object.keys(os.color)].includes(e)}},variant:{type:String,default:()=>os.default.variant,validator(e){return[...Object.keys(os.variant),...Object.values(os.color).flatMap(n=>Object.keys(n))].includes(e)}},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>os.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:null},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},square:{type:Boolean,default:!1},truncate:{type:Boolean,default:!1},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(e,{slots:n}){const{ui:s,attrs:u}=fc("button",zo(e,"ui"),os),{size:h,rounded:g}=Bf({ui:s,props:e}),m=je(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),c=je(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),I=je(()=>e.square||!n.default&&!e.label),k=je(()=>{var se,ke;const J=((ke=(se=s.value.color)==null?void 0:se[e.color])==null?void 0:ke[e.variant])||s.value.variant[e.variant];return dc(Er(s.value.base,s.value.font,g.value,s.value.size[h.value],s.value.gap[h.value],e.padded&&s.value[I.value?"square":"padding"][h.value],J==null?void 0:J.replaceAll("{color}",e.color),e.block?s.value.block:s.value.inline),e.class)}),M=je(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),A=je(()=>e.loading&&!m.value?e.loadingIcon:e.trailingIcon||e.icon),z=je(()=>Er(s.value.icon.base,s.value.icon.size[h.value],e.loading&&s.value.icon.loading)),q=je(()=>Er(s.value.icon.base,s.value.icon.size[h.value],e.loading&&!m.value&&s.value.icon.loading)),K=je(()=>SM(e));return{ui:s,attrs:u,isLeading:m,isTrailing:c,isSquare:I,buttonClass:k,leadingIconName:M,trailingIconName:A,leadingIconClass:z,trailingIconClass:q,linkProps:K}}});function NL(e,n,s,u,h,g){const m=na,c=I1;return At(),ki(c,fo({type:e.type,disabled:e.disabled||e.loading,class:e.buttonClass},{...e.linkProps,...e.attrs}),{default:Rr(()=>[br(e.$slots,"leading",{disabled:e.disabled,loading:e.loading},()=>[e.isLeading&&e.leadingIconName?(At(),ki(m,{key:0,name:e.leadingIconName,class:Zt(e.leadingIconClass),"aria-hidden":"true"},null,8,["name","class"])):xr("",!0)]),br(e.$slots,"default",{},()=>[e.label?(At(),wi("span",{key:0,class:Zt([e.truncate?e.ui.truncate:""])},nn(e.label),3)):xr("",!0)]),br(e.$slots,"trailing",{disabled:e.disabled,loading:e.loading},()=>[e.isTrailing&&e.trailingIconName?(At(),ki(m,{key:0,name:e.trailingIconName,class:Zt(e.trailingIconClass),"aria-hidden":"true"},null,8,["name","class"])):xr("",!0)])]),_:3},16,["type","disabled","class"])}const T1=yo(VL,[["render",NL]]),C1=()=>Zg("color-mode").value,A1=e=>(Lx("data-v-82e603f3"),e=e(),Px(),e),jL={class:"px-4 flex items-center border-b border-gray-200 dark:border-gray-800"},$L={class:"app-logo flex items-center"},UL=A1(()=>lr("h1",null,"japanmesh",-1)),qL=A1(()=>lr("div",{class:"grow"},null,-1)),HL=Ui({__name:"AppHeader",setup(e){const n=C1(),s=Lt(""),u=je(()=>n.preference==="light"?"i-heroicons-sun":"i-heroicons-moon-16-solid");function h(){n.preference=n.preference==="light"?"dark":"light"}return an(()=>{fetch("https://api.github.com/repos/qazsato/japanmesh/releases/latest").then(m=>m.json()).then(m=>{s.value=m.tag_name})}),(g,m)=>{const c=n1,I=s1,k=T1;return At(),wi("header",jL,[lr("div",$L,[ri(c,{to:"/"},{default:Rr(()=>[UL]),_:1}),ii(s)?(At(),ki(I,{key:0,label:ii(s),variant:"outline",color:"primary",size:"xs",class:"mx-2"},null,8,["label"])):xr("",!0)]),qL,ri(k,{icon:ii(u),size:"sm",color:"gray",square:"",variant:"ghost",onClick:h,class:"mx-1"},null,8,["icon"]),ri(k,{icon:"i-simple-icons-npm",size:"sm",color:"gray",square:"",variant:"ghost",to:"https://www.npmjs.com/package/japanmesh",target:"_blank",class:"mx-1"}),ri(k,{icon:"i-simple-icons-github",size:"sm",color:"gray",square:"",variant:"ghost",to:"https://github.com/qazsato/geo-docs",target:"_blank",class:"mx-1"})])}}}),GL=yo(HL,[["__scopeId","data-v-82e603f3"]]),M1=(e,n)=>{const s=Hr("form-events",void 0),u=Hr("form-group",void 0),h=Hr("form-inputs",void 0);u&&(e!=null&&e.id&&(u.inputId.value=e==null?void 0:e.id),h&&(h.value[u.name.value]=u.inputId.value));const g=Lt(!1);function m(M,A){s&&s.emit({type:M,path:A})}function c(){m("blur",u==null?void 0:u.name.value),g.value=!0}function I(){m("change",u==null?void 0:u.name.value)}const k=Kb(()=>{(g.value||u!=null&&u.eagerValidation.value)&&m("input",u==null?void 0:u.name.value)},300);return{inputId:je(()=>(e==null?void 0:e.id)??(u==null?void 0:u.inputId.value)),name:je(()=>(e==null?void 0:e.name)??(u==null?void 0:u.name.value)),size:je(()=>{var A;const M=n.size[u==null?void 0:u.size.value]?u==null?void 0:u.size.value:null;return(e==null?void 0:e.size)??M??((A=n==null?void 0:n.default)==null?void 0:A.size)}),color:je(()=>{var M;return(M=u==null?void 0:u.error)!=null&&M.value?"red":e==null?void 0:e.color}),emitFormBlur:c,emitFormInput:k,emitFormChange:I}},ss=Ya(tr.ui.strategy,tr.ui.input,Xg),WL=Ui({components:{UIcon:na},inheritAttrs:!1,props:{modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},id:{type:String,default:null},name:{type:String,default:null},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},autofocusDelay:{type:Number,default:100},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>ss.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:null},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},padded:{type:Boolean,default:!0},size:{type:String,default:null,validator(e){return Object.keys(ss.size).includes(e)}},color:{type:String,default:()=>ss.default.color,validator(e){return[...tr.ui.colors,...Object.keys(ss.color)].includes(e)}},variant:{type:String,default:()=>ss.default.variant,validator(e){return[...Object.keys(ss.variant),...Object.values(ss.color).flatMap(n=>Object.keys(n))].includes(e)}},inputClass:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},modelModifiers:{type:Object,default:()=>({})}},emits:["update:modelValue","blur","change"],setup(e,{emit:n,slots:s}){const{ui:u,attrs:h}=fc("input",zo(e,"ui"),ss,zo(e,"class")),{size:g,rounded:m}=Bf({ui:u,props:e}),{emitFormBlur:c,emitFormInput:I,size:k,color:M,inputId:A,name:z}=M1(e,ss),q=je(()=>g.value||k.value),K=Lt(Df({},e.modelModifiers,{trim:!1,lazy:!1,number:!1})),J=Lt(null),se=()=>{var Ge;e.autofocus&&((Ge=J.value)==null||Ge.focus())},ke=Ge=>{K.value.trim&&(Ge=Ge.trim()),(K.value.number||e.type==="number")&&(Ge=CM(Ge)),n("update:modelValue",Ge),I()},ye=Ge=>{K.value.lazy||ke(Ge.target.value)},Z=Ge=>{if(e.type==="file"){const rt=Ge.target.files;n("change",rt)}else{const rt=Ge.target.value;n("change",rt),K.value.lazy&&ke(rt),K.value.trim&&(Ge.target.value=rt.trim())}},fe=Ge=>{c(),n("blur",Ge)};an(()=>{setTimeout(()=>{se()},e.autofocusDelay)});const W=je(()=>{var rt,Xe;const Ge=((Xe=(rt=u.value.color)==null?void 0:rt[M.value])==null?void 0:Xe[e.variant])||u.value.variant[e.variant];return dc(Er(u.value.base,u.value.form,m.value,u.value.placeholder,e.type==="file"&&u.value.file.base,u.value.size[q.value],e.padded?u.value.padding[q.value]:"p-0",Ge==null?void 0:Ge.replaceAll("{color}",M.value),(ee.value||s.leading)&&u.value.leading.padding[q.value],(Se.value||s.trailing)&&u.value.trailing.padding[q.value]),e.inputClass)}),ee=je(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),Se=je(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),Ee=je(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),Le=je(()=>e.loading&&!ee.value?e.loadingIcon:e.trailingIcon||e.icon),pe=je(()=>Er(u.value.icon.leading.wrapper,u.value.icon.leading.pointer,u.value.icon.leading.padding[q.value])),Ie=je(()=>Er(u.value.icon.base,M.value&&tr.ui.colors.includes(M.value)&&u.value.icon.color.replaceAll("{color}",M.value),u.value.icon.size[q.value],e.loading&&u.value.icon.loading)),Ae=je(()=>Er(u.value.icon.trailing.wrapper,u.value.icon.trailing.pointer,u.value.icon.trailing.padding[q.value])),De=je(()=>Er(u.value.icon.base,M.value&&tr.ui.colors.includes(M.value)&&u.value.icon.color.replaceAll("{color}",M.value),u.value.icon.size[q.value],e.loading&&!ee.value&&u.value.icon.loading));return{ui:u,attrs:h,name:z,inputId:A,input:J,isLeading:ee,isTrailing:Se,inputClass:W,leadingIconName:Ee,leadingIconClass:Ie,leadingWrapperIconClass:pe,trailingIconName:Le,trailingIconClass:De,trailingWrapperIconClass:Ae,onInput:ye,onChange:Z,onBlur:fe}}}),ZL=["id","name","value","type","required","placeholder","disabled"];function XL(e,n,s,u,h,g){const m=na;return At(),wi("div",{class:Zt(e.type==="hidden"?"hidden":e.ui.wrapper)},[lr("input",fo({id:e.inputId,ref:"input",name:e.name,value:e.modelValue,type:e.type,required:e.required,placeholder:e.placeholder,disabled:e.disabled,class:e.inputClass},e.attrs,{onInput:n[0]||(n[0]=(...c)=>e.onInput&&e.onInput(...c)),onBlur:n[1]||(n[1]=(...c)=>e.onBlur&&e.onBlur(...c)),onChange:n[2]||(n[2]=(...c)=>e.onChange&&e.onChange(...c))}),null,16,ZL),br(e.$slots,"default"),e.isLeading&&e.leadingIconName||e.$slots.leading?(At(),wi("span",{key:0,class:Zt(e.leadingWrapperIconClass)},[br(e.$slots,"leading",{disabled:e.disabled,loading:e.loading},()=>[ri(m,{name:e.leadingIconName,class:Zt(e.leadingIconClass)},null,8,["name","class"])])],2)):xr("",!0),e.isTrailing&&e.trailingIconName||e.$slots.trailing?(At(),wi("span",{key:1,class:Zt(e.trailingWrapperIconClass)},[br(e.$slots,"trailing",{disabled:e.disabled,loading:e.loading},()=>[ri(m,{name:e.trailingIconName,class:Zt(e.trailingIconClass)},null,8,["name","class"])])],2)):xr("",!0)],2)}const KL=yo(WL,[["render",XL]]),Ba=Ya(tr.ui.strategy,tr.ui.avatar,mk),JL=Ui({components:{UIcon:na},inheritAttrs:!1,props:{as:{type:[String,Object],default:"img"},src:{type:[String,Boolean],default:null},alt:{type:String,default:null},text:{type:String,default:null},icon:{type:String,default:()=>Ba.default.icon},size:{type:String,default:()=>Ba.default.size,validator(e){return Object.keys(Ba.size).includes(e)}},chipColor:{type:String,default:()=>Ba.default.chipColor,validator(e){return["gray",...tr.ui.colors].includes(e)}},chipPosition:{type:String,default:()=>Ba.default.chipPosition,validator(e){return Object.keys(Ba.chip.position).includes(e)}},chipText:{type:[String,Number],default:null},imgClass:{type:String,default:""},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(e){const{ui:n,attrs:s}=fc("avatar",zo(e,"ui"),Ba),u=je(()=>typeof e.src=="boolean"?null:e.src),h=je(()=>(e.alt||"").split(" ").map(A=>A.charAt(0)).join("").substring(0,2)),g=je(()=>dc(Er(n.value.wrapper,(k.value||!u.value)&&n.value.background,n.value.rounded,n.value.size[e.size]),e.class)),m=je(()=>dc(Er(n.value.rounded,n.value.size[e.size]),e.imgClass)),c=je(()=>Er(n.value.icon.base,n.value.icon.size[e.size])),I=je(()=>Er(n.value.chip.base,n.value.chip.size[e.size],n.value.chip.position[e.chipPosition],n.value.chip.background.replaceAll("{color}",e.chipColor))),k=Lt(!1);er(()=>e.src,()=>{k.value&&(k.value=!1)});function M(){k.value=!0}return{ui:n,attrs:s,wrapperClass:g,imgClass:m,iconClass:c,chipClass:I,url:u,placeholder:h,error:k,onError:M}}});function YL(e,n,s,u,h,g){const m=na;return At(),wi("span",{class:Zt(e.wrapperClass)},[e.url&&!e.error?(At(),ki(cs(e.as),fo({key:0,class:e.imgClass,alt:e.alt,src:e.url},e.attrs,{onError:e.onError}),null,16,["class","alt","src","onError"])):e.text?(At(),wi("span",{key:1,class:Zt(e.ui.text)},nn(e.text),3)):e.icon?(At(),ki(m,{key:2,name:e.icon,class:Zt(e.iconClass)},null,8,["name","class"])):e.placeholder?(At(),wi("span",{key:3,class:Zt(e.ui.placeholder)},nn(e.placeholder),3)):xr("",!0),e.chipColor?(At(),wi("span",{key:4,class:Zt(e.chipClass)},nn(e.chipText),3)):xr("",!0),br(e.$slots,"default")],2)}const k1=yo(JL,[["render",YL]]),QL=Symbol.for("nuxt:client-only"),eP="data-n-ids",tP="-";function iP(e){var h,g,m,c,I,k;if(typeof e!="string")throw new TypeError("[nuxt] [useId] key must be a string.");e=`n${e.slice(1)}`;const n=Zi(),s=ia();if(!s)throw new TypeError("[nuxt] `useId` must be called within a component setup function.");n._id||(n._id=0),s._nuxtIdIndex||(s._nuxtIdIndex={}),(h=s._nuxtIdIndex)[e]||(h[e]=0);const u=e+tP+s._nuxtIdIndex[e]++;if(n.payload.serverRendered&&n.isHydrating&&!Hr(QL,!1)){const M=((g=s.vnode.el)==null?void 0:g.nodeType)===8&&((c=(m=s.vnode.el)==null?void 0:m.nextElementSibling)!=null&&c.getAttribute)?(I=s.vnode.el)==null?void 0:I.nextElementSibling:s.vnode.el,A=JSON.parse(((k=M==null?void 0:M.getAttribute)==null?void 0:k.call(M,eP))||"{}");if(A[u])return A[u]}return e+"_"+n._id++}function Ou(e,n,s){let u=s.initialDeps??[],h;return()=>{var g,m,c,I;let k;s.key&&((g=s.debug)!=null&&g.call(s))&&(k=Date.now());const M=e();if(!(M.length!==u.length||M.some((q,K)=>u[K]!==q)))return h;u=M;let z;if(s.key&&((m=s.debug)!=null&&m.call(s))&&(z=Date.now()),h=n(...M),s.key&&((c=s.debug)!=null&&c.call(s))){const q=Math.round((Date.now()-k)*100)/100,K=Math.round((Date.now()-z)*100)/100,J=K/16,se=(ke,ye)=>{for(ke=String(ke);ke.lengthMath.abs(e-n)<1,nP=(e,n,s)=>{let u;return function(...h){e.clearTimeout(u),u=e.setTimeout(()=>n.apply(this,h),s)}},oP=e=>e,sP=e=>{const n=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1),u=[];for(let h=n;h<=s;h++)u.push(h);return u},aP=(e,n)=>{const s=e.scrollElement;if(!s)return;const u=e.targetWindow;if(!u)return;const h=m=>{const{width:c,height:I}=m;n({width:Math.round(c),height:Math.round(I)})};if(h(s.getBoundingClientRect()),!u.ResizeObserver)return()=>{};const g=new u.ResizeObserver(m=>{const c=m[0];if(c!=null&&c.borderBoxSize){const I=c.borderBoxSize[0];if(I){h({width:I.inlineSize,height:I.blockSize});return}}h(s.getBoundingClientRect())});return g.observe(s,{box:"border-box"}),()=>{g.unobserve(s)}},Lv={passive:!0},lP=typeof window>"u"?!0:"onscrollend"in window,cP=(e,n)=>{const s=e.scrollElement;if(!s)return;const u=e.targetWindow;if(!u)return;let h=0;const g=lP?()=>{}:nP(u,()=>{n(h,!1)},e.options.isScrollingResetDelay),m=k=>()=>{h=s[e.options.horizontal?"scrollLeft":"scrollTop"],g(),n(h,k)},c=m(!0),I=m(!1);return I(),s.addEventListener("scroll",c,Lv),s.addEventListener("scrollend",I,Lv),()=>{s.removeEventListener("scroll",c),s.removeEventListener("scrollend",I)}},uP=(e,n,s)=>{if(n!=null&&n.borderBoxSize){const u=n.borderBoxSize[0];if(u)return Math.round(u[s.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[s.options.horizontal?"width":"height"])},hP=(e,{adjustments:n=0,behavior:s},u)=>{var h,g;const m=e+n;(g=(h=u.scrollElement)==null?void 0:h.scrollTo)==null||g.call(h,{[u.options.horizontal?"left":"top"]:m,behavior:s})};class dP{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let s=null;const u=()=>s||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:s=new this.targetWindow.ResizeObserver(h=>{h.forEach(g=>{this._measureElement(g.target,g)})}));return{disconnect:()=>{var h;return(h=u())==null?void 0:h.disconnect()},observe:h=>{var g;return(g=u())==null?void 0:g.observe(h,{box:"border-box"})},unobserve:h=>{var g;return(g=u())==null?void 0:g.unobserve(h)}}})(),this.range=null,this.setOptions=s=>{Object.entries(s).forEach(([u,h])=>{typeof h>"u"&&delete s[u]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:oP,rangeExtractor:sP,onChange:()=>{},measureElement:uP,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,...s}},this.notify=(s,u)=>{var h,g;const{startIndex:m,endIndex:c}=this.range??{startIndex:void 0,endIndex:void 0},I=this.calculateRange();(s||m!==(I==null?void 0:I.startIndex)||c!==(I==null?void 0:I.endIndex))&&((g=(h=this.options).onChange)==null||g.call(h,this,u))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(s=>s()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{var s;const u=this.options.getScrollElement();this.scrollElement!==u&&(this.cleanup(),this.scrollElement=u,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((s=this.scrollElement)==null?void 0:s.window)??null,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,h=>{this.scrollRect=h,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(h,g)=>{this.scrollAdjustments=0,this.scrollDirection=g?this.scrollOffsetthis.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurementOptions=Ou(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(s,u,h,g)=>(this.pendingMeasuredCacheIndexes=[],{count:s,paddingStart:u,scrollMargin:h,getItemKey:g}),{key:!1}),this.getFurthestMeasurement=(s,u)=>{const h=new Map,g=new Map;for(let m=u-1;m>=0;m--){const c=s[m];if(h.has(c.lane))continue;const I=g.get(c.lane);if(I==null||c.end>I.end?g.set(c.lane,c):c.endm.end===c.end?m.index-c.index:m.end-c.end)[0]:void 0},this.getMeasurements=Ou(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:s,paddingStart:u,scrollMargin:h,getItemKey:g},m)=>{const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const I=this.measurementsCache.slice(0,c);for(let k=c;kthis.options.debug}),this.calculateRange=Ou(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(s,u,h)=>this.range=s.length>0&&u>0?fP({measurements:s,outerSize:u,scrollOffset:h}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Ou(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(s,u,h,g)=>u===null?[]:s({startIndex:u.startIndex,endIndex:u.endIndex,overscan:h,count:g}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=s=>{const u=this.options.indexAttribute,h=s.getAttribute(u);return h?parseInt(h,10):(console.warn(`Missing attribute name '${u}={index}' on measured element.`),-1)},this._measureElement=(s,u)=>{const h=this.measurementsCache[this.indexFromElement(s)];if(!h||!s.isConnected){this.measureElementCache.forEach((c,I)=>{c===s&&(this.observer.unobserve(s),this.measureElementCache.delete(I))});return}const g=this.measureElementCache.get(h.key);g!==s&&(g&&this.observer.unobserve(g),this.observer.observe(s),this.measureElementCache.set(h.key,s));const m=this.options.measureElement(s,u,this);this.resizeItem(h,m)},this.resizeItem=(s,u)=>{const h=this.itemSizeCache.get(s.key)??s.size,g=u-h;g!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,g,this):s.start{s&&this._measureElement(s,void 0)},this.getVirtualItems=Ou(()=>[this.getIndexes(),this.getMeasurements()],(s,u)=>{const h=[];for(let g=0,m=s.length;gthis.options.debug}),this.getVirtualItemForOffset=s=>{const u=this.getMeasurements();return _m(u[L1(0,u.length-1,h=>_m(u[h]).start,s)])},this.getOffsetForAlignment=(s,u)=>{const h=this.getSize();u==="auto"&&(s<=this.scrollOffset?u="start":s>=this.scrollOffset+h?u="end":u="start"),u==="start"?s=s:u==="end"?s=s-h:u==="center"&&(s=s-h/2);const g=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[g]:this.scrollElement[g]:0)-this.getSize();return Math.max(Math.min(c,s),0)},this.getOffsetForIndex=(s,u="auto")=>{s=Math.max(0,Math.min(s,this.options.count-1));const h=_m(this.getMeasurements()[s]);if(u==="auto")if(h.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)u="end";else if(h.start<=this.scrollOffset+this.options.scrollPaddingStart)u="start";else return[this.scrollOffset,u];const g=u==="end"?h.end+this.options.scrollPaddingEnd:h.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(g,u),u]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(s,{align:u="start",behavior:h}={})=>{this.cancelScrollToIndex(),h==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(s,u),{adjustments:void 0,behavior:h})},this.scrollToIndex=(s,{align:u="auto",behavior:h}={})=>{s=Math.max(0,Math.min(s,this.options.count-1)),this.cancelScrollToIndex(),h==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[g,m]=this.getOffsetForIndex(s,u);this._scrollToOffset(g,{adjustments:void 0,behavior:h}),h!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(s))){const[I]=this.getOffsetForIndex(s,m);rP(I,this.scrollOffset)||this.scrollToIndex(s,{align:m,behavior:h})}else this.scrollToIndex(s,{align:m,behavior:h})}))},this.scrollBy=(s,{behavior:u}={})=>{this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+s,{adjustments:void 0,behavior:u})},this.getTotalSize=()=>{var s;const u=this.getMeasurements();let h;return u.length===0?h=this.options.paddingStart:h=this.options.lanes===1?((s=u[u.length-1])==null?void 0:s.end)??0:Math.max(...u.slice(-this.options.lanes).map(g=>g.end)),h-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(s,{adjustments:u,behavior:h})=>{this.options.scrollToFn(s,{behavior:h,adjustments:u},this)},this.measure=()=>{var s,u;this.itemSizeCache=new Map,(u=(s=this.options).onChange)==null||u.call(s,this,!1)},this.setOptions(n),this.scrollRect=this.options.initialRect,this.scrollOffset=typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(s=>{this.itemSizeCache.set(s.key,s.size)}),this.notify(!1,!1)}}const L1=(e,n,s,u)=>{for(;e<=n;){const h=(e+n)/2|0,g=s(h);if(gu)n=h-1;else return h}return e>0?e-1:0};function fP({measurements:e,outerSize:n,scrollOffset:s}){const u=e.length-1,g=L1(0,u,c=>e[c].start,s);let m=g;for(;mii(e).getScrollElement(),h=>{h&&n._willUpdate()},{immediate:!0}),Ji(()=>ii(e),h=>{n.setOptions({...h,onChange:(g,m)=>{var c;u0(s),(c=h.onChange)==null||c.call(h,g,m)}}),n._willUpdate(),u0(s)},{immediate:!0}),FE(u),s}function mP(e){return pP(je(()=>({observeElementRect:aP,observeElementOffset:cP,scrollToFn:hP,...ii(e)})))}function P1(e,n,s){let u=Lt(s==null?void 0:s.value),h=je(()=>e.value!==void 0);return[je(()=>h.value?e.value:u.value),function(g){return h.value||(u.value=g),n==null?void 0:n(g)}]}function gP(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function vf(){let e=[],n={addEventListener(s,u,h,g){return s.addEventListener(u,h,g),n.add(()=>s.removeEventListener(u,h,g))},requestAnimationFrame(...s){let u=requestAnimationFrame(...s);n.add(()=>cancelAnimationFrame(u))},nextFrame(...s){n.requestAnimationFrame(()=>{n.requestAnimationFrame(...s)})},setTimeout(...s){let u=setTimeout(...s);n.add(()=>clearTimeout(u))},microTask(...s){let u={current:!0};return gP(()=>{u.current&&s[0]()}),n.add(()=>{u.current=!1})},style(s,u,h){let g=s.style.getPropertyValue(u);return Object.assign(s.style,{[u]:h}),this.add(()=>{Object.assign(s.style,{[u]:g})})},group(s){let u=vf();return s(u),this.add(()=>u.dispose())},add(s){return e.push(s),()=>{let u=e.indexOf(s);if(u>=0)for(let h of e.splice(u,1))h()}},dispose(){for(let s of e.splice(0))s()}};return n}function yP(){let e=vf();return Ja(()=>e.dispose()),e}function _P(){let e=yP();return n=>{e.dispose(),e.nextFrame(n)}}let z1=Symbol("headlessui.useid"),vP=0;function Qa(){return Hr(z1,()=>`${++vP}`)()}function xP(e){ta(z1,e)}function Kt(e){var n;if(e==null||e.value==null)return null;let s=(n=e.value.$el)!=null?n:e.value;return s instanceof Node?s:null}function qr(e,n,...s){if(e in n){let h=n[e];return typeof h=="function"?h(...s):h}let u=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(h=>`"${h}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(u,qr),u}var bP=Object.defineProperty,wP=(e,n,s)=>n in e?bP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,Pv=(e,n,s)=>(wP(e,typeof n!="symbol"?n+"":n,s),s);let EP=class{constructor(){Pv(this,"current",this.detect()),Pv(this,"currentId",0)}set(n){this.current!==n&&(this.currentId=0,this.current=n)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},ny=new EP;function oy(e){if(ny.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let n=Kt(e);if(n)return n.ownerDocument}return document}let zv=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var SP=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(SP||{}),IP=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(IP||{}),TP=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(TP||{}),sy=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(sy||{});function D1(e,n=0){var s;return e===((s=oy(e))==null?void 0:s.body)?!1:qr(n,{0(){return e.matches(zv)},1(){let u=e;for(;u!==null;){if(u.matches(zv))return!0;u=u.parentElement}return!1}})}var CP=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(CP||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function R1(e,n=s=>s){return e.slice().sort((s,u)=>{let h=n(s),g=n(u);if(h===null||g===null)return 0;let m=h.compareDocumentPosition(g);return m&Node.DOCUMENT_POSITION_FOLLOWING?-1:m&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function AP(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function MP(){return/Android/gi.test(window.navigator.userAgent)}function O1(){return AP()||MP()}function Fd(e,n,s){ny.isServer||Qn(u=>{document.addEventListener(e,n,s),u(()=>document.removeEventListener(e,n,s))})}function kP(e,n,s){ny.isServer||Qn(u=>{window.addEventListener(e,n,s),u(()=>window.removeEventListener(e,n,s))})}function B1(e,n,s=je(()=>!0)){function u(g,m){if(!s.value||g.defaultPrevented)return;let c=m(g);if(c===null||!c.getRootNode().contains(c))return;let I=function k(M){return typeof M=="function"?k(M()):Array.isArray(M)||M instanceof Set?M:[M]}(e);for(let k of I){if(k===null)continue;let M=k instanceof HTMLElement?k:Kt(k);if(M!=null&&M.contains(c)||g.composed&&g.composedPath().includes(M))return}return!D1(c,sy.Loose)&&c.tabIndex!==-1&&g.preventDefault(),n(g,c)}let h=Lt(null);Fd("pointerdown",g=>{var m,c;s.value&&(h.value=((c=(m=g.composedPath)==null?void 0:m.call(g))==null?void 0:c[0])||g.target)},!0),Fd("mousedown",g=>{var m,c;s.value&&(h.value=((c=(m=g.composedPath)==null?void 0:m.call(g))==null?void 0:c[0])||g.target)},!0),Fd("click",g=>{O1()||h.value&&(u(g,()=>h.value),h.value=null)},!0),Fd("touchend",g=>u(g,()=>g.target instanceof HTMLElement?g.target:null),!0),kP("blur",g=>u(g,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Dv(e,n){if(e)return e;let s=n??"button";if(typeof s=="string"&&s.toLowerCase()==="button")return"button"}function F1(e,n){let s=Lt(Dv(e.value.type,e.value.as));return an(()=>{s.value=Dv(e.value.type,e.value.as)}),Qn(()=>{var u;s.value||Kt(n)&&Kt(n)instanceof HTMLButtonElement&&!((u=Kt(n))!=null&&u.hasAttribute("type"))&&(s.value="button")}),s}function Rv(e){return[e.screenX,e.screenY]}function V1(){let e=Lt([-1,-1]);return{wasMoved(n){let s=Rv(n);return e.value[0]===s[0]&&e.value[1]===s[1]?!1:(e.value=s,!0)},update(n){e.value=Rv(n)}}}function LP({container:e,accept:n,walk:s,enabled:u}){Qn(()=>{let h=e.value;if(!h||u!==void 0&&!u.value)return;let g=oy(e);if(!g)return;let m=Object.assign(I=>n(I),{acceptNode:n}),c=g.createTreeWalker(h,NodeFilter.SHOW_ELEMENT,m,!1);for(;c.nextNode();)s(c.currentNode)})}var Wa=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Wa||{}),PP=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(PP||{});function No({visible:e=!0,features:n=0,ourProps:s,theirProps:u,...h}){var g;let m=j1(u,s),c=Object.assign(h,{props:m});if(e||n&2&&m.static)return vm(c);if(n&1){let I=(g=m.unmount)==null||g?0:1;return qr(I,{0(){return null},1(){return vm({...h,props:{...m,hidden:!0,style:{display:"none"}}})}})}return vm(c)}function vm({props:e,attrs:n,slots:s,slot:u,name:h}){var g,m;let{as:c,...I}=dh(e,["unmount","static"]),k=(g=s.default)==null?void 0:g.call(s,u),M={};if(u){let A=!1,z=[];for(let[q,K]of Object.entries(u))typeof K=="boolean"&&(A=!0),K===!0&&z.push(q);A&&(M["data-headlessui-state"]=z.join(" "))}if(c==="template"){if(k=N1(k??[]),Object.keys(I).length>0||Object.keys(n).length>0){let[A,...z]=k??[];if(!zP(A)||z.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${h} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(I).concat(Object.keys(n)).map(J=>J.trim()).filter((J,se,ke)=>ke.indexOf(J)===se).sort((J,se)=>J.localeCompare(se)).map(J=>` - ${J}`).join(` + color: hsl(${Math.max(0,Math.min(120-120*J,120))}deg 100% 31%);`,s==null?void 0:s.key)}return(I=s==null?void 0:s.onChange)==null||I.call(s,h),h}}function _m(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const rP=(e,n)=>Math.abs(e-n)<1,nP=(e,n,s)=>{let u;return function(...h){e.clearTimeout(u),u=e.setTimeout(()=>n.apply(this,h),s)}},oP=e=>e,sP=e=>{const n=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1),u=[];for(let h=n;h<=s;h++)u.push(h);return u},aP=(e,n)=>{const s=e.scrollElement;if(!s)return;const u=e.targetWindow;if(!u)return;const h=m=>{const{width:c,height:I}=m;n({width:Math.round(c),height:Math.round(I)})};if(h(s.getBoundingClientRect()),!u.ResizeObserver)return()=>{};const g=new u.ResizeObserver(m=>{const c=m[0];if(c!=null&&c.borderBoxSize){const I=c.borderBoxSize[0];if(I){h({width:I.inlineSize,height:I.blockSize});return}}h(s.getBoundingClientRect())});return g.observe(s,{box:"border-box"}),()=>{g.unobserve(s)}},Lv={passive:!0},lP=typeof window>"u"?!0:"onscrollend"in window,cP=(e,n)=>{const s=e.scrollElement;if(!s)return;const u=e.targetWindow;if(!u)return;let h=0;const g=lP?()=>{}:nP(u,()=>{n(h,!1)},e.options.isScrollingResetDelay),m=k=>()=>{h=s[e.options.horizontal?"scrollLeft":"scrollTop"],g(),n(h,k)},c=m(!0),I=m(!1);return I(),s.addEventListener("scroll",c,Lv),s.addEventListener("scrollend",I,Lv),()=>{s.removeEventListener("scroll",c),s.removeEventListener("scrollend",I)}},uP=(e,n,s)=>{if(n!=null&&n.borderBoxSize){const u=n.borderBoxSize[0];if(u)return Math.round(u[s.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[s.options.horizontal?"width":"height"])},hP=(e,{adjustments:n=0,behavior:s},u)=>{var h,g;const m=e+n;(g=(h=u.scrollElement)==null?void 0:h.scrollTo)==null||g.call(h,{[u.options.horizontal?"left":"top"]:m,behavior:s})};class dP{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let s=null;const u=()=>s||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:s=new this.targetWindow.ResizeObserver(h=>{h.forEach(g=>{this._measureElement(g.target,g)})}));return{disconnect:()=>{var h;return(h=u())==null?void 0:h.disconnect()},observe:h=>{var g;return(g=u())==null?void 0:g.observe(h,{box:"border-box"})},unobserve:h=>{var g;return(g=u())==null?void 0:g.unobserve(h)}}})(),this.range=null,this.setOptions=s=>{Object.entries(s).forEach(([u,h])=>{typeof h>"u"&&delete s[u]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:oP,rangeExtractor:sP,onChange:()=>{},measureElement:uP,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,...s}},this.notify=(s,u)=>{var h,g;const{startIndex:m,endIndex:c}=this.range??{startIndex:void 0,endIndex:void 0},I=this.calculateRange();(s||m!==(I==null?void 0:I.startIndex)||c!==(I==null?void 0:I.endIndex))&&((g=(h=this.options).onChange)==null||g.call(h,this,u))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(s=>s()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{var s;const u=this.options.getScrollElement();this.scrollElement!==u&&(this.cleanup(),this.scrollElement=u,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((s=this.scrollElement)==null?void 0:s.window)??null,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,h=>{this.scrollRect=h,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(h,g)=>{this.scrollAdjustments=0,this.scrollDirection=g?this.scrollOffsetthis.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurementOptions=Ou(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(s,u,h,g)=>(this.pendingMeasuredCacheIndexes=[],{count:s,paddingStart:u,scrollMargin:h,getItemKey:g}),{key:!1}),this.getFurthestMeasurement=(s,u)=>{const h=new Map,g=new Map;for(let m=u-1;m>=0;m--){const c=s[m];if(h.has(c.lane))continue;const I=g.get(c.lane);if(I==null||c.end>I.end?g.set(c.lane,c):c.endm.end===c.end?m.index-c.index:m.end-c.end)[0]:void 0},this.getMeasurements=Ou(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:s,paddingStart:u,scrollMargin:h,getItemKey:g},m)=>{const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const I=this.measurementsCache.slice(0,c);for(let k=c;kthis.options.debug}),this.calculateRange=Ou(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(s,u,h)=>this.range=s.length>0&&u>0?fP({measurements:s,outerSize:u,scrollOffset:h}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Ou(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(s,u,h,g)=>u===null?[]:s({startIndex:u.startIndex,endIndex:u.endIndex,overscan:h,count:g}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=s=>{const u=this.options.indexAttribute,h=s.getAttribute(u);return h?parseInt(h,10):(console.warn(`Missing attribute name '${u}={index}' on measured element.`),-1)},this._measureElement=(s,u)=>{const h=this.measurementsCache[this.indexFromElement(s)];if(!h||!s.isConnected){this.measureElementCache.forEach((c,I)=>{c===s&&(this.observer.unobserve(s),this.measureElementCache.delete(I))});return}const g=this.measureElementCache.get(h.key);g!==s&&(g&&this.observer.unobserve(g),this.observer.observe(s),this.measureElementCache.set(h.key,s));const m=this.options.measureElement(s,u,this);this.resizeItem(h,m)},this.resizeItem=(s,u)=>{const h=this.itemSizeCache.get(s.key)??s.size,g=u-h;g!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,g,this):s.start{s&&this._measureElement(s,void 0)},this.getVirtualItems=Ou(()=>[this.getIndexes(),this.getMeasurements()],(s,u)=>{const h=[];for(let g=0,m=s.length;gthis.options.debug}),this.getVirtualItemForOffset=s=>{const u=this.getMeasurements();return _m(u[L1(0,u.length-1,h=>_m(u[h]).start,s)])},this.getOffsetForAlignment=(s,u)=>{const h=this.getSize();u==="auto"&&(s<=this.scrollOffset?u="start":s>=this.scrollOffset+h?u="end":u="start"),u==="start"?s=s:u==="end"?s=s-h:u==="center"&&(s=s-h/2);const g=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[g]:this.scrollElement[g]:0)-this.getSize();return Math.max(Math.min(c,s),0)},this.getOffsetForIndex=(s,u="auto")=>{s=Math.max(0,Math.min(s,this.options.count-1));const h=_m(this.getMeasurements()[s]);if(u==="auto")if(h.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)u="end";else if(h.start<=this.scrollOffset+this.options.scrollPaddingStart)u="start";else return[this.scrollOffset,u];const g=u==="end"?h.end+this.options.scrollPaddingEnd:h.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(g,u),u]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(s,{align:u="start",behavior:h}={})=>{this.cancelScrollToIndex(),h==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(s,u),{adjustments:void 0,behavior:h})},this.scrollToIndex=(s,{align:u="auto",behavior:h}={})=>{s=Math.max(0,Math.min(s,this.options.count-1)),this.cancelScrollToIndex(),h==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[g,m]=this.getOffsetForIndex(s,u);this._scrollToOffset(g,{adjustments:void 0,behavior:h}),h!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(s))){const[I]=this.getOffsetForIndex(s,m);rP(I,this.scrollOffset)||this.scrollToIndex(s,{align:m,behavior:h})}else this.scrollToIndex(s,{align:m,behavior:h})}))},this.scrollBy=(s,{behavior:u}={})=>{this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+s,{adjustments:void 0,behavior:u})},this.getTotalSize=()=>{var s;const u=this.getMeasurements();let h;return u.length===0?h=this.options.paddingStart:h=this.options.lanes===1?((s=u[u.length-1])==null?void 0:s.end)??0:Math.max(...u.slice(-this.options.lanes).map(g=>g.end)),h-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(s,{adjustments:u,behavior:h})=>{this.options.scrollToFn(s,{behavior:h,adjustments:u},this)},this.measure=()=>{var s,u;this.itemSizeCache=new Map,(u=(s=this.options).onChange)==null||u.call(s,this,!1)},this.setOptions(n),this.scrollRect=this.options.initialRect,this.scrollOffset=typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(s=>{this.itemSizeCache.set(s.key,s.size)}),this.notify(!1,!1)}}const L1=(e,n,s,u)=>{for(;e<=n;){const h=(e+n)/2|0,g=s(h);if(gu)n=h-1;else return h}return e>0?e-1:0};function fP({measurements:e,outerSize:n,scrollOffset:s}){const u=e.length-1,g=L1(0,u,c=>e[c].start,s);let m=g;for(;mii(e).getScrollElement(),h=>{h&&n._willUpdate()},{immediate:!0}),er(()=>ii(e),h=>{n.setOptions({...h,onChange:(g,m)=>{var c;u0(s),(c=h.onChange)==null||c.call(h,g,m)}}),n._willUpdate(),u0(s)},{immediate:!0}),FE(u),s}function mP(e){return pP(je(()=>({observeElementRect:aP,observeElementOffset:cP,scrollToFn:hP,...ii(e)})))}function P1(e,n,s){let u=Lt(s==null?void 0:s.value),h=je(()=>e.value!==void 0);return[je(()=>h.value?e.value:u.value),function(g){return h.value||(u.value=g),n==null?void 0:n(g)}]}function gP(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function vf(){let e=[],n={addEventListener(s,u,h,g){return s.addEventListener(u,h,g),n.add(()=>s.removeEventListener(u,h,g))},requestAnimationFrame(...s){let u=requestAnimationFrame(...s);n.add(()=>cancelAnimationFrame(u))},nextFrame(...s){n.requestAnimationFrame(()=>{n.requestAnimationFrame(...s)})},setTimeout(...s){let u=setTimeout(...s);n.add(()=>clearTimeout(u))},microTask(...s){let u={current:!0};return gP(()=>{u.current&&s[0]()}),n.add(()=>{u.current=!1})},style(s,u,h){let g=s.style.getPropertyValue(u);return Object.assign(s.style,{[u]:h}),this.add(()=>{Object.assign(s.style,{[u]:g})})},group(s){let u=vf();return s(u),this.add(()=>u.dispose())},add(s){return e.push(s),()=>{let u=e.indexOf(s);if(u>=0)for(let h of e.splice(u,1))h()}},dispose(){for(let s of e.splice(0))s()}};return n}function yP(){let e=vf();return Ja(()=>e.dispose()),e}function _P(){let e=yP();return n=>{e.dispose(),e.nextFrame(n)}}let z1=Symbol("headlessui.useid"),vP=0;function Qa(){return Hr(z1,()=>`${++vP}`)()}function xP(e){ta(z1,e)}function Kt(e){var n;if(e==null||e.value==null)return null;let s=(n=e.value.$el)!=null?n:e.value;return s instanceof Node?s:null}function qr(e,n,...s){if(e in n){let h=n[e];return typeof h=="function"?h(...s):h}let u=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(h=>`"${h}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(u,qr),u}var bP=Object.defineProperty,wP=(e,n,s)=>n in e?bP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,Pv=(e,n,s)=>(wP(e,typeof n!="symbol"?n+"":n,s),s);let EP=class{constructor(){Pv(this,"current",this.detect()),Pv(this,"currentId",0)}set(n){this.current!==n&&(this.currentId=0,this.current=n)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},ny=new EP;function oy(e){if(ny.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let n=Kt(e);if(n)return n.ownerDocument}return document}let zv=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var SP=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(SP||{}),IP=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(IP||{}),TP=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(TP||{}),sy=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(sy||{});function D1(e,n=0){var s;return e===((s=oy(e))==null?void 0:s.body)?!1:qr(n,{0(){return e.matches(zv)},1(){let u=e;for(;u!==null;){if(u.matches(zv))return!0;u=u.parentElement}return!1}})}var CP=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(CP||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function R1(e,n=s=>s){return e.slice().sort((s,u)=>{let h=n(s),g=n(u);if(h===null||g===null)return 0;let m=h.compareDocumentPosition(g);return m&Node.DOCUMENT_POSITION_FOLLOWING?-1:m&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function AP(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function MP(){return/Android/gi.test(window.navigator.userAgent)}function O1(){return AP()||MP()}function Fd(e,n,s){ny.isServer||Qn(u=>{document.addEventListener(e,n,s),u(()=>document.removeEventListener(e,n,s))})}function kP(e,n,s){ny.isServer||Qn(u=>{window.addEventListener(e,n,s),u(()=>window.removeEventListener(e,n,s))})}function B1(e,n,s=je(()=>!0)){function u(g,m){if(!s.value||g.defaultPrevented)return;let c=m(g);if(c===null||!c.getRootNode().contains(c))return;let I=function k(M){return typeof M=="function"?k(M()):Array.isArray(M)||M instanceof Set?M:[M]}(e);for(let k of I){if(k===null)continue;let M=k instanceof HTMLElement?k:Kt(k);if(M!=null&&M.contains(c)||g.composed&&g.composedPath().includes(M))return}return!D1(c,sy.Loose)&&c.tabIndex!==-1&&g.preventDefault(),n(g,c)}let h=Lt(null);Fd("pointerdown",g=>{var m,c;s.value&&(h.value=((c=(m=g.composedPath)==null?void 0:m.call(g))==null?void 0:c[0])||g.target)},!0),Fd("mousedown",g=>{var m,c;s.value&&(h.value=((c=(m=g.composedPath)==null?void 0:m.call(g))==null?void 0:c[0])||g.target)},!0),Fd("click",g=>{O1()||h.value&&(u(g,()=>h.value),h.value=null)},!0),Fd("touchend",g=>u(g,()=>g.target instanceof HTMLElement?g.target:null),!0),kP("blur",g=>u(g,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Dv(e,n){if(e)return e;let s=n??"button";if(typeof s=="string"&&s.toLowerCase()==="button")return"button"}function F1(e,n){let s=Lt(Dv(e.value.type,e.value.as));return an(()=>{s.value=Dv(e.value.type,e.value.as)}),Qn(()=>{var u;s.value||Kt(n)&&Kt(n)instanceof HTMLButtonElement&&!((u=Kt(n))!=null&&u.hasAttribute("type"))&&(s.value="button")}),s}function Rv(e){return[e.screenX,e.screenY]}function V1(){let e=Lt([-1,-1]);return{wasMoved(n){let s=Rv(n);return e.value[0]===s[0]&&e.value[1]===s[1]?!1:(e.value=s,!0)},update(n){e.value=Rv(n)}}}function LP({container:e,accept:n,walk:s,enabled:u}){Qn(()=>{let h=e.value;if(!h||u!==void 0&&!u.value)return;let g=oy(e);if(!g)return;let m=Object.assign(I=>n(I),{acceptNode:n}),c=g.createTreeWalker(h,NodeFilter.SHOW_ELEMENT,m,!1);for(;c.nextNode();)s(c.currentNode)})}var Za=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Za||{}),PP=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(PP||{});function No({visible:e=!0,features:n=0,ourProps:s,theirProps:u,...h}){var g;let m=j1(u,s),c=Object.assign(h,{props:m});if(e||n&2&&m.static)return vm(c);if(n&1){let I=(g=m.unmount)==null||g?0:1;return qr(I,{0(){return null},1(){return vm({...h,props:{...m,hidden:!0,style:{display:"none"}}})}})}return vm(c)}function vm({props:e,attrs:n,slots:s,slot:u,name:h}){var g,m;let{as:c,...I}=dh(e,["unmount","static"]),k=(g=s.default)==null?void 0:g.call(s,u),M={};if(u){let A=!1,z=[];for(let[q,K]of Object.entries(u))typeof K=="boolean"&&(A=!0),K===!0&&z.push(q);A&&(M["data-headlessui-state"]=z.join(" "))}if(c==="template"){if(k=N1(k??[]),Object.keys(I).length>0||Object.keys(n).length>0){let[A,...z]=k??[];if(!zP(A)||z.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${h} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(I).concat(Object.keys(n)).map(J=>J.trim()).filter((J,se,ke)=>ke.indexOf(J)===se).sort((J,se)=>J.localeCompare(se)).map(J=>` - ${J}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(J=>` - ${J}`).join(` `)].join(` -`));let q=j1((m=A.props)!=null?m:{},I,M),K=Bo(A,q,!0);for(let J in q)J.startsWith("on")&&(K.props||(K.props={}),K.props[J]=q[J]);return K}return Array.isArray(k)&&k.length===1?k[0]:k}return Fn(c,Object.assign({},I,M),{default:()=>k})}function N1(e){return e.flatMap(n=>n.type===xr?N1(n.children):[n])}function j1(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},s={};for(let u of e)for(let h in u)h.startsWith("on")&&typeof u[h]=="function"?(s[h]!=null||(s[h]=[]),s[h].push(u[h])):n[h]=u[h];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(s).map(u=>[u,void 0])));for(let u in s)Object.assign(n,{[u](h,...g){let m=s[u];for(let c of m){if(h instanceof Event&&h.defaultPrevented)return;c(h,...g)}}});return n}function $1(e){let n=Object.assign({},e);for(let s in n)n[s]===void 0&&delete n[s];return n}function dh(e,n=[]){let s=Object.assign({},e);for(let u of n)u in s&&delete s[u];return s}function zP(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var ay=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ay||{});let U1=Ui({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:n,attrs:s}){return()=>{var u;let{features:h,...g}=e,m={"aria-hidden":(h&2)===2?!0:(u=g["aria-hidden"])!=null?u:void 0,hidden:(h&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(h&4)===4&&(h&2)!==2&&{display:"none"}}};return No({ourProps:m,theirProps:g,slot:{},attrs:s,slots:n,name:"Hidden"})}}}),q1=Symbol("Context");var ds=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ds||{});function H1(){return Hr(q1,null)}function G1(e){ta(q1,e)}var vi=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(vi||{}),Z1=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Z1||{});function DP(e){function n(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",n))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",n),n())}let Na=[];DP(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&Na[0]!==n.target&&(Na.unshift(n.target),Na=Na.filter(s=>s!=null&&s.isConnected),Na.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function RP(e){throw new Error("Unexpected object: "+e)}var gi=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(gi||{});function ug(e,n){let s=n.resolveItems();if(s.length<=0)return null;let u=n.resolveActiveIndex(),h=u??-1;switch(e.focus){case 0:{for(let g=0;g=0;--g)if(!n.resolveDisabled(s[g],g,s))return g;return u}case 2:{for(let g=h+1;g=0;--g)if(!n.resolveDisabled(s[g],g,s))return g;return u}case 4:{for(let g=0;g(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(FP||{}),VP=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(VP||{}),NP=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(NP||{});let K1=Symbol("ComboboxContext");function bc(e){let n=Hr(K1,null);if(n===null){let s=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,bc),s}return n}let J1=Symbol("VirtualContext"),jP=Ui({name:"VirtualProvider",setup(e,{slots:n}){let s=bc("VirtualProvider"),u=je(()=>{let c=Kt(s.optionsRef);if(!c)return{start:0,end:0};let I=window.getComputedStyle(c);return{start:parseFloat(I.paddingBlockStart||I.paddingTop),end:parseFloat(I.paddingBlockEnd||I.paddingBottom)}}),h=mP(je(()=>({scrollPaddingStart:u.value.start,scrollPaddingEnd:u.value.end,count:s.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return Kt(s.optionsRef)},overscan:12}))),g=je(()=>{var c;return(c=s.virtual.value)==null?void 0:c.options}),m=Lt(0);return Ji([g],()=>{m.value+=1}),ta(J1,s.virtual.value?h:null),()=>[Fn("div",{style:{position:"relative",width:"100%",height:`${h.value.getTotalSize()}px`},ref:c=>{if(c){if(typeof process<"u"&&OP.JEST_WORKER_ID!==void 0||s.activationTrigger.value===0)return;s.activeOptionIndex.value!==null&&s.virtual.value.options.length>s.activeOptionIndex.value&&h.value.scrollToIndex(s.activeOptionIndex.value)}}},h.value.getVirtualItems().map(c=>Bo(n.default({option:s.virtual.value.options[c.index],open:s.comboboxState.value===0})[0],{key:`${m.value}-${c.index}`,"data-index":c.index,"aria-setsize":s.virtual.value.options.length,"aria-posinset":c.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${c.start}px)`,overflowAnchor:"none"}})))]}}),$P=Ui({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:n,attrs:s,emit:u}){let h=Lt(1),g=Lt(null),m=Lt(null),c=Lt(null),I=Lt(null),k=Lt({static:!1,hold:!1}),M=Lt([]),A=Lt(null),z=Lt(2),q=Lt(!1);function K(pe=Ie=>Ie){let Ie=A.value!==null?M.value[A.value]:null,Ae=pe(M.value.slice()),De=Ae.length>0&&Ae[0].dataRef.order.value!==null?Ae.sort((rt,Xe)=>rt.dataRef.order.value-Xe.dataRef.order.value):R1(Ae,rt=>Kt(rt.dataRef.domRef)),Ge=Ie?De.indexOf(Ie):null;return Ge===-1&&(Ge=null),{options:De,activeOptionIndex:Ge}}let J=je(()=>e.multiple?1:0),se=je(()=>e.nullable),[ke,ye]=P1(je(()=>e.modelValue),pe=>u("update:modelValue",pe),je(()=>e.defaultValue)),W=je(()=>ke.value===void 0?qr(J.value,{1:[],0:void 0}):ke.value),fe=null,Z=null;function ee(pe){return qr(J.value,{0(){return ye==null?void 0:ye(pe)},1:()=>{let Ie=Ft(Ee.value.value).slice(),Ae=Ft(pe),De=Ie.findIndex(Ge=>Ee.compare(Ae,Ft(Ge)));return De===-1?Ie.push(Ae):Ie.splice(De,1),ye==null?void 0:ye(Ie)}})}let Se=je(()=>{});Ji([Se],([pe],[Ie])=>{if(Ee.virtual.value&&pe&&Ie&&A.value!==null){let Ae=pe.indexOf(Ie[A.value]);Ae!==-1?A.value=Ae:A.value=null}});let Ee={comboboxState:h,value:W,mode:J,compare(pe,Ie){if(typeof e.by=="string"){let Ae=e.by;return(pe==null?void 0:pe[Ae])===(Ie==null?void 0:Ie[Ae])}return e.by===null?BP(pe,Ie):e.by(pe,Ie)},calculateIndex(pe){return Ee.virtual.value?e.by===null?Ee.virtual.value.options.indexOf(pe):Ee.virtual.value.options.findIndex(Ie=>Ee.compare(Ie,pe)):M.value.findIndex(Ie=>Ee.compare(Ie.dataRef.value,pe))},defaultValue:je(()=>e.defaultValue),nullable:se,immediate:je(()=>!1),virtual:je(()=>null),inputRef:m,labelRef:g,buttonRef:c,optionsRef:I,disabled:je(()=>e.disabled),options:M,change(pe){ye(pe)},activeOptionIndex:je(()=>{if(q.value&&A.value===null&&(Ee.virtual.value?Ee.virtual.value.options.length>0:M.value.length>0)){if(Ee.virtual.value){let Ie=Ee.virtual.value.options.findIndex(Ae=>{var De;return!((De=Ee.virtual.value)!=null&&De.disabled(Ae))});if(Ie!==-1)return Ie}let pe=M.value.findIndex(Ie=>!Ie.dataRef.disabled);if(pe!==-1)return pe}return A.value}),activationTrigger:z,optionsPropsRef:k,closeCombobox(){q.value=!1,!e.disabled&&h.value!==1&&(h.value=1,A.value=null)},openCombobox(){if(q.value=!0,!e.disabled&&h.value!==0){if(Ee.value.value){let pe=Ee.calculateIndex(Ee.value.value);pe!==-1&&(A.value=pe)}h.value=0}},setActivationTrigger(pe){z.value=pe},goToOption(pe,Ie,Ae){q.value=!1,fe!==null&&cancelAnimationFrame(fe),fe=requestAnimationFrame(()=>{if(e.disabled||I.value&&!k.value.static&&h.value===1)return;if(Ee.virtual.value){A.value=pe===gi.Specific?Ie:ug({focus:pe},{resolveItems:()=>Ee.virtual.value.options,resolveActiveIndex:()=>{var rt,Xe;return(Xe=(rt=Ee.activeOptionIndex.value)!=null?rt:Ee.virtual.value.options.findIndex(dt=>{var nt;return!((nt=Ee.virtual.value)!=null&&nt.disabled(dt))}))!=null?Xe:null},resolveDisabled:rt=>Ee.virtual.value.disabled(rt),resolveId(){throw new Error("Function not implemented.")}}),z.value=Ae??2;return}let De=K();if(De.activeOptionIndex===null){let rt=De.options.findIndex(Xe=>!Xe.dataRef.disabled);rt!==-1&&(De.activeOptionIndex=rt)}let Ge=pe===gi.Specific?Ie:ug({focus:pe},{resolveItems:()=>De.options,resolveActiveIndex:()=>De.activeOptionIndex,resolveId:rt=>rt.id,resolveDisabled:rt=>rt.dataRef.disabled});A.value=Ge,z.value=Ae??2,M.value=De.options})},selectOption(pe){let Ie=M.value.find(De=>De.id===pe);if(!Ie)return;let{dataRef:Ae}=Ie;ee(Ae.value)},selectActiveOption(){if(Ee.activeOptionIndex.value!==null){if(Ee.virtual.value)ee(Ee.virtual.value.options[Ee.activeOptionIndex.value]);else{let{dataRef:pe}=M.value[Ee.activeOptionIndex.value];ee(pe.value)}Ee.goToOption(gi.Specific,Ee.activeOptionIndex.value)}},registerOption(pe,Ie){let Ae=Oo({id:pe,dataRef:Ie});if(Ee.virtual.value){M.value.push(Ae);return}Z&&cancelAnimationFrame(Z);let De=K(Ge=>(Ge.push(Ae),Ge));A.value===null&&Ee.isSelected(Ie.value.value)&&(De.activeOptionIndex=De.options.indexOf(Ae)),M.value=De.options,A.value=De.activeOptionIndex,z.value=2,De.options.some(Ge=>!Kt(Ge.dataRef.domRef))&&(Z=requestAnimationFrame(()=>{let Ge=K();M.value=Ge.options,A.value=Ge.activeOptionIndex}))},unregisterOption(pe,Ie){if(fe!==null&&cancelAnimationFrame(fe),Ie&&(q.value=!0),Ee.virtual.value){M.value=M.value.filter(De=>De.id!==pe);return}let Ae=K(De=>{let Ge=De.findIndex(rt=>rt.id===pe);return Ge!==-1&&De.splice(Ge,1),De});M.value=Ae.options,A.value=Ae.activeOptionIndex,z.value=2},isSelected(pe){return qr(J.value,{0:()=>Ee.compare(Ft(Ee.value.value),Ft(pe)),1:()=>Ft(Ee.value.value).some(Ie=>Ee.compare(Ft(Ie),Ft(pe)))})},isActive(pe){return A.value===Ee.calculateIndex(pe)}};B1([m,c,I],()=>Ee.closeCombobox(),je(()=>h.value===0)),ta(K1,Ee),G1(je(()=>qr(h.value,{0:ds.Open,1:ds.Closed})));let Le=je(()=>{var pe;return(pe=Kt(m))==null?void 0:pe.closest("form")});return an(()=>{Ji([Le],()=>{if(!Le.value||e.defaultValue===void 0)return;function pe(){Ee.change(e.defaultValue)}return Le.value.addEventListener("reset",pe),()=>{var Ie;(Ie=Le.value)==null||Ie.removeEventListener("reset",pe)}},{immediate:!0})}),()=>{var pe,Ie,Ae;let{name:De,disabled:Ge,form:rt,...Xe}=e,dt={open:h.value===0,disabled:Ge,activeIndex:Ee.activeOptionIndex.value,activeOption:Ee.activeOptionIndex.value===null?null:Ee.virtual.value?Ee.virtual.value.options[(pe=Ee.activeOptionIndex.value)!=null?pe:0]:(Ae=(Ie=Ee.options.value[Ee.activeOptionIndex.value])==null?void 0:Ie.dataRef.value)!=null?Ae:null,value:W.value};return Fn(xr,[...De!=null&&W.value!=null?ly({[De]:W.value}).map(([nt,ei])=>Fn(U1,$1({features:ay.Hidden,key:nt,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:rt,disabled:Ge,name:nt,value:ei}))):[],No({theirProps:{...s,...dh(Xe,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:dt,slots:n,attrs:s,name:"Combobox"})])}}}),UP=Ui({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:n,slots:s,expose:u}){var h;let g=(h=e.id)!=null?h:`headlessui-combobox-button-${Qa()}`,m=bc("ComboboxButton");u({el:m.buttonRef,$el:m.buttonRef});function c(M){m.disabled.value||(m.comboboxState.value===0?m.closeCombobox():(M.preventDefault(),m.openCombobox()),$r(()=>{var A;return(A=Kt(m.inputRef))==null?void 0:A.focus({preventScroll:!0})}))}function I(M){switch(M.key){case vi.ArrowDown:M.preventDefault(),M.stopPropagation(),m.comboboxState.value===1&&m.openCombobox(),$r(()=>{var A;return(A=m.inputRef.value)==null?void 0:A.focus({preventScroll:!0})});return;case vi.ArrowUp:M.preventDefault(),M.stopPropagation(),m.comboboxState.value===1&&(m.openCombobox(),$r(()=>{m.value.value||m.goToOption(gi.Last)})),$r(()=>{var A;return(A=m.inputRef.value)==null?void 0:A.focus({preventScroll:!0})});return;case vi.Escape:if(m.comboboxState.value!==0)return;M.preventDefault(),m.optionsRef.value&&!m.optionsPropsRef.value.static&&M.stopPropagation(),m.closeCombobox(),$r(()=>{var A;return(A=m.inputRef.value)==null?void 0:A.focus({preventScroll:!0})});return}}let k=F1(je(()=>({as:e.as,type:n.type})),m.buttonRef);return()=>{var M,A;let z={open:m.comboboxState.value===0,disabled:m.disabled.value,value:m.value.value},{...q}=e,K={ref:m.buttonRef,id:g,type:k.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(M=Kt(m.optionsRef))==null?void 0:M.id,"aria-expanded":m.comboboxState.value===0,"aria-labelledby":m.labelRef.value?[(A=Kt(m.labelRef))==null?void 0:A.id,g].join(" "):void 0,disabled:m.disabled.value===!0?!0:void 0,onKeydown:I,onClick:c};return No({ourProps:K,theirProps:q,slot:z,attrs:n,slots:s,name:"ComboboxButton"})}}}),qP=Ui({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:n,attrs:s,slots:u,expose:h}){var g;let m=(g=e.id)!=null?g:`headlessui-combobox-input-${Qa()}`,c=bc("ComboboxInput"),I=je(()=>oy(Kt(c.inputRef))),k={value:!1};h({el:c.inputRef,$el:c.inputRef});function M(){c.change(null);let Z=Kt(c.optionsRef);Z&&(Z.scrollTop=0),c.goToOption(gi.Nothing)}let A=je(()=>{var Z;let ee=c.value.value;return Kt(c.inputRef)?typeof e.displayValue<"u"&&ee!==void 0?(Z=e.displayValue(ee))!=null?Z:"":typeof ee=="string"?ee:"":""});an(()=>{Ji([A,c.comboboxState,I],([Z,ee],[Se,Ee])=>{if(k.value)return;let Le=Kt(c.inputRef);Le&&((Ee===0&&ee===1||Z!==Se)&&(Le.value=Z),requestAnimationFrame(()=>{var pe;if(k.value||!Le||((pe=I.value)==null?void 0:pe.activeElement)!==Le)return;let{selectionStart:Ie,selectionEnd:Ae}=Le;Math.abs((Ae??0)-(Ie??0))===0&&Ie===0&&Le.setSelectionRange(Le.value.length,Le.value.length)}))},{immediate:!0}),Ji([c.comboboxState],([Z],[ee])=>{if(Z===0&&ee===1){if(k.value)return;let Se=Kt(c.inputRef);if(!Se)return;let Ee=Se.value,{selectionStart:Le,selectionEnd:pe,selectionDirection:Ie}=Se;Se.value="",Se.value=Ee,Ie!==null?Se.setSelectionRange(Le,pe,Ie):Se.setSelectionRange(Le,pe)}})});let z=Lt(!1);function q(){z.value=!0}function K(){vf().nextFrame(()=>{z.value=!1})}let J=_P();function se(Z){switch(k.value=!0,J(()=>{k.value=!1}),Z.key){case vi.Enter:if(k.value=!1,c.comboboxState.value!==0||z.value)return;if(Z.preventDefault(),Z.stopPropagation(),c.activeOptionIndex.value===null){c.closeCombobox();return}c.selectActiveOption(),c.mode.value===0&&c.closeCombobox();break;case vi.ArrowDown:return k.value=!1,Z.preventDefault(),Z.stopPropagation(),qr(c.comboboxState.value,{0:()=>c.goToOption(gi.Next),1:()=>c.openCombobox()});case vi.ArrowUp:return k.value=!1,Z.preventDefault(),Z.stopPropagation(),qr(c.comboboxState.value,{0:()=>c.goToOption(gi.Previous),1:()=>{c.openCombobox(),$r(()=>{c.value.value||c.goToOption(gi.Last)})}});case vi.Home:if(Z.shiftKey)break;return k.value=!1,Z.preventDefault(),Z.stopPropagation(),c.goToOption(gi.First);case vi.PageUp:return k.value=!1,Z.preventDefault(),Z.stopPropagation(),c.goToOption(gi.First);case vi.End:if(Z.shiftKey)break;return k.value=!1,Z.preventDefault(),Z.stopPropagation(),c.goToOption(gi.Last);case vi.PageDown:return k.value=!1,Z.preventDefault(),Z.stopPropagation(),c.goToOption(gi.Last);case vi.Escape:if(k.value=!1,c.comboboxState.value!==0)return;Z.preventDefault(),c.optionsRef.value&&!c.optionsPropsRef.value.static&&Z.stopPropagation(),c.nullable.value&&c.mode.value===0&&c.value.value===null&&M(),c.closeCombobox();break;case vi.Tab:if(k.value=!1,c.comboboxState.value!==0)return;c.mode.value===0&&c.activationTrigger.value!==1&&c.selectActiveOption(),c.closeCombobox();break}}function ke(Z){n("change",Z),c.nullable.value&&c.mode.value===0&&Z.target.value===""&&M(),c.openCombobox()}function ye(Z){var ee,Se,Ee;let Le=(ee=Z.relatedTarget)!=null?ee:Na.find(pe=>pe!==Z.currentTarget);if(k.value=!1,!((Se=Kt(c.optionsRef))!=null&&Se.contains(Le))&&!((Ee=Kt(c.buttonRef))!=null&&Ee.contains(Le))&&c.comboboxState.value===0)return Z.preventDefault(),c.mode.value===0&&(c.nullable.value&&c.value.value===null?M():c.activationTrigger.value!==1&&c.selectActiveOption()),c.closeCombobox()}function W(Z){var ee,Se,Ee;let Le=(ee=Z.relatedTarget)!=null?ee:Na.find(pe=>pe!==Z.currentTarget);(Se=Kt(c.buttonRef))!=null&&Se.contains(Le)||(Ee=Kt(c.optionsRef))!=null&&Ee.contains(Le)||c.disabled.value||c.immediate.value&&c.comboboxState.value!==0&&(c.openCombobox(),vf().nextFrame(()=>{c.setActivationTrigger(1)}))}let fe=je(()=>{var Z,ee,Se,Ee;return(Ee=(Se=(ee=e.defaultValue)!=null?ee:c.defaultValue.value!==void 0?(Z=e.displayValue)==null?void 0:Z.call(e,c.defaultValue.value):null)!=null?Se:c.defaultValue.value)!=null?Ee:""});return()=>{var Z,ee,Se,Ee,Le,pe,Ie;let Ae={open:c.comboboxState.value===0},{displayValue:De,onChange:Ge,...rt}=e,Xe={"aria-controls":(Z=c.optionsRef.value)==null?void 0:Z.id,"aria-expanded":c.comboboxState.value===0,"aria-activedescendant":c.activeOptionIndex.value===null?void 0:c.virtual.value?(ee=c.options.value.find(dt=>!c.virtual.value.disabled(dt.dataRef.value)&&c.compare(dt.dataRef.value,c.virtual.value.options[c.activeOptionIndex.value])))==null?void 0:ee.id:(Se=c.options.value[c.activeOptionIndex.value])==null?void 0:Se.id,"aria-labelledby":(pe=(Ee=Kt(c.labelRef))==null?void 0:Ee.id)!=null?pe:(Le=Kt(c.buttonRef))==null?void 0:Le.id,"aria-autocomplete":"list",id:m,onCompositionstart:q,onCompositionend:K,onKeydown:se,onInput:ke,onFocus:W,onBlur:ye,role:"combobox",type:(Ie=s.type)!=null?Ie:"text",tabIndex:0,ref:c.inputRef,defaultValue:fe.value,disabled:c.disabled.value===!0?!0:void 0};return No({ourProps:Xe,theirProps:rt,slot:Ae,attrs:s,slots:u,features:Wa.RenderStrategy|Wa.Static,name:"ComboboxInput"})}}}),HP=Ui({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:n,slots:s,expose:u}){let h=bc("ComboboxOptions"),g=`headlessui-combobox-options-${Qa()}`;u({el:h.optionsRef,$el:h.optionsRef}),Qn(()=>{h.optionsPropsRef.value.static=e.static}),Qn(()=>{h.optionsPropsRef.value.hold=e.hold});let m=H1(),c=je(()=>m!==null?(m.value&ds.Open)===ds.Open:h.comboboxState.value===0);LP({container:je(()=>Kt(h.optionsRef)),enabled:je(()=>h.comboboxState.value===0),accept(k){return k.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:k.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(k){k.setAttribute("role","none")}});function I(k){k.preventDefault()}return()=>{var k,M,A;let z={open:h.comboboxState.value===0},q={"aria-labelledby":(A=(k=Kt(h.labelRef))==null?void 0:k.id)!=null?A:(M=Kt(h.buttonRef))==null?void 0:M.id,id:g,ref:h.optionsRef,role:"listbox","aria-multiselectable":h.mode.value===1?!0:void 0,onMousedown:I},K=dh(e,["hold"]);return No({ourProps:q,theirProps:K,slot:z,attrs:n,slots:h.virtual.value&&h.comboboxState.value===0?{...s,default:()=>[Fn(jP,{},s.default)]}:s,features:Wa.RenderStrategy|Wa.Static,visible:c.value,name:"ComboboxOptions"})}}}),GP=Ui({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:n,attrs:s,expose:u}){let h=bc("ComboboxOption"),g=`headlessui-combobox-option-${Qa()}`,m=Lt(null),c=je(()=>e.disabled);u({el:m,$el:m});let I=je(()=>{var ye;return h.virtual.value?h.activeOptionIndex.value===h.calculateIndex(e.value):h.activeOptionIndex.value===null?!1:((ye=h.options.value[h.activeOptionIndex.value])==null?void 0:ye.id)===g}),k=je(()=>h.isSelected(e.value)),M=Hr(J1,null),A=je(()=>({disabled:e.disabled,value:e.value,domRef:m,order:je(()=>e.order)}));an(()=>h.registerOption(g,A)),Ja(()=>h.unregisterOption(g,I.value)),Qn(()=>{let ye=Kt(m);ye&&(M==null||M.value.measureElement(ye))}),Qn(()=>{h.comboboxState.value===0&&I.value&&(h.virtual.value||h.activationTrigger.value!==0&&$r(()=>{var ye,W;return(W=(ye=Kt(m))==null?void 0:ye.scrollIntoView)==null?void 0:W.call(ye,{block:"nearest"})}))});function z(ye){ye.preventDefault(),ye.button===Z1.Left&&(c.value||(h.selectOption(g),O1()||requestAnimationFrame(()=>{var W;return(W=Kt(h.inputRef))==null?void 0:W.focus({preventScroll:!0})}),h.mode.value===0&&h.closeCombobox()))}function q(){var ye;if(e.disabled||(ye=h.virtual.value)!=null&&ye.disabled(e.value))return h.goToOption(gi.Nothing);let W=h.calculateIndex(e.value);h.goToOption(gi.Specific,W)}let K=V1();function J(ye){K.update(ye)}function se(ye){var W;if(!K.wasMoved(ye)||e.disabled||(W=h.virtual.value)!=null&&W.disabled(e.value)||I.value)return;let fe=h.calculateIndex(e.value);h.goToOption(gi.Specific,fe,0)}function ke(ye){var W;K.wasMoved(ye)&&(e.disabled||(W=h.virtual.value)!=null&&W.disabled(e.value)||I.value&&(h.optionsPropsRef.value.hold||h.goToOption(gi.Nothing)))}return()=>{let{disabled:ye}=e,W={active:I.value,selected:k.value,disabled:ye},fe={id:g,ref:m,role:"option",tabIndex:ye===!0?void 0:-1,"aria-disabled":ye===!0?!0:void 0,"aria-selected":k.value,disabled:void 0,onMousedown:z,onFocus:q,onPointerenter:J,onMouseenter:J,onPointermove:se,onMousemove:se,onPointerleave:ke,onMouseleave:ke},Z=dh(e,["order","value"]);return No({ourProps:fe,theirProps:Z,slot:W,attrs:s,slots:n,name:"ComboboxOption"})}}}),Ov=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Bv(e){var n,s;let u=(n=e.innerText)!=null?n:"",h=e.cloneNode(!0);if(!(h instanceof HTMLElement))return u;let g=!1;for(let c of h.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))c.remove(),g=!0;let m=g?(s=h.innerText)!=null?s:"":u;return Ov.test(m)&&(m=m.replace(Ov,"")),m}function ZP(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let s=e.getAttribute("aria-labelledby");if(s){let u=s.split(" ").map(h=>{let g=document.getElementById(h);if(g){let m=g.getAttribute("aria-label");return typeof m=="string"?m.trim():Bv(g).trim()}return null}).filter(Boolean);if(u.length>0)return u.join(", ")}return Bv(e).trim()}function WP(e){let n=Lt(""),s=Lt("");return()=>{let u=Kt(e);if(!u)return"";let h=u.innerText;if(n.value===h)return s.value;let g=ZP(u).trim().toLowerCase();return n.value=h,s.value=g,g}}function XP(e,n){return e===n}var KP=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(KP||{}),JP=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(JP||{}),YP=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(YP||{});function QP(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let Y1=Symbol("ListboxContext");function Nf(e){let n=Hr(Y1,null);if(n===null){let s=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,Nf),s}return n}let ez=Ui({name:"Listbox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>XP},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:n,attrs:s,emit:u}){let h=Lt(1),g=Lt(null),m=Lt(null),c=Lt(null),I=Lt([]),k=Lt(""),M=Lt(null),A=Lt(1);function z(W=fe=>fe){let fe=M.value!==null?I.value[M.value]:null,Z=R1(W(I.value.slice()),Se=>Kt(Se.dataRef.domRef)),ee=fe?Z.indexOf(fe):null;return ee===-1&&(ee=null),{options:Z,activeOptionIndex:ee}}let q=je(()=>e.multiple?1:0),[K,J]=P1(je(()=>e.modelValue),W=>u("update:modelValue",W),je(()=>e.defaultValue)),se=je(()=>K.value===void 0?qr(q.value,{1:[],0:void 0}):K.value),ke={listboxState:h,value:se,mode:q,compare(W,fe){if(typeof e.by=="string"){let Z=e.by;return(W==null?void 0:W[Z])===(fe==null?void 0:fe[Z])}return e.by(W,fe)},orientation:je(()=>e.horizontal?"horizontal":"vertical"),labelRef:g,buttonRef:m,optionsRef:c,disabled:je(()=>e.disabled),options:I,searchQuery:k,activeOptionIndex:M,activationTrigger:A,closeListbox(){e.disabled||h.value!==1&&(h.value=1,M.value=null)},openListbox(){e.disabled||h.value!==0&&(h.value=0)},goToOption(W,fe,Z){if(e.disabled||h.value===1)return;let ee=z(),Se=ug(W===gi.Specific?{focus:gi.Specific,id:fe}:{focus:W},{resolveItems:()=>ee.options,resolveActiveIndex:()=>ee.activeOptionIndex,resolveId:Ee=>Ee.id,resolveDisabled:Ee=>Ee.dataRef.disabled});k.value="",M.value=Se,A.value=Z??1,I.value=ee.options},search(W){if(e.disabled||h.value===1)return;let fe=k.value!==""?0:1;k.value+=W.toLowerCase();let Z=(M.value!==null?I.value.slice(M.value+fe).concat(I.value.slice(0,M.value+fe)):I.value).find(Se=>Se.dataRef.textValue.startsWith(k.value)&&!Se.dataRef.disabled),ee=Z?I.value.indexOf(Z):-1;ee===-1||ee===M.value||(M.value=ee,A.value=1)},clearSearch(){e.disabled||h.value!==1&&k.value!==""&&(k.value="")},registerOption(W,fe){let Z=z(ee=>[...ee,{id:W,dataRef:fe}]);I.value=Z.options,M.value=Z.activeOptionIndex},unregisterOption(W){let fe=z(Z=>{let ee=Z.findIndex(Se=>Se.id===W);return ee!==-1&&Z.splice(ee,1),Z});I.value=fe.options,M.value=fe.activeOptionIndex,A.value=1},theirOnChange(W){e.disabled||J(W)},select(W){e.disabled||J(qr(q.value,{0:()=>W,1:()=>{let fe=Ft(ke.value.value).slice(),Z=Ft(W),ee=fe.findIndex(Se=>ke.compare(Z,Ft(Se)));return ee===-1?fe.push(Z):fe.splice(ee,1),fe}}))}};B1([m,c],(W,fe)=>{var Z;ke.closeListbox(),D1(fe,sy.Loose)||(W.preventDefault(),(Z=Kt(m))==null||Z.focus())},je(()=>h.value===0)),ta(Y1,ke),G1(je(()=>qr(h.value,{0:ds.Open,1:ds.Closed})));let ye=je(()=>{var W;return(W=Kt(m))==null?void 0:W.closest("form")});return an(()=>{Ji([ye],()=>{if(!ye.value||e.defaultValue===void 0)return;function W(){ke.theirOnChange(e.defaultValue)}return ye.value.addEventListener("reset",W),()=>{var fe;(fe=ye.value)==null||fe.removeEventListener("reset",W)}},{immediate:!0})}),()=>{let{name:W,modelValue:fe,disabled:Z,form:ee,...Se}=e,Ee={open:h.value===0,disabled:Z,value:se.value};return Fn(xr,[...W!=null&&se.value!=null?ly({[W]:se.value}).map(([Le,pe])=>Fn(U1,$1({features:ay.Hidden,key:Le,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:ee,disabled:Z,name:Le,value:pe}))):[],No({ourProps:{},theirProps:{...s,...dh(Se,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:Ee,slots:n,attrs:s,name:"Listbox"})])}}}),tz=Ui({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:n,slots:s,expose:u}){var h;let g=(h=e.id)!=null?h:`headlessui-listbox-button-${Qa()}`,m=Nf("ListboxButton");u({el:m.buttonRef,$el:m.buttonRef});function c(A){switch(A.key){case vi.Space:case vi.Enter:case vi.ArrowDown:A.preventDefault(),m.openListbox(),$r(()=>{var z;(z=Kt(m.optionsRef))==null||z.focus({preventScroll:!0}),m.value.value||m.goToOption(gi.First)});break;case vi.ArrowUp:A.preventDefault(),m.openListbox(),$r(()=>{var z;(z=Kt(m.optionsRef))==null||z.focus({preventScroll:!0}),m.value.value||m.goToOption(gi.Last)});break}}function I(A){switch(A.key){case vi.Space:A.preventDefault();break}}function k(A){m.disabled.value||(m.listboxState.value===0?(m.closeListbox(),$r(()=>{var z;return(z=Kt(m.buttonRef))==null?void 0:z.focus({preventScroll:!0})})):(A.preventDefault(),m.openListbox(),QP(()=>{var z;return(z=Kt(m.optionsRef))==null?void 0:z.focus({preventScroll:!0})})))}let M=F1(je(()=>({as:e.as,type:n.type})),m.buttonRef);return()=>{var A,z;let q={open:m.listboxState.value===0,disabled:m.disabled.value,value:m.value.value},{...K}=e,J={ref:m.buttonRef,id:g,type:M.value,"aria-haspopup":"listbox","aria-controls":(A=Kt(m.optionsRef))==null?void 0:A.id,"aria-expanded":m.listboxState.value===0,"aria-labelledby":m.labelRef.value?[(z=Kt(m.labelRef))==null?void 0:z.id,g].join(" "):void 0,disabled:m.disabled.value===!0?!0:void 0,onKeydown:c,onKeyup:I,onClick:k};return No({ourProps:J,theirProps:K,slot:q,attrs:n,slots:s,name:"ListboxButton"})}}}),iz=Ui({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:n,slots:s,expose:u}){var h;let g=(h=e.id)!=null?h:`headlessui-listbox-options-${Qa()}`,m=Nf("ListboxOptions"),c=Lt(null);u({el:m.optionsRef,$el:m.optionsRef});function I(A){switch(c.value&&clearTimeout(c.value),A.key){case vi.Space:if(m.searchQuery.value!=="")return A.preventDefault(),A.stopPropagation(),m.search(A.key);case vi.Enter:if(A.preventDefault(),A.stopPropagation(),m.activeOptionIndex.value!==null){let z=m.options.value[m.activeOptionIndex.value];m.select(z.dataRef.value)}m.mode.value===0&&(m.closeListbox(),$r(()=>{var z;return(z=Kt(m.buttonRef))==null?void 0:z.focus({preventScroll:!0})}));break;case qr(m.orientation.value,{vertical:vi.ArrowDown,horizontal:vi.ArrowRight}):return A.preventDefault(),A.stopPropagation(),m.goToOption(gi.Next);case qr(m.orientation.value,{vertical:vi.ArrowUp,horizontal:vi.ArrowLeft}):return A.preventDefault(),A.stopPropagation(),m.goToOption(gi.Previous);case vi.Home:case vi.PageUp:return A.preventDefault(),A.stopPropagation(),m.goToOption(gi.First);case vi.End:case vi.PageDown:return A.preventDefault(),A.stopPropagation(),m.goToOption(gi.Last);case vi.Escape:A.preventDefault(),A.stopPropagation(),m.closeListbox(),$r(()=>{var z;return(z=Kt(m.buttonRef))==null?void 0:z.focus({preventScroll:!0})});break;case vi.Tab:A.preventDefault(),A.stopPropagation();break;default:A.key.length===1&&(m.search(A.key),c.value=setTimeout(()=>m.clearSearch(),350));break}}let k=H1(),M=je(()=>k!==null?(k.value&ds.Open)===ds.Open:m.listboxState.value===0);return()=>{var A,z;let q={open:m.listboxState.value===0},{...K}=e,J={"aria-activedescendant":m.activeOptionIndex.value===null||(A=m.options.value[m.activeOptionIndex.value])==null?void 0:A.id,"aria-multiselectable":m.mode.value===1?!0:void 0,"aria-labelledby":(z=Kt(m.buttonRef))==null?void 0:z.id,"aria-orientation":m.orientation.value,id:g,onKeydown:I,role:"listbox",tabIndex:0,ref:m.optionsRef};return No({ourProps:J,theirProps:K,slot:q,attrs:n,slots:s,features:Wa.RenderStrategy|Wa.Static,visible:M.value,name:"ListboxOptions"})}}}),rz=Ui({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:n,attrs:s,expose:u}){var h;let g=(h=e.id)!=null?h:`headlessui-listbox-option-${Qa()}`,m=Nf("ListboxOption"),c=Lt(null);u({el:c,$el:c});let I=je(()=>m.activeOptionIndex.value!==null?m.options.value[m.activeOptionIndex.value].id===g:!1),k=je(()=>qr(m.mode.value,{0:()=>m.compare(Ft(m.value.value),Ft(e.value)),1:()=>Ft(m.value.value).some(W=>m.compare(Ft(W),Ft(e.value)))})),M=je(()=>qr(m.mode.value,{1:()=>{var W;let fe=Ft(m.value.value);return((W=m.options.value.find(Z=>fe.some(ee=>m.compare(Ft(ee),Ft(Z.dataRef.value)))))==null?void 0:W.id)===g},0:()=>k.value})),A=WP(c),z=je(()=>({disabled:e.disabled,value:e.value,get textValue(){return A()},domRef:c}));an(()=>m.registerOption(g,z)),Ja(()=>m.unregisterOption(g)),an(()=>{Ji([m.listboxState,k],()=>{m.listboxState.value===0&&k.value&&qr(m.mode.value,{1:()=>{M.value&&m.goToOption(gi.Specific,g)},0:()=>{m.goToOption(gi.Specific,g)}})},{immediate:!0})}),Qn(()=>{m.listboxState.value===0&&I.value&&m.activationTrigger.value!==0&&$r(()=>{var W,fe;return(fe=(W=Kt(c))==null?void 0:W.scrollIntoView)==null?void 0:fe.call(W,{block:"nearest"})})});function q(W){if(e.disabled)return W.preventDefault();m.select(e.value),m.mode.value===0&&(m.closeListbox(),$r(()=>{var fe;return(fe=Kt(m.buttonRef))==null?void 0:fe.focus({preventScroll:!0})}))}function K(){if(e.disabled)return m.goToOption(gi.Nothing);m.goToOption(gi.Specific,g)}let J=V1();function se(W){J.update(W)}function ke(W){J.wasMoved(W)&&(e.disabled||I.value||m.goToOption(gi.Specific,g,0))}function ye(W){J.wasMoved(W)&&(e.disabled||I.value&&m.goToOption(gi.Nothing))}return()=>{let{disabled:W}=e,fe={active:I.value,selected:k.value,disabled:W},{value:Z,disabled:ee,...Se}=e,Ee={id:g,ref:c,role:"option",tabIndex:W===!0?void 0:-1,"aria-disabled":W===!0?!0:void 0,"aria-selected":k.value,disabled:void 0,onClick:q,onFocus:K,onPointerenter:se,onMouseenter:se,onPointermove:ke,onMousemove:ke,onPointerleave:ye,onMouseleave:ye};return No({ourProps:Ee,theirProps:Se,slot:fe,attrs:s,slots:n,name:"ListboxOption"})}}});function Vn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var n=e.ownerDocument;return n&&n.defaultView||window}return e}function Xa(e){var n=Vn(e).Element;return e instanceof n||e instanceof Element}function Yn(e){var n=Vn(e).HTMLElement;return e instanceof n||e instanceof HTMLElement}function cy(e){if(typeof ShadowRoot>"u")return!1;var n=Vn(e).ShadowRoot;return e instanceof n||e instanceof ShadowRoot}var qa=Math.max,xf=Math.min,pc=Math.round;function hg(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function Q1(){return!/^((?!chrome|android).)*safari/i.test(hg())}function mc(e,n,s){n===void 0&&(n=!1),s===void 0&&(s=!1);var u=e.getBoundingClientRect(),h=1,g=1;n&&Yn(e)&&(h=e.offsetWidth>0&&pc(u.width)/e.offsetWidth||1,g=e.offsetHeight>0&&pc(u.height)/e.offsetHeight||1);var m=Xa(e)?Vn(e):window,c=m.visualViewport,I=!Q1()&&s,k=(u.left+(I&&c?c.offsetLeft:0))/h,M=(u.top+(I&&c?c.offsetTop:0))/g,A=u.width/h,z=u.height/g;return{width:A,height:z,top:M,right:k+A,bottom:M+z,left:k,x:k,y:M}}function uy(e){var n=Vn(e),s=n.pageXOffset,u=n.pageYOffset;return{scrollLeft:s,scrollTop:u}}function nz(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function oz(e){return e===Vn(e)||!Yn(e)?uy(e):nz(e)}function Vo(e){return e?(e.nodeName||"").toLowerCase():null}function oa(e){return((Xa(e)?e.ownerDocument:e.document)||window.document).documentElement}function hy(e){return mc(oa(e)).left+uy(e).scrollLeft}function fs(e){return Vn(e).getComputedStyle(e)}function dy(e){var n=fs(e),s=n.overflow,u=n.overflowX,h=n.overflowY;return/auto|scroll|overlay|hidden/.test(s+h+u)}function sz(e){var n=e.getBoundingClientRect(),s=pc(n.width)/e.offsetWidth||1,u=pc(n.height)/e.offsetHeight||1;return s!==1||u!==1}function az(e,n,s){s===void 0&&(s=!1);var u=Yn(n),h=Yn(n)&&sz(n),g=oa(n),m=mc(e,h,s),c={scrollLeft:0,scrollTop:0},I={x:0,y:0};return(u||!u&&!s)&&((Vo(n)!=="body"||dy(g))&&(c=oz(n)),Yn(n)?(I=mc(n,!0),I.x+=n.clientLeft,I.y+=n.clientTop):g&&(I.x=hy(g))),{x:m.left+c.scrollLeft-I.x,y:m.top+c.scrollTop-I.y,width:m.width,height:m.height}}function fy(e){var n=mc(e),s=e.offsetWidth,u=e.offsetHeight;return Math.abs(n.width-s)<=1&&(s=n.width),Math.abs(n.height-u)<=1&&(u=n.height),{x:e.offsetLeft,y:e.offsetTop,width:s,height:u}}function jf(e){return Vo(e)==="html"?e:e.assignedSlot||e.parentNode||(cy(e)?e.host:null)||oa(e)}function ew(e){return["html","body","#document"].indexOf(Vo(e))>=0?e.ownerDocument.body:Yn(e)&&dy(e)?e:ew(jf(e))}function Xu(e,n){var s;n===void 0&&(n=[]);var u=ew(e),h=u===((s=e.ownerDocument)==null?void 0:s.body),g=Vn(u),m=h?[g].concat(g.visualViewport||[],dy(u)?u:[]):u,c=n.concat(m);return h?c:c.concat(Xu(jf(m)))}function lz(e){return["table","td","th"].indexOf(Vo(e))>=0}function Fv(e){return!Yn(e)||fs(e).position==="fixed"?null:e.offsetParent}function cz(e){var n=/firefox/i.test(hg()),s=/Trident/i.test(hg());if(s&&Yn(e)){var u=fs(e);if(u.position==="fixed")return null}var h=jf(e);for(cy(h)&&(h=h.host);Yn(h)&&["html","body"].indexOf(Vo(h))<0;){var g=fs(h);if(g.transform!=="none"||g.perspective!=="none"||g.contain==="paint"||["transform","perspective"].indexOf(g.willChange)!==-1||n&&g.willChange==="filter"||n&&g.filter&&g.filter!=="none")return h;h=h.parentNode}return null}function fh(e){for(var n=Vn(e),s=Fv(e);s&&lz(s)&&fs(s).position==="static";)s=Fv(s);return s&&(Vo(s)==="html"||Vo(s)==="body"&&fs(s).position==="static")?n:s||cz(e)||n}var On="top",po="bottom",mo="right",Bn="left",py="auto",ph=[On,po,mo,Bn],gc="start",ah="end",uz="clippingParents",tw="viewport",Bu="popper",hz="reference",Vv=ph.reduce(function(e,n){return e.concat([n+"-"+gc,n+"-"+ah])},[]),iw=[].concat(ph,[py]).reduce(function(e,n){return e.concat([n,n+"-"+gc,n+"-"+ah])},[]),dz="beforeRead",fz="read",pz="afterRead",mz="beforeMain",gz="main",yz="afterMain",_z="beforeWrite",vz="write",xz="afterWrite",bz=[dz,fz,pz,mz,gz,yz,_z,vz,xz];function wz(e){var n=new Map,s=new Set,u=[];e.forEach(function(g){n.set(g.name,g)});function h(g){s.add(g.name);var m=[].concat(g.requires||[],g.requiresIfExists||[]);m.forEach(function(c){if(!s.has(c)){var I=n.get(c);I&&h(I)}}),u.push(g)}return e.forEach(function(g){s.has(g.name)||h(g)}),u}function Ez(e){var n=wz(e);return bz.reduce(function(s,u){return s.concat(n.filter(function(h){return h.phase===u}))},[])}function Sz(e){var n;return function(){return n||(n=new Promise(function(s){Promise.resolve().then(function(){n=void 0,s(e())})})),n}}function Iz(e){var n=e.reduce(function(s,u){var h=s[u.name];return s[u.name]=h?Object.assign({},h,u,{options:Object.assign({},h.options,u.options),data:Object.assign({},h.data,u.data)}):u,s},{});return Object.keys(n).map(function(s){return n[s]})}function Tz(e,n){var s=Vn(e),u=oa(e),h=s.visualViewport,g=u.clientWidth,m=u.clientHeight,c=0,I=0;if(h){g=h.width,m=h.height;var k=Q1();(k||!k&&n==="fixed")&&(c=h.offsetLeft,I=h.offsetTop)}return{width:g,height:m,x:c+hy(e),y:I}}function Cz(e){var n,s=oa(e),u=uy(e),h=(n=e.ownerDocument)==null?void 0:n.body,g=qa(s.scrollWidth,s.clientWidth,h?h.scrollWidth:0,h?h.clientWidth:0),m=qa(s.scrollHeight,s.clientHeight,h?h.scrollHeight:0,h?h.clientHeight:0),c=-u.scrollLeft+hy(e),I=-u.scrollTop;return fs(h||s).direction==="rtl"&&(c+=qa(s.clientWidth,h?h.clientWidth:0)-g),{width:g,height:m,x:c,y:I}}function rw(e,n){var s=n.getRootNode&&n.getRootNode();if(e.contains(n))return!0;if(s&&cy(s)){var u=n;do{if(u&&e.isSameNode(u))return!0;u=u.parentNode||u.host}while(u)}return!1}function dg(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Az(e,n){var s=mc(e,!1,n==="fixed");return s.top=s.top+e.clientTop,s.left=s.left+e.clientLeft,s.bottom=s.top+e.clientHeight,s.right=s.left+e.clientWidth,s.width=e.clientWidth,s.height=e.clientHeight,s.x=s.left,s.y=s.top,s}function Nv(e,n,s){return n===tw?dg(Tz(e,s)):Xa(n)?Az(n,s):dg(Cz(oa(e)))}function Mz(e){var n=Xu(jf(e)),s=["absolute","fixed"].indexOf(fs(e).position)>=0,u=s&&Yn(e)?fh(e):e;return Xa(u)?n.filter(function(h){return Xa(h)&&rw(h,u)&&Vo(h)!=="body"}):[]}function kz(e,n,s,u){var h=n==="clippingParents"?Mz(e):[].concat(n),g=[].concat(h,[s]),m=g[0],c=g.reduce(function(I,k){var M=Nv(e,k,u);return I.top=qa(M.top,I.top),I.right=xf(M.right,I.right),I.bottom=xf(M.bottom,I.bottom),I.left=qa(M.left,I.left),I},Nv(e,m,u));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function Do(e){return e.split("-")[0]}function yc(e){return e.split("-")[1]}function my(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function nw(e){var n=e.reference,s=e.element,u=e.placement,h=u?Do(u):null,g=u?yc(u):null,m=n.x+n.width/2-s.width/2,c=n.y+n.height/2-s.height/2,I;switch(h){case On:I={x:m,y:n.y-s.height};break;case po:I={x:m,y:n.y+n.height};break;case mo:I={x:n.x+n.width,y:c};break;case Bn:I={x:n.x-s.width,y:c};break;default:I={x:n.x,y:n.y}}var k=h?my(h):null;if(k!=null){var M=k==="y"?"height":"width";switch(g){case gc:I[k]=I[k]-(n[M]/2-s[M]/2);break;case ah:I[k]=I[k]+(n[M]/2-s[M]/2);break}}return I}function ow(){return{top:0,right:0,bottom:0,left:0}}function sw(e){return Object.assign({},ow(),e)}function aw(e,n){return n.reduce(function(s,u){return s[u]=e,s},{})}function gy(e,n){n===void 0&&(n={});var s=n,u=s.placement,h=u===void 0?e.placement:u,g=s.strategy,m=g===void 0?e.strategy:g,c=s.boundary,I=c===void 0?uz:c,k=s.rootBoundary,M=k===void 0?tw:k,A=s.elementContext,z=A===void 0?Bu:A,q=s.altBoundary,K=q===void 0?!1:q,J=s.padding,se=J===void 0?0:J,ke=sw(typeof se!="number"?se:aw(se,ph)),ye=z===Bu?hz:Bu,W=e.rects.popper,fe=e.elements[K?ye:z],Z=kz(Xa(fe)?fe:fe.contextElement||oa(e.elements.popper),I,M,m),ee=mc(e.elements.reference),Se=nw({reference:ee,element:W,strategy:"absolute",placement:h}),Ee=dg(Object.assign({},W,Se)),Le=z===Bu?Ee:ee,pe={top:Z.top-Le.top+ke.top,bottom:Le.bottom-Z.bottom+ke.bottom,left:Z.left-Le.left+ke.left,right:Le.right-Z.right+ke.right},Ie=e.modifiersData.offset;if(z===Bu&&Ie){var Ae=Ie[h];Object.keys(pe).forEach(function(De){var Ge=[mo,po].indexOf(De)>=0?1:-1,rt=[On,po].indexOf(De)>=0?"y":"x";pe[De]+=Ae[rt]*Ge})}return pe}var jv={placement:"bottom",modifiers:[],strategy:"absolute"};function $v(){for(var e=arguments.length,n=new Array(e),s=0;s=0});z.length===0&&(z=A);var q=z.reduce(function(K,J){return K[J]=gy(e,{placement:J,boundary:h,rootBoundary:g,padding:m})[Do(J)],K},{});return Object.keys(q).sort(function(K,J){return q[K]-q[J]})}function Hz(e){if(Do(e)===py)return[];var n=Jd(e);return[qv(e),n,qv(n)]}function Gz(e){var n=e.state,s=e.options,u=e.name;if(!n.modifiersData[u]._skip){for(var h=s.mainAxis,g=h===void 0?!0:h,m=s.altAxis,c=m===void 0?!0:m,I=s.fallbackPlacements,k=s.padding,M=s.boundary,A=s.rootBoundary,z=s.altBoundary,q=s.flipVariations,K=q===void 0?!0:q,J=s.allowedAutoPlacements,se=n.options.placement,ke=Do(se),ye=ke===se,W=I||(ye||!K?[Jd(se)]:Hz(se)),fe=[se].concat(W).reduce(function(Xi,zi){return Xi.concat(Do(zi)===py?qz(n,{placement:zi,boundary:M,rootBoundary:A,padding:k,flipVariations:K,allowedAutoPlacements:J}):zi)},[]),Z=n.rects.reference,ee=n.rects.popper,Se=new Map,Ee=!0,Le=fe[0],pe=0;pe=0,rt=Ge?"width":"height",Xe=gy(n,{placement:Ie,boundary:M,rootBoundary:A,altBoundary:z,padding:k}),dt=Ge?De?mo:Bn:De?po:On;Z[rt]>ee[rt]&&(dt=Jd(dt));var nt=Jd(dt),ei=[];if(g&&ei.push(Xe[Ae]<=0),c&&ei.push(Xe[dt]<=0,Xe[nt]<=0),ei.every(function(Xi){return Xi})){Le=Ie,Ee=!1;break}Se.set(Ie,ei)}if(Ee)for(var $t=K?3:1,Vt=function(zi){var hi=fe.find(function(Li){var Di=Se.get(Li);if(Di)return Di.slice(0,zi).every(function(Or){return Or})});if(hi)return Le=hi,"break"},Nt=$t;Nt>0;Nt--){var wi=Vt(Nt);if(wi==="break")break}n.placement!==Le&&(n.modifiersData[u]._skip=!0,n.placement=Le,n.reset=!0)}}const Zz={name:"flip",enabled:!0,phase:"main",fn:Gz,requiresIfExists:["offset"],data:{_skip:!1}};function Wz(e,n,s){var u=Do(e),h=[Bn,On].indexOf(u)>=0?-1:1,g=typeof s=="function"?s(Object.assign({},n,{placement:e})):s,m=g[0],c=g[1];return m=m||0,c=(c||0)*h,[Bn,mo].indexOf(u)>=0?{x:c,y:m}:{x:m,y:c}}function Xz(e){var n=e.state,s=e.options,u=e.name,h=s.offset,g=h===void 0?[0,0]:h,m=iw.reduce(function(M,A){return M[A]=Wz(A,n.rects,g),M},{}),c=m[n.placement],I=c.x,k=c.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=I,n.modifiersData.popperOffsets.y+=k),n.modifiersData[u]=m}const Kz={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Xz};function Jz(e){return e==="x"?"y":"x"}function Ku(e,n,s){return qa(e,xf(n,s))}function Yz(e,n,s){var u=Ku(e,n,s);return u>s?s:u}function Qz(e){var n=e.state,s=e.options,u=e.name,h=s.mainAxis,g=h===void 0?!0:h,m=s.altAxis,c=m===void 0?!1:m,I=s.boundary,k=s.rootBoundary,M=s.altBoundary,A=s.padding,z=s.tether,q=z===void 0?!0:z,K=s.tetherOffset,J=K===void 0?0:K,se=gy(n,{boundary:I,rootBoundary:k,padding:A,altBoundary:M}),ke=Do(n.placement),ye=yc(n.placement),W=!ye,fe=my(ke),Z=Jz(fe),ee=n.modifiersData.popperOffsets,Se=n.rects.reference,Ee=n.rects.popper,Le=typeof J=="function"?J(Object.assign({},n.rects,{placement:n.placement})):J,pe=typeof Le=="number"?{mainAxis:Le,altAxis:Le}:Object.assign({mainAxis:0,altAxis:0},Le),Ie=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,Ae={x:0,y:0};if(ee){if(g){var De,Ge=fe==="y"?On:Bn,rt=fe==="y"?po:mo,Xe=fe==="y"?"height":"width",dt=ee[fe],nt=dt+se[Ge],ei=dt-se[rt],$t=q?-Ee[Xe]/2:0,Vt=ye===gc?Se[Xe]:Ee[Xe],Nt=ye===gc?-Ee[Xe]:-Se[Xe],wi=n.elements.arrow,Xi=q&&wi?fy(wi):{width:0,height:0},zi=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:ow(),hi=zi[Ge],Li=zi[rt],Di=Ku(0,Se[Xe],Xi[Xe]),Or=W?Se[Xe]/2-$t-Di-hi-pe.mainAxis:Vt-Di-hi-pe.mainAxis,cr=W?-Se[Xe]/2+$t+Di+Li+pe.mainAxis:Nt+Di+Li+pe.mainAxis,Br=n.elements.arrow&&fh(n.elements.arrow),rr=Br?fe==="y"?Br.clientTop||0:Br.clientLeft||0:0,ce=(De=Ie==null?void 0:Ie[fe])!=null?De:0,ge=dt+Or-ce-rr,Be=dt+cr-ce,ae=Ku(q?xf(nt,ge):nt,dt,q?qa(ei,Be):ei);ee[fe]=ae,Ae[fe]=ae-dt}if(c){var He,tt=fe==="x"?On:Bn,Ze=fe==="x"?po:mo,$e=ee[Z],Qe=Z==="y"?"height":"width",We=$e+se[tt],pt=$e-se[Ze],St=[On,Bn].indexOf(ke)!==-1,vt=(He=Ie==null?void 0:Ie[Z])!=null?He:0,Mt=St?We:$e-Se[Qe]-Ee[Qe]-vt+pe.altAxis,qt=St?$e+Se[Qe]+Ee[Qe]-vt-pe.altAxis:pt,Ne=q&&St?Yz(Mt,$e,qt):Ku(q?Mt:We,$e,q?qt:pt);ee[Z]=Ne,Ae[Z]=Ne-$e}n.modifiersData[u]=Ae}}const e5={name:"preventOverflow",enabled:!0,phase:"main",fn:Qz,requiresIfExists:["offset"]};var t5=function(n,s){return n=typeof n=="function"?n(Object.assign({},s.rects,{placement:s.placement})):n,sw(typeof n!="number"?n:aw(n,ph))};function i5(e){var n,s=e.state,u=e.name,h=e.options,g=s.elements.arrow,m=s.modifiersData.popperOffsets,c=Do(s.placement),I=my(c),k=[Bn,mo].indexOf(c)>=0,M=k?"height":"width";if(!(!g||!m)){var A=t5(h.padding,s),z=fy(g),q=I==="y"?On:Bn,K=I==="y"?po:mo,J=s.rects.reference[M]+s.rects.reference[I]-m[I]-s.rects.popper[M],se=m[I]-s.rects.reference[I],ke=fh(g),ye=ke?I==="y"?ke.clientHeight||0:ke.clientWidth||0:0,W=J/2-se/2,fe=A[q],Z=ye-z[M]-A[K],ee=ye/2-z[M]/2+W,Se=Ku(fe,ee,Z),Ee=I;s.modifiersData[u]=(n={},n[Ee]=Se,n.centerOffset=Se-ee,n)}}function r5(e){var n=e.state,s=e.options,u=s.element,h=u===void 0?"[data-popper-arrow]":u;h!=null&&(typeof h=="string"&&(h=n.elements.popper.querySelector(h),!h)||rw(n.elements.popper,h)&&(n.elements.arrow=h))}const n5={name:"arrow",enabled:!0,phase:"main",fn:i5,effect:r5,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},o5=Lz({defaultModifiers:[...jz,Kz,Zz,e5,cw,lw,n5]});function s5({locked:e=!1,overflowPadding:n=8,offsetDistance:s=8,offsetSkid:u=0,gpuAcceleration:h=!0,adaptive:g=!0,scroll:m=!0,resize:c=!0,arrow:I=!1,placement:k,strategy:M},A){const z=Lt(null),q=Lt(null),K=Lt(null);return an(()=>{Qn(J=>{if(!q.value||!z.value&&!(A!=null&&A.value))return;const se=lv(q),ke=lv(z);if(!(se instanceof HTMLElement)||!ke)return;const ye={modifiers:[{name:"flip",enabled:!e},{name:"preventOverflow",options:{padding:n}},{name:"offset",options:{offset:[u,s]}},{name:"computeStyles",options:{adaptive:g,gpuAcceleration:h}},{name:"eventListeners",options:{scroll:m,resize:c}},{name:"arrow",enabled:I}]};k&&(ye.placement=k),M&&(ye.strategy=M),K.value=o5(ke,se,ye),J(K.value.destroy)})}),[z,q,K]}const Mo=Ya(tr.ui.strategy,tr.ui.select,_k),Nd=Ya(tr.ui.strategy,tr.ui.selectMenu,vk),a5=Ui({components:{HCombobox:$P,HComboboxButton:UP,HComboboxOptions:HP,HComboboxOption:GP,HComboboxInput:qP,HListbox:ez,HListboxButton:tz,HListboxOptions:iz,HListboxOption:rz,UIcon:na,UAvatar:k1},inheritAttrs:!1,props:{modelValue:{type:[String,Number,Object,Array,Boolean],default:""},query:{type:String,default:null},by:{type:String,default:void 0},options:{type:Array,default:()=>[]},id:{type:String,default:null},name:{type:String,default:null},required:{type:Boolean,default:!1},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>Mo.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:()=>Mo.default.trailingIcon},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},selectedIcon:{type:String,default:()=>Nd.default.selectedIcon},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},searchable:{type:[Boolean,Function],default:!1},searchablePlaceholder:{type:String,default:"Search..."},searchableLazy:{type:Boolean,default:!1},clearSearchOnClose:{type:Boolean,default:()=>Nd.default.clearSearchOnClose},debounce:{type:Number,default:200},creatable:{type:Boolean,default:!1},showCreateOptionWhen:{type:String,default:()=>Nd.default.showCreateOptionWhen},placeholder:{type:String,default:null},padded:{type:Boolean,default:!0},size:{type:String,default:null,validator(e){return Object.keys(Mo.size).includes(e)}},color:{type:String,default:()=>Mo.default.color,validator(e){return[...tr.ui.colors,...Object.keys(Mo.color)].includes(e)}},variant:{type:String,default:()=>Mo.default.variant,validator(e){return[...Object.keys(Mo.variant),...Object.values(Mo.color).flatMap(n=>Object.keys(n))].includes(e)}},optionAttribute:{type:String,default:"label"},valueAttribute:{type:String,default:null},searchAttributes:{type:Array,default:null},popper:{type:Object,default:()=>({})},selectClass:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},uiMenu:{type:Object,default:()=>({})}},emits:["update:modelValue","update:query","open","close","change"],setup(e,{emit:n,slots:s}){const{ui:u,attrs:h}=fc("select",zo(e,"ui"),Mo,zo(e,"class")),{ui:g}=fc("selectMenu",zo(e,"uiMenu"),Nd),m=je(()=>Df({},e.popper,g.value.popper)),[c,I]=s5(m.value),{size:k,rounded:M}=Bf({ui:u,props:e}),{emitFormBlur:A,emitFormChange:z,inputId:q,color:K,size:J,name:se}=M1(e,Mo),ke=je(()=>k.value||J.value),ye=Lt(""),W=je({get(){return e.query??ye.value},set($t){ye.value=$t,n("update:query",$t)}}),fe=je(()=>{if(e.multiple)return Array.isArray(e.modelValue)&&e.modelValue.length?`${e.modelValue.length} selected`:null;if(e.modelValue!==void 0&&e.modelValue!==null)if(e.valueAttribute){const $t=e.options.find(Vt=>Vt[e.valueAttribute]===e.modelValue);return $t?$t[e.optionAttribute]:null}else return["string","number"].includes(typeof e.modelValue)?e.modelValue:e.modelValue[e.optionAttribute];return null}),Z=je(()=>{var Vt,Nt;const $t=((Nt=(Vt=u.value.color)==null?void 0:Vt[K.value])==null?void 0:Nt[e.variant])||u.value.variant[e.variant];return dc(wr(u.value.base,g.value.select,M.value,u.value.size[ke.value],u.value.gap[ke.value],e.padded?u.value.padding[ke.value]:"p-0",$t==null?void 0:$t.replaceAll("{color}",K.value),(ee.value||s.leading)&&u.value.leading.padding[ke.value],(Se.value||s.trailing)&&u.value.trailing.padding[ke.value]),e.placeholder&&!e.modelValue&&u.value.placeholder,e.selectClass)}),ee=je(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),Se=je(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),Ee=je(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),Le=je(()=>e.loading&&!ee.value?e.loadingIcon:e.trailingIcon||e.icon),pe=je(()=>wr(u.value.icon.leading.wrapper,u.value.icon.leading.pointer,u.value.icon.leading.padding[ke.value])),Ie=je(()=>wr(u.value.icon.base,K.value&&tr.ui.colors.includes(K.value)&&u.value.icon.color.replaceAll("{color}",K.value),u.value.icon.size[ke.value],e.loading&&u.value.icon.loading)),Ae=je(()=>wr(u.value.icon.trailing.wrapper,u.value.icon.trailing.pointer,u.value.icon.trailing.padding[ke.value])),De=je(()=>wr(u.value.icon.base,K.value&&tr.ui.colors.includes(K.value)&&u.value.icon.color.replaceAll("{color}",K.value),u.value.icon.size[ke.value],e.loading&&!ee.value&&u.value.icon.loading)),Ge=typeof e.searchable=="function"?Kb(e.searchable,e.debounce):void 0,rt=FA(async()=>e.searchable&&Ge?await Ge(W.value):W.value===""?e.options:e.options.filter($t=>{var Vt;return((Vt=e.searchAttributes)!=null&&Vt.length?e.searchAttributes:[e.optionAttribute]).some(Nt=>{if(["string","number"].includes(typeof $t))return String($t).search(new RegExp(W.value,"i"))!==-1;const wi=i1($t,Nt);return wi!=null&&String(wi).search(new RegExp(W.value,"i"))!==-1})}),[],{lazy:e.searchableLazy}),Xe=je(()=>W.value===""||e.showCreateOptionWhen==="empty"&&rt.value.length||e.showCreateOptionWhen==="always"&&rt.value.find(Vt=>["string","number"].includes(typeof Vt)?Vt===W.value:Vt[e.optionAttribute]===W.value)?null:["string","number"].includes(typeof e.modelValue)?W.value:{[e.optionAttribute]:W.value});function dt(){e.clearSearchOnClose&&(W.value="")}Ji(I,$t=>{$t?n("open"):(dt(),n("close"),A())});function nt($t){n("update:modelValue",$t),n("change",$t),z()}function ei($t){W.value=$t.target.value}return xP(()=>iP("$YMH7mn4R4k")),{ui:u,uiMenu:g,attrs:h,name:se,inputId:q,popper:m,trigger:c,container:I,label:fe,isLeading:ee,isTrailing:Se,selectClass:Z,leadingIconName:Ee,leadingIconClass:Ie,leadingWrapperIconClass:pe,trailingIconName:Le,trailingIconClass:De,trailingWrapperIconClass:Ae,filteredOptions:rt,createOption:Xe,query:W,onUpdate:nt,onQueryChange:ei}}}),l5=["value","required"],c5=["id","disabled"],u5={class:"truncate"};function h5(e,n,s,u,h,g){const m=na,c=Mm("HComboboxInput"),I=k1;return At(),ki(cs(e.searchable?"HCombobox":"HListbox"),{by:e.by,name:e.name,"model-value":e.modelValue,multiple:e.multiple,disabled:e.disabled,as:"div",class:Wt(e.ui.wrapper),"onUpdate:modelValue":e.onUpdate},{default:Rr(({open:k})=>[e.required?(At(),Mi("input",{key:0,value:e.modelValue,required:e.required,class:Wt(e.uiMenu.required),tabindex:"-1","aria-hidden":"true"},null,10,l5)):Dr("",!0),(At(),ki(cs(e.searchable?"HComboboxButton":"HListboxButton"),{ref:"trigger",as:"div",role:"button",class:Wt(e.uiMenu.trigger)},{default:Rr(()=>[vr(e.$slots,"default",{open:k,disabled:e.disabled,loading:e.loading},()=>[lr("button",fo({id:e.inputId,class:e.selectClass,disabled:e.disabled,type:"button"},e.attrs),[e.isLeading&&e.leadingIconName||e.$slots.leading?(At(),Mi("span",{key:0,class:Wt(e.leadingWrapperIconClass)},[vr(e.$slots,"leading",{disabled:e.disabled,loading:e.loading},()=>[ri(m,{name:e.leadingIconName,class:Wt(e.leadingIconClass)},null,8,["name","class"])])],2)):Dr("",!0),vr(e.$slots,"label",{},()=>[e.label?(At(),Mi("span",{key:0,class:Wt(e.uiMenu.label)},nn(e.label),3)):(At(),Mi("span",{key:1,class:Wt(e.uiMenu.label)},nn(e.placeholder||" "),3))]),e.isTrailing&&e.trailingIconName||e.$slots.trailing?(At(),Mi("span",{key:1,class:Wt(e.trailingWrapperIconClass)},[vr(e.$slots,"trailing",{disabled:e.disabled,loading:e.loading},()=>[ri(m,{name:e.trailingIconName,class:Wt(e.trailingIconClass),"aria-hidden":"true"},null,8,["name","class"])])],2)):Dr("",!0)],16,c5)])]),_:2},1032,["class"])),k?(At(),Mi("div",{key:1,ref:"container",class:Wt([e.uiMenu.container,e.uiMenu.width])},[ri(zg,fo({appear:""},e.uiMenu.transition),{default:Rr(()=>[lr("div",null,[e.popper.arrow?(At(),Mi("div",{key:0,"data-popper-arrow":"",class:Wt(Object.values(e.uiMenu.arrow))},null,2)):Dr("",!0),(At(),ki(cs(e.searchable?"HComboboxOptions":"HListboxOptions"),{static:"",class:Wt([e.uiMenu.base,e.uiMenu.ring,e.uiMenu.rounded,e.uiMenu.shadow,e.uiMenu.background,e.uiMenu.padding,e.uiMenu.height])},{default:Rr(()=>{var M,A;return[e.searchable?(At(),ki(c,{key:0,"display-value":()=>e.query,name:"q",placeholder:e.searchablePlaceholder,autofocus:"",autocomplete:"off",class:Wt(e.uiMenu.input),onChange:e.onQueryChange},null,8,["display-value","placeholder","class","onChange"])):Dr("",!0),(At(!0),Mi(xr,null,OS(e.filteredOptions,(z,q)=>(At(),ki(cs(e.searchable?"HComboboxOption":"HListboxOption"),{key:q,as:"template",value:e.valueAttribute?z[e.valueAttribute]:z,disabled:z.disabled},{default:Rr(({active:K,selected:J,disabled:se})=>[lr("li",{class:Wt([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,K?e.uiMenu.option.active:e.uiMenu.option.inactive,J&&e.uiMenu.option.selected,se&&e.uiMenu.option.disabled])},[lr("div",{class:Wt(e.uiMenu.option.container)},[vr(e.$slots,"option",{option:z,active:K,selected:J},()=>[z.icon?(At(),ki(m,{key:0,name:z.icon,class:Wt([e.uiMenu.option.icon.base,K?e.uiMenu.option.icon.active:e.uiMenu.option.icon.inactive,z.iconClass]),"aria-hidden":"true"},null,8,["name","class"])):z.avatar?(At(),ki(I,fo({key:1,ref_for:!0},{size:e.uiMenu.option.avatar.size,...z.avatar},{class:e.uiMenu.option.avatar.base,"aria-hidden":"true"}),null,16,["class"])):z.chip?(At(),Mi("span",{key:2,class:Wt(e.uiMenu.option.chip.base),style:Ha({background:`#${z.chip}`})},null,6)):Dr("",!0),lr("span",u5,nn(["string","number"].includes(typeof z)?z:z[e.optionAttribute]),1)])],2),J?(At(),Mi("span",{key:0,class:Wt([e.uiMenu.option.selectedIcon.wrapper,e.uiMenu.option.selectedIcon.padding])},[ri(m,{name:e.selectedIcon,class:Wt(e.uiMenu.option.selectedIcon.base),"aria-hidden":"true"},null,8,["name","class"])],2)):Dr("",!0)],2)]),_:2},1032,["value","disabled"]))),128)),e.creatable&&e.createOption?(At(),ki(cs(e.searchable?"HComboboxOption":"HListboxOption"),{key:1,value:e.createOption,as:"template"},{default:Rr(({active:z,selected:q})=>[lr("li",{class:Wt([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,z?e.uiMenu.option.active:e.uiMenu.option.inactive])},[lr("div",{class:Wt(e.uiMenu.option.container)},[vr(e.$slots,"option-create",{option:e.createOption,active:z,selected:q},()=>[lr("span",{class:Wt(e.uiMenu.option.create)},'Create "'+nn(e.createOption[e.optionAttribute])+'"',3)])],2)],2)]),_:3},8,["value"])):e.searchable&&e.query&&!((M=e.filteredOptions)!=null&&M.length)?(At(),Mi("p",{key:2,class:Wt(e.uiMenu.option.empty)},[vr(e.$slots,"option-empty",{query:e.query},()=>[hs(' No results for "'+nn(e.query)+'". ',1)])],2)):(A=e.filteredOptions)!=null&&A.length?Dr("",!0):(At(),Mi("p",{key:3,class:Wt(e.uiMenu.empty)},[vr(e.$slots,"empty",{query:e.query},()=>[hs(" No options. ")])],2))]}),_:3},8,["class"]))])]),_:3},16)],2)):Dr("",!0)]),_:3},8,["by","name","model-value","multiple","disabled","class","onUpdate:modelValue"])}const d5=yo(a5,[["render",h5]]);var f5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function p5(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uw={exports:{}};/** +`));let q=j1((m=A.props)!=null?m:{},I,M),K=Bo(A,q,!0);for(let J in q)J.startsWith("on")&&(K.props||(K.props={}),K.props[J]=q[J]);return K}return Array.isArray(k)&&k.length===1?k[0]:k}return Fn(c,Object.assign({},I,M),{default:()=>k})}function N1(e){return e.flatMap(n=>n.type===mr?N1(n.children):[n])}function j1(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},s={};for(let u of e)for(let h in u)h.startsWith("on")&&typeof u[h]=="function"?(s[h]!=null||(s[h]=[]),s[h].push(u[h])):n[h]=u[h];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(s).map(u=>[u,void 0])));for(let u in s)Object.assign(n,{[u](h,...g){let m=s[u];for(let c of m){if(h instanceof Event&&h.defaultPrevented)return;c(h,...g)}}});return n}function $1(e){let n=Object.assign({},e);for(let s in n)n[s]===void 0&&delete n[s];return n}function dh(e,n=[]){let s=Object.assign({},e);for(let u of n)u in s&&delete s[u];return s}function zP(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var ay=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ay||{});let U1=Ui({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:n,attrs:s}){return()=>{var u;let{features:h,...g}=e,m={"aria-hidden":(h&2)===2?!0:(u=g["aria-hidden"])!=null?u:void 0,hidden:(h&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(h&4)===4&&(h&2)!==2&&{display:"none"}}};return No({ourProps:m,theirProps:g,slot:{},attrs:s,slots:n,name:"Hidden"})}}}),q1=Symbol("Context");var ds=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ds||{});function H1(){return Hr(q1,null)}function G1(e){ta(q1,e)}var vi=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(vi||{}),W1=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(W1||{});function DP(e){function n(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",n))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",n),n())}let Na=[];DP(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&Na[0]!==n.target&&(Na.unshift(n.target),Na=Na.filter(s=>s!=null&&s.isConnected),Na.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function RP(e){throw new Error("Unexpected object: "+e)}var gi=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(gi||{});function ug(e,n){let s=n.resolveItems();if(s.length<=0)return null;let u=n.resolveActiveIndex(),h=u??-1;switch(e.focus){case 0:{for(let g=0;g=0;--g)if(!n.resolveDisabled(s[g],g,s))return g;return u}case 2:{for(let g=h+1;g=0;--g)if(!n.resolveDisabled(s[g],g,s))return g;return u}case 4:{for(let g=0;g(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(FP||{}),VP=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(VP||{}),NP=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(NP||{});let K1=Symbol("ComboboxContext");function bc(e){let n=Hr(K1,null);if(n===null){let s=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,bc),s}return n}let J1=Symbol("VirtualContext"),jP=Ui({name:"VirtualProvider",setup(e,{slots:n}){let s=bc("VirtualProvider"),u=je(()=>{let c=Kt(s.optionsRef);if(!c)return{start:0,end:0};let I=window.getComputedStyle(c);return{start:parseFloat(I.paddingBlockStart||I.paddingTop),end:parseFloat(I.paddingBlockEnd||I.paddingBottom)}}),h=mP(je(()=>({scrollPaddingStart:u.value.start,scrollPaddingEnd:u.value.end,count:s.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return Kt(s.optionsRef)},overscan:12}))),g=je(()=>{var c;return(c=s.virtual.value)==null?void 0:c.options}),m=Lt(0);return er([g],()=>{m.value+=1}),ta(J1,s.virtual.value?h:null),()=>[Fn("div",{style:{position:"relative",width:"100%",height:`${h.value.getTotalSize()}px`},ref:c=>{if(c){if(typeof process<"u"&&OP.JEST_WORKER_ID!==void 0||s.activationTrigger.value===0)return;s.activeOptionIndex.value!==null&&s.virtual.value.options.length>s.activeOptionIndex.value&&h.value.scrollToIndex(s.activeOptionIndex.value)}}},h.value.getVirtualItems().map(c=>Bo(n.default({option:s.virtual.value.options[c.index],open:s.comboboxState.value===0})[0],{key:`${m.value}-${c.index}`,"data-index":c.index,"aria-setsize":s.virtual.value.options.length,"aria-posinset":c.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${c.start}px)`,overflowAnchor:"none"}})))]}}),$P=Ui({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:n,attrs:s,emit:u}){let h=Lt(1),g=Lt(null),m=Lt(null),c=Lt(null),I=Lt(null),k=Lt({static:!1,hold:!1}),M=Lt([]),A=Lt(null),z=Lt(2),q=Lt(!1);function K(pe=Ie=>Ie){let Ie=A.value!==null?M.value[A.value]:null,Ae=pe(M.value.slice()),De=Ae.length>0&&Ae[0].dataRef.order.value!==null?Ae.sort((rt,Xe)=>rt.dataRef.order.value-Xe.dataRef.order.value):R1(Ae,rt=>Kt(rt.dataRef.domRef)),Ge=Ie?De.indexOf(Ie):null;return Ge===-1&&(Ge=null),{options:De,activeOptionIndex:Ge}}let J=je(()=>e.multiple?1:0),se=je(()=>e.nullable),[ke,ye]=P1(je(()=>e.modelValue),pe=>u("update:modelValue",pe),je(()=>e.defaultValue)),Z=je(()=>ke.value===void 0?qr(J.value,{1:[],0:void 0}):ke.value),fe=null,W=null;function ee(pe){return qr(J.value,{0(){return ye==null?void 0:ye(pe)},1:()=>{let Ie=Ft(Ee.value.value).slice(),Ae=Ft(pe),De=Ie.findIndex(Ge=>Ee.compare(Ae,Ft(Ge)));return De===-1?Ie.push(Ae):Ie.splice(De,1),ye==null?void 0:ye(Ie)}})}let Se=je(()=>{});er([Se],([pe],[Ie])=>{if(Ee.virtual.value&&pe&&Ie&&A.value!==null){let Ae=pe.indexOf(Ie[A.value]);Ae!==-1?A.value=Ae:A.value=null}});let Ee={comboboxState:h,value:Z,mode:J,compare(pe,Ie){if(typeof e.by=="string"){let Ae=e.by;return(pe==null?void 0:pe[Ae])===(Ie==null?void 0:Ie[Ae])}return e.by===null?BP(pe,Ie):e.by(pe,Ie)},calculateIndex(pe){return Ee.virtual.value?e.by===null?Ee.virtual.value.options.indexOf(pe):Ee.virtual.value.options.findIndex(Ie=>Ee.compare(Ie,pe)):M.value.findIndex(Ie=>Ee.compare(Ie.dataRef.value,pe))},defaultValue:je(()=>e.defaultValue),nullable:se,immediate:je(()=>!1),virtual:je(()=>null),inputRef:m,labelRef:g,buttonRef:c,optionsRef:I,disabled:je(()=>e.disabled),options:M,change(pe){ye(pe)},activeOptionIndex:je(()=>{if(q.value&&A.value===null&&(Ee.virtual.value?Ee.virtual.value.options.length>0:M.value.length>0)){if(Ee.virtual.value){let Ie=Ee.virtual.value.options.findIndex(Ae=>{var De;return!((De=Ee.virtual.value)!=null&&De.disabled(Ae))});if(Ie!==-1)return Ie}let pe=M.value.findIndex(Ie=>!Ie.dataRef.disabled);if(pe!==-1)return pe}return A.value}),activationTrigger:z,optionsPropsRef:k,closeCombobox(){q.value=!1,!e.disabled&&h.value!==1&&(h.value=1,A.value=null)},openCombobox(){if(q.value=!0,!e.disabled&&h.value!==0){if(Ee.value.value){let pe=Ee.calculateIndex(Ee.value.value);pe!==-1&&(A.value=pe)}h.value=0}},setActivationTrigger(pe){z.value=pe},goToOption(pe,Ie,Ae){q.value=!1,fe!==null&&cancelAnimationFrame(fe),fe=requestAnimationFrame(()=>{if(e.disabled||I.value&&!k.value.static&&h.value===1)return;if(Ee.virtual.value){A.value=pe===gi.Specific?Ie:ug({focus:pe},{resolveItems:()=>Ee.virtual.value.options,resolveActiveIndex:()=>{var rt,Xe;return(Xe=(rt=Ee.activeOptionIndex.value)!=null?rt:Ee.virtual.value.options.findIndex(dt=>{var nt;return!((nt=Ee.virtual.value)!=null&&nt.disabled(dt))}))!=null?Xe:null},resolveDisabled:rt=>Ee.virtual.value.disabled(rt),resolveId(){throw new Error("Function not implemented.")}}),z.value=Ae??2;return}let De=K();if(De.activeOptionIndex===null){let rt=De.options.findIndex(Xe=>!Xe.dataRef.disabled);rt!==-1&&(De.activeOptionIndex=rt)}let Ge=pe===gi.Specific?Ie:ug({focus:pe},{resolveItems:()=>De.options,resolveActiveIndex:()=>De.activeOptionIndex,resolveId:rt=>rt.id,resolveDisabled:rt=>rt.dataRef.disabled});A.value=Ge,z.value=Ae??2,M.value=De.options})},selectOption(pe){let Ie=M.value.find(De=>De.id===pe);if(!Ie)return;let{dataRef:Ae}=Ie;ee(Ae.value)},selectActiveOption(){if(Ee.activeOptionIndex.value!==null){if(Ee.virtual.value)ee(Ee.virtual.value.options[Ee.activeOptionIndex.value]);else{let{dataRef:pe}=M.value[Ee.activeOptionIndex.value];ee(pe.value)}Ee.goToOption(gi.Specific,Ee.activeOptionIndex.value)}},registerOption(pe,Ie){let Ae=Oo({id:pe,dataRef:Ie});if(Ee.virtual.value){M.value.push(Ae);return}W&&cancelAnimationFrame(W);let De=K(Ge=>(Ge.push(Ae),Ge));A.value===null&&Ee.isSelected(Ie.value.value)&&(De.activeOptionIndex=De.options.indexOf(Ae)),M.value=De.options,A.value=De.activeOptionIndex,z.value=2,De.options.some(Ge=>!Kt(Ge.dataRef.domRef))&&(W=requestAnimationFrame(()=>{let Ge=K();M.value=Ge.options,A.value=Ge.activeOptionIndex}))},unregisterOption(pe,Ie){if(fe!==null&&cancelAnimationFrame(fe),Ie&&(q.value=!0),Ee.virtual.value){M.value=M.value.filter(De=>De.id!==pe);return}let Ae=K(De=>{let Ge=De.findIndex(rt=>rt.id===pe);return Ge!==-1&&De.splice(Ge,1),De});M.value=Ae.options,A.value=Ae.activeOptionIndex,z.value=2},isSelected(pe){return qr(J.value,{0:()=>Ee.compare(Ft(Ee.value.value),Ft(pe)),1:()=>Ft(Ee.value.value).some(Ie=>Ee.compare(Ft(Ie),Ft(pe)))})},isActive(pe){return A.value===Ee.calculateIndex(pe)}};B1([m,c,I],()=>Ee.closeCombobox(),je(()=>h.value===0)),ta(K1,Ee),G1(je(()=>qr(h.value,{0:ds.Open,1:ds.Closed})));let Le=je(()=>{var pe;return(pe=Kt(m))==null?void 0:pe.closest("form")});return an(()=>{er([Le],()=>{if(!Le.value||e.defaultValue===void 0)return;function pe(){Ee.change(e.defaultValue)}return Le.value.addEventListener("reset",pe),()=>{var Ie;(Ie=Le.value)==null||Ie.removeEventListener("reset",pe)}},{immediate:!0})}),()=>{var pe,Ie,Ae;let{name:De,disabled:Ge,form:rt,...Xe}=e,dt={open:h.value===0,disabled:Ge,activeIndex:Ee.activeOptionIndex.value,activeOption:Ee.activeOptionIndex.value===null?null:Ee.virtual.value?Ee.virtual.value.options[(pe=Ee.activeOptionIndex.value)!=null?pe:0]:(Ae=(Ie=Ee.options.value[Ee.activeOptionIndex.value])==null?void 0:Ie.dataRef.value)!=null?Ae:null,value:Z.value};return Fn(mr,[...De!=null&&Z.value!=null?ly({[De]:Z.value}).map(([nt,ei])=>Fn(U1,$1({features:ay.Hidden,key:nt,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:rt,disabled:Ge,name:nt,value:ei}))):[],No({theirProps:{...s,...dh(Xe,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:dt,slots:n,attrs:s,name:"Combobox"})])}}}),UP=Ui({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:n,slots:s,expose:u}){var h;let g=(h=e.id)!=null?h:`headlessui-combobox-button-${Qa()}`,m=bc("ComboboxButton");u({el:m.buttonRef,$el:m.buttonRef});function c(M){m.disabled.value||(m.comboboxState.value===0?m.closeCombobox():(M.preventDefault(),m.openCombobox()),$r(()=>{var A;return(A=Kt(m.inputRef))==null?void 0:A.focus({preventScroll:!0})}))}function I(M){switch(M.key){case vi.ArrowDown:M.preventDefault(),M.stopPropagation(),m.comboboxState.value===1&&m.openCombobox(),$r(()=>{var A;return(A=m.inputRef.value)==null?void 0:A.focus({preventScroll:!0})});return;case vi.ArrowUp:M.preventDefault(),M.stopPropagation(),m.comboboxState.value===1&&(m.openCombobox(),$r(()=>{m.value.value||m.goToOption(gi.Last)})),$r(()=>{var A;return(A=m.inputRef.value)==null?void 0:A.focus({preventScroll:!0})});return;case vi.Escape:if(m.comboboxState.value!==0)return;M.preventDefault(),m.optionsRef.value&&!m.optionsPropsRef.value.static&&M.stopPropagation(),m.closeCombobox(),$r(()=>{var A;return(A=m.inputRef.value)==null?void 0:A.focus({preventScroll:!0})});return}}let k=F1(je(()=>({as:e.as,type:n.type})),m.buttonRef);return()=>{var M,A;let z={open:m.comboboxState.value===0,disabled:m.disabled.value,value:m.value.value},{...q}=e,K={ref:m.buttonRef,id:g,type:k.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(M=Kt(m.optionsRef))==null?void 0:M.id,"aria-expanded":m.comboboxState.value===0,"aria-labelledby":m.labelRef.value?[(A=Kt(m.labelRef))==null?void 0:A.id,g].join(" "):void 0,disabled:m.disabled.value===!0?!0:void 0,onKeydown:I,onClick:c};return No({ourProps:K,theirProps:q,slot:z,attrs:n,slots:s,name:"ComboboxButton"})}}}),qP=Ui({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:n,attrs:s,slots:u,expose:h}){var g;let m=(g=e.id)!=null?g:`headlessui-combobox-input-${Qa()}`,c=bc("ComboboxInput"),I=je(()=>oy(Kt(c.inputRef))),k={value:!1};h({el:c.inputRef,$el:c.inputRef});function M(){c.change(null);let W=Kt(c.optionsRef);W&&(W.scrollTop=0),c.goToOption(gi.Nothing)}let A=je(()=>{var W;let ee=c.value.value;return Kt(c.inputRef)?typeof e.displayValue<"u"&&ee!==void 0?(W=e.displayValue(ee))!=null?W:"":typeof ee=="string"?ee:"":""});an(()=>{er([A,c.comboboxState,I],([W,ee],[Se,Ee])=>{if(k.value)return;let Le=Kt(c.inputRef);Le&&((Ee===0&&ee===1||W!==Se)&&(Le.value=W),requestAnimationFrame(()=>{var pe;if(k.value||!Le||((pe=I.value)==null?void 0:pe.activeElement)!==Le)return;let{selectionStart:Ie,selectionEnd:Ae}=Le;Math.abs((Ae??0)-(Ie??0))===0&&Ie===0&&Le.setSelectionRange(Le.value.length,Le.value.length)}))},{immediate:!0}),er([c.comboboxState],([W],[ee])=>{if(W===0&&ee===1){if(k.value)return;let Se=Kt(c.inputRef);if(!Se)return;let Ee=Se.value,{selectionStart:Le,selectionEnd:pe,selectionDirection:Ie}=Se;Se.value="",Se.value=Ee,Ie!==null?Se.setSelectionRange(Le,pe,Ie):Se.setSelectionRange(Le,pe)}})});let z=Lt(!1);function q(){z.value=!0}function K(){vf().nextFrame(()=>{z.value=!1})}let J=_P();function se(W){switch(k.value=!0,J(()=>{k.value=!1}),W.key){case vi.Enter:if(k.value=!1,c.comboboxState.value!==0||z.value)return;if(W.preventDefault(),W.stopPropagation(),c.activeOptionIndex.value===null){c.closeCombobox();return}c.selectActiveOption(),c.mode.value===0&&c.closeCombobox();break;case vi.ArrowDown:return k.value=!1,W.preventDefault(),W.stopPropagation(),qr(c.comboboxState.value,{0:()=>c.goToOption(gi.Next),1:()=>c.openCombobox()});case vi.ArrowUp:return k.value=!1,W.preventDefault(),W.stopPropagation(),qr(c.comboboxState.value,{0:()=>c.goToOption(gi.Previous),1:()=>{c.openCombobox(),$r(()=>{c.value.value||c.goToOption(gi.Last)})}});case vi.Home:if(W.shiftKey)break;return k.value=!1,W.preventDefault(),W.stopPropagation(),c.goToOption(gi.First);case vi.PageUp:return k.value=!1,W.preventDefault(),W.stopPropagation(),c.goToOption(gi.First);case vi.End:if(W.shiftKey)break;return k.value=!1,W.preventDefault(),W.stopPropagation(),c.goToOption(gi.Last);case vi.PageDown:return k.value=!1,W.preventDefault(),W.stopPropagation(),c.goToOption(gi.Last);case vi.Escape:if(k.value=!1,c.comboboxState.value!==0)return;W.preventDefault(),c.optionsRef.value&&!c.optionsPropsRef.value.static&&W.stopPropagation(),c.nullable.value&&c.mode.value===0&&c.value.value===null&&M(),c.closeCombobox();break;case vi.Tab:if(k.value=!1,c.comboboxState.value!==0)return;c.mode.value===0&&c.activationTrigger.value!==1&&c.selectActiveOption(),c.closeCombobox();break}}function ke(W){n("change",W),c.nullable.value&&c.mode.value===0&&W.target.value===""&&M(),c.openCombobox()}function ye(W){var ee,Se,Ee;let Le=(ee=W.relatedTarget)!=null?ee:Na.find(pe=>pe!==W.currentTarget);if(k.value=!1,!((Se=Kt(c.optionsRef))!=null&&Se.contains(Le))&&!((Ee=Kt(c.buttonRef))!=null&&Ee.contains(Le))&&c.comboboxState.value===0)return W.preventDefault(),c.mode.value===0&&(c.nullable.value&&c.value.value===null?M():c.activationTrigger.value!==1&&c.selectActiveOption()),c.closeCombobox()}function Z(W){var ee,Se,Ee;let Le=(ee=W.relatedTarget)!=null?ee:Na.find(pe=>pe!==W.currentTarget);(Se=Kt(c.buttonRef))!=null&&Se.contains(Le)||(Ee=Kt(c.optionsRef))!=null&&Ee.contains(Le)||c.disabled.value||c.immediate.value&&c.comboboxState.value!==0&&(c.openCombobox(),vf().nextFrame(()=>{c.setActivationTrigger(1)}))}let fe=je(()=>{var W,ee,Se,Ee;return(Ee=(Se=(ee=e.defaultValue)!=null?ee:c.defaultValue.value!==void 0?(W=e.displayValue)==null?void 0:W.call(e,c.defaultValue.value):null)!=null?Se:c.defaultValue.value)!=null?Ee:""});return()=>{var W,ee,Se,Ee,Le,pe,Ie;let Ae={open:c.comboboxState.value===0},{displayValue:De,onChange:Ge,...rt}=e,Xe={"aria-controls":(W=c.optionsRef.value)==null?void 0:W.id,"aria-expanded":c.comboboxState.value===0,"aria-activedescendant":c.activeOptionIndex.value===null?void 0:c.virtual.value?(ee=c.options.value.find(dt=>!c.virtual.value.disabled(dt.dataRef.value)&&c.compare(dt.dataRef.value,c.virtual.value.options[c.activeOptionIndex.value])))==null?void 0:ee.id:(Se=c.options.value[c.activeOptionIndex.value])==null?void 0:Se.id,"aria-labelledby":(pe=(Ee=Kt(c.labelRef))==null?void 0:Ee.id)!=null?pe:(Le=Kt(c.buttonRef))==null?void 0:Le.id,"aria-autocomplete":"list",id:m,onCompositionstart:q,onCompositionend:K,onKeydown:se,onInput:ke,onFocus:Z,onBlur:ye,role:"combobox",type:(Ie=s.type)!=null?Ie:"text",tabIndex:0,ref:c.inputRef,defaultValue:fe.value,disabled:c.disabled.value===!0?!0:void 0};return No({ourProps:Xe,theirProps:rt,slot:Ae,attrs:s,slots:u,features:Za.RenderStrategy|Za.Static,name:"ComboboxInput"})}}}),HP=Ui({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:n,slots:s,expose:u}){let h=bc("ComboboxOptions"),g=`headlessui-combobox-options-${Qa()}`;u({el:h.optionsRef,$el:h.optionsRef}),Qn(()=>{h.optionsPropsRef.value.static=e.static}),Qn(()=>{h.optionsPropsRef.value.hold=e.hold});let m=H1(),c=je(()=>m!==null?(m.value&ds.Open)===ds.Open:h.comboboxState.value===0);LP({container:je(()=>Kt(h.optionsRef)),enabled:je(()=>h.comboboxState.value===0),accept(k){return k.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:k.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(k){k.setAttribute("role","none")}});function I(k){k.preventDefault()}return()=>{var k,M,A;let z={open:h.comboboxState.value===0},q={"aria-labelledby":(A=(k=Kt(h.labelRef))==null?void 0:k.id)!=null?A:(M=Kt(h.buttonRef))==null?void 0:M.id,id:g,ref:h.optionsRef,role:"listbox","aria-multiselectable":h.mode.value===1?!0:void 0,onMousedown:I},K=dh(e,["hold"]);return No({ourProps:q,theirProps:K,slot:z,attrs:n,slots:h.virtual.value&&h.comboboxState.value===0?{...s,default:()=>[Fn(jP,{},s.default)]}:s,features:Za.RenderStrategy|Za.Static,visible:c.value,name:"ComboboxOptions"})}}}),GP=Ui({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:n,attrs:s,expose:u}){let h=bc("ComboboxOption"),g=`headlessui-combobox-option-${Qa()}`,m=Lt(null),c=je(()=>e.disabled);u({el:m,$el:m});let I=je(()=>{var ye;return h.virtual.value?h.activeOptionIndex.value===h.calculateIndex(e.value):h.activeOptionIndex.value===null?!1:((ye=h.options.value[h.activeOptionIndex.value])==null?void 0:ye.id)===g}),k=je(()=>h.isSelected(e.value)),M=Hr(J1,null),A=je(()=>({disabled:e.disabled,value:e.value,domRef:m,order:je(()=>e.order)}));an(()=>h.registerOption(g,A)),Ja(()=>h.unregisterOption(g,I.value)),Qn(()=>{let ye=Kt(m);ye&&(M==null||M.value.measureElement(ye))}),Qn(()=>{h.comboboxState.value===0&&I.value&&(h.virtual.value||h.activationTrigger.value!==0&&$r(()=>{var ye,Z;return(Z=(ye=Kt(m))==null?void 0:ye.scrollIntoView)==null?void 0:Z.call(ye,{block:"nearest"})}))});function z(ye){ye.preventDefault(),ye.button===W1.Left&&(c.value||(h.selectOption(g),O1()||requestAnimationFrame(()=>{var Z;return(Z=Kt(h.inputRef))==null?void 0:Z.focus({preventScroll:!0})}),h.mode.value===0&&h.closeCombobox()))}function q(){var ye;if(e.disabled||(ye=h.virtual.value)!=null&&ye.disabled(e.value))return h.goToOption(gi.Nothing);let Z=h.calculateIndex(e.value);h.goToOption(gi.Specific,Z)}let K=V1();function J(ye){K.update(ye)}function se(ye){var Z;if(!K.wasMoved(ye)||e.disabled||(Z=h.virtual.value)!=null&&Z.disabled(e.value)||I.value)return;let fe=h.calculateIndex(e.value);h.goToOption(gi.Specific,fe,0)}function ke(ye){var Z;K.wasMoved(ye)&&(e.disabled||(Z=h.virtual.value)!=null&&Z.disabled(e.value)||I.value&&(h.optionsPropsRef.value.hold||h.goToOption(gi.Nothing)))}return()=>{let{disabled:ye}=e,Z={active:I.value,selected:k.value,disabled:ye},fe={id:g,ref:m,role:"option",tabIndex:ye===!0?void 0:-1,"aria-disabled":ye===!0?!0:void 0,"aria-selected":k.value,disabled:void 0,onMousedown:z,onFocus:q,onPointerenter:J,onMouseenter:J,onPointermove:se,onMousemove:se,onPointerleave:ke,onMouseleave:ke},W=dh(e,["order","value"]);return No({ourProps:fe,theirProps:W,slot:Z,attrs:s,slots:n,name:"ComboboxOption"})}}}),Ov=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Bv(e){var n,s;let u=(n=e.innerText)!=null?n:"",h=e.cloneNode(!0);if(!(h instanceof HTMLElement))return u;let g=!1;for(let c of h.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))c.remove(),g=!0;let m=g?(s=h.innerText)!=null?s:"":u;return Ov.test(m)&&(m=m.replace(Ov,"")),m}function WP(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let s=e.getAttribute("aria-labelledby");if(s){let u=s.split(" ").map(h=>{let g=document.getElementById(h);if(g){let m=g.getAttribute("aria-label");return typeof m=="string"?m.trim():Bv(g).trim()}return null}).filter(Boolean);if(u.length>0)return u.join(", ")}return Bv(e).trim()}function ZP(e){let n=Lt(""),s=Lt("");return()=>{let u=Kt(e);if(!u)return"";let h=u.innerText;if(n.value===h)return s.value;let g=WP(u).trim().toLowerCase();return n.value=h,s.value=g,g}}function XP(e,n){return e===n}var KP=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(KP||{}),JP=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(JP||{}),YP=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(YP||{});function QP(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let Y1=Symbol("ListboxContext");function Nf(e){let n=Hr(Y1,null);if(n===null){let s=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,Nf),s}return n}let ez=Ui({name:"Listbox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>XP},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:n,attrs:s,emit:u}){let h=Lt(1),g=Lt(null),m=Lt(null),c=Lt(null),I=Lt([]),k=Lt(""),M=Lt(null),A=Lt(1);function z(Z=fe=>fe){let fe=M.value!==null?I.value[M.value]:null,W=R1(Z(I.value.slice()),Se=>Kt(Se.dataRef.domRef)),ee=fe?W.indexOf(fe):null;return ee===-1&&(ee=null),{options:W,activeOptionIndex:ee}}let q=je(()=>e.multiple?1:0),[K,J]=P1(je(()=>e.modelValue),Z=>u("update:modelValue",Z),je(()=>e.defaultValue)),se=je(()=>K.value===void 0?qr(q.value,{1:[],0:void 0}):K.value),ke={listboxState:h,value:se,mode:q,compare(Z,fe){if(typeof e.by=="string"){let W=e.by;return(Z==null?void 0:Z[W])===(fe==null?void 0:fe[W])}return e.by(Z,fe)},orientation:je(()=>e.horizontal?"horizontal":"vertical"),labelRef:g,buttonRef:m,optionsRef:c,disabled:je(()=>e.disabled),options:I,searchQuery:k,activeOptionIndex:M,activationTrigger:A,closeListbox(){e.disabled||h.value!==1&&(h.value=1,M.value=null)},openListbox(){e.disabled||h.value!==0&&(h.value=0)},goToOption(Z,fe,W){if(e.disabled||h.value===1)return;let ee=z(),Se=ug(Z===gi.Specific?{focus:gi.Specific,id:fe}:{focus:Z},{resolveItems:()=>ee.options,resolveActiveIndex:()=>ee.activeOptionIndex,resolveId:Ee=>Ee.id,resolveDisabled:Ee=>Ee.dataRef.disabled});k.value="",M.value=Se,A.value=W??1,I.value=ee.options},search(Z){if(e.disabled||h.value===1)return;let fe=k.value!==""?0:1;k.value+=Z.toLowerCase();let W=(M.value!==null?I.value.slice(M.value+fe).concat(I.value.slice(0,M.value+fe)):I.value).find(Se=>Se.dataRef.textValue.startsWith(k.value)&&!Se.dataRef.disabled),ee=W?I.value.indexOf(W):-1;ee===-1||ee===M.value||(M.value=ee,A.value=1)},clearSearch(){e.disabled||h.value!==1&&k.value!==""&&(k.value="")},registerOption(Z,fe){let W=z(ee=>[...ee,{id:Z,dataRef:fe}]);I.value=W.options,M.value=W.activeOptionIndex},unregisterOption(Z){let fe=z(W=>{let ee=W.findIndex(Se=>Se.id===Z);return ee!==-1&&W.splice(ee,1),W});I.value=fe.options,M.value=fe.activeOptionIndex,A.value=1},theirOnChange(Z){e.disabled||J(Z)},select(Z){e.disabled||J(qr(q.value,{0:()=>Z,1:()=>{let fe=Ft(ke.value.value).slice(),W=Ft(Z),ee=fe.findIndex(Se=>ke.compare(W,Ft(Se)));return ee===-1?fe.push(W):fe.splice(ee,1),fe}}))}};B1([m,c],(Z,fe)=>{var W;ke.closeListbox(),D1(fe,sy.Loose)||(Z.preventDefault(),(W=Kt(m))==null||W.focus())},je(()=>h.value===0)),ta(Y1,ke),G1(je(()=>qr(h.value,{0:ds.Open,1:ds.Closed})));let ye=je(()=>{var Z;return(Z=Kt(m))==null?void 0:Z.closest("form")});return an(()=>{er([ye],()=>{if(!ye.value||e.defaultValue===void 0)return;function Z(){ke.theirOnChange(e.defaultValue)}return ye.value.addEventListener("reset",Z),()=>{var fe;(fe=ye.value)==null||fe.removeEventListener("reset",Z)}},{immediate:!0})}),()=>{let{name:Z,modelValue:fe,disabled:W,form:ee,...Se}=e,Ee={open:h.value===0,disabled:W,value:se.value};return Fn(mr,[...Z!=null&&se.value!=null?ly({[Z]:se.value}).map(([Le,pe])=>Fn(U1,$1({features:ay.Hidden,key:Le,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:ee,disabled:W,name:Le,value:pe}))):[],No({ourProps:{},theirProps:{...s,...dh(Se,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:Ee,slots:n,attrs:s,name:"Listbox"})])}}}),tz=Ui({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:n,slots:s,expose:u}){var h;let g=(h=e.id)!=null?h:`headlessui-listbox-button-${Qa()}`,m=Nf("ListboxButton");u({el:m.buttonRef,$el:m.buttonRef});function c(A){switch(A.key){case vi.Space:case vi.Enter:case vi.ArrowDown:A.preventDefault(),m.openListbox(),$r(()=>{var z;(z=Kt(m.optionsRef))==null||z.focus({preventScroll:!0}),m.value.value||m.goToOption(gi.First)});break;case vi.ArrowUp:A.preventDefault(),m.openListbox(),$r(()=>{var z;(z=Kt(m.optionsRef))==null||z.focus({preventScroll:!0}),m.value.value||m.goToOption(gi.Last)});break}}function I(A){switch(A.key){case vi.Space:A.preventDefault();break}}function k(A){m.disabled.value||(m.listboxState.value===0?(m.closeListbox(),$r(()=>{var z;return(z=Kt(m.buttonRef))==null?void 0:z.focus({preventScroll:!0})})):(A.preventDefault(),m.openListbox(),QP(()=>{var z;return(z=Kt(m.optionsRef))==null?void 0:z.focus({preventScroll:!0})})))}let M=F1(je(()=>({as:e.as,type:n.type})),m.buttonRef);return()=>{var A,z;let q={open:m.listboxState.value===0,disabled:m.disabled.value,value:m.value.value},{...K}=e,J={ref:m.buttonRef,id:g,type:M.value,"aria-haspopup":"listbox","aria-controls":(A=Kt(m.optionsRef))==null?void 0:A.id,"aria-expanded":m.listboxState.value===0,"aria-labelledby":m.labelRef.value?[(z=Kt(m.labelRef))==null?void 0:z.id,g].join(" "):void 0,disabled:m.disabled.value===!0?!0:void 0,onKeydown:c,onKeyup:I,onClick:k};return No({ourProps:J,theirProps:K,slot:q,attrs:n,slots:s,name:"ListboxButton"})}}}),iz=Ui({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:n,slots:s,expose:u}){var h;let g=(h=e.id)!=null?h:`headlessui-listbox-options-${Qa()}`,m=Nf("ListboxOptions"),c=Lt(null);u({el:m.optionsRef,$el:m.optionsRef});function I(A){switch(c.value&&clearTimeout(c.value),A.key){case vi.Space:if(m.searchQuery.value!=="")return A.preventDefault(),A.stopPropagation(),m.search(A.key);case vi.Enter:if(A.preventDefault(),A.stopPropagation(),m.activeOptionIndex.value!==null){let z=m.options.value[m.activeOptionIndex.value];m.select(z.dataRef.value)}m.mode.value===0&&(m.closeListbox(),$r(()=>{var z;return(z=Kt(m.buttonRef))==null?void 0:z.focus({preventScroll:!0})}));break;case qr(m.orientation.value,{vertical:vi.ArrowDown,horizontal:vi.ArrowRight}):return A.preventDefault(),A.stopPropagation(),m.goToOption(gi.Next);case qr(m.orientation.value,{vertical:vi.ArrowUp,horizontal:vi.ArrowLeft}):return A.preventDefault(),A.stopPropagation(),m.goToOption(gi.Previous);case vi.Home:case vi.PageUp:return A.preventDefault(),A.stopPropagation(),m.goToOption(gi.First);case vi.End:case vi.PageDown:return A.preventDefault(),A.stopPropagation(),m.goToOption(gi.Last);case vi.Escape:A.preventDefault(),A.stopPropagation(),m.closeListbox(),$r(()=>{var z;return(z=Kt(m.buttonRef))==null?void 0:z.focus({preventScroll:!0})});break;case vi.Tab:A.preventDefault(),A.stopPropagation();break;default:A.key.length===1&&(m.search(A.key),c.value=setTimeout(()=>m.clearSearch(),350));break}}let k=H1(),M=je(()=>k!==null?(k.value&ds.Open)===ds.Open:m.listboxState.value===0);return()=>{var A,z;let q={open:m.listboxState.value===0},{...K}=e,J={"aria-activedescendant":m.activeOptionIndex.value===null||(A=m.options.value[m.activeOptionIndex.value])==null?void 0:A.id,"aria-multiselectable":m.mode.value===1?!0:void 0,"aria-labelledby":(z=Kt(m.buttonRef))==null?void 0:z.id,"aria-orientation":m.orientation.value,id:g,onKeydown:I,role:"listbox",tabIndex:0,ref:m.optionsRef};return No({ourProps:J,theirProps:K,slot:q,attrs:n,slots:s,features:Za.RenderStrategy|Za.Static,visible:M.value,name:"ListboxOptions"})}}}),rz=Ui({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:n,attrs:s,expose:u}){var h;let g=(h=e.id)!=null?h:`headlessui-listbox-option-${Qa()}`,m=Nf("ListboxOption"),c=Lt(null);u({el:c,$el:c});let I=je(()=>m.activeOptionIndex.value!==null?m.options.value[m.activeOptionIndex.value].id===g:!1),k=je(()=>qr(m.mode.value,{0:()=>m.compare(Ft(m.value.value),Ft(e.value)),1:()=>Ft(m.value.value).some(Z=>m.compare(Ft(Z),Ft(e.value)))})),M=je(()=>qr(m.mode.value,{1:()=>{var Z;let fe=Ft(m.value.value);return((Z=m.options.value.find(W=>fe.some(ee=>m.compare(Ft(ee),Ft(W.dataRef.value)))))==null?void 0:Z.id)===g},0:()=>k.value})),A=ZP(c),z=je(()=>({disabled:e.disabled,value:e.value,get textValue(){return A()},domRef:c}));an(()=>m.registerOption(g,z)),Ja(()=>m.unregisterOption(g)),an(()=>{er([m.listboxState,k],()=>{m.listboxState.value===0&&k.value&&qr(m.mode.value,{1:()=>{M.value&&m.goToOption(gi.Specific,g)},0:()=>{m.goToOption(gi.Specific,g)}})},{immediate:!0})}),Qn(()=>{m.listboxState.value===0&&I.value&&m.activationTrigger.value!==0&&$r(()=>{var Z,fe;return(fe=(Z=Kt(c))==null?void 0:Z.scrollIntoView)==null?void 0:fe.call(Z,{block:"nearest"})})});function q(Z){if(e.disabled)return Z.preventDefault();m.select(e.value),m.mode.value===0&&(m.closeListbox(),$r(()=>{var fe;return(fe=Kt(m.buttonRef))==null?void 0:fe.focus({preventScroll:!0})}))}function K(){if(e.disabled)return m.goToOption(gi.Nothing);m.goToOption(gi.Specific,g)}let J=V1();function se(Z){J.update(Z)}function ke(Z){J.wasMoved(Z)&&(e.disabled||I.value||m.goToOption(gi.Specific,g,0))}function ye(Z){J.wasMoved(Z)&&(e.disabled||I.value&&m.goToOption(gi.Nothing))}return()=>{let{disabled:Z}=e,fe={active:I.value,selected:k.value,disabled:Z},{value:W,disabled:ee,...Se}=e,Ee={id:g,ref:c,role:"option",tabIndex:Z===!0?void 0:-1,"aria-disabled":Z===!0?!0:void 0,"aria-selected":k.value,disabled:void 0,onClick:q,onFocus:K,onPointerenter:se,onMouseenter:se,onPointermove:ke,onMousemove:ke,onPointerleave:ye,onMouseleave:ye};return No({ourProps:Ee,theirProps:Se,slot:fe,attrs:s,slots:n,name:"ListboxOption"})}}});function Vn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var n=e.ownerDocument;return n&&n.defaultView||window}return e}function Xa(e){var n=Vn(e).Element;return e instanceof n||e instanceof Element}function Yn(e){var n=Vn(e).HTMLElement;return e instanceof n||e instanceof HTMLElement}function cy(e){if(typeof ShadowRoot>"u")return!1;var n=Vn(e).ShadowRoot;return e instanceof n||e instanceof ShadowRoot}var qa=Math.max,xf=Math.min,pc=Math.round;function hg(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function Q1(){return!/^((?!chrome|android).)*safari/i.test(hg())}function mc(e,n,s){n===void 0&&(n=!1),s===void 0&&(s=!1);var u=e.getBoundingClientRect(),h=1,g=1;n&&Yn(e)&&(h=e.offsetWidth>0&&pc(u.width)/e.offsetWidth||1,g=e.offsetHeight>0&&pc(u.height)/e.offsetHeight||1);var m=Xa(e)?Vn(e):window,c=m.visualViewport,I=!Q1()&&s,k=(u.left+(I&&c?c.offsetLeft:0))/h,M=(u.top+(I&&c?c.offsetTop:0))/g,A=u.width/h,z=u.height/g;return{width:A,height:z,top:M,right:k+A,bottom:M+z,left:k,x:k,y:M}}function uy(e){var n=Vn(e),s=n.pageXOffset,u=n.pageYOffset;return{scrollLeft:s,scrollTop:u}}function nz(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function oz(e){return e===Vn(e)||!Yn(e)?uy(e):nz(e)}function Vo(e){return e?(e.nodeName||"").toLowerCase():null}function oa(e){return((Xa(e)?e.ownerDocument:e.document)||window.document).documentElement}function hy(e){return mc(oa(e)).left+uy(e).scrollLeft}function fs(e){return Vn(e).getComputedStyle(e)}function dy(e){var n=fs(e),s=n.overflow,u=n.overflowX,h=n.overflowY;return/auto|scroll|overlay|hidden/.test(s+h+u)}function sz(e){var n=e.getBoundingClientRect(),s=pc(n.width)/e.offsetWidth||1,u=pc(n.height)/e.offsetHeight||1;return s!==1||u!==1}function az(e,n,s){s===void 0&&(s=!1);var u=Yn(n),h=Yn(n)&&sz(n),g=oa(n),m=mc(e,h,s),c={scrollLeft:0,scrollTop:0},I={x:0,y:0};return(u||!u&&!s)&&((Vo(n)!=="body"||dy(g))&&(c=oz(n)),Yn(n)?(I=mc(n,!0),I.x+=n.clientLeft,I.y+=n.clientTop):g&&(I.x=hy(g))),{x:m.left+c.scrollLeft-I.x,y:m.top+c.scrollTop-I.y,width:m.width,height:m.height}}function fy(e){var n=mc(e),s=e.offsetWidth,u=e.offsetHeight;return Math.abs(n.width-s)<=1&&(s=n.width),Math.abs(n.height-u)<=1&&(u=n.height),{x:e.offsetLeft,y:e.offsetTop,width:s,height:u}}function jf(e){return Vo(e)==="html"?e:e.assignedSlot||e.parentNode||(cy(e)?e.host:null)||oa(e)}function ew(e){return["html","body","#document"].indexOf(Vo(e))>=0?e.ownerDocument.body:Yn(e)&&dy(e)?e:ew(jf(e))}function Xu(e,n){var s;n===void 0&&(n=[]);var u=ew(e),h=u===((s=e.ownerDocument)==null?void 0:s.body),g=Vn(u),m=h?[g].concat(g.visualViewport||[],dy(u)?u:[]):u,c=n.concat(m);return h?c:c.concat(Xu(jf(m)))}function lz(e){return["table","td","th"].indexOf(Vo(e))>=0}function Fv(e){return!Yn(e)||fs(e).position==="fixed"?null:e.offsetParent}function cz(e){var n=/firefox/i.test(hg()),s=/Trident/i.test(hg());if(s&&Yn(e)){var u=fs(e);if(u.position==="fixed")return null}var h=jf(e);for(cy(h)&&(h=h.host);Yn(h)&&["html","body"].indexOf(Vo(h))<0;){var g=fs(h);if(g.transform!=="none"||g.perspective!=="none"||g.contain==="paint"||["transform","perspective"].indexOf(g.willChange)!==-1||n&&g.willChange==="filter"||n&&g.filter&&g.filter!=="none")return h;h=h.parentNode}return null}function fh(e){for(var n=Vn(e),s=Fv(e);s&&lz(s)&&fs(s).position==="static";)s=Fv(s);return s&&(Vo(s)==="html"||Vo(s)==="body"&&fs(s).position==="static")?n:s||cz(e)||n}var On="top",po="bottom",mo="right",Bn="left",py="auto",ph=[On,po,mo,Bn],gc="start",ah="end",uz="clippingParents",tw="viewport",Bu="popper",hz="reference",Vv=ph.reduce(function(e,n){return e.concat([n+"-"+gc,n+"-"+ah])},[]),iw=[].concat(ph,[py]).reduce(function(e,n){return e.concat([n,n+"-"+gc,n+"-"+ah])},[]),dz="beforeRead",fz="read",pz="afterRead",mz="beforeMain",gz="main",yz="afterMain",_z="beforeWrite",vz="write",xz="afterWrite",bz=[dz,fz,pz,mz,gz,yz,_z,vz,xz];function wz(e){var n=new Map,s=new Set,u=[];e.forEach(function(g){n.set(g.name,g)});function h(g){s.add(g.name);var m=[].concat(g.requires||[],g.requiresIfExists||[]);m.forEach(function(c){if(!s.has(c)){var I=n.get(c);I&&h(I)}}),u.push(g)}return e.forEach(function(g){s.has(g.name)||h(g)}),u}function Ez(e){var n=wz(e);return bz.reduce(function(s,u){return s.concat(n.filter(function(h){return h.phase===u}))},[])}function Sz(e){var n;return function(){return n||(n=new Promise(function(s){Promise.resolve().then(function(){n=void 0,s(e())})})),n}}function Iz(e){var n=e.reduce(function(s,u){var h=s[u.name];return s[u.name]=h?Object.assign({},h,u,{options:Object.assign({},h.options,u.options),data:Object.assign({},h.data,u.data)}):u,s},{});return Object.keys(n).map(function(s){return n[s]})}function Tz(e,n){var s=Vn(e),u=oa(e),h=s.visualViewport,g=u.clientWidth,m=u.clientHeight,c=0,I=0;if(h){g=h.width,m=h.height;var k=Q1();(k||!k&&n==="fixed")&&(c=h.offsetLeft,I=h.offsetTop)}return{width:g,height:m,x:c+hy(e),y:I}}function Cz(e){var n,s=oa(e),u=uy(e),h=(n=e.ownerDocument)==null?void 0:n.body,g=qa(s.scrollWidth,s.clientWidth,h?h.scrollWidth:0,h?h.clientWidth:0),m=qa(s.scrollHeight,s.clientHeight,h?h.scrollHeight:0,h?h.clientHeight:0),c=-u.scrollLeft+hy(e),I=-u.scrollTop;return fs(h||s).direction==="rtl"&&(c+=qa(s.clientWidth,h?h.clientWidth:0)-g),{width:g,height:m,x:c,y:I}}function rw(e,n){var s=n.getRootNode&&n.getRootNode();if(e.contains(n))return!0;if(s&&cy(s)){var u=n;do{if(u&&e.isSameNode(u))return!0;u=u.parentNode||u.host}while(u)}return!1}function dg(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Az(e,n){var s=mc(e,!1,n==="fixed");return s.top=s.top+e.clientTop,s.left=s.left+e.clientLeft,s.bottom=s.top+e.clientHeight,s.right=s.left+e.clientWidth,s.width=e.clientWidth,s.height=e.clientHeight,s.x=s.left,s.y=s.top,s}function Nv(e,n,s){return n===tw?dg(Tz(e,s)):Xa(n)?Az(n,s):dg(Cz(oa(e)))}function Mz(e){var n=Xu(jf(e)),s=["absolute","fixed"].indexOf(fs(e).position)>=0,u=s&&Yn(e)?fh(e):e;return Xa(u)?n.filter(function(h){return Xa(h)&&rw(h,u)&&Vo(h)!=="body"}):[]}function kz(e,n,s,u){var h=n==="clippingParents"?Mz(e):[].concat(n),g=[].concat(h,[s]),m=g[0],c=g.reduce(function(I,k){var M=Nv(e,k,u);return I.top=qa(M.top,I.top),I.right=xf(M.right,I.right),I.bottom=xf(M.bottom,I.bottom),I.left=qa(M.left,I.left),I},Nv(e,m,u));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function Do(e){return e.split("-")[0]}function yc(e){return e.split("-")[1]}function my(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function nw(e){var n=e.reference,s=e.element,u=e.placement,h=u?Do(u):null,g=u?yc(u):null,m=n.x+n.width/2-s.width/2,c=n.y+n.height/2-s.height/2,I;switch(h){case On:I={x:m,y:n.y-s.height};break;case po:I={x:m,y:n.y+n.height};break;case mo:I={x:n.x+n.width,y:c};break;case Bn:I={x:n.x-s.width,y:c};break;default:I={x:n.x,y:n.y}}var k=h?my(h):null;if(k!=null){var M=k==="y"?"height":"width";switch(g){case gc:I[k]=I[k]-(n[M]/2-s[M]/2);break;case ah:I[k]=I[k]+(n[M]/2-s[M]/2);break}}return I}function ow(){return{top:0,right:0,bottom:0,left:0}}function sw(e){return Object.assign({},ow(),e)}function aw(e,n){return n.reduce(function(s,u){return s[u]=e,s},{})}function gy(e,n){n===void 0&&(n={});var s=n,u=s.placement,h=u===void 0?e.placement:u,g=s.strategy,m=g===void 0?e.strategy:g,c=s.boundary,I=c===void 0?uz:c,k=s.rootBoundary,M=k===void 0?tw:k,A=s.elementContext,z=A===void 0?Bu:A,q=s.altBoundary,K=q===void 0?!1:q,J=s.padding,se=J===void 0?0:J,ke=sw(typeof se!="number"?se:aw(se,ph)),ye=z===Bu?hz:Bu,Z=e.rects.popper,fe=e.elements[K?ye:z],W=kz(Xa(fe)?fe:fe.contextElement||oa(e.elements.popper),I,M,m),ee=mc(e.elements.reference),Se=nw({reference:ee,element:Z,strategy:"absolute",placement:h}),Ee=dg(Object.assign({},Z,Se)),Le=z===Bu?Ee:ee,pe={top:W.top-Le.top+ke.top,bottom:Le.bottom-W.bottom+ke.bottom,left:W.left-Le.left+ke.left,right:Le.right-W.right+ke.right},Ie=e.modifiersData.offset;if(z===Bu&&Ie){var Ae=Ie[h];Object.keys(pe).forEach(function(De){var Ge=[mo,po].indexOf(De)>=0?1:-1,rt=[On,po].indexOf(De)>=0?"y":"x";pe[De]+=Ae[rt]*Ge})}return pe}var jv={placement:"bottom",modifiers:[],strategy:"absolute"};function $v(){for(var e=arguments.length,n=new Array(e),s=0;s=0});z.length===0&&(z=A);var q=z.reduce(function(K,J){return K[J]=gy(e,{placement:J,boundary:h,rootBoundary:g,padding:m})[Do(J)],K},{});return Object.keys(q).sort(function(K,J){return q[K]-q[J]})}function Hz(e){if(Do(e)===py)return[];var n=Jd(e);return[qv(e),n,qv(n)]}function Gz(e){var n=e.state,s=e.options,u=e.name;if(!n.modifiersData[u]._skip){for(var h=s.mainAxis,g=h===void 0?!0:h,m=s.altAxis,c=m===void 0?!0:m,I=s.fallbackPlacements,k=s.padding,M=s.boundary,A=s.rootBoundary,z=s.altBoundary,q=s.flipVariations,K=q===void 0?!0:q,J=s.allowedAutoPlacements,se=n.options.placement,ke=Do(se),ye=ke===se,Z=I||(ye||!K?[Jd(se)]:Hz(se)),fe=[se].concat(Z).reduce(function(Xi,zi){return Xi.concat(Do(zi)===py?qz(n,{placement:zi,boundary:M,rootBoundary:A,padding:k,flipVariations:K,allowedAutoPlacements:J}):zi)},[]),W=n.rects.reference,ee=n.rects.popper,Se=new Map,Ee=!0,Le=fe[0],pe=0;pe=0,rt=Ge?"width":"height",Xe=gy(n,{placement:Ie,boundary:M,rootBoundary:A,altBoundary:z,padding:k}),dt=Ge?De?mo:Bn:De?po:On;W[rt]>ee[rt]&&(dt=Jd(dt));var nt=Jd(dt),ei=[];if(g&&ei.push(Xe[Ae]<=0),c&&ei.push(Xe[dt]<=0,Xe[nt]<=0),ei.every(function(Xi){return Xi})){Le=Ie,Ee=!1;break}Se.set(Ie,ei)}if(Ee)for(var $t=K?3:1,Vt=function(zi){var hi=fe.find(function(Li){var Di=Se.get(Li);if(Di)return Di.slice(0,zi).every(function(Or){return Or})});if(hi)return Le=hi,"break"},Nt=$t;Nt>0;Nt--){var Ei=Vt(Nt);if(Ei==="break")break}n.placement!==Le&&(n.modifiersData[u]._skip=!0,n.placement=Le,n.reset=!0)}}const Wz={name:"flip",enabled:!0,phase:"main",fn:Gz,requiresIfExists:["offset"],data:{_skip:!1}};function Zz(e,n,s){var u=Do(e),h=[Bn,On].indexOf(u)>=0?-1:1,g=typeof s=="function"?s(Object.assign({},n,{placement:e})):s,m=g[0],c=g[1];return m=m||0,c=(c||0)*h,[Bn,mo].indexOf(u)>=0?{x:c,y:m}:{x:m,y:c}}function Xz(e){var n=e.state,s=e.options,u=e.name,h=s.offset,g=h===void 0?[0,0]:h,m=iw.reduce(function(M,A){return M[A]=Zz(A,n.rects,g),M},{}),c=m[n.placement],I=c.x,k=c.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=I,n.modifiersData.popperOffsets.y+=k),n.modifiersData[u]=m}const Kz={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Xz};function Jz(e){return e==="x"?"y":"x"}function Ku(e,n,s){return qa(e,xf(n,s))}function Yz(e,n,s){var u=Ku(e,n,s);return u>s?s:u}function Qz(e){var n=e.state,s=e.options,u=e.name,h=s.mainAxis,g=h===void 0?!0:h,m=s.altAxis,c=m===void 0?!1:m,I=s.boundary,k=s.rootBoundary,M=s.altBoundary,A=s.padding,z=s.tether,q=z===void 0?!0:z,K=s.tetherOffset,J=K===void 0?0:K,se=gy(n,{boundary:I,rootBoundary:k,padding:A,altBoundary:M}),ke=Do(n.placement),ye=yc(n.placement),Z=!ye,fe=my(ke),W=Jz(fe),ee=n.modifiersData.popperOffsets,Se=n.rects.reference,Ee=n.rects.popper,Le=typeof J=="function"?J(Object.assign({},n.rects,{placement:n.placement})):J,pe=typeof Le=="number"?{mainAxis:Le,altAxis:Le}:Object.assign({mainAxis:0,altAxis:0},Le),Ie=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,Ae={x:0,y:0};if(ee){if(g){var De,Ge=fe==="y"?On:Bn,rt=fe==="y"?po:mo,Xe=fe==="y"?"height":"width",dt=ee[fe],nt=dt+se[Ge],ei=dt-se[rt],$t=q?-Ee[Xe]/2:0,Vt=ye===gc?Se[Xe]:Ee[Xe],Nt=ye===gc?-Ee[Xe]:-Se[Xe],Ei=n.elements.arrow,Xi=q&&Ei?fy(Ei):{width:0,height:0},zi=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:ow(),hi=zi[Ge],Li=zi[rt],Di=Ku(0,Se[Xe],Xi[Xe]),Or=Z?Se[Xe]/2-$t-Di-hi-pe.mainAxis:Vt-Di-hi-pe.mainAxis,cr=Z?-Se[Xe]/2+$t+Di+Li+pe.mainAxis:Nt+Di+Li+pe.mainAxis,Br=n.elements.arrow&&fh(n.elements.arrow),rr=Br?fe==="y"?Br.clientTop||0:Br.clientLeft||0:0,ce=(De=Ie==null?void 0:Ie[fe])!=null?De:0,ge=dt+Or-ce-rr,Be=dt+cr-ce,ae=Ku(q?xf(nt,ge):nt,dt,q?qa(ei,Be):ei);ee[fe]=ae,Ae[fe]=ae-dt}if(c){var He,tt=fe==="x"?On:Bn,We=fe==="x"?po:mo,$e=ee[W],Qe=W==="y"?"height":"width",Ze=$e+se[tt],pt=$e-se[We],St=[On,Bn].indexOf(ke)!==-1,vt=(He=Ie==null?void 0:Ie[W])!=null?He:0,Mt=St?Ze:$e-Se[Qe]-Ee[Qe]-vt+pe.altAxis,qt=St?$e+Se[Qe]+Ee[Qe]-vt-pe.altAxis:pt,Ne=q&&St?Yz(Mt,$e,qt):Ku(q?Mt:Ze,$e,q?qt:pt);ee[W]=Ne,Ae[W]=Ne-$e}n.modifiersData[u]=Ae}}const e5={name:"preventOverflow",enabled:!0,phase:"main",fn:Qz,requiresIfExists:["offset"]};var t5=function(n,s){return n=typeof n=="function"?n(Object.assign({},s.rects,{placement:s.placement})):n,sw(typeof n!="number"?n:aw(n,ph))};function i5(e){var n,s=e.state,u=e.name,h=e.options,g=s.elements.arrow,m=s.modifiersData.popperOffsets,c=Do(s.placement),I=my(c),k=[Bn,mo].indexOf(c)>=0,M=k?"height":"width";if(!(!g||!m)){var A=t5(h.padding,s),z=fy(g),q=I==="y"?On:Bn,K=I==="y"?po:mo,J=s.rects.reference[M]+s.rects.reference[I]-m[I]-s.rects.popper[M],se=m[I]-s.rects.reference[I],ke=fh(g),ye=ke?I==="y"?ke.clientHeight||0:ke.clientWidth||0:0,Z=J/2-se/2,fe=A[q],W=ye-z[M]-A[K],ee=ye/2-z[M]/2+Z,Se=Ku(fe,ee,W),Ee=I;s.modifiersData[u]=(n={},n[Ee]=Se,n.centerOffset=Se-ee,n)}}function r5(e){var n=e.state,s=e.options,u=s.element,h=u===void 0?"[data-popper-arrow]":u;h!=null&&(typeof h=="string"&&(h=n.elements.popper.querySelector(h),!h)||rw(n.elements.popper,h)&&(n.elements.arrow=h))}const n5={name:"arrow",enabled:!0,phase:"main",fn:i5,effect:r5,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},o5=Lz({defaultModifiers:[...jz,Kz,Wz,e5,cw,lw,n5]});function s5({locked:e=!1,overflowPadding:n=8,offsetDistance:s=8,offsetSkid:u=0,gpuAcceleration:h=!0,adaptive:g=!0,scroll:m=!0,resize:c=!0,arrow:I=!1,placement:k,strategy:M},A){const z=Lt(null),q=Lt(null),K=Lt(null);return an(()=>{Qn(J=>{if(!q.value||!z.value&&!(A!=null&&A.value))return;const se=lv(q),ke=lv(z);if(!(se instanceof HTMLElement)||!ke)return;const ye={modifiers:[{name:"flip",enabled:!e},{name:"preventOverflow",options:{padding:n}},{name:"offset",options:{offset:[u,s]}},{name:"computeStyles",options:{adaptive:g,gpuAcceleration:h}},{name:"eventListeners",options:{scroll:m,resize:c}},{name:"arrow",enabled:I}]};k&&(ye.placement=k),M&&(ye.strategy=M),K.value=o5(ke,se,ye),J(K.value.destroy)})}),[z,q,K]}const Mo=Ya(tr.ui.strategy,tr.ui.select,_k),Nd=Ya(tr.ui.strategy,tr.ui.selectMenu,vk),a5=Ui({components:{HCombobox:$P,HComboboxButton:UP,HComboboxOptions:HP,HComboboxOption:GP,HComboboxInput:qP,HListbox:ez,HListboxButton:tz,HListboxOptions:iz,HListboxOption:rz,UIcon:na,UAvatar:k1},inheritAttrs:!1,props:{modelValue:{type:[String,Number,Object,Array,Boolean],default:""},query:{type:String,default:null},by:{type:String,default:void 0},options:{type:Array,default:()=>[]},id:{type:String,default:null},name:{type:String,default:null},required:{type:Boolean,default:!1},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>Mo.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:()=>Mo.default.trailingIcon},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},selectedIcon:{type:String,default:()=>Nd.default.selectedIcon},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},searchable:{type:[Boolean,Function],default:!1},searchablePlaceholder:{type:String,default:"Search..."},searchableLazy:{type:Boolean,default:!1},clearSearchOnClose:{type:Boolean,default:()=>Nd.default.clearSearchOnClose},debounce:{type:Number,default:200},creatable:{type:Boolean,default:!1},showCreateOptionWhen:{type:String,default:()=>Nd.default.showCreateOptionWhen},placeholder:{type:String,default:null},padded:{type:Boolean,default:!0},size:{type:String,default:null,validator(e){return Object.keys(Mo.size).includes(e)}},color:{type:String,default:()=>Mo.default.color,validator(e){return[...tr.ui.colors,...Object.keys(Mo.color)].includes(e)}},variant:{type:String,default:()=>Mo.default.variant,validator(e){return[...Object.keys(Mo.variant),...Object.values(Mo.color).flatMap(n=>Object.keys(n))].includes(e)}},optionAttribute:{type:String,default:"label"},valueAttribute:{type:String,default:null},searchAttributes:{type:Array,default:null},popper:{type:Object,default:()=>({})},selectClass:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},uiMenu:{type:Object,default:()=>({})}},emits:["update:modelValue","update:query","open","close","change"],setup(e,{emit:n,slots:s}){const{ui:u,attrs:h}=fc("select",zo(e,"ui"),Mo,zo(e,"class")),{ui:g}=fc("selectMenu",zo(e,"uiMenu"),Nd),m=je(()=>Df({},e.popper,g.value.popper)),[c,I]=s5(m.value),{size:k,rounded:M}=Bf({ui:u,props:e}),{emitFormBlur:A,emitFormChange:z,inputId:q,color:K,size:J,name:se}=M1(e,Mo),ke=je(()=>k.value||J.value),ye=Lt(""),Z=je({get(){return e.query??ye.value},set($t){ye.value=$t,n("update:query",$t)}}),fe=je(()=>{if(e.multiple)return Array.isArray(e.modelValue)&&e.modelValue.length?`${e.modelValue.length} selected`:null;if(e.modelValue!==void 0&&e.modelValue!==null)if(e.valueAttribute){const $t=e.options.find(Vt=>Vt[e.valueAttribute]===e.modelValue);return $t?$t[e.optionAttribute]:null}else return["string","number"].includes(typeof e.modelValue)?e.modelValue:e.modelValue[e.optionAttribute];return null}),W=je(()=>{var Vt,Nt;const $t=((Nt=(Vt=u.value.color)==null?void 0:Vt[K.value])==null?void 0:Nt[e.variant])||u.value.variant[e.variant];return dc(Er(u.value.base,g.value.select,M.value,u.value.size[ke.value],u.value.gap[ke.value],e.padded?u.value.padding[ke.value]:"p-0",$t==null?void 0:$t.replaceAll("{color}",K.value),(ee.value||s.leading)&&u.value.leading.padding[ke.value],(Se.value||s.trailing)&&u.value.trailing.padding[ke.value]),e.placeholder&&!e.modelValue&&u.value.placeholder,e.selectClass)}),ee=je(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),Se=je(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),Ee=je(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),Le=je(()=>e.loading&&!ee.value?e.loadingIcon:e.trailingIcon||e.icon),pe=je(()=>Er(u.value.icon.leading.wrapper,u.value.icon.leading.pointer,u.value.icon.leading.padding[ke.value])),Ie=je(()=>Er(u.value.icon.base,K.value&&tr.ui.colors.includes(K.value)&&u.value.icon.color.replaceAll("{color}",K.value),u.value.icon.size[ke.value],e.loading&&u.value.icon.loading)),Ae=je(()=>Er(u.value.icon.trailing.wrapper,u.value.icon.trailing.pointer,u.value.icon.trailing.padding[ke.value])),De=je(()=>Er(u.value.icon.base,K.value&&tr.ui.colors.includes(K.value)&&u.value.icon.color.replaceAll("{color}",K.value),u.value.icon.size[ke.value],e.loading&&!ee.value&&u.value.icon.loading)),Ge=typeof e.searchable=="function"?Kb(e.searchable,e.debounce):void 0,rt=FA(async()=>e.searchable&&Ge?await Ge(Z.value):Z.value===""?e.options:e.options.filter($t=>{var Vt;return((Vt=e.searchAttributes)!=null&&Vt.length?e.searchAttributes:[e.optionAttribute]).some(Nt=>{if(["string","number"].includes(typeof $t))return String($t).search(new RegExp(Z.value,"i"))!==-1;const Ei=i1($t,Nt);return Ei!=null&&String(Ei).search(new RegExp(Z.value,"i"))!==-1})}),[],{lazy:e.searchableLazy}),Xe=je(()=>Z.value===""||e.showCreateOptionWhen==="empty"&&rt.value.length||e.showCreateOptionWhen==="always"&&rt.value.find(Vt=>["string","number"].includes(typeof Vt)?Vt===Z.value:Vt[e.optionAttribute]===Z.value)?null:["string","number"].includes(typeof e.modelValue)?Z.value:{[e.optionAttribute]:Z.value});function dt(){e.clearSearchOnClose&&(Z.value="")}er(I,$t=>{$t?n("open"):(dt(),n("close"),A())});function nt($t){n("update:modelValue",$t),n("change",$t),z()}function ei($t){Z.value=$t.target.value}return xP(()=>iP("$YMH7mn4R4k")),{ui:u,uiMenu:g,attrs:h,name:se,inputId:q,popper:m,trigger:c,container:I,label:fe,isLeading:ee,isTrailing:Se,selectClass:W,leadingIconName:Ee,leadingIconClass:Ie,leadingWrapperIconClass:pe,trailingIconName:Le,trailingIconClass:De,trailingWrapperIconClass:Ae,filteredOptions:rt,createOption:Xe,query:Z,onUpdate:nt,onQueryChange:ei}}}),l5=["value","required"],c5=["id","disabled"],u5={class:"truncate"};function h5(e,n,s,u,h,g){const m=na,c=Mm("HComboboxInput"),I=k1;return At(),ki(cs(e.searchable?"HCombobox":"HListbox"),{by:e.by,name:e.name,"model-value":e.modelValue,multiple:e.multiple,disabled:e.disabled,as:"div",class:Zt(e.ui.wrapper),"onUpdate:modelValue":e.onUpdate},{default:Rr(({open:k})=>[e.required?(At(),wi("input",{key:0,value:e.modelValue,required:e.required,class:Zt(e.uiMenu.required),tabindex:"-1","aria-hidden":"true"},null,10,l5)):xr("",!0),(At(),ki(cs(e.searchable?"HComboboxButton":"HListboxButton"),{ref:"trigger",as:"div",role:"button",class:Zt(e.uiMenu.trigger)},{default:Rr(()=>[br(e.$slots,"default",{open:k,disabled:e.disabled,loading:e.loading},()=>[lr("button",fo({id:e.inputId,class:e.selectClass,disabled:e.disabled,type:"button"},e.attrs),[e.isLeading&&e.leadingIconName||e.$slots.leading?(At(),wi("span",{key:0,class:Zt(e.leadingWrapperIconClass)},[br(e.$slots,"leading",{disabled:e.disabled,loading:e.loading},()=>[ri(m,{name:e.leadingIconName,class:Zt(e.leadingIconClass)},null,8,["name","class"])])],2)):xr("",!0),br(e.$slots,"label",{},()=>[e.label?(At(),wi("span",{key:0,class:Zt(e.uiMenu.label)},nn(e.label),3)):(At(),wi("span",{key:1,class:Zt(e.uiMenu.label)},nn(e.placeholder||" "),3))]),e.isTrailing&&e.trailingIconName||e.$slots.trailing?(At(),wi("span",{key:1,class:Zt(e.trailingWrapperIconClass)},[br(e.$slots,"trailing",{disabled:e.disabled,loading:e.loading},()=>[ri(m,{name:e.trailingIconName,class:Zt(e.trailingIconClass),"aria-hidden":"true"},null,8,["name","class"])])],2)):xr("",!0)],16,c5)])]),_:2},1032,["class"])),k?(At(),wi("div",{key:1,ref:"container",class:Zt([e.uiMenu.container,e.uiMenu.width])},[ri(zg,fo({appear:""},e.uiMenu.transition),{default:Rr(()=>[lr("div",null,[e.popper.arrow?(At(),wi("div",{key:0,"data-popper-arrow":"",class:Zt(Object.values(e.uiMenu.arrow))},null,2)):xr("",!0),(At(),ki(cs(e.searchable?"HComboboxOptions":"HListboxOptions"),{static:"",class:Zt([e.uiMenu.base,e.uiMenu.ring,e.uiMenu.rounded,e.uiMenu.shadow,e.uiMenu.background,e.uiMenu.padding,e.uiMenu.height])},{default:Rr(()=>{var M,A;return[e.searchable?(At(),ki(c,{key:0,"display-value":()=>e.query,name:"q",placeholder:e.searchablePlaceholder,autofocus:"",autocomplete:"off",class:Zt(e.uiMenu.input),onChange:e.onQueryChange},null,8,["display-value","placeholder","class","onChange"])):xr("",!0),(At(!0),wi(mr,null,OS(e.filteredOptions,(z,q)=>(At(),ki(cs(e.searchable?"HComboboxOption":"HListboxOption"),{key:q,as:"template",value:e.valueAttribute?z[e.valueAttribute]:z,disabled:z.disabled},{default:Rr(({active:K,selected:J,disabled:se})=>[lr("li",{class:Zt([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,K?e.uiMenu.option.active:e.uiMenu.option.inactive,J&&e.uiMenu.option.selected,se&&e.uiMenu.option.disabled])},[lr("div",{class:Zt(e.uiMenu.option.container)},[br(e.$slots,"option",{option:z,active:K,selected:J},()=>[z.icon?(At(),ki(m,{key:0,name:z.icon,class:Zt([e.uiMenu.option.icon.base,K?e.uiMenu.option.icon.active:e.uiMenu.option.icon.inactive,z.iconClass]),"aria-hidden":"true"},null,8,["name","class"])):z.avatar?(At(),ki(I,fo({key:1,ref_for:!0},{size:e.uiMenu.option.avatar.size,...z.avatar},{class:e.uiMenu.option.avatar.base,"aria-hidden":"true"}),null,16,["class"])):z.chip?(At(),wi("span",{key:2,class:Zt(e.uiMenu.option.chip.base),style:Ha({background:`#${z.chip}`})},null,6)):xr("",!0),lr("span",u5,nn(["string","number"].includes(typeof z)?z:z[e.optionAttribute]),1)])],2),J?(At(),wi("span",{key:0,class:Zt([e.uiMenu.option.selectedIcon.wrapper,e.uiMenu.option.selectedIcon.padding])},[ri(m,{name:e.selectedIcon,class:Zt(e.uiMenu.option.selectedIcon.base),"aria-hidden":"true"},null,8,["name","class"])],2)):xr("",!0)],2)]),_:2},1032,["value","disabled"]))),128)),e.creatable&&e.createOption?(At(),ki(cs(e.searchable?"HComboboxOption":"HListboxOption"),{key:1,value:e.createOption,as:"template"},{default:Rr(({active:z,selected:q})=>[lr("li",{class:Zt([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,z?e.uiMenu.option.active:e.uiMenu.option.inactive])},[lr("div",{class:Zt(e.uiMenu.option.container)},[br(e.$slots,"option-create",{option:e.createOption,active:z,selected:q},()=>[lr("span",{class:Zt(e.uiMenu.option.create)},'Create "'+nn(e.createOption[e.optionAttribute])+'"',3)])],2)],2)]),_:3},8,["value"])):e.searchable&&e.query&&!((M=e.filteredOptions)!=null&&M.length)?(At(),wi("p",{key:2,class:Zt(e.uiMenu.option.empty)},[br(e.$slots,"option-empty",{query:e.query},()=>[hs(' No results for "'+nn(e.query)+'". ',1)])],2)):(A=e.filteredOptions)!=null&&A.length?xr("",!0):(At(),wi("p",{key:3,class:Zt(e.uiMenu.empty)},[br(e.$slots,"empty",{query:e.query},()=>[hs(" No options. ")])],2))]}),_:3},8,["class"]))])]),_:3},16)],2)):xr("",!0)]),_:3},8,["by","name","model-value","multiple","disabled","class","onUpdate:modelValue"])}const d5=yo(a5,[["render",h5]]);var f5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function p5(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uw={exports:{}};/** * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.4.1/LICENSE.txt - */(function(e,n){(function(s,u){e.exports=u()})(f5,function(){var s={},u={};function h(m,c,I){if(u[m]=I,m==="index"){var k="var sharedModule = {}; ("+u.shared+")(sharedModule); ("+u.worker+")(sharedModule);",M={};return u.shared(M),u.index(s,M),typeof window<"u"&&s.setWorkerUrl(window.URL.createObjectURL(new Blob([k],{type:"text/javascript"}))),s}}h("shared",["exports"],function(m){function c(r,t,o,l){return new(o||(o=Promise))(function(f,y){function x(C){try{E(l.next(C))}catch(L){y(L)}}function b(C){try{E(l.throw(C))}catch(L){y(L)}}function E(C){var L;C.done?f(C.value):(L=C.value,L instanceof o?L:new o(function(D){D(L)})).then(x,b)}E((l=l.apply(r,t||[])).next())})}function I(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}typeof SuppressedError=="function"&&SuppressedError;var k=M;function M(r,t){this.x=r,this.y=t}M.prototype={clone:function(){return new M(this.x,this.y)},add:function(r){return this.clone()._add(r)},sub:function(r){return this.clone()._sub(r)},multByPoint:function(r){return this.clone()._multByPoint(r)},divByPoint:function(r){return this.clone()._divByPoint(r)},mult:function(r){return this.clone()._mult(r)},div:function(r){return this.clone()._div(r)},rotate:function(r){return this.clone()._rotate(r)},rotateAround:function(r,t){return this.clone()._rotateAround(r,t)},matMult:function(r){return this.clone()._matMult(r)},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(r){return this.x===r.x&&this.y===r.y},dist:function(r){return Math.sqrt(this.distSqr(r))},distSqr:function(r){var t=r.x-this.x,o=r.y-this.y;return t*t+o*o},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(r){return Math.atan2(this.y-r.y,this.x-r.x)},angleWith:function(r){return this.angleWithSep(r.x,r.y)},angleWithSep:function(r,t){return Math.atan2(this.x*t-this.y*r,this.x*r+this.y*t)},_matMult:function(r){var t=r[2]*this.x+r[3]*this.y;return this.x=r[0]*this.x+r[1]*this.y,this.y=t,this},_add:function(r){return this.x+=r.x,this.y+=r.y,this},_sub:function(r){return this.x-=r.x,this.y-=r.y,this},_mult:function(r){return this.x*=r,this.y*=r,this},_div:function(r){return this.x/=r,this.y/=r,this},_multByPoint:function(r){return this.x*=r.x,this.y*=r.y,this},_divByPoint:function(r){return this.x/=r.x,this.y/=r.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var r=this.y;return this.y=this.x,this.x=-r,this},_rotate:function(r){var t=Math.cos(r),o=Math.sin(r),l=o*this.x+t*this.y;return this.x=t*this.x-o*this.y,this.y=l,this},_rotateAround:function(r,t){var o=Math.cos(r),l=Math.sin(r),f=t.y+l*(this.x-t.x)+o*(this.y-t.y);return this.x=t.x+o*(this.x-t.x)-l*(this.y-t.y),this.y=f,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},M.convert=function(r){return r instanceof M?r:Array.isArray(r)?new M(r[0],r[1]):r};var A=I(k),z=q;function q(r,t,o,l){this.cx=3*r,this.bx=3*(o-r)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(l-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=r,this.p1y=t,this.p2x=o,this.p2y=l}q.prototype={sampleCurveX:function(r){return((this.ax*r+this.bx)*r+this.cx)*r},sampleCurveY:function(r){return((this.ay*r+this.by)*r+this.cy)*r},sampleCurveDerivativeX:function(r){return(3*this.ax*r+2*this.bx)*r+this.cx},solveCurveX:function(r,t){if(t===void 0&&(t=1e-6),r<0)return 0;if(r>1)return 1;for(var o=r,l=0;l<8;l++){var f=this.sampleCurveX(o)-r;if(Math.abs(f)f?x=o:b=o,o=.5*(b-x)+x;return o},solve:function(r,t){return this.sampleCurveY(this.solveCurveX(r,t))}};var K=I(z);let J,se;function ke(){return J==null&&(J=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),J}function ye(){if(se==null&&(se=!1,ke())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let l=0;l<5*5;l++){const f=4*l;t.fillStyle=`rgb(${f},${f+1},${f+2})`,t.fillRect(l%5,Math.floor(l/5),1,1)}const o=t.getImageData(0,0,5,5).data;for(let l=0;l<5*5*4;l++)if(l%4!=3&&o[l]!==l){se=!0;break}}}return se||!1}function W(r,t,o,l){const f=new K(r,t,o,l);return y=>f.solve(y)}const fe=W(.25,.1,.25,1);function Z(r,t,o){return Math.min(o,Math.max(t,r))}function ee(r,t,o){const l=o-t,f=((r-t)%l+l)%l+t;return f===t?o:f}function Se(r,...t){for(const o of t)for(const l in o)r[l]=o[l];return r}let Ee=1;function Le(r,t,o){const l={};for(const f in r)l[f]=t.call(this,r[f],f,r);return l}function pe(r,t,o){const l={};for(const f in r)t.call(this,r[f],f,r)&&(l[f]=r[f]);return l}function Ie(r){return Array.isArray(r)?r.map(Ie):typeof r=="object"&&r?Le(r,Ie):r}const Ae={};function De(r){Ae[r]||(typeof console<"u"&&console.warn(r),Ae[r]=!0)}function Ge(r,t,o){return(o.y-r.y)*(t.x-r.x)>(t.y-r.y)*(o.x-r.x)}function rt(r){return typeof WorkerGlobalScope<"u"&&r!==void 0&&r instanceof WorkerGlobalScope}let Xe=null;function dt(r){return typeof ImageBitmap<"u"&&r instanceof ImageBitmap}const nt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ei(r,t,o,l,f){return c(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const y=new VideoFrame(r,{timestamp:0});try{const x=y==null?void 0:y.format;if(!x||!x.startsWith("BGR")&&!x.startsWith("RGB"))throw new Error(`Unrecognized format ${x}`);const b=x.startsWith("BGR"),E=new Uint8ClampedArray(l*f*4);if(yield y.copyTo(E,function(C,L,D,B,V){const $=4*Math.max(-L,0),G=(Math.max(0,D)-D)*B*4+$,Q=4*B,oe=Math.max(0,L),we=Math.max(0,D);return{rect:{x:oe,y:we,width:Math.min(C.width,L+B)-oe,height:Math.min(C.height,D+V)-we},layout:[{offset:G,stride:Q}]}}(r,t,o,l,f)),b)for(let C=0;Crt(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Or=function(r,t){if(/:\/\//.test(r.url)&&!/^https?:|^file:/.test(r.url)){const l=zi(r.url);if(l)return l(r,t);if(rt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:r,targetMapId:hi},t)}if(!(/^file:/.test(o=r.url)||/^file:/.test(Di())&&!/^\w+:/.test(o))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(l,f){return c(this,void 0,void 0,function*(){const y=new Request(l.url,{method:l.method||"GET",body:l.body,credentials:l.credentials,headers:l.headers,cache:l.cache,referrer:Di(),signal:f.signal});l.type!=="json"||y.headers.has("Accept")||y.headers.set("Accept","application/json");const x=yield fetch(y);if(!x.ok){const C=yield x.blob();throw new Li(x.status,x.statusText,l.url,C)}let b;b=l.type==="arrayBuffer"||l.type==="image"?x.arrayBuffer():l.type==="json"?x.json():x.text();const E=yield b;if(f.signal.aborted)throw wi();return{data:E,cacheControl:x.headers.get("Cache-Control"),expires:x.headers.get("Expires")}})}(r,t);if(rt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:r,mustQueue:!0,targetMapId:hi},t)}var o;return function(l,f){return new Promise((y,x)=>{var b;const E=new XMLHttpRequest;E.open(l.method||"GET",l.url,!0),l.type!=="arrayBuffer"&&l.type!=="image"||(E.responseType="arraybuffer");for(const C in l.headers)E.setRequestHeader(C,l.headers[C]);l.type==="json"&&(E.responseType="text",!((b=l.headers)===null||b===void 0)&&b.Accept||E.setRequestHeader("Accept","application/json")),E.withCredentials=l.credentials==="include",E.onerror=()=>{x(new Error(E.statusText))},E.onload=()=>{if(!f.signal.aborted)if((E.status>=200&&E.status<300||E.status===0)&&E.response!==null){let C=E.response;if(l.type==="json")try{C=JSON.parse(E.response)}catch(L){return void x(L)}y({data:C,cacheControl:E.getResponseHeader("Cache-Control"),expires:E.getResponseHeader("Expires")})}else{const C=new Blob([E.response],{type:E.getResponseHeader("Content-Type")});x(new Li(E.status,E.statusText,l.url,C))}},f.signal.addEventListener("abort",()=>{E.abort(),x(wi())}),E.send(l.body)})}(r,t)};function cr(r){if(!r||r.indexOf("://")<=0||r.indexOf("data:image/")===0||r.indexOf("blob:")===0)return!0;const t=new URL(r),o=window.location;return t.protocol===o.protocol&&t.host===o.host}function Br(r,t,o){o[r]&&o[r].indexOf(t)!==-1||(o[r]=o[r]||[],o[r].push(t))}function rr(r,t,o){if(o&&o[r]){const l=o[r].indexOf(t);l!==-1&&o[r].splice(l,1)}}class ce{constructor(t,o={}){Se(this,o),this.type=t}}class ge extends ce{constructor(t,o={}){super("error",Se({error:t},o))}}class Be{on(t,o){return this._listeners=this._listeners||{},Br(t,o,this._listeners),this}off(t,o){return rr(t,o,this._listeners),rr(t,o,this._oneTimeListeners),this}once(t,o){return o?(this._oneTimeListeners=this._oneTimeListeners||{},Br(t,o,this._oneTimeListeners),this):new Promise(l=>this.once(t,l))}fire(t,o){typeof t=="string"&&(t=new ce(t,o||{}));const l=t.type;if(this.listens(l)){t.target=this;const f=this._listeners&&this._listeners[l]?this._listeners[l].slice():[];for(const b of f)b.call(this,t);const y=this._oneTimeListeners&&this._oneTimeListeners[l]?this._oneTimeListeners[l].slice():[];for(const b of y)rr(l,b,this._oneTimeListeners),b.call(this,t);const x=this._eventedParent;x&&(Se(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),x.fire(t))}else t instanceof ge&&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,o){return this._eventedParent=t,this._eventedParentData=o,this}}var ae={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},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","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"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"},"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 He=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function tt(r,t){const o={};for(const l in r)l!=="ref"&&(o[l]=r[l]);return He.forEach(l=>{l in t&&(o[l]=t[l])}),o}function Ze(r,t){if(Array.isArray(r)){if(!Array.isArray(t)||r.length!==t.length)return!1;for(let o=0;o`:r.itemType.kind==="value"?"array":`array<${t}>`}return r.kind}const re=[Gr,Ye,Ot,zt,di,to,Ei,N(Bt),hr,te,F];function de(r,t){if(t.kind==="error")return null;if(r.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!de(r.itemType,t.itemType))&&(typeof r.N!="number"||r.N===t.N))return null}else{if(r.kind===t.kind)return null;if(r.kind==="value"){for(const o of re)if(!de(o,t))return null}}return`Expected ${U(r)} but found ${U(t)} instead.`}function _e(r,t){return t.some(o=>o.kind===r.kind)}function be(r,t){return t.some(o=>o==="null"?r===null:o==="array"?Array.isArray(r):o==="object"?r&&!Array.isArray(r)&&typeof r=="object":o===typeof r)}function ue(r,t){return r.kind==="array"&&t.kind==="array"?r.itemType.kind===t.itemType.kind&&typeof r.N=="number":r.kind===t.kind}const Me=.96422,Ue=.82521,Oe=4/29,Re=6/29,It=3*Re*Re,Et=Re*Re*Re,Jt=Math.PI/180,Dt=180/Math.PI;function ti(r){return(r%=360)<0&&(r+=360),r}function fi([r,t,o,l]){let f,y;const x=Yi((.2225045*(r=Si(r))+.7168786*(t=Si(t))+.0606169*(o=Si(o)))/1);r===t&&t===o?f=y=x:(f=Yi((.4360747*r+.3850649*t+.1430804*o)/Me),y=Yi((.0139322*r+.0971045*t+.7141733*o)/Ue));const b=116*x-16;return[b<0?0:b,500*(f-x),200*(x-y),l]}function Si(r){return r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function Yi(r){return r>Et?Math.pow(r,1/3):r/It+Oe}function Gt([r,t,o,l]){let f=(r+16)/116,y=isNaN(t)?f:f+t/500,x=isNaN(o)?f:f-o/200;return f=1*nr(f),y=Me*nr(y),x=Ue*nr(x),[Ri(3.1338561*y-1.6168667*f-.4906146*x),Ri(-.9787684*y+1.9161415*f+.033454*x),Ri(.0719453*y-.2289914*f+1.4052427*x),l]}function Ri(r){return(r=r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055)<0?0:r>1?1:r}function nr(r){return r>Re?r*r*r:It*(r-Oe)}function Zr(r){return parseInt(r.padEnd(2,r),16)/255}function ln(r,t){return or(t?r/100:r,0,1)}function or(r,t,o){return Math.min(Math.max(t,r),o)}function ms(r){return!r.some(Number.isNaN)}const $f={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class ui{constructor(t,o,l,f=1,y=!0){this.r=t,this.g=o,this.b=l,this.a=f,y||(this.r*=f,this.g*=f,this.b*=f,f||this.overwriteGetter("rgb",[t,o,l,f]))}static parse(t){if(t instanceof ui)return t;if(typeof t!="string")return;const o=function(l){if((l=l.toLowerCase().trim())==="transparent")return[0,0,0,0];const f=$f[l];if(f){const[x,b,E]=f;return[x/255,b/255,E/255,1]}if(l.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(l)){const x=l.length<6?1:2;let b=1;return[Zr(l.slice(b,b+=x)),Zr(l.slice(b,b+=x)),Zr(l.slice(b,b+=x)),Zr(l.slice(b,b+x)||"ff")]}if(l.startsWith("rgb")){const x=l.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(x){const[b,E,C,L,D,B,V,$,G,Q,oe,we]=x,he=[L||" ",V||" ",Q].join("");if(he===" "||he===" /"||he===",,"||he===",,,"){const xe=[C,B,G].join(""),ze=xe==="%%%"?100:xe===""?255:0;if(ze){const qe=[or(+E/ze,0,1),or(+D/ze,0,1),or(+$/ze,0,1),oe?ln(+oe,we):1];if(ms(qe))return qe}}return}}const y=l.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(y){const[x,b,E,C,L,D,B,V,$]=y,G=[E||" ",L||" ",B].join("");if(G===" "||G===" /"||G===",,"||G===",,,"){const Q=[+b,or(+C,0,100),or(+D,0,100),V?ln(+V,$):1];if(ms(Q))return function([oe,we,he,xe]){function ze(qe){const st=(qe+oe/30)%12,Tt=we*Math.min(he,1-he);return he-Tt*Math.max(-1,Math.min(st-3,9-st,1))}return oe=ti(oe),we/=100,he/=100,[ze(0),ze(8),ze(4),xe]}(Q)}}}(t);return o?new ui(...o,!1):void 0}get rgb(){const{r:t,g:o,b:l,a:f}=this,y=f||1/0;return this.overwriteGetter("rgb",[t/y,o/y,l/y,f])}get hcl(){return this.overwriteGetter("hcl",function(t){const[o,l,f,y]=fi(t),x=Math.sqrt(l*l+f*f);return[Math.round(1e4*x)?ti(Math.atan2(f,l)*Dt):NaN,x,o,y]}(this.rgb))}get lab(){return this.overwriteGetter("lab",fi(this.rgb))}overwriteGetter(t,o){return Object.defineProperty(this,t,{value:o}),o}toString(){const[t,o,l,f]=this.rgb;return`rgba(${[t,o,l].map(y=>Math.round(255*y)).join(",")},${f})`}}ui.black=new ui(0,0,0,1),ui.white=new ui(1,1,1,1),ui.transparent=new ui(0,0,0,0),ui.red=new ui(1,0,0,1);class wc{constructor(t,o,l){this.sensitivity=t?o?"variant":"case":o?"accent":"base",this.locale=l,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,o){return this.collator.compare(t,o)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ec{constructor(t,o,l,f,y){this.text=t,this.image=o,this.scale=l,this.fontStack=f,this.textColor=y}}class cn{constructor(t){this.sections=t}static fromString(t){return new cn([new Ec(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 cn?t:cn.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}}class Wr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Wr)return t;if(typeof t=="number")return new Wr([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const o of t)if(typeof o!="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 Wr(t)}}toString(){return JSON.stringify(this.values)}}const sa=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Xr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Xr)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let o=0;o=0&&r<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof o=="number"&&o>=0&&o<=255?l===void 0||typeof l=="number"&&l>=0&&l<=1?null:`Invalid rgba value [${[r,t,o,l].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof l=="number"?[r,t,o,l]:[r,t,o]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function io(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof ui||r instanceof wc||r instanceof cn||r instanceof Wr||r instanceof Xr||r instanceof _n)return!0;if(Array.isArray(r)){for(const t of r)if(!io(t))return!1;return!0}if(typeof r=="object"){for(const t in r)if(!io(r[t]))return!1;return!0}return!1}function Qi(r){if(r===null)return Gr;if(typeof r=="string")return Ot;if(typeof r=="boolean")return zt;if(typeof r=="number")return Ye;if(r instanceof ui)return di;if(r instanceof wc)return eo;if(r instanceof cn)return to;if(r instanceof Wr)return hr;if(r instanceof Xr)return F;if(r instanceof _n)return te;if(Array.isArray(r)){const t=r.length;let o;for(const l of r){const f=Qi(l);if(o){if(o===f)continue;o=Bt;break}o=f}return N(o||Bt,t)}return Ei}function aa(r){const t=typeof r;return r===null?"":t==="string"||t==="number"||t==="boolean"?String(r):r instanceof ui||r instanceof cn||r instanceof Wr||r instanceof Xr||r instanceof _n?r.toString():JSON.stringify(r)}class jo{constructor(t,o){this.type=t,this.value=o}static parse(t,o){if(t.length!==2)return o.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!io(t[1]))return o.error("invalid value");const l=t[1];let f=Qi(l);const y=o.expectedType;return f.kind!=="array"||f.N!==0||!y||y.kind!=="array"||typeof y.N=="number"&&y.N!==0||(f=y),new jo(f,l)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class qi{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}const $o={string:Ot,number:Ye,boolean:zt,object:Ei};class Sn{constructor(t,o){this.type=t,this.args=o}static parse(t,o){if(t.length<2)return o.error("Expected at least one argument.");let l,f=1;const y=t[0];if(y==="array"){let b,E;if(t.length>2){const C=t[1];if(typeof C!="string"||!(C in $o)||C==="object")return o.error('The item type argument of "array" must be one of string, number, boolean',1);b=$o[C],f++}else b=Bt;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return o.error('The length argument to "array" must be a positive integer literal',2);E=t[2],f++}l=N(b,E)}else{if(!$o[y])throw new Error(`Types doesn't contain name = ${y}`);l=$o[y]}const x=[];for(;ft.outputDefined())}}const el={"to-boolean":zt,"to-color":di,"to-number":Ye,"to-string":Ot};class Nn{constructor(t,o){this.type=t,this.args=o}static parse(t,o){if(t.length<2)return o.error("Expected at least one argument.");const l=t[0];if(!el[l])throw new Error(`Can't parse ${l} as it is not part of the known types`);if((l==="to-boolean"||l==="to-string")&&t.length!==2)return o.error("Expected one argument.");const f=el[l],y=[];for(let x=1;x4?`Invalid rbga value ${JSON.stringify(o)}: expected an array containing either three or four numeric values.`:gh(o[0],o[1],o[2],o[3]),!l))return new ui(o[0]/255,o[1]/255,o[2]/255,o[3])}throw new qi(l||`Could not parse color from value '${typeof o=="string"?o:JSON.stringify(o)}'`)}case"padding":{let o;for(const l of this.args){o=l.evaluate(t);const f=Wr.parse(o);if(f)return f}throw new qi(`Could not parse padding from value '${typeof o=="string"?o:JSON.stringify(o)}'`)}case"variableAnchorOffsetCollection":{let o;for(const l of this.args){o=l.evaluate(t);const f=Xr.parse(o);if(f)return f}throw new qi(`Could not parse variableAnchorOffsetCollection from value '${typeof o=="string"?o:JSON.stringify(o)}'`)}case"number":{let o=null;for(const l of this.args){if(o=l.evaluate(t),o===null)return 0;const f=Number(o);if(!isNaN(f))return f}throw new qi(`Could not convert ${JSON.stringify(o)} to number.`)}case"formatted":return cn.fromString(aa(this.args[0].evaluate(t)));case"resolvedImage":return _n.fromString(aa(this.args[0].evaluate(t)));default:return aa(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Sc=["Unknown","Point","LineString","Polygon"];class gs{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"?Sc[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 o=this._parseColorCache[t];return o||(o=this._parseColorCache[t]=ui.parse(t)),o}}class ai{constructor(t,o,l=[],f,y=new ur,x=[]){this.registry=t,this.path=l,this.key=l.map(b=>`[${b}]`).join(""),this.scope=y,this.errors=x,this.expectedType=f,this._isConstant=o}parse(t,o,l,f,y={}){return o?this.concat(o,l,f)._parse(t,y):this._parse(t,y)}_parse(t,o){function l(f,y,x){return x==="assert"?new Sn(y,[f]):x==="coerce"?new Nn(y,[f]):f}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 f=t[0];if(typeof f!="string")return this.error(`Expression name must be a string, but found ${typeof f} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const y=this.registry[f];if(y){let x=y.parse(t,this);if(!x)return null;if(this.expectedType){const b=this.expectedType,E=x.type;if(b.kind!=="string"&&b.kind!=="number"&&b.kind!=="boolean"&&b.kind!=="object"&&b.kind!=="array"||E.kind!=="value")if(b.kind!=="color"&&b.kind!=="formatted"&&b.kind!=="resolvedImage"||E.kind!=="value"&&E.kind!=="string")if(b.kind!=="padding"||E.kind!=="value"&&E.kind!=="number"&&E.kind!=="array")if(b.kind!=="variableAnchorOffsetCollection"||E.kind!=="value"&&E.kind!=="array"){if(this.checkSubtype(b,E))return null}else x=l(x,b,o.typeAnnotation||"coerce");else x=l(x,b,o.typeAnnotation||"coerce");else x=l(x,b,o.typeAnnotation||"coerce");else x=l(x,b,o.typeAnnotation||"assert")}if(!(x instanceof jo)&&x.type.kind!=="resolvedImage"&&this._isConstant(x)){const b=new gs;try{x=new jo(x.type,x.evaluate(b))}catch(E){return this.error(E.message),null}}return x}return this.error(`Unknown expression "${f}". 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,o,l){const f=typeof t=="number"?this.path.concat(t):this.path,y=l?this.scope.concat(l):this.scope;return new ai(this.registry,this._isConstant,f,o||null,y,this.errors)}error(t,...o){const l=`${this.key}${o.map(f=>`[${f}]`).join("")}`;this.errors.push(new si(l,t))}checkSubtype(t,o){const l=de(t,o);return l&&this.error(l),l}}class tl{constructor(t,o){this.type=o.type,this.bindings=[].concat(t),this.result=o}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const o of this.bindings)t(o[1]);t(this.result)}static parse(t,o){if(t.length<4)return o.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const l=[];for(let y=1;y=l.length)throw new qi(`Array index out of bounds: ${o} > ${l.length-1}.`);if(o!==Math.floor(o))throw new qi(`Array index must be an integer, but found ${o} instead.`);return l[o]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class il{constructor(t,o){this.type=zt,this.needle=t,this.haystack=o}static parse(t,o){if(t.length!==3)return o.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const l=o.parse(t[1],1,Bt),f=o.parse(t[2],2,Bt);return l&&f?_e(l.type,[zt,Ot,Ye,Gr,Bt])?new il(l,f):o.error(`Expected first argument to be of type boolean, string, number or null, but found ${U(l.type)} instead`):null}evaluate(t){const o=this.needle.evaluate(t),l=this.haystack.evaluate(t);if(!l)return!1;if(!be(o,["boolean","string","number","null"]))throw new qi(`Expected first argument to be of type boolean, string, number or null, but found ${U(Qi(o))} instead.`);if(!be(l,["string","array"]))throw new qi(`Expected second argument to be of type array or string, but found ${U(Qi(l))} instead.`);return l.indexOf(o)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class la{constructor(t,o,l){this.type=Ye,this.needle=t,this.haystack=o,this.fromIndex=l}static parse(t,o){if(t.length<=2||t.length>=5)return o.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const l=o.parse(t[1],1,Bt),f=o.parse(t[2],2,Bt);if(!l||!f)return null;if(!_e(l.type,[zt,Ot,Ye,Gr,Bt]))return o.error(`Expected first argument to be of type boolean, string, number or null, but found ${U(l.type)} instead`);if(t.length===4){const y=o.parse(t[3],3,Ye);return y?new la(l,f,y):null}return new la(l,f)}evaluate(t){const o=this.needle.evaluate(t),l=this.haystack.evaluate(t);if(!be(o,["boolean","string","number","null"]))throw new qi(`Expected first argument to be of type boolean, string, number or null, but found ${U(Qi(o))} instead.`);if(!be(l,["string","array"]))throw new qi(`Expected second argument to be of type array or string, but found ${U(Qi(l))} instead.`);if(this.fromIndex){const f=this.fromIndex.evaluate(t);return l.indexOf(o,f)}return l.indexOf(o)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class Tc{constructor(t,o,l,f,y,x){this.inputType=t,this.type=o,this.input=l,this.cases=f,this.outputs=y,this.otherwise=x}static parse(t,o){if(t.length<5)return o.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return o.error("Expected an even number of arguments.");let l,f;o.expectedType&&o.expectedType.kind!=="value"&&(f=o.expectedType);const y={},x=[];for(let C=2;CNumber.MAX_SAFE_INTEGER)return B.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof $=="number"&&Math.floor($)!==$)return B.error("Numeric branch labels must be integer values.");if(l){if(B.checkSubtype(l,Qi($)))return null}else l=Qi($);if(y[String($)]!==void 0)return B.error("Branch labels must be unique.");y[String($)]=x.length}const V=o.parse(D,C,f);if(!V)return null;f=f||V.type,x.push(V)}const b=o.parse(t[1],1,Bt);if(!b)return null;const E=o.parse(t[t.length-1],t.length-1,f);return E?b.type.kind!=="value"&&o.concat(1).checkSubtype(l,b.type)?null:new Tc(l,f,b,y,x,E):null}evaluate(t){const o=this.input.evaluate(t);return(Qi(o)===this.inputType&&this.outputs[this.cases[o]]||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 rl{constructor(t,o,l){this.type=t,this.branches=o,this.otherwise=l}static parse(t,o){if(t.length<4)return o.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return o.error("Expected an odd number of arguments.");let l;o.expectedType&&o.expectedType.kind!=="value"&&(l=o.expectedType);const f=[];for(let x=1;xo.outputDefined())&&this.otherwise.outputDefined()}}class ca{constructor(t,o,l,f){this.type=t,this.input=o,this.beginIndex=l,this.endIndex=f}static parse(t,o){if(t.length<=2||t.length>=5)return o.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const l=o.parse(t[1],1,Bt),f=o.parse(t[2],2,Ye);if(!l||!f)return null;if(!_e(l.type,[N(Bt),Ot,Bt]))return o.error(`Expected first argument to be of type array or string, but found ${U(l.type)} instead`);if(t.length===4){const y=o.parse(t[3],3,Ye);return y?new ca(l.type,l,f,y):null}return new ca(l.type,l,f)}evaluate(t){const o=this.input.evaluate(t),l=this.beginIndex.evaluate(t);if(!be(o,["string","array"]))throw new qi(`Expected first argument to be of type array or string, but found ${U(Qi(o))} instead.`);if(this.endIndex){const f=this.endIndex.evaluate(t);return o.slice(l,f)}return o.slice(l)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function nl(r,t){const o=r.length-1;let l,f,y=0,x=o,b=0;for(;y<=x;)if(b=Math.floor((y+x)/2),l=r[b],f=r[b+1],l<=t){if(b===o||tt))throw new qi("Input is not a number.");x=b-1}return 0}class ua{constructor(t,o,l){this.type=t,this.input=o,this.labels=[],this.outputs=[];for(const[f,y]of l)this.labels.push(f),this.outputs.push(y)}static parse(t,o){if(t.length-1<4)return o.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return o.error("Expected an even number of arguments.");const l=o.parse(t[1],1,Ye);if(!l)return null;const f=[];let y=null;o.expectedType&&o.expectedType.kind!=="value"&&(y=o.expectedType);for(let x=1;x=b)return o.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',C);const D=o.parse(E,L,y);if(!D)return null;y=y||D.type,f.push([b,D])}return new ua(y,l,f)}evaluate(t){const o=this.labels,l=this.outputs;if(o.length===1)return l[0].evaluate(t);const f=this.input.evaluate(t);if(f<=o[0])return l[0].evaluate(t);const y=o.length;return f>=o[y-1]?l[y-1].evaluate(t):l[nl(o,f)].evaluate(t)}eachChild(t){t(this.input);for(const o of this.outputs)t(o)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Uf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var qf=Cc;function Cc(r,t,o,l){this.cx=3*r,this.bx=3*(o-r)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(l-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=r,this.p1y=t,this.p2x=o,this.p2y=l}Cc.prototype={sampleCurveX:function(r){return((this.ax*r+this.bx)*r+this.cx)*r},sampleCurveY:function(r){return((this.ay*r+this.by)*r+this.cy)*r},sampleCurveDerivativeX:function(r){return(3*this.ax*r+2*this.bx)*r+this.cx},solveCurveX:function(r,t){if(t===void 0&&(t=1e-6),r<0)return 0;if(r>1)return 1;for(var o=r,l=0;l<8;l++){var f=this.sampleCurveX(o)-r;if(Math.abs(f)f?x=o:b=o,o=.5*(b-x)+x;return o},solve:function(r,t){return this.sampleCurveY(this.solveCurveX(r,t))}};var yh=Uf(qf);function Uo(r,t,o){return r+o*(t-r)}function ol(r,t,o){return r.map((l,f)=>Uo(l,t[f],o))}const Fr={number:Uo,color:function(r,t,o,l="rgb"){switch(l){case"rgb":{const[f,y,x,b]=ol(r.rgb,t.rgb,o);return new ui(f,y,x,b,!1)}case"hcl":{const[f,y,x,b]=r.hcl,[E,C,L,D]=t.hcl;let B,V;if(isNaN(f)||isNaN(E))isNaN(f)?isNaN(E)?B=NaN:(B=E,x!==1&&x!==0||(V=C)):(B=f,L!==1&&L!==0||(V=y));else{let we=E-f;E>f&&we>180?we-=360:E180&&(we+=360),B=f+o*we}const[$,G,Q,oe]=function([we,he,xe,ze]){return we=isNaN(we)?0:we*Jt,Gt([xe,Math.cos(we)*he,Math.sin(we)*he,ze])}([B,V??Uo(y,C,o),Uo(x,L,o),Uo(b,D,o)]);return new ui($,G,Q,oe,!1)}case"lab":{const[f,y,x,b]=Gt(ol(r.lab,t.lab,o));return new ui(f,y,x,b,!1)}}},array:ol,padding:function(r,t,o){return new Wr(ol(r.values,t.values,o))},variableAnchorOffsetCollection:function(r,t,o){const l=r.values,f=t.values;if(l.length!==f.length)throw new qi(`Cannot interpolate values of different length. from: ${r.toString()}, to: ${t.toString()}`);const y=[];for(let x=0;xtypeof L!="number"||L<0||L>1))return o.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);f={name:"cubic-bezier",controlPoints:C}}}if(t.length-1<4)return o.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return o.error("Expected an even number of arguments.");if(y=o.parse(y,2,Ye),!y)return null;const b=[];let E=null;l==="interpolate-hcl"||l==="interpolate-lab"?E=di:o.expectedType&&o.expectedType.kind!=="value"&&(E=o.expectedType);for(let C=0;C=L)return o.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',B);const $=o.parse(D,V,E);if(!$)return null;E=E||$.type,b.push([L,$])}return ue(E,Ye)||ue(E,di)||ue(E,hr)||ue(E,F)||ue(E,N(Ye))?new un(E,l,f,y,b):o.error(`Type ${U(E)} is not interpolatable.`)}evaluate(t){const o=this.labels,l=this.outputs;if(o.length===1)return l[0].evaluate(t);const f=this.input.evaluate(t);if(f<=o[0])return l[0].evaluate(t);const y=o.length;if(f>=o[y-1])return l[y-1].evaluate(t);const x=nl(o,f),b=un.interpolationFactor(this.interpolation,f,o[x],o[x+1]),E=l[x].evaluate(t),C=l[x+1].evaluate(t);switch(this.operator){case"interpolate":return Fr[this.type.kind](E,C,b);case"interpolate-hcl":return Fr.color(E,C,b,"hcl");case"interpolate-lab":return Fr.color(E,C,b,"lab")}}eachChild(t){t(this.input);for(const o of this.outputs)t(o)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Ac(r,t,o,l){const f=l-o,y=r-o;return f===0?0:t===1?y/f:(Math.pow(t,y)-1)/(Math.pow(t,f)-1)}class sl{constructor(t,o){this.type=t,this.args=o}static parse(t,o){if(t.length<2)return o.error("Expectected at least one argument.");let l=null;const f=o.expectedType;f&&f.kind!=="value"&&(l=f);const y=[];for(const b of t.slice(1)){const E=o.parse(b,1+y.length,l,void 0,{typeAnnotation:"omit"});if(!E)return null;l=l||E.type,y.push(E)}if(!l)throw new Error("No output type");const x=f&&y.some(b=>de(f,b.type));return new sl(x?Bt:l,y)}evaluate(t){let o,l=null,f=0;for(const y of this.args)if(f++,l=y.evaluate(t),l&&l instanceof _n&&!l.available&&(o||(o=l.name),l=null,f===this.args.length&&(l=o)),l!==null)break;return l}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}function Mc(r,t){return r==="=="||r==="!="?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 kc(r,t,o,l){return l.compare(t,o)===0}function _s(r,t,o){const l=r!=="=="&&r!=="!=";return class hw{constructor(y,x,b){this.type=zt,this.lhs=y,this.rhs=x,this.collator=b,this.hasUntypedArgument=y.type.kind==="value"||x.type.kind==="value"}static parse(y,x){if(y.length!==3&&y.length!==4)return x.error("Expected two or three arguments.");const b=y[0];let E=x.parse(y[1],1,Bt);if(!E)return null;if(!Mc(b,E.type))return x.concat(1).error(`"${b}" comparisons are not supported for type '${U(E.type)}'.`);let C=x.parse(y[2],2,Bt);if(!C)return null;if(!Mc(b,C.type))return x.concat(2).error(`"${b}" comparisons are not supported for type '${U(C.type)}'.`);if(E.type.kind!==C.type.kind&&E.type.kind!=="value"&&C.type.kind!=="value")return x.error(`Cannot compare types '${U(E.type)}' and '${U(C.type)}'.`);l&&(E.type.kind==="value"&&C.type.kind!=="value"?E=new Sn(C.type,[E]):E.type.kind!=="value"&&C.type.kind==="value"&&(C=new Sn(E.type,[C])));let L=null;if(y.length===4){if(E.type.kind!=="string"&&C.type.kind!=="string"&&E.type.kind!=="value"&&C.type.kind!=="value")return x.error("Cannot use collator to compare non-string types.");if(L=x.parse(y[3],3,eo),!L)return null}return new hw(E,C,L)}evaluate(y){const x=this.lhs.evaluate(y),b=this.rhs.evaluate(y);if(l&&this.hasUntypedArgument){const E=Qi(x),C=Qi(b);if(E.kind!==C.kind||E.kind!=="string"&&E.kind!=="number")throw new qi(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${E.kind}, ${C.kind}) instead.`)}if(this.collator&&!l&&this.hasUntypedArgument){const E=Qi(x),C=Qi(b);if(E.kind!=="string"||C.kind!=="string")return t(y,x,b)}return this.collator?o(y,x,b,this.collator.evaluate(y)):t(y,x,b)}eachChild(y){y(this.lhs),y(this.rhs),this.collator&&y(this.collator)}outputDefined(){return!0}}}const Hf=_s("==",function(r,t,o){return t===o},kc),_h=_s("!=",function(r,t,o){return t!==o},function(r,t,o,l){return!kc(0,t,o,l)}),vh=_s("<",function(r,t,o){return t",function(r,t,o){return t>o},function(r,t,o,l){return l.compare(t,o)>0}),Zf=_s("<=",function(r,t,o){return t<=o},function(r,t,o,l){return l.compare(t,o)<=0}),Wf=_s(">=",function(r,t,o){return t>=o},function(r,t,o,l){return l.compare(t,o)>=0});class al{constructor(t,o,l){this.type=eo,this.locale=l,this.caseSensitive=t,this.diacriticSensitive=o}static parse(t,o){if(t.length!==2)return o.error("Expected one argument.");const l=t[1];if(typeof l!="object"||Array.isArray(l))return o.error("Collator options argument must be an object.");const f=o.parse(l["case-sensitive"]!==void 0&&l["case-sensitive"],1,zt);if(!f)return null;const y=o.parse(l["diacritic-sensitive"]!==void 0&&l["diacritic-sensitive"],1,zt);if(!y)return null;let x=null;return l.locale&&(x=o.parse(l.locale,1,Ot),!x)?null:new al(f,y,x)}evaluate(t){return new wc(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 Lc{constructor(t,o,l,f,y){this.type=Ot,this.number=t,this.locale=o,this.currency=l,this.minFractionDigits=f,this.maxFractionDigits=y}static parse(t,o){if(t.length!==3)return o.error("Expected two arguments.");const l=o.parse(t[1],1,Ye);if(!l)return null;const f=t[2];if(typeof f!="object"||Array.isArray(f))return o.error("NumberFormat options argument must be an object.");let y=null;if(f.locale&&(y=o.parse(f.locale,1,Ot),!y))return null;let x=null;if(f.currency&&(x=o.parse(f.currency,1,Ot),!x))return null;let b=null;if(f["min-fraction-digits"]&&(b=o.parse(f["min-fraction-digits"],1,Ye),!b))return null;let E=null;return f["max-fraction-digits"]&&(E=o.parse(f["max-fraction-digits"],1,Ye),!E)?null:new Lc(l,y,x,b,E)}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 ll{constructor(t){this.type=to,this.sections=t}static parse(t,o){if(t.length<2)return o.error("Expected at least one argument.");const l=t[1];if(!Array.isArray(l)&&typeof l=="object")return o.error("First argument must be an image or text section.");const f=[];let y=!1;for(let x=1;x<=t.length-1;++x){const b=t[x];if(y&&typeof b=="object"&&!Array.isArray(b)){y=!1;let E=null;if(b["font-scale"]&&(E=o.parse(b["font-scale"],1,Ye),!E))return null;let C=null;if(b["text-font"]&&(C=o.parse(b["text-font"],1,N(Ot)),!C))return null;let L=null;if(b["text-color"]&&(L=o.parse(b["text-color"],1,di),!L))return null;const D=f[f.length-1];D.scale=E,D.font=C,D.textColor=L}else{const E=o.parse(t[x],1,Bt);if(!E)return null;const C=E.type.kind;if(C!=="string"&&C!=="value"&&C!=="null"&&C!=="resolvedImage")return o.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");y=!0,f.push({content:E,scale:null,font:null,textColor:null})}}return new ll(f)}evaluate(t){return new cn(this.sections.map(o=>{const l=o.content.evaluate(t);return Qi(l)===te?new Ec("",l,null,null,null):new Ec(aa(l),null,o.scale?o.scale.evaluate(t):null,o.font?o.font.evaluate(t).join(","):null,o.textColor?o.textColor.evaluate(t):null)}))}eachChild(t){for(const o of this.sections)t(o.content),o.scale&&t(o.scale),o.font&&t(o.font),o.textColor&&t(o.textColor)}outputDefined(){return!1}}class Pc{constructor(t){this.type=te,this.input=t}static parse(t,o){if(t.length!==2)return o.error("Expected two arguments.");const l=o.parse(t[1],1,Ot);return l?new Pc(l):o.error("No image name provided.")}evaluate(t){const o=this.input.evaluate(t),l=_n.fromString(o);return l&&t.availableImages&&(l.available=t.availableImages.indexOf(o)>-1),l}eachChild(t){t(this.input)}outputDefined(){return!1}}class ha{constructor(t){this.type=Ye,this.input=t}static parse(t,o){if(t.length!==2)return o.error(`Expected 1 argument, but found ${t.length-1} instead.`);const l=o.parse(t[1],1);return l?l.type.kind!=="array"&&l.type.kind!=="string"&&l.type.kind!=="value"?o.error(`Expected argument of type string or array, but found ${U(l.type)} instead.`):new ha(l):null}evaluate(t){const o=this.input.evaluate(t);if(typeof o=="string"||Array.isArray(o))return o.length;throw new qi(`Expected value to be of type string or array, but found ${U(Qi(o))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const hn=8192;function li(r,t){const o=(180+r[0])/360,l=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r[1]*Math.PI/360)))/360,f=Math.pow(2,t.z);return[Math.round(o*f*hn),Math.round(l*f*hn)]}function zc(r,t){const o=Math.pow(2,t.z);return[(f=(r[0]/hn+t.x)/o,360*f-180),(l=(r[1]/hn+t.y)/o,360/Math.PI*Math.atan(Math.exp((180-360*l)*Math.PI/180))-90)];var l,f}function da(r,t){r[0]=Math.min(r[0],t[0]),r[1]=Math.min(r[1],t[1]),r[2]=Math.max(r[2],t[0]),r[3]=Math.max(r[3],t[1])}function fa(r,t){return!(r[0]<=t[0]||r[2]>=t[2]||r[1]<=t[1]||r[3]>=t[3])}function Xf(r,t,o){const l=r[0]-t[0],f=r[1]-t[1],y=r[0]-o[0],x=r[1]-o[1];return l*x-y*f==0&&l*y<=0&&f*x<=0}function cl(r,t,o,l){return(f=[l[0]-o[0],l[1]-o[1]])[0]*(y=[t[0]-r[0],t[1]-r[1]])[1]-f[1]*y[0]!=0&&!(!bh(r,t,o,l)||!bh(o,l,r,t));var f,y}function Kf(r,t,o){for(const l of o)for(let f=0;f(f=r)[1]!=(x=b[E+1])[1]>f[1]&&f[0]<(x[0]-y[0])*(f[1]-y[1])/(x[1]-y[1])+y[0]&&(l=!l)}var f,y,x;return l}function Jf(r,t){for(const o of t)if(vs(r,o))return!0;return!1}function xh(r,t){for(const o of r)if(!vs(o,t))return!1;for(let o=0;o0&&b<0||x<0&&b>0}function Dc(r,t,o){const l=[];for(let f=0;fo[2]){const f=.5*l;let y=r[0]-o[0]>f?-l:o[0]-r[0]>f?l:0;y===0&&(y=r[0]-o[2]>f?-l:o[2]-r[0]>f?l:0),r[0]+=y}da(t,r)}function Sh(r,t,o,l){const f=Math.pow(2,l.z)*hn,y=[l.x*hn,l.y*hn],x=[];for(const b of r)for(const E of b){const C=[E.x+y[0],E.y+y[1]];Eh(C,t,o,f),x.push(C)}return x}function Ih(r,t,o,l){const f=Math.pow(2,l.z)*hn,y=[l.x*hn,l.y*hn],x=[];for(const E of r){const C=[];for(const L of E){const D=[L.x+y[0],L.y+y[1]];da(t,D),C.push(D)}x.push(C)}if(t[2]-t[0]<=f/2){(b=t)[0]=b[1]=1/0,b[2]=b[3]=-1/0;for(const E of x)for(const C of E)Eh(C,t,o,f)}var b;return x}class qo{constructor(t,o){this.type=zt,this.geojson=t,this.geometries=o}static parse(t,o){if(t.length!==2)return o.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(io(t[1])){const l=t[1];if(l.type==="FeatureCollection"){const f=[];for(const y of l.features){const{type:x,coordinates:b}=y.geometry;x==="Polygon"&&f.push(b),x==="MultiPolygon"&&f.push(...b)}if(f.length)return new qo(l,{type:"MultiPolygon",coordinates:f})}else if(l.type==="Feature"){const f=l.geometry.type;if(f==="Polygon"||f==="MultiPolygon")return new qo(l,l.geometry)}else if(l.type==="Polygon"||l.type==="MultiPolygon")return new qo(l,l)}return o.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(o,l){const f=[1/0,1/0,-1/0,-1/0],y=[1/0,1/0,-1/0,-1/0],x=o.canonicalID();if(l.type==="Polygon"){const b=Dc(l.coordinates,y,x),E=Sh(o.geometry(),f,y,x);if(!fa(f,y))return!1;for(const C of E)if(!vs(C,b))return!1}if(l.type==="MultiPolygon"){const b=wh(l.coordinates,y,x),E=Sh(o.geometry(),f,y,x);if(!fa(f,y))return!1;for(const C of E)if(!Jf(C,b))return!1}return!0}(t,this.geometries);if(t.geometryType()==="LineString")return function(o,l){const f=[1/0,1/0,-1/0,-1/0],y=[1/0,1/0,-1/0,-1/0],x=o.canonicalID();if(l.type==="Polygon"){const b=Dc(l.coordinates,y,x),E=Ih(o.geometry(),f,y,x);if(!fa(f,y))return!1;for(const C of E)if(!xh(C,b))return!1}if(l.type==="MultiPolygon"){const b=wh(l.coordinates,y,x),E=Ih(o.geometry(),f,y,x);if(!fa(f,y))return!1;for(const C of E)if(!Yf(C,b))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Th=class{constructor(r=[],t=Qf){if(this.data=r,this.length=this.data.length,this.compare=t,this.length>0)for(let o=(this.length>>1)-1;o>=0;o--)this._down(o)}push(r){this.data.push(r),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const r=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),r}peek(){return this.data[0]}_up(r){const{data:t,compare:o}=this,l=t[r];for(;r>0;){const f=r-1>>1,y=t[f];if(o(l,y)>=0)break;t[r]=y,r=f}t[r]=l}_down(r){const{data:t,compare:o}=this,l=this.length>>1,f=t[r];for(;r=0)break;t[r]=x,r=y}t[r]=f}};function Qf(r,t){return rt?1:0}function ep(r,t,o,l,f){Ch(r,t,o,l||r.length-1,f||tp)}function Ch(r,t,o,l,f){for(;l>o;){if(l-o>600){var y=l-o+1,x=t-o+1,b=Math.log(y),E=.5*Math.exp(2*b/3),C=.5*Math.sqrt(b*E*(y-E)/y)*(x-y/2<0?-1:1);Ch(r,t,Math.max(o,Math.floor(t-x*E/y+C)),Math.min(l,Math.floor(t+(y-x)*E/y+C)),f)}var L=r[t],D=o,B=l;for(pa(r,o,t),f(r[l],L)>0&&pa(r,o,l);D0;)B--}f(r[o],L)===0?pa(r,o,B):pa(r,++B,l),B<=t&&(o=B+1),t<=B&&(l=B-1)}}function pa(r,t,o){var l=r[t];r[t]=r[o],r[o]=l}function tp(r,t){return rt?1:0}function ul(r,t){if(r.length<=1)return[r];const o=[];let l,f;for(const y of r){const x=rp(y);x!==0&&(y.area=Math.abs(x),f===void 0&&(f=x<0),f===x<0?(l&&o.push(l),l=[y]):l.push(y))}if(l&&o.push(l),t>1)for(let y=0;y1?(C=t[E+1][0],L=t[E+1][1]):V>0&&(C+=D/this.kx*V,L+=B/this.ky*V)),D=this.wrap(o[0]-C)*this.kx,B=(o[1]-L)*this.ky;const $=D*D+B*B;$180;)t-=360;return t}}function Lh(r,t){return t[0]-r[0]}function xs(r){return r[1]-r[0]+1}function ro(r,t){return r[1]>=r[0]&&r[1]r[1])return[null,null];const o=xs(r);if(t){if(o===2)return[r,null];const f=Math.floor(o/2);return[[r[0],r[0]+f],[r[0]+f,r[1]]]}if(o===1)return[r,null];const l=Math.floor(o/2)-1;return[[r[0],r[0]+l],[r[0]+l+1,r[1]]]}function Bc(r,t){if(!ro(t,r.length))return[1/0,1/0,-1/0,-1/0];const o=[1/0,1/0,-1/0,-1/0];for(let l=t[0];l<=t[1];++l)da(o,r[l]);return o}function Fc(r){const t=[1/0,1/0,-1/0,-1/0];for(const o of r)for(const l of o)da(t,l);return t}function Hi(r){return r[0]!==-1/0&&r[1]!==-1/0&&r[2]!==1/0&&r[3]!==1/0}function Vc(r,t,o){if(!Hi(r)||!Hi(t))return NaN;let l=0,f=0;return r[2]t[2]&&(l=r[0]-t[2]),r[1]>t[3]&&(f=r[1]-t[3]),r[3]=l)return l;if(fa(f,y)){if(Nc(r,t))return 0}else if(Nc(t,r))return 0;let x=1/0;for(const b of r)for(let E=0,C=b.length,L=C-1;E0;){const E=x.pop();if(E[0]>=y)continue;const C=E[1],L=t?50:100;if(xs(C)<=L){if(!ro(C,r.length))return NaN;if(t){const D=Ph(r,C,o,l);if(isNaN(D)||D===0)return D;y=Math.min(y,D)}else for(let D=C[0];D<=C[1];++D){const B=hl(r[D],o,l);if(y=Math.min(y,B),y===0)return 0}}else{const D=Oc(C,t);zh(x,y,l,r,b,D[0]),zh(x,y,l,r,b,D[1])}}return y}function ga(r,t,o,l,f,y=1/0){let x=Math.min(y,f.distance(r[0],o[0]));if(x===0)return x;const b=new Th([[0,[0,r.length-1],[0,o.length-1]]],Lh);for(;b.length>0;){const E=b.pop();if(E[0]>=x)continue;const C=E[1],L=E[2],D=t?50:100,B=l?50:100;if(xs(C)<=D&&xs(L)<=B){if(!ro(C,r.length)&&ro(L,o.length))return NaN;let V;if(t&&l)V=Oi(r,C,o,L,f),x=Math.min(x,V);else if(t&&!l){const $=r.slice(C[0],C[1]+1);for(let G=L[0];G<=L[1];++G)if(V=Xt(o[G],$,f),x=Math.min(x,V),x===0)return x}else if(!t&&l){const $=o.slice(L[0],L[1]+1);for(let G=C[0];G<=C[1];++G)if(V=Xt(r[G],$,f),x=Math.min(x,V),x===0)return x}else V=Pi(r,C,o,L,f),x=Math.min(x,V)}else{const V=Oc(C,t),$=Oc(L,l);dl(b,x,f,r,o,V[0],$[0]),dl(b,x,f,r,o,V[0],$[1]),dl(b,x,f,r,o,V[1],$[0]),dl(b,x,f,r,o,V[1],$[1])}}return x}function pl(r){return r.type==="MultiPolygon"?r.coordinates.map(t=>({type:"Polygon",coordinates:t})):r.type==="MultiLineString"?r.coordinates.map(t=>({type:"LineString",coordinates:t})):r.type==="MultiPoint"?r.coordinates.map(t=>({type:"Point",coordinates:t})):[r]}class _o{constructor(t,o){this.type=Ye,this.geojson=t,this.geometries=o}static parse(t,o){if(t.length!==2)return o.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(io(t[1])){const l=t[1];if(l.type==="FeatureCollection")return new _o(l,l.features.map(f=>pl(f.geometry)).flat());if(l.type==="Feature")return new _o(l,pl(l.geometry));if("type"in l&&"coordinates"in l)return new _o(l,pl(l))}return o.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(o,l){const f=o.geometry(),y=f.flat().map(E=>zc([E.x,E.y],o.canonical));if(f.length===0)return NaN;const x=new Rc(y[0][1]);let b=1/0;for(const E of l){switch(E.type){case"Point":b=Math.min(b,ga(y,!1,[E.coordinates],!1,x,b));break;case"LineString":b=Math.min(b,ga(y,!1,E.coordinates,!0,x,b));break;case"Polygon":b=Math.min(b,fl(y,!1,E.coordinates,x,b))}if(b===0)return b}return b}(t,this.geometries);if(t.geometryType()==="LineString")return function(o,l){const f=o.geometry(),y=f.flat().map(E=>zc([E.x,E.y],o.canonical));if(f.length===0)return NaN;const x=new Rc(y[0][1]);let b=1/0;for(const E of l){switch(E.type){case"Point":b=Math.min(b,ga(y,!0,[E.coordinates],!1,x,b));break;case"LineString":b=Math.min(b,ga(y,!0,E.coordinates,!0,x,b));break;case"Polygon":b=Math.min(b,fl(y,!0,E.coordinates,x,b))}if(b===0)return b}return b}(t,this.geometries);if(t.geometryType()==="Polygon")return function(o,l){const f=o.geometry();if(f.length===0||f[0].length===0)return NaN;const y=ul(f,0).map(E=>E.map(C=>C.map(L=>zc([L.x,L.y],o.canonical)))),x=new Rc(y[0][0][0][1]);let b=1/0;for(const E of l)for(const C of y){switch(E.type){case"Point":b=Math.min(b,fl([E.coordinates],!1,C,x,b));break;case"LineString":b=Math.min(b,fl(E.coordinates,!0,C,x,b));break;case"Polygon":b=Math.min(b,np(C,E.coordinates,x,b))}if(b===0)return b}return b}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const Ho={"==":Hf,"!=":_h,">":Gf,"<":vh,">=":Wf,"<=":Zf,array:Sn,at:Ic,boolean:Sn,case:rl,coalesce:sl,collator:al,format:ll,image:Pc,in:il,"index-of":la,interpolate:un,"interpolate-hcl":un,"interpolate-lab":un,length:ha,let:tl,literal:jo,match:Tc,number:Sn,"number-format":Lc,object:Sn,slice:ca,step:ua,string:Sn,"to-boolean":Nn,"to-color":Nn,"to-number":Nn,"to-string":Nn,var:ys,within:qo,distance:_o};class Kr{constructor(t,o,l,f){this.name=t,this.type=o,this._evaluate=l,this.args=f}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,o){const l=t[0],f=Kr.definitions[l];if(!f)return o.error(`Unknown expression "${l}". If you wanted a literal array, use ["literal", [...]].`,0);const y=Array.isArray(f)?f[0]:f.type,x=Array.isArray(f)?[[f[1],f[2]]]:f.overloads,b=x.filter(([C])=>!Array.isArray(C)||C.length===t.length-1);let E=null;for(const[C,L]of b){E=new ai(o.registry,ml,o.path,null,o.scope);const D=[];let B=!1;for(let V=1;V{return B=D,Array.isArray(B)?`(${B.map(U).join(", ")})`:`(${U(B.type)}...)`;var B}).join(" | "),L=[];for(let D=1;D{o=t?o&&ml(l):o&&l instanceof jo}),!!o&&gl(r)&&yl(r,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function gl(r){if(r instanceof Kr&&(r.name==="get"&&r.args.length===1||r.name==="feature-state"||r.name==="has"&&r.args.length===1||r.name==="properties"||r.name==="geometry-type"||r.name==="id"||/^filter-/.test(r.name))||r instanceof qo||r instanceof _o)return!1;let t=!0;return r.eachChild(o=>{t&&!gl(o)&&(t=!1)}),t}function ya(r){if(r instanceof Kr&&r.name==="feature-state")return!1;let t=!0;return r.eachChild(o=>{t&&!ya(o)&&(t=!1)}),t}function yl(r,t){if(r instanceof Kr&&t.indexOf(r.name)>=0)return!1;let o=!0;return r.eachChild(l=>{o&&!yl(l,t)&&(o=!1)}),o}function $c(r){return{result:"success",value:r}}function Zo(r){return{result:"error",value:r}}function no(r){return r["property-type"]==="data-driven"||r["property-type"]==="cross-faded-data-driven"}function Oh(r){return!!r.expression&&r.expression.parameters.indexOf("zoom")>-1}function _l(r){return!!r.expression&&r.expression.interpolated}function ni(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":r===null?"null":typeof r}function bs(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function vl(r){return r}function _a(r,t){const o=t.type==="color",l=r.stops&&typeof r.stops[0][0]=="object",f=l||!(l||r.property!==void 0),y=r.type||(_l(t)?"exponential":"interval");if(o||t.type==="padding"){const L=o?ui.parse:Wr.parse;(r=Ht({},r)).stops&&(r.stops=r.stops.map(D=>[D[0],L(D[1])])),r.default=L(r.default?r.default:t.default)}if(r.colorSpace&&(x=r.colorSpace)!=="rgb"&&x!=="hcl"&&x!=="lab")throw new Error(`Unknown color space: "${r.colorSpace}"`);var x;let b,E,C;if(y==="exponential")b=qc;else if(y==="interval")b=Bh;else if(y==="categorical"){b=Uc,E=Object.create(null);for(const L of r.stops)E[L[0]]=L[1];C=typeof r.stops[0][0]}else{if(y!=="identity")throw new Error(`Unknown function type "${y}"`);b=xl}if(l){const L={},D=[];for(let $=0;$$[0]),evaluate:({zoom:$},G)=>qc({stops:B,base:r.base},t,$).evaluate($,G)}}if(f){const L=y==="exponential"?{name:"exponential",base:r.base!==void 0?r.base:1}:null;return{kind:"camera",interpolationType:L,interpolationFactor:un.interpolationFactor.bind(void 0,L),zoomStops:r.stops.map(D=>D[0]),evaluate:({zoom:D})=>b(r,t,D,E,C)}}return{kind:"source",evaluate(L,D){const B=D&&D.properties?D.properties[r.property]:void 0;return B===void 0?ws(r.default,t.default):b(r,t,B,E,C)}}}function ws(r,t,o){return r!==void 0?r:t!==void 0?t:o!==void 0?o:void 0}function Uc(r,t,o,l,f){return ws(typeof o===f?l[o]:void 0,r.default,t.default)}function Bh(r,t,o){if(ni(o)!=="number")return ws(r.default,t.default);const l=r.stops.length;if(l===1||o<=r.stops[0][0])return r.stops[0][1];if(o>=r.stops[l-1][0])return r.stops[l-1][1];const f=nl(r.stops.map(y=>y[0]),o);return r.stops[f][1]}function qc(r,t,o){const l=r.base!==void 0?r.base:1;if(ni(o)!=="number")return ws(r.default,t.default);const f=r.stops.length;if(f===1||o<=r.stops[0][0])return r.stops[0][1];if(o>=r.stops[f-1][0])return r.stops[f-1][1];const y=nl(r.stops.map(L=>L[0]),o),x=function(L,D,B,V){const $=V-B,G=L-B;return $===0?0:D===1?G/$:(Math.pow(D,G)-1)/(Math.pow(D,$)-1)}(o,l,r.stops[y][0],r.stops[y+1][0]),b=r.stops[y][1],E=r.stops[y+1][1],C=Fr[t.type]||vl;return typeof b.evaluate=="function"?{evaluate(...L){const D=b.evaluate.apply(void 0,L),B=E.evaluate.apply(void 0,L);if(D!==void 0&&B!==void 0)return C(D,B,x,r.colorSpace)}}:C(b,E,x,r.colorSpace)}function xl(r,t,o){switch(t.type){case"color":o=ui.parse(o);break;case"formatted":o=cn.fromString(o.toString());break;case"resolvedImage":o=_n.fromString(o.toString());break;case"padding":o=Wr.parse(o);break;default:ni(o)===t.type||t.type==="enum"&&t.values[o]||(o=void 0)}return ws(o,r.default,t.default)}Kr.register(Ho,{error:[{kind:"error"},[Ot],(r,[t])=>{throw new qi(t.evaluate(r))}],typeof:[Ot,[Bt],(r,[t])=>U(Qi(t.evaluate(r)))],"to-rgba":[N(Ye,4),[di],(r,[t])=>{const[o,l,f,y]=t.evaluate(r).rgb;return[255*o,255*l,255*f,y]}],rgb:[di,[Ye,Ye,Ye],Dh],rgba:[di,[Ye,Ye,Ye,Ye],Dh],has:{type:zt,overloads:[[[Ot],(r,[t])=>Rh(t.evaluate(r),r.properties())],[[Ot,Ei],(r,[t,o])=>Rh(t.evaluate(r),o.evaluate(r))]]},get:{type:Bt,overloads:[[[Ot],(r,[t])=>jc(t.evaluate(r),r.properties())],[[Ot,Ei],(r,[t,o])=>jc(t.evaluate(r),o.evaluate(r))]]},"feature-state":[Bt,[Ot],(r,[t])=>jc(t.evaluate(r),r.featureState||{})],properties:[Ei,[],r=>r.properties()],"geometry-type":[Ot,[],r=>r.geometryType()],id:[Bt,[],r=>r.id()],zoom:[Ye,[],r=>r.globals.zoom],"heatmap-density":[Ye,[],r=>r.globals.heatmapDensity||0],"line-progress":[Ye,[],r=>r.globals.lineProgress||0],accumulated:[Bt,[],r=>r.globals.accumulated===void 0?null:r.globals.accumulated],"+":[Ye,Go(Ye),(r,t)=>{let o=0;for(const l of t)o+=l.evaluate(r);return o}],"*":[Ye,Go(Ye),(r,t)=>{let o=1;for(const l of t)o*=l.evaluate(r);return o}],"-":{type:Ye,overloads:[[[Ye,Ye],(r,[t,o])=>t.evaluate(r)-o.evaluate(r)],[[Ye],(r,[t])=>-t.evaluate(r)]]},"/":[Ye,[Ye,Ye],(r,[t,o])=>t.evaluate(r)/o.evaluate(r)],"%":[Ye,[Ye,Ye],(r,[t,o])=>t.evaluate(r)%o.evaluate(r)],ln2:[Ye,[],()=>Math.LN2],pi:[Ye,[],()=>Math.PI],e:[Ye,[],()=>Math.E],"^":[Ye,[Ye,Ye],(r,[t,o])=>Math.pow(t.evaluate(r),o.evaluate(r))],sqrt:[Ye,[Ye],(r,[t])=>Math.sqrt(t.evaluate(r))],log10:[Ye,[Ye],(r,[t])=>Math.log(t.evaluate(r))/Math.LN10],ln:[Ye,[Ye],(r,[t])=>Math.log(t.evaluate(r))],log2:[Ye,[Ye],(r,[t])=>Math.log(t.evaluate(r))/Math.LN2],sin:[Ye,[Ye],(r,[t])=>Math.sin(t.evaluate(r))],cos:[Ye,[Ye],(r,[t])=>Math.cos(t.evaluate(r))],tan:[Ye,[Ye],(r,[t])=>Math.tan(t.evaluate(r))],asin:[Ye,[Ye],(r,[t])=>Math.asin(t.evaluate(r))],acos:[Ye,[Ye],(r,[t])=>Math.acos(t.evaluate(r))],atan:[Ye,[Ye],(r,[t])=>Math.atan(t.evaluate(r))],min:[Ye,Go(Ye),(r,t)=>Math.min(...t.map(o=>o.evaluate(r)))],max:[Ye,Go(Ye),(r,t)=>Math.max(...t.map(o=>o.evaluate(r)))],abs:[Ye,[Ye],(r,[t])=>Math.abs(t.evaluate(r))],round:[Ye,[Ye],(r,[t])=>{const o=t.evaluate(r);return o<0?-Math.round(-o):Math.round(o)}],floor:[Ye,[Ye],(r,[t])=>Math.floor(t.evaluate(r))],ceil:[Ye,[Ye],(r,[t])=>Math.ceil(t.evaluate(r))],"filter-==":[zt,[Ot,Bt],(r,[t,o])=>r.properties()[t.value]===o.value],"filter-id-==":[zt,[Bt],(r,[t])=>r.id()===t.value],"filter-type-==":[zt,[Ot],(r,[t])=>r.geometryType()===t.value],"filter-<":[zt,[Ot,Bt],(r,[t,o])=>{const l=r.properties()[t.value],f=o.value;return typeof l==typeof f&&l{const o=r.id(),l=t.value;return typeof o==typeof l&&o":[zt,[Ot,Bt],(r,[t,o])=>{const l=r.properties()[t.value],f=o.value;return typeof l==typeof f&&l>f}],"filter-id->":[zt,[Bt],(r,[t])=>{const o=r.id(),l=t.value;return typeof o==typeof l&&o>l}],"filter-<=":[zt,[Ot,Bt],(r,[t,o])=>{const l=r.properties()[t.value],f=o.value;return typeof l==typeof f&&l<=f}],"filter-id-<=":[zt,[Bt],(r,[t])=>{const o=r.id(),l=t.value;return typeof o==typeof l&&o<=l}],"filter->=":[zt,[Ot,Bt],(r,[t,o])=>{const l=r.properties()[t.value],f=o.value;return typeof l==typeof f&&l>=f}],"filter-id->=":[zt,[Bt],(r,[t])=>{const o=r.id(),l=t.value;return typeof o==typeof l&&o>=l}],"filter-has":[zt,[Bt],(r,[t])=>t.value in r.properties()],"filter-has-id":[zt,[],r=>r.id()!==null&&r.id()!==void 0],"filter-type-in":[zt,[N(Ot)],(r,[t])=>t.value.indexOf(r.geometryType())>=0],"filter-id-in":[zt,[N(Bt)],(r,[t])=>t.value.indexOf(r.id())>=0],"filter-in-small":[zt,[Ot,N(Bt)],(r,[t,o])=>o.value.indexOf(r.properties()[t.value])>=0],"filter-in-large":[zt,[Ot,N(Bt)],(r,[t,o])=>function(l,f,y,x){for(;y<=x;){const b=y+x>>1;if(f[b]===l)return!0;f[b]>l?x=b-1:y=b+1}return!1}(r.properties()[t.value],o.value,0,o.value.length-1)],all:{type:zt,overloads:[[[zt,zt],(r,[t,o])=>t.evaluate(r)&&o.evaluate(r)],[Go(zt),(r,t)=>{for(const o of t)if(!o.evaluate(r))return!1;return!0}]]},any:{type:zt,overloads:[[[zt,zt],(r,[t,o])=>t.evaluate(r)||o.evaluate(r)],[Go(zt),(r,t)=>{for(const o of t)if(o.evaluate(r))return!0;return!1}]]},"!":[zt,[zt],(r,[t])=>!t.evaluate(r)],"is-supported-script":[zt,[Ot],(r,[t])=>{const o=r.globals&&r.globals.isSupportedScript;return!o||o(t.evaluate(r))}],upcase:[Ot,[Ot],(r,[t])=>t.evaluate(r).toUpperCase()],downcase:[Ot,[Ot],(r,[t])=>t.evaluate(r).toLowerCase()],concat:[Ot,Go(Bt),(r,t)=>t.map(o=>aa(o.evaluate(r))).join("")],"resolved-locale":[Ot,[eo],(r,[t])=>t.evaluate(r).resolvedLocale()]});class Hc{constructor(t,o){var l;this.expression=t,this._warningHistory={},this._evaluator=new gs,this._defaultValue=o?(l=o).type==="color"&&bs(l.default)?new ui(0,0,0,0):l.type==="color"?ui.parse(l.default)||null:l.type==="padding"?Wr.parse(l.default)||null:l.type==="variableAnchorOffsetCollection"?Xr.parse(l.default)||null:l.default===void 0?null:l.default:null,this._enumValues=o&&o.type==="enum"?o.values:null}evaluateWithoutErrorHandling(t,o,l,f,y,x){return this._evaluator.globals=t,this._evaluator.feature=o,this._evaluator.featureState=l,this._evaluator.canonical=f,this._evaluator.availableImages=y||null,this._evaluator.formattedSection=x,this.expression.evaluate(this._evaluator)}evaluate(t,o,l,f,y,x){this._evaluator.globals=t,this._evaluator.feature=o||null,this._evaluator.featureState=l||null,this._evaluator.canonical=f,this._evaluator.availableImages=y||null,this._evaluator.formattedSection=x||null;try{const b=this.expression.evaluate(this._evaluator);if(b==null||typeof b=="number"&&b!=b)return this._defaultValue;if(this._enumValues&&!(b in this._enumValues))throw new qi(`Expected value to be one of ${Object.keys(this._enumValues).map(E=>JSON.stringify(E)).join(", ")}, but found ${JSON.stringify(b)} instead.`);return b}catch(b){return this._warningHistory[b.message]||(this._warningHistory[b.message]=!0,typeof console<"u"&&console.warn(b.message)),this._defaultValue}}}function bl(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in Ho}function wl(r,t){const o=new ai(Ho,ml,[],t?function(f){const y={color:di,string:Ot,number:Ye,enum:Ot,boolean:zt,formatted:to,padding:hr,resolvedImage:te,variableAnchorOffsetCollection:F};return f.type==="array"?N(y[f.value]||Bt,f.length):y[f.type]}(t):void 0),l=o.parse(r,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return l?$c(new Hc(l,t)):Zo(o.errors)}class Gc{constructor(t,o){this.kind=t,this._styleExpression=o,this.isStateDependent=t!=="constant"&&!ya(o.expression)}evaluateWithoutErrorHandling(t,o,l,f,y,x){return this._styleExpression.evaluateWithoutErrorHandling(t,o,l,f,y,x)}evaluate(t,o,l,f,y,x){return this._styleExpression.evaluate(t,o,l,f,y,x)}}class Zc{constructor(t,o,l,f){this.kind=t,this.zoomStops=l,this._styleExpression=o,this.isStateDependent=t!=="camera"&&!ya(o.expression),this.interpolationType=f}evaluateWithoutErrorHandling(t,o,l,f,y,x){return this._styleExpression.evaluateWithoutErrorHandling(t,o,l,f,y,x)}evaluate(t,o,l,f,y,x){return this._styleExpression.evaluate(t,o,l,f,y,x)}interpolationFactor(t,o,l){return this.interpolationType?un.interpolationFactor(this.interpolationType,t,o,l):0}}function va(r,t){const o=wl(r,t);if(o.result==="error")return o;const l=o.value.expression,f=gl(l);if(!f&&!no(t))return Zo([new si("","data expressions not supported")]);const y=yl(l,["zoom"]);if(!y&&!Oh(t))return Zo([new si("","zoom expressions not supported")]);const x=Sr(l);return x||y?x instanceof si?Zo([x]):x instanceof un&&!_l(t)?Zo([new si("",'"interpolate" expressions cannot be used with this property')]):$c(x?new Zc(f?"camera":"composite",o.value,x.labels,x instanceof un?x.interpolation:void 0):new Gc(f?"constant":"source",o.value)):Zo([new si("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Wo{constructor(t,o){this._parameters=t,this._specification=o,Ht(this,_a(this._parameters,this._specification))}static deserialize(t){return new Wo(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Sr(r){let t=null;if(r instanceof tl)t=Sr(r.result);else if(r instanceof sl){for(const o of r.args)if(t=Sr(o),t)break}else(r instanceof ua||r instanceof un)&&r.input instanceof Kr&&r.input.name==="zoom"&&(t=r);return t instanceof si||r.eachChild(o=>{const l=Sr(o);l instanceof si?t=l:!t&&l?t=new si("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&l&&t!==l&&(t=new si("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Xo(r){if(r===!0||r===!1)return!0;if(!Array.isArray(r)||r.length===0)return!1;switch(r[0]){case"has":return r.length>=2&&r[1]!=="$id"&&r[1]!=="$type";case"in":return r.length>=3&&(typeof r[1]!="string"||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return r.length!==3||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(const t of r.slice(1))if(!Xo(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const Fh={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Wc(r){if(r==null)return{filter:()=>!0,needGeometry:!1};Xo(r)||(r=xa(r));const t=wl(r,Fh);if(t.result==="error")throw new Error(t.value.map(o=>`${o.key}: ${o.message}`).join(", "));return{filter:(o,l,f)=>t.value.evaluate(o,l,{},f),needGeometry:Es(r)}}function op(r,t){return rt?1:0}function Es(r){if(!Array.isArray(r))return!1;if(r[0]==="within"||r[0]==="distance")return!0;for(let t=1;t"||t==="<="||t===">="?ba(r[1],r[2],t):t==="any"?(o=r.slice(1),["any"].concat(o.map(xa))):t==="all"?["all"].concat(r.slice(1).map(xa)):t==="none"?["all"].concat(r.slice(1).map(xa).map(Sl)):t==="in"?Vh(r[1],r.slice(2)):t==="!in"?Sl(Vh(r[1],r.slice(2))):t==="has"?El(r[1]):t!=="!has"||Sl(El(r[1]));var o}function ba(r,t,o){switch(r){case"$type":return[`filter-type-${o}`,t];case"$id":return[`filter-id-${o}`,t];default:return[`filter-${o}`,r,t]}}function Vh(r,t){if(t.length===0)return!1;switch(r){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(o=>typeof o!=typeof t[0])?["filter-in-large",r,["literal",t.sort(op)]]:["filter-in-small",r,["literal",t]]}}function El(r){switch(r){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",r]}}function Sl(r){return["!",r]}function Ko(r){const t=typeof r;if(t==="number"||t==="boolean"||t==="string"||r==null)return JSON.stringify(r);if(Array.isArray(r)){let f="[";for(const y of r)f+=`${Ko(y)},`;return`${f}]`}const o=Object.keys(r).sort();let l="{";for(let f=0;fl.maximum?[new Ne(t,o,`${o} is greater than the maximum value ${l.maximum}`)]:[]}function Cl(r){const t=r.valueSpec,o=Vi(r.value.type);let l,f,y,x={};const b=o!=="categorical"&&r.value.property===void 0,E=!b,C=ni(r.value.stops)==="array"&&ni(r.value.stops[0])==="array"&&ni(r.value.stops[0][0])==="object",L=dn({key:r.key,value:r.value,valueSpec:r.styleSpec.function,validateSpec:r.validateSpec,style:r.style,styleSpec:r.styleSpec,objectElementValidators:{stops:function(V){if(o==="identity")return[new Ne(V.key,V.value,'identity function may not have a "stops" property')];let $=[];const G=V.value;return $=$.concat(Tl({key:V.key,value:G,valueSpec:V.valueSpec,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec,arrayElementValidator:D})),ni(G)==="array"&&G.length===0&&$.push(new Ne(V.key,G,"array must have at least one stop")),$},default:function(V){return V.validateSpec({key:V.key,value:V.value,valueSpec:t,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec})}}});return o==="identity"&&b&&L.push(new Ne(r.key,r.value,'missing required property "property"')),o==="identity"||r.value.stops||L.push(new Ne(r.key,r.value,'missing required property "stops"')),o==="exponential"&&r.valueSpec.expression&&!_l(r.valueSpec)&&L.push(new Ne(r.key,r.value,"exponential functions not supported")),r.styleSpec.$version>=8&&(E&&!no(r.valueSpec)?L.push(new Ne(r.key,r.value,"property functions not supported")):b&&!Oh(r.valueSpec)&&L.push(new Ne(r.key,r.value,"zoom functions not supported"))),o!=="categorical"&&!C||r.value.property!==void 0||L.push(new Ne(r.key,r.value,'"property" property is required')),L;function D(V){let $=[];const G=V.value,Q=V.key;if(ni(G)!=="array")return[new Ne(Q,G,`array expected, ${ni(G)} found`)];if(G.length!==2)return[new Ne(Q,G,`array length 2 expected, length ${G.length} found`)];if(C){if(ni(G[0])!=="object")return[new Ne(Q,G,`object expected, ${ni(G[0])} found`)];if(G[0].zoom===void 0)return[new Ne(Q,G,"object stop key must have zoom")];if(G[0].value===void 0)return[new Ne(Q,G,"object stop key must have value")];if(y&&y>Vi(G[0].zoom))return[new Ne(Q,G[0].zoom,"stop zoom values must appear in ascending order")];Vi(G[0].zoom)!==y&&(y=Vi(G[0].zoom),f=void 0,x={}),$=$.concat(dn({key:`${Q}[0]`,value:G[0],valueSpec:{zoom:{}},validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec,objectElementValidators:{zoom:Xc,value:B}}))}else $=$.concat(B({key:`${Q}[0]`,value:G[0],valueSpec:{},validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec},G));return bl(oo(G[1]))?$.concat([new Ne(`${Q}[1]`,G[1],"expressions are not allowed in function stops.")]):$.concat(V.validateSpec({key:`${Q}[1]`,value:G[1],valueSpec:t,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec}))}function B(V,$){const G=ni(V.value),Q=Vi(V.value),oe=V.value!==null?V.value:$;if(l){if(G!==l)return[new Ne(V.key,oe,`${G} stop domain type must match previous stop domain type ${l}`)]}else l=G;if(G!=="number"&&G!=="string"&&G!=="boolean")return[new Ne(V.key,oe,"stop domain value must be a number, string, or boolean")];if(G!=="number"&&o!=="categorical"){let we=`number expected, ${G} found`;return no(t)&&o===void 0&&(we+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ne(V.key,oe,we)]}return o!=="categorical"||G!=="number"||isFinite(Q)&&Math.floor(Q)===Q?o!=="categorical"&&G==="number"&&f!==void 0&&Qnew Ne(`${r.key}${l.key}`,r.value,l.message));const o=t.value.expression||t.value._styleExpression.expression;if(r.expressionContext==="property"&&r.propertyKey==="text-font"&&!o.outputDefined())return[new Ne(r.key,r.value,`Invalid data expression for "${r.propertyKey}". Output values must be contained as literals within the expression.`)];if(r.expressionContext==="property"&&r.propertyType==="layout"&&!ya(o))return[new Ne(r.key,r.value,'"feature-state" data expressions are not supported with layout properties.')];if(r.expressionContext==="filter"&&!ya(o))return[new Ne(r.key,r.value,'"feature-state" data expressions are not supported with filters.')];if(r.expressionContext&&r.expressionContext.indexOf("cluster")===0){if(!yl(o,["zoom","feature-state"]))return[new Ne(r.key,r.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(r.expressionContext==="cluster-initial"&&!gl(o))return[new Ne(r.key,r.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ss(r){const t=r.key,o=r.value,l=r.valueSpec,f=[];return Array.isArray(l.values)?l.values.indexOf(Vi(o))===-1&&f.push(new Ne(t,o,`expected one of [${l.values.join(", ")}], ${JSON.stringify(o)} found`)):Object.keys(l.values).indexOf(Vi(o))===-1&&f.push(new Ne(t,o,`expected one of [${Object.keys(l.values).join(", ")}], ${JSON.stringify(o)} found`)),f}function Al(r){return Xo(oo(r.value))?so(Ht({},r,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Kc(r)}function Kc(r){const t=r.value,o=r.key;if(ni(t)!=="array")return[new Ne(o,t,`array expected, ${ni(t)} found`)];const l=r.styleSpec;let f,y=[];if(t.length<1)return[new Ne(o,t,"filter array must have at least 1 element")];switch(y=y.concat(Ss({key:`${o}[0]`,value:t[0],valueSpec:l.filter_operator,style:r.style,styleSpec:r.styleSpec})),Vi(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Vi(t[1])==="$type"&&y.push(new Ne(o,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&y.push(new Ne(o,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(f=ni(t[1]),f!=="string"&&y.push(new Ne(`${o}[1]`,t[1],`string expected, ${f} found`)));for(let x=2;x{C in o&&t.push(new Ne(l,o[C],`"${C}" is prohibited for ref layers`))}),f.layers.forEach(C=>{Vi(C.id)===b&&(E=C)}),E?E.ref?t.push(new Ne(l,o.ref,"ref cannot reference another ref layer")):x=Vi(E.type):t.push(new Ne(l,o.ref,`ref layer "${b}" not found`))}else if(x!=="background")if(o.source){const E=f.sources&&f.sources[o.source],C=E&&Vi(E.type);E?C==="vector"&&x==="raster"?t.push(new Ne(l,o.source,`layer "${o.id}" requires a raster source`)):C!=="raster-dem"&&x==="hillshade"?t.push(new Ne(l,o.source,`layer "${o.id}" requires a raster-dem source`)):C==="raster"&&x!=="raster"?t.push(new Ne(l,o.source,`layer "${o.id}" requires a vector source`)):C!=="vector"||o["source-layer"]?C==="raster-dem"&&x!=="hillshade"?t.push(new Ne(l,o.source,"raster-dem source can only be used with layer type 'hillshade'.")):x!=="line"||!o.paint||!o.paint["line-gradient"]||C==="geojson"&&E.lineMetrics||t.push(new Ne(l,o,`layer "${o.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new Ne(l,o,`layer "${o.id}" must specify a "source-layer"`)):t.push(new Ne(l,o.source,`source "${o.source}" not found`))}else t.push(new Ne(l,o,'missing required property "source"'));return t=t.concat(dn({key:l,value:o,valueSpec:y.layer,style:r.style,styleSpec:r.styleSpec,validateSpec:r.validateSpec,objectElementValidators:{"*":()=>[],type:()=>r.validateSpec({key:`${l}.type`,value:o.type,valueSpec:y.layer.type,style:r.style,styleSpec:r.styleSpec,validateSpec:r.validateSpec,object:o,objectKey:"type"}),filter:Al,layout:E=>dn({layer:o,key:E.key,value:E.value,style:E.style,styleSpec:E.styleSpec,validateSpec:E.validateSpec,objectElementValidators:{"*":C=>Yc(Ht({layerType:x},C))}}),paint:E=>dn({layer:o,key:E.key,value:E.value,style:E.style,styleSpec:E.styleSpec,validateSpec:E.validateSpec,objectElementValidators:{"*":C=>Ml(Ht({layerType:x},C))}})}})),t}function vo(r){const t=r.value,o=r.key,l=ni(t);return l!=="string"?[new Ne(o,t,`string expected, ${l} found`)]:[]}const jh={promoteId:function({key:r,value:t}){if(ni(t)==="string")return vo({key:r,value:t});{const o=[];for(const l in t)o.push(...vo({key:`${r}.${l}`,value:t[l]}));return o}}};function Qc(r){const t=r.value,o=r.key,l=r.styleSpec,f=r.style,y=r.validateSpec;if(!t.type)return[new Ne(o,t,'"type" is required')];const x=Vi(t.type);let b;switch(x){case"vector":case"raster":return b=dn({key:o,value:t,valueSpec:l[`source_${x.replace("-","_")}`],style:r.style,styleSpec:l,objectElementValidators:jh,validateSpec:y}),b;case"raster-dem":return b=function(E){var C;const L=(C=E.sourceName)!==null&&C!==void 0?C:"",D=E.value,B=E.styleSpec,V=B.source_raster_dem,$=E.style;let G=[];const Q=ni(D);if(D===void 0)return G;if(Q!=="object")return G.push(new Ne("source_raster_dem",D,`object expected, ${Q} found`)),G;const oe=Vi(D.encoding)==="custom",we=["redFactor","greenFactor","blueFactor","baseShift"],he=E.value.encoding?`"${E.value.encoding}"`:"Default";for(const xe in D)!oe&&we.includes(xe)?G.push(new Ne(xe,D[xe],`In "${L}": "${xe}" is only valid when "encoding" is set to "custom". ${he} encoding found`)):V[xe]?G=G.concat(E.validateSpec({key:xe,value:D[xe],valueSpec:V[xe],validateSpec:E.validateSpec,style:$,styleSpec:B})):G.push(new Ne(xe,D[xe],`unknown property "${xe}"`));return G}({sourceName:o,value:t,style:r.style,styleSpec:l,validateSpec:y}),b;case"geojson":if(b=dn({key:o,value:t,valueSpec:l.source_geojson,style:f,styleSpec:l,validateSpec:y,objectElementValidators:jh}),t.cluster)for(const E in t.clusterProperties){const[C,L]=t.clusterProperties[E],D=typeof C=="string"?[C,["accumulated"],["get",E]]:C;b.push(...so({key:`${o}.${E}.map`,value:L,validateSpec:y,expressionContext:"cluster-map"})),b.push(...so({key:`${o}.${E}.reduce`,value:D,validateSpec:y,expressionContext:"cluster-reduce"}))}return b;case"video":return dn({key:o,value:t,valueSpec:l.source_video,style:f,validateSpec:y,styleSpec:l});case"image":return dn({key:o,value:t,valueSpec:l.source_image,style:f,validateSpec:y,styleSpec:l});case"canvas":return[new Ne(o,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ss({key:`${o}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:f,validateSpec:y,styleSpec:l})}}function eu(r){const t=r.value,o=r.styleSpec,l=o.light,f=r.style;let y=[];const x=ni(t);if(t===void 0)return y;if(x!=="object")return y=y.concat([new Ne("light",t,`object expected, ${x} found`)]),y;for(const b in t){const E=b.match(/^(.*)-transition$/);y=y.concat(E&&l[E[1]]&&l[E[1]].transition?r.validateSpec({key:b,value:t[b],valueSpec:o.transition,validateSpec:r.validateSpec,style:f,styleSpec:o}):l[b]?r.validateSpec({key:b,value:t[b],valueSpec:l[b],validateSpec:r.validateSpec,style:f,styleSpec:o}):[new Ne(b,t[b],`unknown property "${b}"`)])}return y}function tu(r){const t=r.value,o=r.styleSpec,l=o.sky,f=r.style,y=ni(t);if(t===void 0)return[];if(y!=="object")return[new Ne("sky",t,`object expected, ${y} found`)];let x=[];for(const b in t)x=x.concat(l[b]?r.validateSpec({key:b,value:t[b],valueSpec:l[b],style:f,styleSpec:o}):[new Ne(b,t[b],`unknown property "${b}"`)]);return x}function $h(r){const t=r.value,o=r.styleSpec,l=o.terrain,f=r.style;let y=[];const x=ni(t);if(t===void 0)return y;if(x!=="object")return y=y.concat([new Ne("terrain",t,`object expected, ${x} found`)]),y;for(const b in t)y=y.concat(l[b]?r.validateSpec({key:b,value:t[b],valueSpec:l[b],validateSpec:r.validateSpec,style:f,styleSpec:o}):[new Ne(b,t[b],`unknown property "${b}"`)]);return y}function Uh(r){let t=[];const o=r.value,l=r.key;if(Array.isArray(o)){const f=[],y=[];for(const x in o)o[x].id&&f.includes(o[x].id)&&t.push(new Ne(l,o,`all the sprites' ids must be unique, but ${o[x].id} is duplicated`)),f.push(o[x].id),o[x].url&&y.includes(o[x].url)&&t.push(new Ne(l,o,`all the sprites' URLs must be unique, but ${o[x].url} is duplicated`)),y.push(o[x].url),t=t.concat(dn({key:`${l}[${x}]`,value:o[x],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:r.validateSpec}));return t}return vo({key:l,value:o})}const iu={"*":()=>[],array:Tl,boolean:function(r){const t=r.value,o=r.key,l=ni(t);return l!=="boolean"?[new Ne(o,t,`boolean expected, ${l} found`)]:[]},number:Xc,color:function(r){const t=r.key,o=r.value,l=ni(o);return l!=="string"?[new Ne(t,o,`color expected, ${l} found`)]:ui.parse(String(o))?[]:[new Ne(t,o,`color expected, "${o}" found`)]},constants:Il,enum:Ss,filter:Al,function:Cl,layer:Nh,object:dn,source:Qc,light:eu,sky:tu,terrain:$h,projection:function(r){const t=r.value,o=r.styleSpec,l=o.projection,f=r.style,y=ni(t);if(t===void 0)return[];if(y!=="object")return[new Ne("projection",t,`object expected, ${y} found`)];let x=[];for(const b in t)x=x.concat(l[b]?r.validateSpec({key:b,value:t[b],valueSpec:l[b],style:f,styleSpec:o}):[new Ne(b,t[b],`unknown property "${b}"`)]);return x},string:vo,formatted:function(r){return vo(r).length===0?[]:so(r)},resolvedImage:function(r){return vo(r).length===0?[]:so(r)},padding:function(r){const t=r.key,o=r.value;if(ni(o)==="array"){if(o.length<1||o.length>4)return[new Ne(t,o,`padding requires 1 to 4 values; ${o.length} values found`)];const l={type:"number"};let f=[];for(let y=0;y[]}})),r.constants&&(o=o.concat(Il({key:"constants",value:r.constants,style:r,styleSpec:t,validateSpec:Is}))),qh(o)}function fn(r){return function(t){return r({...t,validateSpec:Is})}}function qh(r){return[].concat(r).sort((t,o)=>t.line-o.line)}function xn(r){return function(...t){return qh(r.apply(this,t))}}vn.source=xn(fn(Qc)),vn.sprite=xn(fn(Uh)),vn.glyphs=xn(fn(ru)),vn.light=xn(fn(eu)),vn.sky=xn(fn(tu)),vn.terrain=xn(fn($h)),vn.layer=xn(fn(Nh)),vn.filter=xn(fn(Al)),vn.paintProperty=xn(fn(Ml)),vn.layoutProperty=xn(fn(Yc));const wa=vn,ap=wa.light,Hh=wa.paintProperty,Gh=wa.layoutProperty;function nu(r,t){let o=!1;if(t&&t.length)for(const l of t)r.fire(new ge(new Error(l.message))),o=!0;return o}class Ea{constructor(t,o,l){const f=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const x=new Int32Array(this.arrayBuffer);t=x[0],this.d=(o=x[1])+2*(l=x[2]);for(let E=0;E=D[$+0]&&f>=D[$+1])?(b[V]=!0,x.push(L[V])):b[V]=!1}}}}_forEachCell(t,o,l,f,y,x,b,E){const C=this._convertToCellCoord(t),L=this._convertToCellCoord(o),D=this._convertToCellCoord(l),B=this._convertToCellCoord(f);for(let V=C;V<=D;V++)for(let $=L;$<=B;$++){const G=this.d*$+V;if((!E||E(this._convertFromCellCoord(V),this._convertFromCellCoord($),this._convertFromCellCoord(V+1),this._convertFromCellCoord($+1)))&&y.call(this,t,o,l,f,G,x,b,E))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,o=3+this.cells.length+1+1;let l=0;for(let x=0;x=0)continue;const x=r[y];f[y]=xo[l].shallow.indexOf(y)>=0?x:Sa(x,t)}r instanceof Error&&(f.message=r.message)}if(f.$name)throw new Error("$name property is reserved for worker serialization logic.");return l!=="Object"&&(f.$name=l),f}throw new Error("can't serialize object of type "+typeof r)}function jn(r){if(r==null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||r instanceof Boolean||r instanceof Number||r instanceof String||r instanceof Date||r instanceof RegExp||r instanceof Blob||r instanceof Error||Zh(r)||dt(r)||ArrayBuffer.isView(r)||r instanceof ImageData)return r;if(Array.isArray(r))return r.map(jn);if(typeof r=="object"){const t=r.$name||"Object";if(!xo[t])throw new Error(`can't deserialize unregistered class ${t}`);const{klass:o}=xo[t];if(!o)throw new Error(`can't deserialize unregistered class ${t}`);if(o.deserialize)return o.deserialize(r);const l=Object.create(o.prototype);for(const f of Object.keys(r)){if(f==="$name")continue;const y=r[f];l[f]=xo[t].shallow.indexOf(f)>=0?y:jn(y)}return l}throw new Error("can't deserialize object of type "+typeof r)}class Wh{constructor(){this.first=!0}update(t,o){const l=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=l,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=l,!0):(this.lastFloorZoom>l?(this.lastIntegerZoom=l+1,this.lastIntegerZoomTime=o):this.lastFloorZoomr>=128&&r<=255,Arabic:r=>r>=1536&&r<=1791,"Arabic Supplement":r=>r>=1872&&r<=1919,"Arabic Extended-A":r=>r>=2208&&r<=2303,"Hangul Jamo":r=>r>=4352&&r<=4607,"Unified Canadian Aboriginal Syllabics":r=>r>=5120&&r<=5759,Khmer:r=>r>=6016&&r<=6143,"Unified Canadian Aboriginal Syllabics Extended":r=>r>=6320&&r<=6399,"General Punctuation":r=>r>=8192&&r<=8303,"Letterlike Symbols":r=>r>=8448&&r<=8527,"Number Forms":r=>r>=8528&&r<=8591,"Miscellaneous Technical":r=>r>=8960&&r<=9215,"Control Pictures":r=>r>=9216&&r<=9279,"Optical Character Recognition":r=>r>=9280&&r<=9311,"Enclosed Alphanumerics":r=>r>=9312&&r<=9471,"Geometric Shapes":r=>r>=9632&&r<=9727,"Miscellaneous Symbols":r=>r>=9728&&r<=9983,"Miscellaneous Symbols and Arrows":r=>r>=11008&&r<=11263,"CJK Radicals Supplement":r=>r>=11904&&r<=12031,"Kangxi Radicals":r=>r>=12032&&r<=12255,"Ideographic Description Characters":r=>r>=12272&&r<=12287,"CJK Symbols and Punctuation":r=>r>=12288&&r<=12351,Hiragana:r=>r>=12352&&r<=12447,Katakana:r=>r>=12448&&r<=12543,Bopomofo:r=>r>=12544&&r<=12591,"Hangul Compatibility Jamo":r=>r>=12592&&r<=12687,Kanbun:r=>r>=12688&&r<=12703,"Bopomofo Extended":r=>r>=12704&&r<=12735,"CJK Strokes":r=>r>=12736&&r<=12783,"Katakana Phonetic Extensions":r=>r>=12784&&r<=12799,"Enclosed CJK Letters and Months":r=>r>=12800&&r<=13055,"CJK Compatibility":r=>r>=13056&&r<=13311,"CJK Unified Ideographs Extension A":r=>r>=13312&&r<=19903,"Yijing Hexagram Symbols":r=>r>=19904&&r<=19967,"CJK Unified Ideographs":r=>r>=19968&&r<=40959,"Yi Syllables":r=>r>=40960&&r<=42127,"Yi Radicals":r=>r>=42128&&r<=42191,"Hangul Jamo Extended-A":r=>r>=43360&&r<=43391,"Hangul Syllables":r=>r>=44032&&r<=55215,"Hangul Jamo Extended-B":r=>r>=55216&&r<=55295,"Private Use Area":r=>r>=57344&&r<=63743,"CJK Compatibility Ideographs":r=>r>=63744&&r<=64255,"Arabic Presentation Forms-A":r=>r>=64336&&r<=65023,"Vertical Forms":r=>r>=65040&&r<=65055,"CJK Compatibility Forms":r=>r>=65072&&r<=65103,"Small Form Variants":r=>r>=65104&&r<=65135,"Arabic Presentation Forms-B":r=>r>=65136&&r<=65279,"Halfwidth and Fullwidth Forms":r=>r>=65280&&r<=65519};function ou(r){for(const t of r)if(su(t.charCodeAt(0)))return!0;return!1}function lp(r){for(const t of r)if(!Xh(t.charCodeAt(0)))return!1;return!0}function Xh(r){return!(ct.Arabic(r)||ct["Arabic Supplement"](r)||ct["Arabic Extended-A"](r)||ct["Arabic Presentation Forms-A"](r)||ct["Arabic Presentation Forms-B"](r))}function su(r){return!(r!==746&&r!==747&&(r<4352||!(ct["Bopomofo Extended"](r)||ct.Bopomofo(r)||ct["CJK Compatibility Forms"](r)&&!(r>=65097&&r<=65103)||ct["CJK Compatibility Ideographs"](r)||ct["CJK Compatibility"](r)||ct["CJK Radicals Supplement"](r)||ct["CJK Strokes"](r)||!(!ct["CJK Symbols and Punctuation"](r)||r>=12296&&r<=12305||r>=12308&&r<=12319||r===12336)||ct["CJK Unified Ideographs Extension A"](r)||ct["CJK Unified Ideographs"](r)||ct["Enclosed CJK Letters and Months"](r)||ct["Hangul Compatibility Jamo"](r)||ct["Hangul Jamo Extended-A"](r)||ct["Hangul Jamo Extended-B"](r)||ct["Hangul Jamo"](r)||ct["Hangul Syllables"](r)||ct.Hiragana(r)||ct["Ideographic Description Characters"](r)||ct.Kanbun(r)||ct["Kangxi Radicals"](r)||ct["Katakana Phonetic Extensions"](r)||ct.Katakana(r)&&r!==12540||!(!ct["Halfwidth and Fullwidth Forms"](r)||r===65288||r===65289||r===65293||r>=65306&&r<=65310||r===65339||r===65341||r===65343||r>=65371&&r<=65503||r===65507||r>=65512&&r<=65519)||!(!ct["Small Form Variants"](r)||r>=65112&&r<=65118||r>=65123&&r<=65126)||ct["Unified Canadian Aboriginal Syllabics"](r)||ct["Unified Canadian Aboriginal Syllabics Extended"](r)||ct["Vertical Forms"](r)||ct["Yijing Hexagram Symbols"](r)||ct["Yi Syllables"](r)||ct["Yi Radicals"](r))))}function Kh(r){return!(su(r)||function(t){return!!(ct["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||ct["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)||ct["Letterlike Symbols"](t)||ct["Number Forms"](t)||ct["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)||ct["Control Pictures"](t)&&t!==9251||ct["Optical Character Recognition"](t)||ct["Enclosed Alphanumerics"](t)||ct["Geometric Shapes"](t)||ct["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||ct["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||ct["CJK Symbols and Punctuation"](t)||ct.Katakana(t)||ct["Private Use Area"](t)||ct["CJK Compatibility Forms"](t)||ct["Small Form Variants"](t)||ct["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)}(r))}function bo(r){return r>=1424&&r<=2303||ct["Arabic Presentation Forms-A"](r)||ct["Arabic Presentation Forms-B"](r)}function Jh(r,t){return!(!t&&bo(r)||r>=2304&&r<=3583||r>=3840&&r<=4255||ct.Khmer(r))}function au(r){for(const t of r)if(bo(t.charCodeAt(0)))return!0;return!1}const wo=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(r){this.pluginStatus=r.pluginStatus,this.pluginURL=r.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(r){this.applyArabicShaping=r.applyArabicShaping,this.processBidirectionalText=r.processBidirectionalText,this.processStyledBidirectionalText=r.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class xi{constructor(t,o){this.zoom=t,o?(this.now=o.now,this.fadeDuration=o.fadeDuration,this.zoomHistory=o.zoomHistory,this.transition=o.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Wh,this.transition={})}isSupportedScript(t){return function(o,l){for(const f of o)if(!Jh(f.charCodeAt(0),l))return!1;return!0}(t,wo.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,o=t-Math.floor(t),l=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:o+(1-o)*l}:{fromScale:.5,toScale:1,t:1-(1-l)*o}}}class kl{constructor(t,o){this.property=t,this.value=o,this.expression=function(l,f){if(bs(l))return new Wo(l,f);if(bl(l)){const y=va(l,f);if(y.result==="error")throw new Error(y.value.map(x=>`${x.key}: ${x.message}`).join(", "));return y.value}{let y=l;return f.type==="color"&&typeof l=="string"?y=ui.parse(l):f.type!=="padding"||typeof l!="number"&&!Array.isArray(l)?f.type==="variableAnchorOffsetCollection"&&Array.isArray(l)&&(y=Xr.parse(l)):y=Wr.parse(l),{kind:"constant",evaluate:()=>y}}}(o===void 0?t.specification.default:o,t.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(t,o,l){return this.property.possiblyEvaluate(this,t,o,l)}}class Ts{constructor(t){this.property=t,this.value=new kl(t,void 0)}transitioned(t,o){return new Yh(this.property,this.value,o,Se({},t.transition,this.transition),t.now)}untransitioned(){return new Yh(this.property,this.value,null,{},0)}}class Cs{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}getValue(t){return Ie(this._values[t].value.value)}setValue(t,o){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Ts(this._values[t].property)),this._values[t].value=new kl(this._values[t].property,o===null?void 0:Ie(o))}getTransition(t){return Ie(this._values[t].transition)}setTransition(t,o){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Ts(this._values[t].property)),this._values[t].transition=Ie(o)||void 0}serialize(){const t={};for(const o of Object.keys(this._values)){const l=this.getValue(o);l!==void 0&&(t[o]=l);const f=this.getTransition(o);f!==void 0&&(t[`${o}-transition`]=f)}return t}transitioned(t,o){const l=new lu(this._properties);for(const f of Object.keys(this._values))l._values[f]=this._values[f].transitioned(t,o._values[f]);return l}untransitioned(){const t=new lu(this._properties);for(const o of Object.keys(this._values))t._values[o]=this._values[o].untransitioned();return t}}class Yh{constructor(t,o,l,f,y){this.property=t,this.value=o,this.begin=y+f.delay||0,this.end=this.begin+f.duration||0,t.specification.transition&&(f.delay||f.duration)&&(this.prior=l)}possiblyEvaluate(t,o,l){const f=t.now||0,y=this.value.possiblyEvaluate(t,o,l),x=this.prior;if(x){if(f>this.end)return this.prior=null,y;if(this.value.isDataDriven())return this.prior=null,y;if(f=1)return 1;const C=E*E,L=C*E;return 4*(E<.5?L:3*(E-C)+L-.75)}(b))}}return y}}class lu{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,o,l){const f=new Ll(this._properties);for(const y of Object.keys(this._values))f._values[y]=this._values[y].possiblyEvaluate(t,o,l);return f}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 Ie(this._values[t].value)}setValue(t,o){this._values[t]=new kl(this._values[t].property,o===null?void 0:Ie(o))}serialize(){const t={};for(const o of Object.keys(this._values)){const l=this.getValue(o);l!==void 0&&(t[o]=l)}return t}possiblyEvaluate(t,o,l){const f=new Ll(this._properties);for(const y of Object.keys(this._values))f._values[y]=this._values[y].possiblyEvaluate(t,o,l);return f}}class $n{constructor(t,o,l){this.property=t,this.value=o,this.parameters=l}isConstant(){return this.value.kind==="constant"}constantOr(t){return this.value.kind==="constant"?this.value.value:t}evaluate(t,o,l,f){return this.property.evaluate(this.value,this.parameters,t,o,l,f)}}class Ll{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class bt{constructor(t){this.specification=t}possiblyEvaluate(t,o){if(t.isDataDriven())throw new Error("Value should not be data driven");return t.expression.evaluate(o)}interpolate(t,o,l){const f=Fr[this.specification.type];return f?f(t,o,l):t}}class Ct{constructor(t,o){this.specification=t,this.overrides=o}possiblyEvaluate(t,o,l,f){return new $n(this,t.expression.kind==="constant"||t.expression.kind==="camera"?{kind:"constant",value:t.expression.evaluate(o,null,{},l,f)}:t.expression,o)}interpolate(t,o,l){if(t.value.kind!=="constant"||o.value.kind!=="constant")return t;if(t.value.value===void 0||o.value.value===void 0)return new $n(this,{kind:"constant",value:void 0},t.parameters);const f=Fr[this.specification.type];if(f){const y=f(t.value.value,o.value.value,l);return new $n(this,{kind:"constant",value:y},t.parameters)}return t}evaluate(t,o,l,f,y,x){return t.kind==="constant"?t.value:t.evaluate(o,l,f,y,x)}}class _ extends Ct{possiblyEvaluate(t,o,l,f){if(t.value===void 0)return new $n(this,{kind:"constant",value:void 0},o);if(t.expression.kind==="constant"){const y=t.expression.evaluate(o,null,{},l,f),x=t.property.specification.type==="resolvedImage"&&typeof y!="string"?y.name:y,b=this._calculate(x,x,x,o);return new $n(this,{kind:"constant",value:b},o)}if(t.expression.kind==="camera"){const y=this._calculate(t.expression.evaluate({zoom:o.zoom-1}),t.expression.evaluate({zoom:o.zoom}),t.expression.evaluate({zoom:o.zoom+1}),o);return new $n(this,{kind:"constant",value:y},o)}return new $n(this,t.expression,o)}evaluate(t,o,l,f,y,x){if(t.kind==="source"){const b=t.evaluate(o,l,f,y,x);return this._calculate(b,b,b,o)}return t.kind==="composite"?this._calculate(t.evaluate({zoom:Math.floor(o.zoom)-1},l,f),t.evaluate({zoom:Math.floor(o.zoom)},l,f),t.evaluate({zoom:Math.floor(o.zoom)+1},l,f),o):t.value}_calculate(t,o,l,f){return f.zoom>f.zoomHistory.lastIntegerZoom?{from:t,to:o}:{from:l,to:o}}interpolate(t){return t}}class i{constructor(t){this.specification=t}possiblyEvaluate(t,o,l,f){if(t.value!==void 0){if(t.expression.kind==="constant"){const y=t.expression.evaluate(o,null,{},l,f);return this._calculate(y,y,y,o)}return this._calculate(t.expression.evaluate(new xi(Math.floor(o.zoom-1),o)),t.expression.evaluate(new xi(Math.floor(o.zoom),o)),t.expression.evaluate(new xi(Math.floor(o.zoom+1),o)),o)}}_calculate(t,o,l,f){return f.zoom>f.zoomHistory.lastIntegerZoom?{from:t,to:o}:{from:l,to:o}}interpolate(t){return t}}class a{constructor(t){this.specification=t}possiblyEvaluate(t,o,l,f){return!!t.expression.evaluate(o,null,{},l,f)}interpolate(){return!1}}class d{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const o in t){const l=t[o];l.specification.overridable&&this.overridableProperties.push(o);const f=this.defaultPropertyValues[o]=new kl(l,void 0),y=this.defaultTransitionablePropertyValues[o]=new Ts(l);this.defaultTransitioningPropertyValues[o]=y.untransitioned(),this.defaultPossiblyEvaluatedValues[o]=f.possiblyEvaluate({})}}}mt("DataDrivenProperty",Ct),mt("DataConstantProperty",bt),mt("CrossFadedDataDrivenProperty",_),mt("CrossFadedProperty",i),mt("ColorRampProperty",a);const p="-transition";class v extends Be{constructor(t,o){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),o.layout&&(this._unevaluatedLayout=new Ia(o.layout)),o.paint)){this._transitionablePaint=new Cs(o.paint);for(const l in t.paint)this.setPaintProperty(l,t.paint[l],{validate:!1});for(const l in t.layout)this.setLayoutProperty(l,t.layout[l],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ll(o.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return t==="visibility"?this.visibility:this._unevaluatedLayout.getValue(t)}setLayoutProperty(t,o,l={}){o!=null&&this._validate(Gh,`layers.${this.id}.layout.${t}`,t,o,l)||(t!=="visibility"?this._unevaluatedLayout.setValue(t,o):this.visibility=o)}getPaintProperty(t){return t.endsWith(p)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,o,l={}){if(o!=null&&this._validate(Hh,`layers.${this.id}.paint.${t}`,t,o,l))return!1;if(t.endsWith(p))return this._transitionablePaint.setTransition(t.slice(0,-11),o||void 0),!1;{const f=this._transitionablePaint._values[t],y=f.property.specification["property-type"]==="cross-faded-data-driven",x=f.value.isDataDriven(),b=f.value;this._transitionablePaint.setValue(t,o),this._handleSpecialPaintPropertyUpdate(t);const E=this._transitionablePaint._values[t].value;return E.isDataDriven()||x||y||this._handleOverridablePaintPropertyUpdate(t,b,E)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,o,l){return!1}isHidden(t){return!!(this.minzoom&&t=this.maxzoom)||this.visibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,o){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,o)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,o)}serialize(){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),pe(t,(o,l)=>!(o===void 0||l==="layout"&&!Object.keys(o).length||l==="paint"&&!Object.keys(o).length))}_validate(t,o,l,f,y={}){return(!y||y.validate!==!1)&&nu(this,t.call(wa,{key:o,layerType:this.type,objectKey:l,value:f,styleSpec:ae,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const o=this.paint.get(t);if(o instanceof $n&&no(o.property.specification)&&(o.value.kind==="source"||o.value.kind==="composite")&&o.value.isStateDependent)return!0}return!1}}const w={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class S{constructor(t,o){this._structArray=t,this._pos1=o*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class T{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,o){return t._trim(),o&&(t.isTransferred=!0,o.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const o=Object.create(this.prototype);return o.arrayBuffer=t.arrayBuffer,o.length=t.length,o.capacity=t.arrayBuffer.byteLength/o.bytesPerElement,o._refreshViews(),o}_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 o=this.uint8;this._refreshViews(),o&&this.uint8.set(o)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function P(r,t=1){let o=0,l=0;return{members:r.map(f=>{const y=w[f.type].BYTES_PER_ELEMENT,x=o=O(o,Math.max(t,y)),b=f.components||1;return l=Math.max(l,y),o+=y*b,{name:f.name,type:f.type,components:b,offset:x}}),size:O(o,Math.max(l,t)),alignment:t}}function O(r,t){return Math.ceil(r/t)*t}class R extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o){const l=this.length;return this.resize(l+1),this.emplace(l,t,o)}emplace(t,o,l){const f=2*t;return this.int16[f+0]=o,this.int16[f+1]=l,t}}R.prototype.bytesPerElement=4,mt("StructArrayLayout2i4",R);class j extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l){const f=this.length;return this.resize(f+1),this.emplace(f,t,o,l)}emplace(t,o,l,f){const y=3*t;return this.int16[y+0]=o,this.int16[y+1]=l,this.int16[y+2]=f,t}}j.prototype.bytesPerElement=6,mt("StructArrayLayout3i6",j);class H extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f){const y=this.length;return this.resize(y+1),this.emplace(y,t,o,l,f)}emplace(t,o,l,f,y){const x=4*t;return this.int16[x+0]=o,this.int16[x+1]=l,this.int16[x+2]=f,this.int16[x+3]=y,t}}H.prototype.bytesPerElement=8,mt("StructArrayLayout4i8",H);class X extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x){const b=this.length;return this.resize(b+1),this.emplace(b,t,o,l,f,y,x)}emplace(t,o,l,f,y,x,b){const E=6*t;return this.int16[E+0]=o,this.int16[E+1]=l,this.int16[E+2]=f,this.int16[E+3]=y,this.int16[E+4]=x,this.int16[E+5]=b,t}}X.prototype.bytesPerElement=12,mt("StructArrayLayout2i4i12",X);class ne extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x){const b=this.length;return this.resize(b+1),this.emplace(b,t,o,l,f,y,x)}emplace(t,o,l,f,y,x,b){const E=4*t,C=8*t;return this.int16[E+0]=o,this.int16[E+1]=l,this.uint8[C+4]=f,this.uint8[C+5]=y,this.uint8[C+6]=x,this.uint8[C+7]=b,t}}ne.prototype.bytesPerElement=8,mt("StructArrayLayout2i4ub8",ne);class Y extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,o){const l=this.length;return this.resize(l+1),this.emplace(l,t,o)}emplace(t,o,l){const f=2*t;return this.float32[f+0]=o,this.float32[f+1]=l,t}}Y.prototype.bytesPerElement=8,mt("StructArrayLayout2f8",Y);class le extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x,b,E,C,L){const D=this.length;return this.resize(D+1),this.emplace(D,t,o,l,f,y,x,b,E,C,L)}emplace(t,o,l,f,y,x,b,E,C,L,D){const B=10*t;return this.uint16[B+0]=o,this.uint16[B+1]=l,this.uint16[B+2]=f,this.uint16[B+3]=y,this.uint16[B+4]=x,this.uint16[B+5]=b,this.uint16[B+6]=E,this.uint16[B+7]=C,this.uint16[B+8]=L,this.uint16[B+9]=D,t}}le.prototype.bytesPerElement=20,mt("StructArrayLayout10ui20",le);class me extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x,b,E,C,L,D,B){const V=this.length;return this.resize(V+1),this.emplace(V,t,o,l,f,y,x,b,E,C,L,D,B)}emplace(t,o,l,f,y,x,b,E,C,L,D,B,V){const $=12*t;return this.int16[$+0]=o,this.int16[$+1]=l,this.int16[$+2]=f,this.int16[$+3]=y,this.uint16[$+4]=x,this.uint16[$+5]=b,this.uint16[$+6]=E,this.uint16[$+7]=C,this.int16[$+8]=L,this.int16[$+9]=D,this.int16[$+10]=B,this.int16[$+11]=V,t}}me.prototype.bytesPerElement=24,mt("StructArrayLayout4i4ui4i24",me);class ie extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,o,l){const f=this.length;return this.resize(f+1),this.emplace(f,t,o,l)}emplace(t,o,l,f){const y=3*t;return this.float32[y+0]=o,this.float32[y+1]=l,this.float32[y+2]=f,t}}ie.prototype.bytesPerElement=12,mt("StructArrayLayout3f12",ie);class ve extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const o=this.length;return this.resize(o+1),this.emplace(o,t)}emplace(t,o){return this.uint32[1*t+0]=o,t}}ve.prototype.bytesPerElement=4,mt("StructArrayLayout1ul4",ve);class Te extends T{_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,o,l,f,y,x,b,E,C){const L=this.length;return this.resize(L+1),this.emplace(L,t,o,l,f,y,x,b,E,C)}emplace(t,o,l,f,y,x,b,E,C,L){const D=10*t,B=5*t;return this.int16[D+0]=o,this.int16[D+1]=l,this.int16[D+2]=f,this.int16[D+3]=y,this.int16[D+4]=x,this.int16[D+5]=b,this.uint32[B+3]=E,this.uint16[D+8]=C,this.uint16[D+9]=L,t}}Te.prototype.bytesPerElement=20,mt("StructArrayLayout6i1ul2ui20",Te);class Pe extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x){const b=this.length;return this.resize(b+1),this.emplace(b,t,o,l,f,y,x)}emplace(t,o,l,f,y,x,b){const E=6*t;return this.int16[E+0]=o,this.int16[E+1]=l,this.int16[E+2]=f,this.int16[E+3]=y,this.int16[E+4]=x,this.int16[E+5]=b,t}}Pe.prototype.bytesPerElement=12,mt("StructArrayLayout2i2i2i12",Pe);class Ve extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y){const x=this.length;return this.resize(x+1),this.emplace(x,t,o,l,f,y)}emplace(t,o,l,f,y,x){const b=4*t,E=8*t;return this.float32[b+0]=o,this.float32[b+1]=l,this.float32[b+2]=f,this.int16[E+6]=y,this.int16[E+7]=x,t}}Ve.prototype.bytesPerElement=16,mt("StructArrayLayout2f1f2i16",Ve);class Ke extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x){const b=this.length;return this.resize(b+1),this.emplace(b,t,o,l,f,y,x)}emplace(t,o,l,f,y,x,b){const E=16*t,C=4*t,L=8*t;return this.uint8[E+0]=o,this.uint8[E+1]=l,this.float32[C+1]=f,this.float32[C+2]=y,this.int16[L+6]=x,this.int16[L+7]=b,t}}Ke.prototype.bytesPerElement=16,mt("StructArrayLayout2ub2f2i16",Ke);class ut extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,o,l){const f=this.length;return this.resize(f+1),this.emplace(f,t,o,l)}emplace(t,o,l,f){const y=3*t;return this.uint16[y+0]=o,this.uint16[y+1]=l,this.uint16[y+2]=f,t}}ut.prototype.bytesPerElement=6,mt("StructArrayLayout3ui6",ut);class ht extends T{_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,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe){const we=this.length;return this.resize(we+1),this.emplace(we,t,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe)}emplace(t,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe,we){const he=24*t,xe=12*t,ze=48*t;return this.int16[he+0]=o,this.int16[he+1]=l,this.uint16[he+2]=f,this.uint16[he+3]=y,this.uint32[xe+2]=x,this.uint32[xe+3]=b,this.uint32[xe+4]=E,this.uint16[he+10]=C,this.uint16[he+11]=L,this.uint16[he+12]=D,this.float32[xe+7]=B,this.float32[xe+8]=V,this.uint8[ze+36]=$,this.uint8[ze+37]=G,this.uint8[ze+38]=Q,this.uint32[xe+10]=oe,this.int16[he+22]=we,t}}ht.prototype.bytesPerElement=48,mt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ht);class Je extends T{_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,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe,we,he,xe,ze,qe,st,Tt,lt,ot,xt,gt){const ft=this.length;return this.resize(ft+1),this.emplace(ft,t,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe,we,he,xe,ze,qe,st,Tt,lt,ot,xt,gt)}emplace(t,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe,we,he,xe,ze,qe,st,Tt,lt,ot,xt,gt,ft){const Fe=32*t,wt=16*t;return this.int16[Fe+0]=o,this.int16[Fe+1]=l,this.int16[Fe+2]=f,this.int16[Fe+3]=y,this.int16[Fe+4]=x,this.int16[Fe+5]=b,this.int16[Fe+6]=E,this.int16[Fe+7]=C,this.uint16[Fe+8]=L,this.uint16[Fe+9]=D,this.uint16[Fe+10]=B,this.uint16[Fe+11]=V,this.uint16[Fe+12]=$,this.uint16[Fe+13]=G,this.uint16[Fe+14]=Q,this.uint16[Fe+15]=oe,this.uint16[Fe+16]=we,this.uint16[Fe+17]=he,this.uint16[Fe+18]=xe,this.uint16[Fe+19]=ze,this.uint16[Fe+20]=qe,this.uint16[Fe+21]=st,this.uint16[Fe+22]=Tt,this.uint32[wt+12]=lt,this.float32[wt+13]=ot,this.float32[wt+14]=xt,this.uint16[Fe+30]=gt,this.uint16[Fe+31]=ft,t}}Je.prototype.bytesPerElement=64,mt("StructArrayLayout8i15ui1ul2f2ui64",Je);class et extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const o=this.length;return this.resize(o+1),this.emplace(o,t)}emplace(t,o){return this.float32[1*t+0]=o,t}}et.prototype.bytesPerElement=4,mt("StructArrayLayout1f4",et);class yt extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,o,l){const f=this.length;return this.resize(f+1),this.emplace(f,t,o,l)}emplace(t,o,l,f){const y=3*t;return this.uint16[6*t+0]=o,this.float32[y+1]=l,this.float32[y+2]=f,t}}yt.prototype.bytesPerElement=12,mt("StructArrayLayout1ui2f12",yt);class Rt extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,o,l){const f=this.length;return this.resize(f+1),this.emplace(f,t,o,l)}emplace(t,o,l,f){const y=4*t;return this.uint32[2*t+0]=o,this.uint16[y+2]=l,this.uint16[y+3]=f,t}}Rt.prototype.bytesPerElement=8,mt("StructArrayLayout1ul2ui8",Rt);class it extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,o){const l=this.length;return this.resize(l+1),this.emplace(l,t,o)}emplace(t,o,l){const f=2*t;return this.uint16[f+0]=o,this.uint16[f+1]=l,t}}it.prototype.bytesPerElement=4,mt("StructArrayLayout2ui4",it);class at extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const o=this.length;return this.resize(o+1),this.emplace(o,t)}emplace(t,o){return this.uint16[1*t+0]=o,t}}at.prototype.bytesPerElement=2,mt("StructArrayLayout1ui2",at);class kt extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,o,l,f){const y=this.length;return this.resize(y+1),this.emplace(y,t,o,l,f)}emplace(t,o,l,f,y){const x=4*t;return this.float32[x+0]=o,this.float32[x+1]=l,this.float32[x+2]=f,this.float32[x+3]=y,t}}kt.prototype.bytesPerElement=16,mt("StructArrayLayout4f16",kt);class Ii extends S{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 A(this.anchorPointX,this.anchorPointY)}}Ii.prototype.size=20;class Zt extends Te{get(t){return new Ii(this,t)}}mt("CollisionBoxArray",Zt);class Yt extends S{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]}}Yt.prototype.size=48;class Ti extends ht{get(t){return new Yt(this,t)}}mt("PlacedSymbolArray",Ti);class Ir extends S{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]}}Ir.prototype.size=64;class In extends Je{get(t){return new Ir(this,t)}}mt("SymbolInstanceArray",In);class Ci extends et{getoffsetX(t){return this.float32[1*t+0]}}mt("GlyphOffsetArray",Ci);class Jr extends j{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}mt("SymbolLineVertexArray",Jr);class Vr extends S{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]}}Vr.prototype.size=12;class Tr extends yt{get(t){return new Vr(this,t)}}mt("TextAnchorOffsetArray",Tr);class Cr extends S{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]}}Cr.prototype.size=8;class Tn extends Rt{get(t){return new Cr(this,t)}}mt("FeatureIndexArray",Tn);class Jo extends R{}class Pl extends R{}class As extends R{}class Yo extends X{}class zl extends ne{}class cu extends Y{}class yr extends le{}class Cn extends me{}class Eo extends ie{}class Ms extends ve{}class Ar extends Pe{}class Mr extends Ke{}class dr extends ut{}class Bi extends it{}const ks=P([{name:"a_pos",components:2,type:"Int16"}],4),{members:uu}=ks;class sr{constructor(t=[]){this.segments=t}prepareSegment(t,o,l,f){let y=this.segments[this.segments.length-1];return t>sr.MAX_VERTEX_ARRAY_LENGTH&&De(`Max vertices per segment is ${sr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}`),(!y||y.vertexLength+t>sr.MAX_VERTEX_ARRAY_LENGTH||y.sortKey!==f)&&(y={vertexOffset:o.length,primitiveOffset:l.length,vertexLength:0,primitiveLength:0},f!==void 0&&(y.sortKey=f),this.segments.push(y)),y}get(){return this.segments}destroy(){for(const t of this.segments)for(const o in t.vaos)t.vaos[o].destroy()}static simpleSegment(t,o,l,f){return new sr([{vertexOffset:t,primitiveOffset:o,vertexLength:l,primitiveLength:f,vaos:{},sortKey:0}])}}function Qh(r,t){return 256*(r=Z(Math.floor(r),0,255))+Z(Math.floor(t),0,255)}sr.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,mt("SegmentVector",sr);const Dl=P([{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 Rl={exports:{}},So={exports:{}};So.exports=function(r,t){var o,l,f,y,x,b,E,C;for(l=r.length-(o=3&r.length),f=t,x=3432918353,b=461845907,C=0;C>>16)*x&65535)<<16)&4294967295)<<15|E>>>17))*b+(((E>>>16)*b&65535)<<16)&4294967295)<<13|f>>>19))+((5*(f>>>16)&65535)<<16)&4294967295))+((58964+(y>>>16)&65535)<<16);switch(E=0,o){case 3:E^=(255&r.charCodeAt(C+2))<<16;case 2:E^=(255&r.charCodeAt(C+1))<<8;case 1:f^=E=(65535&(E=(E=(65535&(E^=255&r.charCodeAt(C)))*x+(((E>>>16)*x&65535)<<16)&4294967295)<<15|E>>>17))*b+(((E>>>16)*b&65535)<<16)&4294967295}return f^=r.length,f=2246822507*(65535&(f^=f>>>16))+((2246822507*(f>>>16)&65535)<<16)&4294967295,f=3266489909*(65535&(f^=f>>>13))+((3266489909*(f>>>16)&65535)<<16)&4294967295,(f^=f>>>16)>>>0};var ed=So.exports,hu={exports:{}};hu.exports=function(r,t){for(var o,l=r.length,f=t^l,y=0;l>=4;)o=1540483477*(65535&(o=255&r.charCodeAt(y)|(255&r.charCodeAt(++y))<<8|(255&r.charCodeAt(++y))<<16|(255&r.charCodeAt(++y))<<24))+((1540483477*(o>>>16)&65535)<<16),f=1540483477*(65535&f)+((1540483477*(f>>>16)&65535)<<16)^(o=1540483477*(65535&(o^=o>>>24))+((1540483477*(o>>>16)&65535)<<16)),l-=4,++y;switch(l){case 3:f^=(255&r.charCodeAt(y+2))<<16;case 2:f^=(255&r.charCodeAt(y+1))<<8;case 1:f=1540483477*(65535&(f^=255&r.charCodeAt(y)))+((1540483477*(f>>>16)&65535)<<16)}return f=1540483477*(65535&(f^=f>>>13))+((1540483477*(f>>>16)&65535)<<16),(f^=f>>>15)>>>0};var du=ed,fu=hu.exports;Rl.exports=du,Rl.exports.murmur3=du,Rl.exports.murmur2=fu;var Ol=I(Rl.exports);class Ls{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,o,l,f){this.ids.push(_y(t)),this.positions.push(o,l,f)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const o=_y(t);let l=0,f=this.ids.length-1;for(;l>1;this.ids[x]>=o?f=x:l=x+1}const y=[];for(;this.ids[l]===o;)y.push({index:this.positions[3*l],start:this.positions[3*l+1],end:this.positions[3*l+2]}),l++;return y}static serialize(t,o){const l=new Float64Array(t.ids),f=new Uint32Array(t.positions);return cp(l,f,0,l.length-1),o&&o.push(l.buffer,f.buffer),{ids:l,positions:f}}static deserialize(t){const o=new Ls;return o.ids=t.ids,o.positions=t.positions,o.indexed=!0,o}}function _y(r){const t=+r;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:Ol(String(r))}function cp(r,t,o,l){for(;o>1];let y=o-1,x=l+1;for(;;){do y++;while(r[y]f);if(y>=x)break;td(r,y,x),td(t,3*y,3*x),td(t,3*y+1,3*x+1),td(t,3*y+2,3*x+2)}x-o`u_${f}`),this.type=l}setUniform(t,o,l){t.set(l.constantOr(this.value))}getBinding(t,o,l){return this.type==="color"?new xy(t,o):new id(t,o)}}class Bl{constructor(t,o){this.uniformNames=o.map(l=>`u_${l}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,o){this.pixelRatioFrom=o.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=o.tlbr,this.patternTo=t.tlbr}setUniform(t,o,l,f){const y=f==="u_pattern_to"?this.patternTo:f==="u_pattern_from"?this.patternFrom:f==="u_pixel_ratio_to"?this.pixelRatioTo:f==="u_pixel_ratio_from"?this.pixelRatioFrom:null;y&&t.set(y)}getBinding(t,o,l){return l.substr(0,9)==="u_pattern"?new vy(t,o):new id(t,o)}}class Qo{constructor(t,o,l,f){this.expression=t,this.type=l,this.maxValue=0,this.paintVertexAttributes=o.map(y=>({name:`a_${y}`,type:"Float32",components:l==="color"?2:1,offset:0})),this.paintVertexArray=new f}populatePaintArray(t,o,l,f,y){const x=this.paintVertexArray.length,b=this.expression.evaluate(new xi(0),o,{},f,[],y);this.paintVertexArray.resize(t),this._setPaintValue(x,t,b)}updatePaintArray(t,o,l,f){const y=this.expression.evaluate({zoom:0},l,f);this._setPaintValue(t,o,y)}_setPaintValue(t,o,l){if(this.type==="color"){const f=up(l);for(let y=t;y`u_${b}_t`),this.type=l,this.useIntegerZoom=f,this.zoom=y,this.maxValue=0,this.paintVertexAttributes=o.map(b=>({name:`a_${b}`,type:"Float32",components:l==="color"?4:2,offset:0})),this.paintVertexArray=new x}populatePaintArray(t,o,l,f,y){const x=this.expression.evaluate(new xi(this.zoom),o,{},f,[],y),b=this.expression.evaluate(new xi(this.zoom+1),o,{},f,[],y),E=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(E,t,x,b)}updatePaintArray(t,o,l,f){const y=this.expression.evaluate({zoom:this.zoom},l,f),x=this.expression.evaluate({zoom:this.zoom+1},l,f);this._setPaintValue(t,o,y,x)}_setPaintValue(t,o,l,f){if(this.type==="color"){const y=up(l),x=up(f);for(let b=t;b`#define HAS_UNIFORM_${f}`))}return t}getBinderAttributes(){const t=[];for(const o in this.binders){const l=this.binders[o];if(l instanceof Qo||l instanceof ao)for(let f=0;f!0){this.programConfigurations={};for(const f of t)this.programConfigurations[f.id]=new by(f,o,l);this.needsUpload=!1,this._featureMap=new Ls,this._bufferOffset=0}populatePaintArrays(t,o,l,f,y,x){for(const b in this.programConfigurations)this.programConfigurations[b].populatePaintArrays(t,o,f,y,x);o.id!==void 0&&this._featureMap.add(o.id,l,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,o,l,f){for(const y of l)this.needsUpload=this.programConfigurations[y.id].updatePaintArrays(t,this._featureMap,o,y,f)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const o in this.programConfigurations)this.programConfigurations[o].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}function kw(r,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-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"]}[r]||[r.replace(`${t}-`,"").replace(/-/g,"_")]}function wy(r,t,o){const l={color:{source:Y,composite:kt},number:{source:et,composite:Y}},f=function(y){return{"line-pattern":{source:yr,composite:yr},"fill-pattern":{source:yr,composite:yr},"fill-extrusion-pattern":{source:yr,composite:yr}}[y]}(r);return f&&f[o]||l[t][o]}mt("ConstantBinder",pu),mt("CrossFadedConstantBinder",Bl),mt("SourceExpressionBinder",Qo),mt("CrossFadedCompositeBinder",Ps),mt("CompositeExpressionBinder",ao),mt("ProgramConfiguration",by,{omit:["_buffers"]}),mt("ProgramConfigurationSet",Ca);const er=8192,hp=Math.pow(2,14)-1,Ey=-hp-1;function Aa(r){const t=er/r.extent,o=r.loadGeometry();for(let l=0;lx.x+1||Ex.y+1)&&De("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return o}function Ma(r,t){return{type:r.type,id:r.id,properties:r.properties,geometry:t?Aa(r):[]}}function rd(r,t,o,l,f){r.emplaceBack(2*t+(l+1)/2,2*o+(f+1)/2)}class dp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(o=>o.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Pl,this.indexArray=new dr,this.segments=new sr,this.programConfigurations=new Ca(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(t,o,l){const f=this.layers[0],y=[];let x=null,b=!1;f.type==="circle"&&(x=f.layout.get("circle-sort-key"),b=!x.isConstant());for(const{feature:E,id:C,index:L,sourceLayerIndex:D}of t){const B=this.layers[0]._featureFilter.needGeometry,V=Ma(E,B);if(!this.layers[0]._featureFilter.filter(new xi(this.zoom),V,l))continue;const $=b?x.evaluate(V,{},l):void 0,G={id:C,properties:E.properties,type:E.type,sourceLayerIndex:D,index:L,geometry:B?V.geometry:Aa(E),patterns:{},sortKey:$};y.push(G)}b&&y.sort((E,C)=>E.sortKey-C.sortKey);for(const E of y){const{geometry:C,index:L,sourceLayerIndex:D}=E,B=t[L].feature;this.addFeature(E,C,L,l),o.featureIndex.insert(B,C,L,D,this.index)}}update(t,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,o,this.stateDependentLayers,l)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,uu),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,o,l,f){for(const y of o)for(const x of y){const b=x.x,E=x.y;if(b<0||b>=er||E<0||E>=er)continue;const C=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),L=C.vertexLength;rd(this.layoutVertexArray,b,E,-1,-1),rd(this.layoutVertexArray,b,E,1,-1),rd(this.layoutVertexArray,b,E,1,1),rd(this.layoutVertexArray,b,E,-1,1),this.indexArray.emplaceBack(L,L+1,L+2),this.indexArray.emplaceBack(L,L+3,L+2),C.vertexLength+=4,C.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,{},f)}}function Sy(r,t){for(let o=0;o1){if(fp(r,t))return!0;for(let l=0;l1?o:o.sub(t)._mult(f)._add(t))}function Cy(r,t){let o,l,f,y=!1;for(let x=0;xt.y!=f.y>t.y&&t.x<(f.x-l.x)*(t.y-l.y)/(f.y-l.y)+l.x&&(y=!y)}return y}function Fl(r,t){let o=!1;for(let l=0,f=r.length-1;lt.y!=x.y>t.y&&t.x<(x.x-y.x)*(t.y-y.y)/(x.y-y.y)+y.x&&(o=!o)}return o}function Dw(r,t,o){const l=o[0],f=o[2];if(r.xf.x&&t.x>f.x||r.yf.y&&t.y>f.y)return!1;const y=Ge(r,t,o[0]);return y!==Ge(r,t,o[1])||y!==Ge(r,t,o[2])||y!==Ge(r,t,o[3])}function mu(r,t,o){const l=t.paint.get(r).value;return l.kind==="constant"?l.value:o.programConfigurations.get(t.id).getMaxValue(r)}function nd(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function od(r,t,o,l,f){if(!t[0]&&!t[1])return r;const y=A.convert(t)._mult(f);o==="viewport"&&y._rotate(-l);const x=[];for(let b=0;bLy(Q,G))}(C,E),V=D?L*b:L;for(const $ of f)for(const G of $){const Q=D?G:Ly(G,E);let oe=V;const we=sd([],[G.x,G.y,0,1],E);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?oe*=we[3]/x.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(oe*=x.cameraToCenterDistance/we[3]),Lw(B,Q,oe))return!0}return!1}}function Ly(r,t){const o=sd([],[r.x,r.y,0,1],t);return new A(o[0]/o[3],o[1]/o[3])}class Py extends dp{}let zy;mt("HeatmapBucket",Py,{omit:["layers"]});var Fw={get paint(){return zy=zy||new d({"heatmap-radius":new Ct(ae.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ct(ae.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new bt(ae.paint_heatmap["heatmap-intensity"]),"heatmap-color":new a(ae.paint_heatmap["heatmap-color"]),"heatmap-opacity":new bt(ae.paint_heatmap["heatmap-opacity"])})}};function gp(r,{width:t,height:o},l,f){if(f){if(f instanceof Uint8ClampedArray)f=new Uint8Array(f.buffer);else if(f.length!==t*o*l)throw new RangeError(`mismatched image size. expected: ${f.length} but got: ${t*o*l}`)}else f=new Uint8Array(t*o*l);return r.width=t,r.height=o,r.data=f,r}function Dy(r,{width:t,height:o},l){if(t===r.width&&o===r.height)return;const f=gp({},{width:t,height:o},l);yp(r,f,{x:0,y:0},{x:0,y:0},{width:Math.min(r.width,t),height:Math.min(r.height,o)},l),r.width=t,r.height=o,r.data=f.data}function yp(r,t,o,l,f,y){if(f.width===0||f.height===0)return t;if(f.width>r.width||f.height>r.height||o.x>r.width-f.width||o.y>r.height-f.height)throw new RangeError("out of range source coordinates for image copy");if(f.width>t.width||f.height>t.height||l.x>t.width-f.width||l.y>t.height-f.height)throw new RangeError("out of range destination coordinates for image copy");const x=r.data,b=t.data;if(x===b)throw new Error("srcData equals dstData, so image is already copied");for(let E=0;E{t[r.evaluationKey]=E;const C=r.expression.evaluate(t);f.data[x+b+0]=Math.floor(255*C.r/C.a),f.data[x+b+1]=Math.floor(255*C.g/C.a),f.data[x+b+2]=Math.floor(255*C.b/C.a),f.data[x+b+3]=Math.floor(255*C.a)};if(r.clips)for(let x=0,b=0;x80*o){l=y=r[0],f=x=r[1];for(var $=o;$y&&(y=b),E>x&&(x=E);C=(C=Math.max(y-l,x-f))!==0?32767/C:0}return _u(B,V,o,l,f,C,0),V}function By(r,t,o,l,f){var y,x;if(f===bp(r,t,o,l)>0)for(y=t;y=t;y-=l)x=Ny(y,r[y],r[y+1],x);return x&&ld(x,x.next)&&(xu(x),x=x.next),x}function ka(r,t){if(!r)return r;t||(t=r);var o,l=r;do if(o=!1,l.steiner||!ld(l,l.next)&&Ki(l.prev,l,l.next)!==0)l=l.next;else{if(xu(l),(l=t=l.prev)===l.next)break;o=!0}while(o||l!==t);return t}function _u(r,t,o,l,f,y,x){if(r){!x&&y&&function(L,D,B,V){var $=L;do $.z===0&&($.z=vp($.x,$.y,D,B,V)),$.prevZ=$.prev,$.nextZ=$.next,$=$.next;while($!==L);$.prevZ.nextZ=null,$.prevZ=null,function(G){var Q,oe,we,he,xe,ze,qe,st,Tt=1;do{for(oe=G,G=null,xe=null,ze=0;oe;){for(ze++,we=oe,qe=0,Q=0;Q0||st>0&&we;)qe!==0&&(st===0||!we||oe.z<=we.z)?(he=oe,oe=oe.nextZ,qe--):(he=we,we=we.nextZ,st--),xe?xe.nextZ=he:G=he,he.prevZ=xe,xe=he;oe=we}xe.nextZ=null,Tt*=2}while(ze>1)}($)}(r,l,f,y);for(var b,E,C=r;r.prev!==r.next;)if(b=r.prev,E=r.next,y?Hw(r,l,f,y):qw(r))t.push(b.i/o|0),t.push(r.i/o|0),t.push(E.i/o|0),xu(r),r=E.next,C=E.next;else if((r=E)===C){x?x===1?_u(r=Gw(ka(r),t,o),t,o,l,f,y,2):x===2&&Zw(r,t,o,l,f,y):_u(ka(r),t,o,l,f,y,1);break}}}function qw(r){var t=r.prev,o=r,l=r.next;if(Ki(t,o,l)>=0)return!1;for(var f=t.x,y=o.x,x=l.x,b=t.y,E=o.y,C=l.y,L=fy?f>x?f:x:y>x?y:x,V=b>E?b>C?b:C:E>C?E:C,$=l.next;$!==t;){if($.x>=L&&$.x<=B&&$.y>=D&&$.y<=V&&Nl(f,b,y,E,x,C,$.x,$.y)&&Ki($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function Hw(r,t,o,l){var f=r.prev,y=r,x=r.next;if(Ki(f,y,x)>=0)return!1;for(var b=f.x,E=y.x,C=x.x,L=f.y,D=y.y,B=x.y,V=bE?b>C?b:C:E>C?E:C,Q=L>D?L>B?L:B:D>B?D:B,oe=vp(V,$,t,o,l),we=vp(G,Q,t,o,l),he=r.prevZ,xe=r.nextZ;he&&he.z>=oe&&xe&&xe.z<=we;){if(he.x>=V&&he.x<=G&&he.y>=$&&he.y<=Q&&he!==f&&he!==x&&Nl(b,L,E,D,C,B,he.x,he.y)&&Ki(he.prev,he,he.next)>=0||(he=he.prevZ,xe.x>=V&&xe.x<=G&&xe.y>=$&&xe.y<=Q&&xe!==f&&xe!==x&&Nl(b,L,E,D,C,B,xe.x,xe.y)&&Ki(xe.prev,xe,xe.next)>=0))return!1;xe=xe.nextZ}for(;he&&he.z>=oe;){if(he.x>=V&&he.x<=G&&he.y>=$&&he.y<=Q&&he!==f&&he!==x&&Nl(b,L,E,D,C,B,he.x,he.y)&&Ki(he.prev,he,he.next)>=0)return!1;he=he.prevZ}for(;xe&&xe.z<=we;){if(xe.x>=V&&xe.x<=G&&xe.y>=$&&xe.y<=Q&&xe!==f&&xe!==x&&Nl(b,L,E,D,C,B,xe.x,xe.y)&&Ki(xe.prev,xe,xe.next)>=0)return!1;xe=xe.nextZ}return!0}function Gw(r,t,o){var l=r;do{var f=l.prev,y=l.next.next;!ld(f,y)&&Fy(f,l,l.next,y)&&vu(f,y)&&vu(y,f)&&(t.push(f.i/o|0),t.push(l.i/o|0),t.push(y.i/o|0),xu(l),xu(l.next),l=r=y),l=l.next}while(l!==r);return ka(l)}function Zw(r,t,o,l,f,y){var x=r;do{for(var b=x.next.next;b!==x.prev;){if(x.i!==b.i&&Yw(x,b)){var E=Vy(x,b);return x=ka(x,x.next),E=ka(E,E.next),_u(x,t,o,l,f,y,0),void _u(E,t,o,l,f,y,0)}b=b.next}x=x.next}while(x!==r)}function Ww(r,t){return r.x-t.x}function Xw(r,t){var o=function(f,y){var x,b=y,E=f.x,C=f.y,L=-1/0;do{if(C<=b.y&&C>=b.next.y&&b.next.y!==b.y){var D=b.x+(C-b.y)*(b.next.x-b.x)/(b.next.y-b.y);if(D<=E&&D>L&&(L=D,x=b.x=b.x&&b.x>=$&&E!==b.x&&Nl(Cx.x||b.x===x.x&&Kw(x,b)))&&(x=b,Q=B)),b=b.next;while(b!==V);return x}(r,t);if(!o)return t;var l=Vy(o,r);return ka(l,l.next),ka(o,o.next)}function Kw(r,t){return Ki(r.prev,r,t.prev)<0&&Ki(t.next,r,r.next)<0}function vp(r,t,o,l,f){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=(r-o)*f|0)|r<<8))|r<<4))|r<<2))|r<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-l)*f|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Jw(r){var t=r,o=r;do(t.x=(r-x)*(y-b)&&(r-x)*(l-b)>=(o-x)*(t-b)&&(o-x)*(y-b)>=(f-x)*(l-b)}function Yw(r,t){return r.next.i!==t.i&&r.prev.i!==t.i&&!function(o,l){var f=o;do{if(f.i!==o.i&&f.next.i!==o.i&&f.i!==l.i&&f.next.i!==l.i&&Fy(f,f.next,o,l))return!0;f=f.next}while(f!==o);return!1}(r,t)&&(vu(r,t)&&vu(t,r)&&function(o,l){var f=o,y=!1,x=(o.x+l.x)/2,b=(o.y+l.y)/2;do f.y>b!=f.next.y>b&&f.next.y!==f.y&&x<(f.next.x-f.x)*(b-f.y)/(f.next.y-f.y)+f.x&&(y=!y),f=f.next;while(f!==o);return y}(r,t)&&(Ki(r.prev,r,t.prev)||Ki(r,t.prev,t))||ld(r,t)&&Ki(r.prev,r,r.next)>0&&Ki(t.prev,t,t.next)>0)}function Ki(r,t,o){return(t.y-r.y)*(o.x-t.x)-(t.x-r.x)*(o.y-t.y)}function ld(r,t){return r.x===t.x&&r.y===t.y}function Fy(r,t,o,l){var f=ud(Ki(r,t,o)),y=ud(Ki(r,t,l)),x=ud(Ki(o,l,r)),b=ud(Ki(o,l,t));return f!==y&&x!==b||!(f!==0||!cd(r,o,t))||!(y!==0||!cd(r,l,t))||!(x!==0||!cd(o,r,l))||!(b!==0||!cd(o,t,l))}function cd(r,t,o){return t.x<=Math.max(r.x,o.x)&&t.x>=Math.min(r.x,o.x)&&t.y<=Math.max(r.y,o.y)&&t.y>=Math.min(r.y,o.y)}function ud(r){return r>0?1:r<0?-1:0}function vu(r,t){return Ki(r.prev,r,r.next)<0?Ki(r,t,r.next)>=0&&Ki(r,r.prev,t)>=0:Ki(r,t,r.prev)<0||Ki(r,r.next,t)<0}function Vy(r,t){var o=new xp(r.i,r.x,r.y),l=new xp(t.i,t.x,t.y),f=r.next,y=t.prev;return r.next=t,t.prev=r,o.next=f,f.prev=o,l.next=o,o.prev=l,y.next=l,l.prev=y,l}function Ny(r,t,o,l){var f=new xp(r,t,o);return l?(f.next=l.next,f.prev=l,l.next.prev=f,l.next=f):(f.prev=f,f.next=f),f}function xu(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function xp(r,t,o){this.i=r,this.x=t,this.y=o,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function bp(r,t,o,l){for(var f=0,y=t,x=o-l;y0&&o.holes.push(l+=r[f-1].length)}return o};var jy=I(_p.exports);function wp(r,t,o){const l=o.patternDependencies;let f=!1;for(const y of t){const x=y.paint.get(`${r}-pattern`);x.isConstant()||(f=!0);const b=x.constantOr(null);b&&(f=!0,l[b.to]=!0,l[b.from]=!0)}return f}function Ep(r,t,o,l,f){const y=f.patternDependencies;for(const x of t){const b=x.paint.get(`${r}-pattern`).value;if(b.kind!=="constant"){let E=b.evaluate({zoom:l-1},o,{},f.availableImages),C=b.evaluate({zoom:l},o,{},f.availableImages),L=b.evaluate({zoom:l+1},o,{},f.availableImages);E=E&&E.name?E.name:E,C=C&&C.name?C.name:C,L=L&&L.name?L.name:L,y[E]=!0,y[C]=!0,y[L]=!0,o.patterns[x.id]={min:E,mid:C,max:L}}}return o}class Sp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(o=>o.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new As,this.indexArray=new dr,this.indexArray2=new Bi,this.programConfigurations=new Ca(t.layers,t.zoom),this.segments=new sr,this.segments2=new sr,this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(t,o,l){this.hasPattern=wp("fill",this.layers,o);const f=this.layers[0].layout.get("fill-sort-key"),y=!f.isConstant(),x=[];for(const{feature:b,id:E,index:C,sourceLayerIndex:L}of t){const D=this.layers[0]._featureFilter.needGeometry,B=Ma(b,D);if(!this.layers[0]._featureFilter.filter(new xi(this.zoom),B,l))continue;const V=y?f.evaluate(B,{},l,o.availableImages):void 0,$={id:E,properties:b.properties,type:b.type,sourceLayerIndex:L,index:C,geometry:D?B.geometry:Aa(b),patterns:{},sortKey:V};x.push($)}y&&x.sort((b,E)=>b.sortKey-E.sortKey);for(const b of x){const{geometry:E,index:C,sourceLayerIndex:L}=b;if(this.hasPattern){const D=Ep("fill",this.layers,b,this.zoom,o);this.patternFeatures.push(D)}else this.addFeature(b,E,C,l,{});o.featureIndex.insert(t[C].feature,E,C,L,this.index)}}update(t,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,o,this.stateDependentLayers,l)}addFeatures(t,o,l){for(const f of this.patternFeatures)this.addFeature(f,f.geometry,f.index,o,l)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Uw),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,o,l,f,y){for(const x of ul(o,500)){let b=0;for(const V of x)b+=V.length;const E=this.segments.prepareSegment(b,this.layoutVertexArray,this.indexArray),C=E.vertexLength,L=[],D=[];for(const V of x){if(V.length===0)continue;V!==x[0]&&D.push(L.length/2);const $=this.segments2.prepareSegment(V.length,this.layoutVertexArray,this.indexArray2),G=$.vertexLength;this.layoutVertexArray.emplaceBack(V[0].x,V[0].y),this.indexArray2.emplaceBack(G+V.length-1,G),L.push(V[0].x),L.push(V[0].y);for(let Q=1;Q>3}if(f--,l===1||l===2)y+=r.readSVarint(),x+=r.readSVarint(),l===1&&(t&&b.push(t),t=[]),t.push(new n2(y,x));else{if(l!==7)throw new Error("unknown command "+l);t&&t.push(t[0].clone())}}return t&&b.push(t),b},jl.prototype.bbox=function(){var r=this._pbf;r.pos=this._geometry;for(var t=r.readVarint()+r.pos,o=1,l=0,f=0,y=0,x=1/0,b=-1/0,E=1/0,C=-1/0;r.pos>3}if(l--,o===1||o===2)(f+=r.readSVarint())b&&(b=f),(y+=r.readSVarint())C&&(C=y);else if(o!==7)throw new Error("unknown command "+o)}return[x,E,b,C]},jl.prototype.toGeoJSON=function(r,t,o){var l,f,y=this.extent*Math.pow(2,o),x=this.extent*r,b=this.extent*t,E=this.loadGeometry(),C=jl.types[this.type];function L(V){for(var $=0;$>3;f=x===1?l.readString():x===2?l.readFloat():x===3?l.readDouble():x===4?l.readVarint64():x===5?l.readVarint():x===6?l.readSVarint():x===7?l.readBoolean():null}return f}(o))}Gy.prototype.feature=function(r){if(r<0||r>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[r];var t=this._pbf.readVarint()+this._pbf.pos;return new a2(this._pbf,t,this.extent,this._keys,this._values)};var c2=Hy;function u2(r,t,o){if(r===3){var l=new c2(o,o.readVarint()+o.pos);l.length&&(t[l.name]=l)}}zs.VectorTile=function(r,t){this.layers=r.readFields(u2,{},t)},zs.VectorTileFeature=qy,zs.VectorTileLayer=Hy;const h2=zs.VectorTileFeature.types,Ip=Math.pow(2,13);function bu(r,t,o,l,f,y,x,b){r.emplaceBack(t,o,2*Math.floor(l*Ip)+x,f*Ip*2,y*Ip*2,Math.round(b))}class Tp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(o=>o.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Yo,this.centroidVertexArray=new Jo,this.indexArray=new dr,this.programConfigurations=new Ca(t.layers,t.zoom),this.segments=new sr,this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(t,o,l){this.features=[],this.hasPattern=wp("fill-extrusion",this.layers,o);for(const{feature:f,id:y,index:x,sourceLayerIndex:b}of t){const E=this.layers[0]._featureFilter.needGeometry,C=Ma(f,E);if(!this.layers[0]._featureFilter.filter(new xi(this.zoom),C,l))continue;const L={id:y,sourceLayerIndex:b,index:x,geometry:E?C.geometry:Aa(f),properties:f.properties,type:f.type,patterns:{}};this.hasPattern?this.features.push(Ep("fill-extrusion",this.layers,L,this.zoom,o)):this.addFeature(L,L.geometry,x,l,{}),o.featureIndex.insert(f,L.geometry,x,b,this.index,!0)}}addFeatures(t,o,l){for(const f of this.features){const{geometry:y}=f;this.addFeature(f,y,f.index,o,l)}}update(t,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,o,this.stateDependentLayers,l)}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,r2),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,i2.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,o,l,f,y){for(const x of ul(o,500)){const b={x:0,y:0,vertexCount:0};let E=0;for(const $ of x)E+=$.length;let C=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const $ of x){if($.length===0||f2($))continue;let G=0;for(let Q=0;Q<$.length;Q++){const oe=$[Q];if(Q>=1){const we=$[Q-1];if(!d2(oe,we)){C.vertexLength+4>sr.MAX_VERTEX_ARRAY_LENGTH&&(C=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const he=oe.sub(we)._perp()._unit(),xe=we.dist(oe);G+xe>32768&&(G=0),bu(this.layoutVertexArray,oe.x,oe.y,he.x,he.y,0,0,G),bu(this.layoutVertexArray,oe.x,oe.y,he.x,he.y,0,1,G),b.x+=2*oe.x,b.y+=2*oe.y,b.vertexCount+=2,G+=xe,bu(this.layoutVertexArray,we.x,we.y,he.x,he.y,0,0,G),bu(this.layoutVertexArray,we.x,we.y,he.x,he.y,0,1,G),b.x+=2*we.x,b.y+=2*we.y,b.vertexCount+=2;const ze=C.vertexLength;this.indexArray.emplaceBack(ze,ze+2,ze+1),this.indexArray.emplaceBack(ze+1,ze+2,ze+3),C.vertexLength+=4,C.primitiveLength+=2}}}}if(C.vertexLength+E>sr.MAX_VERTEX_ARRAY_LENGTH&&(C=this.segments.prepareSegment(E,this.layoutVertexArray,this.indexArray)),h2[t.type]!=="Polygon")continue;const L=[],D=[],B=C.vertexLength;for(const $ of x)if($.length!==0){$!==x[0]&&D.push(L.length/2);for(let G=0;G<$.length;G++){const Q=$[G];bu(this.layoutVertexArray,Q.x,Q.y,0,0,1,1,0),b.x+=Q.x,b.y+=Q.y,b.vertexCount+=1,L.push(Q.x),L.push(Q.y)}}const V=jy(L,D);for(let $=0;$er)||r.y===t.y&&(r.y<0||r.y>er)}function f2(r){return r.every(t=>t.x<0)||r.every(t=>t.x>er)||r.every(t=>t.y<0)||r.every(t=>t.y>er)}let Zy;mt("FillExtrusionBucket",Tp,{omit:["layers","features"]});var p2={get paint(){return Zy=Zy||new d({"fill-extrusion-opacity":new bt(ae["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ct(ae["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new bt(ae["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new bt(ae["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new _(ae["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ct(ae["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ct(ae["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new bt(ae["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class m2 extends v{constructor(t){super(t,p2)}createBucket(t){return new Tp(t)}queryRadius(){return nd(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(t,o,l,f,y,x,b,E){const C=od(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),x.angle,b),L=this.paint.get("fill-extrusion-height").evaluate(o,l),D=this.paint.get("fill-extrusion-base").evaluate(o,l),B=function($,G,Q,oe){const we=[];for(const he of $){const xe=[he.x,he.y,0,1];sd(xe,xe,G),we.push(new A(xe[0]/xe[3],xe[1]/xe[3]))}return we}(C,E),V=function($,G,Q,oe){const we=[],he=[],xe=oe[8]*G,ze=oe[9]*G,qe=oe[10]*G,st=oe[11]*G,Tt=oe[8]*Q,lt=oe[9]*Q,ot=oe[10]*Q,xt=oe[11]*Q;for(const gt of $){const ft=[],Fe=[];for(const wt of gt){const _t=wt.x,Pt=wt.y,_i=oe[0]*_t+oe[4]*Pt+oe[12],mi=oe[1]*_t+oe[5]*Pt+oe[13],fr=oe[2]*_t+oe[6]*Pt+oe[14],Un=oe[3]*_t+oe[7]*Pt+oe[15],Lr=fr+qe,Gi=Un+st,Qr=_i+Tt,en=mi+lt,tn=fr+ot,Zi=Un+xt,pr=new A((_i+xe)/Gi,(mi+ze)/Gi);pr.z=Lr/Gi,ft.push(pr);const Nr=new A(Qr/Zi,en/Zi);Nr.z=tn/Zi,Fe.push(Nr)}we.push(ft),he.push(Fe)}return[we,he]}(f,D,L,E);return function($,G,Q){let oe=1/0;Iy(Q,G)&&(oe=Wy(Q,G[0]));for(let we=0;weo.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(o=>{this.gradients[o.id]={}}),this.layoutVertexArray=new zl,this.layoutVertexArray2=new cu,this.indexArray=new dr,this.programConfigurations=new Ca(t.layers,t.zoom),this.segments=new sr,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(t,o,l){this.hasPattern=wp("line",this.layers,o);const f=this.layers[0].layout.get("line-sort-key"),y=!f.isConstant(),x=[];for(const{feature:b,id:E,index:C,sourceLayerIndex:L}of t){const D=this.layers[0]._featureFilter.needGeometry,B=Ma(b,D);if(!this.layers[0]._featureFilter.filter(new xi(this.zoom),B,l))continue;const V=y?f.evaluate(B,{},l):void 0,$={id:E,properties:b.properties,type:b.type,sourceLayerIndex:L,index:C,geometry:D?B.geometry:Aa(b),patterns:{},sortKey:V};x.push($)}y&&x.sort((b,E)=>b.sortKey-E.sortKey);for(const b of x){const{geometry:E,index:C,sourceLayerIndex:L}=b;if(this.hasPattern){const D=Ep("line",this.layers,b,this.zoom,o);this.patternFeatures.push(D)}else this.addFeature(b,E,C,l,{});o.featureIndex.insert(t[C].feature,E,C,L,this.index)}}update(t,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,o,this.stateDependentLayers,l)}addFeatures(t,o,l){for(const f of this.patternFeatures)this.addFeature(f,f.geometry,f.index,o,l)}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,v2)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,y2),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,o,l,f,y){const x=this.layers[0].layout,b=x.get("line-join").evaluate(t,{}),E=x.get("line-cap"),C=x.get("line-miter-limit"),L=x.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const D of o)this.addLine(D,t,b,E,C,L);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,y,f)}addLine(t,o,l,f,y,x){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let oe=0;oe=2&&t[E-1].equals(t[E-2]);)E--;let C=0;for(;C0;if(st&&oe>C){const xt=B.dist(V);if(xt>2*L){const gt=B.sub(B.sub(V)._mult(L/xt)._round());this.updateDistance(V,gt),this.addCurrentVertex(gt,G,0,0,D),V=gt}}const lt=V&&$;let ot=lt?l:b?"butt":f;if(lt&&ot==="round"&&(zey&&(ot="bevel"),ot==="bevel"&&(ze>2&&(ot="flipbevel"),ze100)we=Q.mult(-1);else{const xt=ze*G.add(Q).mag()/G.sub(Q).mag();we._perp()._mult(xt*(Tt?-1:1))}this.addCurrentVertex(B,we,0,0,D),this.addCurrentVertex(B,we.mult(-1),0,0,D)}else if(ot==="bevel"||ot==="fakeround"){const xt=-Math.sqrt(ze*ze-1),gt=Tt?xt:0,ft=Tt?0:xt;if(V&&this.addCurrentVertex(B,G,gt,ft,D),ot==="fakeround"){const Fe=Math.round(180*qe/Math.PI/20);for(let wt=1;wt2*L){const gt=B.add($.sub(B)._mult(L/xt)._round());this.updateDistance(B,gt),this.addCurrentVertex(gt,Q,0,0,D),B=gt}}}}addCurrentVertex(t,o,l,f,y,x=!1){const b=o.y*f-o.x,E=-o.y-o.x*f;this.addHalfVertex(t,o.x+o.y*l,o.y-o.x*l,x,!1,l,y),this.addHalfVertex(t,b,E,x,!0,-f,y),this.distance>Xy/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,o,l,f,y,x))}addHalfVertex({x:t,y:o},l,f,y,x,b,E){const C=.5*(this.lineClips?this.scaledDistance*(Xy-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(y?1:0),(o<<1)+(x?1:0),Math.round(63*l)+128,Math.round(63*f)+128,1+(b===0?0:b<0?-1:1)|(63&C)<<2,C>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const L=E.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,L),E.primitiveLength++),x?this.e2=L:this.e1=L}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,o){this.distance+=t.dist(o),this.updateScaledDistance()}}let Ky,Jy;mt("LineBucket",Cp,{omit:["layers","patternFeatures"]});var Yy={get paint(){return Jy=Jy||new d({"line-opacity":new Ct(ae.paint_line["line-opacity"]),"line-color":new Ct(ae.paint_line["line-color"]),"line-translate":new bt(ae.paint_line["line-translate"]),"line-translate-anchor":new bt(ae.paint_line["line-translate-anchor"]),"line-width":new Ct(ae.paint_line["line-width"]),"line-gap-width":new Ct(ae.paint_line["line-gap-width"]),"line-offset":new Ct(ae.paint_line["line-offset"]),"line-blur":new Ct(ae.paint_line["line-blur"]),"line-dasharray":new i(ae.paint_line["line-dasharray"]),"line-pattern":new _(ae.paint_line["line-pattern"]),"line-gradient":new a(ae.paint_line["line-gradient"])})},get layout(){return Ky=Ky||new d({"line-cap":new bt(ae.layout_line["line-cap"]),"line-join":new Ct(ae.layout_line["line-join"]),"line-miter-limit":new bt(ae.layout_line["line-miter-limit"]),"line-round-limit":new bt(ae.layout_line["line-round-limit"]),"line-sort-key":new Ct(ae.layout_line["line-sort-key"])})}};class w2 extends Ct{possiblyEvaluate(t,o){return o=new xi(Math.floor(o.zoom),{now:o.now,fadeDuration:o.fadeDuration,zoomHistory:o.zoomHistory,transition:o.transition}),super.possiblyEvaluate(t,o)}evaluate(t,o,l,f){return o=Se({},o,{zoom:Math.floor(o.zoom)}),super.evaluate(t,o,l,f)}}let hd;class E2 extends v{constructor(t){super(t,Yy),this.gradientVersion=0,hd||(hd=new w2(Yy.paint.properties["line-width"].specification),hd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){const o=this.gradientExpression();this.stepInterpolant=!!function(l){return l._styleExpression!==void 0}(o)&&o._styleExpression.expression instanceof ua,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,o){super.recalculate(t,o),this.paint._values["line-floorwidth"]=hd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Cp(t)}queryRadius(t){const o=t,l=Qy(mu("line-width",this,o),mu("line-gap-width",this,o)),f=mu("line-offset",this,o);return l/2+Math.abs(f)+nd(this.paint.get("line-translate"))}queryIntersectsFeature(t,o,l,f,y,x,b){const E=od(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),x.angle,b),C=b/2*Qy(this.paint.get("line-width").evaluate(o,l),this.paint.get("line-gap-width").evaluate(o,l)),L=this.paint.get("line-offset").evaluate(o,l);return L&&(f=function(D,B){const V=[];for(let $=0;$=3){for(let Q=0;Q0?t+2*r:r}const S2=P([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),I2=P([{name:"a_projected_pos",components:3,type:"Float32"}],4);P([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const T2=P([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);P([{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 e_=P([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),C2=P([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function A2(r,t,o){return r.sections.forEach(l=>{l.text=function(f,y,x){const b=y.layout.get("text-transform").evaluate(x,{});return b==="uppercase"?f=f.toLocaleUpperCase():b==="lowercase"&&(f=f.toLocaleLowerCase()),wo.applyArabicShaping&&(f=wo.applyArabicShaping(f)),f}(l.text,t,o)}),r}P([{name:"triangle",components:3,type:"Uint16"}]),P([{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"}]),P([{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"}]),P([{type:"Float32",name:"offsetX"}]),P([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),P([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Eu={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var ar=24,t_=pi,i_=function(r,t,o,l,f){var y,x,b=8*f-l-1,E=(1<>1,L=-7,D=f-1,B=-1,V=r[t+D];for(D+=B,y=V&(1<<-L)-1,V>>=-L,L+=b;L>0;y=256*y+r[t+D],D+=B,L-=8);for(x=y&(1<<-L)-1,y>>=-L,L+=l;L>0;x=256*x+r[t+D],D+=B,L-=8);if(y===0)y=1-C;else{if(y===E)return x?NaN:1/0*(V?-1:1);x+=Math.pow(2,l),y-=C}return(V?-1:1)*x*Math.pow(2,y-l)},r_=function(r,t,o,l,f,y){var x,b,E,C=8*y-f-1,L=(1<>1,B=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,V=0,$=1,G=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(b=isNaN(t)?1:0,x=L):(x=Math.floor(Math.log(t)/Math.LN2),t*(E=Math.pow(2,-x))<1&&(x--,E*=2),(t+=x+D>=1?B/E:B*Math.pow(2,1-D))*E>=2&&(x++,E/=2),x+D>=L?(b=0,x=L):x+D>=1?(b=(t*E-1)*Math.pow(2,f),x+=D):(b=t*Math.pow(2,D-1)*Math.pow(2,f),x=0));f>=8;r[o+V]=255&b,V+=$,b/=256,f-=8);for(x=x<0;r[o+V]=255&x,V+=$,x/=256,C-=8);r[o+V-$]|=128*G};function pi(r){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(r)?r:new Uint8Array(r||0),this.pos=0,this.type=0,this.length=this.buf.length}pi.Varint=0,pi.Fixed64=1,pi.Bytes=2,pi.Fixed32=5;var Ap=4294967296,n_=1/Ap,o_=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function es(r){return r.type===pi.Bytes?r.readVarint()+r.pos:r.pos+1}function $l(r,t,o){return o?4294967296*t+(r>>>0):4294967296*(t>>>0)+(r>>>0)}function s_(r,t,o){var l=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));o.realloc(l);for(var f=o.pos-1;f>=r;f--)o.buf[f+l]=o.buf[f]}function M2(r,t){for(var o=0;o>>8,r[o+2]=t>>>16,r[o+3]=t>>>24}function a_(r,t){return(r[t]|r[t+1]<<8|r[t+2]<<16)+(r[t+3]<<24)}pi.prototype={destroy:function(){this.buf=null},readFields:function(r,t,o){for(o=o||this.length;this.pos>3,y=this.pos;this.type=7&l,r(f,t,this),this.pos===y&&this.skip(l)}return t},readMessage:function(r,t){return this.readFields(r,t,this.readVarint()+this.pos)},readFixed32:function(){var r=dd(this.buf,this.pos);return this.pos+=4,r},readSFixed32:function(){var r=a_(this.buf,this.pos);return this.pos+=4,r},readFixed64:function(){var r=dd(this.buf,this.pos)+dd(this.buf,this.pos+4)*Ap;return this.pos+=8,r},readSFixed64:function(){var r=dd(this.buf,this.pos)+a_(this.buf,this.pos+4)*Ap;return this.pos+=8,r},readFloat:function(){var r=i_(this.buf,this.pos,!0,23,4);return this.pos+=4,r},readDouble:function(){var r=i_(this.buf,this.pos,!0,52,8);return this.pos+=8,r},readVarint:function(r){var t,o,l=this.buf;return t=127&(o=l[this.pos++]),o<128?t:(t|=(127&(o=l[this.pos++]))<<7,o<128?t:(t|=(127&(o=l[this.pos++]))<<14,o<128?t:(t|=(127&(o=l[this.pos++]))<<21,o<128?t:function(f,y,x){var b,E,C=x.buf;if(b=(112&(E=C[x.pos++]))>>4,E<128||(b|=(127&(E=C[x.pos++]))<<3,E<128)||(b|=(127&(E=C[x.pos++]))<<10,E<128)||(b|=(127&(E=C[x.pos++]))<<17,E<128)||(b|=(127&(E=C[x.pos++]))<<24,E<128)||(b|=(1&(E=C[x.pos++]))<<31,E<128))return $l(f,b,y);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(o=l[this.pos]))<<28,r,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var r=this.readVarint();return r%2==1?(r+1)/-2:r/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var r=this.readVarint()+this.pos,t=this.pos;return this.pos=r,r-t>=12&&o_?function(o,l,f){return o_.decode(o.subarray(l,f))}(this.buf,t,r):function(o,l,f){for(var y="",x=l;x239?4:L>223?3:L>191?2:1;if(x+B>f)break;B===1?L<128&&(D=L):B===2?(192&(b=o[x+1]))==128&&(D=(31&L)<<6|63&b)<=127&&(D=null):B===3?(E=o[x+2],(192&(b=o[x+1]))==128&&(192&E)==128&&((D=(15&L)<<12|(63&b)<<6|63&E)<=2047||D>=55296&&D<=57343)&&(D=null)):B===4&&(E=o[x+2],C=o[x+3],(192&(b=o[x+1]))==128&&(192&E)==128&&(192&C)==128&&((D=(15&L)<<18|(63&b)<<12|(63&E)<<6|63&C)<=65535||D>=1114112)&&(D=null)),D===null?(D=65533,B=1):D>65535&&(D-=65536,y+=String.fromCharCode(D>>>10&1023|55296),D=56320|1023&D),y+=String.fromCharCode(D),x+=B}return y}(this.buf,t,r)},readBytes:function(){var r=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,r);return this.pos=r,t},readPackedVarint:function(r,t){if(this.type!==pi.Bytes)return r.push(this.readVarint(t));var o=es(this);for(r=r||[];this.pos127;);else if(t===pi.Bytes)this.pos=this.readVarint()+this.pos;else if(t===pi.Fixed32)this.pos+=4;else{if(t!==pi.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(r,t){this.writeVarint(r<<3|t)},realloc:function(r){for(var t=this.length||16;t268435455||r<0?function(t,o){var l,f;if(t>=0?(l=t%4294967296|0,f=t/4294967296|0):(f=~(-t/4294967296),4294967295^(l=~(-t%4294967296))?l=l+1|0:(l=0,f=f+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");o.realloc(10),function(y,x,b){b.buf[b.pos++]=127&y|128,y>>>=7,b.buf[b.pos++]=127&y|128,y>>>=7,b.buf[b.pos++]=127&y|128,y>>>=7,b.buf[b.pos++]=127&y|128,b.buf[b.pos]=127&(y>>>=7)}(l,0,o),function(y,x){var b=(7&y)<<4;x.buf[x.pos++]|=b|((y>>>=3)?128:0),y&&(x.buf[x.pos++]=127&y|((y>>>=7)?128:0),y&&(x.buf[x.pos++]=127&y|((y>>>=7)?128:0),y&&(x.buf[x.pos++]=127&y|((y>>>=7)?128:0),y&&(x.buf[x.pos++]=127&y|((y>>>=7)?128:0),y&&(x.buf[x.pos++]=127&y)))))}(f,o)}(r,this):(this.realloc(4),this.buf[this.pos++]=127&r|(r>127?128:0),r<=127||(this.buf[this.pos++]=127&(r>>>=7)|(r>127?128:0),r<=127||(this.buf[this.pos++]=127&(r>>>=7)|(r>127?128:0),r<=127||(this.buf[this.pos++]=r>>>7&127))))},writeSVarint:function(r){this.writeVarint(r<0?2*-r-1:2*r)},writeBoolean:function(r){this.writeVarint(!!r)},writeString:function(r){r=String(r),this.realloc(4*r.length),this.pos++;var t=this.pos;this.pos=function(l,f,y){for(var x,b,E=0;E55295&&x<57344){if(!b){x>56319||E+1===f.length?(l[y++]=239,l[y++]=191,l[y++]=189):b=x;continue}if(x<56320){l[y++]=239,l[y++]=191,l[y++]=189,b=x;continue}x=b-55296<<10|x-56320|65536,b=null}else b&&(l[y++]=239,l[y++]=191,l[y++]=189,b=null);x<128?l[y++]=x:(x<2048?l[y++]=x>>6|192:(x<65536?l[y++]=x>>12|224:(l[y++]=x>>18|240,l[y++]=x>>12&63|128),l[y++]=x>>6&63|128),l[y++]=63&x|128)}return y}(this.buf,r,this.pos);var o=this.pos-t;o>=128&&s_(t,o,this),this.pos=t-1,this.writeVarint(o),this.pos+=o},writeFloat:function(r){this.realloc(4),r_(this.buf,r,this.pos,!0,23,4),this.pos+=4},writeDouble:function(r){this.realloc(8),r_(this.buf,r,this.pos,!0,52,8),this.pos+=8},writeBytes:function(r){var t=r.length;this.writeVarint(t),this.realloc(t);for(var o=0;o=128&&s_(o,l,this),this.pos=o-1,this.writeVarint(l),this.pos+=l},writeMessage:function(r,t,o){this.writeTag(r,pi.Bytes),this.writeRawMessage(t,o)},writePackedVarint:function(r,t){t.length&&this.writeMessage(r,M2,t)},writePackedSVarint:function(r,t){t.length&&this.writeMessage(r,k2,t)},writePackedBoolean:function(r,t){t.length&&this.writeMessage(r,z2,t)},writePackedFloat:function(r,t){t.length&&this.writeMessage(r,L2,t)},writePackedDouble:function(r,t){t.length&&this.writeMessage(r,P2,t)},writePackedFixed32:function(r,t){t.length&&this.writeMessage(r,D2,t)},writePackedSFixed32:function(r,t){t.length&&this.writeMessage(r,R2,t)},writePackedFixed64:function(r,t){t.length&&this.writeMessage(r,O2,t)},writePackedSFixed64:function(r,t){t.length&&this.writeMessage(r,B2,t)},writeBytesField:function(r,t){this.writeTag(r,pi.Bytes),this.writeBytes(t)},writeFixed32Field:function(r,t){this.writeTag(r,pi.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(r,t){this.writeTag(r,pi.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(r,t){this.writeTag(r,pi.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(r,t){this.writeTag(r,pi.Fixed64),this.writeSFixed64(t)},writeVarintField:function(r,t){this.writeTag(r,pi.Varint),this.writeVarint(t)},writeSVarintField:function(r,t){this.writeTag(r,pi.Varint),this.writeSVarint(t)},writeStringField:function(r,t){this.writeTag(r,pi.Bytes),this.writeString(t)},writeFloatField:function(r,t){this.writeTag(r,pi.Fixed32),this.writeFloat(t)},writeDoubleField:function(r,t){this.writeTag(r,pi.Fixed64),this.writeDouble(t)},writeBooleanField:function(r,t){this.writeVarintField(r,!!t)}};var Mp=I(t_);const kp=3;function F2(r,t,o){r===1&&o.readMessage(V2,t)}function V2(r,t,o){if(r===3){const{id:l,bitmap:f,width:y,height:x,left:b,top:E,advance:C}=o.readMessage(N2,{});t.push({id:l,bitmap:new yu({width:y+2*kp,height:x+2*kp},f),metrics:{width:y,height:x,left:b,top:E,advance:C}})}}function N2(r,t,o){r===1?t.id=o.readVarint():r===2?t.bitmap=o.readBytes():r===3?t.width=o.readVarint():r===4?t.height=o.readVarint():r===5?t.left=o.readSVarint():r===6?t.top=o.readSVarint():r===7&&(t.advance=o.readVarint())}const l_=kp;function c_(r){let t=0,o=0;for(const x of r)t+=x.w*x.h,o=Math.max(o,x.w);r.sort((x,b)=>b.h-x.h);const l=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),o),h:1/0}];let f=0,y=0;for(const x of r)for(let b=l.length-1;b>=0;b--){const E=l[b];if(!(x.w>E.w||x.h>E.h)){if(x.x=E.x,x.y=E.y,y=Math.max(y,x.y+x.h),f=Math.max(f,x.x+x.w),x.w===E.w&&x.h===E.h){const C=l.pop();b=0&&l>=t&&pd[this.text.charCodeAt(l)];l--)o--;this.text=this.text.substring(t,o),this.sectionIndex=this.sectionIndex.slice(t,o)}substring(t,o){const l=new ql;return l.text=this.text.substring(t,o),l.sectionIndex=this.sectionIndex.slice(t,o),l.sections=this.sections,l}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,o)=>Math.max(t,this.sections[o].scale),0)}addTextSection(t,o){this.text+=t.text,this.sections.push(Iu.forText(t.scale,t.fontStack||o));const l=this.sections.length-1;for(let f=0;f=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function fd(r,t,o,l,f,y,x,b,E,C,L,D,B,V,$){const G=ql.fromFeature(r,f);let Q;D===m.ah.vertical&&G.verticalizePunctuation();const{processBidirectionalText:oe,processStyledBidirectionalText:we}=wo;if(oe&&G.sections.length===1){Q=[];const ze=oe(G.toString(),Pp(G,C,y,t,l,V));for(const qe of ze){const st=new ql;st.text=qe,st.sections=G.sections;for(let Tt=0;Tt0&&ts>zr&&(zr=ts)}else{const Ln=st[oi.fontStack],_r=Ln&&Ln[Ai];if(_r&&_r.rect)Wl=_r.rect,Ni=_r.metrics;else{const ts=qe[oi.fontStack],ku=ts&&ts[Ai];if(!ku)continue;Ni=ku.metrics}bn=(pr-oi.scale)*ar}qn?(ze.verticalizable=!0,rn.push({glyph:Ai,imageName:To,x:Pt,y:_i+bn,vertical:qn,scale:oi.scale,fontStack:oi.fontStack,sectionIndex:bi,metrics:Ni,rect:Wl}),Pt+=Co*oi.scale+Fe):(rn.push({glyph:Ai,imageName:To,x:Pt,y:_i+bn,vertical:qn,scale:oi.scale,fontStack:oi.fontStack,sectionIndex:bi,metrics:Ni,rect:Wl}),Pt+=Ni.advance*oi.scale+Fe)}rn.length!==0&&(mi=Math.max(Pt-Fe,mi),q2(rn,0,rn.length-1,Un,zr)),Pt=0;const kn=ot*pr+zr;Pr.lineOffset=Math.max(zr,Nr),_i+=kn,fr=Math.max(kn,fr),++Lr}var Gi;const Qr=_i-Su,{horizontalAlign:en,verticalAlign:tn}=zp(xt);(function(Zi,pr,Nr,Pr,rn,zr,kn,mn,oi){const bi=(pr-Nr)*rn;let Ai=0;Ai=zr!==kn?-mn*Pr-Su:(-Pr*oi+.5)*kn;for(const bn of Zi)for(const Ni of bn.positionedGlyphs)Ni.x+=bi,Ni.y+=Ai})(ze.positionedLines,Un,en,tn,mi,fr,ot,Qr,lt.length),ze.top+=-tn*Qr,ze.bottom=ze.top+Qr,ze.left+=-en*mi,ze.right=ze.left+mi}(xe,t,o,l,Q,x,b,E,D,C,B,$),!function(ze){for(const qe of ze)if(qe.positionedGlyphs.length!==0)return!1;return!0}(he)&&xe}const pd={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},j2={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},$2={40:!0};function h_(r,t,o,l,f,y){if(t.imageName){const x=l[t.imageName];return x?x.displaySize[0]*t.scale*ar/y+f:0}{const x=o[t.fontStack],b=x&&x[r];return b?b.metrics.advance*t.scale+f:0}}function d_(r,t,o,l){const f=Math.pow(r-t,2);return l?r=0;let C=0;for(let D=0;DC){const L=Math.ceil(y/C);f*=L/x,x=L}return{x1:l,y1:f,x2:l+y,y2:f+x}}function g_(r,t,o,l,f,y){const x=r.image;let b;if(x.content){const Q=x.content,oe=x.pixelRatio||1;b=[Q[0]/oe,Q[1]/oe,x.displaySize[0]-Q[2]/oe,x.displaySize[1]-Q[3]/oe]}const E=t.left*y,C=t.right*y;let L,D,B,V;o==="width"||o==="both"?(V=f[0]+E-l[3],D=f[0]+C+l[1]):(V=f[0]+(E+C-x.displaySize[0])/2,D=V+x.displaySize[0]);const $=t.top*y,G=t.bottom*y;return o==="height"||o==="both"?(L=f[1]+$-l[0],B=f[1]+G+l[2]):(L=f[1]+($+G-x.displaySize[1])/2,B=L+x.displaySize[1]),{image:x,top:L,right:D,bottom:B,left:V,collisionPadding:b}}const Tu=255,Io=128,Rs=Tu*Io;function y_(r,t){const{expression:o}=t;if(o.kind==="constant")return{kind:"constant",layoutSize:o.evaluate(new xi(r+1))};if(o.kind==="source")return{kind:"source"};{const{zoomStops:l,interpolationType:f}=o;let y=0;for(;yx.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=mp([]),this.placementViewportMatrix=mp([]);const o=this.layers[0]._unevaluatedLayout._values;this.textSizeData=y_(this.zoom,o["text-size"]),this.iconSizeData=y_(this.zoom,o["icon-size"]);const l=this.layers[0].layout,f=l.get("symbol-sort-key"),y=l.get("symbol-z-order");this.canOverlap=Dp(l,"text-overlap","text-allow-overlap")!=="never"||Dp(l,"icon-overlap","icon-allow-overlap")!=="never"||l.get("text-ignore-placement")||l.get("icon-ignore-placement"),this.sortFeaturesByKey=y!=="viewport-y"&&!f.isConstant(),this.sortFeaturesByY=(y==="viewport-y"||y==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,l.get("symbol-placement")==="point"&&(this.writingModes=l.get("text-writing-mode").map(x=>m.ah[x])),this.stateDependentLayerIds=this.layers.filter(x=>x.isStateDependent()).map(x=>x.id),this.sourceID=t.sourceID}createArrays(){this.text=new Op(new Ca(this.layers,this.zoom,t=>/^text/.test(t))),this.icon=new Op(new Ca(this.layers,this.zoom,t=>/^icon/.test(t))),this.glyphOffsetArray=new Ci,this.lineVertexArray=new Jr,this.symbolInstances=new In,this.textAnchorOffsets=new Tr}calculateGlyphDependencies(t,o,l,f,y){for(let x=0;x0)&&(x.value.kind!=="constant"||x.value.value.length>0),L=E.value.kind!=="constant"||!!E.value.value||Object.keys(E.parameters).length>0,D=y.get("symbol-sort-key");if(this.features=[],!C&&!L)return;const B=o.iconDependencies,V=o.glyphDependencies,$=o.availableImages,G=new xi(this.zoom);for(const{feature:Q,id:oe,index:we,sourceLayerIndex:he}of t){const xe=f._featureFilter.needGeometry,ze=Ma(Q,xe);if(!f._featureFilter.filter(G,ze,l))continue;let qe,st;if(xe||(ze.geometry=Aa(Q)),C){const lt=f.getValueAndResolveTokens("text-field",ze,l,$),ot=cn.factory(lt),xt=this.hasRTLText=this.hasRTLText||W2(ot);(!xt||wo.getRTLTextPluginStatus()==="unavailable"||xt&&wo.isParsed())&&(qe=A2(ot,f,ze))}if(L){const lt=f.getValueAndResolveTokens("icon-image",ze,l,$);st=lt instanceof _n?lt:_n.fromString(lt)}if(!qe&&!st)continue;const Tt=this.sortFeaturesByKey?D.evaluate(ze,{},l):void 0;if(this.features.push({id:oe,text:qe,icon:st,index:we,sourceLayerIndex:he,geometry:ze.geometry,properties:Q.properties,type:G2[Q.type],sortKey:Tt}),st&&(B[st.name]=!0),qe){const lt=x.evaluate(ze,{},l).join(","),ot=y.get("text-rotation-alignment")!=="viewport"&&y.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(m.ah.vertical)>=0;for(const xt of qe.sections)if(xt.image)B[xt.image.name]=!0;else{const gt=ou(qe.toString()),ft=xt.fontStack||lt,Fe=V[ft]=V[ft]||{};this.calculateGlyphDependencies(xt.text,Fe,ot,this.allowVerticalPlacement,gt)}}}y.get("symbol-placement")==="line"&&(this.features=function(Q){const oe={},we={},he=[];let xe=0;function ze(lt){he.push(Q[lt]),xe++}function qe(lt,ot,xt){const gt=we[lt];return delete we[lt],we[ot]=gt,he[gt].geometry[0].pop(),he[gt].geometry[0]=he[gt].geometry[0].concat(xt[0]),gt}function st(lt,ot,xt){const gt=oe[ot];return delete oe[ot],oe[lt]=gt,he[gt].geometry[0].shift(),he[gt].geometry[0]=xt[0].concat(he[gt].geometry[0]),gt}function Tt(lt,ot,xt){const gt=xt?ot[0][ot[0].length-1]:ot[0][0];return`${lt}:${gt.x}:${gt.y}`}for(let lt=0;ltlt.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Q,oe)=>Q.sortKey-oe.sortKey)}update(t,o,l){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,o,this.layers,l),this.icon.programConfigurations.updatePaintArrays(t,o,this.layers,l))}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,o){const l=this.lineVertexArray.length;if(t.segment!==void 0){let f=t.dist(o[t.segment+1]),y=t.dist(o[t.segment]);const x={};for(let b=t.segment+1;b=0;b--)x[b]={x:o[b].x,y:o[b].y,tileUnitDistanceFromAnchor:y},b>0&&(y+=o[b-1].dist(o[b]));for(let b=0;b0}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,o){const l=t.placedSymbolArray.get(o),f=l.vertexStartIndex+4*l.numGlyphs;for(let y=l.vertexStartIndex;yf[b]-f[E]||y[E]-y[b]),x}addToSortKeyRanges(t,o){const l=this.sortKeyRanges[this.sortKeyRanges.length-1];l&&l.sortKey===o?l.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:o,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 o of this.symbolInstanceIndexes){const l=this.symbolInstances.get(o);this.featureSortOrder.push(l.featureIndex),[l.rightJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.leftJustifiedTextSymbolIndex].forEach((f,y,x)=>{f>=0&&x.indexOf(f)===y&&this.addIndicesForPlacedSymbol(this.text,f)}),l.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,l.verticalPlacedTextSymbolIndex),l.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.placedIconSymbolIndex),l.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let __,v_;mt("SymbolBucket",Hl,{omit:["layers","collisionBoxArray","features","compareText"]}),Hl.MAX_GLYPHS=65535,Hl.addDynamicAttributes=Rp;var Fp={get paint(){return v_=v_||new d({"icon-opacity":new Ct(ae.paint_symbol["icon-opacity"]),"icon-color":new Ct(ae.paint_symbol["icon-color"]),"icon-halo-color":new Ct(ae.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ct(ae.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ct(ae.paint_symbol["icon-halo-blur"]),"icon-translate":new bt(ae.paint_symbol["icon-translate"]),"icon-translate-anchor":new bt(ae.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ct(ae.paint_symbol["text-opacity"]),"text-color":new Ct(ae.paint_symbol["text-color"],{runtimeType:di,getOverride:r=>r.textColor,hasOverride:r=>!!r.textColor}),"text-halo-color":new Ct(ae.paint_symbol["text-halo-color"]),"text-halo-width":new Ct(ae.paint_symbol["text-halo-width"]),"text-halo-blur":new Ct(ae.paint_symbol["text-halo-blur"]),"text-translate":new bt(ae.paint_symbol["text-translate"]),"text-translate-anchor":new bt(ae.paint_symbol["text-translate-anchor"])})},get layout(){return __=__||new d({"symbol-placement":new bt(ae.layout_symbol["symbol-placement"]),"symbol-spacing":new bt(ae.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new bt(ae.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ct(ae.layout_symbol["symbol-sort-key"]),"symbol-z-order":new bt(ae.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new bt(ae.layout_symbol["icon-allow-overlap"]),"icon-overlap":new bt(ae.layout_symbol["icon-overlap"]),"icon-ignore-placement":new bt(ae.layout_symbol["icon-ignore-placement"]),"icon-optional":new bt(ae.layout_symbol["icon-optional"]),"icon-rotation-alignment":new bt(ae.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ct(ae.layout_symbol["icon-size"]),"icon-text-fit":new bt(ae.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new bt(ae.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ct(ae.layout_symbol["icon-image"]),"icon-rotate":new Ct(ae.layout_symbol["icon-rotate"]),"icon-padding":new Ct(ae.layout_symbol["icon-padding"]),"icon-keep-upright":new bt(ae.layout_symbol["icon-keep-upright"]),"icon-offset":new Ct(ae.layout_symbol["icon-offset"]),"icon-anchor":new Ct(ae.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new bt(ae.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new bt(ae.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new bt(ae.layout_symbol["text-rotation-alignment"]),"text-field":new Ct(ae.layout_symbol["text-field"]),"text-font":new Ct(ae.layout_symbol["text-font"]),"text-size":new Ct(ae.layout_symbol["text-size"]),"text-max-width":new Ct(ae.layout_symbol["text-max-width"]),"text-line-height":new bt(ae.layout_symbol["text-line-height"]),"text-letter-spacing":new Ct(ae.layout_symbol["text-letter-spacing"]),"text-justify":new Ct(ae.layout_symbol["text-justify"]),"text-radial-offset":new Ct(ae.layout_symbol["text-radial-offset"]),"text-variable-anchor":new bt(ae.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Ct(ae.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Ct(ae.layout_symbol["text-anchor"]),"text-max-angle":new bt(ae.layout_symbol["text-max-angle"]),"text-writing-mode":new bt(ae.layout_symbol["text-writing-mode"]),"text-rotate":new Ct(ae.layout_symbol["text-rotate"]),"text-padding":new bt(ae.layout_symbol["text-padding"]),"text-keep-upright":new bt(ae.layout_symbol["text-keep-upright"]),"text-transform":new Ct(ae.layout_symbol["text-transform"]),"text-offset":new Ct(ae.layout_symbol["text-offset"]),"text-allow-overlap":new bt(ae.layout_symbol["text-allow-overlap"]),"text-overlap":new bt(ae.layout_symbol["text-overlap"]),"text-ignore-placement":new bt(ae.layout_symbol["text-ignore-placement"]),"text-optional":new bt(ae.layout_symbol["text-optional"])})}};class x_{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:Gr,this.defaultValue=t}evaluate(t){if(t.formattedSection){const o=this.defaultValue.property.overrides;if(o&&o.hasOverride(t.formattedSection))return o.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}}mt("FormatSectionOverride",x_,{omit:["defaultValue"]});class gd extends v{constructor(t){super(t,Fp)}recalculate(t,o){if(super.recalculate(t,o),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 l=this.layout.get("text-writing-mode");if(l){const f=[];for(const y of l)f.indexOf(y)<0&&f.push(y);this.layout._values["text-writing-mode"]=f}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,o,l,f){const y=this.layout.get(t).evaluate(o,{},l,f),x=this._unevaluatedLayout._values[t];return x.isDataDriven()||bl(x.value)||!y?y:function(b,E){return E.replace(/{([^{}]+)}/g,(C,L)=>b&&L in b?String(b[L]):"")}(o.properties,y)}createBucket(t){return new Hl(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of Fp.paint.overridableProperties){if(!gd.hasPaintOverride(this.layout,t))continue;const o=this.paint.get(t),l=new x_(o),f=new Hc(l,o.property.specification);let y=null;y=o.value.kind==="constant"||o.value.kind==="source"?new Gc("source",f):new Zc("composite",f,o.value.zoomStops),this.paint._values[t]=new $n(o.property,y,o.parameters)}}_handleOverridablePaintPropertyUpdate(t,o,l){return!(!this.layout||o.isDataDriven()||l.isDataDriven())&&gd.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,o){const l=t.get("text-field"),f=Fp.paint.properties[o];let y=!1;const x=b=>{for(const E of b)if(f.overrides&&f.overrides.hasOverride(E))return void(y=!0)};if(l.value.kind==="constant"&&l.value.value instanceof cn)x(l.value.value.sections);else if(l.value.kind==="source"){const b=C=>{y||(C instanceof jo&&Qi(C.value)===to?x(C.value.sections):C instanceof ll?x(C.sections):C.eachChild(b))},E=l.value;E._styleExpression&&b(E._styleExpression.expression)}return y}}let b_;var X2={get paint(){return b_=b_||new d({"background-color":new bt(ae.paint_background["background-color"]),"background-pattern":new i(ae.paint_background["background-pattern"]),"background-opacity":new bt(ae.paint_background["background-opacity"])})}};class K2 extends v{constructor(t){super(t,X2)}}let w_;var J2={get paint(){return w_=w_||new d({"raster-opacity":new bt(ae.paint_raster["raster-opacity"]),"raster-hue-rotate":new bt(ae.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new bt(ae.paint_raster["raster-brightness-min"]),"raster-brightness-max":new bt(ae.paint_raster["raster-brightness-max"]),"raster-saturation":new bt(ae.paint_raster["raster-saturation"]),"raster-contrast":new bt(ae.paint_raster["raster-contrast"]),"raster-resampling":new bt(ae.paint_raster["raster-resampling"]),"raster-fade-duration":new bt(ae.paint_raster["raster-fade-duration"])})}};class Y2 extends v{constructor(t){super(t,J2)}}class Q2 extends v{constructor(t){super(t,{}),this.onAdd=o=>{this.implementation.onAdd&&this.implementation.onAdd(o,o.painter.context.gl)},this.onRemove=o=>{this.implementation.onRemove&&this.implementation.onRemove(o,o.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 eE{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 Vp=63710088e-1;class Os{constructor(t,o){if(isNaN(t)||isNaN(o))throw new Error(`Invalid LngLat object: (${t}, ${o})`);if(this.lng=+t,this.lat=+o,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Os(ee(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const o=Math.PI/180,l=this.lat*o,f=t.lat*o,y=Math.sin(l)*Math.sin(f)+Math.cos(l)*Math.cos(f)*Math.cos((t.lng-this.lng)*o);return Vp*Math.acos(Math.min(y,1))}static convert(t){if(t instanceof Os)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new Os(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t!==null)return new Os(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const E_=2*Math.PI*Vp;function S_(r){return E_*Math.cos(r*Math.PI/180)}function I_(r){return(180+r)/360}function T_(r){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360}function C_(r,t){return r/S_(t)}function Np(r){return 360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90}class yd{constructor(t,o,l=0){this.x=+t,this.y=+o,this.z=+l}static fromLngLat(t,o=0){const l=Os.convert(t);return new yd(I_(l.lng),T_(l.lat),C_(o,l.lat))}toLngLat(){return new Os(360*this.x-180,Np(this.y))}toAltitude(){return this.z*S_(Np(this.y))}meterInMercatorCoordinateUnits(){return 1/E_*(t=Np(this.y),1/Math.cos(t*Math.PI/180));var t}}function A_(r,t,o){var l=2*Math.PI*6378137/256/Math.pow(2,o);return[r*l-2*Math.PI*6378137/2,t*l-2*Math.PI*6378137/2]}class jp{constructor(t,o,l){if(t<0||t>25||l<0||l>=Math.pow(2,t)||o<0||o>=Math.pow(2,t))throw new Error(`x=${o}, y=${l}, 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=o,this.y=l,this.key=Cu(0,t,t,o,l)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,o,l){const f=(x=this.y,b=this.z,E=A_(256*(y=this.x),256*(x=Math.pow(2,b)-x-1),b),C=A_(256*(y+1),256*(x+1),b),E[0]+","+E[1]+","+C[0]+","+C[1]);var y,x,b,E,C;const L=function(D,B,V){let $,G="";for(let Q=D;Q>0;Q--)$=1<1?"@2x":"").replace(/{quadkey}/g,L).replace(/{bbox-epsg-3857}/g,f)}isChildOf(t){const o=this.z-t.z;return o>0&&t.x===this.x>>o&&t.y===this.y>>o}getTilePoint(t){const o=Math.pow(2,this.z);return new A((t.x*o-this.x)*er,(t.y*o-this.y)*er)}toString(){return`${this.z}/${this.x}/${this.y}`}}class M_{constructor(t,o){this.wrap=t,this.canonical=o,this.key=Cu(t,o.z,o.z,o.x,o.y)}}class Mn{constructor(t,o,l,f,y){if(t= z; overscaledZ = ${t}; z = ${l}`);this.overscaledZ=t,this.wrap=o,this.canonical=new jp(l,+f,+y),this.key=Cu(o,t,l,f,y)}clone(){return new Mn(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 o=this.canonical.z-t;return t>this.canonical.z?new Mn(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Mn(t,this.wrap,t,this.canonical.x>>o,this.canonical.y>>o)}calculateScaledKey(t,o){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const l=this.canonical.z-t;return t>this.canonical.z?Cu(this.wrap*+o,t,this.canonical.z,this.canonical.x,this.canonical.y):Cu(this.wrap*+o,t,t,this.canonical.x>>l,this.canonical.y>>l)}isChildOf(t){if(t.wrap!==this.wrap)return!1;const o=this.canonical.z-t.canonical.z;return t.overscaledZ===0||t.overscaledZ>o&&t.canonical.y===this.canonical.y>>o}children(t){if(this.overscaledZ>=t)return[new Mn(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const o=this.canonical.z+1,l=2*this.canonical.x,f=2*this.canonical.y;return[new Mn(o,this.wrap,o,l,f),new Mn(o,this.wrap,o,l+1,f),new Mn(o,this.wrap,o,l,f+1),new Mn(o,this.wrap,o,l+1,f+1)]}isLessThan(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.ythis.max&&(this.max=D),D=this.dim+1||o<-1||o>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(o+1)*this.stride+(t+1)}unpack(t,o,l){return t*this.redFactor+o*this.greenFactor+l*this.blueFactor-this.baseShift}getPixels(){return new An({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,o,l){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let f=o*this.dim,y=o*this.dim+this.dim,x=l*this.dim,b=l*this.dim+this.dim;switch(o){case-1:f=y-1;break;case 1:y=f+1}switch(l){case-1:x=b-1;break;case 1:b=x+1}const E=-o*this.dim,C=-l*this.dim;for(let L=x;L=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 P_{constructor(t,o,l,f,y){this.type="Feature",this._vectorTileFeature=t,t._z=o,t._x=l,t._y=f,this.properties=t.properties,this.id=y}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 o in this)o!=="_geometry"&&o!=="_vectorTileFeature"&&(t[o]=this[o]);return t}}class z_{constructor(t,o){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Ea(er,16,0),this.grid3D=new Ea(er,16,0),this.featureIndexArray=new Tn,this.promoteId=o}insert(t,o,l,f,y,x){const b=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(l,f,y);const E=x?this.grid3D:this.grid;for(let C=0;C=0&&D[3]>=0&&E.insert(b,D[0],D[1],D[2],D[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new zs.VectorTile(new Mp(this.rawTileData)).layers,this.sourceLayerCoder=new L_(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(t,o,l,f){this.loadVTLayers();const y=t.params||{},x=er/t.tileSize/t.scale,b=Wc(y.filter),E=t.queryGeometry,C=t.queryPadding*x,L=R_(E),D=this.grid.query(L.minX-C,L.minY-C,L.maxX+C,L.maxY+C),B=R_(t.cameraQueryGeometry),V=this.grid3D.query(B.minX-C,B.minY-C,B.maxX+C,B.maxY+C,(Q,oe,we,he)=>function(xe,ze,qe,st,Tt){for(const ot of xe)if(ze<=ot.x&&qe<=ot.y&&st>=ot.x&&Tt>=ot.y)return!0;const lt=[new A(ze,qe),new A(ze,Tt),new A(st,Tt),new A(st,qe)];if(xe.length>2){for(const ot of lt)if(Fl(xe,ot))return!0}for(let ot=0;ot(he||(he=Aa(xe)),ze.queryIntersectsFeature(E,xe,qe,he,this.z,t.transform,x,t.pixelPosMatrix)))}return $}loadMatchingFeature(t,o,l,f,y,x,b,E,C,L,D){const B=this.bucketLayerIDs[o];if(x&&!function(Q,oe){for(let we=0;we=0)return!0;return!1}(x,B))return;const V=this.sourceLayerCoder.decode(l),$=this.vtLayers[V].feature(f);if(y.needGeometry){const Q=Ma($,!0);if(!y.filter(new xi(this.tileID.overscaledZ),Q,this.tileID.canonical))return}else if(!y.filter(new xi(this.tileID.overscaledZ),$))return;const G=this.getId($,V);for(let Q=0;Q{const b=t instanceof Ll?t.get(x):null;return b&&b.evaluate?b.evaluate(o,l,f):b})}function R_(r){let t=1/0,o=1/0,l=-1/0,f=-1/0;for(const y of r)t=Math.min(t,y.x),o=Math.min(o,y.y),l=Math.max(l,y.x),f=Math.max(f,y.y);return{minX:t,minY:o,maxX:l,maxY:f}}function tE(r,t){return t-r}function O_(r,t,o,l,f){const y=[];for(let x=0;x=l&&D.x>=l||(L.x>=l?L=new A(l,L.y+(l-L.x)/(D.x-L.x)*(D.y-L.y))._round():D.x>=l&&(D=new A(l,L.y+(l-L.x)/(D.x-L.x)*(D.y-L.y))._round()),L.y>=f&&D.y>=f||(L.y>=f?L=new A(L.x+(f-L.y)/(D.y-L.y)*(D.x-L.x),f)._round():D.y>=f&&(D=new A(L.x+(f-L.y)/(D.y-L.y)*(D.x-L.x),f)._round()),E&&L.equals(E[E.length-1])||(E=[L],y.push(E)),E.push(D)))))}}return y}mt("FeatureIndex",z_,{omit:["rawTileData","sourceLayerCoder"]});class Bs extends A{constructor(t,o,l,f){super(t,o),this.angle=l,f!==void 0&&(this.segment=f)}clone(){return new Bs(this.x,this.y,this.angle,this.segment)}}function B_(r,t,o,l,f){if(t.segment===void 0||o===0)return!0;let y=t,x=t.segment+1,b=0;for(;b>-o/2;){if(x--,x<0)return!1;b-=r[x].dist(y),y=r[x]}b+=r[x].dist(r[x+1]),x++;const E=[];let C=0;for(;bl;)C-=E.shift().angleDelta;if(C>f)return!1;x++,b+=L.dist(D)}return!0}function F_(r){let t=0;for(let o=0;oC){const $=(C-E)/V,G=Fr.number(D.x,B.x,$),Q=Fr.number(D.y,B.y,$),oe=new Bs(G,Q,B.angleTo(D),L);return oe._round(),!x||B_(r,oe,b,x,t)?oe:void 0}E+=V}}function rE(r,t,o,l,f,y,x,b,E){const C=V_(l,y,x),L=N_(l,f),D=L*x,B=r[0].x===0||r[0].x===E||r[0].y===0||r[0].y===E;return t-D=0&&xe=0&&ze=0&&B+C<=L){const qe=new Bs(xe,ze,we,$);qe._round(),l&&!B_(r,qe,y,l,f)||V.push(qe)}}D+=oe}return b||V.length||x||(V=j_(r,D/2,o,l,f,y,x,!0,E)),V}mt("Anchor",Bs);const Gl=pn;function $_(r,t,o,l){const f=[],y=r.image,x=y.pixelRatio,b=y.paddedRect.w-2*Gl,E=y.paddedRect.h-2*Gl;let C={x1:r.left,y1:r.top,x2:r.right,y2:r.bottom};const L=y.stretchX||[[0,b]],D=y.stretchY||[[0,E]],B=(Fe,wt)=>Fe+wt[1]-wt[0],V=L.reduce(B,0),$=D.reduce(B,0),G=b-V,Q=E-$;let oe=0,we=V,he=0,xe=$,ze=0,qe=G,st=0,Tt=Q;if(y.content&&l){const Fe=y.content,wt=Fe[2]-Fe[0],_t=Fe[3]-Fe[1];(y.textFitWidth||y.textFitHeight)&&(C=m_(r)),oe=_d(L,0,Fe[0]),he=_d(D,0,Fe[1]),we=_d(L,Fe[0],Fe[2]),xe=_d(D,Fe[1],Fe[3]),ze=Fe[0]-oe,st=Fe[1]-he,qe=wt-we,Tt=_t-xe}const lt=C.x1,ot=C.y1,xt=C.x2-lt,gt=C.y2-ot,ft=(Fe,wt,_t,Pt)=>{const _i=vd(Fe.stretch-oe,we,xt,lt),mi=xd(Fe.fixed-ze,qe,Fe.stretch,V),fr=vd(wt.stretch-he,xe,gt,ot),Un=xd(wt.fixed-st,Tt,wt.stretch,$),Lr=vd(_t.stretch-oe,we,xt,lt),Gi=xd(_t.fixed-ze,qe,_t.stretch,V),Qr=vd(Pt.stretch-he,xe,gt,ot),en=xd(Pt.fixed-st,Tt,Pt.stretch,$),tn=new A(_i,fr),Zi=new A(Lr,fr),pr=new A(Lr,Qr),Nr=new A(_i,Qr),Pr=new A(mi/x,Un/x),rn=new A(Gi/x,en/x),zr=t*Math.PI/180;if(zr){const oi=Math.sin(zr),bi=Math.cos(zr),Ai=[bi,-oi,oi,bi];tn._matMult(Ai),Zi._matMult(Ai),Nr._matMult(Ai),pr._matMult(Ai)}const kn=Fe.stretch+Fe.fixed,mn=wt.stretch+wt.fixed;return{tl:tn,tr:Zi,bl:Nr,br:pr,tex:{x:y.paddedRect.x+Gl+kn,y:y.paddedRect.y+Gl+mn,w:_t.stretch+_t.fixed-kn,h:Pt.stretch+Pt.fixed-mn},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Pr,pixelOffsetBR:rn,minFontScaleX:qe/x/xt,minFontScaleY:Tt/x/gt,isSDF:o}};if(l&&(y.stretchX||y.stretchY)){const Fe=U_(L,G,V),wt=U_(D,Q,$);for(let _t=0;_t0&&(G=Math.max(10,G),this.circleDiameter=G)}else{const B=!((D=x.image)===null||D===void 0)&&D.content&&(x.image.textFitWidth||x.image.textFitHeight)?m_(x):{x1:x.left,y1:x.top,x2:x.right,y2:x.bottom};B.y1=B.y1*b-E[0],B.y2=B.y2*b+E[2],B.x1=B.x1*b-E[3],B.x2=B.x2*b+E[1];const V=x.collisionPadding;if(V&&(B.x1-=V[0]*b,B.y1-=V[1]*b,B.x2+=V[2]*b,B.y2+=V[3]*b),L){const $=new A(B.x1,B.y1),G=new A(B.x2,B.y1),Q=new A(B.x1,B.y2),oe=new A(B.x2,B.y2),we=L*Math.PI/180;$._rotate(we),G._rotate(we),Q._rotate(we),oe._rotate(we),B.x1=Math.min($.x,G.x,Q.x,oe.x),B.x2=Math.max($.x,G.x,Q.x,oe.x),B.y1=Math.min($.y,G.y,Q.y,oe.y),B.y2=Math.max($.y,G.y,Q.y,oe.y)}t.emplaceBack(o.x,o.y,B.x1,B.y1,B.x2,B.y2,l,f,y)}this.boxEndIndex=t.length}}class nE{constructor(t=[],o=oE){if(this.data=t,this.length=this.data.length,this.compare=o,this.length>0)for(let l=(this.length>>1)-1;l>=0;l--)this._down(l)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],o=this.data.pop();return this.length--,this.length>0&&(this.data[0]=o,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:o,compare:l}=this,f=o[t];for(;t>0;){const y=t-1>>1,x=o[y];if(l(f,x)>=0)break;o[t]=x,t=y}o[t]=f}_down(t){const{data:o,compare:l}=this,f=this.length>>1,y=o[t];for(;t=0)break;o[t]=b,t=x}o[t]=y}}function oE(r,t){return rt?1:0}function sE(r,t=1,o=!1){let l=1/0,f=1/0,y=-1/0,x=-1/0;const b=r[0];for(let V=0;Vy)&&(y=$.x),(!V||$.y>x)&&(x=$.y)}const E=Math.min(y-l,x-f);let C=E/2;const L=new nE([],aE);if(E===0)return new A(l,f);for(let V=l;VD.d||!D.d)&&(D=V,o&&console.log("found best %d after %d probes",Math.round(1e4*V.d)/1e4,B)),V.max-D.d<=t||(C=V.h/2,L.push(new Zl(V.p.x-C,V.p.y-C,C,r)),L.push(new Zl(V.p.x+C,V.p.y-C,C,r)),L.push(new Zl(V.p.x-C,V.p.y+C,C,r)),L.push(new Zl(V.p.x+C,V.p.y+C,C,r)),B+=4)}return o&&(console.log(`num probes: ${B}`),console.log(`best distance: ${D.d}`)),D.p}function aE(r,t){return t.max-r.max}function Zl(r,t,o,l){this.p=new A(r,t),this.h=o,this.d=function(f,y){let x=!1,b=1/0;for(let E=0;Ef.y!=$.y>f.y&&f.x<($.x-V.x)*(f.y-V.y)/($.y-V.y)+V.x&&(x=!x),b=Math.min(b,Ty(f,V,$))}}return(x?1:-1)*Math.sqrt(b)}(this.p,l),this.max=this.d+this.h*Math.SQRT2}var kr;m.aq=void 0,(kr=m.aq||(m.aq={}))[kr.center=1]="center",kr[kr.left=2]="left",kr[kr.right=3]="right",kr[kr.top=4]="top",kr[kr.bottom=5]="bottom",kr[kr["top-left"]=6]="top-left",kr[kr["top-right"]=7]="top-right",kr[kr["bottom-left"]=8]="bottom-left",kr[kr["bottom-right"]=9]="bottom-right";const Fs=7,$p=Number.POSITIVE_INFINITY;function q_(r,t){return t[1]!==$p?function(o,l,f){let y=0,x=0;switch(l=Math.abs(l),f=Math.abs(f),o){case"top-right":case"top-left":case"top":x=f-Fs;break;case"bottom-right":case"bottom-left":case"bottom":x=-f+Fs}switch(o){case"top-right":case"bottom-right":case"right":y=-l;break;case"top-left":case"bottom-left":case"left":y=l}return[y,x]}(r,t[0],t[1]):function(o,l){let f=0,y=0;l<0&&(l=0);const x=l/Math.SQRT2;switch(o){case"top-right":case"top-left":y=x-Fs;break;case"bottom-right":case"bottom-left":y=-x+Fs;break;case"bottom":y=-l+Fs;break;case"top":y=l-Fs}switch(o){case"top-right":case"bottom-right":f=-x;break;case"top-left":case"bottom-left":f=x;break;case"left":f=l;break;case"right":f=-l}return[f,y]}(r,t[0])}function H_(r,t,o){var l;const f=r.layout,y=(l=f.get("text-variable-anchor-offset"))===null||l===void 0?void 0:l.evaluate(t,{},o);if(y){const b=y.values,E=[];for(let C=0;CB*ar);L.startsWith("top")?D[1]-=Fs:L.startsWith("bottom")&&(D[1]+=Fs),E[C+1]=D}return new Xr(E)}const x=f.get("text-variable-anchor");if(x){let b;b=r._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[f.get("text-radial-offset").evaluate(t,{},o)*ar,$p]:f.get("text-offset").evaluate(t,{},o).map(C=>C*ar);const E=[];for(const C of x)E.push(C,q_(C,b));return new Xr(E)}return null}function Up(r){switch(r){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function lE(r,t,o,l,f,y,x,b,E,C,L){let D=y.textMaxSize.evaluate(t,{});D===void 0&&(D=x);const B=r.layers[0].layout,V=B.get("icon-offset").evaluate(t,{},L),$=Z_(o.horizontal),G=x/24,Q=r.tilePixelRatio*G,oe=r.tilePixelRatio*D/24,we=r.tilePixelRatio*b,he=r.tilePixelRatio*B.get("symbol-spacing"),xe=B.get("text-padding")*r.tilePixelRatio,ze=function(Fe,wt,_t,Pt=1){const _i=Fe.get("icon-padding").evaluate(wt,{},_t),mi=_i&&_i.values;return[mi[0]*Pt,mi[1]*Pt,mi[2]*Pt,mi[3]*Pt]}(B,t,L,r.tilePixelRatio),qe=B.get("text-max-angle")/180*Math.PI,st=B.get("text-rotation-alignment")!=="viewport"&&B.get("symbol-placement")!=="point",Tt=B.get("icon-rotation-alignment")==="map"&&B.get("symbol-placement")!=="point",lt=B.get("symbol-placement"),ot=he/2,xt=B.get("icon-text-fit");let gt;l&&xt!=="none"&&(r.allowVerticalPlacement&&o.vertical&&(gt=g_(l,o.vertical,xt,B.get("icon-text-fit-padding"),V,G)),$&&(l=g_(l,$,xt,B.get("icon-text-fit-padding"),V,G)));const ft=(Fe,wt)=>{wt.x<0||wt.x>=er||wt.y<0||wt.y>=er||function(_t,Pt,_i,mi,fr,Un,Lr,Gi,Qr,en,tn,Zi,pr,Nr,Pr,rn,zr,kn,mn,oi,bi,Ai,bn,Ni,Wl){const To=_t.addToLineVertexArray(Pt,_i);let Co,qn,Ln,_r,ts=0,ku=0,J_=0,Y_=0,Jp=-1,Yp=-1;const is={};let Q_=Ol("");if(_t.allowVerticalPlacement&&mi.vertical){const jr=Gi.layout.get("text-rotate").evaluate(bi,{},Ni)+90;Ln=new bd(Qr,Pt,en,tn,Zi,mi.vertical,pr,Nr,Pr,jr),Lr&&(_r=new bd(Qr,Pt,en,tn,Zi,Lr,zr,kn,Pr,jr))}if(fr){const jr=Gi.layout.get("icon-rotate").evaluate(bi,{}),Pn=Gi.layout.get("icon-text-fit")!=="none",La=$_(fr,jr,bn,Pn),co=Lr?$_(Lr,jr,bn,Pn):void 0;qn=new bd(Qr,Pt,en,tn,Zi,fr,zr,kn,!1,jr),ts=4*La.length;const Pa=_t.iconSizeData;let Ao=null;Pa.kind==="source"?(Ao=[Io*Gi.layout.get("icon-size").evaluate(bi,{})],Ao[0]>Rs&&De(`${_t.layerIds[0]}: Value for "icon-size" is >= ${Tu}. Reduce your "icon-size".`)):Pa.kind==="composite"&&(Ao=[Io*Ai.compositeIconSizes[0].evaluate(bi,{},Ni),Io*Ai.compositeIconSizes[1].evaluate(bi,{},Ni)],(Ao[0]>Rs||Ao[1]>Rs)&&De(`${_t.layerIds[0]}: Value for "icon-size" is >= ${Tu}. Reduce your "icon-size".`)),_t.addSymbols(_t.icon,La,Ao,oi,mn,bi,m.ah.none,Pt,To.lineStartIndex,To.lineLength,-1,Ni),Jp=_t.icon.placedSymbolArray.length-1,co&&(ku=4*co.length,_t.addSymbols(_t.icon,co,Ao,oi,mn,bi,m.ah.vertical,Pt,To.lineStartIndex,To.lineLength,-1,Ni),Yp=_t.icon.placedSymbolArray.length-1)}const e0=Object.keys(mi.horizontal);for(const jr of e0){const Pn=mi.horizontal[jr];if(!Co){Q_=Ol(Pn.text);const co=Gi.layout.get("text-rotate").evaluate(bi,{},Ni);Co=new bd(Qr,Pt,en,tn,Zi,Pn,pr,Nr,Pr,co)}const La=Pn.positionedLines.length===1;if(J_+=G_(_t,Pt,Pn,Un,Gi,Pr,bi,rn,To,mi.vertical?m.ah.horizontal:m.ah.horizontalOnly,La?e0:[jr],is,Jp,Ai,Ni),La)break}mi.vertical&&(Y_+=G_(_t,Pt,mi.vertical,Un,Gi,Pr,bi,rn,To,m.ah.vertical,["vertical"],is,Yp,Ai,Ni));const hE=Co?Co.boxStartIndex:_t.collisionBoxArray.length,dE=Co?Co.boxEndIndex:_t.collisionBoxArray.length,fE=Ln?Ln.boxStartIndex:_t.collisionBoxArray.length,pE=Ln?Ln.boxEndIndex:_t.collisionBoxArray.length,mE=qn?qn.boxStartIndex:_t.collisionBoxArray.length,gE=qn?qn.boxEndIndex:_t.collisionBoxArray.length,yE=_r?_r.boxStartIndex:_t.collisionBoxArray.length,_E=_r?_r.boxEndIndex:_t.collisionBoxArray.length;let lo=-1;const Ed=(jr,Pn)=>jr&&jr.circleDiameter?Math.max(jr.circleDiameter,Pn):Pn;lo=Ed(Co,lo),lo=Ed(Ln,lo),lo=Ed(qn,lo),lo=Ed(_r,lo);const t0=lo>-1?1:0;t0&&(lo*=Wl/ar),_t.glyphOffsetArray.length>=Hl.MAX_GLYPHS&&De("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),bi.sortKey!==void 0&&_t.addToSortKeyRanges(_t.symbolInstances.length,bi.sortKey);const vE=H_(Gi,bi,Ni),[xE,bE]=function(jr,Pn){const La=jr.length,co=Pn==null?void 0:Pn.values;if((co==null?void 0:co.length)>0)for(let Pa=0;Pa=0?is.right:-1,is.center>=0?is.center:-1,is.left>=0?is.left:-1,is.vertical||-1,Jp,Yp,Q_,hE,dE,fE,pE,mE,gE,yE,_E,en,J_,Y_,ts,ku,t0,0,pr,lo,xE,bE)}(r,wt,Fe,o,l,f,gt,r.layers[0],r.collisionBoxArray,t.index,t.sourceLayerIndex,r.index,Q,[xe,xe,xe,xe],st,E,we,ze,Tt,V,t,y,C,L,x)};if(lt==="line")for(const Fe of O_(t.geometry,0,0,er,er)){const wt=rE(Fe,he,qe,o.vertical||$,l,24,oe,r.overscaling,er);for(const _t of wt)$&&cE(r,$.text,ot,_t)||ft(Fe,_t)}else if(lt==="line-center"){for(const Fe of t.geometry)if(Fe.length>1){const wt=iE(Fe,qe,o.vertical||$,l,24,oe);wt&&ft(Fe,wt)}}else if(t.type==="Polygon")for(const Fe of ul(t.geometry,0)){const wt=sE(Fe,16);ft(Fe[0],new Bs(wt.x,wt.y,0))}else if(t.type==="LineString")for(const Fe of t.geometry)ft(Fe,new Bs(Fe[0].x,Fe[0].y,0));else if(t.type==="Point")for(const Fe of t.geometry)for(const wt of Fe)ft([wt],new Bs(wt.x,wt.y,0))}function G_(r,t,o,l,f,y,x,b,E,C,L,D,B,V,$){const G=function(we,he,xe,ze,qe,st,Tt,lt){const ot=ze.layout.get("text-rotate").evaluate(st,{})*Math.PI/180,xt=[];for(const gt of he.positionedLines)for(const ft of gt.positionedGlyphs){if(!ft.rect)continue;const Fe=ft.rect||{};let wt=l_+1,_t=!0,Pt=1,_i=0;const mi=(qe||lt)&&ft.vertical,fr=ft.metrics.advance*ft.scale/2;if(lt&&he.verticalizable&&(_i=gt.lineOffset/2-(ft.imageName?-(ar-ft.metrics.width*ft.scale)/2:(ft.scale-1)*ar)),ft.imageName){const oi=Tt[ft.imageName];_t=oi.sdf,Pt=oi.pixelRatio,wt=pn/Pt}const Un=qe?[ft.x+fr,ft.y]:[0,0];let Lr=qe?[0,0]:[ft.x+fr+xe[0],ft.y+xe[1]-_i],Gi=[0,0];mi&&(Gi=Lr,Lr=[0,0]);const Qr=ft.metrics.isDoubleResolution?2:1,en=(ft.metrics.left-wt)*ft.scale-fr+Lr[0],tn=(-ft.metrics.top-wt)*ft.scale+Lr[1],Zi=en+Fe.w/Qr*ft.scale/Pt,pr=tn+Fe.h/Qr*ft.scale/Pt,Nr=new A(en,tn),Pr=new A(Zi,tn),rn=new A(en,pr),zr=new A(Zi,pr);if(mi){const oi=new A(-fr,fr-Su),bi=-Math.PI/2,Ai=ar/2-fr,bn=new A(5-Su-Ai,-(ft.imageName?Ai:0)),Ni=new A(...Gi);Nr._rotateAround(bi,oi)._add(bn)._add(Ni),Pr._rotateAround(bi,oi)._add(bn)._add(Ni),rn._rotateAround(bi,oi)._add(bn)._add(Ni),zr._rotateAround(bi,oi)._add(bn)._add(Ni)}if(ot){const oi=Math.sin(ot),bi=Math.cos(ot),Ai=[bi,-oi,oi,bi];Nr._matMult(Ai),Pr._matMult(Ai),rn._matMult(Ai),zr._matMult(Ai)}const kn=new A(0,0),mn=new A(0,0);xt.push({tl:Nr,tr:Pr,bl:rn,br:zr,tex:Fe,writingMode:he.writingMode,glyphOffset:Un,sectionIndex:ft.sectionIndex,isSDF:_t,pixelOffsetTL:kn,pixelOffsetBR:mn,minFontScaleX:0,minFontScaleY:0})}return xt}(0,o,b,f,y,x,l,r.allowVerticalPlacement),Q=r.textSizeData;let oe=null;Q.kind==="source"?(oe=[Io*f.layout.get("text-size").evaluate(x,{})],oe[0]>Rs&&De(`${r.layerIds[0]}: Value for "text-size" is >= ${Tu}. Reduce your "text-size".`)):Q.kind==="composite"&&(oe=[Io*V.compositeTextSizes[0].evaluate(x,{},$),Io*V.compositeTextSizes[1].evaluate(x,{},$)],(oe[0]>Rs||oe[1]>Rs)&&De(`${r.layerIds[0]}: Value for "text-size" is >= ${Tu}. Reduce your "text-size".`)),r.addSymbols(r.text,G,oe,b,y,x,C,t,E.lineStartIndex,E.lineLength,B,$);for(const we of L)D[we]=r.text.placedSymbolArray.length-1;return 4*G.length}function Z_(r){for(const t in r)return r[t];return null}function cE(r,t,o,l){const f=r.compareText;if(t in f){const y=f[t];for(let x=y.length-1;x>=0;x--)if(l.dist(y[x])>4;if(f!==1)throw new Error(`Got v${f} data when expected v1.`);const y=W_[15&l];if(!y)throw new Error("Unrecognized array type.");const[x]=new Uint16Array(t,2,1),[b]=new Uint32Array(t,4,1);return new qp(b,x,y,t)}constructor(t,o=64,l=Float64Array,f){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+o,2),65535),this.ArrayType=l,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const y=W_.indexOf(this.ArrayType),x=2*t*this.ArrayType.BYTES_PER_ELEMENT,b=t*this.IndexArrayType.BYTES_PER_ELEMENT,E=(8-b%8)%8;if(y<0)throw new Error(`Unexpected typed array class: ${l}.`);f&&f instanceof ArrayBuffer?(this.data=f,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+b+E,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+x+b+E),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+b+E,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+y]),new Uint16Array(this.data,2,1)[0]=o,new Uint32Array(this.data,4,1)[0]=t)}add(t,o){const l=this._pos>>1;return this.ids[l]=l,this.coords[this._pos++]=t,this.coords[this._pos++]=o,l}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Hp(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,o,l,f){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:y,coords:x,nodeSize:b}=this,E=[0,y.length-1,0],C=[];for(;E.length;){const L=E.pop()||0,D=E.pop()||0,B=E.pop()||0;if(D-B<=b){for(let Q=B;Q<=D;Q++){const oe=x[2*Q],we=x[2*Q+1];oe>=t&&oe<=l&&we>=o&&we<=f&&C.push(y[Q])}continue}const V=B+D>>1,$=x[2*V],G=x[2*V+1];$>=t&&$<=l&&G>=o&&G<=f&&C.push(y[V]),(L===0?t<=$:o<=G)&&(E.push(B),E.push(V-1),E.push(1-L)),(L===0?l>=$:f>=G)&&(E.push(V+1),E.push(D),E.push(1-L))}return C}within(t,o,l){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:f,coords:y,nodeSize:x}=this,b=[0,f.length-1,0],E=[],C=l*l;for(;b.length;){const L=b.pop()||0,D=b.pop()||0,B=b.pop()||0;if(D-B<=x){for(let Q=B;Q<=D;Q++)K_(y[2*Q],y[2*Q+1],t,o)<=C&&E.push(f[Q]);continue}const V=B+D>>1,$=y[2*V],G=y[2*V+1];K_($,G,t,o)<=C&&E.push(f[V]),(L===0?t-l<=$:o-l<=G)&&(b.push(B),b.push(V-1),b.push(1-L)),(L===0?t+l>=$:o+l>=G)&&(b.push(V+1),b.push(D),b.push(1-L))}return E}}function Hp(r,t,o,l,f,y){if(f-l<=o)return;const x=l+f>>1;X_(r,t,x,l,f,y),Hp(r,t,o,l,x-1,1-y),Hp(r,t,o,x+1,f,1-y)}function X_(r,t,o,l,f,y){for(;f>l;){if(f-l>600){const C=f-l+1,L=o-l+1,D=Math.log(C),B=.5*Math.exp(2*D/3),V=.5*Math.sqrt(D*B*(C-B)/C)*(L-C/2<0?-1:1);X_(r,t,o,Math.max(l,Math.floor(o-L*B/C+V)),Math.min(f,Math.floor(o+(C-L)*B/C+V)),y)}const x=t[2*o+y];let b=l,E=f;for(Au(r,t,l,o),t[2*f+y]>x&&Au(r,t,l,f);bx;)E--}t[2*l+y]===x?Au(r,t,l,E):(E++,Au(r,t,E,f)),E<=o&&(l=E+1),o<=E&&(f=E-1)}}function Au(r,t,o,l){Gp(r,o,l),Gp(t,2*o,2*l),Gp(t,2*o+1,2*l+1)}function Gp(r,t,o){const l=r[t];r[t]=r[o],r[o]=l}function K_(r,t,o,l){const f=r-o,y=t-l;return f*f+y*y}var Zp;m.be=void 0,(Zp=m.be||(m.be={})).create="create",Zp.load="load",Zp.fullLoad="fullLoad";let wd=null,Mu=[];const Wp=1e3/60,Xp="loadTime",Kp="fullLoadTime",uE={mark(r){performance.mark(r)},frame(r){const t=r;wd!=null&&Mu.push(t-wd),wd=t},clearMetrics(){wd=null,Mu=[],performance.clearMeasures(Xp),performance.clearMeasures(Kp);for(const r in m.be)performance.clearMarks(m.be[r])},getPerformanceMetrics(){performance.measure(Xp,m.be.create,m.be.load),performance.measure(Kp,m.be.create,m.be.fullLoad);const r=performance.getEntriesByName(Xp)[0].duration,t=performance.getEntriesByName(Kp)[0].duration,o=Mu.length,l=1/(Mu.reduce((y,x)=>y+x,0)/o/1e3),f=Mu.filter(y=>y>Wp).reduce((y,x)=>y+(x-Wp)/Wp,0);return{loadTime:r,fullLoadTime:t,fps:l,percentDroppedFrames:f/(o+f)*100,totalFrames:o}}};m.$=sr,m.A=Vl,m.B=function(r){if(Xe==null){const t=r.navigator?r.navigator.userAgent:null;Xe=!!r.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return Xe},m.C=class{constructor(r,t){this.target=r,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new eE(()=>this.process()),this.subscription=function(o,l,f,y){return o.addEventListener(l,f,!1),{unsubscribe:()=>{o.removeEventListener(l,f,!1)}}}(this.target,"message",o=>this.receive(o)),this.globalScope=rt(self)?r:window}registerMessageHandler(r,t){this.messageHandlers[r]=t}sendAsync(r,t){return new Promise((o,l)=>{const f=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[f]={resolve:o,reject:l},t&&t.signal.addEventListener("abort",()=>{delete this.resolveRejects[f];const b={id:f,type:"",origin:location.origin,targetMapId:r.targetMapId,sourceMapId:this.mapId};this.target.postMessage(b)},{once:!0});const y=[],x=Object.assign(Object.assign({},r),{id:f,sourceMapId:this.mapId,origin:location.origin,data:Sa(r.data,y)});this.target.postMessage(x,{transfer:y})})}receive(r){const t=r.data,o=t.id;if(!(t.origin!=="file://"&&location.origin!=="file://"&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type===""){delete this.tasks[o];const l=this.abortControllers[o];return delete this.abortControllers[o],void(l&&l.abort())}if(rt(self)||t.mustQueue)return this.tasks[o]=t,this.taskQueue.push(o),void this.invoker.trigger();this.processTask(o,t)}}process(){if(this.taskQueue.length===0)return;const r=this.taskQueue.shift(),t=this.tasks[r];delete this.tasks[r],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(r,t)}processTask(r,t){return c(this,void 0,void 0,function*(){if(t.type===""){const f=this.resolveRejects[r];return delete this.resolveRejects[r],f?void(t.error?f.reject(jn(t.error)):f.resolve(jn(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(r,new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const o=jn(t.data),l=new AbortController;this.abortControllers[r]=l;try{const f=yield this.messageHandlers[t.type](t.sourceMapId,o,l);this.completeTask(r,null,f)}catch(f){this.completeTask(r,f)}})}completeTask(r,t,o){const l=[];delete this.abortControllers[r];const f={id:r,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?Sa(t):null,data:Sa(o,l)};this.target.postMessage(f,{transfer:l})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},m.D=bt,m.E=Be,m.F=function(){var r=new Vl(16);return Vl!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0),r[0]=1,r[5]=1,r[10]=1,r[15]=1,r},m.G=hi,m.H=function(r,t,o){var l,f,y,x,b,E,C,L,D,B,V,$,G=o[0],Q=o[1],oe=o[2];return t===r?(r[12]=t[0]*G+t[4]*Q+t[8]*oe+t[12],r[13]=t[1]*G+t[5]*Q+t[9]*oe+t[13],r[14]=t[2]*G+t[6]*Q+t[10]*oe+t[14],r[15]=t[3]*G+t[7]*Q+t[11]*oe+t[15]):(f=t[1],y=t[2],x=t[3],b=t[4],E=t[5],C=t[6],L=t[7],D=t[8],B=t[9],V=t[10],$=t[11],r[0]=l=t[0],r[1]=f,r[2]=y,r[3]=x,r[4]=b,r[5]=E,r[6]=C,r[7]=L,r[8]=D,r[9]=B,r[10]=V,r[11]=$,r[12]=l*G+b*Q+D*oe+t[12],r[13]=f*G+E*Q+B*oe+t[13],r[14]=y*G+C*Q+V*oe+t[14],r[15]=x*G+L*Q+$*oe+t[15]),r},m.I=Lp,m.J=function(r,t,o){var l=o[0],f=o[1],y=o[2];return r[0]=t[0]*l,r[1]=t[1]*l,r[2]=t[2]*l,r[3]=t[3]*l,r[4]=t[4]*f,r[5]=t[5]*f,r[6]=t[6]*f,r[7]=t[7]*f,r[8]=t[8]*y,r[9]=t[9]*y,r[10]=t[10]*y,r[11]=t[11]*y,r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r},m.K=ky,m.L=function(r,t){const o={};for(let l=0;l{const t=window.document.createElement("video");return t.muted=!0,new Promise(o=>{t.onloadstart=()=>{o(t)};for(const l of r){const f=window.document.createElement("source");cr(l)||(t.crossOrigin="Anonymous"),f.src=l,t.appendChild(f)}})},m.a3=function(){return Ee++},m.a4=Zt,m.a5=Hl,m.a6=Wc,m.a7=Ma,m.a8=xi,m.a9=P_,m.aA=function(r){if(r.type==="custom")return new Q2(r);switch(r.type){case"background":return new K2(r);case"circle":return new Bw(r);case"fill":return new e2(r);case"fill-extrusion":return new m2(r);case"heatmap":return new Vw(r);case"hillshade":return new jw(r);case"line":return new E2(r);case"raster":return new Y2(r);case"symbol":return new gd(r)}},m.aB=Ie,m.aC=function(r,t){if(!r)return[{command:"setStyle",args:[t]}];let o=[];try{if(!Ze(r.version,t.version))return[{command:"setStyle",args:[t]}];Ze(r.center,t.center)||o.push({command:"setCenter",args:[t.center]}),Ze(r.zoom,t.zoom)||o.push({command:"setZoom",args:[t.zoom]}),Ze(r.bearing,t.bearing)||o.push({command:"setBearing",args:[t.bearing]}),Ze(r.pitch,t.pitch)||o.push({command:"setPitch",args:[t.pitch]}),Ze(r.sprite,t.sprite)||o.push({command:"setSprite",args:[t.sprite]}),Ze(r.glyphs,t.glyphs)||o.push({command:"setGlyphs",args:[t.glyphs]}),Ze(r.transition,t.transition)||o.push({command:"setTransition",args:[t.transition]}),Ze(r.light,t.light)||o.push({command:"setLight",args:[t.light]}),Ze(r.terrain,t.terrain)||o.push({command:"setTerrain",args:[t.terrain]}),Ze(r.sky,t.sky)||o.push({command:"setSky",args:[t.sky]}),Ze(r.projection,t.projection)||o.push({command:"setProjection",args:[t.projection]});const l={},f=[];(function(x,b,E,C){let L;for(L in b=b||{},x=x||{})Object.prototype.hasOwnProperty.call(x,L)&&(Object.prototype.hasOwnProperty.call(b,L)||We(L,E,C));for(L in b)Object.prototype.hasOwnProperty.call(b,L)&&(Object.prototype.hasOwnProperty.call(x,L)?Ze(x[L],b[L])||(x[L].type==="geojson"&&b[L].type==="geojson"&&St(x,b,L)?$e(E,{command:"setGeoJSONSourceData",args:[L,b[L].data]}):pt(L,b,E,C)):Qe(L,b,E))})(r.sources,t.sources,f,l);const y=[];r.layers&&r.layers.forEach(x=>{"source"in x&&l[x.source]?o.push({command:"removeLayer",args:[x.id]}):y.push(x)}),o=o.concat(f),function(x,b,E){b=b||[];const C=(x=x||[]).map(Mt),L=b.map(Mt),D=x.reduce(qt,{}),B=b.reduce(qt,{}),V=C.slice(),$=Object.create(null);let G,Q,oe,we,he;for(let xe=0,ze=0;xe@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(o,l,f,y)=>{const x=f||y;return t[l]=!x||x.toLowerCase(),""}),t["max-age"]){const o=parseInt(t["max-age"],10);isNaN(o)?delete t["max-age"]:t["max-age"]=o}return t},m.ab=function(r,t){const o=[];for(const l in r)l in t||o.push(l);return o},m.ac=Z,m.ad=function(r,t,o){var l=Math.sin(o),f=Math.cos(o),y=t[0],x=t[1],b=t[2],E=t[3],C=t[4],L=t[5],D=t[6],B=t[7];return t!==r&&(r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[0]=y*f+C*l,r[1]=x*f+L*l,r[2]=b*f+D*l,r[3]=E*f+B*l,r[4]=C*f-y*l,r[5]=L*f-x*l,r[6]=D*f-b*l,r[7]=B*f-E*l,r},m.ae=function(r){var t=new Vl(16);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],t},m.af=sd,m.ag=function(r,t){let o=0,l=0;if(r.kind==="constant")l=r.layoutSize;else if(r.kind!=="source"){const{interpolationType:f,minZoom:y,maxZoom:x}=r,b=f?Z(un.interpolationFactor(f,t,y,x),0,1):0;r.kind==="camera"?l=Fr.number(r.minSize,r.maxSize,b):o=b}return{uSizeT:o,uSize:l}},m.ai=function(r,{uSize:t,uSizeT:o},{lowerSize:l,upperSize:f}){return r.kind==="source"?l/Io:r.kind==="composite"?Fr.number(l/Io,f/Io,o):t},m.aj=Rp,m.ak=function(r,t,o,l){const f=t.y-r.y,y=t.x-r.x,x=l.y-o.y,b=l.x-o.x,E=x*y-b*f;if(E===0)return null;const C=(b*(r.y-o.y)-x*(r.x-o.x))/E;return new A(r.x+C*y,r.y+C*f)},m.al=O_,m.am=Sy,m.an=mp,m.ao=function(r){let t=1/0,o=1/0,l=-1/0,f=-1/0;for(const y of r)t=Math.min(t,y.x),o=Math.min(o,y.y),l=Math.max(l,y.x),f=Math.max(f,y.y);return[t,o,l,f]},m.ap=ar,m.ar=Dp,m.as=function(r,t){var o=t[0],l=t[1],f=t[2],y=t[3],x=t[4],b=t[5],E=t[6],C=t[7],L=t[8],D=t[9],B=t[10],V=t[11],$=t[12],G=t[13],Q=t[14],oe=t[15],we=o*b-l*x,he=o*E-f*x,xe=o*C-y*x,ze=l*E-f*b,qe=l*C-y*b,st=f*C-y*E,Tt=L*G-D*$,lt=L*Q-B*$,ot=L*oe-V*$,xt=D*Q-B*G,gt=D*oe-V*G,ft=B*oe-V*Q,Fe=we*ft-he*gt+xe*xt+ze*ot-qe*lt+st*Tt;return Fe?(r[0]=(b*ft-E*gt+C*xt)*(Fe=1/Fe),r[1]=(f*gt-l*ft-y*xt)*Fe,r[2]=(G*st-Q*qe+oe*ze)*Fe,r[3]=(B*qe-D*st-V*ze)*Fe,r[4]=(E*ot-x*ft-C*lt)*Fe,r[5]=(o*ft-f*ot+y*lt)*Fe,r[6]=(Q*xe-$*st-oe*he)*Fe,r[7]=(L*st-B*xe+V*he)*Fe,r[8]=(x*gt-b*ot+C*Tt)*Fe,r[9]=(l*ot-o*gt-y*Tt)*Fe,r[10]=($*qe-G*xe+oe*we)*Fe,r[11]=(D*xe-L*qe-V*we)*Fe,r[12]=(b*lt-x*xt-E*Tt)*Fe,r[13]=(o*xt-l*lt+f*Tt)*Fe,r[14]=(G*he-$*ze-Q*we)*Fe,r[15]=(L*ze-D*he+B*we)*Fe,r):null},m.at=Up,m.au=zp,m.av=qp,m.aw=function(){const r={},t=ae.$version;for(const o in ae.$root){const l=ae.$root[o];if(l.required){let f=null;f=o==="version"?t:l.type==="array"?[]:{},f!=null&&(r[o]=f)}}return r},m.ax=Wh,m.ay=Di,m.az=function(r){r=r.slice();const t=Object.create(null);for(let o=0;oft*ar)}let lt=x?"center":o.get("text-justify").evaluate(C,{},r.canonical);const ot=o.get("symbol-placement")==="point"?o.get("text-max-width").evaluate(C,{},r.canonical)*ar:1/0,xt=()=>{r.bucket.allowVerticalPlacement&&ou(xe)&&($.vertical=fd(G,r.glyphMap,r.glyphPositions,r.imagePositions,L,ot,y,st,"left",qe,oe,m.ah.vertical,!0,B,D))};if(!x&&Tt){const gt=new Set;if(lt==="auto")for(let Fe=0;Fec(void 0,void 0,void 0,function*(){if(r.byteLength===0)return createImageBitmap(new ImageData(1,1));const t=new Blob([new Uint8Array(r)],{type:"image/png"});try{return createImageBitmap(t)}catch(o){throw new Error(`Could not load image because of ${o.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),m.e=Se,m.f=r=>new Promise((t,o)=>{const l=new Image;l.onload=()=>{t(l),URL.revokeObjectURL(l.src),l.onload=null,window.requestAnimationFrame(()=>{l.src=nt})},l.onerror=()=>o(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 f=new Blob([new Uint8Array(r)],{type:"image/png"});l.src=r.byteLength?URL.createObjectURL(f):nt}),m.g=zi,m.h=(r,t)=>Or(Se(r,{type:"json"}),t),m.i=rt,m.j=ge,m.k=ce,m.l=(r,t)=>Or(Se(r,{type:"arrayBuffer"}),t),m.m=Or,m.n=function(r){return new Mp(r).readFields(F2,[])},m.o=yu,m.p=c_,m.q=d,m.r=ap,m.s=cr,m.t=nu,m.u=ct,m.v=ae,m.w=De,m.x=wa,m.y=function([r,t,o]){return t+=90,t*=Math.PI/180,o*=Math.PI/180,{x:r*Math.cos(t)*Math.sin(o),y:r*Math.sin(t)*Math.sin(o),z:r*Math.cos(o)}},m.z=Fr}),h("worker",["./shared"],function(m){class c{constructor(F){this.keyCache={},F&&this.replace(F)}replace(F){this._layerConfigs={},this._layers={},this.update(F,[])}update(F,N){for(const re of F){this._layerConfigs[re.id]=re;const de=this._layers[re.id]=m.aA(re);de._featureFilter=m.a6(de.filter),this.keyCache[re.id]&&delete this.keyCache[re.id]}for(const re of N)delete this.keyCache[re],delete this._layerConfigs[re],delete this._layers[re];this.familiesBySource={};const U=m.bi(Object.values(this._layerConfigs),this.keyCache);for(const re of U){const de=re.map(Oe=>this._layers[Oe.id]),_e=de[0];if(_e.visibility==="none")continue;const be=_e.source||"";let ue=this.familiesBySource[be];ue||(ue=this.familiesBySource[be]={});const Me=_e.sourceLayer||"_geojsonTileLayer";let Ue=ue[Me];Ue||(Ue=ue[Me]=[]),Ue.push(de)}}}class I{constructor(F){const N={},U=[];for(const be in F){const ue=F[be],Me=N[be]={};for(const Ue in ue){const Oe=ue[+Ue];if(!Oe||Oe.bitmap.width===0||Oe.bitmap.height===0)continue;const Re={x:0,y:0,w:Oe.bitmap.width+2,h:Oe.bitmap.height+2};U.push(Re),Me[Ue]={rect:Re,metrics:Oe.metrics}}}const{w:re,h:de}=m.p(U),_e=new m.o({width:re||1,height:de||1});for(const be in F){const ue=F[be];for(const Me in ue){const Ue=ue[+Me];if(!Ue||Ue.bitmap.width===0||Ue.bitmap.height===0)continue;const Oe=N[be][Me].rect;m.o.copy(Ue.bitmap,_e,{x:0,y:0},{x:Oe.x+1,y:Oe.y+1},Ue.bitmap)}}this.image=_e,this.positions=N}}m.bj("GlyphAtlas",I);class k{constructor(F){this.tileID=new m.Q(F.tileID.overscaledZ,F.tileID.wrap,F.tileID.canonical.z,F.tileID.canonical.x,F.tileID.canonical.y),this.uid=F.uid,this.zoom=F.zoom,this.pixelRatio=F.pixelRatio,this.tileSize=F.tileSize,this.source=F.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=F.showCollisionBoxes,this.collectResourceTiming=!!F.collectResourceTiming,this.returnDependencies=!!F.returnDependencies,this.promoteId=F.promoteId,this.inFlightDependencies=[]}parse(F,N,U,re){return m._(this,void 0,void 0,function*(){this.status="parsing",this.data=F,this.collisionBoxArray=new m.a4;const de=new m.bk(Object.keys(F.layers).sort()),_e=new m.bl(this.tileID,this.promoteId);_e.bucketLayerIDs=[];const be={},ue={featureIndex:_e,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:U},Me=N.familiesBySource[this.source];for(const Gt in Me){const Ri=F.layers[Gt];if(!Ri)continue;Ri.version===1&&m.w(`Vector tile source "${this.source}" layer "${Gt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const nr=de.encode(Gt),Zr=[];for(let ln=0;ln=or.maxzoom||or.visibility!=="none"&&(M(ln,this.zoom,U),(be[or.id]=or.createBucket({index:_e.bucketLayerIDs.length,layers:ln,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:nr,sourceID:this.source})).populate(Zr,ue,this.tileID.canonical),_e.bucketLayerIDs.push(ln.map(ms=>ms.id)))}}const Ue=m.aF(ue.glyphDependencies,Gt=>Object.keys(Gt).map(Number));this.inFlightDependencies.forEach(Gt=>Gt==null?void 0:Gt.abort()),this.inFlightDependencies=[];let Oe=Promise.resolve({});if(Object.keys(Ue).length){const Gt=new AbortController;this.inFlightDependencies.push(Gt),Oe=re.sendAsync({type:"GG",data:{stacks:Ue,source:this.source,tileID:this.tileID,type:"glyphs"}},Gt)}const Re=Object.keys(ue.iconDependencies);let It=Promise.resolve({});if(Re.length){const Gt=new AbortController;this.inFlightDependencies.push(Gt),It=re.sendAsync({type:"GI",data:{icons:Re,source:this.source,tileID:this.tileID,type:"icons"}},Gt)}const Et=Object.keys(ue.patternDependencies);let Jt=Promise.resolve({});if(Et.length){const Gt=new AbortController;this.inFlightDependencies.push(Gt),Jt=re.sendAsync({type:"GI",data:{icons:Et,source:this.source,tileID:this.tileID,type:"patterns"}},Gt)}const[Dt,ti,fi]=yield Promise.all([Oe,It,Jt]),Si=new I(Dt),Yi=new m.bm(ti,fi);for(const Gt in be){const Ri=be[Gt];Ri instanceof m.a5?(M(Ri.layers,this.zoom,U),m.bn({bucket:Ri,glyphMap:Dt,glyphPositions:Si.positions,imageMap:ti,imagePositions:Yi.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Ri.hasPattern&&(Ri instanceof m.bo||Ri instanceof m.bp||Ri instanceof m.bq)&&(M(Ri.layers,this.zoom,U),Ri.addFeatures(ue,this.tileID.canonical,Yi.patternPositions))}return this.status="done",{buckets:Object.values(be).filter(Gt=>!Gt.isEmpty()),featureIndex:_e,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Si.image,imageAtlas:Yi,glyphMap:this.returnDependencies?Dt:null,iconMap:this.returnDependencies?ti:null,glyphPositions:this.returnDependencies?Si.positions:null}})}}function M(te,F,N){const U=new m.a8(F);for(const re of te)re.recalculate(U,N)}class A{constructor(F,N,U){this.actor=F,this.layerIndex=N,this.availableImages=U,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(F,N){return m._(this,void 0,void 0,function*(){const U=yield m.l(F.request,N);try{return{vectorTile:new m.br.VectorTile(new m.bs(U.data)),rawData:U.data,cacheControl:U.cacheControl,expires:U.expires}}catch(re){const de=new Uint8Array(U.data);let _e=`Unable to parse the tile at ${F.request.url}, `;throw _e+=de[0]===31&&de[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${re.message}`,new Error(_e)}})}loadTile(F){return m._(this,void 0,void 0,function*(){const N=F.uid,U=!!(F&&F.request&&F.request.collectResourceTiming)&&new m.bt(F.request),re=new k(F);this.loading[N]=re;const de=new AbortController;re.abort=de;try{const _e=yield this.loadVectorTile(F,de);if(delete this.loading[N],!_e)return null;const be=_e.rawData,ue={};_e.expires&&(ue.expires=_e.expires),_e.cacheControl&&(ue.cacheControl=_e.cacheControl);const Me={};if(U){const Oe=U.finish();Oe&&(Me.resourceTiming=JSON.parse(JSON.stringify(Oe)))}re.vectorTile=_e.vectorTile;const Ue=re.parse(_e.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[N]=re,this.fetching[N]={rawTileData:be,cacheControl:ue,resourceTiming:Me};try{const Oe=yield Ue;return m.e({rawTileData:be.slice(0)},Oe,ue,Me)}finally{delete this.fetching[N]}}catch(_e){throw delete this.loading[N],re.status="done",this.loaded[N]=re,_e}})}reloadTile(F){return m._(this,void 0,void 0,function*(){const N=F.uid;if(!this.loaded||!this.loaded[N])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const U=this.loaded[N];if(U.showCollisionBoxes=F.showCollisionBoxes,U.status==="parsing"){const re=yield U.parse(U.vectorTile,this.layerIndex,this.availableImages,this.actor);let de;if(this.fetching[N]){const{rawTileData:_e,cacheControl:be,resourceTiming:ue}=this.fetching[N];delete this.fetching[N],de=m.e({rawTileData:_e.slice(0)},re,be,ue)}else de=re;return de}if(U.status==="done"&&U.vectorTile)return U.parse(U.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(F){return m._(this,void 0,void 0,function*(){const N=this.loading,U=F.uid;N&&N[U]&&N[U].abort&&(N[U].abort.abort(),delete N[U])})}removeTile(F){return m._(this,void 0,void 0,function*(){this.loaded&&this.loaded[F.uid]&&delete this.loaded[F.uid]})}}class z{constructor(){this.loaded={}}loadTile(F){return m._(this,void 0,void 0,function*(){const{uid:N,encoding:U,rawImageData:re,redFactor:de,greenFactor:_e,blueFactor:be,baseShift:ue}=F,Me=re.width+2,Ue=re.height+2,Oe=m.b(re)?new m.R({width:Me,height:Ue},yield m.bu(re,-1,-1,Me,Ue)):re,Re=new m.bv(N,Oe,U,de,_e,be,ue);return this.loaded=this.loaded||{},this.loaded[N]=Re,Re})}removeTile(F){const N=this.loaded,U=F.uid;N&&N[U]&&delete N[U]}}function q(te,F){if(te.length!==0){K(te[0],F);for(var N=1;N=Math.abs(be)?N-ue+be:be-ue+N,N=ue}N+U>=0!=!!F&&te.reverse()}var J=m.bw(function te(F,N){var U,re=F&&F.type;if(re==="FeatureCollection")for(U=0;U>31}function rt(te,F){for(var N=te.loadGeometry(),U=te.type,re=0,de=0,_e=N.length,be=0;be<_e;be++){var ue=N[be],Me=1;U===1&&(Me=ue.length),F.writeVarint(De(1,Me));for(var Ue=U===3?ue.length-1:ue.length,Oe=0;Oete},ei=Math.fround||($t=new Float32Array(1),te=>($t[0]=+te,$t[0]));var $t;const Vt=3,Nt=5,wi=6;class Xi{constructor(F){this.options=Object.assign(Object.create(nt),F),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(F){const{log:N,minZoom:U,maxZoom:re}=this.options;N&&console.time("total time");const de=`prepare ${F.length} points`;N&&console.time(de),this.points=F;const _e=[];for(let ue=0;ue=U;ue--){const Me=+Date.now();be=this.trees[ue]=this._createTree(this._cluster(be,ue)),N&&console.log("z%d: %d clusters in %dms",ue,be.numItems,+Date.now()-Me)}return N&&console.timeEnd("total time"),this}getClusters(F,N){let U=((F[0]+180)%360+360)%360-180;const re=Math.max(-90,Math.min(90,F[1]));let de=F[2]===180?180:((F[2]+180)%360+360)%360-180;const _e=Math.max(-90,Math.min(90,F[3]));if(F[2]-F[0]>=360)U=-180,de=180;else if(U>de){const Oe=this.getClusters([U,re,180,_e],N),Re=this.getClusters([-180,re,de,_e],N);return Oe.concat(Re)}const be=this.trees[this._limitZoom(N)],ue=be.range(Li(U),Di(_e),Li(de),Di(re)),Me=be.data,Ue=[];for(const Oe of ue){const Re=this.stride*Oe;Ue.push(Me[Re+Nt]>1?zi(Me,Re,this.clusterProps):this.points[Me[Re+Vt]])}return Ue}getChildren(F){const N=this._getOriginId(F),U=this._getOriginZoom(F),re="No cluster with the specified id.",de=this.trees[U];if(!de)throw new Error(re);const _e=de.data;if(N*this.stride>=_e.length)throw new Error(re);const be=this.options.radius/(this.options.extent*Math.pow(2,U-1)),ue=de.within(_e[N*this.stride],_e[N*this.stride+1],be),Me=[];for(const Ue of ue){const Oe=Ue*this.stride;_e[Oe+4]===F&&Me.push(_e[Oe+Nt]>1?zi(_e,Oe,this.clusterProps):this.points[_e[Oe+Vt]])}if(Me.length===0)throw new Error(re);return Me}getLeaves(F,N,U){const re=[];return this._appendLeaves(re,F,N=N||10,U=U||0,0),re}getTile(F,N,U){const re=this.trees[this._limitZoom(F)],de=Math.pow(2,F),{extent:_e,radius:be}=this.options,ue=be/_e,Me=(U-ue)/de,Ue=(U+1+ue)/de,Oe={features:[]};return this._addTileFeatures(re.range((N-ue)/de,Me,(N+1+ue)/de,Ue),re.data,N,U,de,Oe),N===0&&this._addTileFeatures(re.range(1-ue/de,Me,1,Ue),re.data,de,U,de,Oe),N===de-1&&this._addTileFeatures(re.range(0,Me,ue/de,Ue),re.data,-1,U,de,Oe),Oe.features.length?Oe:null}getClusterExpansionZoom(F){let N=this._getOriginZoom(F)-1;for(;N<=this.options.maxZoom;){const U=this.getChildren(F);if(N++,U.length!==1)break;F=U[0].properties.cluster_id}return N}_appendLeaves(F,N,U,re,de){const _e=this.getChildren(N);for(const be of _e){const ue=be.properties;if(ue&&ue.cluster?de+ue.point_count<=re?de+=ue.point_count:de=this._appendLeaves(F,ue.cluster_id,U,re,de):de1;let Ue,Oe,Re;if(Me)Ue=hi(N,ue,this.clusterProps),Oe=N[ue],Re=N[ue+1];else{const Jt=this.points[N[ue+Vt]];Ue=Jt.properties;const[Dt,ti]=Jt.geometry.coordinates;Oe=Li(Dt),Re=Di(ti)}const It={type:1,geometry:[[Math.round(this.options.extent*(Oe*de-U)),Math.round(this.options.extent*(Re*de-re))]],tags:Ue};let Et;Et=Me||this.options.generateId?N[ue+Vt]:this.points[N[ue+Vt]].id,Et!==void 0&&(It.id=Et),_e.features.push(It)}}_limitZoom(F){return Math.max(this.options.minZoom,Math.min(Math.floor(+F),this.options.maxZoom+1))}_cluster(F,N){const{radius:U,extent:re,reduce:de,minPoints:_e}=this.options,be=U/(re*Math.pow(2,N)),ue=F.data,Me=[],Ue=this.stride;for(let Oe=0;OeN&&(Dt+=ue[fi+Nt])}if(Dt>Jt&&Dt>=_e){let ti,fi=Re*Jt,Si=It*Jt,Yi=-1;const Gt=((Oe/Ue|0)<<5)+(N+1)+this.points.length;for(const Ri of Et){const nr=Ri*Ue;if(ue[nr+2]<=N)continue;ue[nr+2]=N;const Zr=ue[nr+Nt];fi+=ue[nr]*Zr,Si+=ue[nr+1]*Zr,ue[nr+4]=Gt,de&&(ti||(ti=this._map(ue,Oe,!0),Yi=this.clusterProps.length,this.clusterProps.push(ti)),de(ti,this._map(ue,nr)))}ue[Oe+4]=Gt,Me.push(fi/Dt,Si/Dt,1/0,Gt,-1,Dt),de&&Me.push(Yi)}else{for(let ti=0;ti1)for(const ti of Et){const fi=ti*Ue;if(!(ue[fi+2]<=N)){ue[fi+2]=N;for(let Si=0;Si>5}_getOriginZoom(F){return(F-this.points.length)%32}_map(F,N,U){if(F[N+Nt]>1){const _e=this.clusterProps[F[N+wi]];return U?Object.assign({},_e):_e}const re=this.points[F[N+Vt]].properties,de=this.options.map(re);return U&&de===re?Object.assign({},de):de}}function zi(te,F,N){return{type:"Feature",id:te[F+Vt],properties:hi(te,F,N),geometry:{type:"Point",coordinates:[(U=te[F],360*(U-.5)),Or(te[F+1])]}};var U}function hi(te,F,N){const U=te[F+Nt],re=U>=1e4?`${Math.round(U/1e3)}k`:U>=1e3?Math.round(U/100)/10+"k":U,de=te[F+wi],_e=de===-1?{}:Object.assign({},N[de]);return Object.assign(_e,{cluster:!0,cluster_id:te[F+Vt],point_count:U,point_count_abbreviated:re})}function Li(te){return te/360+.5}function Di(te){const F=Math.sin(te*Math.PI/180),N=.5-.25*Math.log((1+F)/(1-F))/Math.PI;return N<0?0:N>1?1:N}function Or(te){const F=(180-360*te)*Math.PI/180;return 360*Math.atan(Math.exp(F))/Math.PI-90}function cr(te,F,N,U){for(var re,de=U,_e=N-F>>1,be=N-F,ue=te[F],Me=te[F+1],Ue=te[N],Oe=te[N+1],Re=F+3;Rede)re=Re,de=It;else if(It===de){var Et=Math.abs(Re-_e);EtU&&(re-F>3&&cr(te,F,re,U),te[re+2]=de,N-re>3&&cr(te,re,N,U))}function Br(te,F,N,U,re,de){var _e=re-N,be=de-U;if(_e!==0||be!==0){var ue=((te-N)*_e+(F-U)*be)/(_e*_e+be*be);ue>1?(N=re,U=de):ue>0&&(N+=_e*ue,U+=be*ue)}return(_e=te-N)*_e+(be=F-U)*be}function rr(te,F,N,U){var re={id:te===void 0?null:te,type:F,geometry:N,tags:U,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(de){var _e=de.geometry,be=de.type;if(be==="Point"||be==="MultiPoint"||be==="LineString")ce(de,_e);else if(be==="Polygon"||be==="MultiLineString")for(var ue=0;ue<_e.length;ue++)ce(de,_e[ue]);else if(be==="MultiPolygon")for(ue=0;ue<_e.length;ue++)for(var Me=0;Me<_e[ue].length;Me++)ce(de,_e[ue][Me])}(re),re}function ce(te,F){for(var N=0;N0&&(_e+=U?(re*Me-ue*de)/2:Math.sqrt(Math.pow(ue-re,2)+Math.pow(Me-de,2))),re=ue,de=Me}var Ue=F.length-3;F[2]=1,cr(F,0,Ue,N),F[Ue+2]=1,F.size=Math.abs(_e),F.start=0,F.end=F.size}function He(te,F,N,U){for(var re=0;re1?1:N}function $e(te,F,N,U,re,de,_e,be){if(U/=F,de>=(N/=F)&&_e=U)return null;for(var ue=[],Me=0;Me=N&&Et=U)){var Jt=[];if(Re==="Point"||Re==="MultiPoint")Qe(Oe,Jt,N,U,re);else if(Re==="LineString")We(Oe,Jt,N,U,re,!1,be.lineMetrics);else if(Re==="MultiLineString")St(Oe,Jt,N,U,re,!1);else if(Re==="Polygon")St(Oe,Jt,N,U,re,!0);else if(Re==="MultiPolygon")for(var Dt=0;Dt=N&&_e<=U&&(F.push(te[de]),F.push(te[de+1]),F.push(te[de+2]))}}function We(te,F,N,U,re,de,_e){for(var be,ue,Me=pt(te),Ue=re===0?Mt:qt,Oe=te.start,Re=0;ReN&&(ue=Ue(Me,It,Et,Dt,ti,N),_e&&(Me.start=Oe+be*ue)):fi>U?Si=N&&(ue=Ue(Me,It,Et,Dt,ti,N),Yi=!0),Si>U&&fi<=U&&(ue=Ue(Me,It,Et,Dt,ti,U),Yi=!0),!de&&Yi&&(_e&&(Me.end=Oe+be*ue),F.push(Me),Me=pt(te)),_e&&(Oe+=be)}var Gt=te.length-3;It=te[Gt],Et=te[Gt+1],Jt=te[Gt+2],(fi=re===0?It:Et)>=N&&fi<=U&&vt(Me,It,Et,Jt),Gt=Me.length-3,de&&Gt>=3&&(Me[Gt]!==Me[0]||Me[Gt+1]!==Me[1])&&vt(Me,Me[0],Me[1],Me[2]),Me.length&&F.push(Me)}function pt(te){var F=[];return F.size=te.size,F.start=te.start,F.end=te.end,F}function St(te,F,N,U,re,de){for(var _e=0;_e_e.maxX&&(_e.maxX=Ue),Oe>_e.maxY&&(_e.maxY=Oe)}return _e}function Ye(te,F,N,U){var re=F.geometry,de=F.type,_e=[];if(de==="Point"||de==="MultiPoint")for(var be=0;be0&&F.size<(re?_e:U))N.numPoints+=F.length/3;else{for(var be=[],ue=0;ue_e)&&(N.numSimplified++,be.push(F[ue]),be.push(F[ue+1])),N.numPoints++;re&&function(Me,Ue){for(var Oe=0,Re=0,It=Me.length,Et=It-2;Re0===Ue)for(Re=0,It=Me.length;Re24)throw new Error("maxZoom should be in the 0-24 range");if(F.promoteId&&F.generateId)throw new Error("promoteId and generateId cannot be used together.");var U=function(re,de){var _e=[];if(re.type==="FeatureCollection")for(var be=0;be1&&console.time("creation"),Re=this.tiles[Oe]=Gr(te,F,N,U,ue),this.tileCoords.push({z:F,x:N,y:U}),Me)){Me>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",F,N,U,Re.numFeatures,Re.numPoints,Re.numSimplified),console.timeEnd("creation"));var It="z"+F;this.stats[It]=(this.stats[It]||0)+1,this.total++}if(Re.source=te,re){if(F===ue.maxZoom||F===re)continue;var Et=1<1&&console.time("clipping");var Jt,Dt,ti,fi,Si,Yi,Gt=.5*ue.buffer/ue.extent,Ri=.5-Gt,nr=.5+Gt,Zr=1+Gt;Jt=Dt=ti=fi=null,Si=$e(te,Ue,N-Gt,N+nr,0,Re.minX,Re.maxX,ue),Yi=$e(te,Ue,N+Ri,N+Zr,0,Re.minX,Re.maxX,ue),te=null,Si&&(Jt=$e(Si,Ue,U-Gt,U+nr,1,Re.minY,Re.maxY,ue),Dt=$e(Si,Ue,U+Ri,U+Zr,1,Re.minY,Re.maxY,ue),Si=null),Yi&&(ti=$e(Yi,Ue,U-Gt,U+nr,1,Re.minY,Re.maxY,ue),fi=$e(Yi,Ue,U+Ri,U+Zr,1,Re.minY,Re.maxY,ue),Yi=null),Me>1&&console.timeEnd("clipping"),be.push(Jt||[],F+1,2*N,2*U),be.push(Dt||[],F+1,2*N,2*U+1),be.push(ti||[],F+1,2*N+1,2*U),be.push(fi||[],F+1,2*N+1,2*U+1)}}},zt.prototype.getTile=function(te,F,N){var U=this.options,re=U.extent,de=U.debug;if(te<0||te>24)return null;var _e=1<1&&console.log("drilling down to z%d-%d-%d",te,F,N);for(var ue,Me=te,Ue=F,Oe=N;!ue&&Me>0;)Me--,Ue=Math.floor(Ue/2),Oe=Math.floor(Oe/2),ue=this.tiles[di(Me,Ue,Oe)];return ue&&ue.source?(de>1&&console.log("found parent tile z%d-%d-%d",Me,Ue,Oe),de>1&&console.time("drilling down"),this.splitTile(ue.source,Me,Ue,Oe,te,F,N),de>1&&console.timeEnd("drilling down"),this.tiles[be]?si(this.tiles[be],re):null):null};class to extends A{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(F,N){return m._(this,void 0,void 0,function*(){const U=F.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const re=this._geoJSONIndex.getTile(U.z,U.x,U.y);if(!re)return null;const de=new class{constructor(be){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=m.W,this.length=be.length,this._features=be}feature(be){return new class{constructor(ue){this._feature=ue,this.extent=m.W,this.type=ue.type,this.properties=ue.tags,"id"in ue&&!isNaN(ue.id)&&(this.id=parseInt(ue.id,10))}loadGeometry(){if(this._feature.type===1){const ue=[];for(const Me of this._feature.geometry)ue.push([new m.P(Me[0],Me[1])]);return ue}{const ue=[];for(const Me of this._feature.geometry){const Ue=[];for(const Oe of Me)Ue.push(new m.P(Oe[0],Oe[1]));ue.push(Ue)}return ue}}toGeoJSON(ue,Me,Ue){return se.call(this,ue,Me,Ue)}}(this._features[be])}}(re.features);let _e=dt(de);return _e.byteOffset===0&&_e.byteLength===_e.buffer.byteLength||(_e=new Uint8Array(_e)),{vectorTile:de,rawData:_e.buffer}})}loadData(F){return m._(this,void 0,void 0,function*(){var N;(N=this._pendingRequest)===null||N===void 0||N.abort();const U=!!(F&&F.request&&F.request.collectResourceTiming)&&new m.bt(F.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(F,this._pendingRequest),this._geoJSONIndex=F.cluster?new Xi(function({superclusterOptions:de,clusterProperties:_e}){if(!_e||!de)return de;const be={},ue={},Me={accumulated:null,zoom:0},Ue={properties:null},Oe=Object.keys(_e);for(const Re of Oe){const[It,Et]=_e[Re],Jt=m.bA(Et),Dt=m.bA(typeof It=="string"?[It,["accumulated"],["get",Re]]:It);be[Re]=Jt.value,ue[Re]=Dt.value}return de.map=Re=>{Ue.properties=Re;const It={};for(const Et of Oe)It[Et]=be[Et].evaluate(Me,Ue);return It},de.reduce=(Re,It)=>{Ue.properties=It;for(const Et of Oe)Me.accumulated=Re[Et],Re[Et]=ue[Et].evaluate(Me,Ue)},de}(F)).load((yield this._pendingData).features):new zt(yield this._pendingData,F.geojsonVtOptions),this.loaded={};const re={};if(U){const de=U.finish();de&&(re.resourceTiming={},re.resourceTiming[F.source]=JSON.parse(JSON.stringify(de)))}return re}catch(re){if(delete this._pendingRequest,m.bz(re))return{abandoned:!0};throw re}})}getData(){return m._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(F){const N=this.loaded;return N&&N[F.uid]?super.reloadTile(F):this.loadTile(F)}loadAndProcessGeoJSON(F,N){return m._(this,void 0,void 0,function*(){let U=yield this.loadGeoJSON(F,N);if(delete this._pendingRequest,typeof U!="object")throw new Error(`Input data given to '${F.source}' is not a valid GeoJSON object.`);if(J(U,!0),F.filter){const re=m.bA(F.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(re.result==="error")throw new Error(re.value.map(_e=>`${_e.key}: ${_e.message}`).join(", "));U={type:"FeatureCollection",features:U.features.filter(_e=>re.value.evaluate({zoom:0},_e))}}return U})}loadGeoJSON(F,N){return m._(this,void 0,void 0,function*(){const{promoteId:U}=F;if(F.request){const re=yield m.h(F.request,N);return this._dataUpdateable=Bt(re.data,U)?eo(re.data,U):void 0,re.data}if(typeof F.data=="string")try{const re=JSON.parse(F.data);return this._dataUpdateable=Bt(re,U)?eo(re,U):void 0,re}catch{throw new Error(`Input data given to '${F.source}' is not a valid GeoJSON object.`)}if(!F.dataDiff)throw new Error(`Input data given to '${F.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${F.source}`);return function(re,de,_e){var be,ue,Me,Ue;if(de.removeAll&&re.clear(),de.remove)for(const Oe of de.remove)re.delete(Oe);if(de.add)for(const Oe of de.add){const Re=Ei(Oe,_e);Re!=null&&re.set(Re,Oe)}if(de.update)for(const Oe of de.update){let Re=re.get(Oe.id);if(Re==null)continue;const It=!Oe.removeAllProperties&&(((be=Oe.removeProperties)===null||be===void 0?void 0:be.length)>0||((ue=Oe.addOrUpdateProperties)===null||ue===void 0?void 0:ue.length)>0);if((Oe.newGeometry||Oe.removeAllProperties||It)&&(Re=Object.assign({},Re),re.set(Oe.id,Re),It&&(Re.properties=Object.assign({},Re.properties))),Oe.newGeometry&&(Re.geometry=Oe.newGeometry),Oe.removeAllProperties)Re.properties={};else if(((Me=Oe.removeProperties)===null||Me===void 0?void 0:Me.length)>0)for(const Et of Oe.removeProperties)Object.prototype.hasOwnProperty.call(Re.properties,Et)&&delete Re.properties[Et];if(((Ue=Oe.addOrUpdateProperties)===null||Ue===void 0?void 0:Ue.length)>0)for(const{key:Et,value:Jt}of Oe.addOrUpdateProperties)Re.properties[Et]=Jt}}(this._dataUpdateable,F.dataDiff,U),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(F){return m._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(F){return this._geoJSONIndex.getClusterExpansionZoom(F.clusterId)}getClusterChildren(F){return this._geoJSONIndex.getChildren(F.clusterId)}getClusterLeaves(F){return this._geoJSONIndex.getLeaves(F.clusterId,F.limit,F.offset)}}class hr{constructor(F){this.self=F,this.actor=new m.C(F),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(N,U)=>{if(this.externalWorkerSourceTypes[N])throw new Error(`Worker source with name "${N}" already registered.`);this.externalWorkerSourceTypes[N]=U},this.self.addProtocol=m.bg,this.self.removeProtocol=m.bh,this.self.registerRTLTextPlugin=N=>{if(m.bB.isParsed())throw new Error("RTL text plugin already registered.");m.bB.setMethods(N)},this.actor.registerMessageHandler("LDT",(N,U)=>this._getDEMWorkerSource(N,U.source).loadTile(U)),this.actor.registerMessageHandler("RDT",(N,U)=>m._(this,void 0,void 0,function*(){this._getDEMWorkerSource(N,U.source).removeTile(U)})),this.actor.registerMessageHandler("GCEZ",(N,U)=>m._(this,void 0,void 0,function*(){return this._getWorkerSource(N,U.type,U.source).getClusterExpansionZoom(U)})),this.actor.registerMessageHandler("GCC",(N,U)=>m._(this,void 0,void 0,function*(){return this._getWorkerSource(N,U.type,U.source).getClusterChildren(U)})),this.actor.registerMessageHandler("GCL",(N,U)=>m._(this,void 0,void 0,function*(){return this._getWorkerSource(N,U.type,U.source).getClusterLeaves(U)})),this.actor.registerMessageHandler("LD",(N,U)=>this._getWorkerSource(N,U.type,U.source).loadData(U)),this.actor.registerMessageHandler("GD",(N,U)=>this._getWorkerSource(N,U.type,U.source).getData()),this.actor.registerMessageHandler("LT",(N,U)=>this._getWorkerSource(N,U.type,U.source).loadTile(U)),this.actor.registerMessageHandler("RT",(N,U)=>this._getWorkerSource(N,U.type,U.source).reloadTile(U)),this.actor.registerMessageHandler("AT",(N,U)=>this._getWorkerSource(N,U.type,U.source).abortTile(U)),this.actor.registerMessageHandler("RMT",(N,U)=>this._getWorkerSource(N,U.type,U.source).removeTile(U)),this.actor.registerMessageHandler("RS",(N,U)=>m._(this,void 0,void 0,function*(){if(!this.workerSources[N]||!this.workerSources[N][U.type]||!this.workerSources[N][U.type][U.source])return;const re=this.workerSources[N][U.type][U.source];delete this.workerSources[N][U.type][U.source],re.removeSource!==void 0&&re.removeSource(U)})),this.actor.registerMessageHandler("RM",N=>m._(this,void 0,void 0,function*(){delete this.layerIndexes[N],delete this.availableImages[N],delete this.workerSources[N],delete this.demWorkerSources[N]})),this.actor.registerMessageHandler("SR",(N,U)=>m._(this,void 0,void 0,function*(){this.referrer=U})),this.actor.registerMessageHandler("SRPS",(N,U)=>this._syncRTLPluginState(N,U)),this.actor.registerMessageHandler("IS",(N,U)=>m._(this,void 0,void 0,function*(){this.self.importScripts(U)})),this.actor.registerMessageHandler("SI",(N,U)=>this._setImages(N,U)),this.actor.registerMessageHandler("UL",(N,U)=>m._(this,void 0,void 0,function*(){this._getLayerIndex(N).update(U.layers,U.removedIds)})),this.actor.registerMessageHandler("SL",(N,U)=>m._(this,void 0,void 0,function*(){this._getLayerIndex(N).replace(U)}))}_setImages(F,N){return m._(this,void 0,void 0,function*(){this.availableImages[F]=N;for(const U in this.workerSources[F]){const re=this.workerSources[F][U];for(const de in re)re[de].availableImages=N}})}_syncRTLPluginState(F,N){return m._(this,void 0,void 0,function*(){if(m.bB.isParsed())return m.bB.getState();if(N.pluginStatus!=="loading")return m.bB.setState(N),N;const U=N.pluginURL;if(this.self.importScripts(U),m.bB.isParsed()){const re={pluginStatus:"loaded",pluginURL:U};return m.bB.setState(re),re}throw m.bB.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${U}`)})}_getAvailableImages(F){let N=this.availableImages[F];return N||(N=[]),N}_getLayerIndex(F){let N=this.layerIndexes[F];return N||(N=this.layerIndexes[F]=new c),N}_getWorkerSource(F,N,U){if(this.workerSources[F]||(this.workerSources[F]={}),this.workerSources[F][N]||(this.workerSources[F][N]={}),!this.workerSources[F][N][U]){const re={sendAsync:(de,_e)=>(de.targetMapId=F,this.actor.sendAsync(de,_e))};switch(N){case"vector":this.workerSources[F][N][U]=new A(re,this._getLayerIndex(F),this._getAvailableImages(F));break;case"geojson":this.workerSources[F][N][U]=new to(re,this._getLayerIndex(F),this._getAvailableImages(F));break;default:this.workerSources[F][N][U]=new this.externalWorkerSourceTypes[N](re,this._getLayerIndex(F),this._getAvailableImages(F))}}return this.workerSources[F][N][U]}_getDEMWorkerSource(F,N){return this.demWorkerSources[F]||(this.demWorkerSources[F]={}),this.demWorkerSources[F][N]||(this.demWorkerSources[F][N]=new z),this.demWorkerSources[F][N]}}return m.i(self)&&(self.worker=new hr(self)),hr}),h("index",["exports","./shared"],function(m,c){var I="4.4.1";let k,M;const A={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:_=>new Promise((i,a)=>{const d=requestAnimationFrame(i);_.signal.addEventListener("abort",()=>{cancelAnimationFrame(d),a(c.c())})}),getImageData(_,i=0){return this.getImageCanvasContext(_).getImageData(-i,-i,_.width+2*i,_.height+2*i)},getImageCanvasContext(_){const i=window.document.createElement("canvas"),a=i.getContext("2d",{willReadFrequently:!0});if(!a)throw new Error("failed to create canvas 2d context");return i.width=_.width,i.height=_.height,a.drawImage(_,0,0,_.width,_.height),a},resolveURL:_=>(k||(k=document.createElement("a")),k.href=_,k.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(M==null&&(M=matchMedia("(prefers-reduced-motion: reduce)")),M.matches)}};class z{static testProp(i){if(!z.docStyle)return i[0];for(let a=0;a{window.removeEventListener("click",z.suppressClickInternal,!0)},0)}static getScale(i){const a=i.getBoundingClientRect();return{x:a.width/i.offsetWidth||1,y:a.height/i.offsetHeight||1,boundingClientRect:a}}static getPoint(i,a,d){const p=a.boundingClientRect;return new c.P((d.clientX-p.left)/a.x-i.clientLeft,(d.clientY-p.top)/a.y-i.clientTop)}static mousePos(i,a){const d=z.getScale(i);return z.getPoint(i,d,a)}static touchPos(i,a){const d=[],p=z.getScale(i);for(let v=0;v{K&&ye(K),K=null,ke=!0},J.onerror=()=>{se=!0,K=null},J.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(_){let i,a,d,p;_.resetRequestQueue=()=>{i=[],a=0,d=0,p={}},_.addThrottleControl=T=>{const P=d++;return p[P]=T,P},_.removeThrottleControl=T=>{delete p[T],w()},_.getImage=(T,P,O=!0)=>new Promise((R,j)=>{q.supported&&(T.headers||(T.headers={}),T.headers.accept="image/webp,*/*"),c.e(T,{type:"image"}),i.push({abortController:P,requestParameters:T,supportImageRefresh:O,state:"queued",onError:H=>{j(H)},onSuccess:H=>{R(H)}}),w()});const v=T=>c._(this,void 0,void 0,function*(){T.state="running";const{requestParameters:P,supportImageRefresh:O,onError:R,onSuccess:j,abortController:H}=T,X=O===!1&&!c.i(self)&&!c.g(P.url)&&(!P.headers||Object.keys(P.headers).reduce((le,me)=>le&&me==="accept",!0));a++;const ne=X?S(P,H):c.m(P,H);try{const le=yield ne;delete T.abortController,T.state="completed",le.data instanceof HTMLImageElement||c.b(le.data)?j(le):le.data&&j({data:yield(Y=le.data,typeof createImageBitmap=="function"?c.d(Y):c.f(Y)),cacheControl:le.cacheControl,expires:le.expires})}catch(le){delete T.abortController,R(le)}finally{a--,w()}var Y}),w=()=>{const T=(()=>{for(const P of Object.keys(p))if(p[P]())return!0;return!1})()?c.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:c.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let P=a;P0;P++){const O=i.shift();O.abortController.signal.aborted?P--:v(O)}},S=(T,P)=>new Promise((O,R)=>{const j=new Image,H=T.url,X=T.credentials;X&&X==="include"?j.crossOrigin="use-credentials":(X&&X==="same-origin"||!c.s(H))&&(j.crossOrigin="anonymous"),P.signal.addEventListener("abort",()=>{j.src="",R(c.c())}),j.fetchPriority="high",j.onload=()=>{j.onerror=j.onload=null,O({data:j})},j.onerror=()=>{j.onerror=j.onload=null,P.signal.aborted||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."))},j.src=H})}(W||(W={})),W.resetRequestQueue();class fe{constructor(i){this._transformRequestFn=i}transformRequest(i,a){return this._transformRequestFn&&this._transformRequestFn(i,a)||{url:i}}setTransformRequest(i){this._transformRequestFn=i}}function Z(_){var i=new c.A(3);return i[0]=_[0],i[1]=_[1],i[2]=_[2],i}var ee,Se=function(_,i,a){return _[0]=i[0]-a[0],_[1]=i[1]-a[1],_[2]=i[2]-a[2],_};ee=new c.A(3),c.A!=Float32Array&&(ee[0]=0,ee[1]=0,ee[2]=0);var Ee=function(_){var i=_[0],a=_[1];return i*i+a*a};function Le(_){const i=[];if(typeof _=="string")i.push({id:"default",url:_});else if(_&&_.length>0){const a=[];for(const{id:d,url:p}of _){const v=`${d}${p}`;a.indexOf(v)===-1&&(a.push(v),i.push({id:d,url:p}))}}return i}function pe(_,i,a){const d=_.split("?");return d[0]+=`${i}${a}`,d.join("?")}(function(){var _=new c.A(2);c.A!=Float32Array&&(_[0]=0,_[1]=0)})();class Ie{constructor(i,a,d,p){this.context=i,this.format=d,this.texture=i.gl.createTexture(),this.update(a,p)}update(i,a,d){const{width:p,height:v}=i,w=!(this.size&&this.size[0]===p&&this.size[1]===v||d),{context:S}=this,{gl:T}=S;if(this.useMipmap=!!(a&&a.useMipmap),T.bindTexture(T.TEXTURE_2D,this.texture),S.pixelStoreUnpackFlipY.set(!1),S.pixelStoreUnpack.set(1),S.pixelStoreUnpackPremultiplyAlpha.set(this.format===T.RGBA&&(!a||a.premultiply!==!1)),w)this.size=[p,v],i instanceof HTMLImageElement||i instanceof HTMLCanvasElement||i instanceof HTMLVideoElement||i instanceof ImageData||c.b(i)?T.texImage2D(T.TEXTURE_2D,0,this.format,this.format,T.UNSIGNED_BYTE,i):T.texImage2D(T.TEXTURE_2D,0,this.format,p,v,0,this.format,T.UNSIGNED_BYTE,i.data);else{const{x:P,y:O}=d||{x:0,y:0};i instanceof HTMLImageElement||i instanceof HTMLCanvasElement||i instanceof HTMLVideoElement||i instanceof ImageData||c.b(i)?T.texSubImage2D(T.TEXTURE_2D,0,P,O,T.RGBA,T.UNSIGNED_BYTE,i):T.texSubImage2D(T.TEXTURE_2D,0,P,O,p,v,T.RGBA,T.UNSIGNED_BYTE,i.data)}this.useMipmap&&this.isSizePowerOfTwo()&&T.generateMipmap(T.TEXTURE_2D)}bind(i,a,d){const{context:p}=this,{gl:v}=p;v.bindTexture(v.TEXTURE_2D,this.texture),d!==v.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(d=v.LINEAR),i!==this.filter&&(v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MAG_FILTER,i),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MIN_FILTER,d||i),this.filter=i),a!==this.wrap&&(v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_S,a),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_T,a),this.wrap=a)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:i}=this.context;i.deleteTexture(this.texture),this.texture=null}}function Ae(_){const{userImage:i}=_;return!!(i&&i.render&&i.render())&&(_.data.replace(new Uint8Array(i.data.buffer)),!0)}class De extends c.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new c.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(i){if(this.loaded!==i&&(this.loaded=i,i)){for(const{ids:a,promiseResolve:d}of this.requestors)d(this._getImagesForIds(a));this.requestors=[]}}getImage(i){const a=this.images[i];if(a&&!a.data&&a.spriteData){const d=a.spriteData;a.data=new c.R({width:d.width,height:d.height},d.context.getImageData(d.x,d.y,d.width,d.height).data),a.spriteData=null}return a}addImage(i,a){if(this.images[i])throw new Error(`Image id ${i} already exist, use updateImage instead`);this._validate(i,a)&&(this.images[i]=a)}_validate(i,a){let d=!0;const p=a.data||a.spriteData;return this._validateStretch(a.stretchX,p&&p.width)||(this.fire(new c.j(new Error(`Image "${i}" has invalid "stretchX" value`))),d=!1),this._validateStretch(a.stretchY,p&&p.height)||(this.fire(new c.j(new Error(`Image "${i}" has invalid "stretchY" value`))),d=!1),this._validateContent(a.content,a)||(this.fire(new c.j(new Error(`Image "${i}" has invalid "content" value`))),d=!1),d}_validateStretch(i,a){if(!i)return!0;let d=0;for(const p of i){if(p[0]{let p=!0;if(!this.isLoaded())for(const v of i)this.images[v]||(p=!1);this.isLoaded()||p?a(this._getImagesForIds(i)):this.requestors.push({ids:i,promiseResolve:a})})}_getImagesForIds(i){const a={};for(const d of i){let p=this.getImage(d);p||(this.fire(new c.k("styleimagemissing",{id:d})),p=this.getImage(d)),p?a[d]={data:p.data.clone(),pixelRatio:p.pixelRatio,sdf:p.sdf,version:p.version,stretchX:p.stretchX,stretchY:p.stretchY,content:p.content,textFitWidth:p.textFitWidth,textFitHeight:p.textFitHeight,hasRenderCallback:!!(p.userImage&&p.userImage.render)}:c.w(`Image "${d}" 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 a}getPixelSize(){const{width:i,height:a}=this.atlasImage;return{width:i,height:a}}getPattern(i){const a=this.patterns[i],d=this.getImage(i);if(!d)return null;if(a&&a.position.version===d.version)return a.position;if(a)a.position.version=d.version;else{const p={w:d.data.width+2,h:d.data.height+2,x:0,y:0},v=new c.I(p,d);this.patterns[i]={bin:p,position:v}}return this._updatePatternAtlas(),this.patterns[i].position}bind(i){const a=i.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new Ie(i,this.atlasImage,a.RGBA),this.atlasTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE)}_updatePatternAtlas(){const i=[];for(const v in this.patterns)i.push(this.patterns[v].bin);const{w:a,h:d}=c.p(i),p=this.atlasImage;p.resize({width:a||1,height:d||1});for(const v in this.patterns){const{bin:w}=this.patterns[v],S=w.x+1,T=w.y+1,P=this.getImage(v).data,O=P.width,R=P.height;c.R.copy(P,p,{x:0,y:0},{x:S,y:T},{width:O,height:R}),c.R.copy(P,p,{x:0,y:R-1},{x:S,y:T-1},{width:O,height:1}),c.R.copy(P,p,{x:0,y:0},{x:S,y:T+R},{width:O,height:1}),c.R.copy(P,p,{x:O-1,y:0},{x:S-1,y:T},{width:1,height:R}),c.R.copy(P,p,{x:0,y:0},{x:S+O,y:T},{width:1,height:R})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(i){for(const a of i){if(this.callbackDispatchedThisFrame[a])continue;this.callbackDispatchedThisFrame[a]=!0;const d=this.getImage(a);d||c.w(`Image with ID: "${a}" was not found`),Ae(d)&&this.updateImage(a,d)}}}const Ge=1e20;function rt(_,i,a,d,p,v,w,S,T){for(let P=i;P-1);T++,v[T]=S,w[T]=P,w[T+1]=Ge}for(let S=0,T=0;S65535)throw new Error("glyphs > 65535 not supported");if(d.ranges[v])return{stack:i,id:a,glyph:p};if(!this.url)throw new Error("glyphsUrl is not set");if(!d.requests[v]){const S=dt.loadGlyphRange(i,v,this.url,this.requestManager);d.requests[v]=S}const w=yield d.requests[v];for(const S in w)this._doesCharSupportLocalGlyph(+S)||(d.glyphs[+S]=w[+S]);return d.ranges[v]=!0,{stack:i,id:a,glyph:w[a]||null}})}_doesCharSupportLocalGlyph(i){return!!this.localIdeographFontFamily&&(c.u["CJK Unified Ideographs"](i)||c.u["Hangul Syllables"](i)||c.u.Hiragana(i)||c.u.Katakana(i))}_tinySDF(i,a,d){const p=this.localIdeographFontFamily;if(!p||!this._doesCharSupportLocalGlyph(d))return;let v=i.tinySDF;if(!v){let S="400";/bold/i.test(a)?S="900":/medium/i.test(a)?S="500":/light/i.test(a)&&(S="200"),v=i.tinySDF=new dt.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:p,fontWeight:S})}const w=v.draw(String.fromCharCode(d));return{id:d,bitmap:new c.o({width:w.width||60,height:w.height||60},w.data),metrics:{width:w.glyphWidth/2||24,height:w.glyphHeight/2||24,left:w.glyphLeft/2+.5||0,top:w.glyphTop/2-27.5||-8,advance:w.glyphAdvance/2||24,isDoubleResolution:!0}}}}dt.loadGlyphRange=function(_,i,a,d){return c._(this,void 0,void 0,function*(){const p=256*i,v=p+255,w=d.transformRequest(a.replace("{fontstack}",_).replace("{range}",`${p}-${v}`),"Glyphs"),S=yield c.l(w,new AbortController);if(!S||!S.data)throw new Error(`Could not load glyph range. range: ${i}, ${p}-${v}`);const T={};for(const P of c.n(S.data))T[P.id]=P;return T})},dt.TinySDF=class{constructor({fontSize:_=24,buffer:i=3,radius:a=8,cutoff:d=.25,fontFamily:p="sans-serif",fontWeight:v="normal",fontStyle:w="normal"}={}){this.buffer=i,this.cutoff=d,this.radius=a;const S=this.size=_+4*i,T=this._createCanvas(S),P=this.ctx=T.getContext("2d",{willReadFrequently:!0});P.font=`${w} ${v} ${_}px ${p}`,P.textBaseline="alphabetic",P.textAlign="left",P.fillStyle="black",this.gridOuter=new Float64Array(S*S),this.gridInner=new Float64Array(S*S),this.f=new Float64Array(S),this.z=new Float64Array(S+1),this.v=new Uint16Array(S)}_createCanvas(_){const i=document.createElement("canvas");return i.width=i.height=_,i}draw(_){const{width:i,actualBoundingBoxAscent:a,actualBoundingBoxDescent:d,actualBoundingBoxLeft:p,actualBoundingBoxRight:v}=this.ctx.measureText(_),w=Math.ceil(a),S=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(v-p))),T=Math.min(this.size-this.buffer,w+Math.ceil(d)),P=S+2*this.buffer,O=T+2*this.buffer,R=Math.max(P*O,0),j=new Uint8ClampedArray(R),H={data:j,width:P,height:O,glyphWidth:S,glyphHeight:T,glyphTop:w,glyphLeft:0,glyphAdvance:i};if(S===0||T===0)return H;const{ctx:X,buffer:ne,gridInner:Y,gridOuter:le}=this;X.clearRect(ne,ne,S,T),X.fillText(_,ne,ne+w);const me=X.getImageData(ne,ne,S,T);le.fill(Ge,0,R),Y.fill(0,0,R);for(let ie=0;ie0?Ve*Ve:0,Y[Pe]=Ve<0?Ve*Ve:0}}rt(le,0,0,P,O,P,this.f,this.v,this.z),rt(Y,ne,ne,S,T,P,this.f,this.v,this.z);for(let ie=0;ie1&&(T=i[++S]);const O=Math.abs(P-T.left),R=Math.abs(P-T.right),j=Math.min(O,R);let H;const X=v/d*(p+1);if(T.isDash){const ne=p-Math.abs(X);H=Math.sqrt(j*j+ne*ne)}else H=p-Math.sqrt(j*j+X*X);this.data[w+P]=Math.max(0,Math.min(255,H+128))}}}addRegularDash(i){for(let S=i.length-1;S>=0;--S){const T=i[S],P=i[S+1];T.zeroLength?i.splice(S,1):P&&P.isDash===T.isDash&&(P.left=T.left,i.splice(S,1))}const a=i[0],d=i[i.length-1];a.isDash===d.isDash&&(a.left=d.left-this.width,d.right=a.right+this.width);const p=this.width*this.nextRow;let v=0,w=i[v];for(let S=0;S1&&(w=i[++v]);const T=Math.abs(S-w.left),P=Math.abs(S-w.right),O=Math.min(T,P);this.data[p+S]=Math.max(0,Math.min(255,(w.isDash?O:-O)+128))}}addDash(i,a){const d=a?7:0,p=2*d+1;if(this.nextRow+p>this.height)return c.w("LineAtlas out of space"),null;let v=0;for(let S=0;S{a.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Nt]}numActive(){return Object.keys(this.active).length}}const Xi=Math.floor(A.hardwareConcurrency/2);let zi,hi;function Li(){return zi||(zi=new wi),zi}wi.workerCount=c.B(globalThis)?Math.max(Math.min(Xi,3),1):1;class Di{constructor(i,a){this.workerPool=i,this.actors=[],this.currentActor=0,this.id=a;const d=this.workerPool.acquire(a);for(let p=0;p{a.remove()}),this.actors=[],i&&this.workerPool.release(this.id)}registerMessageHandler(i,a){for(const d of this.actors)d.registerMessageHandler(i,a)}}function Or(){return hi||(hi=new Di(Li(),c.G),hi.registerMessageHandler("GR",(_,i,a)=>c.m(i,a))),hi}function cr(_,i){const a=c.F();return c.H(a,a,[1,1,0]),c.J(a,a,[.5*_.width,.5*_.height,1]),c.K(a,a,_.calculatePosMatrix(i.toUnwrapped()))}function Br(_,i,a,d,p,v){const w=function(R,j,H){if(R)for(const X of R){const ne=j[X];if(ne&&ne.source===H&&ne.type==="fill-extrusion")return!0}else for(const X in j){const ne=j[X];if(ne.source===H&&ne.type==="fill-extrusion")return!0}return!1}(p&&p.layers,i,_.id),S=v.maxPitchScaleFactor(),T=_.tilesIn(d,S,w);T.sort(rr);const P=[];for(const R of T)P.push({wrappedTileID:R.tileID.wrapped().key,queryResults:R.tile.queryRenderedFeatures(i,a,_._state,R.queryGeometry,R.cameraQueryGeometry,R.scale,p,v,S,cr(_.transform,R.tileID))});const O=function(R){const j={},H={};for(const X of R){const ne=X.queryResults,Y=X.wrappedTileID,le=H[Y]=H[Y]||{};for(const me in ne){const ie=ne[me],ve=le[me]=le[me]||{},Te=j[me]=j[me]||[];for(const Pe of ie)ve[Pe.featureIndex]||(ve[Pe.featureIndex]=!0,Te.push(Pe))}}return j}(P);for(const R in O)O[R].forEach(j=>{const H=j.feature,X=_.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 O}function rr(_,i){const a=_.tileID,d=i.tileID;return a.overscaledZ-d.overscaledZ||a.canonical.y-d.canonical.y||a.wrap-d.wrap||a.canonical.x-d.canonical.x}function ce(_,i,a){return c._(this,void 0,void 0,function*(){let d=_;if(_.url?d=(yield c.h(i.transformRequest(_.url,"Source"),a)).data:yield A.frameAsync(a),!d)return null;const p=c.L(c.e(d,_),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in d&&d.vector_layers&&(p.vectorLayerIds=d.vector_layers.map(v=>v.id)),p})}class ge{constructor(i,a){i&&(a?this.setSouthWest(i).setNorthEast(a):Array.isArray(i)&&(i.length===4?this.setSouthWest([i[0],i[1]]).setNorthEast([i[2],i[3]]):this.setSouthWest(i[0]).setNorthEast(i[1])))}setNorthEast(i){return this._ne=i instanceof c.M?new c.M(i.lng,i.lat):c.M.convert(i),this}setSouthWest(i){return this._sw=i instanceof c.M?new c.M(i.lng,i.lat):c.M.convert(i),this}extend(i){const a=this._sw,d=this._ne;let p,v;if(i instanceof c.M)p=i,v=i;else{if(!(i instanceof ge))return Array.isArray(i)?i.length===4||i.every(Array.isArray)?this.extend(ge.convert(i)):this.extend(c.M.convert(i)):i&&("lng"in i||"lon"in i)&&"lat"in i?this.extend(c.M.convert(i)):this;if(p=i._sw,v=i._ne,!p||!v)return this}return a||d?(a.lng=Math.min(p.lng,a.lng),a.lat=Math.min(p.lat,a.lat),d.lng=Math.max(v.lng,d.lng),d.lat=Math.max(v.lat,d.lat)):(this._sw=new c.M(p.lng,p.lat),this._ne=new c.M(v.lng,v.lat)),this}getCenter(){return new c.M((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 c.M(this.getWest(),this.getNorth())}getSouthEast(){return new c.M(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(i){const{lng:a,lat:d}=c.M.convert(i);let p=this._sw.lng<=a&&a<=this._ne.lng;return this._sw.lng>this._ne.lng&&(p=this._sw.lng>=a&&a>=this._ne.lng),this._sw.lat<=d&&d<=this._ne.lat&&p}static convert(i){return i instanceof ge?i:i&&new ge(i)}static fromLngLat(i,a=0){const d=360*a/40075017,p=d/Math.cos(Math.PI/180*i.lat);return new ge(new c.M(i.lng-p,i.lat-d),new c.M(i.lng+p,i.lat+d))}}class Be{constructor(i,a,d){this.bounds=ge.convert(this.validateBounds(i)),this.minzoom=a||0,this.maxzoom=d||24}validateBounds(i){return Array.isArray(i)&&i.length===4?[Math.max(-180,i[0]),Math.max(-90,i[1]),Math.min(180,i[2]),Math.min(90,i[3])]:[-180,-90,180,90]}contains(i){const a=Math.pow(2,i.z),d=Math.floor(c.N(this.bounds.getWest())*a),p=Math.floor(c.O(this.bounds.getNorth())*a),v=Math.ceil(c.N(this.bounds.getEast())*a),w=Math.ceil(c.O(this.bounds.getSouth())*a);return i.x>=d&&i.x=p&&i.y{this._options.tiles=i}),this}setUrl(i){return this.setSourceProperty(()=>{this.url=i,this._options.url=i}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return c.e({},this._options)}loadTile(i){return c._(this,void 0,void 0,function*(){const a=i.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),d={request:this.map._requestManager.transformRequest(a,"Tile"),uid:i.uid,tileID:i.tileID,zoom:i.tileID.overscaledZ,tileSize:this.tileSize*i.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};d.request.collectResourceTiming=this._collectResourceTiming;let p="RT";if(i.actor&&i.state!=="expired"){if(i.state==="loading")return new Promise((v,w)=>{i.reloadPromise={resolve:v,reject:w}})}else i.actor=this.dispatcher.getActor(),p="LT";i.abortController=new AbortController;try{const v=yield i.actor.sendAsync({type:p,data:d},i.abortController);if(delete i.abortController,i.aborted)return;this._afterTileLoadWorkerResponse(i,v)}catch(v){if(delete i.abortController,i.aborted)return;if(v&&v.status!==404)throw v;this._afterTileLoadWorkerResponse(i,null)}})}_afterTileLoadWorkerResponse(i,a){if(a&&a.resourceTiming&&(i.resourceTiming=a.resourceTiming),a&&this.map._refreshExpiredTiles&&i.setExpiryData(a),i.loadVectorData(a,this.map.painter),i.reloadPromise){const d=i.reloadPromise;i.reloadPromise=null,this.loadTile(i).then(d.resolve).catch(d.reject)}}abortTile(i){return c._(this,void 0,void 0,function*(){i.abortController&&(i.abortController.abort(),delete i.abortController),i.actor&&(yield i.actor.sendAsync({type:"AT",data:{uid:i.uid,type:this.type,source:this.id}}))})}unloadTile(i){return c._(this,void 0,void 0,function*(){i.unloadVectorData(),i.actor&&(yield i.actor.sendAsync({type:"RMT",data:{uid:i.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class He extends c.E{constructor(i,a,d,p){super(),this.id=i,this.dispatcher=d,this.setEventedParent(p),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=c.e({type:"raster"},a),c.e(this,c.L(a,["url","scheme","tileSize"]))}load(){return c._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new c.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const i=yield ce(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,i&&(c.e(this,i),i.bounds&&(this.tileBounds=new Be(i.bounds,this.minzoom,this.maxzoom)),this.fire(new c.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new c.k("data",{dataType:"source",sourceDataType:"content"})))}catch(i){this._tileJSONRequest=null,this.fire(new c.j(i))}})}loaded(){return this._loaded}onAdd(i){this.map=i,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(i){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),i(),this.load()}setTiles(i){return this.setSourceProperty(()=>{this._options.tiles=i}),this}setUrl(i){return this.setSourceProperty(()=>{this.url=i,this._options.url=i}),this}serialize(){return c.e({},this._options)}hasTile(i){return!this.tileBounds||this.tileBounds.contains(i.canonical)}loadTile(i){return c._(this,void 0,void 0,function*(){const a=i.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);i.abortController=new AbortController;try{const d=yield W.getImage(this.map._requestManager.transformRequest(a,"Tile"),i.abortController,this.map._refreshExpiredTiles);if(delete i.abortController,i.aborted)return void(i.state="unloaded");if(d&&d.data){this.map._refreshExpiredTiles&&d.cacheControl&&d.expires&&i.setExpiryData({cacheControl:d.cacheControl,expires:d.expires});const p=this.map.painter.context,v=p.gl,w=d.data;i.texture=this.map.painter.getTileTexture(w.width),i.texture?i.texture.update(w,{useMipmap:!0}):(i.texture=new Ie(p,w,v.RGBA,{useMipmap:!0}),i.texture.bind(v.LINEAR,v.CLAMP_TO_EDGE,v.LINEAR_MIPMAP_NEAREST),p.extTextureFilterAnisotropic&&v.texParameterf(v.TEXTURE_2D,p.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,p.extTextureFilterAnisotropicMax)),i.state="loaded"}}catch(d){if(delete i.abortController,i.aborted)i.state="unloaded";else if(d)throw i.state="errored",d}})}abortTile(i){return c._(this,void 0,void 0,function*(){i.abortController&&(i.abortController.abort(),delete i.abortController)})}unloadTile(i){return c._(this,void 0,void 0,function*(){i.texture&&this.map.painter.saveTileTexture(i.texture)})}hasTransition(){return!1}}class tt extends He{constructor(i,a,d,p){super(i,a,d,p),this.type="raster-dem",this.maxzoom=22,this._options=c.e({type:"raster-dem"},a),this.encoding=a.encoding||"mapbox",this.redFactor=a.redFactor,this.greenFactor=a.greenFactor,this.blueFactor=a.blueFactor,this.baseShift=a.baseShift}loadTile(i){return c._(this,void 0,void 0,function*(){const a=i.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),d=this.map._requestManager.transformRequest(a,"Tile");i.neighboringTiles=this._getNeighboringTiles(i.tileID),i.abortController=new AbortController;try{const p=yield W.getImage(d,i.abortController,this.map._refreshExpiredTiles);if(delete i.abortController,i.aborted)return void(i.state="unloaded");if(p&&p.data){const v=p.data;this.map._refreshExpiredTiles&&p.cacheControl&&p.expires&&i.setExpiryData({cacheControl:p.cacheControl,expires:p.expires});const w=c.b(v)&&c.S()?v:yield this.readImageNow(v),S={type:this.type,uid:i.uid,source:this.id,rawImageData:w,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!i.actor||i.state==="expired"){i.actor=this.dispatcher.getActor();const T=yield i.actor.sendAsync({type:"LDT",data:S});i.dem=T,i.needsHillshadePrepare=!0,i.needsTerrainPrepare=!0,i.state="loaded"}}}catch(p){if(delete i.abortController,i.aborted)i.state="unloaded";else if(p)throw i.state="errored",p}})}readImageNow(i){return c._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&c.U()){const a=i.width+2,d=i.height+2;try{return new c.R({width:a,height:d},yield c.V(i,-1,-1,a,d))}catch{}}return A.getImageData(i,1)})}_getNeighboringTiles(i){const a=i.canonical,d=Math.pow(2,a.z),p=(a.x-1+d)%d,v=a.x===0?i.wrap-1:i.wrap,w=(a.x+1+d)%d,S=a.x+1===d?i.wrap+1:i.wrap,T={};return T[new c.Q(i.overscaledZ,v,a.z,p,a.y).key]={backfilled:!1},T[new c.Q(i.overscaledZ,S,a.z,w,a.y).key]={backfilled:!1},a.y>0&&(T[new c.Q(i.overscaledZ,v,a.z,p,a.y-1).key]={backfilled:!1},T[new c.Q(i.overscaledZ,i.wrap,a.z,a.x,a.y-1).key]={backfilled:!1},T[new c.Q(i.overscaledZ,S,a.z,w,a.y-1).key]={backfilled:!1}),a.y+10&&c.e(v,{resourceTiming:p}),this.fire(new c.k("data",Object.assign(Object.assign({},v),{sourceDataType:"metadata"}))),this.fire(new c.k("data",Object.assign(Object.assign({},v),{sourceDataType:"content"})))}catch(d){if(this._pendingLoads--,this._removed)return void this.fire(new c.k("dataabort",{dataType:"source"}));this.fire(new c.j(d))}})}loaded(){return this._pendingLoads===0}loadTile(i){return c._(this,void 0,void 0,function*(){const a=i.actor?"RT":"LT";i.actor=this.actor;const d={type:this.type,uid:i.uid,tileID:i.tileID,zoom:i.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};i.abortController=new AbortController;const p=yield this.actor.sendAsync({type:a,data:d},i.abortController);delete i.abortController,i.unloadVectorData(),i.aborted||i.loadVectorData(p,this.map.painter,a==="RT")})}abortTile(i){return c._(this,void 0,void 0,function*(){i.abortController&&(i.abortController.abort(),delete i.abortController),i.aborted=!0})}unloadTile(i){return c._(this,void 0,void 0,function*(){i.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:i.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return c.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var $e=c.X([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Qe extends c.E{constructor(i,a,d,p){super(),this.id=i,this.dispatcher=d,this.coordinates=a.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(p),this.options=a}load(i){return c._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new c.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const a=yield W.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,a&&a.data&&(this.image=a.data,i&&(this.coordinates=i),this._finishLoading())}catch(a){this._request=null,this._loaded=!0,this.fire(new c.j(a))}})}loaded(){return this._loaded}updateImage(i){return i.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=i.url,this.load(i.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new c.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(i){this.map=i,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(i){this.coordinates=i;const a=i.map(c.Y.fromLngLat);this.tileID=function(p){let v=1/0,w=1/0,S=-1/0,T=-1/0;for(const j of p)v=Math.min(v,j.x),w=Math.min(w,j.y),S=Math.max(S,j.x),T=Math.max(T,j.y);const P=Math.max(S-v,T-w),O=Math.max(0,Math.floor(-Math.log(P)/Math.LN2)),R=Math.pow(2,O);return new c.a0(O,Math.floor((v+S)/2*R),Math.floor((w+T)/2*R))}(a),this.minzoom=this.maxzoom=this.tileID.z;const d=a.map(p=>this.tileID.getTilePoint(p)._round());return this._boundsArray=new c.Z,this._boundsArray.emplaceBack(d[0].x,d[0].y,0,0),this._boundsArray.emplaceBack(d[1].x,d[1].y,c.W,0),this._boundsArray.emplaceBack(d[3].x,d[3].y,0,c.W),this._boundsArray.emplaceBack(d[2].x,d[2].y,c.W,c.W),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new c.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const i=this.map.painter.context,a=i.gl;this.boundsBuffer||(this.boundsBuffer=i.createVertexBuffer(this._boundsArray,$e.members)),this.boundsSegments||(this.boundsSegments=c.$.simpleSegment(0,0,4,2)),this.texture||(this.texture=new Ie(i,this.image,a.RGBA),this.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE));let d=!1;for(const p in this.tiles){const v=this.tiles[p];v.state!=="loaded"&&(v.state="loaded",v.texture=this.texture,d=!0)}d&&this.fire(new c.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(i){return c._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(i.tileID.canonical)?(this.tiles[String(i.tileID.wrap)]=i,i.buckets={}):i.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class We extends Qe{constructor(i,a,d,p){super(i,a,d,p),this.roundZoom=!0,this.type="video",this.options=a}load(){return c._(this,void 0,void 0,function*(){this._loaded=!1;const i=this.options;this.urls=[];for(const a of i.urls)this.urls.push(this.map._requestManager.transformRequest(a,"Source").url);try{const a=yield c.a2(this.urls);if(this._loaded=!0,!a)return;this.video=a,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(a){this.fire(new c.j(a))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(i){if(this.video){const a=this.video.seekable;ia.end(0)?this.fire(new c.j(new c.a1(`sources.${this.id}`,null,`Playback for this video can be set only between the ${a.start(0)} and ${a.end(0)}-second mark.`))):this.video.currentTime=i}}getVideo(){return this.video}onAdd(i){this.map||(this.map=i,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 i=this.map.painter.context,a=i.gl;this.boundsBuffer||(this.boundsBuffer=i.createVertexBuffer(this._boundsArray,$e.members)),this.boundsSegments||(this.boundsSegments=c.$.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE),a.texSubImage2D(a.TEXTURE_2D,0,0,0,a.RGBA,a.UNSIGNED_BYTE,this.video)):(this.texture=new Ie(i,this.video,a.RGBA),this.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE));let d=!1;for(const p in this.tiles){const v=this.tiles[p];v.state!=="loaded"&&(v.state="loaded",v.texture=this.texture,d=!0)}d&&this.fire(new c.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 pt extends Qe{constructor(i,a,d,p){super(i,a,d,p),a.coordinates?Array.isArray(a.coordinates)&&a.coordinates.length===4&&!a.coordinates.some(v=>!Array.isArray(v)||v.length!==2||v.some(w=>typeof w!="number"))||this.fire(new c.j(new c.a1(`sources.${i}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new c.j(new c.a1(`sources.${i}`,null,'missing required property "coordinates"'))),a.animate&&typeof a.animate!="boolean"&&this.fire(new c.j(new c.a1(`sources.${i}`,null,'optional "animate" property must be a boolean value'))),a.canvas?typeof a.canvas=="string"||a.canvas instanceof HTMLCanvasElement||this.fire(new c.j(new c.a1(`sources.${i}`,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 c.j(new c.a1(`sources.${i}`,null,'missing required property "canvas"'))),this.options=a,this.animate=a.animate===void 0||a.animate}load(){return c._(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 c.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(i){this.map=i,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let i=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,i=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,i=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const a=this.map.painter.context,d=a.gl;this.boundsBuffer||(this.boundsBuffer=a.createVertexBuffer(this._boundsArray,$e.members)),this.boundsSegments||(this.boundsSegments=c.$.simpleSegment(0,0,4,2)),this.texture?(i||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new Ie(a,this.canvas,d.RGBA,{premultiply:!0});let p=!1;for(const v in this.tiles){const w=this.tiles[v];w.state!=="loaded"&&(w.state="loaded",w.texture=this.texture,p=!0)}p&&this.fire(new c.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const i of[this.canvas.width,this.canvas.height])if(isNaN(i)||i<=0)return!0;return!1}}const St={},vt=_=>{switch(_){case"geojson":return Ze;case"image":return Qe;case"raster":return He;case"raster-dem":return tt;case"vector":return ae;case"video":return We;case"canvas":return pt}return St[_]},Mt="RTLPluginLoaded";class qt extends c.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Or()}_syncState(i){return this.status=i,this.dispatcher.broadcast("SRPS",{pluginStatus:i,pluginURL:this.url}).catch(a=>{throw this.status="error",a})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(i){return c._(this,arguments,void 0,function*(a,d=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=A.resolveURL(a),!this.url)throw new Error(`requested url ${a} is invalid`);if(this.status==="unavailable"){if(!d)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return c._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new c.k(Mt))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ne=null;function Ht(){return Ne||(Ne=new qt),Ne}class si{constructor(i,a){this.timeAdded=0,this.fadeEndTime=0,this.tileID=i,this.uid=c.a3(),this.uses=0,this.tileSize=a,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(i){const a=i+this.timeAdded;av.getLayer(P)).filter(Boolean);if(T.length!==0){S.layers=T,S.stateDependentLayerIds&&(S.stateDependentLayers=S.stateDependentLayerIds.map(P=>T.filter(O=>O.id===P)[0]));for(const P of T)w[P.id]=S}}return w}(i.buckets,a.style),this.hasSymbolBuckets=!1;for(const p in this.buckets){const v=this.buckets[p];if(v instanceof c.a5){if(this.hasSymbolBuckets=!0,!d)break;v.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const p in this.buckets){const v=this.buckets[p];if(v instanceof c.a5&&v.hasRTLText){this.hasRTLText=!0,Ht().lazyLoad();break}}this.queryPadding=0;for(const p in this.buckets){const v=this.buckets[p];this.queryPadding=Math.max(this.queryPadding,a.style.getLayer(p).queryRadius(v))}i.imageAtlas&&(this.imageAtlas=i.imageAtlas),i.glyphAtlasImage&&(this.glyphAtlasImage=i.glyphAtlasImage)}else this.collisionBoxArray=new c.a4}unloadVectorData(){for(const i in this.buckets)this.buckets[i].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(i){return this.buckets[i.id]}upload(i){for(const d in this.buckets){const p=this.buckets[d];p.uploadPending()&&p.upload(i)}const a=i.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Ie(i,this.imageAtlas.image,a.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Ie(i,this.glyphAtlasImage,a.ALPHA),this.glyphAtlasImage=null)}prepare(i){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(i,this.imageAtlasTexture)}queryRenderedFeatures(i,a,d,p,v,w,S,T,P,O){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:p,cameraQueryGeometry:v,scale:w,tileSize:this.tileSize,pixelPosMatrix:O,transform:T,params:S,queryPadding:this.queryPadding*P},i,a,d):{}}querySourceFeatures(i,a){const d=this.latestFeatureIndex;if(!d||!d.rawTileData)return;const p=d.loadVTLayers(),v=a&&a.sourceLayer?a.sourceLayer:"",w=p._geojsonTileLayer||p[v];if(!w)return;const S=c.a6(a&&a.filter),{z:T,x:P,y:O}=this.tileID.canonical,R={z:T,x:P,y:O};for(let j=0;jd)p=!1;else if(a)if(this.expirationTime{this.remove(i,v)},d)),this.data[p].push(v),this.order.push(p),this.order.length>this.max){const w=this._getAndRemoveByKey(this.order[0]);w&&this.onRemove(w)}return this}has(i){return i.wrapped().key in this.data}getAndRemove(i){return this.has(i)?this._getAndRemoveByKey(i.wrapped().key):null}_getAndRemoveByKey(i){const a=this.data[i].shift();return a.timeout&&clearTimeout(a.timeout),this.data[i].length===0&&delete this.data[i],this.order.splice(this.order.indexOf(i),1),a.value}getByKey(i){const a=this.data[i];return a?a[0].value:null}get(i){return this.has(i)?this.data[i.wrapped().key][0].value:null}remove(i,a){if(!this.has(i))return this;const d=i.wrapped().key,p=a===void 0?0:this.data[d].indexOf(a),v=this.data[d][p];return this.data[d].splice(p,1),v.timeout&&clearTimeout(v.timeout),this.data[d].length===0&&delete this.data[d],this.onRemove(v.value),this.order.splice(this.order.indexOf(d),1),this}setMaxSize(i){for(this.max=i;this.order.length>this.max;){const a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this}filter(i){const a=[];for(const d in this.data)for(const p of this.data[d])i(p.value)||a.push(p);for(const d of a)this.remove(d.value.tileID,d)}}class Gr{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(i,a,d){const p=String(a);if(this.stateChanges[i]=this.stateChanges[i]||{},this.stateChanges[i][p]=this.stateChanges[i][p]||{},c.e(this.stateChanges[i][p],d),this.deletedStates[i]===null){this.deletedStates[i]={};for(const v in this.state[i])v!==p&&(this.deletedStates[i][v]=null)}else if(this.deletedStates[i]&&this.deletedStates[i][p]===null){this.deletedStates[i][p]={};for(const v in this.state[i][p])d[v]||(this.deletedStates[i][p][v]=null)}else for(const v in d)this.deletedStates[i]&&this.deletedStates[i][p]&&this.deletedStates[i][p][v]===null&&delete this.deletedStates[i][p][v]}removeFeatureState(i,a,d){if(this.deletedStates[i]===null)return;const p=String(a);if(this.deletedStates[i]=this.deletedStates[i]||{},d&&a!==void 0)this.deletedStates[i][p]!==null&&(this.deletedStates[i][p]=this.deletedStates[i][p]||{},this.deletedStates[i][p][d]=null);else if(a!==void 0)if(this.stateChanges[i]&&this.stateChanges[i][p])for(d in this.deletedStates[i][p]={},this.stateChanges[i][p])this.deletedStates[i][p][d]=null;else this.deletedStates[i][p]=null;else this.deletedStates[i]=null}getState(i,a){const d=String(a),p=c.e({},(this.state[i]||{})[d],(this.stateChanges[i]||{})[d]);if(this.deletedStates[i]===null)return{};if(this.deletedStates[i]){const v=this.deletedStates[i][a];if(v===null)return{};for(const w in v)delete p[w]}return p}initializeTileState(i,a){i.setFeatureState(this.state,a)}coalesceChanges(i,a){const d={};for(const p in this.stateChanges){this.state[p]=this.state[p]||{};const v={};for(const w in this.stateChanges[p])this.state[p][w]||(this.state[p][w]={}),c.e(this.state[p][w],this.stateChanges[p][w]),v[w]=this.state[p][w];d[p]=v}for(const p in this.deletedStates){this.state[p]=this.state[p]||{};const v={};if(this.deletedStates[p]===null)for(const w in this.state[p])v[w]={},this.state[p][w]={};else for(const w in this.deletedStates[p]){if(this.deletedStates[p][w]===null)this.state[p][w]={};else for(const S of Object.keys(this.deletedStates[p][w]))delete this.state[p][w][S];v[w]=this.state[p][w]}d[p]=d[p]||{},c.e(d[p],v)}if(this.stateChanges={},this.deletedStates={},Object.keys(d).length!==0)for(const p in i)i[p].setFeatureState(d,a)}}class Ye extends c.E{constructor(i,a,d){super(),this.id=i,this.dispatcher=d,this.on("data",p=>this._dataHandler(p)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((p,v,w,S)=>{const T=new(vt(v.type))(p,v,w,S);if(T.id!==p)throw new Error(`Expected Source id to be ${p} instead of ${T.id}`);return T})(i,a,d,this),this._tiles={},this._cache=new ur(0,p=>this._unloadTile(p)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Gr,this._didEmitContent=!1,this._updated=!1}onAdd(i){this.map=i,this._maxTileCacheSize=i?i._maxTileCacheSize:null,this._maxTileCacheZoomLevels=i?i._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(i)}onRemove(i){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(i)}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 i in this._tiles){const a=this._tiles[i];if(a.state!=="loaded"&&a.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const i=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,i&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(i,a,d){return c._(this,void 0,void 0,function*(){try{yield this._source.loadTile(i),this._tileLoaded(i,a,d)}catch(p){i.state="errored",p.status!==404?this._source.fire(new c.j(p,{tile:i})):this.update(this.transform,this.terrain)}})}_unloadTile(i){this._source.unloadTile&&this._source.unloadTile(i)}_abortTile(i){this._source.abortTile&&this._source.abortTile(i),this._source.fire(new c.k("dataabort",{tile:i,coord:i.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(i){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const a in this._tiles){const d=this._tiles[a];d.upload(i),d.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(i=>i.tileID).sort(Ot).map(i=>i.key)}getRenderableIds(i){const a=[];for(const d in this._tiles)this._isIdRenderable(d,i)&&a.push(this._tiles[d]);return i?a.sort((d,p)=>{const v=d.tileID,w=p.tileID,S=new c.P(v.canonical.x,v.canonical.y)._rotate(this.transform.angle),T=new c.P(w.canonical.x,w.canonical.y)._rotate(this.transform.angle);return v.overscaledZ-w.overscaledZ||T.y-S.y||T.x-S.x}).map(d=>d.tileID.key):a.map(d=>d.tileID).sort(Ot).map(d=>d.key)}hasRenderableParent(i){const a=this.findLoadedParent(i,0);return!!a&&this._isIdRenderable(a.tileID.key)}_isIdRenderable(i,a){return this._tiles[i]&&this._tiles[i].hasData()&&!this._coveredTiles[i]&&(a||!this._tiles[i].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const i in this._tiles)this._tiles[i].state!=="errored"&&this._reloadTile(i,"reloading")}}_reloadTile(i,a){return c._(this,void 0,void 0,function*(){const d=this._tiles[i];d&&(d.state!=="loading"&&(d.state=a),yield this._loadTile(d,i,a))})}_tileLoaded(i,a,d){i.timeAdded=A.now(),d==="expired"&&(i.refreshedUponExpiration=!0),this._setTileReloadTimer(a,i),this.getSource().type==="raster-dem"&&i.dem&&this._backfillDEM(i),this._state.initializeTileState(i,this.map?this.map.painter:null),i.aborted||this._source.fire(new c.k("data",{dataType:"source",tile:i,coord:i.tileID}))}_backfillDEM(i){const a=this.getRenderableIds();for(let p=0;p1||(Math.abs(w)>1&&(Math.abs(w+T)===1?w+=T:Math.abs(w-T)===1&&(w-=T)),v.dem&&p.dem&&(p.dem.backfillBorder(v.dem,w,S),p.neighboringTiles&&p.neighboringTiles[P]&&(p.neighboringTiles[P].backfilled=!0)))}}getTile(i){return this.getTileByID(i.key)}getTileByID(i){return this._tiles[i]}_retainLoadedChildren(i,a,d,p){for(const v in this._tiles){let w=this._tiles[v];if(p[v]||!w.hasData()||w.tileID.overscaledZ<=a||w.tileID.overscaledZ>d)continue;let S=w.tileID;for(;w&&w.tileID.overscaledZ>a+1;){const P=w.tileID.scaledTo(w.tileID.overscaledZ-1);w=this._tiles[P.key],w&&w.hasData()&&(S=P)}let T=S;for(;T.overscaledZ>a;)if(T=T.scaledTo(T.overscaledZ-1),i[T.key]){p[S.key]=S;break}}}findLoadedParent(i,a){if(i.key in this._loadedParentTiles){const d=this._loadedParentTiles[i.key];return d&&d.tileID.overscaledZ>=a?d:null}for(let d=i.overscaledZ-1;d>=a;d--){const p=i.scaledTo(d),v=this._getLoadedTile(p);if(v)return v}}findLoadedSibling(i){return this._getLoadedTile(i)}_getLoadedTile(i){const a=this._tiles[i.key];return a&&a.hasData()?a:this._cache.getByKey(i.wrapped().key)}updateCacheSize(i){const a=Math.ceil(i.width/this._source.tileSize)+1,d=Math.ceil(i.height/this._source.tileSize)+1,p=Math.floor(a*d*(this._maxTileCacheZoomLevels===null?c.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),v=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,p):p;this._cache.setMaxSize(v)}handleWrapJump(i){const a=Math.round((i-(this._prevLng===void 0?i:this._prevLng))/360);if(this._prevLng=i,a){const d={};for(const p in this._tiles){const v=this._tiles[p];v.tileID=v.tileID.unwrapTo(v.tileID.wrap+a),d[v.tileID.key]=v}this._tiles=d;for(const p in this._timers)clearTimeout(this._timers[p]),delete this._timers[p];for(const p in this._tiles)this._setTileReloadTimer(p,this._tiles[p])}}_updateCoveredAndRetainedTiles(i,a,d,p,v,w){const S={},T={},P=Object.keys(i),O=A.now();for(const R of P){const j=i[R],H=this._tiles[R];if(!H||H.fadeEndTime!==0&&H.fadeEndTime<=O)continue;const X=this.findLoadedParent(j,a),ne=this.findLoadedSibling(j),Y=X||ne||null;Y&&(this._addTile(Y.tileID),S[Y.tileID.key]=Y.tileID),T[R]=j}this._retainLoadedChildren(T,p,d,i);for(const R in S)i[R]||(this._coveredTiles[R]=!0,i[R]=S[R]);if(w){const R={},j={};for(const H of v)this._tiles[H.key].hasData()?R[H.key]=H:j[H.key]=H;for(const H in j){const X=j[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]&&(R[X[0].key]=i[X[0].key]=X[0],R[X[1].key]=i[X[1].key]=X[1],R[X[2].key]=i[X[2].key]=X[2],R[X[3].key]=i[X[3].key]=X[3],delete j[H])}for(const H in j){const X=j[H],ne=this.findLoadedParent(X,this._source.minzoom),Y=this.findLoadedSibling(X),le=ne||Y||null;if(le){R[le.tileID.key]=i[le.tileID.key]=le.tileID;for(const me in R)R[me].isChildOf(le.tileID)&&delete R[me]}}for(const H in this._tiles)R[H]||(this._coveredTiles[H]=!0)}}update(i,a){if(!this._sourceLoaded||this._paused)return;let d;this.transform=i,this.terrain=a,this.updateCacheSize(i),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?d=i.getVisibleUnwrappedCoordinates(this._source.tileID).map(O=>new c.Q(O.canonical.z,O.wrap,O.canonical.z,O.canonical.x,O.canonical.y)):(d=i.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:a}),this._source.hasTile&&(d=d.filter(O=>this._source.hasTile(O)))):d=[];const p=i.coveringZoomLevel(this._source),v=Math.max(p-Ye.maxOverzooming,this._source.minzoom),w=Math.max(p+Ye.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const O={};for(const R of d)if(R.canonical.z>this._source.minzoom){const j=R.scaledTo(R.canonical.z-1);O[j.key]=j;const H=R.scaledTo(Math.max(this._source.minzoom,Math.min(R.canonical.z,5)));O[H.key]=H}d=d.concat(Object.values(O))}const S=d.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,S&&this.fire(new c.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const T=this._updateRetainedTiles(d,p);zt(this._source.type)&&this._updateCoveredAndRetainedTiles(T,v,w,p,d,a);for(const O in T)this._tiles[O].clearFadeHold();const P=c.ab(this._tiles,T);for(const O of P){const R=this._tiles[O];R.hasSymbolBuckets&&!R.holdingForFade()?R.setHoldDuration(this.map._fadeDuration):R.hasSymbolBuckets&&!R.symbolFadeFinished()||this._removeTile(O)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const i in this._tiles)this._tiles[i].holdingForFade()&&this._removeTile(i)}_updateRetainedTiles(i,a){var d;const p={},v={},w=Math.max(a-Ye.maxOverzooming,this._source.minzoom),S=Math.max(a+Ye.maxUnderzooming,this._source.minzoom),T={};for(const P of i){const O=this._addTile(P);p[P.key]=P,O.hasData()||athis._source.maxzoom){const j=P.children(this._source.maxzoom)[0],H=this.getTile(j);if(H&&H.hasData()){p[j.key]=j;continue}}else{const j=P.children(this._source.maxzoom);if(p[j[0].key]&&p[j[1].key]&&p[j[2].key]&&p[j[3].key])continue}let R=O.wasRequested();for(let j=P.overscaledZ-1;j>=w;--j){const H=P.scaledTo(j);if(v[H.key])break;if(v[H.key]=!0,O=this.getTile(H),!O&&R&&(O=this._addTile(H)),O){const X=O.hasData();if((X||!(!((d=this.map)===null||d===void 0)&&d.cancelPendingTileRequestsWhileZooming)||R)&&(p[H.key]=H),R=O.wasRequested(),X)break}}}return p}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const i in this._tiles){const a=[];let d,p=this._tiles[i].tileID;for(;p.overscaledZ>0;){if(p.key in this._loadedParentTiles){d=this._loadedParentTiles[p.key];break}a.push(p.key);const v=p.scaledTo(p.overscaledZ-1);if(d=this._getLoadedTile(v),d)break;p=v}for(const v of a)this._loadedParentTiles[v]=d}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const i in this._tiles){const a=this._tiles[i].tileID,d=this._getLoadedTile(a);this._loadedSiblingTiles[a.key]=d}}_addTile(i){let a=this._tiles[i.key];if(a)return a;a=this._cache.getAndRemove(i),a&&(this._setTileReloadTimer(i.key,a),a.tileID=i,this._state.initializeTileState(a,this.map?this.map.painter:null),this._cacheTimers[i.key]&&(clearTimeout(this._cacheTimers[i.key]),delete this._cacheTimers[i.key],this._setTileReloadTimer(i.key,a)));const d=a;return a||(a=new si(i,this._source.tileSize*i.overscaleFactor()),this._loadTile(a,i.key,a.state)),a.uses++,this._tiles[i.key]=a,d||this._source.fire(new c.k("dataloading",{tile:a,coord:a.tileID,dataType:"source"})),a}_setTileReloadTimer(i,a){i in this._timers&&(clearTimeout(this._timers[i]),delete this._timers[i]);const d=a.getExpiryTimeout();d&&(this._timers[i]=setTimeout(()=>{this._reloadTile(i,"expired"),delete this._timers[i]},d))}_removeTile(i){const a=this._tiles[i];a&&(a.uses--,delete this._tiles[i],this._timers[i]&&(clearTimeout(this._timers[i]),delete this._timers[i]),a.uses>0||(a.hasData()&&a.state!=="reloading"?this._cache.add(a.tileID,a,a.getExpiryTimeout()):(a.aborted=!0,this._abortTile(a),this._unloadTile(a))))}_dataHandler(i){const a=i.sourceDataType;i.dataType==="source"&&a==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&i.dataType==="source"&&a==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const i in this._tiles)this._removeTile(i);this._cache.reset()}tilesIn(i,a,d){const p=[],v=this.transform;if(!v)return p;const w=d?v.getCameraQueryGeometry(i):i,S=i.map(X=>v.pointCoordinate(X,this.terrain)),T=w.map(X=>v.pointCoordinate(X,this.terrain)),P=this.getIds();let O=1/0,R=1/0,j=-1/0,H=-1/0;for(const X of T)O=Math.min(O,X.x),R=Math.min(R,X.y),j=Math.max(j,X.x),H=Math.max(H,X.y);for(let X=0;X=0&&ie[1].y+me>=0){const ve=S.map(Pe=>Y.getTilePoint(Pe)),Te=T.map(Pe=>Y.getTilePoint(Pe));p.push({tile:ne,tileID:Y,queryGeometry:ve,cameraQueryGeometry:Te,scale:le})}}return p}getVisibleCoordinates(i){const a=this.getRenderableIds(i).map(d=>this._tiles[d].tileID);for(const d of a)d.posMatrix=this.transform.calculatePosMatrix(d.toUnwrapped());return a}hasTransition(){if(this._source.hasTransition())return!0;if(zt(this._source.type)){const i=A.now();for(const a in this._tiles)if(this._tiles[a].fadeEndTime>=i)return!0}return!1}setFeatureState(i,a,d){this._state.updateState(i=i||"_geojsonTileLayer",a,d)}removeFeatureState(i,a,d){this._state.removeFeatureState(i=i||"_geojsonTileLayer",a,d)}getFeatureState(i,a){return this._state.getState(i=i||"_geojsonTileLayer",a)}setDependencies(i,a,d){const p=this._tiles[i];p&&p.setDependencies(a,d)}reloadTilesForDependencies(i,a){for(const d in this._tiles)this._tiles[d].hasDependency(i,a)&&this._reloadTile(d,"reloading");this._cache.filter(d=>!d.hasDependency(i,a))}}function Ot(_,i){const a=Math.abs(2*_.wrap)-+(_.wrap<0),d=Math.abs(2*i.wrap)-+(i.wrap<0);return _.overscaledZ-i.overscaledZ||d-a||i.canonical.y-_.canonical.y||i.canonical.x-_.canonical.x}function zt(_){return _==="raster"||_==="image"||_==="video"}Ye.maxOverzooming=10,Ye.maxUnderzooming=3;class di{constructor(i,a){this.reset(i,a)}reset(i,a){this.points=i||[],this._distances=[0];for(let d=1;d0?(p-w)/S:0;return this.points[v].mult(1-T).add(this.points[a].mult(T))}}function Ei(_,i){let a=!0;return _==="always"||_!=="never"&&i!=="never"||(a=!1),a}class Bt{constructor(i,a,d){const p=this.boxCells=[],v=this.circleCells=[];this.xCellCount=Math.ceil(i/d),this.yCellCount=Math.ceil(a/d);for(let w=0;wthis.width||p<0||a>this.height)return[];const T=[];if(i<=0&&a<=0&&this.width<=d&&this.height<=p){if(v)return[{key:null,x1:i,y1:a,x2:d,y2:p}];for(let P=0;P0}hitTestCircle(i,a,d,p,v){const w=i-d,S=i+d,T=a-d,P=a+d;if(S<0||w>this.width||P<0||T>this.height)return!1;const O=[];return this._forEachCell(w,T,S,P,this._queryCellCircle,O,{hitTest:!0,overlapMode:p,circle:{x:i,y:a,radius:d},seenUids:{box:{},circle:{}}},v),O.length>0}_queryCell(i,a,d,p,v,w,S,T){const{seenUids:P,hitTest:O,overlapMode:R}=S,j=this.boxCells[v];if(j!==null){const X=this.bboxes;for(const ne of j)if(!P.box[ne]){P.box[ne]=!0;const Y=4*ne,le=this.boxKeys[ne];if(i<=X[Y+2]&&a<=X[Y+3]&&d>=X[Y+0]&&p>=X[Y+1]&&(!T||T(le))&&(!O||!Ei(R,le.overlapMode))&&(w.push({key:le,x1:X[Y],y1:X[Y+1],x2:X[Y+2],y2:X[Y+3]}),O))return!0}}const H=this.circleCells[v];if(H!==null){const X=this.circles;for(const ne of H)if(!P.circle[ne]){P.circle[ne]=!0;const Y=3*ne,le=this.circleKeys[ne];if(this._circleAndRectCollide(X[Y],X[Y+1],X[Y+2],i,a,d,p)&&(!T||T(le))&&(!O||!Ei(R,le.overlapMode))){const me=X[Y],ie=X[Y+1],ve=X[Y+2];if(w.push({key:le,x1:me-ve,y1:ie-ve,x2:me+ve,y2:ie+ve}),O)return!0}}}return!1}_queryCellCircle(i,a,d,p,v,w,S,T){const{circle:P,seenUids:O,overlapMode:R}=S,j=this.boxCells[v];if(j!==null){const X=this.bboxes;for(const ne of j)if(!O.box[ne]){O.box[ne]=!0;const Y=4*ne,le=this.boxKeys[ne];if(this._circleAndRectCollide(P.x,P.y,P.radius,X[Y+0],X[Y+1],X[Y+2],X[Y+3])&&(!T||T(le))&&!Ei(R,le.overlapMode))return w.push(!0),!0}}const H=this.circleCells[v];if(H!==null){const X=this.circles;for(const ne of H)if(!O.circle[ne]){O.circle[ne]=!0;const Y=3*ne,le=this.circleKeys[ne];if(this._circlesCollide(X[Y],X[Y+1],X[Y+2],P.x,P.y,P.radius)&&(!T||T(le))&&!Ei(R,le.overlapMode))return w.push(!0),!0}}}_forEachCell(i,a,d,p,v,w,S,T){const P=this._convertToXCellCoord(i),O=this._convertToYCellCoord(a),R=this._convertToXCellCoord(d),j=this._convertToYCellCoord(p);for(let H=P;H<=R;H++)for(let X=O;X<=j;X++)if(v.call(this,i,a,d,p,this.xCellCount*X+H,w,S,T))return}_convertToXCellCoord(i){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(i*this.xScale)))}_convertToYCellCoord(i){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(i*this.yScale)))}_circlesCollide(i,a,d,p,v,w){const S=p-i,T=v-a,P=d+w;return P*P>S*S+T*T}_circleAndRectCollide(i,a,d,p,v,w,S){const T=(w-p)/2,P=Math.abs(i-(p+T));if(P>T+d)return!1;const O=(S-v)/2,R=Math.abs(a-(v+O));if(R>O+d)return!1;if(P<=T||R<=O)return!0;const j=P-T,H=R-O;return j*j+H*H<=d*d}}function eo(_,i,a,d,p){const v=c.F();return i?(c.J(v,v,[1/p,1/p,1]),a||c.ad(v,v,d.angle)):c.K(v,d.labelPlaneMatrix,_),v}function to(_,i,a,d,p){if(i){const v=c.ae(_);return c.J(v,v,[p,p,1]),a||c.ad(v,v,-d.angle),v}return d.glCoordMatrix}function hr(_,i,a){let d;a?(d=[_.x,_.y,a(_.x,_.y),1],c.af(d,d,i)):(d=[_.x,_.y,0,1],function(v,w,S){const T=w[0],P=w[1];v[0]=S[0]*T+S[4]*P+S[12],v[1]=S[1]*T+S[5]*P+S[13],v[3]=S[3]*T+S[7]*P+S[15]}(d,d,i));const p=d[3];return{point:new c.P(d[0]/p,d[1]/p),signedDistanceFromCamera:p,isOccluded:!1}}function te(_,i){return .5+_/i*.5}function F(_,i){return _.x>=-i[0]&&_.x<=i[0]&&_.y>=-i[1]&&_.y<=i[1]}function N(_,i,a,d,p,v,w,S,T,P,O,R,j,H,X){const ne=d?_.textSizeData:_.iconSizeData,Y=c.ag(ne,a.transform.zoom),le=[256/a.width*2+1,256/a.height*2+1],me=d?_.text.dynamicLayoutVertexArray:_.icon.dynamicLayoutVertexArray;me.clear();const ie=_.lineVertexArray,ve=d?_.text.placedSymbolArray:_.icon.placedSymbolArray,Te=a.transform.width/a.transform.height;let Pe=!1;for(let Ve=0;VeMath.abs(a.x-i.x)*d?{useVertical:!0}:(_===c.ah.vertical?i.ya.x)?{needsFlipping:!0}:null}function de(_,i,a,d,p,v,w,S,T,P,O){const R=a/24,j=i.lineOffsetX*R,H=i.lineOffsetY*R;let X;if(i.numGlyphs>1){const ne=i.glyphStartIndex+i.numGlyphs,Y=i.lineStartIndex,le=i.lineStartIndex+i.lineLength,me=U(R,S,j,H,d,i,O,_);if(!me)return{notEnoughRoom:!0};const ie=hr(me.first.point,w,_.getElevation).point,ve=hr(me.last.point,w,_.getElevation).point;if(p&&!d){const Te=re(i.writingMode,ie,ve,P);if(Te)return Te}X=[me.first];for(let Te=i.glyphStartIndex+1;Te0?ie.point:function(Pe,Ve,Ke,ut,ht,Je){return _e(Pe,Ve,Ke,1,ht,Je)}(_.tileAnchorPoint,me,Y,0,v,_),Te=re(i.writingMode,Y,ve,P);if(Te)return Te}const ne=Oe(R*S.getoffsetX(i.glyphStartIndex),j,H,d,i.segment,i.lineStartIndex,i.lineStartIndex+i.lineLength,_,O);if(!ne||_.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};X=[ne]}for(const ne of X)c.aj(T,ne.point,ne.angle);return{}}function _e(_,i,a,d,p,v){const w=_.add(_.sub(i)._unit()),S=p!==void 0?hr(w,p,v.getElevation).point:ue(w.x,w.y,v).point,T=a.sub(S);return a.add(T._mult(d/T.mag()))}function be(_,i,a){const d=i.projectionCache;if(d.projections[_])return d.projections[_];const p=new c.P(i.lineVertexArray.getx(_),i.lineVertexArray.gety(_)),v=ue(p.x,p.y,i);if(v.signedDistanceFromCamera>0)return d.projections[_]=v.point,d.anyProjectionOccluded=d.anyProjectionOccluded||v.isOccluded,v.point;const w=_-a.direction;return function(S,T,P,O,R){return _e(S,T,P,O,void 0,R)}(a.distanceFromAnchor===0?i.tileAnchorPoint:new c.P(i.lineVertexArray.getx(w),i.lineVertexArray.gety(w)),p,a.previousVertex,a.absOffsetX-a.distanceFromAnchor+1,i)}function ue(_,i,a){const d=_+a.translation[0],p=i+a.translation[1];let v;return!a.pitchWithMap&&a.projection.useSpecialProjectionForSymbols?(v=a.projection.projectTileCoordinates(d,p,a.unwrappedTileID,a.getElevation),v.point.x=(.5*v.point.x+.5)*a.width,v.point.y=(.5*-v.point.y+.5)*a.height):(v=hr(new c.P(d,p),a.labelPlaneMatrix,a.getElevation),v.isOccluded=!1),v}function Me(_,i,a){return _._unit()._perp()._mult(i*a)}function Ue(_,i,a,d,p,v,w,S,T){if(S.projectionCache.offsets[_])return S.projectionCache.offsets[_];const P=a.add(i);if(_+T.direction=p)return S.projectionCache.offsets[_]=P,P;const O=be(_+T.direction,S,T),R=Me(O.sub(a),w,T.direction),j=a.add(R),H=O.add(R);return S.projectionCache.offsets[_]=c.ak(v,P,j,H)||P,S.projectionCache.offsets[_]}function Oe(_,i,a,d,p,v,w,S,T){const P=d?_-i:_+i;let O=P>0?1:-1,R=0;d&&(O*=-1,R=Math.PI),O<0&&(R+=Math.PI);let j,H=O>0?v+p:v+p+1;S.projectionCache.cachedAnchorPoint?j=S.projectionCache.cachedAnchorPoint:(j=ue(S.tileAnchorPoint.x,S.tileAnchorPoint.y,S).point,S.projectionCache.cachedAnchorPoint=j);let X,ne,Y=j,le=j,me=0,ie=0;const ve=Math.abs(P),Te=[];let Pe;for(;me+ie<=ve;){if(H+=O,H=w)return null;me+=ie,le=Y,ne=X;const ut={absOffsetX:ve,direction:O,distanceFromAnchor:me,previousVertex:le};if(Y=be(H,S,ut),a===0)Te.push(le),Pe=Y.sub(le);else{let ht;const Je=Y.sub(le);ht=Je.mag()===0?Me(be(H+O,S,ut).sub(Y),a,O):Me(Je,a,O),ne||(ne=le.add(ht)),X=Ue(H,ht,Y,v,w,ne,a,S,ut),Te.push(ne),Pe=X.sub(ne)}ie=Pe.mag()}const Ve=Pe._mult((ve-me)/ie)._add(ne||le),Ke=R+Math.atan2(Y.y-le.y,Y.x-le.x);return Te.push(Ve),{point:Ve,angle:T?Ke:0,path:Te}}const Re=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function It(_,i){for(let a=0;a<_;a++){const d=i.length;i.resize(d+4),i.float32.set(Re,3*d)}}const Et=100;class Jt{constructor(i,a,d=new Bt(i.width+200,i.height+200,25),p=new Bt(i.width+200,i.height+200,25)){this.transform=i,this.mapProjection=a,this.grid=d,this.ignoredGrid=p,this.pitchFactor=Math.cos(i._pitch)*i.cameraToCenterDistance,this.screenRightBoundary=i.width+Et,this.screenBottomBoundary=i.height+Et,this.gridRightBoundary=i.width+200,this.gridBottomBoundary=i.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(i,a,d,p,v,w,S,T,P,O,R){const j=i.anchorPointX+T[0],H=i.anchorPointY+T[1],X=this.projectAndGetPerspectiveRatio(p,j,H,v,O),ne=this._projectCollisionBox(i,d,p,v,w,S,T,X,O,R),[Y,le,me,ie]=ne.box;return this.mapProjection.useSpecialProjectionForSymbols&&(w?ne.allPointsOccluded:this.mapProjection.isOccluded(j,H,v))||X.perspectiveRatio=1;Zt--)at.push(Rt.path[Zt]);for(let Zt=1;ZtYt.signedDistanceFromCamera<=0)?[]:Zt.map(Yt=>Yt.point)}let Ii=[];if(at.length>0){const Zt=at[0].clone(),Yt=at[0].clone();for(let Ti=1;Ti=Je.x&&Yt.x<=et.x&&Zt.y>=Je.y&&Yt.y<=et.y?[at]:Yt.xet.x||Yt.yet.y?[]:c.al([at],Je.x,Je.y,et.x,et.y)}for(const Zt of Ii){yt.reset(Zt,.25*ht);let Yt=0;Yt=yt.length<=.5*ht?1:Math.ceil(yt.paddedLength/kt)+1;for(let Ti=0;Tihr(p,d,a.getElevation))}queryRenderedSymbols(i){if(i.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const a=[];let d=1/0,p=1/0,v=-1/0,w=-1/0;for(const O of i){const R=new c.P(O.x+Et,O.y+Et);d=Math.min(d,R.x),p=Math.min(p,R.y),v=Math.max(v,R.x),w=Math.max(w,R.y),a.push(R)}const S=this.grid.query(d,p,v,w).concat(this.ignoredGrid.query(d,p,v,w)),T={},P={};for(const O of S){const R=O.key;if(T[R.bucketInstanceId]===void 0&&(T[R.bucketInstanceId]={}),T[R.bucketInstanceId][R.featureIndex])continue;const j=[new c.P(O.x1,O.y1),new c.P(O.x2,O.y1),new c.P(O.x2,O.y2),new c.P(O.x1,O.y2)];c.am(a,j)&&(T[R.bucketInstanceId][R.featureIndex]=!0,P[R.bucketInstanceId]===void 0&&(P[R.bucketInstanceId]=[]),P[R.bucketInstanceId].push(R.featureIndex))}return P}insertCollisionBox(i,a,d,p,v,w){(d?this.ignoredGrid:this.grid).insert({bucketInstanceId:p,featureIndex:v,collisionGroupID:w,overlapMode:a},i[0],i[1],i[2],i[3])}insertCollisionCircles(i,a,d,p,v,w){const S=d?this.ignoredGrid:this.grid,T={bucketInstanceId:p,featureIndex:v,collisionGroupID:w,overlapMode:a};for(let P=0;P=this.screenRightBoundary||pthis.screenBottomBoundary}isInsideGrid(i,a,d,p){return d>=0&&i=0&&athis.projectAndGetPerspectiveRatio(d,Je.x,Je.y,p,P));ut=ht.some(Je=>!Je.isOccluded),Ke=ht.map(Je=>Je.point)}else ut=!0;return{box:c.ao(Ke),allPointsOccluded:!ut}}}function Dt(_,i,a){return i*(c.W/(_.tileSize*Math.pow(2,a-_.tileID.overscaledZ)))}class ti{constructor(i,a,d,p){this.opacity=i?Math.max(0,Math.min(1,i.opacity+(i.placed?a:-a))):p&&d?1:0,this.placed=d}isHidden(){return this.opacity===0&&!this.placed}}class fi{constructor(i,a,d,p,v){this.text=new ti(i?i.text:null,a,d,v),this.icon=new ti(i?i.icon:null,a,p,v)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Si{constructor(i,a,d){this.text=i,this.icon=a,this.skipFade=d}}class Yi{constructor(){this.invProjMatrix=c.F(),this.viewportMatrix=c.F(),this.circles=[]}}class Gt{constructor(i,a,d,p,v){this.bucketInstanceId=i,this.featureIndex=a,this.sourceLayerIndex=d,this.bucketIndex=p,this.tileID=v}}class Ri{constructor(i){this.crossSourceCollisions=i,this.maxGroupID=0,this.collisionGroups={}}get(i){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[i]){const a=++this.maxGroupID;this.collisionGroups[i]={ID:a,predicate:d=>d.collisionGroupID===a}}return this.collisionGroups[i]}}function nr(_,i,a,d,p){const{horizontalAlign:v,verticalAlign:w}=c.au(_);return new c.P(-(v-.5)*i+d[0]*p,-(w-.5)*a+d[1]*p)}class Zr{constructor(i,a,d,p,v,w){this.transform=i.clone(),this.terrain=d,this.collisionIndex=new Jt(this.transform,a),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=p,this.retainedQueryData={},this.collisionGroups=new Ri(v),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=w,w&&(w.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(i){const a=this.terrain;return a?(d,p)=>a.getElevation(i,d,p):null}getBucketParts(i,a,d,p){const v=d.getBucket(a),w=d.latestFeatureIndex;if(!v||!w||a.id!==v.layerIds[0])return;const S=d.collisionBoxArray,T=v.layers[0].layout,P=v.layers[0].paint,O=Math.pow(2,this.transform.zoom-d.tileID.overscaledZ),R=d.tileSize/c.W,j=d.tileID.toUnwrapped(),H=this.transform.calculatePosMatrix(j),X=T.get("text-pitch-alignment")==="map",ne=T.get("text-rotation-alignment")==="map",Y=Dt(d,1,this.transform.zoom),le=this.collisionIndex.mapProjection.translatePosition(this.transform,d,P.get("text-translate"),P.get("text-translate-anchor")),me=this.collisionIndex.mapProjection.translatePosition(this.transform,d,P.get("icon-translate"),P.get("icon-translate-anchor")),ie=eo(H,X,ne,this.transform,Y);let ve=null;if(X){const Pe=to(H,X,ne,this.transform,Y);ve=c.K([],this.transform.labelPlaneMatrix,Pe)}this.retainedQueryData[v.bucketInstanceId]=new Gt(v.bucketInstanceId,w,v.sourceLayerIndex,v.index,d.tileID);const Te={bucket:v,layout:T,translationText:le,translationIcon:me,posMatrix:H,unwrappedTileID:j,textLabelPlaneMatrix:ie,labelToScreenMatrix:ve,scale:O,textPixelRatio:R,holdingForFade:d.holdingForFade(),collisionBoxArray:S,partiallyEvaluatedTextSize:c.ag(v.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(v.sourceID)};if(p)for(const Pe of v.sortKeyRanges){const{sortKey:Ve,symbolInstanceStart:Ke,symbolInstanceEnd:ut}=Pe;i.push({sortKey:Ve,symbolInstanceStart:Ke,symbolInstanceEnd:ut,parameters:Te})}else i.push({symbolInstanceStart:0,symbolInstanceEnd:v.symbolInstances.length,parameters:Te})}attemptAnchorPlacement(i,a,d,p,v,w,S,T,P,O,R,j,H,X,ne,Y,le,me,ie){const ve=c.aq[i.textAnchor],Te=[i.textOffset0,i.textOffset1],Pe=nr(ve,d,p,Te,v),Ve=this.collisionIndex.placeCollisionBox(a,j,T,P,O,S,w,Y,R.predicate,ie,Pe);if((!me||this.collisionIndex.placeCollisionBox(me,j,T,P,O,S,w,le,R.predicate,ie,Pe).placeable)&&Ve.placeable){let Ke;if(this.prevPlacement&&this.prevPlacement.variableOffsets[H.crossTileID]&&this.prevPlacement.placements[H.crossTileID]&&this.prevPlacement.placements[H.crossTileID].text&&(Ke=this.prevPlacement.variableOffsets[H.crossTileID].anchor),H.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[H.crossTileID]={textOffset:Te,width:d,height:p,anchor:ve,textBoxScale:v,prevAnchor:Ke},this.markUsedJustification(X,ve,H,ne),X.allowVerticalPlacement&&(this.markUsedOrientation(X,ne,H),this.placedOrientations[H.crossTileID]=ne),{shift:Pe,placedGlyphBoxes:Ve}}}placeLayerBucketPart(i,a,d){const{bucket:p,layout:v,translationText:w,translationIcon:S,posMatrix:T,unwrappedTileID:P,textLabelPlaneMatrix:O,labelToScreenMatrix:R,textPixelRatio:j,holdingForFade:H,collisionBoxArray:X,partiallyEvaluatedTextSize:ne,collisionGroup:Y}=i.parameters,le=v.get("text-optional"),me=v.get("icon-optional"),ie=c.ar(v,"text-overlap","text-allow-overlap"),ve=ie==="always",Te=c.ar(v,"icon-overlap","icon-allow-overlap"),Pe=Te==="always",Ve=v.get("text-rotation-alignment")==="map",Ke=v.get("text-pitch-alignment")==="map",ut=v.get("icon-text-fit")!=="none",ht=v.get("symbol-z-order")==="viewport-y",Je=ve&&(Pe||!p.hasIconData()||me),et=Pe&&(ve||!p.hasTextData()||le);!p.collisionArrays&&X&&p.deserializeCollisionBoxes(X);const yt=this._getTerrainElevationFunc(this.retainedQueryData[p.bucketInstanceId].tileID),Rt=(it,at,kt)=>{var Ii,Zt;if(a[it.crossTileID])return;if(H)return void(this.placements[it.crossTileID]=new Si(!1,!1,!1));let Yt=!1,Ti=!1,Ir=!0,In=null,Ci={box:null,placeable:!1,offscreen:null},Jr={box:null,placeable:!1,offscreen:null},Vr=null,Tr=null,Cr=null,Tn=0,Jo=0,Pl=0;at.textFeatureIndex?Tn=at.textFeatureIndex:it.useRuntimeCollisionCircles&&(Tn=it.featureIndex),at.verticalTextFeatureIndex&&(Jo=at.verticalTextFeatureIndex);const As=at.textBox;if(As){const yr=Ar=>{let Mr=c.ah.horizontal;if(p.allowVerticalPlacement&&!Ar&&this.prevPlacement){const dr=this.prevPlacement.placedOrientations[it.crossTileID];dr&&(this.placedOrientations[it.crossTileID]=dr,Mr=dr,this.markUsedOrientation(p,Mr,it))}return Mr},Cn=(Ar,Mr)=>{if(p.allowVerticalPlacement&&it.numVerticalGlyphVertices>0&&at.verticalTextBox){for(const dr of p.writingModes)if(dr===c.ah.vertical?(Ci=Mr(),Jr=Ci):Ci=Ar(),Ci&&Ci.placeable)break}else Ci=Ar()},Eo=it.textAnchorOffsetStartIndex,Ms=it.textAnchorOffsetEndIndex;if(Ms===Eo){const Ar=(Mr,dr)=>{const Bi=this.collisionIndex.placeCollisionBox(Mr,ie,j,T,P,Ke,Ve,w,Y.predicate,yt);return Bi&&Bi.placeable&&(this.markUsedOrientation(p,dr,it),this.placedOrientations[it.crossTileID]=dr),Bi};Cn(()=>Ar(As,c.ah.horizontal),()=>{const Mr=at.verticalTextBox;return p.allowVerticalPlacement&&it.numVerticalGlyphVertices>0&&Mr?Ar(Mr,c.ah.vertical):{box:null,offscreen:null}}),yr(Ci&&Ci.placeable)}else{let Ar=c.aq[(Zt=(Ii=this.prevPlacement)===null||Ii===void 0?void 0:Ii.variableOffsets[it.crossTileID])===null||Zt===void 0?void 0:Zt.anchor];const Mr=(Bi,ks,uu)=>{const sr=Bi.x2-Bi.x1,Qh=Bi.y2-Bi.y1,Dl=it.textBoxScale,Rl=ut&&Te==="never"?ks:null;let So=null,ed=ie==="never"?1:2,hu="never";Ar&&ed++;for(let du=0;duMr(As,at.iconBox,c.ah.horizontal),()=>{const Bi=at.verticalTextBox;return p.allowVerticalPlacement&&(!Ci||!Ci.placeable)&&it.numVerticalGlyphVertices>0&&Bi?Mr(Bi,at.verticalIconBox,c.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Ci&&(Yt=Ci.placeable,Ir=Ci.offscreen);const dr=yr(Ci&&Ci.placeable);if(!Yt&&this.prevPlacement){const Bi=this.prevPlacement.variableOffsets[it.crossTileID];Bi&&(this.variableOffsets[it.crossTileID]=Bi,this.markUsedJustification(p,Bi.anchor,it,dr))}}}if(Vr=Ci,Yt=Vr&&Vr.placeable,Ir=Vr&&Vr.offscreen,it.useRuntimeCollisionCircles){const yr=p.text.placedSymbolArray.get(it.centerJustifiedTextSymbolIndex),Cn=c.ai(p.textSizeData,ne,yr),Eo=v.get("text-padding");Tr=this.collisionIndex.placeCollisionCircles(ie,yr,p.lineVertexArray,p.glyphOffsetArray,Cn,T,P,O,R,d,Ke,Y.predicate,it.collisionCircleDiameter,Eo,w,yt),Tr.circles.length&&Tr.collisionDetected&&!d&&c.w("Collisions detected, but collision boxes are not shown"),Yt=ve||Tr.circles.length>0&&!Tr.collisionDetected,Ir=Ir&&Tr.offscreen}if(at.iconFeatureIndex&&(Pl=at.iconFeatureIndex),at.iconBox){const yr=Cn=>this.collisionIndex.placeCollisionBox(Cn,Te,j,T,P,Ke,Ve,S,Y.predicate,yt,ut&&In?In:void 0);Jr&&Jr.placeable&&at.verticalIconBox?(Cr=yr(at.verticalIconBox),Ti=Cr.placeable):(Cr=yr(at.iconBox),Ti=Cr.placeable),Ir=Ir&&Cr.offscreen}const Yo=le||it.numHorizontalGlyphVertices===0&&it.numVerticalGlyphVertices===0,zl=me||it.numIconVertices===0;Yo||zl?zl?Yo||(Ti=Ti&&Yt):Yt=Ti&&Yt:Ti=Yt=Ti&&Yt;const cu=Ti&&Cr.placeable;if(Yt&&Vr.placeable&&this.collisionIndex.insertCollisionBox(Vr.box,ie,v.get("text-ignore-placement"),p.bucketInstanceId,Jr&&Jr.placeable&&Jo?Jo:Tn,Y.ID),cu&&this.collisionIndex.insertCollisionBox(Cr.box,Te,v.get("icon-ignore-placement"),p.bucketInstanceId,Pl,Y.ID),Tr&&Yt&&this.collisionIndex.insertCollisionCircles(Tr.circles,ie,v.get("text-ignore-placement"),p.bucketInstanceId,Tn,Y.ID),d&&this.storeCollisionData(p.bucketInstanceId,kt,at,Vr,Cr,Tr),it.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(p.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[it.crossTileID]=new Si(Yt||Je,Ti||et,Ir||p.justReloaded),a[it.crossTileID]=!0};if(ht){if(i.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const it=p.getSortedSymbolIndexes(this.transform.angle);for(let at=it.length-1;at>=0;--at){const kt=it[at];Rt(p.symbolInstances.get(kt),p.collisionArrays[kt],kt)}}else for(let it=i.symbolInstanceStart;it=0&&(i.text.placedSymbolArray.get(S).crossTileID=v>=0&&S!==v?0:d.crossTileID)}markUsedOrientation(i,a,d){const p=a===c.ah.horizontal||a===c.ah.horizontalOnly?a:0,v=a===c.ah.vertical?a:0,w=[d.leftJustifiedTextSymbolIndex,d.centerJustifiedTextSymbolIndex,d.rightJustifiedTextSymbolIndex];for(const S of w)i.text.placedSymbolArray.get(S).placedOrientation=p;d.verticalPlacedTextSymbolIndex&&(i.text.placedSymbolArray.get(d.verticalPlacedTextSymbolIndex).placedOrientation=v)}commit(i){this.commitTime=i,this.zoomAtLastRecencyCheck=this.transform.zoom;const a=this.prevPlacement;let d=!1;this.prevZoomAdjustment=a?a.zoomAdjustment(this.transform.zoom):0;const p=a?a.symbolFadeChange(i):1,v=a?a.opacities:{},w=a?a.variableOffsets:{},S=a?a.placedOrientations:{};for(const T in this.placements){const P=this.placements[T],O=v[T];O?(this.opacities[T]=new fi(O,p,P.text,P.icon),d=d||P.text!==O.text.placed||P.icon!==O.icon.placed):(this.opacities[T]=new fi(null,p,P.text,P.icon,P.skipFade),d=d||P.text||P.icon)}for(const T in v){const P=v[T];if(!this.opacities[T]){const O=new fi(P,p,!1,!1);O.isHidden()||(this.opacities[T]=O,d=d||P.text.placed||P.icon.placed)}}for(const T in w)this.variableOffsets[T]||!this.opacities[T]||this.opacities[T].isHidden()||(this.variableOffsets[T]=w[T]);for(const T in S)this.placedOrientations[T]||!this.opacities[T]||this.opacities[T].isHidden()||(this.placedOrientations[T]=S[T]);if(a&&a.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");d?this.lastPlacementChangeTime=i:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=a?a.lastPlacementChangeTime:i)}updateLayerOpacities(i,a){const d={};for(const p of a){const v=p.getBucket(i);v&&p.latestFeatureIndex&&i.id===v.layerIds[0]&&this.updateBucketOpacities(v,p.tileID,d,p.collisionBoxArray)}}updateBucketOpacities(i,a,d,p){i.hasTextData()&&(i.text.opacityVertexArray.clear(),i.text.hasVisibleVertices=!1),i.hasIconData()&&(i.icon.opacityVertexArray.clear(),i.icon.hasVisibleVertices=!1),i.hasIconCollisionBoxData()&&i.iconCollisionBox.collisionVertexArray.clear(),i.hasTextCollisionBoxData()&&i.textCollisionBox.collisionVertexArray.clear();const v=i.layers[0],w=v.layout,S=new fi(null,0,!1,!1,!0),T=w.get("text-allow-overlap"),P=w.get("icon-allow-overlap"),O=v._unevaluatedLayout.hasValue("text-variable-anchor")||v._unevaluatedLayout.hasValue("text-variable-anchor-offset"),R=w.get("text-rotation-alignment")==="map",j=w.get("text-pitch-alignment")==="map",H=w.get("icon-text-fit")!=="none",X=new fi(null,0,T&&(P||!i.hasIconData()||w.get("icon-optional")),P&&(T||!i.hasTextData()||w.get("text-optional")),!0);!i.collisionArrays&&p&&(i.hasIconCollisionBoxData()||i.hasTextCollisionBoxData())&&i.deserializeCollisionBoxes(p);const ne=(le,me,ie)=>{for(let ve=0;ve0,Ke=this.placedOrientations[me.crossTileID],ut=Ke===c.ah.vertical,ht=Ke===c.ah.horizontal||Ke===c.ah.horizontalOnly;if(ie>0||ve>0){const et=Wr(Pe.text);ne(i.text,ie,ut?sa:et),ne(i.text,ve,ht?sa:et);const yt=Pe.text.isHidden();[me.rightJustifiedTextSymbolIndex,me.centerJustifiedTextSymbolIndex,me.leftJustifiedTextSymbolIndex].forEach(at=>{at>=0&&(i.text.placedSymbolArray.get(at).hidden=yt||ut?1:0)}),me.verticalPlacedTextSymbolIndex>=0&&(i.text.placedSymbolArray.get(me.verticalPlacedTextSymbolIndex).hidden=yt||ht?1:0);const Rt=this.variableOffsets[me.crossTileID];Rt&&this.markUsedJustification(i,Rt.anchor,me,Ke);const it=this.placedOrientations[me.crossTileID];it&&(this.markUsedJustification(i,"left",me,it),this.markUsedOrientation(i,it,me))}if(Ve){const et=Wr(Pe.icon),yt=!(H&&me.verticalPlacedIconSymbolIndex&&ut);me.placedIconSymbolIndex>=0&&(ne(i.icon,me.numIconVertices,yt?et:sa),i.icon.placedSymbolArray.get(me.placedIconSymbolIndex).hidden=Pe.icon.isHidden()),me.verticalPlacedIconSymbolIndex>=0&&(ne(i.icon,me.numVerticalIconVertices,yt?sa:et),i.icon.placedSymbolArray.get(me.verticalPlacedIconSymbolIndex).hidden=Pe.icon.isHidden())}const Je=Y&&Y.has(le)?Y.get(le):{text:null,icon:null};if(i.hasIconCollisionBoxData()||i.hasTextCollisionBoxData()){const et=i.collisionArrays[le];if(et){let yt=new c.P(0,0);if(et.textBox||et.verticalTextBox){let Rt=!0;if(O){const it=this.variableOffsets[Te];it?(yt=nr(it.anchor,it.width,it.height,it.textOffset,it.textBoxScale),R&&yt._rotate(j?this.transform.angle:-this.transform.angle)):Rt=!1}if(et.textBox||et.verticalTextBox){let it;et.textBox&&(it=ut),et.verticalTextBox&&(it=ht),ln(i.textCollisionBox.collisionVertexArray,Pe.text.placed,!Rt||it,Je.text,yt.x,yt.y)}}if(et.iconBox||et.verticalIconBox){const Rt=!!(!ht&&et.verticalIconBox);let it;et.iconBox&&(it=Rt),et.verticalIconBox&&(it=!Rt),ln(i.iconCollisionBox.collisionVertexArray,Pe.icon.placed,it,Je.icon,H?yt.x:0,H?yt.y:0)}}}}if(i.sortFeatures(this.transform.angle),this.retainedQueryData[i.bucketInstanceId]&&(this.retainedQueryData[i.bucketInstanceId].featureSortOrder=i.featureSortOrder),i.hasTextData()&&i.text.opacityVertexBuffer&&i.text.opacityVertexBuffer.updateData(i.text.opacityVertexArray),i.hasIconData()&&i.icon.opacityVertexBuffer&&i.icon.opacityVertexBuffer.updateData(i.icon.opacityVertexArray),i.hasIconCollisionBoxData()&&i.iconCollisionBox.collisionVertexBuffer&&i.iconCollisionBox.collisionVertexBuffer.updateData(i.iconCollisionBox.collisionVertexArray),i.hasTextCollisionBoxData()&&i.textCollisionBox.collisionVertexBuffer&&i.textCollisionBox.collisionVertexBuffer.updateData(i.textCollisionBox.collisionVertexArray),i.text.opacityVertexArray.length!==i.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${i.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${i.text.layoutVertexArray.length}) / 4`);if(i.icon.opacityVertexArray.length!==i.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${i.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${i.icon.layoutVertexArray.length}) / 4`);if(i.bucketInstanceId in this.collisionCircleArrays){const le=this.collisionCircleArrays[i.bucketInstanceId];i.placementInvProjMatrix=le.invProjMatrix,i.placementViewportMatrix=le.viewportMatrix,i.collisionCircleArray=le.circles,delete this.collisionCircleArrays[i.bucketInstanceId]}}symbolFadeChange(i){return this.fadeDuration===0?1:(i-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(i){return Math.max(0,(this.transform.zoom-i)/1.5)}hasTransitions(i){return this.stale||i-this.lastPlacementChangeTimei}setStale(){this.stale=!0}}function ln(_,i,a,d,p,v){d&&d.length!==0||(d=[0,0,0,0]);const w=d[0]-Et,S=d[1]-Et,T=d[2]-Et,P=d[3]-Et;_.emplaceBack(i?1:0,a?1:0,p||0,v||0,w,S),_.emplaceBack(i?1:0,a?1:0,p||0,v||0,T,S),_.emplaceBack(i?1:0,a?1:0,p||0,v||0,T,P),_.emplaceBack(i?1:0,a?1:0,p||0,v||0,w,P)}const or=Math.pow(2,25),ms=Math.pow(2,24),$f=Math.pow(2,17),ui=Math.pow(2,16),wc=Math.pow(2,9),Ec=Math.pow(2,8),cn=Math.pow(2,1);function Wr(_){if(_.opacity===0&&!_.placed)return 0;if(_.opacity===1&&_.placed)return 4294967295;const i=_.placed?1:0,a=Math.floor(127*_.opacity);return a*or+i*ms+a*$f+i*ui+a*wc+i*Ec+a*cn+i}const sa=0;function Xr(){return{isOccluded:(_,i,a)=>!1,getPitchedTextCorrection:(_,i,a)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(_,i,a,d){throw new Error("Not implemented.")},translatePosition:(_,i,a,d)=>function(p,v,w,S,T=!1){if(!w[0]&&!w[1])return[0,0];const P=T?S==="map"?p.angle:0:S==="viewport"?-p.angle:0;if(P){const O=Math.sin(P),R=Math.cos(P);w=[w[0]*R-w[1]*O,w[0]*O+w[1]*R]}return[T?w[0]:Dt(v,w[0],p.zoom),T?w[1]:Dt(v,w[1],p.zoom)]}(_,i,a,d),getCircleRadiusCorrection:_=>1}}class _n{constructor(i){this._sortAcrossTiles=i.layout.get("symbol-z-order")!=="viewport-y"&&!i.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(i,a,d,p,v){const w=this._bucketParts;for(;this._currentTileIndexS.sortKey-T.sortKey));this._currentPartIndex!this._forceFullPlacement&&A.now()-p>2;for(;this._currentPlacementIndex>=0;){const w=a[i[this._currentPlacementIndex]],S=this.placement.collisionIndex.transform.zoom;if(w.type==="symbol"&&(!w.minzoom||w.minzoom<=S)&&(!w.maxzoom||w.maxzoom>S)){if(this._inProgressLayer||(this._inProgressLayer=new _n(w)),this._inProgressLayer.continuePlacement(d[w.source],this.placement,this._showCollisionBoxes,w,v))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(i){return this.placement.commit(i),this.placement}}const io=512/c.W/2;class Qi{constructor(i,a,d){this.tileID=i,this.bucketInstanceId=d,this._symbolsByKey={};const p=new Map;for(let v=0;v({x:Math.floor(T.anchorX*io),y:Math.floor(T.anchorY*io)})),crossTileIDs:w.map(T=>T.crossTileID)};if(S.positions.length>128){const T=new c.av(S.positions.length,16,Uint16Array);for(const{x:P,y:O}of S.positions)T.add(P,O);T.finish(),delete S.positions,S.index=T}this._symbolsByKey[v]=S}}getScaledCoordinates(i,a){const{x:d,y:p,z:v}=this.tileID.canonical,{x:w,y:S,z:T}=a.canonical,P=io/Math.pow(2,T-v),O=(S*c.W+i.anchorY)*P,R=p*c.W*io;return{x:Math.floor((w*c.W+i.anchorX)*P-d*c.W*io),y:Math.floor(O-R)}}findMatches(i,a,d){const p=this.tileID.canonical.zi)}}class aa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class jo{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(i){const a=Math.round((i-this.lng)/360);if(a!==0)for(const d in this.indexes){const p=this.indexes[d],v={};for(const w in p){const S=p[w];S.tileID=S.tileID.unwrapTo(S.tileID.wrap+a),v[S.tileID.key]=S}this.indexes[d]=v}this.lng=i}addBucket(i,a,d){if(this.indexes[i.overscaledZ]&&this.indexes[i.overscaledZ][i.key]){if(this.indexes[i.overscaledZ][i.key].bucketInstanceId===a.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(i.overscaledZ,this.indexes[i.overscaledZ][i.key])}for(let v=0;vi.overscaledZ)for(const S in w){const T=w[S];T.tileID.isChildOf(i)&&T.findMatches(a.symbolInstances,i,p)}else{const S=w[i.scaledTo(Number(v)).key];S&&S.findMatches(a.symbolInstances,i,p)}}for(let v=0;v{a[d]=!0});for(const d in this.layerIndexes)a[d]||delete this.layerIndexes[d]}}const $o=(_,i)=>c.t(_,i&&i.filter(a=>a.identifier!=="source.canvas")),Sn=c.aw();class el extends c.E{constructor(i,a={}){super(),this._rtlPluginLoaded=()=>{for(const d in this.sourceCaches){const p=this.sourceCaches[d].getSource().type;p!=="vector"&&p!=="geojson"||this.sourceCaches[d].reload()}},this.map=i,this.dispatcher=new Di(Li(),i._getMapId()),this.dispatcher.registerMessageHandler("GG",(d,p)=>this.getGlyphs(d,p)),this.dispatcher.registerMessageHandler("GI",(d,p)=>this.getImages(d,p)),this.imageManager=new De,this.imageManager.setEventedParent(this),this.glyphManager=new dt(i._requestManager,a.localIdeographFontFamily),this.lineAtlas=new Vt(256,512),this.crossTileSymbolIndex=new qi,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new c.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",c.ay()),Ht().on(Mt,this._rtlPluginLoaded),this.on("data",d=>{if(d.dataType!=="source"||d.sourceDataType!=="metadata")return;const p=this.sourceCaches[d.sourceId];if(!p)return;const v=p.getSource();if(v&&v.vectorLayerIds)for(const w in this._layers){const S=this._layers[w];S.source===v.id&&this._validateLayer(S)}})}loadURL(i,a={},d){this.fire(new c.k("dataloading",{dataType:"style"})),a.validate=typeof a.validate!="boolean"||a.validate;const p=this.map._requestManager.transformRequest(i,"Style");this._loadStyleRequest=new AbortController,c.h(p,this._loadStyleRequest).then(v=>{this._loadStyleRequest=null,this._load(v.data,a,d)}).catch(v=>{this._loadStyleRequest=null,v&&this.fire(new c.j(v))})}loadJSON(i,a={},d){this.fire(new c.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,A.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,a.validate=a.validate!==!1,this._load(i,a,d)}).catch(()=>{})}loadEmpty(){this.fire(new c.k("dataloading",{dataType:"style"})),this._load(Sn,{validate:!1})}_load(i,a,d){var p;const v=a.transformStyle?a.transformStyle(d,i):i;if(!a.validate||!$o(this,c.x(v))){this._loaded=!0,this.stylesheet=v;for(const w in v.sources)this.addSource(w,v.sources[w],{validate:!1});v.sprite?this._loadSprite(v.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(v.glyphs),this._createLayers(),this.light=new $t(this.stylesheet.light),this.map.setTerrain((p=this.stylesheet.terrain)!==null&&p!==void 0?p:null),this.fire(new c.k("data",{dataType:"style"})),this.fire(new c.k("style.load"))}}_createLayers(){const i=c.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",i),this._order=i.map(a=>a.id),this._layers={},this._serializedLayers=null;for(const a of i){const d=c.aA(a);d.setEventedParent(this,{layer:{id:a.id}}),this._layers[a.id]=d}}_loadSprite(i,a=!1,d=void 0){let p;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(v,w,S,T){return c._(this,void 0,void 0,function*(){const P=Le(v),O=S>1?"@2x":"",R={},j={};for(const{id:H,url:X}of P){const ne=w.transformRequest(pe(X,O,".json"),"SpriteJSON");R[H]=c.h(ne,T);const Y=w.transformRequest(pe(X,O,".png"),"SpriteImage");j[H]=W.getImage(Y,T)}return yield Promise.all([...Object.values(R),...Object.values(j)]),function(H,X){return c._(this,void 0,void 0,function*(){const ne={};for(const Y in H){ne[Y]={};const le=A.getImageCanvasContext((yield X[Y]).data),me=(yield H[Y]).data;for(const ie in me){const{width:ve,height:Te,x:Pe,y:Ve,sdf:Ke,pixelRatio:ut,stretchX:ht,stretchY:Je,content:et,textFitWidth:yt,textFitHeight:Rt}=me[ie];ne[Y][ie]={data:null,pixelRatio:ut,sdf:Ke,stretchX:ht,stretchY:Je,content:et,textFitWidth:yt,textFitHeight:Rt,spriteData:{width:ve,height:Te,x:Pe,y:Ve,context:le}}}}return ne})}(R,j)})}(i,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(v=>{if(this._spriteRequest=null,v)for(const w in v){this._spritesImagesIds[w]=[];const S=this._spritesImagesIds[w]?this._spritesImagesIds[w].filter(T=>!(T in v)):[];for(const T of S)this.imageManager.removeImage(T),this._changedImages[T]=!0;for(const T in v[w]){const P=w==="default"?T:`${w}:${T}`;this._spritesImagesIds[w].push(P),P in this.imageManager.images?this.imageManager.updateImage(P,v[w][T],!1):this.imageManager.addImage(P,v[w][T]),a&&(this._changedImages[P]=!0)}}}).catch(v=>{this._spriteRequest=null,p=v,this.fire(new c.j(p))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),a&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.k("data",{dataType:"style"})),d&&d(p)})}_unloadSprite(){for(const i of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(i),this._changedImages[i]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.k("data",{dataType:"style"}))}_validateLayer(i){const a=this.sourceCaches[i.source];if(!a)return;const d=i.sourceLayer;if(!d)return;const p=a.getSource();(p.type==="geojson"||p.vectorLayerIds&&p.vectorLayerIds.indexOf(d)===-1)&&this.fire(new c.j(new Error(`Source layer "${d}" does not exist on source "${p.id}" as specified by style layer "${i.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const i in this.sourceCaches)if(!this.sourceCaches[i].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(i){const a=this._serializedAllLayers();if(!i||i.length===0)return Object.values(a);const d=[];for(const p of i)a[p]&&d.push(a[p]);return d}_serializedAllLayers(){let i=this._serializedLayers;if(i)return i;i=this._serializedLayers={};const a=Object.keys(this._layers);for(const d of a){const p=this._layers[d];p.type!=="custom"&&(i[d]=p.serialize())}return i}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const i in this.sourceCaches)if(this.sourceCaches[i].hasTransition())return!0;for(const i in this._layers)if(this._layers[i].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(i){if(!this._loaded)return;const a=this._changed;if(a){const p=Object.keys(this._updatedLayers),v=Object.keys(this._removedLayers);(p.length||v.length)&&this._updateWorkerLayers(p,v);for(const w in this._updatedSources){const S=this._updatedSources[w];if(S==="reload")this._reloadSource(w);else{if(S!=="clear")throw new Error(`Invalid action ${S}`);this._clearSource(w)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const w in this._updatedPaintProps)this._layers[w].updateTransitions(i);this.light.updateTransitions(i),this._resetUpdates()}const d={};for(const p in this.sourceCaches){const v=this.sourceCaches[p];d[p]=v.used,v.used=!1}for(const p of this._order){const v=this._layers[p];v.recalculate(i,this._availableImages),!v.isHidden(i.zoom)&&v.source&&(this.sourceCaches[v.source].used=!0)}for(const p in d){const v=this.sourceCaches[p];!!d[p]!=!!v.used&&v.fire(new c.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:p}))}this.light.recalculate(i),this.z=i.zoom,a&&this.fire(new c.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const i=Object.keys(this._changedImages);if(i.length){for(const a in this.sourceCaches)this.sourceCaches[a].reloadTilesForDependencies(["icons","patterns"],i);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const i in this.sourceCaches)this.sourceCaches[i].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(i,a){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(i),removedIds:a})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(i,a={}){var d;this._checkLoaded();const p=this.serialize();if(i=a.transformStyle?a.transformStyle(p,i):i,((d=a.validate)===null||d===void 0||d)&&$o(this,c.x(i)))return!1;(i=c.aB(i)).layers=c.az(i.layers);const v=c.aC(p,i),w=this._getOperationsToPerform(v);if(w.unimplemented.length>0)throw new Error(`Unimplemented: ${w.unimplemented.join(", ")}.`);if(w.operations.length===0)return!1;for(const S of w.operations)S();return this.stylesheet=i,this._serializedLayers=null,!0}_getOperationsToPerform(i){const a=[],d=[];for(const p of i)switch(p.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":a.push(()=>this.addLayer.apply(this,p.args));break;case"removeLayer":a.push(()=>this.removeLayer.apply(this,p.args));break;case"setPaintProperty":a.push(()=>this.setPaintProperty.apply(this,p.args));break;case"setLayoutProperty":a.push(()=>this.setLayoutProperty.apply(this,p.args));break;case"setFilter":a.push(()=>this.setFilter.apply(this,p.args));break;case"addSource":a.push(()=>this.addSource.apply(this,p.args));break;case"removeSource":a.push(()=>this.removeSource.apply(this,p.args));break;case"setLayerZoomRange":a.push(()=>this.setLayerZoomRange.apply(this,p.args));break;case"setLight":a.push(()=>this.setLight.apply(this,p.args));break;case"setGeoJSONSourceData":a.push(()=>this.setGeoJSONSourceData.apply(this,p.args));break;case"setGlyphs":a.push(()=>this.setGlyphs.apply(this,p.args));break;case"setSprite":a.push(()=>this.setSprite.apply(this,p.args));break;case"setTerrain":a.push(()=>this.map.setTerrain.apply(this,p.args));break;case"setTransition":a.push(()=>{});break;default:d.push(p.command)}return{operations:a,unimplemented:d}}addImage(i,a){if(this.getImage(i))return this.fire(new c.j(new Error(`An image named "${i}" already exists.`)));this.imageManager.addImage(i,a),this._afterImageUpdated(i)}updateImage(i,a){this.imageManager.updateImage(i,a)}getImage(i){return this.imageManager.getImage(i)}removeImage(i){if(!this.getImage(i))return this.fire(new c.j(new Error(`An image named "${i}" does not exist.`)));this.imageManager.removeImage(i),this._afterImageUpdated(i)}_afterImageUpdated(i){this._availableImages=this.imageManager.listImages(),this._changedImages[i]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(i,a,d={}){if(this._checkLoaded(),this.sourceCaches[i]!==void 0)throw new Error(`Source "${i}" already exists.`);if(!a.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(a).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(a.type)>=0&&this._validate(c.x.source,`sources.${i}`,a,null,d))return;this.map&&this.map._collectResourceTiming&&(a.collectResourceTiming=!0);const p=this.sourceCaches[i]=new Ye(i,a,this.dispatcher);p.style=this,p.setEventedParent(this,()=>({isSourceLoaded:p.loaded(),source:p.serialize(),sourceId:i})),p.onAdd(this.map),this._changed=!0}removeSource(i){if(this._checkLoaded(),this.sourceCaches[i]===void 0)throw new Error("There is no source with this ID");for(const d in this._layers)if(this._layers[d].source===i)return this.fire(new c.j(new Error(`Source "${i}" cannot be removed while layer "${d}" is using it.`)));const a=this.sourceCaches[i];delete this.sourceCaches[i],delete this._updatedSources[i],a.fire(new c.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:i})),a.setEventedParent(null),a.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(i,a){if(this._checkLoaded(),this.sourceCaches[i]===void 0)throw new Error(`There is no source with this ID=${i}`);const d=this.sourceCaches[i].getSource();if(d.type!=="geojson")throw new Error(`geojsonSource.type is ${d.type}, which is !== 'geojson`);d.setData(a),this._changed=!0}getSource(i){return this.sourceCaches[i]&&this.sourceCaches[i].getSource()}addLayer(i,a,d={}){this._checkLoaded();const p=i.id;if(this.getLayer(p))return void this.fire(new c.j(new Error(`Layer "${p}" already exists on this map.`)));let v;if(i.type==="custom"){if($o(this,c.aD(i)))return;v=c.aA(i)}else{if("source"in i&&typeof i.source=="object"&&(this.addSource(p,i.source),i=c.aB(i),i=c.e(i,{source:p})),this._validate(c.x.layer,`layers.${p}`,i,{arrayIndex:-1},d))return;v=c.aA(i),this._validateLayer(v),v.setEventedParent(this,{layer:{id:p}})}const w=a?this._order.indexOf(a):this._order.length;if(a&&w===-1)this.fire(new c.j(new Error(`Cannot add layer "${p}" before non-existing layer "${a}".`)));else{if(this._order.splice(w,0,p),this._layerOrderChanged=!0,this._layers[p]=v,this._removedLayers[p]&&v.source&&v.type!=="custom"){const S=this._removedLayers[p];delete this._removedLayers[p],S.type!==v.type?this._updatedSources[v.source]="clear":(this._updatedSources[v.source]="reload",this.sourceCaches[v.source].pause())}this._updateLayer(v),v.onAdd&&v.onAdd(this.map)}}moveLayer(i,a){if(this._checkLoaded(),this._changed=!0,!this._layers[i])return void this.fire(new c.j(new Error(`The layer '${i}' does not exist in the map's style and cannot be moved.`)));if(i===a)return;const d=this._order.indexOf(i);this._order.splice(d,1);const p=a?this._order.indexOf(a):this._order.length;a&&p===-1?this.fire(new c.j(new Error(`Cannot move layer "${i}" before non-existing layer "${a}".`))):(this._order.splice(p,0,i),this._layerOrderChanged=!0)}removeLayer(i){this._checkLoaded();const a=this._layers[i];if(!a)return void this.fire(new c.j(new Error(`Cannot remove non-existing layer "${i}".`)));a.setEventedParent(null);const d=this._order.indexOf(i);this._order.splice(d,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[i]=a,delete this._layers[i],this._serializedLayers&&delete this._serializedLayers[i],delete this._updatedLayers[i],delete this._updatedPaintProps[i],a.onRemove&&a.onRemove(this.map)}getLayer(i){return this._layers[i]}getLayersOrder(){return[...this._order]}hasLayer(i){return i in this._layers}setLayerZoomRange(i,a,d){this._checkLoaded();const p=this.getLayer(i);p?p.minzoom===a&&p.maxzoom===d||(a!=null&&(p.minzoom=a),d!=null&&(p.maxzoom=d),this._updateLayer(p)):this.fire(new c.j(new Error(`Cannot set the zoom range of non-existing layer "${i}".`)))}setFilter(i,a,d={}){this._checkLoaded();const p=this.getLayer(i);if(p){if(!c.aE(p.filter,a))return a==null?(p.filter=void 0,void this._updateLayer(p)):void(this._validate(c.x.filter,`layers.${p.id}.filter`,a,null,d)||(p.filter=c.aB(a),this._updateLayer(p)))}else this.fire(new c.j(new Error(`Cannot filter non-existing layer "${i}".`)))}getFilter(i){return c.aB(this.getLayer(i).filter)}setLayoutProperty(i,a,d,p={}){this._checkLoaded();const v=this.getLayer(i);v?c.aE(v.getLayoutProperty(a),d)||(v.setLayoutProperty(a,d,p),this._updateLayer(v)):this.fire(new c.j(new Error(`Cannot style non-existing layer "${i}".`)))}getLayoutProperty(i,a){const d=this.getLayer(i);if(d)return d.getLayoutProperty(a);this.fire(new c.j(new Error(`Cannot get style of non-existing layer "${i}".`)))}setPaintProperty(i,a,d,p={}){this._checkLoaded();const v=this.getLayer(i);v?c.aE(v.getPaintProperty(a),d)||(v.setPaintProperty(a,d,p)&&this._updateLayer(v),this._changed=!0,this._updatedPaintProps[i]=!0,this._serializedLayers=null):this.fire(new c.j(new Error(`Cannot style non-existing layer "${i}".`)))}getPaintProperty(i,a){return this.getLayer(i).getPaintProperty(a)}setFeatureState(i,a){this._checkLoaded();const d=i.source,p=i.sourceLayer,v=this.sourceCaches[d];if(v===void 0)return void this.fire(new c.j(new Error(`The source '${d}' does not exist in the map's style.`)));const w=v.getSource().type;w==="geojson"&&p?this.fire(new c.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):w!=="vector"||p?(i.id===void 0&&this.fire(new c.j(new Error("The feature id parameter must be provided."))),v.setFeatureState(p,i.id,a)):this.fire(new c.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(i,a){this._checkLoaded();const d=i.source,p=this.sourceCaches[d];if(p===void 0)return void this.fire(new c.j(new Error(`The source '${d}' does not exist in the map's style.`)));const v=p.getSource().type,w=v==="vector"?i.sourceLayer:void 0;v!=="vector"||w?a&&typeof i.id!="string"&&typeof i.id!="number"?this.fire(new c.j(new Error("A feature id is required to remove its specific state property."))):p.removeFeatureState(w,i.id,a):this.fire(new c.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(i){this._checkLoaded();const a=i.source,d=i.sourceLayer,p=this.sourceCaches[a];if(p!==void 0)return p.getSource().type!=="vector"||d?(i.id===void 0&&this.fire(new c.j(new Error("The feature id parameter must be provided."))),p.getFeatureState(d,i.id)):void this.fire(new c.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new c.j(new Error(`The source '${a}' does not exist in the map's style.`)))}getTransition(){return c.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const i=c.aF(this.sourceCaches,v=>v.serialize()),a=this._serializeByIds(this._order),d=this.map.getTerrain()||void 0,p=this.stylesheet;return c.aG({version:p.version,name:p.name,metadata:p.metadata,light:p.light,center:p.center,zoom:p.zoom,bearing:p.bearing,pitch:p.pitch,sprite:p.sprite,glyphs:p.glyphs,transition:p.transition,sources:i,layers:a,terrain:d},v=>v!==void 0)}_updateLayer(i){this._updatedLayers[i.id]=!0,i.source&&!this._updatedSources[i.source]&&this.sourceCaches[i.source].getSource().type!=="raster"&&(this._updatedSources[i.source]="reload",this.sourceCaches[i.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(i){const a=w=>this._layers[w].type==="fill-extrusion",d={},p=[];for(let w=this._order.length-1;w>=0;w--){const S=this._order[w];if(a(S)){d[S]=w;for(const T of i){const P=T[S];if(P)for(const O of P)p.push(O)}}}p.sort((w,S)=>S.intersectionZ-w.intersectionZ);const v=[];for(let w=this._order.length-1;w>=0;w--){const S=this._order[w];if(a(S))for(let T=p.length-1;T>=0;T--){const P=p[T].feature;if(d[P.layer.id]{const Ke=le.featureSortOrder;if(Ke){const ut=Ke.indexOf(Pe.featureIndex);return Ke.indexOf(Ve.featureIndex)-ut}return Ve.featureIndex-Pe.featureIndex});for(const Pe of Te)ve.push(Pe)}}for(const le in X)X[le].forEach(me=>{const ie=me.feature,ve=P[S[le].source].getFeatureState(ie.layer["source-layer"],ie.id);ie.source=ie.layer.source,ie.layer["source-layer"]&&(ie.sourceLayer=ie.layer["source-layer"]),ie.state=ve});return X}(this._layers,w,this.sourceCaches,i,a,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(v)}querySourceFeatures(i,a){a&&a.filter&&this._validate(c.x.filter,"querySourceFeatures.filter",a.filter,null,a);const d=this.sourceCaches[i];return d?function(p,v){const w=p.getRenderableIds().map(P=>p.getTileByID(P)),S=[],T={};for(let P=0;Pj.getTileByID(H)).sort((H,X)=>X.tileID.overscaledZ-H.tileID.overscaledZ||(H.tileID.isLessThan(X.tileID)?-1:1))}const R=this.crossTileSymbolIndex.addLayer(O,T[O.source],i.center.lng);w=w||R}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((v=v||this._layerOrderChanged||d===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(A.now(),i.zoom))&&(this.pauseablePlacement=new gh(i,this.map.terrain,this._order,v,a,d,p,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,T),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(A.now()),S=!0),w&&this.pauseablePlacement.placement.setStale()),S||w)for(const P of this._order){const O=this._layers[P];O.type==="symbol"&&this.placement.updateLayerOpacities(O,T[O.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(A.now())}_releaseSymbolFadeTiles(){for(const i in this.sourceCaches)this.sourceCaches[i].releaseSymbolFadeTiles()}getImages(i,a){return c._(this,void 0,void 0,function*(){const d=yield this.imageManager.getImages(a.icons);this._updateTilesForChangedImages();const p=this.sourceCaches[a.source];return p&&p.setDependencies(a.tileID.key,a.type,a.icons),d})}getGlyphs(i,a){return c._(this,void 0,void 0,function*(){const d=yield this.glyphManager.getGlyphs(a.stacks),p=this.sourceCaches[a.source];return p&&p.setDependencies(a.tileID.key,a.type,[""]),d})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(i,a={}){this._checkLoaded(),i&&this._validate(c.x.glyphs,"glyphs",i,null,a)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=i,this.glyphManager.entries={},this.glyphManager.setURL(i))}addSprite(i,a,d={},p){this._checkLoaded();const v=[{id:i,url:a}],w=[...Le(this.stylesheet.sprite),...v];this._validate(c.x.sprite,"sprite",w,null,d)||(this.stylesheet.sprite=w,this._loadSprite(v,!0,p))}removeSprite(i){this._checkLoaded();const a=Le(this.stylesheet.sprite);if(a.find(d=>d.id===i)){if(this._spritesImagesIds[i])for(const d of this._spritesImagesIds[i])this.imageManager.removeImage(d),this._changedImages[d]=!0;a.splice(a.findIndex(d=>d.id===i),1),this.stylesheet.sprite=a.length>0?a:void 0,delete this._spritesImagesIds[i],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.k("data",{dataType:"style"}))}else this.fire(new c.j(new Error(`Sprite "${i}" doesn't exists on this map.`)))}getSprite(){return Le(this.stylesheet.sprite)}setSprite(i,a={},d){this._checkLoaded(),i&&this._validate(c.x.sprite,"sprite",i,null,a)||(this.stylesheet.sprite=i,i?this._loadSprite(i,!0,d):(this._unloadSprite(),d&&d(null)))}}var Nn=c.X([{name:"a_pos",type:"Int16",components:2}]),Sc="attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_depth;void main() {float extent=8192.0;float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/extent;gl_Position=u_matrix*vec4(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}";const gs={prelude:ai(`#ifdef GL_ES + */(function(e,n){(function(s,u){e.exports=u()})(f5,function(){var s={},u={};function h(m,c,I){if(u[m]=I,m==="index"){var k="var sharedModule = {}; ("+u.shared+")(sharedModule); ("+u.worker+")(sharedModule);",M={};return u.shared(M),u.index(s,M),typeof window<"u"&&s.setWorkerUrl(window.URL.createObjectURL(new Blob([k],{type:"text/javascript"}))),s}}h("shared",["exports"],function(m){function c(r,t,o,l){return new(o||(o=Promise))(function(f,y){function x(C){try{E(l.next(C))}catch(L){y(L)}}function b(C){try{E(l.throw(C))}catch(L){y(L)}}function E(C){var L;C.done?f(C.value):(L=C.value,L instanceof o?L:new o(function(D){D(L)})).then(x,b)}E((l=l.apply(r,t||[])).next())})}function I(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}typeof SuppressedError=="function"&&SuppressedError;var k=M;function M(r,t){this.x=r,this.y=t}M.prototype={clone:function(){return new M(this.x,this.y)},add:function(r){return this.clone()._add(r)},sub:function(r){return this.clone()._sub(r)},multByPoint:function(r){return this.clone()._multByPoint(r)},divByPoint:function(r){return this.clone()._divByPoint(r)},mult:function(r){return this.clone()._mult(r)},div:function(r){return this.clone()._div(r)},rotate:function(r){return this.clone()._rotate(r)},rotateAround:function(r,t){return this.clone()._rotateAround(r,t)},matMult:function(r){return this.clone()._matMult(r)},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(r){return this.x===r.x&&this.y===r.y},dist:function(r){return Math.sqrt(this.distSqr(r))},distSqr:function(r){var t=r.x-this.x,o=r.y-this.y;return t*t+o*o},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(r){return Math.atan2(this.y-r.y,this.x-r.x)},angleWith:function(r){return this.angleWithSep(r.x,r.y)},angleWithSep:function(r,t){return Math.atan2(this.x*t-this.y*r,this.x*r+this.y*t)},_matMult:function(r){var t=r[2]*this.x+r[3]*this.y;return this.x=r[0]*this.x+r[1]*this.y,this.y=t,this},_add:function(r){return this.x+=r.x,this.y+=r.y,this},_sub:function(r){return this.x-=r.x,this.y-=r.y,this},_mult:function(r){return this.x*=r,this.y*=r,this},_div:function(r){return this.x/=r,this.y/=r,this},_multByPoint:function(r){return this.x*=r.x,this.y*=r.y,this},_divByPoint:function(r){return this.x/=r.x,this.y/=r.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var r=this.y;return this.y=this.x,this.x=-r,this},_rotate:function(r){var t=Math.cos(r),o=Math.sin(r),l=o*this.x+t*this.y;return this.x=t*this.x-o*this.y,this.y=l,this},_rotateAround:function(r,t){var o=Math.cos(r),l=Math.sin(r),f=t.y+l*(this.x-t.x)+o*(this.y-t.y);return this.x=t.x+o*(this.x-t.x)-l*(this.y-t.y),this.y=f,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},M.convert=function(r){return r instanceof M?r:Array.isArray(r)?new M(r[0],r[1]):r};var A=I(k),z=q;function q(r,t,o,l){this.cx=3*r,this.bx=3*(o-r)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(l-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=r,this.p1y=t,this.p2x=o,this.p2y=l}q.prototype={sampleCurveX:function(r){return((this.ax*r+this.bx)*r+this.cx)*r},sampleCurveY:function(r){return((this.ay*r+this.by)*r+this.cy)*r},sampleCurveDerivativeX:function(r){return(3*this.ax*r+2*this.bx)*r+this.cx},solveCurveX:function(r,t){if(t===void 0&&(t=1e-6),r<0)return 0;if(r>1)return 1;for(var o=r,l=0;l<8;l++){var f=this.sampleCurveX(o)-r;if(Math.abs(f)f?x=o:b=o,o=.5*(b-x)+x;return o},solve:function(r,t){return this.sampleCurveY(this.solveCurveX(r,t))}};var K=I(z);let J,se;function ke(){return J==null&&(J=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),J}function ye(){if(se==null&&(se=!1,ke())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let l=0;l<5*5;l++){const f=4*l;t.fillStyle=`rgb(${f},${f+1},${f+2})`,t.fillRect(l%5,Math.floor(l/5),1,1)}const o=t.getImageData(0,0,5,5).data;for(let l=0;l<5*5*4;l++)if(l%4!=3&&o[l]!==l){se=!0;break}}}return se||!1}function Z(r,t,o,l){const f=new K(r,t,o,l);return y=>f.solve(y)}const fe=Z(.25,.1,.25,1);function W(r,t,o){return Math.min(o,Math.max(t,r))}function ee(r,t,o){const l=o-t,f=((r-t)%l+l)%l+t;return f===t?o:f}function Se(r,...t){for(const o of t)for(const l in o)r[l]=o[l];return r}let Ee=1;function Le(r,t,o){const l={};for(const f in r)l[f]=t.call(this,r[f],f,r);return l}function pe(r,t,o){const l={};for(const f in r)t.call(this,r[f],f,r)&&(l[f]=r[f]);return l}function Ie(r){return Array.isArray(r)?r.map(Ie):typeof r=="object"&&r?Le(r,Ie):r}const Ae={};function De(r){Ae[r]||(typeof console<"u"&&console.warn(r),Ae[r]=!0)}function Ge(r,t,o){return(o.y-r.y)*(t.x-r.x)>(t.y-r.y)*(o.x-r.x)}function rt(r){return typeof WorkerGlobalScope<"u"&&r!==void 0&&r instanceof WorkerGlobalScope}let Xe=null;function dt(r){return typeof ImageBitmap<"u"&&r instanceof ImageBitmap}const nt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ei(r,t,o,l,f){return c(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const y=new VideoFrame(r,{timestamp:0});try{const x=y==null?void 0:y.format;if(!x||!x.startsWith("BGR")&&!x.startsWith("RGB"))throw new Error(`Unrecognized format ${x}`);const b=x.startsWith("BGR"),E=new Uint8ClampedArray(l*f*4);if(yield y.copyTo(E,function(C,L,D,B,V){const $=4*Math.max(-L,0),G=(Math.max(0,D)-D)*B*4+$,Q=4*B,oe=Math.max(0,L),we=Math.max(0,D);return{rect:{x:oe,y:we,width:Math.min(C.width,L+B)-oe,height:Math.min(C.height,D+V)-we},layout:[{offset:G,stride:Q}]}}(r,t,o,l,f)),b)for(let C=0;Crt(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Or=function(r,t){if(/:\/\//.test(r.url)&&!/^https?:|^file:/.test(r.url)){const l=zi(r.url);if(l)return l(r,t);if(rt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:r,targetMapId:hi},t)}if(!(/^file:/.test(o=r.url)||/^file:/.test(Di())&&!/^\w+:/.test(o))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(l,f){return c(this,void 0,void 0,function*(){const y=new Request(l.url,{method:l.method||"GET",body:l.body,credentials:l.credentials,headers:l.headers,cache:l.cache,referrer:Di(),signal:f.signal});l.type!=="json"||y.headers.has("Accept")||y.headers.set("Accept","application/json");const x=yield fetch(y);if(!x.ok){const C=yield x.blob();throw new Li(x.status,x.statusText,l.url,C)}let b;b=l.type==="arrayBuffer"||l.type==="image"?x.arrayBuffer():l.type==="json"?x.json():x.text();const E=yield b;if(f.signal.aborted)throw Ei();return{data:E,cacheControl:x.headers.get("Cache-Control"),expires:x.headers.get("Expires")}})}(r,t);if(rt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:r,mustQueue:!0,targetMapId:hi},t)}var o;return function(l,f){return new Promise((y,x)=>{var b;const E=new XMLHttpRequest;E.open(l.method||"GET",l.url,!0),l.type!=="arrayBuffer"&&l.type!=="image"||(E.responseType="arraybuffer");for(const C in l.headers)E.setRequestHeader(C,l.headers[C]);l.type==="json"&&(E.responseType="text",!((b=l.headers)===null||b===void 0)&&b.Accept||E.setRequestHeader("Accept","application/json")),E.withCredentials=l.credentials==="include",E.onerror=()=>{x(new Error(E.statusText))},E.onload=()=>{if(!f.signal.aborted)if((E.status>=200&&E.status<300||E.status===0)&&E.response!==null){let C=E.response;if(l.type==="json")try{C=JSON.parse(E.response)}catch(L){return void x(L)}y({data:C,cacheControl:E.getResponseHeader("Cache-Control"),expires:E.getResponseHeader("Expires")})}else{const C=new Blob([E.response],{type:E.getResponseHeader("Content-Type")});x(new Li(E.status,E.statusText,l.url,C))}},f.signal.addEventListener("abort",()=>{E.abort(),x(Ei())}),E.send(l.body)})}(r,t)};function cr(r){if(!r||r.indexOf("://")<=0||r.indexOf("data:image/")===0||r.indexOf("blob:")===0)return!0;const t=new URL(r),o=window.location;return t.protocol===o.protocol&&t.host===o.host}function Br(r,t,o){o[r]&&o[r].indexOf(t)!==-1||(o[r]=o[r]||[],o[r].push(t))}function rr(r,t,o){if(o&&o[r]){const l=o[r].indexOf(t);l!==-1&&o[r].splice(l,1)}}class ce{constructor(t,o={}){Se(this,o),this.type=t}}class ge extends ce{constructor(t,o={}){super("error",Se({error:t},o))}}class Be{on(t,o){return this._listeners=this._listeners||{},Br(t,o,this._listeners),this}off(t,o){return rr(t,o,this._listeners),rr(t,o,this._oneTimeListeners),this}once(t,o){return o?(this._oneTimeListeners=this._oneTimeListeners||{},Br(t,o,this._oneTimeListeners),this):new Promise(l=>this.once(t,l))}fire(t,o){typeof t=="string"&&(t=new ce(t,o||{}));const l=t.type;if(this.listens(l)){t.target=this;const f=this._listeners&&this._listeners[l]?this._listeners[l].slice():[];for(const b of f)b.call(this,t);const y=this._oneTimeListeners&&this._oneTimeListeners[l]?this._oneTimeListeners[l].slice():[];for(const b of y)rr(l,b,this._oneTimeListeners),b.call(this,t);const x=this._eventedParent;x&&(Se(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),x.fire(t))}else t instanceof ge&&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,o){return this._eventedParent=t,this._eventedParentData=o,this}}var ae={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},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","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"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"},"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 He=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function tt(r,t){const o={};for(const l in r)l!=="ref"&&(o[l]=r[l]);return He.forEach(l=>{l in t&&(o[l]=t[l])}),o}function We(r,t){if(Array.isArray(r)){if(!Array.isArray(t)||r.length!==t.length)return!1;for(let o=0;o`:r.itemType.kind==="value"?"array":`array<${t}>`}return r.kind}const re=[Gr,Ye,Ot,zt,di,to,Si,N(Bt),hr,te,F];function de(r,t){if(t.kind==="error")return null;if(r.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!de(r.itemType,t.itemType))&&(typeof r.N!="number"||r.N===t.N))return null}else{if(r.kind===t.kind)return null;if(r.kind==="value"){for(const o of re)if(!de(o,t))return null}}return`Expected ${U(r)} but found ${U(t)} instead.`}function _e(r,t){return t.some(o=>o.kind===r.kind)}function be(r,t){return t.some(o=>o==="null"?r===null:o==="array"?Array.isArray(r):o==="object"?r&&!Array.isArray(r)&&typeof r=="object":o===typeof r)}function ue(r,t){return r.kind==="array"&&t.kind==="array"?r.itemType.kind===t.itemType.kind&&typeof r.N=="number":r.kind===t.kind}const Me=.96422,Ue=.82521,Oe=4/29,Re=6/29,It=3*Re*Re,Et=Re*Re*Re,Jt=Math.PI/180,Dt=180/Math.PI;function ti(r){return(r%=360)<0&&(r+=360),r}function fi([r,t,o,l]){let f,y;const x=Ji((.2225045*(r=Ii(r))+.7168786*(t=Ii(t))+.0606169*(o=Ii(o)))/1);r===t&&t===o?f=y=x:(f=Ji((.4360747*r+.3850649*t+.1430804*o)/Me),y=Ji((.0139322*r+.0971045*t+.7141733*o)/Ue));const b=116*x-16;return[b<0?0:b,500*(f-x),200*(x-y),l]}function Ii(r){return r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function Ji(r){return r>Et?Math.pow(r,1/3):r/It+Oe}function Gt([r,t,o,l]){let f=(r+16)/116,y=isNaN(t)?f:f+t/500,x=isNaN(o)?f:f-o/200;return f=1*nr(f),y=Me*nr(y),x=Ue*nr(x),[Ri(3.1338561*y-1.6168667*f-.4906146*x),Ri(-.9787684*y+1.9161415*f+.033454*x),Ri(.0719453*y-.2289914*f+1.4052427*x),l]}function Ri(r){return(r=r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055)<0?0:r>1?1:r}function nr(r){return r>Re?r*r*r:It*(r-Oe)}function Wr(r){return parseInt(r.padEnd(2,r),16)/255}function ln(r,t){return or(t?r/100:r,0,1)}function or(r,t,o){return Math.min(Math.max(t,r),o)}function ms(r){return!r.some(Number.isNaN)}const $f={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class ui{constructor(t,o,l,f=1,y=!0){this.r=t,this.g=o,this.b=l,this.a=f,y||(this.r*=f,this.g*=f,this.b*=f,f||this.overwriteGetter("rgb",[t,o,l,f]))}static parse(t){if(t instanceof ui)return t;if(typeof t!="string")return;const o=function(l){if((l=l.toLowerCase().trim())==="transparent")return[0,0,0,0];const f=$f[l];if(f){const[x,b,E]=f;return[x/255,b/255,E/255,1]}if(l.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(l)){const x=l.length<6?1:2;let b=1;return[Wr(l.slice(b,b+=x)),Wr(l.slice(b,b+=x)),Wr(l.slice(b,b+=x)),Wr(l.slice(b,b+x)||"ff")]}if(l.startsWith("rgb")){const x=l.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(x){const[b,E,C,L,D,B,V,$,G,Q,oe,we]=x,he=[L||" ",V||" ",Q].join("");if(he===" "||he===" /"||he===",,"||he===",,,"){const xe=[C,B,G].join(""),ze=xe==="%%%"?100:xe===""?255:0;if(ze){const qe=[or(+E/ze,0,1),or(+D/ze,0,1),or(+$/ze,0,1),oe?ln(+oe,we):1];if(ms(qe))return qe}}return}}const y=l.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(y){const[x,b,E,C,L,D,B,V,$]=y,G=[E||" ",L||" ",B].join("");if(G===" "||G===" /"||G===",,"||G===",,,"){const Q=[+b,or(+C,0,100),or(+D,0,100),V?ln(+V,$):1];if(ms(Q))return function([oe,we,he,xe]){function ze(qe){const st=(qe+oe/30)%12,Tt=we*Math.min(he,1-he);return he-Tt*Math.max(-1,Math.min(st-3,9-st,1))}return oe=ti(oe),we/=100,he/=100,[ze(0),ze(8),ze(4),xe]}(Q)}}}(t);return o?new ui(...o,!1):void 0}get rgb(){const{r:t,g:o,b:l,a:f}=this,y=f||1/0;return this.overwriteGetter("rgb",[t/y,o/y,l/y,f])}get hcl(){return this.overwriteGetter("hcl",function(t){const[o,l,f,y]=fi(t),x=Math.sqrt(l*l+f*f);return[Math.round(1e4*x)?ti(Math.atan2(f,l)*Dt):NaN,x,o,y]}(this.rgb))}get lab(){return this.overwriteGetter("lab",fi(this.rgb))}overwriteGetter(t,o){return Object.defineProperty(this,t,{value:o}),o}toString(){const[t,o,l,f]=this.rgb;return`rgba(${[t,o,l].map(y=>Math.round(255*y)).join(",")},${f})`}}ui.black=new ui(0,0,0,1),ui.white=new ui(1,1,1,1),ui.transparent=new ui(0,0,0,0),ui.red=new ui(1,0,0,1);class wc{constructor(t,o,l){this.sensitivity=t?o?"variant":"case":o?"accent":"base",this.locale=l,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,o){return this.collator.compare(t,o)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ec{constructor(t,o,l,f,y){this.text=t,this.image=o,this.scale=l,this.fontStack=f,this.textColor=y}}class cn{constructor(t){this.sections=t}static fromString(t){return new cn([new Ec(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 cn?t:cn.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}}class Zr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Zr)return t;if(typeof t=="number")return new Zr([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const o of t)if(typeof o!="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 Zr(t)}}toString(){return JSON.stringify(this.values)}}const sa=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Xr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Xr)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let o=0;o=0&&r<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof o=="number"&&o>=0&&o<=255?l===void 0||typeof l=="number"&&l>=0&&l<=1?null:`Invalid rgba value [${[r,t,o,l].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof l=="number"?[r,t,o,l]:[r,t,o]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function io(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof ui||r instanceof wc||r instanceof cn||r instanceof Zr||r instanceof Xr||r instanceof _n)return!0;if(Array.isArray(r)){for(const t of r)if(!io(t))return!1;return!0}if(typeof r=="object"){for(const t in r)if(!io(r[t]))return!1;return!0}return!1}function Yi(r){if(r===null)return Gr;if(typeof r=="string")return Ot;if(typeof r=="boolean")return zt;if(typeof r=="number")return Ye;if(r instanceof ui)return di;if(r instanceof wc)return eo;if(r instanceof cn)return to;if(r instanceof Zr)return hr;if(r instanceof Xr)return F;if(r instanceof _n)return te;if(Array.isArray(r)){const t=r.length;let o;for(const l of r){const f=Yi(l);if(o){if(o===f)continue;o=Bt;break}o=f}return N(o||Bt,t)}return Si}function aa(r){const t=typeof r;return r===null?"":t==="string"||t==="number"||t==="boolean"?String(r):r instanceof ui||r instanceof cn||r instanceof Zr||r instanceof Xr||r instanceof _n?r.toString():JSON.stringify(r)}class jo{constructor(t,o){this.type=t,this.value=o}static parse(t,o){if(t.length!==2)return o.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!io(t[1]))return o.error("invalid value");const l=t[1];let f=Yi(l);const y=o.expectedType;return f.kind!=="array"||f.N!==0||!y||y.kind!=="array"||typeof y.N=="number"&&y.N!==0||(f=y),new jo(f,l)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class qi{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}const $o={string:Ot,number:Ye,boolean:zt,object:Si};class Sn{constructor(t,o){this.type=t,this.args=o}static parse(t,o){if(t.length<2)return o.error("Expected at least one argument.");let l,f=1;const y=t[0];if(y==="array"){let b,E;if(t.length>2){const C=t[1];if(typeof C!="string"||!(C in $o)||C==="object")return o.error('The item type argument of "array" must be one of string, number, boolean',1);b=$o[C],f++}else b=Bt;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return o.error('The length argument to "array" must be a positive integer literal',2);E=t[2],f++}l=N(b,E)}else{if(!$o[y])throw new Error(`Types doesn't contain name = ${y}`);l=$o[y]}const x=[];for(;ft.outputDefined())}}const el={"to-boolean":zt,"to-color":di,"to-number":Ye,"to-string":Ot};class Nn{constructor(t,o){this.type=t,this.args=o}static parse(t,o){if(t.length<2)return o.error("Expected at least one argument.");const l=t[0];if(!el[l])throw new Error(`Can't parse ${l} as it is not part of the known types`);if((l==="to-boolean"||l==="to-string")&&t.length!==2)return o.error("Expected one argument.");const f=el[l],y=[];for(let x=1;x4?`Invalid rbga value ${JSON.stringify(o)}: expected an array containing either three or four numeric values.`:gh(o[0],o[1],o[2],o[3]),!l))return new ui(o[0]/255,o[1]/255,o[2]/255,o[3])}throw new qi(l||`Could not parse color from value '${typeof o=="string"?o:JSON.stringify(o)}'`)}case"padding":{let o;for(const l of this.args){o=l.evaluate(t);const f=Zr.parse(o);if(f)return f}throw new qi(`Could not parse padding from value '${typeof o=="string"?o:JSON.stringify(o)}'`)}case"variableAnchorOffsetCollection":{let o;for(const l of this.args){o=l.evaluate(t);const f=Xr.parse(o);if(f)return f}throw new qi(`Could not parse variableAnchorOffsetCollection from value '${typeof o=="string"?o:JSON.stringify(o)}'`)}case"number":{let o=null;for(const l of this.args){if(o=l.evaluate(t),o===null)return 0;const f=Number(o);if(!isNaN(f))return f}throw new qi(`Could not convert ${JSON.stringify(o)} to number.`)}case"formatted":return cn.fromString(aa(this.args[0].evaluate(t)));case"resolvedImage":return _n.fromString(aa(this.args[0].evaluate(t)));default:return aa(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Sc=["Unknown","Point","LineString","Polygon"];class gs{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"?Sc[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 o=this._parseColorCache[t];return o||(o=this._parseColorCache[t]=ui.parse(t)),o}}class ai{constructor(t,o,l=[],f,y=new ur,x=[]){this.registry=t,this.path=l,this.key=l.map(b=>`[${b}]`).join(""),this.scope=y,this.errors=x,this.expectedType=f,this._isConstant=o}parse(t,o,l,f,y={}){return o?this.concat(o,l,f)._parse(t,y):this._parse(t,y)}_parse(t,o){function l(f,y,x){return x==="assert"?new Sn(y,[f]):x==="coerce"?new Nn(y,[f]):f}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 f=t[0];if(typeof f!="string")return this.error(`Expression name must be a string, but found ${typeof f} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const y=this.registry[f];if(y){let x=y.parse(t,this);if(!x)return null;if(this.expectedType){const b=this.expectedType,E=x.type;if(b.kind!=="string"&&b.kind!=="number"&&b.kind!=="boolean"&&b.kind!=="object"&&b.kind!=="array"||E.kind!=="value")if(b.kind!=="color"&&b.kind!=="formatted"&&b.kind!=="resolvedImage"||E.kind!=="value"&&E.kind!=="string")if(b.kind!=="padding"||E.kind!=="value"&&E.kind!=="number"&&E.kind!=="array")if(b.kind!=="variableAnchorOffsetCollection"||E.kind!=="value"&&E.kind!=="array"){if(this.checkSubtype(b,E))return null}else x=l(x,b,o.typeAnnotation||"coerce");else x=l(x,b,o.typeAnnotation||"coerce");else x=l(x,b,o.typeAnnotation||"coerce");else x=l(x,b,o.typeAnnotation||"assert")}if(!(x instanceof jo)&&x.type.kind!=="resolvedImage"&&this._isConstant(x)){const b=new gs;try{x=new jo(x.type,x.evaluate(b))}catch(E){return this.error(E.message),null}}return x}return this.error(`Unknown expression "${f}". 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,o,l){const f=typeof t=="number"?this.path.concat(t):this.path,y=l?this.scope.concat(l):this.scope;return new ai(this.registry,this._isConstant,f,o||null,y,this.errors)}error(t,...o){const l=`${this.key}${o.map(f=>`[${f}]`).join("")}`;this.errors.push(new si(l,t))}checkSubtype(t,o){const l=de(t,o);return l&&this.error(l),l}}class tl{constructor(t,o){this.type=o.type,this.bindings=[].concat(t),this.result=o}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const o of this.bindings)t(o[1]);t(this.result)}static parse(t,o){if(t.length<4)return o.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const l=[];for(let y=1;y=l.length)throw new qi(`Array index out of bounds: ${o} > ${l.length-1}.`);if(o!==Math.floor(o))throw new qi(`Array index must be an integer, but found ${o} instead.`);return l[o]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class il{constructor(t,o){this.type=zt,this.needle=t,this.haystack=o}static parse(t,o){if(t.length!==3)return o.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const l=o.parse(t[1],1,Bt),f=o.parse(t[2],2,Bt);return l&&f?_e(l.type,[zt,Ot,Ye,Gr,Bt])?new il(l,f):o.error(`Expected first argument to be of type boolean, string, number or null, but found ${U(l.type)} instead`):null}evaluate(t){const o=this.needle.evaluate(t),l=this.haystack.evaluate(t);if(!l)return!1;if(!be(o,["boolean","string","number","null"]))throw new qi(`Expected first argument to be of type boolean, string, number or null, but found ${U(Yi(o))} instead.`);if(!be(l,["string","array"]))throw new qi(`Expected second argument to be of type array or string, but found ${U(Yi(l))} instead.`);return l.indexOf(o)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class la{constructor(t,o,l){this.type=Ye,this.needle=t,this.haystack=o,this.fromIndex=l}static parse(t,o){if(t.length<=2||t.length>=5)return o.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const l=o.parse(t[1],1,Bt),f=o.parse(t[2],2,Bt);if(!l||!f)return null;if(!_e(l.type,[zt,Ot,Ye,Gr,Bt]))return o.error(`Expected first argument to be of type boolean, string, number or null, but found ${U(l.type)} instead`);if(t.length===4){const y=o.parse(t[3],3,Ye);return y?new la(l,f,y):null}return new la(l,f)}evaluate(t){const o=this.needle.evaluate(t),l=this.haystack.evaluate(t);if(!be(o,["boolean","string","number","null"]))throw new qi(`Expected first argument to be of type boolean, string, number or null, but found ${U(Yi(o))} instead.`);if(!be(l,["string","array"]))throw new qi(`Expected second argument to be of type array or string, but found ${U(Yi(l))} instead.`);if(this.fromIndex){const f=this.fromIndex.evaluate(t);return l.indexOf(o,f)}return l.indexOf(o)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class Tc{constructor(t,o,l,f,y,x){this.inputType=t,this.type=o,this.input=l,this.cases=f,this.outputs=y,this.otherwise=x}static parse(t,o){if(t.length<5)return o.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return o.error("Expected an even number of arguments.");let l,f;o.expectedType&&o.expectedType.kind!=="value"&&(f=o.expectedType);const y={},x=[];for(let C=2;CNumber.MAX_SAFE_INTEGER)return B.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof $=="number"&&Math.floor($)!==$)return B.error("Numeric branch labels must be integer values.");if(l){if(B.checkSubtype(l,Yi($)))return null}else l=Yi($);if(y[String($)]!==void 0)return B.error("Branch labels must be unique.");y[String($)]=x.length}const V=o.parse(D,C,f);if(!V)return null;f=f||V.type,x.push(V)}const b=o.parse(t[1],1,Bt);if(!b)return null;const E=o.parse(t[t.length-1],t.length-1,f);return E?b.type.kind!=="value"&&o.concat(1).checkSubtype(l,b.type)?null:new Tc(l,f,b,y,x,E):null}evaluate(t){const o=this.input.evaluate(t);return(Yi(o)===this.inputType&&this.outputs[this.cases[o]]||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 rl{constructor(t,o,l){this.type=t,this.branches=o,this.otherwise=l}static parse(t,o){if(t.length<4)return o.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return o.error("Expected an odd number of arguments.");let l;o.expectedType&&o.expectedType.kind!=="value"&&(l=o.expectedType);const f=[];for(let x=1;xo.outputDefined())&&this.otherwise.outputDefined()}}class ca{constructor(t,o,l,f){this.type=t,this.input=o,this.beginIndex=l,this.endIndex=f}static parse(t,o){if(t.length<=2||t.length>=5)return o.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const l=o.parse(t[1],1,Bt),f=o.parse(t[2],2,Ye);if(!l||!f)return null;if(!_e(l.type,[N(Bt),Ot,Bt]))return o.error(`Expected first argument to be of type array or string, but found ${U(l.type)} instead`);if(t.length===4){const y=o.parse(t[3],3,Ye);return y?new ca(l.type,l,f,y):null}return new ca(l.type,l,f)}evaluate(t){const o=this.input.evaluate(t),l=this.beginIndex.evaluate(t);if(!be(o,["string","array"]))throw new qi(`Expected first argument to be of type array or string, but found ${U(Yi(o))} instead.`);if(this.endIndex){const f=this.endIndex.evaluate(t);return o.slice(l,f)}return o.slice(l)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function nl(r,t){const o=r.length-1;let l,f,y=0,x=o,b=0;for(;y<=x;)if(b=Math.floor((y+x)/2),l=r[b],f=r[b+1],l<=t){if(b===o||tt))throw new qi("Input is not a number.");x=b-1}return 0}class ua{constructor(t,o,l){this.type=t,this.input=o,this.labels=[],this.outputs=[];for(const[f,y]of l)this.labels.push(f),this.outputs.push(y)}static parse(t,o){if(t.length-1<4)return o.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return o.error("Expected an even number of arguments.");const l=o.parse(t[1],1,Ye);if(!l)return null;const f=[];let y=null;o.expectedType&&o.expectedType.kind!=="value"&&(y=o.expectedType);for(let x=1;x=b)return o.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',C);const D=o.parse(E,L,y);if(!D)return null;y=y||D.type,f.push([b,D])}return new ua(y,l,f)}evaluate(t){const o=this.labels,l=this.outputs;if(o.length===1)return l[0].evaluate(t);const f=this.input.evaluate(t);if(f<=o[0])return l[0].evaluate(t);const y=o.length;return f>=o[y-1]?l[y-1].evaluate(t):l[nl(o,f)].evaluate(t)}eachChild(t){t(this.input);for(const o of this.outputs)t(o)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Uf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var qf=Cc;function Cc(r,t,o,l){this.cx=3*r,this.bx=3*(o-r)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(l-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=r,this.p1y=t,this.p2x=o,this.p2y=l}Cc.prototype={sampleCurveX:function(r){return((this.ax*r+this.bx)*r+this.cx)*r},sampleCurveY:function(r){return((this.ay*r+this.by)*r+this.cy)*r},sampleCurveDerivativeX:function(r){return(3*this.ax*r+2*this.bx)*r+this.cx},solveCurveX:function(r,t){if(t===void 0&&(t=1e-6),r<0)return 0;if(r>1)return 1;for(var o=r,l=0;l<8;l++){var f=this.sampleCurveX(o)-r;if(Math.abs(f)f?x=o:b=o,o=.5*(b-x)+x;return o},solve:function(r,t){return this.sampleCurveY(this.solveCurveX(r,t))}};var yh=Uf(qf);function Uo(r,t,o){return r+o*(t-r)}function ol(r,t,o){return r.map((l,f)=>Uo(l,t[f],o))}const Fr={number:Uo,color:function(r,t,o,l="rgb"){switch(l){case"rgb":{const[f,y,x,b]=ol(r.rgb,t.rgb,o);return new ui(f,y,x,b,!1)}case"hcl":{const[f,y,x,b]=r.hcl,[E,C,L,D]=t.hcl;let B,V;if(isNaN(f)||isNaN(E))isNaN(f)?isNaN(E)?B=NaN:(B=E,x!==1&&x!==0||(V=C)):(B=f,L!==1&&L!==0||(V=y));else{let we=E-f;E>f&&we>180?we-=360:E180&&(we+=360),B=f+o*we}const[$,G,Q,oe]=function([we,he,xe,ze]){return we=isNaN(we)?0:we*Jt,Gt([xe,Math.cos(we)*he,Math.sin(we)*he,ze])}([B,V??Uo(y,C,o),Uo(x,L,o),Uo(b,D,o)]);return new ui($,G,Q,oe,!1)}case"lab":{const[f,y,x,b]=Gt(ol(r.lab,t.lab,o));return new ui(f,y,x,b,!1)}}},array:ol,padding:function(r,t,o){return new Zr(ol(r.values,t.values,o))},variableAnchorOffsetCollection:function(r,t,o){const l=r.values,f=t.values;if(l.length!==f.length)throw new qi(`Cannot interpolate values of different length. from: ${r.toString()}, to: ${t.toString()}`);const y=[];for(let x=0;xtypeof L!="number"||L<0||L>1))return o.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);f={name:"cubic-bezier",controlPoints:C}}}if(t.length-1<4)return o.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return o.error("Expected an even number of arguments.");if(y=o.parse(y,2,Ye),!y)return null;const b=[];let E=null;l==="interpolate-hcl"||l==="interpolate-lab"?E=di:o.expectedType&&o.expectedType.kind!=="value"&&(E=o.expectedType);for(let C=0;C=L)return o.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',B);const $=o.parse(D,V,E);if(!$)return null;E=E||$.type,b.push([L,$])}return ue(E,Ye)||ue(E,di)||ue(E,hr)||ue(E,F)||ue(E,N(Ye))?new un(E,l,f,y,b):o.error(`Type ${U(E)} is not interpolatable.`)}evaluate(t){const o=this.labels,l=this.outputs;if(o.length===1)return l[0].evaluate(t);const f=this.input.evaluate(t);if(f<=o[0])return l[0].evaluate(t);const y=o.length;if(f>=o[y-1])return l[y-1].evaluate(t);const x=nl(o,f),b=un.interpolationFactor(this.interpolation,f,o[x],o[x+1]),E=l[x].evaluate(t),C=l[x+1].evaluate(t);switch(this.operator){case"interpolate":return Fr[this.type.kind](E,C,b);case"interpolate-hcl":return Fr.color(E,C,b,"hcl");case"interpolate-lab":return Fr.color(E,C,b,"lab")}}eachChild(t){t(this.input);for(const o of this.outputs)t(o)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Ac(r,t,o,l){const f=l-o,y=r-o;return f===0?0:t===1?y/f:(Math.pow(t,y)-1)/(Math.pow(t,f)-1)}class sl{constructor(t,o){this.type=t,this.args=o}static parse(t,o){if(t.length<2)return o.error("Expectected at least one argument.");let l=null;const f=o.expectedType;f&&f.kind!=="value"&&(l=f);const y=[];for(const b of t.slice(1)){const E=o.parse(b,1+y.length,l,void 0,{typeAnnotation:"omit"});if(!E)return null;l=l||E.type,y.push(E)}if(!l)throw new Error("No output type");const x=f&&y.some(b=>de(f,b.type));return new sl(x?Bt:l,y)}evaluate(t){let o,l=null,f=0;for(const y of this.args)if(f++,l=y.evaluate(t),l&&l instanceof _n&&!l.available&&(o||(o=l.name),l=null,f===this.args.length&&(l=o)),l!==null)break;return l}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}function Mc(r,t){return r==="=="||r==="!="?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 kc(r,t,o,l){return l.compare(t,o)===0}function _s(r,t,o){const l=r!=="=="&&r!=="!=";return class hw{constructor(y,x,b){this.type=zt,this.lhs=y,this.rhs=x,this.collator=b,this.hasUntypedArgument=y.type.kind==="value"||x.type.kind==="value"}static parse(y,x){if(y.length!==3&&y.length!==4)return x.error("Expected two or three arguments.");const b=y[0];let E=x.parse(y[1],1,Bt);if(!E)return null;if(!Mc(b,E.type))return x.concat(1).error(`"${b}" comparisons are not supported for type '${U(E.type)}'.`);let C=x.parse(y[2],2,Bt);if(!C)return null;if(!Mc(b,C.type))return x.concat(2).error(`"${b}" comparisons are not supported for type '${U(C.type)}'.`);if(E.type.kind!==C.type.kind&&E.type.kind!=="value"&&C.type.kind!=="value")return x.error(`Cannot compare types '${U(E.type)}' and '${U(C.type)}'.`);l&&(E.type.kind==="value"&&C.type.kind!=="value"?E=new Sn(C.type,[E]):E.type.kind!=="value"&&C.type.kind==="value"&&(C=new Sn(E.type,[C])));let L=null;if(y.length===4){if(E.type.kind!=="string"&&C.type.kind!=="string"&&E.type.kind!=="value"&&C.type.kind!=="value")return x.error("Cannot use collator to compare non-string types.");if(L=x.parse(y[3],3,eo),!L)return null}return new hw(E,C,L)}evaluate(y){const x=this.lhs.evaluate(y),b=this.rhs.evaluate(y);if(l&&this.hasUntypedArgument){const E=Yi(x),C=Yi(b);if(E.kind!==C.kind||E.kind!=="string"&&E.kind!=="number")throw new qi(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${E.kind}, ${C.kind}) instead.`)}if(this.collator&&!l&&this.hasUntypedArgument){const E=Yi(x),C=Yi(b);if(E.kind!=="string"||C.kind!=="string")return t(y,x,b)}return this.collator?o(y,x,b,this.collator.evaluate(y)):t(y,x,b)}eachChild(y){y(this.lhs),y(this.rhs),this.collator&&y(this.collator)}outputDefined(){return!0}}}const Hf=_s("==",function(r,t,o){return t===o},kc),_h=_s("!=",function(r,t,o){return t!==o},function(r,t,o,l){return!kc(0,t,o,l)}),vh=_s("<",function(r,t,o){return t",function(r,t,o){return t>o},function(r,t,o,l){return l.compare(t,o)>0}),Wf=_s("<=",function(r,t,o){return t<=o},function(r,t,o,l){return l.compare(t,o)<=0}),Zf=_s(">=",function(r,t,o){return t>=o},function(r,t,o,l){return l.compare(t,o)>=0});class al{constructor(t,o,l){this.type=eo,this.locale=l,this.caseSensitive=t,this.diacriticSensitive=o}static parse(t,o){if(t.length!==2)return o.error("Expected one argument.");const l=t[1];if(typeof l!="object"||Array.isArray(l))return o.error("Collator options argument must be an object.");const f=o.parse(l["case-sensitive"]!==void 0&&l["case-sensitive"],1,zt);if(!f)return null;const y=o.parse(l["diacritic-sensitive"]!==void 0&&l["diacritic-sensitive"],1,zt);if(!y)return null;let x=null;return l.locale&&(x=o.parse(l.locale,1,Ot),!x)?null:new al(f,y,x)}evaluate(t){return new wc(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 Lc{constructor(t,o,l,f,y){this.type=Ot,this.number=t,this.locale=o,this.currency=l,this.minFractionDigits=f,this.maxFractionDigits=y}static parse(t,o){if(t.length!==3)return o.error("Expected two arguments.");const l=o.parse(t[1],1,Ye);if(!l)return null;const f=t[2];if(typeof f!="object"||Array.isArray(f))return o.error("NumberFormat options argument must be an object.");let y=null;if(f.locale&&(y=o.parse(f.locale,1,Ot),!y))return null;let x=null;if(f.currency&&(x=o.parse(f.currency,1,Ot),!x))return null;let b=null;if(f["min-fraction-digits"]&&(b=o.parse(f["min-fraction-digits"],1,Ye),!b))return null;let E=null;return f["max-fraction-digits"]&&(E=o.parse(f["max-fraction-digits"],1,Ye),!E)?null:new Lc(l,y,x,b,E)}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 ll{constructor(t){this.type=to,this.sections=t}static parse(t,o){if(t.length<2)return o.error("Expected at least one argument.");const l=t[1];if(!Array.isArray(l)&&typeof l=="object")return o.error("First argument must be an image or text section.");const f=[];let y=!1;for(let x=1;x<=t.length-1;++x){const b=t[x];if(y&&typeof b=="object"&&!Array.isArray(b)){y=!1;let E=null;if(b["font-scale"]&&(E=o.parse(b["font-scale"],1,Ye),!E))return null;let C=null;if(b["text-font"]&&(C=o.parse(b["text-font"],1,N(Ot)),!C))return null;let L=null;if(b["text-color"]&&(L=o.parse(b["text-color"],1,di),!L))return null;const D=f[f.length-1];D.scale=E,D.font=C,D.textColor=L}else{const E=o.parse(t[x],1,Bt);if(!E)return null;const C=E.type.kind;if(C!=="string"&&C!=="value"&&C!=="null"&&C!=="resolvedImage")return o.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");y=!0,f.push({content:E,scale:null,font:null,textColor:null})}}return new ll(f)}evaluate(t){return new cn(this.sections.map(o=>{const l=o.content.evaluate(t);return Yi(l)===te?new Ec("",l,null,null,null):new Ec(aa(l),null,o.scale?o.scale.evaluate(t):null,o.font?o.font.evaluate(t).join(","):null,o.textColor?o.textColor.evaluate(t):null)}))}eachChild(t){for(const o of this.sections)t(o.content),o.scale&&t(o.scale),o.font&&t(o.font),o.textColor&&t(o.textColor)}outputDefined(){return!1}}class Pc{constructor(t){this.type=te,this.input=t}static parse(t,o){if(t.length!==2)return o.error("Expected two arguments.");const l=o.parse(t[1],1,Ot);return l?new Pc(l):o.error("No image name provided.")}evaluate(t){const o=this.input.evaluate(t),l=_n.fromString(o);return l&&t.availableImages&&(l.available=t.availableImages.indexOf(o)>-1),l}eachChild(t){t(this.input)}outputDefined(){return!1}}class ha{constructor(t){this.type=Ye,this.input=t}static parse(t,o){if(t.length!==2)return o.error(`Expected 1 argument, but found ${t.length-1} instead.`);const l=o.parse(t[1],1);return l?l.type.kind!=="array"&&l.type.kind!=="string"&&l.type.kind!=="value"?o.error(`Expected argument of type string or array, but found ${U(l.type)} instead.`):new ha(l):null}evaluate(t){const o=this.input.evaluate(t);if(typeof o=="string"||Array.isArray(o))return o.length;throw new qi(`Expected value to be of type string or array, but found ${U(Yi(o))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const hn=8192;function li(r,t){const o=(180+r[0])/360,l=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r[1]*Math.PI/360)))/360,f=Math.pow(2,t.z);return[Math.round(o*f*hn),Math.round(l*f*hn)]}function zc(r,t){const o=Math.pow(2,t.z);return[(f=(r[0]/hn+t.x)/o,360*f-180),(l=(r[1]/hn+t.y)/o,360/Math.PI*Math.atan(Math.exp((180-360*l)*Math.PI/180))-90)];var l,f}function da(r,t){r[0]=Math.min(r[0],t[0]),r[1]=Math.min(r[1],t[1]),r[2]=Math.max(r[2],t[0]),r[3]=Math.max(r[3],t[1])}function fa(r,t){return!(r[0]<=t[0]||r[2]>=t[2]||r[1]<=t[1]||r[3]>=t[3])}function Xf(r,t,o){const l=r[0]-t[0],f=r[1]-t[1],y=r[0]-o[0],x=r[1]-o[1];return l*x-y*f==0&&l*y<=0&&f*x<=0}function cl(r,t,o,l){return(f=[l[0]-o[0],l[1]-o[1]])[0]*(y=[t[0]-r[0],t[1]-r[1]])[1]-f[1]*y[0]!=0&&!(!bh(r,t,o,l)||!bh(o,l,r,t));var f,y}function Kf(r,t,o){for(const l of o)for(let f=0;f(f=r)[1]!=(x=b[E+1])[1]>f[1]&&f[0]<(x[0]-y[0])*(f[1]-y[1])/(x[1]-y[1])+y[0]&&(l=!l)}var f,y,x;return l}function Jf(r,t){for(const o of t)if(vs(r,o))return!0;return!1}function xh(r,t){for(const o of r)if(!vs(o,t))return!1;for(let o=0;o0&&b<0||x<0&&b>0}function Dc(r,t,o){const l=[];for(let f=0;fo[2]){const f=.5*l;let y=r[0]-o[0]>f?-l:o[0]-r[0]>f?l:0;y===0&&(y=r[0]-o[2]>f?-l:o[2]-r[0]>f?l:0),r[0]+=y}da(t,r)}function Sh(r,t,o,l){const f=Math.pow(2,l.z)*hn,y=[l.x*hn,l.y*hn],x=[];for(const b of r)for(const E of b){const C=[E.x+y[0],E.y+y[1]];Eh(C,t,o,f),x.push(C)}return x}function Ih(r,t,o,l){const f=Math.pow(2,l.z)*hn,y=[l.x*hn,l.y*hn],x=[];for(const E of r){const C=[];for(const L of E){const D=[L.x+y[0],L.y+y[1]];da(t,D),C.push(D)}x.push(C)}if(t[2]-t[0]<=f/2){(b=t)[0]=b[1]=1/0,b[2]=b[3]=-1/0;for(const E of x)for(const C of E)Eh(C,t,o,f)}var b;return x}class qo{constructor(t,o){this.type=zt,this.geojson=t,this.geometries=o}static parse(t,o){if(t.length!==2)return o.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(io(t[1])){const l=t[1];if(l.type==="FeatureCollection"){const f=[];for(const y of l.features){const{type:x,coordinates:b}=y.geometry;x==="Polygon"&&f.push(b),x==="MultiPolygon"&&f.push(...b)}if(f.length)return new qo(l,{type:"MultiPolygon",coordinates:f})}else if(l.type==="Feature"){const f=l.geometry.type;if(f==="Polygon"||f==="MultiPolygon")return new qo(l,l.geometry)}else if(l.type==="Polygon"||l.type==="MultiPolygon")return new qo(l,l)}return o.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(o,l){const f=[1/0,1/0,-1/0,-1/0],y=[1/0,1/0,-1/0,-1/0],x=o.canonicalID();if(l.type==="Polygon"){const b=Dc(l.coordinates,y,x),E=Sh(o.geometry(),f,y,x);if(!fa(f,y))return!1;for(const C of E)if(!vs(C,b))return!1}if(l.type==="MultiPolygon"){const b=wh(l.coordinates,y,x),E=Sh(o.geometry(),f,y,x);if(!fa(f,y))return!1;for(const C of E)if(!Jf(C,b))return!1}return!0}(t,this.geometries);if(t.geometryType()==="LineString")return function(o,l){const f=[1/0,1/0,-1/0,-1/0],y=[1/0,1/0,-1/0,-1/0],x=o.canonicalID();if(l.type==="Polygon"){const b=Dc(l.coordinates,y,x),E=Ih(o.geometry(),f,y,x);if(!fa(f,y))return!1;for(const C of E)if(!xh(C,b))return!1}if(l.type==="MultiPolygon"){const b=wh(l.coordinates,y,x),E=Ih(o.geometry(),f,y,x);if(!fa(f,y))return!1;for(const C of E)if(!Yf(C,b))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Th=class{constructor(r=[],t=Qf){if(this.data=r,this.length=this.data.length,this.compare=t,this.length>0)for(let o=(this.length>>1)-1;o>=0;o--)this._down(o)}push(r){this.data.push(r),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const r=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),r}peek(){return this.data[0]}_up(r){const{data:t,compare:o}=this,l=t[r];for(;r>0;){const f=r-1>>1,y=t[f];if(o(l,y)>=0)break;t[r]=y,r=f}t[r]=l}_down(r){const{data:t,compare:o}=this,l=this.length>>1,f=t[r];for(;r=0)break;t[r]=x,r=y}t[r]=f}};function Qf(r,t){return rt?1:0}function ep(r,t,o,l,f){Ch(r,t,o,l||r.length-1,f||tp)}function Ch(r,t,o,l,f){for(;l>o;){if(l-o>600){var y=l-o+1,x=t-o+1,b=Math.log(y),E=.5*Math.exp(2*b/3),C=.5*Math.sqrt(b*E*(y-E)/y)*(x-y/2<0?-1:1);Ch(r,t,Math.max(o,Math.floor(t-x*E/y+C)),Math.min(l,Math.floor(t+(y-x)*E/y+C)),f)}var L=r[t],D=o,B=l;for(pa(r,o,t),f(r[l],L)>0&&pa(r,o,l);D0;)B--}f(r[o],L)===0?pa(r,o,B):pa(r,++B,l),B<=t&&(o=B+1),t<=B&&(l=B-1)}}function pa(r,t,o){var l=r[t];r[t]=r[o],r[o]=l}function tp(r,t){return rt?1:0}function ul(r,t){if(r.length<=1)return[r];const o=[];let l,f;for(const y of r){const x=rp(y);x!==0&&(y.area=Math.abs(x),f===void 0&&(f=x<0),f===x<0?(l&&o.push(l),l=[y]):l.push(y))}if(l&&o.push(l),t>1)for(let y=0;y1?(C=t[E+1][0],L=t[E+1][1]):V>0&&(C+=D/this.kx*V,L+=B/this.ky*V)),D=this.wrap(o[0]-C)*this.kx,B=(o[1]-L)*this.ky;const $=D*D+B*B;$180;)t-=360;return t}}function Lh(r,t){return t[0]-r[0]}function xs(r){return r[1]-r[0]+1}function ro(r,t){return r[1]>=r[0]&&r[1]r[1])return[null,null];const o=xs(r);if(t){if(o===2)return[r,null];const f=Math.floor(o/2);return[[r[0],r[0]+f],[r[0]+f,r[1]]]}if(o===1)return[r,null];const l=Math.floor(o/2)-1;return[[r[0],r[0]+l],[r[0]+l+1,r[1]]]}function Bc(r,t){if(!ro(t,r.length))return[1/0,1/0,-1/0,-1/0];const o=[1/0,1/0,-1/0,-1/0];for(let l=t[0];l<=t[1];++l)da(o,r[l]);return o}function Fc(r){const t=[1/0,1/0,-1/0,-1/0];for(const o of r)for(const l of o)da(t,l);return t}function Hi(r){return r[0]!==-1/0&&r[1]!==-1/0&&r[2]!==1/0&&r[3]!==1/0}function Vc(r,t,o){if(!Hi(r)||!Hi(t))return NaN;let l=0,f=0;return r[2]t[2]&&(l=r[0]-t[2]),r[1]>t[3]&&(f=r[1]-t[3]),r[3]=l)return l;if(fa(f,y)){if(Nc(r,t))return 0}else if(Nc(t,r))return 0;let x=1/0;for(const b of r)for(let E=0,C=b.length,L=C-1;E0;){const E=x.pop();if(E[0]>=y)continue;const C=E[1],L=t?50:100;if(xs(C)<=L){if(!ro(C,r.length))return NaN;if(t){const D=Ph(r,C,o,l);if(isNaN(D)||D===0)return D;y=Math.min(y,D)}else for(let D=C[0];D<=C[1];++D){const B=hl(r[D],o,l);if(y=Math.min(y,B),y===0)return 0}}else{const D=Oc(C,t);zh(x,y,l,r,b,D[0]),zh(x,y,l,r,b,D[1])}}return y}function ga(r,t,o,l,f,y=1/0){let x=Math.min(y,f.distance(r[0],o[0]));if(x===0)return x;const b=new Th([[0,[0,r.length-1],[0,o.length-1]]],Lh);for(;b.length>0;){const E=b.pop();if(E[0]>=x)continue;const C=E[1],L=E[2],D=t?50:100,B=l?50:100;if(xs(C)<=D&&xs(L)<=B){if(!ro(C,r.length)&&ro(L,o.length))return NaN;let V;if(t&&l)V=Oi(r,C,o,L,f),x=Math.min(x,V);else if(t&&!l){const $=r.slice(C[0],C[1]+1);for(let G=L[0];G<=L[1];++G)if(V=Xt(o[G],$,f),x=Math.min(x,V),x===0)return x}else if(!t&&l){const $=o.slice(L[0],L[1]+1);for(let G=C[0];G<=C[1];++G)if(V=Xt(r[G],$,f),x=Math.min(x,V),x===0)return x}else V=Pi(r,C,o,L,f),x=Math.min(x,V)}else{const V=Oc(C,t),$=Oc(L,l);dl(b,x,f,r,o,V[0],$[0]),dl(b,x,f,r,o,V[0],$[1]),dl(b,x,f,r,o,V[1],$[0]),dl(b,x,f,r,o,V[1],$[1])}}return x}function pl(r){return r.type==="MultiPolygon"?r.coordinates.map(t=>({type:"Polygon",coordinates:t})):r.type==="MultiLineString"?r.coordinates.map(t=>({type:"LineString",coordinates:t})):r.type==="MultiPoint"?r.coordinates.map(t=>({type:"Point",coordinates:t})):[r]}class _o{constructor(t,o){this.type=Ye,this.geojson=t,this.geometries=o}static parse(t,o){if(t.length!==2)return o.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(io(t[1])){const l=t[1];if(l.type==="FeatureCollection")return new _o(l,l.features.map(f=>pl(f.geometry)).flat());if(l.type==="Feature")return new _o(l,pl(l.geometry));if("type"in l&&"coordinates"in l)return new _o(l,pl(l))}return o.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(o,l){const f=o.geometry(),y=f.flat().map(E=>zc([E.x,E.y],o.canonical));if(f.length===0)return NaN;const x=new Rc(y[0][1]);let b=1/0;for(const E of l){switch(E.type){case"Point":b=Math.min(b,ga(y,!1,[E.coordinates],!1,x,b));break;case"LineString":b=Math.min(b,ga(y,!1,E.coordinates,!0,x,b));break;case"Polygon":b=Math.min(b,fl(y,!1,E.coordinates,x,b))}if(b===0)return b}return b}(t,this.geometries);if(t.geometryType()==="LineString")return function(o,l){const f=o.geometry(),y=f.flat().map(E=>zc([E.x,E.y],o.canonical));if(f.length===0)return NaN;const x=new Rc(y[0][1]);let b=1/0;for(const E of l){switch(E.type){case"Point":b=Math.min(b,ga(y,!0,[E.coordinates],!1,x,b));break;case"LineString":b=Math.min(b,ga(y,!0,E.coordinates,!0,x,b));break;case"Polygon":b=Math.min(b,fl(y,!0,E.coordinates,x,b))}if(b===0)return b}return b}(t,this.geometries);if(t.geometryType()==="Polygon")return function(o,l){const f=o.geometry();if(f.length===0||f[0].length===0)return NaN;const y=ul(f,0).map(E=>E.map(C=>C.map(L=>zc([L.x,L.y],o.canonical)))),x=new Rc(y[0][0][0][1]);let b=1/0;for(const E of l)for(const C of y){switch(E.type){case"Point":b=Math.min(b,fl([E.coordinates],!1,C,x,b));break;case"LineString":b=Math.min(b,fl(E.coordinates,!0,C,x,b));break;case"Polygon":b=Math.min(b,np(C,E.coordinates,x,b))}if(b===0)return b}return b}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const Ho={"==":Hf,"!=":_h,">":Gf,"<":vh,">=":Zf,"<=":Wf,array:Sn,at:Ic,boolean:Sn,case:rl,coalesce:sl,collator:al,format:ll,image:Pc,in:il,"index-of":la,interpolate:un,"interpolate-hcl":un,"interpolate-lab":un,length:ha,let:tl,literal:jo,match:Tc,number:Sn,"number-format":Lc,object:Sn,slice:ca,step:ua,string:Sn,"to-boolean":Nn,"to-color":Nn,"to-number":Nn,"to-string":Nn,var:ys,within:qo,distance:_o};class Kr{constructor(t,o,l,f){this.name=t,this.type=o,this._evaluate=l,this.args=f}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,o){const l=t[0],f=Kr.definitions[l];if(!f)return o.error(`Unknown expression "${l}". If you wanted a literal array, use ["literal", [...]].`,0);const y=Array.isArray(f)?f[0]:f.type,x=Array.isArray(f)?[[f[1],f[2]]]:f.overloads,b=x.filter(([C])=>!Array.isArray(C)||C.length===t.length-1);let E=null;for(const[C,L]of b){E=new ai(o.registry,ml,o.path,null,o.scope);const D=[];let B=!1;for(let V=1;V{return B=D,Array.isArray(B)?`(${B.map(U).join(", ")})`:`(${U(B.type)}...)`;var B}).join(" | "),L=[];for(let D=1;D{o=t?o&&ml(l):o&&l instanceof jo}),!!o&&gl(r)&&yl(r,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function gl(r){if(r instanceof Kr&&(r.name==="get"&&r.args.length===1||r.name==="feature-state"||r.name==="has"&&r.args.length===1||r.name==="properties"||r.name==="geometry-type"||r.name==="id"||/^filter-/.test(r.name))||r instanceof qo||r instanceof _o)return!1;let t=!0;return r.eachChild(o=>{t&&!gl(o)&&(t=!1)}),t}function ya(r){if(r instanceof Kr&&r.name==="feature-state")return!1;let t=!0;return r.eachChild(o=>{t&&!ya(o)&&(t=!1)}),t}function yl(r,t){if(r instanceof Kr&&t.indexOf(r.name)>=0)return!1;let o=!0;return r.eachChild(l=>{o&&!yl(l,t)&&(o=!1)}),o}function $c(r){return{result:"success",value:r}}function Wo(r){return{result:"error",value:r}}function no(r){return r["property-type"]==="data-driven"||r["property-type"]==="cross-faded-data-driven"}function Oh(r){return!!r.expression&&r.expression.parameters.indexOf("zoom")>-1}function _l(r){return!!r.expression&&r.expression.interpolated}function ni(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":r===null?"null":typeof r}function bs(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function vl(r){return r}function _a(r,t){const o=t.type==="color",l=r.stops&&typeof r.stops[0][0]=="object",f=l||!(l||r.property!==void 0),y=r.type||(_l(t)?"exponential":"interval");if(o||t.type==="padding"){const L=o?ui.parse:Zr.parse;(r=Ht({},r)).stops&&(r.stops=r.stops.map(D=>[D[0],L(D[1])])),r.default=L(r.default?r.default:t.default)}if(r.colorSpace&&(x=r.colorSpace)!=="rgb"&&x!=="hcl"&&x!=="lab")throw new Error(`Unknown color space: "${r.colorSpace}"`);var x;let b,E,C;if(y==="exponential")b=qc;else if(y==="interval")b=Bh;else if(y==="categorical"){b=Uc,E=Object.create(null);for(const L of r.stops)E[L[0]]=L[1];C=typeof r.stops[0][0]}else{if(y!=="identity")throw new Error(`Unknown function type "${y}"`);b=xl}if(l){const L={},D=[];for(let $=0;$$[0]),evaluate:({zoom:$},G)=>qc({stops:B,base:r.base},t,$).evaluate($,G)}}if(f){const L=y==="exponential"?{name:"exponential",base:r.base!==void 0?r.base:1}:null;return{kind:"camera",interpolationType:L,interpolationFactor:un.interpolationFactor.bind(void 0,L),zoomStops:r.stops.map(D=>D[0]),evaluate:({zoom:D})=>b(r,t,D,E,C)}}return{kind:"source",evaluate(L,D){const B=D&&D.properties?D.properties[r.property]:void 0;return B===void 0?ws(r.default,t.default):b(r,t,B,E,C)}}}function ws(r,t,o){return r!==void 0?r:t!==void 0?t:o!==void 0?o:void 0}function Uc(r,t,o,l,f){return ws(typeof o===f?l[o]:void 0,r.default,t.default)}function Bh(r,t,o){if(ni(o)!=="number")return ws(r.default,t.default);const l=r.stops.length;if(l===1||o<=r.stops[0][0])return r.stops[0][1];if(o>=r.stops[l-1][0])return r.stops[l-1][1];const f=nl(r.stops.map(y=>y[0]),o);return r.stops[f][1]}function qc(r,t,o){const l=r.base!==void 0?r.base:1;if(ni(o)!=="number")return ws(r.default,t.default);const f=r.stops.length;if(f===1||o<=r.stops[0][0])return r.stops[0][1];if(o>=r.stops[f-1][0])return r.stops[f-1][1];const y=nl(r.stops.map(L=>L[0]),o),x=function(L,D,B,V){const $=V-B,G=L-B;return $===0?0:D===1?G/$:(Math.pow(D,G)-1)/(Math.pow(D,$)-1)}(o,l,r.stops[y][0],r.stops[y+1][0]),b=r.stops[y][1],E=r.stops[y+1][1],C=Fr[t.type]||vl;return typeof b.evaluate=="function"?{evaluate(...L){const D=b.evaluate.apply(void 0,L),B=E.evaluate.apply(void 0,L);if(D!==void 0&&B!==void 0)return C(D,B,x,r.colorSpace)}}:C(b,E,x,r.colorSpace)}function xl(r,t,o){switch(t.type){case"color":o=ui.parse(o);break;case"formatted":o=cn.fromString(o.toString());break;case"resolvedImage":o=_n.fromString(o.toString());break;case"padding":o=Zr.parse(o);break;default:ni(o)===t.type||t.type==="enum"&&t.values[o]||(o=void 0)}return ws(o,r.default,t.default)}Kr.register(Ho,{error:[{kind:"error"},[Ot],(r,[t])=>{throw new qi(t.evaluate(r))}],typeof:[Ot,[Bt],(r,[t])=>U(Yi(t.evaluate(r)))],"to-rgba":[N(Ye,4),[di],(r,[t])=>{const[o,l,f,y]=t.evaluate(r).rgb;return[255*o,255*l,255*f,y]}],rgb:[di,[Ye,Ye,Ye],Dh],rgba:[di,[Ye,Ye,Ye,Ye],Dh],has:{type:zt,overloads:[[[Ot],(r,[t])=>Rh(t.evaluate(r),r.properties())],[[Ot,Si],(r,[t,o])=>Rh(t.evaluate(r),o.evaluate(r))]]},get:{type:Bt,overloads:[[[Ot],(r,[t])=>jc(t.evaluate(r),r.properties())],[[Ot,Si],(r,[t,o])=>jc(t.evaluate(r),o.evaluate(r))]]},"feature-state":[Bt,[Ot],(r,[t])=>jc(t.evaluate(r),r.featureState||{})],properties:[Si,[],r=>r.properties()],"geometry-type":[Ot,[],r=>r.geometryType()],id:[Bt,[],r=>r.id()],zoom:[Ye,[],r=>r.globals.zoom],"heatmap-density":[Ye,[],r=>r.globals.heatmapDensity||0],"line-progress":[Ye,[],r=>r.globals.lineProgress||0],accumulated:[Bt,[],r=>r.globals.accumulated===void 0?null:r.globals.accumulated],"+":[Ye,Go(Ye),(r,t)=>{let o=0;for(const l of t)o+=l.evaluate(r);return o}],"*":[Ye,Go(Ye),(r,t)=>{let o=1;for(const l of t)o*=l.evaluate(r);return o}],"-":{type:Ye,overloads:[[[Ye,Ye],(r,[t,o])=>t.evaluate(r)-o.evaluate(r)],[[Ye],(r,[t])=>-t.evaluate(r)]]},"/":[Ye,[Ye,Ye],(r,[t,o])=>t.evaluate(r)/o.evaluate(r)],"%":[Ye,[Ye,Ye],(r,[t,o])=>t.evaluate(r)%o.evaluate(r)],ln2:[Ye,[],()=>Math.LN2],pi:[Ye,[],()=>Math.PI],e:[Ye,[],()=>Math.E],"^":[Ye,[Ye,Ye],(r,[t,o])=>Math.pow(t.evaluate(r),o.evaluate(r))],sqrt:[Ye,[Ye],(r,[t])=>Math.sqrt(t.evaluate(r))],log10:[Ye,[Ye],(r,[t])=>Math.log(t.evaluate(r))/Math.LN10],ln:[Ye,[Ye],(r,[t])=>Math.log(t.evaluate(r))],log2:[Ye,[Ye],(r,[t])=>Math.log(t.evaluate(r))/Math.LN2],sin:[Ye,[Ye],(r,[t])=>Math.sin(t.evaluate(r))],cos:[Ye,[Ye],(r,[t])=>Math.cos(t.evaluate(r))],tan:[Ye,[Ye],(r,[t])=>Math.tan(t.evaluate(r))],asin:[Ye,[Ye],(r,[t])=>Math.asin(t.evaluate(r))],acos:[Ye,[Ye],(r,[t])=>Math.acos(t.evaluate(r))],atan:[Ye,[Ye],(r,[t])=>Math.atan(t.evaluate(r))],min:[Ye,Go(Ye),(r,t)=>Math.min(...t.map(o=>o.evaluate(r)))],max:[Ye,Go(Ye),(r,t)=>Math.max(...t.map(o=>o.evaluate(r)))],abs:[Ye,[Ye],(r,[t])=>Math.abs(t.evaluate(r))],round:[Ye,[Ye],(r,[t])=>{const o=t.evaluate(r);return o<0?-Math.round(-o):Math.round(o)}],floor:[Ye,[Ye],(r,[t])=>Math.floor(t.evaluate(r))],ceil:[Ye,[Ye],(r,[t])=>Math.ceil(t.evaluate(r))],"filter-==":[zt,[Ot,Bt],(r,[t,o])=>r.properties()[t.value]===o.value],"filter-id-==":[zt,[Bt],(r,[t])=>r.id()===t.value],"filter-type-==":[zt,[Ot],(r,[t])=>r.geometryType()===t.value],"filter-<":[zt,[Ot,Bt],(r,[t,o])=>{const l=r.properties()[t.value],f=o.value;return typeof l==typeof f&&l{const o=r.id(),l=t.value;return typeof o==typeof l&&o":[zt,[Ot,Bt],(r,[t,o])=>{const l=r.properties()[t.value],f=o.value;return typeof l==typeof f&&l>f}],"filter-id->":[zt,[Bt],(r,[t])=>{const o=r.id(),l=t.value;return typeof o==typeof l&&o>l}],"filter-<=":[zt,[Ot,Bt],(r,[t,o])=>{const l=r.properties()[t.value],f=o.value;return typeof l==typeof f&&l<=f}],"filter-id-<=":[zt,[Bt],(r,[t])=>{const o=r.id(),l=t.value;return typeof o==typeof l&&o<=l}],"filter->=":[zt,[Ot,Bt],(r,[t,o])=>{const l=r.properties()[t.value],f=o.value;return typeof l==typeof f&&l>=f}],"filter-id->=":[zt,[Bt],(r,[t])=>{const o=r.id(),l=t.value;return typeof o==typeof l&&o>=l}],"filter-has":[zt,[Bt],(r,[t])=>t.value in r.properties()],"filter-has-id":[zt,[],r=>r.id()!==null&&r.id()!==void 0],"filter-type-in":[zt,[N(Ot)],(r,[t])=>t.value.indexOf(r.geometryType())>=0],"filter-id-in":[zt,[N(Bt)],(r,[t])=>t.value.indexOf(r.id())>=0],"filter-in-small":[zt,[Ot,N(Bt)],(r,[t,o])=>o.value.indexOf(r.properties()[t.value])>=0],"filter-in-large":[zt,[Ot,N(Bt)],(r,[t,o])=>function(l,f,y,x){for(;y<=x;){const b=y+x>>1;if(f[b]===l)return!0;f[b]>l?x=b-1:y=b+1}return!1}(r.properties()[t.value],o.value,0,o.value.length-1)],all:{type:zt,overloads:[[[zt,zt],(r,[t,o])=>t.evaluate(r)&&o.evaluate(r)],[Go(zt),(r,t)=>{for(const o of t)if(!o.evaluate(r))return!1;return!0}]]},any:{type:zt,overloads:[[[zt,zt],(r,[t,o])=>t.evaluate(r)||o.evaluate(r)],[Go(zt),(r,t)=>{for(const o of t)if(o.evaluate(r))return!0;return!1}]]},"!":[zt,[zt],(r,[t])=>!t.evaluate(r)],"is-supported-script":[zt,[Ot],(r,[t])=>{const o=r.globals&&r.globals.isSupportedScript;return!o||o(t.evaluate(r))}],upcase:[Ot,[Ot],(r,[t])=>t.evaluate(r).toUpperCase()],downcase:[Ot,[Ot],(r,[t])=>t.evaluate(r).toLowerCase()],concat:[Ot,Go(Bt),(r,t)=>t.map(o=>aa(o.evaluate(r))).join("")],"resolved-locale":[Ot,[eo],(r,[t])=>t.evaluate(r).resolvedLocale()]});class Hc{constructor(t,o){var l;this.expression=t,this._warningHistory={},this._evaluator=new gs,this._defaultValue=o?(l=o).type==="color"&&bs(l.default)?new ui(0,0,0,0):l.type==="color"?ui.parse(l.default)||null:l.type==="padding"?Zr.parse(l.default)||null:l.type==="variableAnchorOffsetCollection"?Xr.parse(l.default)||null:l.default===void 0?null:l.default:null,this._enumValues=o&&o.type==="enum"?o.values:null}evaluateWithoutErrorHandling(t,o,l,f,y,x){return this._evaluator.globals=t,this._evaluator.feature=o,this._evaluator.featureState=l,this._evaluator.canonical=f,this._evaluator.availableImages=y||null,this._evaluator.formattedSection=x,this.expression.evaluate(this._evaluator)}evaluate(t,o,l,f,y,x){this._evaluator.globals=t,this._evaluator.feature=o||null,this._evaluator.featureState=l||null,this._evaluator.canonical=f,this._evaluator.availableImages=y||null,this._evaluator.formattedSection=x||null;try{const b=this.expression.evaluate(this._evaluator);if(b==null||typeof b=="number"&&b!=b)return this._defaultValue;if(this._enumValues&&!(b in this._enumValues))throw new qi(`Expected value to be one of ${Object.keys(this._enumValues).map(E=>JSON.stringify(E)).join(", ")}, but found ${JSON.stringify(b)} instead.`);return b}catch(b){return this._warningHistory[b.message]||(this._warningHistory[b.message]=!0,typeof console<"u"&&console.warn(b.message)),this._defaultValue}}}function bl(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in Ho}function wl(r,t){const o=new ai(Ho,ml,[],t?function(f){const y={color:di,string:Ot,number:Ye,enum:Ot,boolean:zt,formatted:to,padding:hr,resolvedImage:te,variableAnchorOffsetCollection:F};return f.type==="array"?N(y[f.value]||Bt,f.length):y[f.type]}(t):void 0),l=o.parse(r,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return l?$c(new Hc(l,t)):Wo(o.errors)}class Gc{constructor(t,o){this.kind=t,this._styleExpression=o,this.isStateDependent=t!=="constant"&&!ya(o.expression)}evaluateWithoutErrorHandling(t,o,l,f,y,x){return this._styleExpression.evaluateWithoutErrorHandling(t,o,l,f,y,x)}evaluate(t,o,l,f,y,x){return this._styleExpression.evaluate(t,o,l,f,y,x)}}class Wc{constructor(t,o,l,f){this.kind=t,this.zoomStops=l,this._styleExpression=o,this.isStateDependent=t!=="camera"&&!ya(o.expression),this.interpolationType=f}evaluateWithoutErrorHandling(t,o,l,f,y,x){return this._styleExpression.evaluateWithoutErrorHandling(t,o,l,f,y,x)}evaluate(t,o,l,f,y,x){return this._styleExpression.evaluate(t,o,l,f,y,x)}interpolationFactor(t,o,l){return this.interpolationType?un.interpolationFactor(this.interpolationType,t,o,l):0}}function va(r,t){const o=wl(r,t);if(o.result==="error")return o;const l=o.value.expression,f=gl(l);if(!f&&!no(t))return Wo([new si("","data expressions not supported")]);const y=yl(l,["zoom"]);if(!y&&!Oh(t))return Wo([new si("","zoom expressions not supported")]);const x=Ir(l);return x||y?x instanceof si?Wo([x]):x instanceof un&&!_l(t)?Wo([new si("",'"interpolate" expressions cannot be used with this property')]):$c(x?new Wc(f?"camera":"composite",o.value,x.labels,x instanceof un?x.interpolation:void 0):new Gc(f?"constant":"source",o.value)):Wo([new si("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Zo{constructor(t,o){this._parameters=t,this._specification=o,Ht(this,_a(this._parameters,this._specification))}static deserialize(t){return new Zo(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Ir(r){let t=null;if(r instanceof tl)t=Ir(r.result);else if(r instanceof sl){for(const o of r.args)if(t=Ir(o),t)break}else(r instanceof ua||r instanceof un)&&r.input instanceof Kr&&r.input.name==="zoom"&&(t=r);return t instanceof si||r.eachChild(o=>{const l=Ir(o);l instanceof si?t=l:!t&&l?t=new si("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&l&&t!==l&&(t=new si("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Xo(r){if(r===!0||r===!1)return!0;if(!Array.isArray(r)||r.length===0)return!1;switch(r[0]){case"has":return r.length>=2&&r[1]!=="$id"&&r[1]!=="$type";case"in":return r.length>=3&&(typeof r[1]!="string"||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return r.length!==3||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(const t of r.slice(1))if(!Xo(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const Fh={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Zc(r){if(r==null)return{filter:()=>!0,needGeometry:!1};Xo(r)||(r=xa(r));const t=wl(r,Fh);if(t.result==="error")throw new Error(t.value.map(o=>`${o.key}: ${o.message}`).join(", "));return{filter:(o,l,f)=>t.value.evaluate(o,l,{},f),needGeometry:Es(r)}}function op(r,t){return rt?1:0}function Es(r){if(!Array.isArray(r))return!1;if(r[0]==="within"||r[0]==="distance")return!0;for(let t=1;t"||t==="<="||t===">="?ba(r[1],r[2],t):t==="any"?(o=r.slice(1),["any"].concat(o.map(xa))):t==="all"?["all"].concat(r.slice(1).map(xa)):t==="none"?["all"].concat(r.slice(1).map(xa).map(Sl)):t==="in"?Vh(r[1],r.slice(2)):t==="!in"?Sl(Vh(r[1],r.slice(2))):t==="has"?El(r[1]):t!=="!has"||Sl(El(r[1]));var o}function ba(r,t,o){switch(r){case"$type":return[`filter-type-${o}`,t];case"$id":return[`filter-id-${o}`,t];default:return[`filter-${o}`,r,t]}}function Vh(r,t){if(t.length===0)return!1;switch(r){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(o=>typeof o!=typeof t[0])?["filter-in-large",r,["literal",t.sort(op)]]:["filter-in-small",r,["literal",t]]}}function El(r){switch(r){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",r]}}function Sl(r){return["!",r]}function Ko(r){const t=typeof r;if(t==="number"||t==="boolean"||t==="string"||r==null)return JSON.stringify(r);if(Array.isArray(r)){let f="[";for(const y of r)f+=`${Ko(y)},`;return`${f}]`}const o=Object.keys(r).sort();let l="{";for(let f=0;fl.maximum?[new Ne(t,o,`${o} is greater than the maximum value ${l.maximum}`)]:[]}function Cl(r){const t=r.valueSpec,o=Vi(r.value.type);let l,f,y,x={};const b=o!=="categorical"&&r.value.property===void 0,E=!b,C=ni(r.value.stops)==="array"&&ni(r.value.stops[0])==="array"&&ni(r.value.stops[0][0])==="object",L=dn({key:r.key,value:r.value,valueSpec:r.styleSpec.function,validateSpec:r.validateSpec,style:r.style,styleSpec:r.styleSpec,objectElementValidators:{stops:function(V){if(o==="identity")return[new Ne(V.key,V.value,'identity function may not have a "stops" property')];let $=[];const G=V.value;return $=$.concat(Tl({key:V.key,value:G,valueSpec:V.valueSpec,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec,arrayElementValidator:D})),ni(G)==="array"&&G.length===0&&$.push(new Ne(V.key,G,"array must have at least one stop")),$},default:function(V){return V.validateSpec({key:V.key,value:V.value,valueSpec:t,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec})}}});return o==="identity"&&b&&L.push(new Ne(r.key,r.value,'missing required property "property"')),o==="identity"||r.value.stops||L.push(new Ne(r.key,r.value,'missing required property "stops"')),o==="exponential"&&r.valueSpec.expression&&!_l(r.valueSpec)&&L.push(new Ne(r.key,r.value,"exponential functions not supported")),r.styleSpec.$version>=8&&(E&&!no(r.valueSpec)?L.push(new Ne(r.key,r.value,"property functions not supported")):b&&!Oh(r.valueSpec)&&L.push(new Ne(r.key,r.value,"zoom functions not supported"))),o!=="categorical"&&!C||r.value.property!==void 0||L.push(new Ne(r.key,r.value,'"property" property is required')),L;function D(V){let $=[];const G=V.value,Q=V.key;if(ni(G)!=="array")return[new Ne(Q,G,`array expected, ${ni(G)} found`)];if(G.length!==2)return[new Ne(Q,G,`array length 2 expected, length ${G.length} found`)];if(C){if(ni(G[0])!=="object")return[new Ne(Q,G,`object expected, ${ni(G[0])} found`)];if(G[0].zoom===void 0)return[new Ne(Q,G,"object stop key must have zoom")];if(G[0].value===void 0)return[new Ne(Q,G,"object stop key must have value")];if(y&&y>Vi(G[0].zoom))return[new Ne(Q,G[0].zoom,"stop zoom values must appear in ascending order")];Vi(G[0].zoom)!==y&&(y=Vi(G[0].zoom),f=void 0,x={}),$=$.concat(dn({key:`${Q}[0]`,value:G[0],valueSpec:{zoom:{}},validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec,objectElementValidators:{zoom:Xc,value:B}}))}else $=$.concat(B({key:`${Q}[0]`,value:G[0],valueSpec:{},validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec},G));return bl(oo(G[1]))?$.concat([new Ne(`${Q}[1]`,G[1],"expressions are not allowed in function stops.")]):$.concat(V.validateSpec({key:`${Q}[1]`,value:G[1],valueSpec:t,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec}))}function B(V,$){const G=ni(V.value),Q=Vi(V.value),oe=V.value!==null?V.value:$;if(l){if(G!==l)return[new Ne(V.key,oe,`${G} stop domain type must match previous stop domain type ${l}`)]}else l=G;if(G!=="number"&&G!=="string"&&G!=="boolean")return[new Ne(V.key,oe,"stop domain value must be a number, string, or boolean")];if(G!=="number"&&o!=="categorical"){let we=`number expected, ${G} found`;return no(t)&&o===void 0&&(we+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ne(V.key,oe,we)]}return o!=="categorical"||G!=="number"||isFinite(Q)&&Math.floor(Q)===Q?o!=="categorical"&&G==="number"&&f!==void 0&&Qnew Ne(`${r.key}${l.key}`,r.value,l.message));const o=t.value.expression||t.value._styleExpression.expression;if(r.expressionContext==="property"&&r.propertyKey==="text-font"&&!o.outputDefined())return[new Ne(r.key,r.value,`Invalid data expression for "${r.propertyKey}". Output values must be contained as literals within the expression.`)];if(r.expressionContext==="property"&&r.propertyType==="layout"&&!ya(o))return[new Ne(r.key,r.value,'"feature-state" data expressions are not supported with layout properties.')];if(r.expressionContext==="filter"&&!ya(o))return[new Ne(r.key,r.value,'"feature-state" data expressions are not supported with filters.')];if(r.expressionContext&&r.expressionContext.indexOf("cluster")===0){if(!yl(o,["zoom","feature-state"]))return[new Ne(r.key,r.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(r.expressionContext==="cluster-initial"&&!gl(o))return[new Ne(r.key,r.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ss(r){const t=r.key,o=r.value,l=r.valueSpec,f=[];return Array.isArray(l.values)?l.values.indexOf(Vi(o))===-1&&f.push(new Ne(t,o,`expected one of [${l.values.join(", ")}], ${JSON.stringify(o)} found`)):Object.keys(l.values).indexOf(Vi(o))===-1&&f.push(new Ne(t,o,`expected one of [${Object.keys(l.values).join(", ")}], ${JSON.stringify(o)} found`)),f}function Al(r){return Xo(oo(r.value))?so(Ht({},r,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Kc(r)}function Kc(r){const t=r.value,o=r.key;if(ni(t)!=="array")return[new Ne(o,t,`array expected, ${ni(t)} found`)];const l=r.styleSpec;let f,y=[];if(t.length<1)return[new Ne(o,t,"filter array must have at least 1 element")];switch(y=y.concat(Ss({key:`${o}[0]`,value:t[0],valueSpec:l.filter_operator,style:r.style,styleSpec:r.styleSpec})),Vi(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Vi(t[1])==="$type"&&y.push(new Ne(o,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&y.push(new Ne(o,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(f=ni(t[1]),f!=="string"&&y.push(new Ne(`${o}[1]`,t[1],`string expected, ${f} found`)));for(let x=2;x{C in o&&t.push(new Ne(l,o[C],`"${C}" is prohibited for ref layers`))}),f.layers.forEach(C=>{Vi(C.id)===b&&(E=C)}),E?E.ref?t.push(new Ne(l,o.ref,"ref cannot reference another ref layer")):x=Vi(E.type):t.push(new Ne(l,o.ref,`ref layer "${b}" not found`))}else if(x!=="background")if(o.source){const E=f.sources&&f.sources[o.source],C=E&&Vi(E.type);E?C==="vector"&&x==="raster"?t.push(new Ne(l,o.source,`layer "${o.id}" requires a raster source`)):C!=="raster-dem"&&x==="hillshade"?t.push(new Ne(l,o.source,`layer "${o.id}" requires a raster-dem source`)):C==="raster"&&x!=="raster"?t.push(new Ne(l,o.source,`layer "${o.id}" requires a vector source`)):C!=="vector"||o["source-layer"]?C==="raster-dem"&&x!=="hillshade"?t.push(new Ne(l,o.source,"raster-dem source can only be used with layer type 'hillshade'.")):x!=="line"||!o.paint||!o.paint["line-gradient"]||C==="geojson"&&E.lineMetrics||t.push(new Ne(l,o,`layer "${o.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new Ne(l,o,`layer "${o.id}" must specify a "source-layer"`)):t.push(new Ne(l,o.source,`source "${o.source}" not found`))}else t.push(new Ne(l,o,'missing required property "source"'));return t=t.concat(dn({key:l,value:o,valueSpec:y.layer,style:r.style,styleSpec:r.styleSpec,validateSpec:r.validateSpec,objectElementValidators:{"*":()=>[],type:()=>r.validateSpec({key:`${l}.type`,value:o.type,valueSpec:y.layer.type,style:r.style,styleSpec:r.styleSpec,validateSpec:r.validateSpec,object:o,objectKey:"type"}),filter:Al,layout:E=>dn({layer:o,key:E.key,value:E.value,style:E.style,styleSpec:E.styleSpec,validateSpec:E.validateSpec,objectElementValidators:{"*":C=>Yc(Ht({layerType:x},C))}}),paint:E=>dn({layer:o,key:E.key,value:E.value,style:E.style,styleSpec:E.styleSpec,validateSpec:E.validateSpec,objectElementValidators:{"*":C=>Ml(Ht({layerType:x},C))}})}})),t}function vo(r){const t=r.value,o=r.key,l=ni(t);return l!=="string"?[new Ne(o,t,`string expected, ${l} found`)]:[]}const jh={promoteId:function({key:r,value:t}){if(ni(t)==="string")return vo({key:r,value:t});{const o=[];for(const l in t)o.push(...vo({key:`${r}.${l}`,value:t[l]}));return o}}};function Qc(r){const t=r.value,o=r.key,l=r.styleSpec,f=r.style,y=r.validateSpec;if(!t.type)return[new Ne(o,t,'"type" is required')];const x=Vi(t.type);let b;switch(x){case"vector":case"raster":return b=dn({key:o,value:t,valueSpec:l[`source_${x.replace("-","_")}`],style:r.style,styleSpec:l,objectElementValidators:jh,validateSpec:y}),b;case"raster-dem":return b=function(E){var C;const L=(C=E.sourceName)!==null&&C!==void 0?C:"",D=E.value,B=E.styleSpec,V=B.source_raster_dem,$=E.style;let G=[];const Q=ni(D);if(D===void 0)return G;if(Q!=="object")return G.push(new Ne("source_raster_dem",D,`object expected, ${Q} found`)),G;const oe=Vi(D.encoding)==="custom",we=["redFactor","greenFactor","blueFactor","baseShift"],he=E.value.encoding?`"${E.value.encoding}"`:"Default";for(const xe in D)!oe&&we.includes(xe)?G.push(new Ne(xe,D[xe],`In "${L}": "${xe}" is only valid when "encoding" is set to "custom". ${he} encoding found`)):V[xe]?G=G.concat(E.validateSpec({key:xe,value:D[xe],valueSpec:V[xe],validateSpec:E.validateSpec,style:$,styleSpec:B})):G.push(new Ne(xe,D[xe],`unknown property "${xe}"`));return G}({sourceName:o,value:t,style:r.style,styleSpec:l,validateSpec:y}),b;case"geojson":if(b=dn({key:o,value:t,valueSpec:l.source_geojson,style:f,styleSpec:l,validateSpec:y,objectElementValidators:jh}),t.cluster)for(const E in t.clusterProperties){const[C,L]=t.clusterProperties[E],D=typeof C=="string"?[C,["accumulated"],["get",E]]:C;b.push(...so({key:`${o}.${E}.map`,value:L,validateSpec:y,expressionContext:"cluster-map"})),b.push(...so({key:`${o}.${E}.reduce`,value:D,validateSpec:y,expressionContext:"cluster-reduce"}))}return b;case"video":return dn({key:o,value:t,valueSpec:l.source_video,style:f,validateSpec:y,styleSpec:l});case"image":return dn({key:o,value:t,valueSpec:l.source_image,style:f,validateSpec:y,styleSpec:l});case"canvas":return[new Ne(o,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ss({key:`${o}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:f,validateSpec:y,styleSpec:l})}}function eu(r){const t=r.value,o=r.styleSpec,l=o.light,f=r.style;let y=[];const x=ni(t);if(t===void 0)return y;if(x!=="object")return y=y.concat([new Ne("light",t,`object expected, ${x} found`)]),y;for(const b in t){const E=b.match(/^(.*)-transition$/);y=y.concat(E&&l[E[1]]&&l[E[1]].transition?r.validateSpec({key:b,value:t[b],valueSpec:o.transition,validateSpec:r.validateSpec,style:f,styleSpec:o}):l[b]?r.validateSpec({key:b,value:t[b],valueSpec:l[b],validateSpec:r.validateSpec,style:f,styleSpec:o}):[new Ne(b,t[b],`unknown property "${b}"`)])}return y}function tu(r){const t=r.value,o=r.styleSpec,l=o.sky,f=r.style,y=ni(t);if(t===void 0)return[];if(y!=="object")return[new Ne("sky",t,`object expected, ${y} found`)];let x=[];for(const b in t)x=x.concat(l[b]?r.validateSpec({key:b,value:t[b],valueSpec:l[b],style:f,styleSpec:o}):[new Ne(b,t[b],`unknown property "${b}"`)]);return x}function $h(r){const t=r.value,o=r.styleSpec,l=o.terrain,f=r.style;let y=[];const x=ni(t);if(t===void 0)return y;if(x!=="object")return y=y.concat([new Ne("terrain",t,`object expected, ${x} found`)]),y;for(const b in t)y=y.concat(l[b]?r.validateSpec({key:b,value:t[b],valueSpec:l[b],validateSpec:r.validateSpec,style:f,styleSpec:o}):[new Ne(b,t[b],`unknown property "${b}"`)]);return y}function Uh(r){let t=[];const o=r.value,l=r.key;if(Array.isArray(o)){const f=[],y=[];for(const x in o)o[x].id&&f.includes(o[x].id)&&t.push(new Ne(l,o,`all the sprites' ids must be unique, but ${o[x].id} is duplicated`)),f.push(o[x].id),o[x].url&&y.includes(o[x].url)&&t.push(new Ne(l,o,`all the sprites' URLs must be unique, but ${o[x].url} is duplicated`)),y.push(o[x].url),t=t.concat(dn({key:`${l}[${x}]`,value:o[x],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:r.validateSpec}));return t}return vo({key:l,value:o})}const iu={"*":()=>[],array:Tl,boolean:function(r){const t=r.value,o=r.key,l=ni(t);return l!=="boolean"?[new Ne(o,t,`boolean expected, ${l} found`)]:[]},number:Xc,color:function(r){const t=r.key,o=r.value,l=ni(o);return l!=="string"?[new Ne(t,o,`color expected, ${l} found`)]:ui.parse(String(o))?[]:[new Ne(t,o,`color expected, "${o}" found`)]},constants:Il,enum:Ss,filter:Al,function:Cl,layer:Nh,object:dn,source:Qc,light:eu,sky:tu,terrain:$h,projection:function(r){const t=r.value,o=r.styleSpec,l=o.projection,f=r.style,y=ni(t);if(t===void 0)return[];if(y!=="object")return[new Ne("projection",t,`object expected, ${y} found`)];let x=[];for(const b in t)x=x.concat(l[b]?r.validateSpec({key:b,value:t[b],valueSpec:l[b],style:f,styleSpec:o}):[new Ne(b,t[b],`unknown property "${b}"`)]);return x},string:vo,formatted:function(r){return vo(r).length===0?[]:so(r)},resolvedImage:function(r){return vo(r).length===0?[]:so(r)},padding:function(r){const t=r.key,o=r.value;if(ni(o)==="array"){if(o.length<1||o.length>4)return[new Ne(t,o,`padding requires 1 to 4 values; ${o.length} values found`)];const l={type:"number"};let f=[];for(let y=0;y[]}})),r.constants&&(o=o.concat(Il({key:"constants",value:r.constants,style:r,styleSpec:t,validateSpec:Is}))),qh(o)}function fn(r){return function(t){return r({...t,validateSpec:Is})}}function qh(r){return[].concat(r).sort((t,o)=>t.line-o.line)}function xn(r){return function(...t){return qh(r.apply(this,t))}}vn.source=xn(fn(Qc)),vn.sprite=xn(fn(Uh)),vn.glyphs=xn(fn(ru)),vn.light=xn(fn(eu)),vn.sky=xn(fn(tu)),vn.terrain=xn(fn($h)),vn.layer=xn(fn(Nh)),vn.filter=xn(fn(Al)),vn.paintProperty=xn(fn(Ml)),vn.layoutProperty=xn(fn(Yc));const wa=vn,ap=wa.light,Hh=wa.paintProperty,Gh=wa.layoutProperty;function nu(r,t){let o=!1;if(t&&t.length)for(const l of t)r.fire(new ge(new Error(l.message))),o=!0;return o}class Ea{constructor(t,o,l){const f=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const x=new Int32Array(this.arrayBuffer);t=x[0],this.d=(o=x[1])+2*(l=x[2]);for(let E=0;E=D[$+0]&&f>=D[$+1])?(b[V]=!0,x.push(L[V])):b[V]=!1}}}}_forEachCell(t,o,l,f,y,x,b,E){const C=this._convertToCellCoord(t),L=this._convertToCellCoord(o),D=this._convertToCellCoord(l),B=this._convertToCellCoord(f);for(let V=C;V<=D;V++)for(let $=L;$<=B;$++){const G=this.d*$+V;if((!E||E(this._convertFromCellCoord(V),this._convertFromCellCoord($),this._convertFromCellCoord(V+1),this._convertFromCellCoord($+1)))&&y.call(this,t,o,l,f,G,x,b,E))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,o=3+this.cells.length+1+1;let l=0;for(let x=0;x=0)continue;const x=r[y];f[y]=xo[l].shallow.indexOf(y)>=0?x:Sa(x,t)}r instanceof Error&&(f.message=r.message)}if(f.$name)throw new Error("$name property is reserved for worker serialization logic.");return l!=="Object"&&(f.$name=l),f}throw new Error("can't serialize object of type "+typeof r)}function jn(r){if(r==null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||r instanceof Boolean||r instanceof Number||r instanceof String||r instanceof Date||r instanceof RegExp||r instanceof Blob||r instanceof Error||Wh(r)||dt(r)||ArrayBuffer.isView(r)||r instanceof ImageData)return r;if(Array.isArray(r))return r.map(jn);if(typeof r=="object"){const t=r.$name||"Object";if(!xo[t])throw new Error(`can't deserialize unregistered class ${t}`);const{klass:o}=xo[t];if(!o)throw new Error(`can't deserialize unregistered class ${t}`);if(o.deserialize)return o.deserialize(r);const l=Object.create(o.prototype);for(const f of Object.keys(r)){if(f==="$name")continue;const y=r[f];l[f]=xo[t].shallow.indexOf(f)>=0?y:jn(y)}return l}throw new Error("can't deserialize object of type "+typeof r)}class Zh{constructor(){this.first=!0}update(t,o){const l=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=l,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=l,!0):(this.lastFloorZoom>l?(this.lastIntegerZoom=l+1,this.lastIntegerZoomTime=o):this.lastFloorZoomr>=128&&r<=255,Arabic:r=>r>=1536&&r<=1791,"Arabic Supplement":r=>r>=1872&&r<=1919,"Arabic Extended-A":r=>r>=2208&&r<=2303,"Hangul Jamo":r=>r>=4352&&r<=4607,"Unified Canadian Aboriginal Syllabics":r=>r>=5120&&r<=5759,Khmer:r=>r>=6016&&r<=6143,"Unified Canadian Aboriginal Syllabics Extended":r=>r>=6320&&r<=6399,"General Punctuation":r=>r>=8192&&r<=8303,"Letterlike Symbols":r=>r>=8448&&r<=8527,"Number Forms":r=>r>=8528&&r<=8591,"Miscellaneous Technical":r=>r>=8960&&r<=9215,"Control Pictures":r=>r>=9216&&r<=9279,"Optical Character Recognition":r=>r>=9280&&r<=9311,"Enclosed Alphanumerics":r=>r>=9312&&r<=9471,"Geometric Shapes":r=>r>=9632&&r<=9727,"Miscellaneous Symbols":r=>r>=9728&&r<=9983,"Miscellaneous Symbols and Arrows":r=>r>=11008&&r<=11263,"CJK Radicals Supplement":r=>r>=11904&&r<=12031,"Kangxi Radicals":r=>r>=12032&&r<=12255,"Ideographic Description Characters":r=>r>=12272&&r<=12287,"CJK Symbols and Punctuation":r=>r>=12288&&r<=12351,Hiragana:r=>r>=12352&&r<=12447,Katakana:r=>r>=12448&&r<=12543,Bopomofo:r=>r>=12544&&r<=12591,"Hangul Compatibility Jamo":r=>r>=12592&&r<=12687,Kanbun:r=>r>=12688&&r<=12703,"Bopomofo Extended":r=>r>=12704&&r<=12735,"CJK Strokes":r=>r>=12736&&r<=12783,"Katakana Phonetic Extensions":r=>r>=12784&&r<=12799,"Enclosed CJK Letters and Months":r=>r>=12800&&r<=13055,"CJK Compatibility":r=>r>=13056&&r<=13311,"CJK Unified Ideographs Extension A":r=>r>=13312&&r<=19903,"Yijing Hexagram Symbols":r=>r>=19904&&r<=19967,"CJK Unified Ideographs":r=>r>=19968&&r<=40959,"Yi Syllables":r=>r>=40960&&r<=42127,"Yi Radicals":r=>r>=42128&&r<=42191,"Hangul Jamo Extended-A":r=>r>=43360&&r<=43391,"Hangul Syllables":r=>r>=44032&&r<=55215,"Hangul Jamo Extended-B":r=>r>=55216&&r<=55295,"Private Use Area":r=>r>=57344&&r<=63743,"CJK Compatibility Ideographs":r=>r>=63744&&r<=64255,"Arabic Presentation Forms-A":r=>r>=64336&&r<=65023,"Vertical Forms":r=>r>=65040&&r<=65055,"CJK Compatibility Forms":r=>r>=65072&&r<=65103,"Small Form Variants":r=>r>=65104&&r<=65135,"Arabic Presentation Forms-B":r=>r>=65136&&r<=65279,"Halfwidth and Fullwidth Forms":r=>r>=65280&&r<=65519};function ou(r){for(const t of r)if(su(t.charCodeAt(0)))return!0;return!1}function lp(r){for(const t of r)if(!Xh(t.charCodeAt(0)))return!1;return!0}function Xh(r){return!(ct.Arabic(r)||ct["Arabic Supplement"](r)||ct["Arabic Extended-A"](r)||ct["Arabic Presentation Forms-A"](r)||ct["Arabic Presentation Forms-B"](r))}function su(r){return!(r!==746&&r!==747&&(r<4352||!(ct["Bopomofo Extended"](r)||ct.Bopomofo(r)||ct["CJK Compatibility Forms"](r)&&!(r>=65097&&r<=65103)||ct["CJK Compatibility Ideographs"](r)||ct["CJK Compatibility"](r)||ct["CJK Radicals Supplement"](r)||ct["CJK Strokes"](r)||!(!ct["CJK Symbols and Punctuation"](r)||r>=12296&&r<=12305||r>=12308&&r<=12319||r===12336)||ct["CJK Unified Ideographs Extension A"](r)||ct["CJK Unified Ideographs"](r)||ct["Enclosed CJK Letters and Months"](r)||ct["Hangul Compatibility Jamo"](r)||ct["Hangul Jamo Extended-A"](r)||ct["Hangul Jamo Extended-B"](r)||ct["Hangul Jamo"](r)||ct["Hangul Syllables"](r)||ct.Hiragana(r)||ct["Ideographic Description Characters"](r)||ct.Kanbun(r)||ct["Kangxi Radicals"](r)||ct["Katakana Phonetic Extensions"](r)||ct.Katakana(r)&&r!==12540||!(!ct["Halfwidth and Fullwidth Forms"](r)||r===65288||r===65289||r===65293||r>=65306&&r<=65310||r===65339||r===65341||r===65343||r>=65371&&r<=65503||r===65507||r>=65512&&r<=65519)||!(!ct["Small Form Variants"](r)||r>=65112&&r<=65118||r>=65123&&r<=65126)||ct["Unified Canadian Aboriginal Syllabics"](r)||ct["Unified Canadian Aboriginal Syllabics Extended"](r)||ct["Vertical Forms"](r)||ct["Yijing Hexagram Symbols"](r)||ct["Yi Syllables"](r)||ct["Yi Radicals"](r))))}function Kh(r){return!(su(r)||function(t){return!!(ct["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||ct["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)||ct["Letterlike Symbols"](t)||ct["Number Forms"](t)||ct["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)||ct["Control Pictures"](t)&&t!==9251||ct["Optical Character Recognition"](t)||ct["Enclosed Alphanumerics"](t)||ct["Geometric Shapes"](t)||ct["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||ct["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||ct["CJK Symbols and Punctuation"](t)||ct.Katakana(t)||ct["Private Use Area"](t)||ct["CJK Compatibility Forms"](t)||ct["Small Form Variants"](t)||ct["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)}(r))}function bo(r){return r>=1424&&r<=2303||ct["Arabic Presentation Forms-A"](r)||ct["Arabic Presentation Forms-B"](r)}function Jh(r,t){return!(!t&&bo(r)||r>=2304&&r<=3583||r>=3840&&r<=4255||ct.Khmer(r))}function au(r){for(const t of r)if(bo(t.charCodeAt(0)))return!0;return!1}const wo=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(r){this.pluginStatus=r.pluginStatus,this.pluginURL=r.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(r){this.applyArabicShaping=r.applyArabicShaping,this.processBidirectionalText=r.processBidirectionalText,this.processStyledBidirectionalText=r.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class xi{constructor(t,o){this.zoom=t,o?(this.now=o.now,this.fadeDuration=o.fadeDuration,this.zoomHistory=o.zoomHistory,this.transition=o.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Zh,this.transition={})}isSupportedScript(t){return function(o,l){for(const f of o)if(!Jh(f.charCodeAt(0),l))return!1;return!0}(t,wo.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,o=t-Math.floor(t),l=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:o+(1-o)*l}:{fromScale:.5,toScale:1,t:1-(1-l)*o}}}class kl{constructor(t,o){this.property=t,this.value=o,this.expression=function(l,f){if(bs(l))return new Zo(l,f);if(bl(l)){const y=va(l,f);if(y.result==="error")throw new Error(y.value.map(x=>`${x.key}: ${x.message}`).join(", "));return y.value}{let y=l;return f.type==="color"&&typeof l=="string"?y=ui.parse(l):f.type!=="padding"||typeof l!="number"&&!Array.isArray(l)?f.type==="variableAnchorOffsetCollection"&&Array.isArray(l)&&(y=Xr.parse(l)):y=Zr.parse(l),{kind:"constant",evaluate:()=>y}}}(o===void 0?t.specification.default:o,t.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(t,o,l){return this.property.possiblyEvaluate(this,t,o,l)}}class Ts{constructor(t){this.property=t,this.value=new kl(t,void 0)}transitioned(t,o){return new Yh(this.property,this.value,o,Se({},t.transition,this.transition),t.now)}untransitioned(){return new Yh(this.property,this.value,null,{},0)}}class Cs{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}getValue(t){return Ie(this._values[t].value.value)}setValue(t,o){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Ts(this._values[t].property)),this._values[t].value=new kl(this._values[t].property,o===null?void 0:Ie(o))}getTransition(t){return Ie(this._values[t].transition)}setTransition(t,o){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Ts(this._values[t].property)),this._values[t].transition=Ie(o)||void 0}serialize(){const t={};for(const o of Object.keys(this._values)){const l=this.getValue(o);l!==void 0&&(t[o]=l);const f=this.getTransition(o);f!==void 0&&(t[`${o}-transition`]=f)}return t}transitioned(t,o){const l=new lu(this._properties);for(const f of Object.keys(this._values))l._values[f]=this._values[f].transitioned(t,o._values[f]);return l}untransitioned(){const t=new lu(this._properties);for(const o of Object.keys(this._values))t._values[o]=this._values[o].untransitioned();return t}}class Yh{constructor(t,o,l,f,y){this.property=t,this.value=o,this.begin=y+f.delay||0,this.end=this.begin+f.duration||0,t.specification.transition&&(f.delay||f.duration)&&(this.prior=l)}possiblyEvaluate(t,o,l){const f=t.now||0,y=this.value.possiblyEvaluate(t,o,l),x=this.prior;if(x){if(f>this.end)return this.prior=null,y;if(this.value.isDataDriven())return this.prior=null,y;if(f=1)return 1;const C=E*E,L=C*E;return 4*(E<.5?L:3*(E-C)+L-.75)}(b))}}return y}}class lu{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,o,l){const f=new Ll(this._properties);for(const y of Object.keys(this._values))f._values[y]=this._values[y].possiblyEvaluate(t,o,l);return f}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 Ie(this._values[t].value)}setValue(t,o){this._values[t]=new kl(this._values[t].property,o===null?void 0:Ie(o))}serialize(){const t={};for(const o of Object.keys(this._values)){const l=this.getValue(o);l!==void 0&&(t[o]=l)}return t}possiblyEvaluate(t,o,l){const f=new Ll(this._properties);for(const y of Object.keys(this._values))f._values[y]=this._values[y].possiblyEvaluate(t,o,l);return f}}class $n{constructor(t,o,l){this.property=t,this.value=o,this.parameters=l}isConstant(){return this.value.kind==="constant"}constantOr(t){return this.value.kind==="constant"?this.value.value:t}evaluate(t,o,l,f){return this.property.evaluate(this.value,this.parameters,t,o,l,f)}}class Ll{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class bt{constructor(t){this.specification=t}possiblyEvaluate(t,o){if(t.isDataDriven())throw new Error("Value should not be data driven");return t.expression.evaluate(o)}interpolate(t,o,l){const f=Fr[this.specification.type];return f?f(t,o,l):t}}class Ct{constructor(t,o){this.specification=t,this.overrides=o}possiblyEvaluate(t,o,l,f){return new $n(this,t.expression.kind==="constant"||t.expression.kind==="camera"?{kind:"constant",value:t.expression.evaluate(o,null,{},l,f)}:t.expression,o)}interpolate(t,o,l){if(t.value.kind!=="constant"||o.value.kind!=="constant")return t;if(t.value.value===void 0||o.value.value===void 0)return new $n(this,{kind:"constant",value:void 0},t.parameters);const f=Fr[this.specification.type];if(f){const y=f(t.value.value,o.value.value,l);return new $n(this,{kind:"constant",value:y},t.parameters)}return t}evaluate(t,o,l,f,y,x){return t.kind==="constant"?t.value:t.evaluate(o,l,f,y,x)}}class _ extends Ct{possiblyEvaluate(t,o,l,f){if(t.value===void 0)return new $n(this,{kind:"constant",value:void 0},o);if(t.expression.kind==="constant"){const y=t.expression.evaluate(o,null,{},l,f),x=t.property.specification.type==="resolvedImage"&&typeof y!="string"?y.name:y,b=this._calculate(x,x,x,o);return new $n(this,{kind:"constant",value:b},o)}if(t.expression.kind==="camera"){const y=this._calculate(t.expression.evaluate({zoom:o.zoom-1}),t.expression.evaluate({zoom:o.zoom}),t.expression.evaluate({zoom:o.zoom+1}),o);return new $n(this,{kind:"constant",value:y},o)}return new $n(this,t.expression,o)}evaluate(t,o,l,f,y,x){if(t.kind==="source"){const b=t.evaluate(o,l,f,y,x);return this._calculate(b,b,b,o)}return t.kind==="composite"?this._calculate(t.evaluate({zoom:Math.floor(o.zoom)-1},l,f),t.evaluate({zoom:Math.floor(o.zoom)},l,f),t.evaluate({zoom:Math.floor(o.zoom)+1},l,f),o):t.value}_calculate(t,o,l,f){return f.zoom>f.zoomHistory.lastIntegerZoom?{from:t,to:o}:{from:l,to:o}}interpolate(t){return t}}class i{constructor(t){this.specification=t}possiblyEvaluate(t,o,l,f){if(t.value!==void 0){if(t.expression.kind==="constant"){const y=t.expression.evaluate(o,null,{},l,f);return this._calculate(y,y,y,o)}return this._calculate(t.expression.evaluate(new xi(Math.floor(o.zoom-1),o)),t.expression.evaluate(new xi(Math.floor(o.zoom),o)),t.expression.evaluate(new xi(Math.floor(o.zoom+1),o)),o)}}_calculate(t,o,l,f){return f.zoom>f.zoomHistory.lastIntegerZoom?{from:t,to:o}:{from:l,to:o}}interpolate(t){return t}}class a{constructor(t){this.specification=t}possiblyEvaluate(t,o,l,f){return!!t.expression.evaluate(o,null,{},l,f)}interpolate(){return!1}}class d{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const o in t){const l=t[o];l.specification.overridable&&this.overridableProperties.push(o);const f=this.defaultPropertyValues[o]=new kl(l,void 0),y=this.defaultTransitionablePropertyValues[o]=new Ts(l);this.defaultTransitioningPropertyValues[o]=y.untransitioned(),this.defaultPossiblyEvaluatedValues[o]=f.possiblyEvaluate({})}}}mt("DataDrivenProperty",Ct),mt("DataConstantProperty",bt),mt("CrossFadedDataDrivenProperty",_),mt("CrossFadedProperty",i),mt("ColorRampProperty",a);const p="-transition";class v extends Be{constructor(t,o){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),o.layout&&(this._unevaluatedLayout=new Ia(o.layout)),o.paint)){this._transitionablePaint=new Cs(o.paint);for(const l in t.paint)this.setPaintProperty(l,t.paint[l],{validate:!1});for(const l in t.layout)this.setLayoutProperty(l,t.layout[l],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ll(o.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return t==="visibility"?this.visibility:this._unevaluatedLayout.getValue(t)}setLayoutProperty(t,o,l={}){o!=null&&this._validate(Gh,`layers.${this.id}.layout.${t}`,t,o,l)||(t!=="visibility"?this._unevaluatedLayout.setValue(t,o):this.visibility=o)}getPaintProperty(t){return t.endsWith(p)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,o,l={}){if(o!=null&&this._validate(Hh,`layers.${this.id}.paint.${t}`,t,o,l))return!1;if(t.endsWith(p))return this._transitionablePaint.setTransition(t.slice(0,-11),o||void 0),!1;{const f=this._transitionablePaint._values[t],y=f.property.specification["property-type"]==="cross-faded-data-driven",x=f.value.isDataDriven(),b=f.value;this._transitionablePaint.setValue(t,o),this._handleSpecialPaintPropertyUpdate(t);const E=this._transitionablePaint._values[t].value;return E.isDataDriven()||x||y||this._handleOverridablePaintPropertyUpdate(t,b,E)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,o,l){return!1}isHidden(t){return!!(this.minzoom&&t=this.maxzoom)||this.visibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,o){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,o)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,o)}serialize(){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),pe(t,(o,l)=>!(o===void 0||l==="layout"&&!Object.keys(o).length||l==="paint"&&!Object.keys(o).length))}_validate(t,o,l,f,y={}){return(!y||y.validate!==!1)&&nu(this,t.call(wa,{key:o,layerType:this.type,objectKey:l,value:f,styleSpec:ae,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const o=this.paint.get(t);if(o instanceof $n&&no(o.property.specification)&&(o.value.kind==="source"||o.value.kind==="composite")&&o.value.isStateDependent)return!0}return!1}}const w={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class S{constructor(t,o){this._structArray=t,this._pos1=o*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class T{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,o){return t._trim(),o&&(t.isTransferred=!0,o.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const o=Object.create(this.prototype);return o.arrayBuffer=t.arrayBuffer,o.length=t.length,o.capacity=t.arrayBuffer.byteLength/o.bytesPerElement,o._refreshViews(),o}_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 o=this.uint8;this._refreshViews(),o&&this.uint8.set(o)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function P(r,t=1){let o=0,l=0;return{members:r.map(f=>{const y=w[f.type].BYTES_PER_ELEMENT,x=o=O(o,Math.max(t,y)),b=f.components||1;return l=Math.max(l,y),o+=y*b,{name:f.name,type:f.type,components:b,offset:x}}),size:O(o,Math.max(l,t)),alignment:t}}function O(r,t){return Math.ceil(r/t)*t}class R extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o){const l=this.length;return this.resize(l+1),this.emplace(l,t,o)}emplace(t,o,l){const f=2*t;return this.int16[f+0]=o,this.int16[f+1]=l,t}}R.prototype.bytesPerElement=4,mt("StructArrayLayout2i4",R);class j extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l){const f=this.length;return this.resize(f+1),this.emplace(f,t,o,l)}emplace(t,o,l,f){const y=3*t;return this.int16[y+0]=o,this.int16[y+1]=l,this.int16[y+2]=f,t}}j.prototype.bytesPerElement=6,mt("StructArrayLayout3i6",j);class H extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f){const y=this.length;return this.resize(y+1),this.emplace(y,t,o,l,f)}emplace(t,o,l,f,y){const x=4*t;return this.int16[x+0]=o,this.int16[x+1]=l,this.int16[x+2]=f,this.int16[x+3]=y,t}}H.prototype.bytesPerElement=8,mt("StructArrayLayout4i8",H);class X extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x){const b=this.length;return this.resize(b+1),this.emplace(b,t,o,l,f,y,x)}emplace(t,o,l,f,y,x,b){const E=6*t;return this.int16[E+0]=o,this.int16[E+1]=l,this.int16[E+2]=f,this.int16[E+3]=y,this.int16[E+4]=x,this.int16[E+5]=b,t}}X.prototype.bytesPerElement=12,mt("StructArrayLayout2i4i12",X);class ne extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x){const b=this.length;return this.resize(b+1),this.emplace(b,t,o,l,f,y,x)}emplace(t,o,l,f,y,x,b){const E=4*t,C=8*t;return this.int16[E+0]=o,this.int16[E+1]=l,this.uint8[C+4]=f,this.uint8[C+5]=y,this.uint8[C+6]=x,this.uint8[C+7]=b,t}}ne.prototype.bytesPerElement=8,mt("StructArrayLayout2i4ub8",ne);class Y extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,o){const l=this.length;return this.resize(l+1),this.emplace(l,t,o)}emplace(t,o,l){const f=2*t;return this.float32[f+0]=o,this.float32[f+1]=l,t}}Y.prototype.bytesPerElement=8,mt("StructArrayLayout2f8",Y);class le extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x,b,E,C,L){const D=this.length;return this.resize(D+1),this.emplace(D,t,o,l,f,y,x,b,E,C,L)}emplace(t,o,l,f,y,x,b,E,C,L,D){const B=10*t;return this.uint16[B+0]=o,this.uint16[B+1]=l,this.uint16[B+2]=f,this.uint16[B+3]=y,this.uint16[B+4]=x,this.uint16[B+5]=b,this.uint16[B+6]=E,this.uint16[B+7]=C,this.uint16[B+8]=L,this.uint16[B+9]=D,t}}le.prototype.bytesPerElement=20,mt("StructArrayLayout10ui20",le);class me extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x,b,E,C,L,D,B){const V=this.length;return this.resize(V+1),this.emplace(V,t,o,l,f,y,x,b,E,C,L,D,B)}emplace(t,o,l,f,y,x,b,E,C,L,D,B,V){const $=12*t;return this.int16[$+0]=o,this.int16[$+1]=l,this.int16[$+2]=f,this.int16[$+3]=y,this.uint16[$+4]=x,this.uint16[$+5]=b,this.uint16[$+6]=E,this.uint16[$+7]=C,this.int16[$+8]=L,this.int16[$+9]=D,this.int16[$+10]=B,this.int16[$+11]=V,t}}me.prototype.bytesPerElement=24,mt("StructArrayLayout4i4ui4i24",me);class ie extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,o,l){const f=this.length;return this.resize(f+1),this.emplace(f,t,o,l)}emplace(t,o,l,f){const y=3*t;return this.float32[y+0]=o,this.float32[y+1]=l,this.float32[y+2]=f,t}}ie.prototype.bytesPerElement=12,mt("StructArrayLayout3f12",ie);class ve extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const o=this.length;return this.resize(o+1),this.emplace(o,t)}emplace(t,o){return this.uint32[1*t+0]=o,t}}ve.prototype.bytesPerElement=4,mt("StructArrayLayout1ul4",ve);class Te extends T{_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,o,l,f,y,x,b,E,C){const L=this.length;return this.resize(L+1),this.emplace(L,t,o,l,f,y,x,b,E,C)}emplace(t,o,l,f,y,x,b,E,C,L){const D=10*t,B=5*t;return this.int16[D+0]=o,this.int16[D+1]=l,this.int16[D+2]=f,this.int16[D+3]=y,this.int16[D+4]=x,this.int16[D+5]=b,this.uint32[B+3]=E,this.uint16[D+8]=C,this.uint16[D+9]=L,t}}Te.prototype.bytesPerElement=20,mt("StructArrayLayout6i1ul2ui20",Te);class Pe extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x){const b=this.length;return this.resize(b+1),this.emplace(b,t,o,l,f,y,x)}emplace(t,o,l,f,y,x,b){const E=6*t;return this.int16[E+0]=o,this.int16[E+1]=l,this.int16[E+2]=f,this.int16[E+3]=y,this.int16[E+4]=x,this.int16[E+5]=b,t}}Pe.prototype.bytesPerElement=12,mt("StructArrayLayout2i2i2i12",Pe);class Ve extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y){const x=this.length;return this.resize(x+1),this.emplace(x,t,o,l,f,y)}emplace(t,o,l,f,y,x){const b=4*t,E=8*t;return this.float32[b+0]=o,this.float32[b+1]=l,this.float32[b+2]=f,this.int16[E+6]=y,this.int16[E+7]=x,t}}Ve.prototype.bytesPerElement=16,mt("StructArrayLayout2f1f2i16",Ve);class Ke extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,o,l,f,y,x){const b=this.length;return this.resize(b+1),this.emplace(b,t,o,l,f,y,x)}emplace(t,o,l,f,y,x,b){const E=16*t,C=4*t,L=8*t;return this.uint8[E+0]=o,this.uint8[E+1]=l,this.float32[C+1]=f,this.float32[C+2]=y,this.int16[L+6]=x,this.int16[L+7]=b,t}}Ke.prototype.bytesPerElement=16,mt("StructArrayLayout2ub2f2i16",Ke);class ut extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,o,l){const f=this.length;return this.resize(f+1),this.emplace(f,t,o,l)}emplace(t,o,l,f){const y=3*t;return this.uint16[y+0]=o,this.uint16[y+1]=l,this.uint16[y+2]=f,t}}ut.prototype.bytesPerElement=6,mt("StructArrayLayout3ui6",ut);class ht extends T{_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,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe){const we=this.length;return this.resize(we+1),this.emplace(we,t,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe)}emplace(t,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe,we){const he=24*t,xe=12*t,ze=48*t;return this.int16[he+0]=o,this.int16[he+1]=l,this.uint16[he+2]=f,this.uint16[he+3]=y,this.uint32[xe+2]=x,this.uint32[xe+3]=b,this.uint32[xe+4]=E,this.uint16[he+10]=C,this.uint16[he+11]=L,this.uint16[he+12]=D,this.float32[xe+7]=B,this.float32[xe+8]=V,this.uint8[ze+36]=$,this.uint8[ze+37]=G,this.uint8[ze+38]=Q,this.uint32[xe+10]=oe,this.int16[he+22]=we,t}}ht.prototype.bytesPerElement=48,mt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ht);class Je extends T{_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,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe,we,he,xe,ze,qe,st,Tt,lt,ot,xt,gt){const ft=this.length;return this.resize(ft+1),this.emplace(ft,t,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe,we,he,xe,ze,qe,st,Tt,lt,ot,xt,gt)}emplace(t,o,l,f,y,x,b,E,C,L,D,B,V,$,G,Q,oe,we,he,xe,ze,qe,st,Tt,lt,ot,xt,gt,ft){const Fe=32*t,wt=16*t;return this.int16[Fe+0]=o,this.int16[Fe+1]=l,this.int16[Fe+2]=f,this.int16[Fe+3]=y,this.int16[Fe+4]=x,this.int16[Fe+5]=b,this.int16[Fe+6]=E,this.int16[Fe+7]=C,this.uint16[Fe+8]=L,this.uint16[Fe+9]=D,this.uint16[Fe+10]=B,this.uint16[Fe+11]=V,this.uint16[Fe+12]=$,this.uint16[Fe+13]=G,this.uint16[Fe+14]=Q,this.uint16[Fe+15]=oe,this.uint16[Fe+16]=we,this.uint16[Fe+17]=he,this.uint16[Fe+18]=xe,this.uint16[Fe+19]=ze,this.uint16[Fe+20]=qe,this.uint16[Fe+21]=st,this.uint16[Fe+22]=Tt,this.uint32[wt+12]=lt,this.float32[wt+13]=ot,this.float32[wt+14]=xt,this.uint16[Fe+30]=gt,this.uint16[Fe+31]=ft,t}}Je.prototype.bytesPerElement=64,mt("StructArrayLayout8i15ui1ul2f2ui64",Je);class et extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const o=this.length;return this.resize(o+1),this.emplace(o,t)}emplace(t,o){return this.float32[1*t+0]=o,t}}et.prototype.bytesPerElement=4,mt("StructArrayLayout1f4",et);class yt extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,o,l){const f=this.length;return this.resize(f+1),this.emplace(f,t,o,l)}emplace(t,o,l,f){const y=3*t;return this.uint16[6*t+0]=o,this.float32[y+1]=l,this.float32[y+2]=f,t}}yt.prototype.bytesPerElement=12,mt("StructArrayLayout1ui2f12",yt);class Rt extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,o,l){const f=this.length;return this.resize(f+1),this.emplace(f,t,o,l)}emplace(t,o,l,f){const y=4*t;return this.uint32[2*t+0]=o,this.uint16[y+2]=l,this.uint16[y+3]=f,t}}Rt.prototype.bytesPerElement=8,mt("StructArrayLayout1ul2ui8",Rt);class it extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,o){const l=this.length;return this.resize(l+1),this.emplace(l,t,o)}emplace(t,o,l){const f=2*t;return this.uint16[f+0]=o,this.uint16[f+1]=l,t}}it.prototype.bytesPerElement=4,mt("StructArrayLayout2ui4",it);class at extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const o=this.length;return this.resize(o+1),this.emplace(o,t)}emplace(t,o){return this.uint16[1*t+0]=o,t}}at.prototype.bytesPerElement=2,mt("StructArrayLayout1ui2",at);class kt extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,o,l,f){const y=this.length;return this.resize(y+1),this.emplace(y,t,o,l,f)}emplace(t,o,l,f,y){const x=4*t;return this.float32[x+0]=o,this.float32[x+1]=l,this.float32[x+2]=f,this.float32[x+3]=y,t}}kt.prototype.bytesPerElement=16,mt("StructArrayLayout4f16",kt);class Ti extends S{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 A(this.anchorPointX,this.anchorPointY)}}Ti.prototype.size=20;class Wt extends Te{get(t){return new Ti(this,t)}}mt("CollisionBoxArray",Wt);class Yt extends S{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]}}Yt.prototype.size=48;class Ci extends ht{get(t){return new Yt(this,t)}}mt("PlacedSymbolArray",Ci);class Tr extends S{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]}}Tr.prototype.size=64;class In extends Je{get(t){return new Tr(this,t)}}mt("SymbolInstanceArray",In);class Ai extends et{getoffsetX(t){return this.float32[1*t+0]}}mt("GlyphOffsetArray",Ai);class Jr extends j{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}mt("SymbolLineVertexArray",Jr);class Vr extends S{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]}}Vr.prototype.size=12;class Cr extends yt{get(t){return new Vr(this,t)}}mt("TextAnchorOffsetArray",Cr);class Ar extends S{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]}}Ar.prototype.size=8;class Tn extends Rt{get(t){return new Ar(this,t)}}mt("FeatureIndexArray",Tn);class Jo extends R{}class Pl extends R{}class As extends R{}class Yo extends X{}class zl extends ne{}class cu extends Y{}class _r extends le{}class Cn extends me{}class Eo extends ie{}class Ms extends ve{}class Mr extends Pe{}class kr extends Ke{}class dr extends ut{}class Bi extends it{}const ks=P([{name:"a_pos",components:2,type:"Int16"}],4),{members:uu}=ks;class sr{constructor(t=[]){this.segments=t}prepareSegment(t,o,l,f){let y=this.segments[this.segments.length-1];return t>sr.MAX_VERTEX_ARRAY_LENGTH&&De(`Max vertices per segment is ${sr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}`),(!y||y.vertexLength+t>sr.MAX_VERTEX_ARRAY_LENGTH||y.sortKey!==f)&&(y={vertexOffset:o.length,primitiveOffset:l.length,vertexLength:0,primitiveLength:0},f!==void 0&&(y.sortKey=f),this.segments.push(y)),y}get(){return this.segments}destroy(){for(const t of this.segments)for(const o in t.vaos)t.vaos[o].destroy()}static simpleSegment(t,o,l,f){return new sr([{vertexOffset:t,primitiveOffset:o,vertexLength:l,primitiveLength:f,vaos:{},sortKey:0}])}}function Qh(r,t){return 256*(r=W(Math.floor(r),0,255))+W(Math.floor(t),0,255)}sr.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,mt("SegmentVector",sr);const Dl=P([{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 Rl={exports:{}},So={exports:{}};So.exports=function(r,t){var o,l,f,y,x,b,E,C;for(l=r.length-(o=3&r.length),f=t,x=3432918353,b=461845907,C=0;C>>16)*x&65535)<<16)&4294967295)<<15|E>>>17))*b+(((E>>>16)*b&65535)<<16)&4294967295)<<13|f>>>19))+((5*(f>>>16)&65535)<<16)&4294967295))+((58964+(y>>>16)&65535)<<16);switch(E=0,o){case 3:E^=(255&r.charCodeAt(C+2))<<16;case 2:E^=(255&r.charCodeAt(C+1))<<8;case 1:f^=E=(65535&(E=(E=(65535&(E^=255&r.charCodeAt(C)))*x+(((E>>>16)*x&65535)<<16)&4294967295)<<15|E>>>17))*b+(((E>>>16)*b&65535)<<16)&4294967295}return f^=r.length,f=2246822507*(65535&(f^=f>>>16))+((2246822507*(f>>>16)&65535)<<16)&4294967295,f=3266489909*(65535&(f^=f>>>13))+((3266489909*(f>>>16)&65535)<<16)&4294967295,(f^=f>>>16)>>>0};var ed=So.exports,hu={exports:{}};hu.exports=function(r,t){for(var o,l=r.length,f=t^l,y=0;l>=4;)o=1540483477*(65535&(o=255&r.charCodeAt(y)|(255&r.charCodeAt(++y))<<8|(255&r.charCodeAt(++y))<<16|(255&r.charCodeAt(++y))<<24))+((1540483477*(o>>>16)&65535)<<16),f=1540483477*(65535&f)+((1540483477*(f>>>16)&65535)<<16)^(o=1540483477*(65535&(o^=o>>>24))+((1540483477*(o>>>16)&65535)<<16)),l-=4,++y;switch(l){case 3:f^=(255&r.charCodeAt(y+2))<<16;case 2:f^=(255&r.charCodeAt(y+1))<<8;case 1:f=1540483477*(65535&(f^=255&r.charCodeAt(y)))+((1540483477*(f>>>16)&65535)<<16)}return f=1540483477*(65535&(f^=f>>>13))+((1540483477*(f>>>16)&65535)<<16),(f^=f>>>15)>>>0};var du=ed,fu=hu.exports;Rl.exports=du,Rl.exports.murmur3=du,Rl.exports.murmur2=fu;var Ol=I(Rl.exports);class Ls{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,o,l,f){this.ids.push(_y(t)),this.positions.push(o,l,f)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const o=_y(t);let l=0,f=this.ids.length-1;for(;l>1;this.ids[x]>=o?f=x:l=x+1}const y=[];for(;this.ids[l]===o;)y.push({index:this.positions[3*l],start:this.positions[3*l+1],end:this.positions[3*l+2]}),l++;return y}static serialize(t,o){const l=new Float64Array(t.ids),f=new Uint32Array(t.positions);return cp(l,f,0,l.length-1),o&&o.push(l.buffer,f.buffer),{ids:l,positions:f}}static deserialize(t){const o=new Ls;return o.ids=t.ids,o.positions=t.positions,o.indexed=!0,o}}function _y(r){const t=+r;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:Ol(String(r))}function cp(r,t,o,l){for(;o>1];let y=o-1,x=l+1;for(;;){do y++;while(r[y]f);if(y>=x)break;td(r,y,x),td(t,3*y,3*x),td(t,3*y+1,3*x+1),td(t,3*y+2,3*x+2)}x-o`u_${f}`),this.type=l}setUniform(t,o,l){t.set(l.constantOr(this.value))}getBinding(t,o,l){return this.type==="color"?new xy(t,o):new id(t,o)}}class Bl{constructor(t,o){this.uniformNames=o.map(l=>`u_${l}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,o){this.pixelRatioFrom=o.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=o.tlbr,this.patternTo=t.tlbr}setUniform(t,o,l,f){const y=f==="u_pattern_to"?this.patternTo:f==="u_pattern_from"?this.patternFrom:f==="u_pixel_ratio_to"?this.pixelRatioTo:f==="u_pixel_ratio_from"?this.pixelRatioFrom:null;y&&t.set(y)}getBinding(t,o,l){return l.substr(0,9)==="u_pattern"?new vy(t,o):new id(t,o)}}class Qo{constructor(t,o,l,f){this.expression=t,this.type=l,this.maxValue=0,this.paintVertexAttributes=o.map(y=>({name:`a_${y}`,type:"Float32",components:l==="color"?2:1,offset:0})),this.paintVertexArray=new f}populatePaintArray(t,o,l,f,y){const x=this.paintVertexArray.length,b=this.expression.evaluate(new xi(0),o,{},f,[],y);this.paintVertexArray.resize(t),this._setPaintValue(x,t,b)}updatePaintArray(t,o,l,f){const y=this.expression.evaluate({zoom:0},l,f);this._setPaintValue(t,o,y)}_setPaintValue(t,o,l){if(this.type==="color"){const f=up(l);for(let y=t;y`u_${b}_t`),this.type=l,this.useIntegerZoom=f,this.zoom=y,this.maxValue=0,this.paintVertexAttributes=o.map(b=>({name:`a_${b}`,type:"Float32",components:l==="color"?4:2,offset:0})),this.paintVertexArray=new x}populatePaintArray(t,o,l,f,y){const x=this.expression.evaluate(new xi(this.zoom),o,{},f,[],y),b=this.expression.evaluate(new xi(this.zoom+1),o,{},f,[],y),E=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(E,t,x,b)}updatePaintArray(t,o,l,f){const y=this.expression.evaluate({zoom:this.zoom},l,f),x=this.expression.evaluate({zoom:this.zoom+1},l,f);this._setPaintValue(t,o,y,x)}_setPaintValue(t,o,l,f){if(this.type==="color"){const y=up(l),x=up(f);for(let b=t;b`#define HAS_UNIFORM_${f}`))}return t}getBinderAttributes(){const t=[];for(const o in this.binders){const l=this.binders[o];if(l instanceof Qo||l instanceof ao)for(let f=0;f!0){this.programConfigurations={};for(const f of t)this.programConfigurations[f.id]=new by(f,o,l);this.needsUpload=!1,this._featureMap=new Ls,this._bufferOffset=0}populatePaintArrays(t,o,l,f,y,x){for(const b in this.programConfigurations)this.programConfigurations[b].populatePaintArrays(t,o,f,y,x);o.id!==void 0&&this._featureMap.add(o.id,l,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,o,l,f){for(const y of l)this.needsUpload=this.programConfigurations[y.id].updatePaintArrays(t,this._featureMap,o,y,f)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const o in this.programConfigurations)this.programConfigurations[o].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}function kw(r,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-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"]}[r]||[r.replace(`${t}-`,"").replace(/-/g,"_")]}function wy(r,t,o){const l={color:{source:Y,composite:kt},number:{source:et,composite:Y}},f=function(y){return{"line-pattern":{source:_r,composite:_r},"fill-pattern":{source:_r,composite:_r},"fill-extrusion-pattern":{source:_r,composite:_r}}[y]}(r);return f&&f[o]||l[t][o]}mt("ConstantBinder",pu),mt("CrossFadedConstantBinder",Bl),mt("SourceExpressionBinder",Qo),mt("CrossFadedCompositeBinder",Ps),mt("CompositeExpressionBinder",ao),mt("ProgramConfiguration",by,{omit:["_buffers"]}),mt("ProgramConfigurationSet",Ca);const Qi=8192,hp=Math.pow(2,14)-1,Ey=-hp-1;function Aa(r){const t=Qi/r.extent,o=r.loadGeometry();for(let l=0;lx.x+1||Ex.y+1)&&De("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return o}function Ma(r,t){return{type:r.type,id:r.id,properties:r.properties,geometry:t?Aa(r):[]}}function rd(r,t,o,l,f){r.emplaceBack(2*t+(l+1)/2,2*o+(f+1)/2)}class dp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(o=>o.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Pl,this.indexArray=new dr,this.segments=new sr,this.programConfigurations=new Ca(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(t,o,l){const f=this.layers[0],y=[];let x=null,b=!1;f.type==="circle"&&(x=f.layout.get("circle-sort-key"),b=!x.isConstant());for(const{feature:E,id:C,index:L,sourceLayerIndex:D}of t){const B=this.layers[0]._featureFilter.needGeometry,V=Ma(E,B);if(!this.layers[0]._featureFilter.filter(new xi(this.zoom),V,l))continue;const $=b?x.evaluate(V,{},l):void 0,G={id:C,properties:E.properties,type:E.type,sourceLayerIndex:D,index:L,geometry:B?V.geometry:Aa(E),patterns:{},sortKey:$};y.push(G)}b&&y.sort((E,C)=>E.sortKey-C.sortKey);for(const E of y){const{geometry:C,index:L,sourceLayerIndex:D}=E,B=t[L].feature;this.addFeature(E,C,L,l),o.featureIndex.insert(B,C,L,D,this.index)}}update(t,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,o,this.stateDependentLayers,l)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,uu),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,o,l,f){for(const y of o)for(const x of y){const b=x.x,E=x.y;if(b<0||b>=Qi||E<0||E>=Qi)continue;const C=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),L=C.vertexLength;rd(this.layoutVertexArray,b,E,-1,-1),rd(this.layoutVertexArray,b,E,1,-1),rd(this.layoutVertexArray,b,E,1,1),rd(this.layoutVertexArray,b,E,-1,1),this.indexArray.emplaceBack(L,L+1,L+2),this.indexArray.emplaceBack(L,L+3,L+2),C.vertexLength+=4,C.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,{},f)}}function Sy(r,t){for(let o=0;o1){if(fp(r,t))return!0;for(let l=0;l1?o:o.sub(t)._mult(f)._add(t))}function Cy(r,t){let o,l,f,y=!1;for(let x=0;xt.y!=f.y>t.y&&t.x<(f.x-l.x)*(t.y-l.y)/(f.y-l.y)+l.x&&(y=!y)}return y}function Fl(r,t){let o=!1;for(let l=0,f=r.length-1;lt.y!=x.y>t.y&&t.x<(x.x-y.x)*(t.y-y.y)/(x.y-y.y)+y.x&&(o=!o)}return o}function Dw(r,t,o){const l=o[0],f=o[2];if(r.xf.x&&t.x>f.x||r.yf.y&&t.y>f.y)return!1;const y=Ge(r,t,o[0]);return y!==Ge(r,t,o[1])||y!==Ge(r,t,o[2])||y!==Ge(r,t,o[3])}function mu(r,t,o){const l=t.paint.get(r).value;return l.kind==="constant"?l.value:o.programConfigurations.get(t.id).getMaxValue(r)}function nd(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function od(r,t,o,l,f){if(!t[0]&&!t[1])return r;const y=A.convert(t)._mult(f);o==="viewport"&&y._rotate(-l);const x=[];for(let b=0;bLy(Q,G))}(C,E),V=D?L*b:L;for(const $ of f)for(const G of $){const Q=D?G:Ly(G,E);let oe=V;const we=sd([],[G.x,G.y,0,1],E);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?oe*=we[3]/x.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(oe*=x.cameraToCenterDistance/we[3]),Lw(B,Q,oe))return!0}return!1}}function Ly(r,t){const o=sd([],[r.x,r.y,0,1],t);return new A(o[0]/o[3],o[1]/o[3])}class Py extends dp{}let zy;mt("HeatmapBucket",Py,{omit:["layers"]});var Fw={get paint(){return zy=zy||new d({"heatmap-radius":new Ct(ae.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ct(ae.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new bt(ae.paint_heatmap["heatmap-intensity"]),"heatmap-color":new a(ae.paint_heatmap["heatmap-color"]),"heatmap-opacity":new bt(ae.paint_heatmap["heatmap-opacity"])})}};function gp(r,{width:t,height:o},l,f){if(f){if(f instanceof Uint8ClampedArray)f=new Uint8Array(f.buffer);else if(f.length!==t*o*l)throw new RangeError(`mismatched image size. expected: ${f.length} but got: ${t*o*l}`)}else f=new Uint8Array(t*o*l);return r.width=t,r.height=o,r.data=f,r}function Dy(r,{width:t,height:o},l){if(t===r.width&&o===r.height)return;const f=gp({},{width:t,height:o},l);yp(r,f,{x:0,y:0},{x:0,y:0},{width:Math.min(r.width,t),height:Math.min(r.height,o)},l),r.width=t,r.height=o,r.data=f.data}function yp(r,t,o,l,f,y){if(f.width===0||f.height===0)return t;if(f.width>r.width||f.height>r.height||o.x>r.width-f.width||o.y>r.height-f.height)throw new RangeError("out of range source coordinates for image copy");if(f.width>t.width||f.height>t.height||l.x>t.width-f.width||l.y>t.height-f.height)throw new RangeError("out of range destination coordinates for image copy");const x=r.data,b=t.data;if(x===b)throw new Error("srcData equals dstData, so image is already copied");for(let E=0;E{t[r.evaluationKey]=E;const C=r.expression.evaluate(t);f.data[x+b+0]=Math.floor(255*C.r/C.a),f.data[x+b+1]=Math.floor(255*C.g/C.a),f.data[x+b+2]=Math.floor(255*C.b/C.a),f.data[x+b+3]=Math.floor(255*C.a)};if(r.clips)for(let x=0,b=0;x80*o){l=y=r[0],f=x=r[1];for(var $=o;$y&&(y=b),E>x&&(x=E);C=(C=Math.max(y-l,x-f))!==0?32767/C:0}return _u(B,V,o,l,f,C,0),V}function By(r,t,o,l,f){var y,x;if(f===bp(r,t,o,l)>0)for(y=t;y=t;y-=l)x=Ny(y,r[y],r[y+1],x);return x&&ld(x,x.next)&&(xu(x),x=x.next),x}function ka(r,t){if(!r)return r;t||(t=r);var o,l=r;do if(o=!1,l.steiner||!ld(l,l.next)&&Ki(l.prev,l,l.next)!==0)l=l.next;else{if(xu(l),(l=t=l.prev)===l.next)break;o=!0}while(o||l!==t);return t}function _u(r,t,o,l,f,y,x){if(r){!x&&y&&function(L,D,B,V){var $=L;do $.z===0&&($.z=vp($.x,$.y,D,B,V)),$.prevZ=$.prev,$.nextZ=$.next,$=$.next;while($!==L);$.prevZ.nextZ=null,$.prevZ=null,function(G){var Q,oe,we,he,xe,ze,qe,st,Tt=1;do{for(oe=G,G=null,xe=null,ze=0;oe;){for(ze++,we=oe,qe=0,Q=0;Q0||st>0&&we;)qe!==0&&(st===0||!we||oe.z<=we.z)?(he=oe,oe=oe.nextZ,qe--):(he=we,we=we.nextZ,st--),xe?xe.nextZ=he:G=he,he.prevZ=xe,xe=he;oe=we}xe.nextZ=null,Tt*=2}while(ze>1)}($)}(r,l,f,y);for(var b,E,C=r;r.prev!==r.next;)if(b=r.prev,E=r.next,y?Hw(r,l,f,y):qw(r))t.push(b.i/o|0),t.push(r.i/o|0),t.push(E.i/o|0),xu(r),r=E.next,C=E.next;else if((r=E)===C){x?x===1?_u(r=Gw(ka(r),t,o),t,o,l,f,y,2):x===2&&Ww(r,t,o,l,f,y):_u(ka(r),t,o,l,f,y,1);break}}}function qw(r){var t=r.prev,o=r,l=r.next;if(Ki(t,o,l)>=0)return!1;for(var f=t.x,y=o.x,x=l.x,b=t.y,E=o.y,C=l.y,L=fy?f>x?f:x:y>x?y:x,V=b>E?b>C?b:C:E>C?E:C,$=l.next;$!==t;){if($.x>=L&&$.x<=B&&$.y>=D&&$.y<=V&&Nl(f,b,y,E,x,C,$.x,$.y)&&Ki($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function Hw(r,t,o,l){var f=r.prev,y=r,x=r.next;if(Ki(f,y,x)>=0)return!1;for(var b=f.x,E=y.x,C=x.x,L=f.y,D=y.y,B=x.y,V=bE?b>C?b:C:E>C?E:C,Q=L>D?L>B?L:B:D>B?D:B,oe=vp(V,$,t,o,l),we=vp(G,Q,t,o,l),he=r.prevZ,xe=r.nextZ;he&&he.z>=oe&&xe&&xe.z<=we;){if(he.x>=V&&he.x<=G&&he.y>=$&&he.y<=Q&&he!==f&&he!==x&&Nl(b,L,E,D,C,B,he.x,he.y)&&Ki(he.prev,he,he.next)>=0||(he=he.prevZ,xe.x>=V&&xe.x<=G&&xe.y>=$&&xe.y<=Q&&xe!==f&&xe!==x&&Nl(b,L,E,D,C,B,xe.x,xe.y)&&Ki(xe.prev,xe,xe.next)>=0))return!1;xe=xe.nextZ}for(;he&&he.z>=oe;){if(he.x>=V&&he.x<=G&&he.y>=$&&he.y<=Q&&he!==f&&he!==x&&Nl(b,L,E,D,C,B,he.x,he.y)&&Ki(he.prev,he,he.next)>=0)return!1;he=he.prevZ}for(;xe&&xe.z<=we;){if(xe.x>=V&&xe.x<=G&&xe.y>=$&&xe.y<=Q&&xe!==f&&xe!==x&&Nl(b,L,E,D,C,B,xe.x,xe.y)&&Ki(xe.prev,xe,xe.next)>=0)return!1;xe=xe.nextZ}return!0}function Gw(r,t,o){var l=r;do{var f=l.prev,y=l.next.next;!ld(f,y)&&Fy(f,l,l.next,y)&&vu(f,y)&&vu(y,f)&&(t.push(f.i/o|0),t.push(l.i/o|0),t.push(y.i/o|0),xu(l),xu(l.next),l=r=y),l=l.next}while(l!==r);return ka(l)}function Ww(r,t,o,l,f,y){var x=r;do{for(var b=x.next.next;b!==x.prev;){if(x.i!==b.i&&Yw(x,b)){var E=Vy(x,b);return x=ka(x,x.next),E=ka(E,E.next),_u(x,t,o,l,f,y,0),void _u(E,t,o,l,f,y,0)}b=b.next}x=x.next}while(x!==r)}function Zw(r,t){return r.x-t.x}function Xw(r,t){var o=function(f,y){var x,b=y,E=f.x,C=f.y,L=-1/0;do{if(C<=b.y&&C>=b.next.y&&b.next.y!==b.y){var D=b.x+(C-b.y)*(b.next.x-b.x)/(b.next.y-b.y);if(D<=E&&D>L&&(L=D,x=b.x=b.x&&b.x>=$&&E!==b.x&&Nl(Cx.x||b.x===x.x&&Kw(x,b)))&&(x=b,Q=B)),b=b.next;while(b!==V);return x}(r,t);if(!o)return t;var l=Vy(o,r);return ka(l,l.next),ka(o,o.next)}function Kw(r,t){return Ki(r.prev,r,t.prev)<0&&Ki(t.next,r,r.next)<0}function vp(r,t,o,l,f){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=(r-o)*f|0)|r<<8))|r<<4))|r<<2))|r<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-l)*f|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Jw(r){var t=r,o=r;do(t.x=(r-x)*(y-b)&&(r-x)*(l-b)>=(o-x)*(t-b)&&(o-x)*(y-b)>=(f-x)*(l-b)}function Yw(r,t){return r.next.i!==t.i&&r.prev.i!==t.i&&!function(o,l){var f=o;do{if(f.i!==o.i&&f.next.i!==o.i&&f.i!==l.i&&f.next.i!==l.i&&Fy(f,f.next,o,l))return!0;f=f.next}while(f!==o);return!1}(r,t)&&(vu(r,t)&&vu(t,r)&&function(o,l){var f=o,y=!1,x=(o.x+l.x)/2,b=(o.y+l.y)/2;do f.y>b!=f.next.y>b&&f.next.y!==f.y&&x<(f.next.x-f.x)*(b-f.y)/(f.next.y-f.y)+f.x&&(y=!y),f=f.next;while(f!==o);return y}(r,t)&&(Ki(r.prev,r,t.prev)||Ki(r,t.prev,t))||ld(r,t)&&Ki(r.prev,r,r.next)>0&&Ki(t.prev,t,t.next)>0)}function Ki(r,t,o){return(t.y-r.y)*(o.x-t.x)-(t.x-r.x)*(o.y-t.y)}function ld(r,t){return r.x===t.x&&r.y===t.y}function Fy(r,t,o,l){var f=ud(Ki(r,t,o)),y=ud(Ki(r,t,l)),x=ud(Ki(o,l,r)),b=ud(Ki(o,l,t));return f!==y&&x!==b||!(f!==0||!cd(r,o,t))||!(y!==0||!cd(r,l,t))||!(x!==0||!cd(o,r,l))||!(b!==0||!cd(o,t,l))}function cd(r,t,o){return t.x<=Math.max(r.x,o.x)&&t.x>=Math.min(r.x,o.x)&&t.y<=Math.max(r.y,o.y)&&t.y>=Math.min(r.y,o.y)}function ud(r){return r>0?1:r<0?-1:0}function vu(r,t){return Ki(r.prev,r,r.next)<0?Ki(r,t,r.next)>=0&&Ki(r,r.prev,t)>=0:Ki(r,t,r.prev)<0||Ki(r,r.next,t)<0}function Vy(r,t){var o=new xp(r.i,r.x,r.y),l=new xp(t.i,t.x,t.y),f=r.next,y=t.prev;return r.next=t,t.prev=r,o.next=f,f.prev=o,l.next=o,o.prev=l,y.next=l,l.prev=y,l}function Ny(r,t,o,l){var f=new xp(r,t,o);return l?(f.next=l.next,f.prev=l,l.next.prev=f,l.next=f):(f.prev=f,f.next=f),f}function xu(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function xp(r,t,o){this.i=r,this.x=t,this.y=o,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function bp(r,t,o,l){for(var f=0,y=t,x=o-l;y0&&o.holes.push(l+=r[f-1].length)}return o};var jy=I(_p.exports);function wp(r,t,o){const l=o.patternDependencies;let f=!1;for(const y of t){const x=y.paint.get(`${r}-pattern`);x.isConstant()||(f=!0);const b=x.constantOr(null);b&&(f=!0,l[b.to]=!0,l[b.from]=!0)}return f}function Ep(r,t,o,l,f){const y=f.patternDependencies;for(const x of t){const b=x.paint.get(`${r}-pattern`).value;if(b.kind!=="constant"){let E=b.evaluate({zoom:l-1},o,{},f.availableImages),C=b.evaluate({zoom:l},o,{},f.availableImages),L=b.evaluate({zoom:l+1},o,{},f.availableImages);E=E&&E.name?E.name:E,C=C&&C.name?C.name:C,L=L&&L.name?L.name:L,y[E]=!0,y[C]=!0,y[L]=!0,o.patterns[x.id]={min:E,mid:C,max:L}}}return o}class Sp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(o=>o.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new As,this.indexArray=new dr,this.indexArray2=new Bi,this.programConfigurations=new Ca(t.layers,t.zoom),this.segments=new sr,this.segments2=new sr,this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(t,o,l){this.hasPattern=wp("fill",this.layers,o);const f=this.layers[0].layout.get("fill-sort-key"),y=!f.isConstant(),x=[];for(const{feature:b,id:E,index:C,sourceLayerIndex:L}of t){const D=this.layers[0]._featureFilter.needGeometry,B=Ma(b,D);if(!this.layers[0]._featureFilter.filter(new xi(this.zoom),B,l))continue;const V=y?f.evaluate(B,{},l,o.availableImages):void 0,$={id:E,properties:b.properties,type:b.type,sourceLayerIndex:L,index:C,geometry:D?B.geometry:Aa(b),patterns:{},sortKey:V};x.push($)}y&&x.sort((b,E)=>b.sortKey-E.sortKey);for(const b of x){const{geometry:E,index:C,sourceLayerIndex:L}=b;if(this.hasPattern){const D=Ep("fill",this.layers,b,this.zoom,o);this.patternFeatures.push(D)}else this.addFeature(b,E,C,l,{});o.featureIndex.insert(t[C].feature,E,C,L,this.index)}}update(t,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,o,this.stateDependentLayers,l)}addFeatures(t,o,l){for(const f of this.patternFeatures)this.addFeature(f,f.geometry,f.index,o,l)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Uw),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,o,l,f,y){for(const x of ul(o,500)){let b=0;for(const V of x)b+=V.length;const E=this.segments.prepareSegment(b,this.layoutVertexArray,this.indexArray),C=E.vertexLength,L=[],D=[];for(const V of x){if(V.length===0)continue;V!==x[0]&&D.push(L.length/2);const $=this.segments2.prepareSegment(V.length,this.layoutVertexArray,this.indexArray2),G=$.vertexLength;this.layoutVertexArray.emplaceBack(V[0].x,V[0].y),this.indexArray2.emplaceBack(G+V.length-1,G),L.push(V[0].x),L.push(V[0].y);for(let Q=1;Q>3}if(f--,l===1||l===2)y+=r.readSVarint(),x+=r.readSVarint(),l===1&&(t&&b.push(t),t=[]),t.push(new n2(y,x));else{if(l!==7)throw new Error("unknown command "+l);t&&t.push(t[0].clone())}}return t&&b.push(t),b},jl.prototype.bbox=function(){var r=this._pbf;r.pos=this._geometry;for(var t=r.readVarint()+r.pos,o=1,l=0,f=0,y=0,x=1/0,b=-1/0,E=1/0,C=-1/0;r.pos>3}if(l--,o===1||o===2)(f+=r.readSVarint())b&&(b=f),(y+=r.readSVarint())C&&(C=y);else if(o!==7)throw new Error("unknown command "+o)}return[x,E,b,C]},jl.prototype.toGeoJSON=function(r,t,o){var l,f,y=this.extent*Math.pow(2,o),x=this.extent*r,b=this.extent*t,E=this.loadGeometry(),C=jl.types[this.type];function L(V){for(var $=0;$>3;f=x===1?l.readString():x===2?l.readFloat():x===3?l.readDouble():x===4?l.readVarint64():x===5?l.readVarint():x===6?l.readSVarint():x===7?l.readBoolean():null}return f}(o))}Gy.prototype.feature=function(r){if(r<0||r>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[r];var t=this._pbf.readVarint()+this._pbf.pos;return new a2(this._pbf,t,this.extent,this._keys,this._values)};var c2=Hy;function u2(r,t,o){if(r===3){var l=new c2(o,o.readVarint()+o.pos);l.length&&(t[l.name]=l)}}zs.VectorTile=function(r,t){this.layers=r.readFields(u2,{},t)},zs.VectorTileFeature=qy,zs.VectorTileLayer=Hy;const h2=zs.VectorTileFeature.types,Ip=Math.pow(2,13);function bu(r,t,o,l,f,y,x,b){r.emplaceBack(t,o,2*Math.floor(l*Ip)+x,f*Ip*2,y*Ip*2,Math.round(b))}class Tp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(o=>o.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Yo,this.centroidVertexArray=new Jo,this.indexArray=new dr,this.programConfigurations=new Ca(t.layers,t.zoom),this.segments=new sr,this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(t,o,l){this.features=[],this.hasPattern=wp("fill-extrusion",this.layers,o);for(const{feature:f,id:y,index:x,sourceLayerIndex:b}of t){const E=this.layers[0]._featureFilter.needGeometry,C=Ma(f,E);if(!this.layers[0]._featureFilter.filter(new xi(this.zoom),C,l))continue;const L={id:y,sourceLayerIndex:b,index:x,geometry:E?C.geometry:Aa(f),properties:f.properties,type:f.type,patterns:{}};this.hasPattern?this.features.push(Ep("fill-extrusion",this.layers,L,this.zoom,o)):this.addFeature(L,L.geometry,x,l,{}),o.featureIndex.insert(f,L.geometry,x,b,this.index,!0)}}addFeatures(t,o,l){for(const f of this.features){const{geometry:y}=f;this.addFeature(f,y,f.index,o,l)}}update(t,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,o,this.stateDependentLayers,l)}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,r2),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,i2.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,o,l,f,y){for(const x of ul(o,500)){const b={x:0,y:0,vertexCount:0};let E=0;for(const $ of x)E+=$.length;let C=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const $ of x){if($.length===0||f2($))continue;let G=0;for(let Q=0;Q<$.length;Q++){const oe=$[Q];if(Q>=1){const we=$[Q-1];if(!d2(oe,we)){C.vertexLength+4>sr.MAX_VERTEX_ARRAY_LENGTH&&(C=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const he=oe.sub(we)._perp()._unit(),xe=we.dist(oe);G+xe>32768&&(G=0),bu(this.layoutVertexArray,oe.x,oe.y,he.x,he.y,0,0,G),bu(this.layoutVertexArray,oe.x,oe.y,he.x,he.y,0,1,G),b.x+=2*oe.x,b.y+=2*oe.y,b.vertexCount+=2,G+=xe,bu(this.layoutVertexArray,we.x,we.y,he.x,he.y,0,0,G),bu(this.layoutVertexArray,we.x,we.y,he.x,he.y,0,1,G),b.x+=2*we.x,b.y+=2*we.y,b.vertexCount+=2;const ze=C.vertexLength;this.indexArray.emplaceBack(ze,ze+2,ze+1),this.indexArray.emplaceBack(ze+1,ze+2,ze+3),C.vertexLength+=4,C.primitiveLength+=2}}}}if(C.vertexLength+E>sr.MAX_VERTEX_ARRAY_LENGTH&&(C=this.segments.prepareSegment(E,this.layoutVertexArray,this.indexArray)),h2[t.type]!=="Polygon")continue;const L=[],D=[],B=C.vertexLength;for(const $ of x)if($.length!==0){$!==x[0]&&D.push(L.length/2);for(let G=0;G<$.length;G++){const Q=$[G];bu(this.layoutVertexArray,Q.x,Q.y,0,0,1,1,0),b.x+=Q.x,b.y+=Q.y,b.vertexCount+=1,L.push(Q.x),L.push(Q.y)}}const V=jy(L,D);for(let $=0;$Qi)||r.y===t.y&&(r.y<0||r.y>Qi)}function f2(r){return r.every(t=>t.x<0)||r.every(t=>t.x>Qi)||r.every(t=>t.y<0)||r.every(t=>t.y>Qi)}let Wy;mt("FillExtrusionBucket",Tp,{omit:["layers","features"]});var p2={get paint(){return Wy=Wy||new d({"fill-extrusion-opacity":new bt(ae["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ct(ae["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new bt(ae["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new bt(ae["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new _(ae["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ct(ae["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ct(ae["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new bt(ae["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class m2 extends v{constructor(t){super(t,p2)}createBucket(t){return new Tp(t)}queryRadius(){return nd(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(t,o,l,f,y,x,b,E){const C=od(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),x.angle,b),L=this.paint.get("fill-extrusion-height").evaluate(o,l),D=this.paint.get("fill-extrusion-base").evaluate(o,l),B=function($,G,Q,oe){const we=[];for(const he of $){const xe=[he.x,he.y,0,1];sd(xe,xe,G),we.push(new A(xe[0]/xe[3],xe[1]/xe[3]))}return we}(C,E),V=function($,G,Q,oe){const we=[],he=[],xe=oe[8]*G,ze=oe[9]*G,qe=oe[10]*G,st=oe[11]*G,Tt=oe[8]*Q,lt=oe[9]*Q,ot=oe[10]*Q,xt=oe[11]*Q;for(const gt of $){const ft=[],Fe=[];for(const wt of gt){const _t=wt.x,Pt=wt.y,_i=oe[0]*_t+oe[4]*Pt+oe[12],mi=oe[1]*_t+oe[5]*Pt+oe[13],fr=oe[2]*_t+oe[6]*Pt+oe[14],Un=oe[3]*_t+oe[7]*Pt+oe[15],Pr=fr+qe,Gi=Un+st,Qr=_i+Tt,en=mi+lt,tn=fr+ot,Wi=Un+xt,pr=new A((_i+xe)/Gi,(mi+ze)/Gi);pr.z=Pr/Gi,ft.push(pr);const Nr=new A(Qr/Wi,en/Wi);Nr.z=tn/Wi,Fe.push(Nr)}we.push(ft),he.push(Fe)}return[we,he]}(f,D,L,E);return function($,G,Q){let oe=1/0;Iy(Q,G)&&(oe=Zy(Q,G[0]));for(let we=0;weo.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(o=>{this.gradients[o.id]={}}),this.layoutVertexArray=new zl,this.layoutVertexArray2=new cu,this.indexArray=new dr,this.programConfigurations=new Ca(t.layers,t.zoom),this.segments=new sr,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id)}populate(t,o,l){this.hasPattern=wp("line",this.layers,o);const f=this.layers[0].layout.get("line-sort-key"),y=!f.isConstant(),x=[];for(const{feature:b,id:E,index:C,sourceLayerIndex:L}of t){const D=this.layers[0]._featureFilter.needGeometry,B=Ma(b,D);if(!this.layers[0]._featureFilter.filter(new xi(this.zoom),B,l))continue;const V=y?f.evaluate(B,{},l):void 0,$={id:E,properties:b.properties,type:b.type,sourceLayerIndex:L,index:C,geometry:D?B.geometry:Aa(b),patterns:{},sortKey:V};x.push($)}y&&x.sort((b,E)=>b.sortKey-E.sortKey);for(const b of x){const{geometry:E,index:C,sourceLayerIndex:L}=b;if(this.hasPattern){const D=Ep("line",this.layers,b,this.zoom,o);this.patternFeatures.push(D)}else this.addFeature(b,E,C,l,{});o.featureIndex.insert(t[C].feature,E,C,L,this.index)}}update(t,o,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,o,this.stateDependentLayers,l)}addFeatures(t,o,l){for(const f of this.patternFeatures)this.addFeature(f,f.geometry,f.index,o,l)}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,v2)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,y2),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,o,l,f,y){const x=this.layers[0].layout,b=x.get("line-join").evaluate(t,{}),E=x.get("line-cap"),C=x.get("line-miter-limit"),L=x.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const D of o)this.addLine(D,t,b,E,C,L);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,y,f)}addLine(t,o,l,f,y,x){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let oe=0;oe=2&&t[E-1].equals(t[E-2]);)E--;let C=0;for(;C0;if(st&&oe>C){const xt=B.dist(V);if(xt>2*L){const gt=B.sub(B.sub(V)._mult(L/xt)._round());this.updateDistance(V,gt),this.addCurrentVertex(gt,G,0,0,D),V=gt}}const lt=V&&$;let ot=lt?l:b?"butt":f;if(lt&&ot==="round"&&(zey&&(ot="bevel"),ot==="bevel"&&(ze>2&&(ot="flipbevel"),ze100)we=Q.mult(-1);else{const xt=ze*G.add(Q).mag()/G.sub(Q).mag();we._perp()._mult(xt*(Tt?-1:1))}this.addCurrentVertex(B,we,0,0,D),this.addCurrentVertex(B,we.mult(-1),0,0,D)}else if(ot==="bevel"||ot==="fakeround"){const xt=-Math.sqrt(ze*ze-1),gt=Tt?xt:0,ft=Tt?0:xt;if(V&&this.addCurrentVertex(B,G,gt,ft,D),ot==="fakeround"){const Fe=Math.round(180*qe/Math.PI/20);for(let wt=1;wt2*L){const gt=B.add($.sub(B)._mult(L/xt)._round());this.updateDistance(B,gt),this.addCurrentVertex(gt,Q,0,0,D),B=gt}}}}addCurrentVertex(t,o,l,f,y,x=!1){const b=o.y*f-o.x,E=-o.y-o.x*f;this.addHalfVertex(t,o.x+o.y*l,o.y-o.x*l,x,!1,l,y),this.addHalfVertex(t,b,E,x,!0,-f,y),this.distance>Xy/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,o,l,f,y,x))}addHalfVertex({x:t,y:o},l,f,y,x,b,E){const C=.5*(this.lineClips?this.scaledDistance*(Xy-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(y?1:0),(o<<1)+(x?1:0),Math.round(63*l)+128,Math.round(63*f)+128,1+(b===0?0:b<0?-1:1)|(63&C)<<2,C>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const L=E.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,L),E.primitiveLength++),x?this.e2=L:this.e1=L}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,o){this.distance+=t.dist(o),this.updateScaledDistance()}}let Ky,Jy;mt("LineBucket",Cp,{omit:["layers","patternFeatures"]});var Yy={get paint(){return Jy=Jy||new d({"line-opacity":new Ct(ae.paint_line["line-opacity"]),"line-color":new Ct(ae.paint_line["line-color"]),"line-translate":new bt(ae.paint_line["line-translate"]),"line-translate-anchor":new bt(ae.paint_line["line-translate-anchor"]),"line-width":new Ct(ae.paint_line["line-width"]),"line-gap-width":new Ct(ae.paint_line["line-gap-width"]),"line-offset":new Ct(ae.paint_line["line-offset"]),"line-blur":new Ct(ae.paint_line["line-blur"]),"line-dasharray":new i(ae.paint_line["line-dasharray"]),"line-pattern":new _(ae.paint_line["line-pattern"]),"line-gradient":new a(ae.paint_line["line-gradient"])})},get layout(){return Ky=Ky||new d({"line-cap":new bt(ae.layout_line["line-cap"]),"line-join":new Ct(ae.layout_line["line-join"]),"line-miter-limit":new bt(ae.layout_line["line-miter-limit"]),"line-round-limit":new bt(ae.layout_line["line-round-limit"]),"line-sort-key":new Ct(ae.layout_line["line-sort-key"])})}};class w2 extends Ct{possiblyEvaluate(t,o){return o=new xi(Math.floor(o.zoom),{now:o.now,fadeDuration:o.fadeDuration,zoomHistory:o.zoomHistory,transition:o.transition}),super.possiblyEvaluate(t,o)}evaluate(t,o,l,f){return o=Se({},o,{zoom:Math.floor(o.zoom)}),super.evaluate(t,o,l,f)}}let hd;class E2 extends v{constructor(t){super(t,Yy),this.gradientVersion=0,hd||(hd=new w2(Yy.paint.properties["line-width"].specification),hd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){const o=this.gradientExpression();this.stepInterpolant=!!function(l){return l._styleExpression!==void 0}(o)&&o._styleExpression.expression instanceof ua,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,o){super.recalculate(t,o),this.paint._values["line-floorwidth"]=hd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Cp(t)}queryRadius(t){const o=t,l=Qy(mu("line-width",this,o),mu("line-gap-width",this,o)),f=mu("line-offset",this,o);return l/2+Math.abs(f)+nd(this.paint.get("line-translate"))}queryIntersectsFeature(t,o,l,f,y,x,b){const E=od(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),x.angle,b),C=b/2*Qy(this.paint.get("line-width").evaluate(o,l),this.paint.get("line-gap-width").evaluate(o,l)),L=this.paint.get("line-offset").evaluate(o,l);return L&&(f=function(D,B){const V=[];for(let $=0;$=3){for(let Q=0;Q0?t+2*r:r}const S2=P([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),I2=P([{name:"a_projected_pos",components:3,type:"Float32"}],4);P([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const T2=P([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);P([{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 e_=P([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),C2=P([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function A2(r,t,o){return r.sections.forEach(l=>{l.text=function(f,y,x){const b=y.layout.get("text-transform").evaluate(x,{});return b==="uppercase"?f=f.toLocaleUpperCase():b==="lowercase"&&(f=f.toLocaleLowerCase()),wo.applyArabicShaping&&(f=wo.applyArabicShaping(f)),f}(l.text,t,o)}),r}P([{name:"triangle",components:3,type:"Uint16"}]),P([{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"}]),P([{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"}]),P([{type:"Float32",name:"offsetX"}]),P([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),P([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Eu={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var ar=24,t_=pi,i_=function(r,t,o,l,f){var y,x,b=8*f-l-1,E=(1<>1,L=-7,D=f-1,B=-1,V=r[t+D];for(D+=B,y=V&(1<<-L)-1,V>>=-L,L+=b;L>0;y=256*y+r[t+D],D+=B,L-=8);for(x=y&(1<<-L)-1,y>>=-L,L+=l;L>0;x=256*x+r[t+D],D+=B,L-=8);if(y===0)y=1-C;else{if(y===E)return x?NaN:1/0*(V?-1:1);x+=Math.pow(2,l),y-=C}return(V?-1:1)*x*Math.pow(2,y-l)},r_=function(r,t,o,l,f,y){var x,b,E,C=8*y-f-1,L=(1<>1,B=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,V=0,$=1,G=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(b=isNaN(t)?1:0,x=L):(x=Math.floor(Math.log(t)/Math.LN2),t*(E=Math.pow(2,-x))<1&&(x--,E*=2),(t+=x+D>=1?B/E:B*Math.pow(2,1-D))*E>=2&&(x++,E/=2),x+D>=L?(b=0,x=L):x+D>=1?(b=(t*E-1)*Math.pow(2,f),x+=D):(b=t*Math.pow(2,D-1)*Math.pow(2,f),x=0));f>=8;r[o+V]=255&b,V+=$,b/=256,f-=8);for(x=x<0;r[o+V]=255&x,V+=$,x/=256,C-=8);r[o+V-$]|=128*G};function pi(r){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(r)?r:new Uint8Array(r||0),this.pos=0,this.type=0,this.length=this.buf.length}pi.Varint=0,pi.Fixed64=1,pi.Bytes=2,pi.Fixed32=5;var Ap=4294967296,n_=1/Ap,o_=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function es(r){return r.type===pi.Bytes?r.readVarint()+r.pos:r.pos+1}function $l(r,t,o){return o?4294967296*t+(r>>>0):4294967296*(t>>>0)+(r>>>0)}function s_(r,t,o){var l=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));o.realloc(l);for(var f=o.pos-1;f>=r;f--)o.buf[f+l]=o.buf[f]}function M2(r,t){for(var o=0;o>>8,r[o+2]=t>>>16,r[o+3]=t>>>24}function a_(r,t){return(r[t]|r[t+1]<<8|r[t+2]<<16)+(r[t+3]<<24)}pi.prototype={destroy:function(){this.buf=null},readFields:function(r,t,o){for(o=o||this.length;this.pos>3,y=this.pos;this.type=7&l,r(f,t,this),this.pos===y&&this.skip(l)}return t},readMessage:function(r,t){return this.readFields(r,t,this.readVarint()+this.pos)},readFixed32:function(){var r=dd(this.buf,this.pos);return this.pos+=4,r},readSFixed32:function(){var r=a_(this.buf,this.pos);return this.pos+=4,r},readFixed64:function(){var r=dd(this.buf,this.pos)+dd(this.buf,this.pos+4)*Ap;return this.pos+=8,r},readSFixed64:function(){var r=dd(this.buf,this.pos)+a_(this.buf,this.pos+4)*Ap;return this.pos+=8,r},readFloat:function(){var r=i_(this.buf,this.pos,!0,23,4);return this.pos+=4,r},readDouble:function(){var r=i_(this.buf,this.pos,!0,52,8);return this.pos+=8,r},readVarint:function(r){var t,o,l=this.buf;return t=127&(o=l[this.pos++]),o<128?t:(t|=(127&(o=l[this.pos++]))<<7,o<128?t:(t|=(127&(o=l[this.pos++]))<<14,o<128?t:(t|=(127&(o=l[this.pos++]))<<21,o<128?t:function(f,y,x){var b,E,C=x.buf;if(b=(112&(E=C[x.pos++]))>>4,E<128||(b|=(127&(E=C[x.pos++]))<<3,E<128)||(b|=(127&(E=C[x.pos++]))<<10,E<128)||(b|=(127&(E=C[x.pos++]))<<17,E<128)||(b|=(127&(E=C[x.pos++]))<<24,E<128)||(b|=(1&(E=C[x.pos++]))<<31,E<128))return $l(f,b,y);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(o=l[this.pos]))<<28,r,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var r=this.readVarint();return r%2==1?(r+1)/-2:r/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var r=this.readVarint()+this.pos,t=this.pos;return this.pos=r,r-t>=12&&o_?function(o,l,f){return o_.decode(o.subarray(l,f))}(this.buf,t,r):function(o,l,f){for(var y="",x=l;x239?4:L>223?3:L>191?2:1;if(x+B>f)break;B===1?L<128&&(D=L):B===2?(192&(b=o[x+1]))==128&&(D=(31&L)<<6|63&b)<=127&&(D=null):B===3?(E=o[x+2],(192&(b=o[x+1]))==128&&(192&E)==128&&((D=(15&L)<<12|(63&b)<<6|63&E)<=2047||D>=55296&&D<=57343)&&(D=null)):B===4&&(E=o[x+2],C=o[x+3],(192&(b=o[x+1]))==128&&(192&E)==128&&(192&C)==128&&((D=(15&L)<<18|(63&b)<<12|(63&E)<<6|63&C)<=65535||D>=1114112)&&(D=null)),D===null?(D=65533,B=1):D>65535&&(D-=65536,y+=String.fromCharCode(D>>>10&1023|55296),D=56320|1023&D),y+=String.fromCharCode(D),x+=B}return y}(this.buf,t,r)},readBytes:function(){var r=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,r);return this.pos=r,t},readPackedVarint:function(r,t){if(this.type!==pi.Bytes)return r.push(this.readVarint(t));var o=es(this);for(r=r||[];this.pos127;);else if(t===pi.Bytes)this.pos=this.readVarint()+this.pos;else if(t===pi.Fixed32)this.pos+=4;else{if(t!==pi.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(r,t){this.writeVarint(r<<3|t)},realloc:function(r){for(var t=this.length||16;t268435455||r<0?function(t,o){var l,f;if(t>=0?(l=t%4294967296|0,f=t/4294967296|0):(f=~(-t/4294967296),4294967295^(l=~(-t%4294967296))?l=l+1|0:(l=0,f=f+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");o.realloc(10),function(y,x,b){b.buf[b.pos++]=127&y|128,y>>>=7,b.buf[b.pos++]=127&y|128,y>>>=7,b.buf[b.pos++]=127&y|128,y>>>=7,b.buf[b.pos++]=127&y|128,b.buf[b.pos]=127&(y>>>=7)}(l,0,o),function(y,x){var b=(7&y)<<4;x.buf[x.pos++]|=b|((y>>>=3)?128:0),y&&(x.buf[x.pos++]=127&y|((y>>>=7)?128:0),y&&(x.buf[x.pos++]=127&y|((y>>>=7)?128:0),y&&(x.buf[x.pos++]=127&y|((y>>>=7)?128:0),y&&(x.buf[x.pos++]=127&y|((y>>>=7)?128:0),y&&(x.buf[x.pos++]=127&y)))))}(f,o)}(r,this):(this.realloc(4),this.buf[this.pos++]=127&r|(r>127?128:0),r<=127||(this.buf[this.pos++]=127&(r>>>=7)|(r>127?128:0),r<=127||(this.buf[this.pos++]=127&(r>>>=7)|(r>127?128:0),r<=127||(this.buf[this.pos++]=r>>>7&127))))},writeSVarint:function(r){this.writeVarint(r<0?2*-r-1:2*r)},writeBoolean:function(r){this.writeVarint(!!r)},writeString:function(r){r=String(r),this.realloc(4*r.length),this.pos++;var t=this.pos;this.pos=function(l,f,y){for(var x,b,E=0;E55295&&x<57344){if(!b){x>56319||E+1===f.length?(l[y++]=239,l[y++]=191,l[y++]=189):b=x;continue}if(x<56320){l[y++]=239,l[y++]=191,l[y++]=189,b=x;continue}x=b-55296<<10|x-56320|65536,b=null}else b&&(l[y++]=239,l[y++]=191,l[y++]=189,b=null);x<128?l[y++]=x:(x<2048?l[y++]=x>>6|192:(x<65536?l[y++]=x>>12|224:(l[y++]=x>>18|240,l[y++]=x>>12&63|128),l[y++]=x>>6&63|128),l[y++]=63&x|128)}return y}(this.buf,r,this.pos);var o=this.pos-t;o>=128&&s_(t,o,this),this.pos=t-1,this.writeVarint(o),this.pos+=o},writeFloat:function(r){this.realloc(4),r_(this.buf,r,this.pos,!0,23,4),this.pos+=4},writeDouble:function(r){this.realloc(8),r_(this.buf,r,this.pos,!0,52,8),this.pos+=8},writeBytes:function(r){var t=r.length;this.writeVarint(t),this.realloc(t);for(var o=0;o=128&&s_(o,l,this),this.pos=o-1,this.writeVarint(l),this.pos+=l},writeMessage:function(r,t,o){this.writeTag(r,pi.Bytes),this.writeRawMessage(t,o)},writePackedVarint:function(r,t){t.length&&this.writeMessage(r,M2,t)},writePackedSVarint:function(r,t){t.length&&this.writeMessage(r,k2,t)},writePackedBoolean:function(r,t){t.length&&this.writeMessage(r,z2,t)},writePackedFloat:function(r,t){t.length&&this.writeMessage(r,L2,t)},writePackedDouble:function(r,t){t.length&&this.writeMessage(r,P2,t)},writePackedFixed32:function(r,t){t.length&&this.writeMessage(r,D2,t)},writePackedSFixed32:function(r,t){t.length&&this.writeMessage(r,R2,t)},writePackedFixed64:function(r,t){t.length&&this.writeMessage(r,O2,t)},writePackedSFixed64:function(r,t){t.length&&this.writeMessage(r,B2,t)},writeBytesField:function(r,t){this.writeTag(r,pi.Bytes),this.writeBytes(t)},writeFixed32Field:function(r,t){this.writeTag(r,pi.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(r,t){this.writeTag(r,pi.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(r,t){this.writeTag(r,pi.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(r,t){this.writeTag(r,pi.Fixed64),this.writeSFixed64(t)},writeVarintField:function(r,t){this.writeTag(r,pi.Varint),this.writeVarint(t)},writeSVarintField:function(r,t){this.writeTag(r,pi.Varint),this.writeSVarint(t)},writeStringField:function(r,t){this.writeTag(r,pi.Bytes),this.writeString(t)},writeFloatField:function(r,t){this.writeTag(r,pi.Fixed32),this.writeFloat(t)},writeDoubleField:function(r,t){this.writeTag(r,pi.Fixed64),this.writeDouble(t)},writeBooleanField:function(r,t){this.writeVarintField(r,!!t)}};var Mp=I(t_);const kp=3;function F2(r,t,o){r===1&&o.readMessage(V2,t)}function V2(r,t,o){if(r===3){const{id:l,bitmap:f,width:y,height:x,left:b,top:E,advance:C}=o.readMessage(N2,{});t.push({id:l,bitmap:new yu({width:y+2*kp,height:x+2*kp},f),metrics:{width:y,height:x,left:b,top:E,advance:C}})}}function N2(r,t,o){r===1?t.id=o.readVarint():r===2?t.bitmap=o.readBytes():r===3?t.width=o.readVarint():r===4?t.height=o.readVarint():r===5?t.left=o.readSVarint():r===6?t.top=o.readSVarint():r===7&&(t.advance=o.readVarint())}const l_=kp;function c_(r){let t=0,o=0;for(const x of r)t+=x.w*x.h,o=Math.max(o,x.w);r.sort((x,b)=>b.h-x.h);const l=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),o),h:1/0}];let f=0,y=0;for(const x of r)for(let b=l.length-1;b>=0;b--){const E=l[b];if(!(x.w>E.w||x.h>E.h)){if(x.x=E.x,x.y=E.y,y=Math.max(y,x.y+x.h),f=Math.max(f,x.x+x.w),x.w===E.w&&x.h===E.h){const C=l.pop();b=0&&l>=t&&pd[this.text.charCodeAt(l)];l--)o--;this.text=this.text.substring(t,o),this.sectionIndex=this.sectionIndex.slice(t,o)}substring(t,o){const l=new ql;return l.text=this.text.substring(t,o),l.sectionIndex=this.sectionIndex.slice(t,o),l.sections=this.sections,l}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,o)=>Math.max(t,this.sections[o].scale),0)}addTextSection(t,o){this.text+=t.text,this.sections.push(Iu.forText(t.scale,t.fontStack||o));const l=this.sections.length-1;for(let f=0;f=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function fd(r,t,o,l,f,y,x,b,E,C,L,D,B,V,$){const G=ql.fromFeature(r,f);let Q;D===m.ah.vertical&&G.verticalizePunctuation();const{processBidirectionalText:oe,processStyledBidirectionalText:we}=wo;if(oe&&G.sections.length===1){Q=[];const ze=oe(G.toString(),Pp(G,C,y,t,l,V));for(const qe of ze){const st=new ql;st.text=qe,st.sections=G.sections;for(let Tt=0;Tt0&&ts>Dr&&(Dr=ts)}else{const Ln=st[oi.fontStack],vr=Ln&&Ln[Mi];if(vr&&vr.rect)Zl=vr.rect,Ni=vr.metrics;else{const ts=qe[oi.fontStack],ku=ts&&ts[Mi];if(!ku)continue;Ni=ku.metrics}bn=(pr-oi.scale)*ar}qn?(ze.verticalizable=!0,rn.push({glyph:Mi,imageName:To,x:Pt,y:_i+bn,vertical:qn,scale:oi.scale,fontStack:oi.fontStack,sectionIndex:bi,metrics:Ni,rect:Zl}),Pt+=Co*oi.scale+Fe):(rn.push({glyph:Mi,imageName:To,x:Pt,y:_i+bn,vertical:qn,scale:oi.scale,fontStack:oi.fontStack,sectionIndex:bi,metrics:Ni,rect:Zl}),Pt+=Ni.advance*oi.scale+Fe)}rn.length!==0&&(mi=Math.max(Pt-Fe,mi),q2(rn,0,rn.length-1,Un,Dr)),Pt=0;const kn=ot*pr+Dr;zr.lineOffset=Math.max(Dr,Nr),_i+=kn,fr=Math.max(kn,fr),++Pr}var Gi;const Qr=_i-Su,{horizontalAlign:en,verticalAlign:tn}=zp(xt);(function(Wi,pr,Nr,zr,rn,Dr,kn,mn,oi){const bi=(pr-Nr)*rn;let Mi=0;Mi=Dr!==kn?-mn*zr-Su:(-zr*oi+.5)*kn;for(const bn of Wi)for(const Ni of bn.positionedGlyphs)Ni.x+=bi,Ni.y+=Mi})(ze.positionedLines,Un,en,tn,mi,fr,ot,Qr,lt.length),ze.top+=-tn*Qr,ze.bottom=ze.top+Qr,ze.left+=-en*mi,ze.right=ze.left+mi}(xe,t,o,l,Q,x,b,E,D,C,B,$),!function(ze){for(const qe of ze)if(qe.positionedGlyphs.length!==0)return!1;return!0}(he)&&xe}const pd={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},j2={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},$2={40:!0};function h_(r,t,o,l,f,y){if(t.imageName){const x=l[t.imageName];return x?x.displaySize[0]*t.scale*ar/y+f:0}{const x=o[t.fontStack],b=x&&x[r];return b?b.metrics.advance*t.scale+f:0}}function d_(r,t,o,l){const f=Math.pow(r-t,2);return l?r=0;let C=0;for(let D=0;DC){const L=Math.ceil(y/C);f*=L/x,x=L}return{x1:l,y1:f,x2:l+y,y2:f+x}}function g_(r,t,o,l,f,y){const x=r.image;let b;if(x.content){const Q=x.content,oe=x.pixelRatio||1;b=[Q[0]/oe,Q[1]/oe,x.displaySize[0]-Q[2]/oe,x.displaySize[1]-Q[3]/oe]}const E=t.left*y,C=t.right*y;let L,D,B,V;o==="width"||o==="both"?(V=f[0]+E-l[3],D=f[0]+C+l[1]):(V=f[0]+(E+C-x.displaySize[0])/2,D=V+x.displaySize[0]);const $=t.top*y,G=t.bottom*y;return o==="height"||o==="both"?(L=f[1]+$-l[0],B=f[1]+G+l[2]):(L=f[1]+($+G-x.displaySize[1])/2,B=L+x.displaySize[1]),{image:x,top:L,right:D,bottom:B,left:V,collisionPadding:b}}const Tu=255,Io=128,Rs=Tu*Io;function y_(r,t){const{expression:o}=t;if(o.kind==="constant")return{kind:"constant",layoutSize:o.evaluate(new xi(r+1))};if(o.kind==="source")return{kind:"source"};{const{zoomStops:l,interpolationType:f}=o;let y=0;for(;yx.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=mp([]),this.placementViewportMatrix=mp([]);const o=this.layers[0]._unevaluatedLayout._values;this.textSizeData=y_(this.zoom,o["text-size"]),this.iconSizeData=y_(this.zoom,o["icon-size"]);const l=this.layers[0].layout,f=l.get("symbol-sort-key"),y=l.get("symbol-z-order");this.canOverlap=Dp(l,"text-overlap","text-allow-overlap")!=="never"||Dp(l,"icon-overlap","icon-allow-overlap")!=="never"||l.get("text-ignore-placement")||l.get("icon-ignore-placement"),this.sortFeaturesByKey=y!=="viewport-y"&&!f.isConstant(),this.sortFeaturesByY=(y==="viewport-y"||y==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,l.get("symbol-placement")==="point"&&(this.writingModes=l.get("text-writing-mode").map(x=>m.ah[x])),this.stateDependentLayerIds=this.layers.filter(x=>x.isStateDependent()).map(x=>x.id),this.sourceID=t.sourceID}createArrays(){this.text=new Op(new Ca(this.layers,this.zoom,t=>/^text/.test(t))),this.icon=new Op(new Ca(this.layers,this.zoom,t=>/^icon/.test(t))),this.glyphOffsetArray=new Ai,this.lineVertexArray=new Jr,this.symbolInstances=new In,this.textAnchorOffsets=new Cr}calculateGlyphDependencies(t,o,l,f,y){for(let x=0;x0)&&(x.value.kind!=="constant"||x.value.value.length>0),L=E.value.kind!=="constant"||!!E.value.value||Object.keys(E.parameters).length>0,D=y.get("symbol-sort-key");if(this.features=[],!C&&!L)return;const B=o.iconDependencies,V=o.glyphDependencies,$=o.availableImages,G=new xi(this.zoom);for(const{feature:Q,id:oe,index:we,sourceLayerIndex:he}of t){const xe=f._featureFilter.needGeometry,ze=Ma(Q,xe);if(!f._featureFilter.filter(G,ze,l))continue;let qe,st;if(xe||(ze.geometry=Aa(Q)),C){const lt=f.getValueAndResolveTokens("text-field",ze,l,$),ot=cn.factory(lt),xt=this.hasRTLText=this.hasRTLText||Z2(ot);(!xt||wo.getRTLTextPluginStatus()==="unavailable"||xt&&wo.isParsed())&&(qe=A2(ot,f,ze))}if(L){const lt=f.getValueAndResolveTokens("icon-image",ze,l,$);st=lt instanceof _n?lt:_n.fromString(lt)}if(!qe&&!st)continue;const Tt=this.sortFeaturesByKey?D.evaluate(ze,{},l):void 0;if(this.features.push({id:oe,text:qe,icon:st,index:we,sourceLayerIndex:he,geometry:ze.geometry,properties:Q.properties,type:G2[Q.type],sortKey:Tt}),st&&(B[st.name]=!0),qe){const lt=x.evaluate(ze,{},l).join(","),ot=y.get("text-rotation-alignment")!=="viewport"&&y.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(m.ah.vertical)>=0;for(const xt of qe.sections)if(xt.image)B[xt.image.name]=!0;else{const gt=ou(qe.toString()),ft=xt.fontStack||lt,Fe=V[ft]=V[ft]||{};this.calculateGlyphDependencies(xt.text,Fe,ot,this.allowVerticalPlacement,gt)}}}y.get("symbol-placement")==="line"&&(this.features=function(Q){const oe={},we={},he=[];let xe=0;function ze(lt){he.push(Q[lt]),xe++}function qe(lt,ot,xt){const gt=we[lt];return delete we[lt],we[ot]=gt,he[gt].geometry[0].pop(),he[gt].geometry[0]=he[gt].geometry[0].concat(xt[0]),gt}function st(lt,ot,xt){const gt=oe[ot];return delete oe[ot],oe[lt]=gt,he[gt].geometry[0].shift(),he[gt].geometry[0]=xt[0].concat(he[gt].geometry[0]),gt}function Tt(lt,ot,xt){const gt=xt?ot[0][ot[0].length-1]:ot[0][0];return`${lt}:${gt.x}:${gt.y}`}for(let lt=0;ltlt.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Q,oe)=>Q.sortKey-oe.sortKey)}update(t,o,l){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,o,this.layers,l),this.icon.programConfigurations.updatePaintArrays(t,o,this.layers,l))}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,o){const l=this.lineVertexArray.length;if(t.segment!==void 0){let f=t.dist(o[t.segment+1]),y=t.dist(o[t.segment]);const x={};for(let b=t.segment+1;b=0;b--)x[b]={x:o[b].x,y:o[b].y,tileUnitDistanceFromAnchor:y},b>0&&(y+=o[b-1].dist(o[b]));for(let b=0;b0}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,o){const l=t.placedSymbolArray.get(o),f=l.vertexStartIndex+4*l.numGlyphs;for(let y=l.vertexStartIndex;yf[b]-f[E]||y[E]-y[b]),x}addToSortKeyRanges(t,o){const l=this.sortKeyRanges[this.sortKeyRanges.length-1];l&&l.sortKey===o?l.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:o,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 o of this.symbolInstanceIndexes){const l=this.symbolInstances.get(o);this.featureSortOrder.push(l.featureIndex),[l.rightJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.leftJustifiedTextSymbolIndex].forEach((f,y,x)=>{f>=0&&x.indexOf(f)===y&&this.addIndicesForPlacedSymbol(this.text,f)}),l.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,l.verticalPlacedTextSymbolIndex),l.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.placedIconSymbolIndex),l.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let __,v_;mt("SymbolBucket",Hl,{omit:["layers","collisionBoxArray","features","compareText"]}),Hl.MAX_GLYPHS=65535,Hl.addDynamicAttributes=Rp;var Fp={get paint(){return v_=v_||new d({"icon-opacity":new Ct(ae.paint_symbol["icon-opacity"]),"icon-color":new Ct(ae.paint_symbol["icon-color"]),"icon-halo-color":new Ct(ae.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ct(ae.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ct(ae.paint_symbol["icon-halo-blur"]),"icon-translate":new bt(ae.paint_symbol["icon-translate"]),"icon-translate-anchor":new bt(ae.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ct(ae.paint_symbol["text-opacity"]),"text-color":new Ct(ae.paint_symbol["text-color"],{runtimeType:di,getOverride:r=>r.textColor,hasOverride:r=>!!r.textColor}),"text-halo-color":new Ct(ae.paint_symbol["text-halo-color"]),"text-halo-width":new Ct(ae.paint_symbol["text-halo-width"]),"text-halo-blur":new Ct(ae.paint_symbol["text-halo-blur"]),"text-translate":new bt(ae.paint_symbol["text-translate"]),"text-translate-anchor":new bt(ae.paint_symbol["text-translate-anchor"])})},get layout(){return __=__||new d({"symbol-placement":new bt(ae.layout_symbol["symbol-placement"]),"symbol-spacing":new bt(ae.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new bt(ae.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ct(ae.layout_symbol["symbol-sort-key"]),"symbol-z-order":new bt(ae.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new bt(ae.layout_symbol["icon-allow-overlap"]),"icon-overlap":new bt(ae.layout_symbol["icon-overlap"]),"icon-ignore-placement":new bt(ae.layout_symbol["icon-ignore-placement"]),"icon-optional":new bt(ae.layout_symbol["icon-optional"]),"icon-rotation-alignment":new bt(ae.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ct(ae.layout_symbol["icon-size"]),"icon-text-fit":new bt(ae.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new bt(ae.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ct(ae.layout_symbol["icon-image"]),"icon-rotate":new Ct(ae.layout_symbol["icon-rotate"]),"icon-padding":new Ct(ae.layout_symbol["icon-padding"]),"icon-keep-upright":new bt(ae.layout_symbol["icon-keep-upright"]),"icon-offset":new Ct(ae.layout_symbol["icon-offset"]),"icon-anchor":new Ct(ae.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new bt(ae.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new bt(ae.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new bt(ae.layout_symbol["text-rotation-alignment"]),"text-field":new Ct(ae.layout_symbol["text-field"]),"text-font":new Ct(ae.layout_symbol["text-font"]),"text-size":new Ct(ae.layout_symbol["text-size"]),"text-max-width":new Ct(ae.layout_symbol["text-max-width"]),"text-line-height":new bt(ae.layout_symbol["text-line-height"]),"text-letter-spacing":new Ct(ae.layout_symbol["text-letter-spacing"]),"text-justify":new Ct(ae.layout_symbol["text-justify"]),"text-radial-offset":new Ct(ae.layout_symbol["text-radial-offset"]),"text-variable-anchor":new bt(ae.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Ct(ae.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Ct(ae.layout_symbol["text-anchor"]),"text-max-angle":new bt(ae.layout_symbol["text-max-angle"]),"text-writing-mode":new bt(ae.layout_symbol["text-writing-mode"]),"text-rotate":new Ct(ae.layout_symbol["text-rotate"]),"text-padding":new bt(ae.layout_symbol["text-padding"]),"text-keep-upright":new bt(ae.layout_symbol["text-keep-upright"]),"text-transform":new Ct(ae.layout_symbol["text-transform"]),"text-offset":new Ct(ae.layout_symbol["text-offset"]),"text-allow-overlap":new bt(ae.layout_symbol["text-allow-overlap"]),"text-overlap":new bt(ae.layout_symbol["text-overlap"]),"text-ignore-placement":new bt(ae.layout_symbol["text-ignore-placement"]),"text-optional":new bt(ae.layout_symbol["text-optional"])})}};class x_{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:Gr,this.defaultValue=t}evaluate(t){if(t.formattedSection){const o=this.defaultValue.property.overrides;if(o&&o.hasOverride(t.formattedSection))return o.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}}mt("FormatSectionOverride",x_,{omit:["defaultValue"]});class gd extends v{constructor(t){super(t,Fp)}recalculate(t,o){if(super.recalculate(t,o),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 l=this.layout.get("text-writing-mode");if(l){const f=[];for(const y of l)f.indexOf(y)<0&&f.push(y);this.layout._values["text-writing-mode"]=f}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,o,l,f){const y=this.layout.get(t).evaluate(o,{},l,f),x=this._unevaluatedLayout._values[t];return x.isDataDriven()||bl(x.value)||!y?y:function(b,E){return E.replace(/{([^{}]+)}/g,(C,L)=>b&&L in b?String(b[L]):"")}(o.properties,y)}createBucket(t){return new Hl(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of Fp.paint.overridableProperties){if(!gd.hasPaintOverride(this.layout,t))continue;const o=this.paint.get(t),l=new x_(o),f=new Hc(l,o.property.specification);let y=null;y=o.value.kind==="constant"||o.value.kind==="source"?new Gc("source",f):new Wc("composite",f,o.value.zoomStops),this.paint._values[t]=new $n(o.property,y,o.parameters)}}_handleOverridablePaintPropertyUpdate(t,o,l){return!(!this.layout||o.isDataDriven()||l.isDataDriven())&&gd.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,o){const l=t.get("text-field"),f=Fp.paint.properties[o];let y=!1;const x=b=>{for(const E of b)if(f.overrides&&f.overrides.hasOverride(E))return void(y=!0)};if(l.value.kind==="constant"&&l.value.value instanceof cn)x(l.value.value.sections);else if(l.value.kind==="source"){const b=C=>{y||(C instanceof jo&&Yi(C.value)===to?x(C.value.sections):C instanceof ll?x(C.sections):C.eachChild(b))},E=l.value;E._styleExpression&&b(E._styleExpression.expression)}return y}}let b_;var X2={get paint(){return b_=b_||new d({"background-color":new bt(ae.paint_background["background-color"]),"background-pattern":new i(ae.paint_background["background-pattern"]),"background-opacity":new bt(ae.paint_background["background-opacity"])})}};class K2 extends v{constructor(t){super(t,X2)}}let w_;var J2={get paint(){return w_=w_||new d({"raster-opacity":new bt(ae.paint_raster["raster-opacity"]),"raster-hue-rotate":new bt(ae.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new bt(ae.paint_raster["raster-brightness-min"]),"raster-brightness-max":new bt(ae.paint_raster["raster-brightness-max"]),"raster-saturation":new bt(ae.paint_raster["raster-saturation"]),"raster-contrast":new bt(ae.paint_raster["raster-contrast"]),"raster-resampling":new bt(ae.paint_raster["raster-resampling"]),"raster-fade-duration":new bt(ae.paint_raster["raster-fade-duration"])})}};class Y2 extends v{constructor(t){super(t,J2)}}class Q2 extends v{constructor(t){super(t,{}),this.onAdd=o=>{this.implementation.onAdd&&this.implementation.onAdd(o,o.painter.context.gl)},this.onRemove=o=>{this.implementation.onRemove&&this.implementation.onRemove(o,o.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 eE{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 Vp=63710088e-1;class Os{constructor(t,o){if(isNaN(t)||isNaN(o))throw new Error(`Invalid LngLat object: (${t}, ${o})`);if(this.lng=+t,this.lat=+o,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Os(ee(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const o=Math.PI/180,l=this.lat*o,f=t.lat*o,y=Math.sin(l)*Math.sin(f)+Math.cos(l)*Math.cos(f)*Math.cos((t.lng-this.lng)*o);return Vp*Math.acos(Math.min(y,1))}static convert(t){if(t instanceof Os)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new Os(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t!==null)return new Os(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const E_=2*Math.PI*Vp;function S_(r){return E_*Math.cos(r*Math.PI/180)}function I_(r){return(180+r)/360}function T_(r){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360}function C_(r,t){return r/S_(t)}function Np(r){return 360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90}class yd{constructor(t,o,l=0){this.x=+t,this.y=+o,this.z=+l}static fromLngLat(t,o=0){const l=Os.convert(t);return new yd(I_(l.lng),T_(l.lat),C_(o,l.lat))}toLngLat(){return new Os(360*this.x-180,Np(this.y))}toAltitude(){return this.z*S_(Np(this.y))}meterInMercatorCoordinateUnits(){return 1/E_*(t=Np(this.y),1/Math.cos(t*Math.PI/180));var t}}function A_(r,t,o){var l=2*Math.PI*6378137/256/Math.pow(2,o);return[r*l-2*Math.PI*6378137/2,t*l-2*Math.PI*6378137/2]}class jp{constructor(t,o,l){if(t<0||t>25||l<0||l>=Math.pow(2,t)||o<0||o>=Math.pow(2,t))throw new Error(`x=${o}, y=${l}, 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=o,this.y=l,this.key=Cu(0,t,t,o,l)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,o,l){const f=(x=this.y,b=this.z,E=A_(256*(y=this.x),256*(x=Math.pow(2,b)-x-1),b),C=A_(256*(y+1),256*(x+1),b),E[0]+","+E[1]+","+C[0]+","+C[1]);var y,x,b,E,C;const L=function(D,B,V){let $,G="";for(let Q=D;Q>0;Q--)$=1<1?"@2x":"").replace(/{quadkey}/g,L).replace(/{bbox-epsg-3857}/g,f)}isChildOf(t){const o=this.z-t.z;return o>0&&t.x===this.x>>o&&t.y===this.y>>o}getTilePoint(t){const o=Math.pow(2,this.z);return new A((t.x*o-this.x)*Qi,(t.y*o-this.y)*Qi)}toString(){return`${this.z}/${this.x}/${this.y}`}}class M_{constructor(t,o){this.wrap=t,this.canonical=o,this.key=Cu(t,o.z,o.z,o.x,o.y)}}class Mn{constructor(t,o,l,f,y){if(t= z; overscaledZ = ${t}; z = ${l}`);this.overscaledZ=t,this.wrap=o,this.canonical=new jp(l,+f,+y),this.key=Cu(o,t,l,f,y)}clone(){return new Mn(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 o=this.canonical.z-t;return t>this.canonical.z?new Mn(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Mn(t,this.wrap,t,this.canonical.x>>o,this.canonical.y>>o)}calculateScaledKey(t,o){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const l=this.canonical.z-t;return t>this.canonical.z?Cu(this.wrap*+o,t,this.canonical.z,this.canonical.x,this.canonical.y):Cu(this.wrap*+o,t,t,this.canonical.x>>l,this.canonical.y>>l)}isChildOf(t){if(t.wrap!==this.wrap)return!1;const o=this.canonical.z-t.canonical.z;return t.overscaledZ===0||t.overscaledZ>o&&t.canonical.y===this.canonical.y>>o}children(t){if(this.overscaledZ>=t)return[new Mn(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const o=this.canonical.z+1,l=2*this.canonical.x,f=2*this.canonical.y;return[new Mn(o,this.wrap,o,l,f),new Mn(o,this.wrap,o,l+1,f),new Mn(o,this.wrap,o,l,f+1),new Mn(o,this.wrap,o,l+1,f+1)]}isLessThan(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.ythis.max&&(this.max=D),D=this.dim+1||o<-1||o>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(o+1)*this.stride+(t+1)}unpack(t,o,l){return t*this.redFactor+o*this.greenFactor+l*this.blueFactor-this.baseShift}getPixels(){return new An({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,o,l){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let f=o*this.dim,y=o*this.dim+this.dim,x=l*this.dim,b=l*this.dim+this.dim;switch(o){case-1:f=y-1;break;case 1:y=f+1}switch(l){case-1:x=b-1;break;case 1:b=x+1}const E=-o*this.dim,C=-l*this.dim;for(let L=x;L=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 P_{constructor(t,o,l,f,y){this.type="Feature",this._vectorTileFeature=t,t._z=o,t._x=l,t._y=f,this.properties=t.properties,this.id=y}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 o in this)o!=="_geometry"&&o!=="_vectorTileFeature"&&(t[o]=this[o]);return t}}class z_{constructor(t,o){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Ea(Qi,16,0),this.grid3D=new Ea(Qi,16,0),this.featureIndexArray=new Tn,this.promoteId=o}insert(t,o,l,f,y,x){const b=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(l,f,y);const E=x?this.grid3D:this.grid;for(let C=0;C=0&&D[3]>=0&&E.insert(b,D[0],D[1],D[2],D[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new zs.VectorTile(new Mp(this.rawTileData)).layers,this.sourceLayerCoder=new L_(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(t,o,l,f){this.loadVTLayers();const y=t.params||{},x=Qi/t.tileSize/t.scale,b=Zc(y.filter),E=t.queryGeometry,C=t.queryPadding*x,L=R_(E),D=this.grid.query(L.minX-C,L.minY-C,L.maxX+C,L.maxY+C),B=R_(t.cameraQueryGeometry),V=this.grid3D.query(B.minX-C,B.minY-C,B.maxX+C,B.maxY+C,(Q,oe,we,he)=>function(xe,ze,qe,st,Tt){for(const ot of xe)if(ze<=ot.x&&qe<=ot.y&&st>=ot.x&&Tt>=ot.y)return!0;const lt=[new A(ze,qe),new A(ze,Tt),new A(st,Tt),new A(st,qe)];if(xe.length>2){for(const ot of lt)if(Fl(xe,ot))return!0}for(let ot=0;ot(he||(he=Aa(xe)),ze.queryIntersectsFeature(E,xe,qe,he,this.z,t.transform,x,t.pixelPosMatrix)))}return $}loadMatchingFeature(t,o,l,f,y,x,b,E,C,L,D){const B=this.bucketLayerIDs[o];if(x&&!function(Q,oe){for(let we=0;we=0)return!0;return!1}(x,B))return;const V=this.sourceLayerCoder.decode(l),$=this.vtLayers[V].feature(f);if(y.needGeometry){const Q=Ma($,!0);if(!y.filter(new xi(this.tileID.overscaledZ),Q,this.tileID.canonical))return}else if(!y.filter(new xi(this.tileID.overscaledZ),$))return;const G=this.getId($,V);for(let Q=0;Q{const b=t instanceof Ll?t.get(x):null;return b&&b.evaluate?b.evaluate(o,l,f):b})}function R_(r){let t=1/0,o=1/0,l=-1/0,f=-1/0;for(const y of r)t=Math.min(t,y.x),o=Math.min(o,y.y),l=Math.max(l,y.x),f=Math.max(f,y.y);return{minX:t,minY:o,maxX:l,maxY:f}}function tE(r,t){return t-r}function O_(r,t,o,l,f){const y=[];for(let x=0;x=l&&D.x>=l||(L.x>=l?L=new A(l,L.y+(l-L.x)/(D.x-L.x)*(D.y-L.y))._round():D.x>=l&&(D=new A(l,L.y+(l-L.x)/(D.x-L.x)*(D.y-L.y))._round()),L.y>=f&&D.y>=f||(L.y>=f?L=new A(L.x+(f-L.y)/(D.y-L.y)*(D.x-L.x),f)._round():D.y>=f&&(D=new A(L.x+(f-L.y)/(D.y-L.y)*(D.x-L.x),f)._round()),E&&L.equals(E[E.length-1])||(E=[L],y.push(E)),E.push(D)))))}}return y}mt("FeatureIndex",z_,{omit:["rawTileData","sourceLayerCoder"]});class Bs extends A{constructor(t,o,l,f){super(t,o),this.angle=l,f!==void 0&&(this.segment=f)}clone(){return new Bs(this.x,this.y,this.angle,this.segment)}}function B_(r,t,o,l,f){if(t.segment===void 0||o===0)return!0;let y=t,x=t.segment+1,b=0;for(;b>-o/2;){if(x--,x<0)return!1;b-=r[x].dist(y),y=r[x]}b+=r[x].dist(r[x+1]),x++;const E=[];let C=0;for(;bl;)C-=E.shift().angleDelta;if(C>f)return!1;x++,b+=L.dist(D)}return!0}function F_(r){let t=0;for(let o=0;oC){const $=(C-E)/V,G=Fr.number(D.x,B.x,$),Q=Fr.number(D.y,B.y,$),oe=new Bs(G,Q,B.angleTo(D),L);return oe._round(),!x||B_(r,oe,b,x,t)?oe:void 0}E+=V}}function rE(r,t,o,l,f,y,x,b,E){const C=V_(l,y,x),L=N_(l,f),D=L*x,B=r[0].x===0||r[0].x===E||r[0].y===0||r[0].y===E;return t-D=0&&xe=0&&ze=0&&B+C<=L){const qe=new Bs(xe,ze,we,$);qe._round(),l&&!B_(r,qe,y,l,f)||V.push(qe)}}D+=oe}return b||V.length||x||(V=j_(r,D/2,o,l,f,y,x,!0,E)),V}mt("Anchor",Bs);const Gl=pn;function $_(r,t,o,l){const f=[],y=r.image,x=y.pixelRatio,b=y.paddedRect.w-2*Gl,E=y.paddedRect.h-2*Gl;let C={x1:r.left,y1:r.top,x2:r.right,y2:r.bottom};const L=y.stretchX||[[0,b]],D=y.stretchY||[[0,E]],B=(Fe,wt)=>Fe+wt[1]-wt[0],V=L.reduce(B,0),$=D.reduce(B,0),G=b-V,Q=E-$;let oe=0,we=V,he=0,xe=$,ze=0,qe=G,st=0,Tt=Q;if(y.content&&l){const Fe=y.content,wt=Fe[2]-Fe[0],_t=Fe[3]-Fe[1];(y.textFitWidth||y.textFitHeight)&&(C=m_(r)),oe=_d(L,0,Fe[0]),he=_d(D,0,Fe[1]),we=_d(L,Fe[0],Fe[2]),xe=_d(D,Fe[1],Fe[3]),ze=Fe[0]-oe,st=Fe[1]-he,qe=wt-we,Tt=_t-xe}const lt=C.x1,ot=C.y1,xt=C.x2-lt,gt=C.y2-ot,ft=(Fe,wt,_t,Pt)=>{const _i=vd(Fe.stretch-oe,we,xt,lt),mi=xd(Fe.fixed-ze,qe,Fe.stretch,V),fr=vd(wt.stretch-he,xe,gt,ot),Un=xd(wt.fixed-st,Tt,wt.stretch,$),Pr=vd(_t.stretch-oe,we,xt,lt),Gi=xd(_t.fixed-ze,qe,_t.stretch,V),Qr=vd(Pt.stretch-he,xe,gt,ot),en=xd(Pt.fixed-st,Tt,Pt.stretch,$),tn=new A(_i,fr),Wi=new A(Pr,fr),pr=new A(Pr,Qr),Nr=new A(_i,Qr),zr=new A(mi/x,Un/x),rn=new A(Gi/x,en/x),Dr=t*Math.PI/180;if(Dr){const oi=Math.sin(Dr),bi=Math.cos(Dr),Mi=[bi,-oi,oi,bi];tn._matMult(Mi),Wi._matMult(Mi),Nr._matMult(Mi),pr._matMult(Mi)}const kn=Fe.stretch+Fe.fixed,mn=wt.stretch+wt.fixed;return{tl:tn,tr:Wi,bl:Nr,br:pr,tex:{x:y.paddedRect.x+Gl+kn,y:y.paddedRect.y+Gl+mn,w:_t.stretch+_t.fixed-kn,h:Pt.stretch+Pt.fixed-mn},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:zr,pixelOffsetBR:rn,minFontScaleX:qe/x/xt,minFontScaleY:Tt/x/gt,isSDF:o}};if(l&&(y.stretchX||y.stretchY)){const Fe=U_(L,G,V),wt=U_(D,Q,$);for(let _t=0;_t0&&(G=Math.max(10,G),this.circleDiameter=G)}else{const B=!((D=x.image)===null||D===void 0)&&D.content&&(x.image.textFitWidth||x.image.textFitHeight)?m_(x):{x1:x.left,y1:x.top,x2:x.right,y2:x.bottom};B.y1=B.y1*b-E[0],B.y2=B.y2*b+E[2],B.x1=B.x1*b-E[3],B.x2=B.x2*b+E[1];const V=x.collisionPadding;if(V&&(B.x1-=V[0]*b,B.y1-=V[1]*b,B.x2+=V[2]*b,B.y2+=V[3]*b),L){const $=new A(B.x1,B.y1),G=new A(B.x2,B.y1),Q=new A(B.x1,B.y2),oe=new A(B.x2,B.y2),we=L*Math.PI/180;$._rotate(we),G._rotate(we),Q._rotate(we),oe._rotate(we),B.x1=Math.min($.x,G.x,Q.x,oe.x),B.x2=Math.max($.x,G.x,Q.x,oe.x),B.y1=Math.min($.y,G.y,Q.y,oe.y),B.y2=Math.max($.y,G.y,Q.y,oe.y)}t.emplaceBack(o.x,o.y,B.x1,B.y1,B.x2,B.y2,l,f,y)}this.boxEndIndex=t.length}}class nE{constructor(t=[],o=oE){if(this.data=t,this.length=this.data.length,this.compare=o,this.length>0)for(let l=(this.length>>1)-1;l>=0;l--)this._down(l)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],o=this.data.pop();return this.length--,this.length>0&&(this.data[0]=o,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:o,compare:l}=this,f=o[t];for(;t>0;){const y=t-1>>1,x=o[y];if(l(f,x)>=0)break;o[t]=x,t=y}o[t]=f}_down(t){const{data:o,compare:l}=this,f=this.length>>1,y=o[t];for(;t=0)break;o[t]=b,t=x}o[t]=y}}function oE(r,t){return rt?1:0}function sE(r,t=1,o=!1){let l=1/0,f=1/0,y=-1/0,x=-1/0;const b=r[0];for(let V=0;Vy)&&(y=$.x),(!V||$.y>x)&&(x=$.y)}const E=Math.min(y-l,x-f);let C=E/2;const L=new nE([],aE);if(E===0)return new A(l,f);for(let V=l;VD.d||!D.d)&&(D=V,o&&console.log("found best %d after %d probes",Math.round(1e4*V.d)/1e4,B)),V.max-D.d<=t||(C=V.h/2,L.push(new Wl(V.p.x-C,V.p.y-C,C,r)),L.push(new Wl(V.p.x+C,V.p.y-C,C,r)),L.push(new Wl(V.p.x-C,V.p.y+C,C,r)),L.push(new Wl(V.p.x+C,V.p.y+C,C,r)),B+=4)}return o&&(console.log(`num probes: ${B}`),console.log(`best distance: ${D.d}`)),D.p}function aE(r,t){return t.max-r.max}function Wl(r,t,o,l){this.p=new A(r,t),this.h=o,this.d=function(f,y){let x=!1,b=1/0;for(let E=0;Ef.y!=$.y>f.y&&f.x<($.x-V.x)*(f.y-V.y)/($.y-V.y)+V.x&&(x=!x),b=Math.min(b,Ty(f,V,$))}}return(x?1:-1)*Math.sqrt(b)}(this.p,l),this.max=this.d+this.h*Math.SQRT2}var Lr;m.aq=void 0,(Lr=m.aq||(m.aq={}))[Lr.center=1]="center",Lr[Lr.left=2]="left",Lr[Lr.right=3]="right",Lr[Lr.top=4]="top",Lr[Lr.bottom=5]="bottom",Lr[Lr["top-left"]=6]="top-left",Lr[Lr["top-right"]=7]="top-right",Lr[Lr["bottom-left"]=8]="bottom-left",Lr[Lr["bottom-right"]=9]="bottom-right";const Fs=7,$p=Number.POSITIVE_INFINITY;function q_(r,t){return t[1]!==$p?function(o,l,f){let y=0,x=0;switch(l=Math.abs(l),f=Math.abs(f),o){case"top-right":case"top-left":case"top":x=f-Fs;break;case"bottom-right":case"bottom-left":case"bottom":x=-f+Fs}switch(o){case"top-right":case"bottom-right":case"right":y=-l;break;case"top-left":case"bottom-left":case"left":y=l}return[y,x]}(r,t[0],t[1]):function(o,l){let f=0,y=0;l<0&&(l=0);const x=l/Math.SQRT2;switch(o){case"top-right":case"top-left":y=x-Fs;break;case"bottom-right":case"bottom-left":y=-x+Fs;break;case"bottom":y=-l+Fs;break;case"top":y=l-Fs}switch(o){case"top-right":case"bottom-right":f=-x;break;case"top-left":case"bottom-left":f=x;break;case"left":f=l;break;case"right":f=-l}return[f,y]}(r,t[0])}function H_(r,t,o){var l;const f=r.layout,y=(l=f.get("text-variable-anchor-offset"))===null||l===void 0?void 0:l.evaluate(t,{},o);if(y){const b=y.values,E=[];for(let C=0;CB*ar);L.startsWith("top")?D[1]-=Fs:L.startsWith("bottom")&&(D[1]+=Fs),E[C+1]=D}return new Xr(E)}const x=f.get("text-variable-anchor");if(x){let b;b=r._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[f.get("text-radial-offset").evaluate(t,{},o)*ar,$p]:f.get("text-offset").evaluate(t,{},o).map(C=>C*ar);const E=[];for(const C of x)E.push(C,q_(C,b));return new Xr(E)}return null}function Up(r){switch(r){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function lE(r,t,o,l,f,y,x,b,E,C,L){let D=y.textMaxSize.evaluate(t,{});D===void 0&&(D=x);const B=r.layers[0].layout,V=B.get("icon-offset").evaluate(t,{},L),$=W_(o.horizontal),G=x/24,Q=r.tilePixelRatio*G,oe=r.tilePixelRatio*D/24,we=r.tilePixelRatio*b,he=r.tilePixelRatio*B.get("symbol-spacing"),xe=B.get("text-padding")*r.tilePixelRatio,ze=function(Fe,wt,_t,Pt=1){const _i=Fe.get("icon-padding").evaluate(wt,{},_t),mi=_i&&_i.values;return[mi[0]*Pt,mi[1]*Pt,mi[2]*Pt,mi[3]*Pt]}(B,t,L,r.tilePixelRatio),qe=B.get("text-max-angle")/180*Math.PI,st=B.get("text-rotation-alignment")!=="viewport"&&B.get("symbol-placement")!=="point",Tt=B.get("icon-rotation-alignment")==="map"&&B.get("symbol-placement")!=="point",lt=B.get("symbol-placement"),ot=he/2,xt=B.get("icon-text-fit");let gt;l&&xt!=="none"&&(r.allowVerticalPlacement&&o.vertical&&(gt=g_(l,o.vertical,xt,B.get("icon-text-fit-padding"),V,G)),$&&(l=g_(l,$,xt,B.get("icon-text-fit-padding"),V,G)));const ft=(Fe,wt)=>{wt.x<0||wt.x>=Qi||wt.y<0||wt.y>=Qi||function(_t,Pt,_i,mi,fr,Un,Pr,Gi,Qr,en,tn,Wi,pr,Nr,zr,rn,Dr,kn,mn,oi,bi,Mi,bn,Ni,Zl){const To=_t.addToLineVertexArray(Pt,_i);let Co,qn,Ln,vr,ts=0,ku=0,J_=0,Y_=0,Jp=-1,Yp=-1;const is={};let Q_=Ol("");if(_t.allowVerticalPlacement&&mi.vertical){const jr=Gi.layout.get("text-rotate").evaluate(bi,{},Ni)+90;Ln=new bd(Qr,Pt,en,tn,Wi,mi.vertical,pr,Nr,zr,jr),Pr&&(vr=new bd(Qr,Pt,en,tn,Wi,Pr,Dr,kn,zr,jr))}if(fr){const jr=Gi.layout.get("icon-rotate").evaluate(bi,{}),Pn=Gi.layout.get("icon-text-fit")!=="none",La=$_(fr,jr,bn,Pn),co=Pr?$_(Pr,jr,bn,Pn):void 0;qn=new bd(Qr,Pt,en,tn,Wi,fr,Dr,kn,!1,jr),ts=4*La.length;const Pa=_t.iconSizeData;let Ao=null;Pa.kind==="source"?(Ao=[Io*Gi.layout.get("icon-size").evaluate(bi,{})],Ao[0]>Rs&&De(`${_t.layerIds[0]}: Value for "icon-size" is >= ${Tu}. Reduce your "icon-size".`)):Pa.kind==="composite"&&(Ao=[Io*Mi.compositeIconSizes[0].evaluate(bi,{},Ni),Io*Mi.compositeIconSizes[1].evaluate(bi,{},Ni)],(Ao[0]>Rs||Ao[1]>Rs)&&De(`${_t.layerIds[0]}: Value for "icon-size" is >= ${Tu}. Reduce your "icon-size".`)),_t.addSymbols(_t.icon,La,Ao,oi,mn,bi,m.ah.none,Pt,To.lineStartIndex,To.lineLength,-1,Ni),Jp=_t.icon.placedSymbolArray.length-1,co&&(ku=4*co.length,_t.addSymbols(_t.icon,co,Ao,oi,mn,bi,m.ah.vertical,Pt,To.lineStartIndex,To.lineLength,-1,Ni),Yp=_t.icon.placedSymbolArray.length-1)}const e0=Object.keys(mi.horizontal);for(const jr of e0){const Pn=mi.horizontal[jr];if(!Co){Q_=Ol(Pn.text);const co=Gi.layout.get("text-rotate").evaluate(bi,{},Ni);Co=new bd(Qr,Pt,en,tn,Wi,Pn,pr,Nr,zr,co)}const La=Pn.positionedLines.length===1;if(J_+=G_(_t,Pt,Pn,Un,Gi,zr,bi,rn,To,mi.vertical?m.ah.horizontal:m.ah.horizontalOnly,La?e0:[jr],is,Jp,Mi,Ni),La)break}mi.vertical&&(Y_+=G_(_t,Pt,mi.vertical,Un,Gi,zr,bi,rn,To,m.ah.vertical,["vertical"],is,Yp,Mi,Ni));const hE=Co?Co.boxStartIndex:_t.collisionBoxArray.length,dE=Co?Co.boxEndIndex:_t.collisionBoxArray.length,fE=Ln?Ln.boxStartIndex:_t.collisionBoxArray.length,pE=Ln?Ln.boxEndIndex:_t.collisionBoxArray.length,mE=qn?qn.boxStartIndex:_t.collisionBoxArray.length,gE=qn?qn.boxEndIndex:_t.collisionBoxArray.length,yE=vr?vr.boxStartIndex:_t.collisionBoxArray.length,_E=vr?vr.boxEndIndex:_t.collisionBoxArray.length;let lo=-1;const Ed=(jr,Pn)=>jr&&jr.circleDiameter?Math.max(jr.circleDiameter,Pn):Pn;lo=Ed(Co,lo),lo=Ed(Ln,lo),lo=Ed(qn,lo),lo=Ed(vr,lo);const t0=lo>-1?1:0;t0&&(lo*=Zl/ar),_t.glyphOffsetArray.length>=Hl.MAX_GLYPHS&&De("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),bi.sortKey!==void 0&&_t.addToSortKeyRanges(_t.symbolInstances.length,bi.sortKey);const vE=H_(Gi,bi,Ni),[xE,bE]=function(jr,Pn){const La=jr.length,co=Pn==null?void 0:Pn.values;if((co==null?void 0:co.length)>0)for(let Pa=0;Pa=0?is.right:-1,is.center>=0?is.center:-1,is.left>=0?is.left:-1,is.vertical||-1,Jp,Yp,Q_,hE,dE,fE,pE,mE,gE,yE,_E,en,J_,Y_,ts,ku,t0,0,pr,lo,xE,bE)}(r,wt,Fe,o,l,f,gt,r.layers[0],r.collisionBoxArray,t.index,t.sourceLayerIndex,r.index,Q,[xe,xe,xe,xe],st,E,we,ze,Tt,V,t,y,C,L,x)};if(lt==="line")for(const Fe of O_(t.geometry,0,0,Qi,Qi)){const wt=rE(Fe,he,qe,o.vertical||$,l,24,oe,r.overscaling,Qi);for(const _t of wt)$&&cE(r,$.text,ot,_t)||ft(Fe,_t)}else if(lt==="line-center"){for(const Fe of t.geometry)if(Fe.length>1){const wt=iE(Fe,qe,o.vertical||$,l,24,oe);wt&&ft(Fe,wt)}}else if(t.type==="Polygon")for(const Fe of ul(t.geometry,0)){const wt=sE(Fe,16);ft(Fe[0],new Bs(wt.x,wt.y,0))}else if(t.type==="LineString")for(const Fe of t.geometry)ft(Fe,new Bs(Fe[0].x,Fe[0].y,0));else if(t.type==="Point")for(const Fe of t.geometry)for(const wt of Fe)ft([wt],new Bs(wt.x,wt.y,0))}function G_(r,t,o,l,f,y,x,b,E,C,L,D,B,V,$){const G=function(we,he,xe,ze,qe,st,Tt,lt){const ot=ze.layout.get("text-rotate").evaluate(st,{})*Math.PI/180,xt=[];for(const gt of he.positionedLines)for(const ft of gt.positionedGlyphs){if(!ft.rect)continue;const Fe=ft.rect||{};let wt=l_+1,_t=!0,Pt=1,_i=0;const mi=(qe||lt)&&ft.vertical,fr=ft.metrics.advance*ft.scale/2;if(lt&&he.verticalizable&&(_i=gt.lineOffset/2-(ft.imageName?-(ar-ft.metrics.width*ft.scale)/2:(ft.scale-1)*ar)),ft.imageName){const oi=Tt[ft.imageName];_t=oi.sdf,Pt=oi.pixelRatio,wt=pn/Pt}const Un=qe?[ft.x+fr,ft.y]:[0,0];let Pr=qe?[0,0]:[ft.x+fr+xe[0],ft.y+xe[1]-_i],Gi=[0,0];mi&&(Gi=Pr,Pr=[0,0]);const Qr=ft.metrics.isDoubleResolution?2:1,en=(ft.metrics.left-wt)*ft.scale-fr+Pr[0],tn=(-ft.metrics.top-wt)*ft.scale+Pr[1],Wi=en+Fe.w/Qr*ft.scale/Pt,pr=tn+Fe.h/Qr*ft.scale/Pt,Nr=new A(en,tn),zr=new A(Wi,tn),rn=new A(en,pr),Dr=new A(Wi,pr);if(mi){const oi=new A(-fr,fr-Su),bi=-Math.PI/2,Mi=ar/2-fr,bn=new A(5-Su-Mi,-(ft.imageName?Mi:0)),Ni=new A(...Gi);Nr._rotateAround(bi,oi)._add(bn)._add(Ni),zr._rotateAround(bi,oi)._add(bn)._add(Ni),rn._rotateAround(bi,oi)._add(bn)._add(Ni),Dr._rotateAround(bi,oi)._add(bn)._add(Ni)}if(ot){const oi=Math.sin(ot),bi=Math.cos(ot),Mi=[bi,-oi,oi,bi];Nr._matMult(Mi),zr._matMult(Mi),rn._matMult(Mi),Dr._matMult(Mi)}const kn=new A(0,0),mn=new A(0,0);xt.push({tl:Nr,tr:zr,bl:rn,br:Dr,tex:Fe,writingMode:he.writingMode,glyphOffset:Un,sectionIndex:ft.sectionIndex,isSDF:_t,pixelOffsetTL:kn,pixelOffsetBR:mn,minFontScaleX:0,minFontScaleY:0})}return xt}(0,o,b,f,y,x,l,r.allowVerticalPlacement),Q=r.textSizeData;let oe=null;Q.kind==="source"?(oe=[Io*f.layout.get("text-size").evaluate(x,{})],oe[0]>Rs&&De(`${r.layerIds[0]}: Value for "text-size" is >= ${Tu}. Reduce your "text-size".`)):Q.kind==="composite"&&(oe=[Io*V.compositeTextSizes[0].evaluate(x,{},$),Io*V.compositeTextSizes[1].evaluate(x,{},$)],(oe[0]>Rs||oe[1]>Rs)&&De(`${r.layerIds[0]}: Value for "text-size" is >= ${Tu}. Reduce your "text-size".`)),r.addSymbols(r.text,G,oe,b,y,x,C,t,E.lineStartIndex,E.lineLength,B,$);for(const we of L)D[we]=r.text.placedSymbolArray.length-1;return 4*G.length}function W_(r){for(const t in r)return r[t];return null}function cE(r,t,o,l){const f=r.compareText;if(t in f){const y=f[t];for(let x=y.length-1;x>=0;x--)if(l.dist(y[x])>4;if(f!==1)throw new Error(`Got v${f} data when expected v1.`);const y=Z_[15&l];if(!y)throw new Error("Unrecognized array type.");const[x]=new Uint16Array(t,2,1),[b]=new Uint32Array(t,4,1);return new qp(b,x,y,t)}constructor(t,o=64,l=Float64Array,f){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+o,2),65535),this.ArrayType=l,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const y=Z_.indexOf(this.ArrayType),x=2*t*this.ArrayType.BYTES_PER_ELEMENT,b=t*this.IndexArrayType.BYTES_PER_ELEMENT,E=(8-b%8)%8;if(y<0)throw new Error(`Unexpected typed array class: ${l}.`);f&&f instanceof ArrayBuffer?(this.data=f,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+b+E,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+x+b+E),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+b+E,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+y]),new Uint16Array(this.data,2,1)[0]=o,new Uint32Array(this.data,4,1)[0]=t)}add(t,o){const l=this._pos>>1;return this.ids[l]=l,this.coords[this._pos++]=t,this.coords[this._pos++]=o,l}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Hp(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,o,l,f){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:y,coords:x,nodeSize:b}=this,E=[0,y.length-1,0],C=[];for(;E.length;){const L=E.pop()||0,D=E.pop()||0,B=E.pop()||0;if(D-B<=b){for(let Q=B;Q<=D;Q++){const oe=x[2*Q],we=x[2*Q+1];oe>=t&&oe<=l&&we>=o&&we<=f&&C.push(y[Q])}continue}const V=B+D>>1,$=x[2*V],G=x[2*V+1];$>=t&&$<=l&&G>=o&&G<=f&&C.push(y[V]),(L===0?t<=$:o<=G)&&(E.push(B),E.push(V-1),E.push(1-L)),(L===0?l>=$:f>=G)&&(E.push(V+1),E.push(D),E.push(1-L))}return C}within(t,o,l){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:f,coords:y,nodeSize:x}=this,b=[0,f.length-1,0],E=[],C=l*l;for(;b.length;){const L=b.pop()||0,D=b.pop()||0,B=b.pop()||0;if(D-B<=x){for(let Q=B;Q<=D;Q++)K_(y[2*Q],y[2*Q+1],t,o)<=C&&E.push(f[Q]);continue}const V=B+D>>1,$=y[2*V],G=y[2*V+1];K_($,G,t,o)<=C&&E.push(f[V]),(L===0?t-l<=$:o-l<=G)&&(b.push(B),b.push(V-1),b.push(1-L)),(L===0?t+l>=$:o+l>=G)&&(b.push(V+1),b.push(D),b.push(1-L))}return E}}function Hp(r,t,o,l,f,y){if(f-l<=o)return;const x=l+f>>1;X_(r,t,x,l,f,y),Hp(r,t,o,l,x-1,1-y),Hp(r,t,o,x+1,f,1-y)}function X_(r,t,o,l,f,y){for(;f>l;){if(f-l>600){const C=f-l+1,L=o-l+1,D=Math.log(C),B=.5*Math.exp(2*D/3),V=.5*Math.sqrt(D*B*(C-B)/C)*(L-C/2<0?-1:1);X_(r,t,o,Math.max(l,Math.floor(o-L*B/C+V)),Math.min(f,Math.floor(o+(C-L)*B/C+V)),y)}const x=t[2*o+y];let b=l,E=f;for(Au(r,t,l,o),t[2*f+y]>x&&Au(r,t,l,f);bx;)E--}t[2*l+y]===x?Au(r,t,l,E):(E++,Au(r,t,E,f)),E<=o&&(l=E+1),o<=E&&(f=E-1)}}function Au(r,t,o,l){Gp(r,o,l),Gp(t,2*o,2*l),Gp(t,2*o+1,2*l+1)}function Gp(r,t,o){const l=r[t];r[t]=r[o],r[o]=l}function K_(r,t,o,l){const f=r-o,y=t-l;return f*f+y*y}var Wp;m.be=void 0,(Wp=m.be||(m.be={})).create="create",Wp.load="load",Wp.fullLoad="fullLoad";let wd=null,Mu=[];const Zp=1e3/60,Xp="loadTime",Kp="fullLoadTime",uE={mark(r){performance.mark(r)},frame(r){const t=r;wd!=null&&Mu.push(t-wd),wd=t},clearMetrics(){wd=null,Mu=[],performance.clearMeasures(Xp),performance.clearMeasures(Kp);for(const r in m.be)performance.clearMarks(m.be[r])},getPerformanceMetrics(){performance.measure(Xp,m.be.create,m.be.load),performance.measure(Kp,m.be.create,m.be.fullLoad);const r=performance.getEntriesByName(Xp)[0].duration,t=performance.getEntriesByName(Kp)[0].duration,o=Mu.length,l=1/(Mu.reduce((y,x)=>y+x,0)/o/1e3),f=Mu.filter(y=>y>Zp).reduce((y,x)=>y+(x-Zp)/Zp,0);return{loadTime:r,fullLoadTime:t,fps:l,percentDroppedFrames:f/(o+f)*100,totalFrames:o}}};m.$=sr,m.A=Vl,m.B=function(r){if(Xe==null){const t=r.navigator?r.navigator.userAgent:null;Xe=!!r.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return Xe},m.C=class{constructor(r,t){this.target=r,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new eE(()=>this.process()),this.subscription=function(o,l,f,y){return o.addEventListener(l,f,!1),{unsubscribe:()=>{o.removeEventListener(l,f,!1)}}}(this.target,"message",o=>this.receive(o)),this.globalScope=rt(self)?r:window}registerMessageHandler(r,t){this.messageHandlers[r]=t}sendAsync(r,t){return new Promise((o,l)=>{const f=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[f]={resolve:o,reject:l},t&&t.signal.addEventListener("abort",()=>{delete this.resolveRejects[f];const b={id:f,type:"",origin:location.origin,targetMapId:r.targetMapId,sourceMapId:this.mapId};this.target.postMessage(b)},{once:!0});const y=[],x=Object.assign(Object.assign({},r),{id:f,sourceMapId:this.mapId,origin:location.origin,data:Sa(r.data,y)});this.target.postMessage(x,{transfer:y})})}receive(r){const t=r.data,o=t.id;if(!(t.origin!=="file://"&&location.origin!=="file://"&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type===""){delete this.tasks[o];const l=this.abortControllers[o];return delete this.abortControllers[o],void(l&&l.abort())}if(rt(self)||t.mustQueue)return this.tasks[o]=t,this.taskQueue.push(o),void this.invoker.trigger();this.processTask(o,t)}}process(){if(this.taskQueue.length===0)return;const r=this.taskQueue.shift(),t=this.tasks[r];delete this.tasks[r],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(r,t)}processTask(r,t){return c(this,void 0,void 0,function*(){if(t.type===""){const f=this.resolveRejects[r];return delete this.resolveRejects[r],f?void(t.error?f.reject(jn(t.error)):f.resolve(jn(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(r,new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const o=jn(t.data),l=new AbortController;this.abortControllers[r]=l;try{const f=yield this.messageHandlers[t.type](t.sourceMapId,o,l);this.completeTask(r,null,f)}catch(f){this.completeTask(r,f)}})}completeTask(r,t,o){const l=[];delete this.abortControllers[r];const f={id:r,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?Sa(t):null,data:Sa(o,l)};this.target.postMessage(f,{transfer:l})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},m.D=bt,m.E=Be,m.F=function(){var r=new Vl(16);return Vl!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0),r[0]=1,r[5]=1,r[10]=1,r[15]=1,r},m.G=hi,m.H=function(r,t,o){var l,f,y,x,b,E,C,L,D,B,V,$,G=o[0],Q=o[1],oe=o[2];return t===r?(r[12]=t[0]*G+t[4]*Q+t[8]*oe+t[12],r[13]=t[1]*G+t[5]*Q+t[9]*oe+t[13],r[14]=t[2]*G+t[6]*Q+t[10]*oe+t[14],r[15]=t[3]*G+t[7]*Q+t[11]*oe+t[15]):(f=t[1],y=t[2],x=t[3],b=t[4],E=t[5],C=t[6],L=t[7],D=t[8],B=t[9],V=t[10],$=t[11],r[0]=l=t[0],r[1]=f,r[2]=y,r[3]=x,r[4]=b,r[5]=E,r[6]=C,r[7]=L,r[8]=D,r[9]=B,r[10]=V,r[11]=$,r[12]=l*G+b*Q+D*oe+t[12],r[13]=f*G+E*Q+B*oe+t[13],r[14]=y*G+C*Q+V*oe+t[14],r[15]=x*G+L*Q+$*oe+t[15]),r},m.I=Lp,m.J=function(r,t,o){var l=o[0],f=o[1],y=o[2];return r[0]=t[0]*l,r[1]=t[1]*l,r[2]=t[2]*l,r[3]=t[3]*l,r[4]=t[4]*f,r[5]=t[5]*f,r[6]=t[6]*f,r[7]=t[7]*f,r[8]=t[8]*y,r[9]=t[9]*y,r[10]=t[10]*y,r[11]=t[11]*y,r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r},m.K=ky,m.L=function(r,t){const o={};for(let l=0;l{const t=window.document.createElement("video");return t.muted=!0,new Promise(o=>{t.onloadstart=()=>{o(t)};for(const l of r){const f=window.document.createElement("source");cr(l)||(t.crossOrigin="Anonymous"),f.src=l,t.appendChild(f)}})},m.a3=function(){return Ee++},m.a4=Wt,m.a5=Hl,m.a6=Zc,m.a7=Ma,m.a8=xi,m.a9=P_,m.aA=function(r){if(r.type==="custom")return new Q2(r);switch(r.type){case"background":return new K2(r);case"circle":return new Bw(r);case"fill":return new e2(r);case"fill-extrusion":return new m2(r);case"heatmap":return new Vw(r);case"hillshade":return new jw(r);case"line":return new E2(r);case"raster":return new Y2(r);case"symbol":return new gd(r)}},m.aB=Ie,m.aC=function(r,t){if(!r)return[{command:"setStyle",args:[t]}];let o=[];try{if(!We(r.version,t.version))return[{command:"setStyle",args:[t]}];We(r.center,t.center)||o.push({command:"setCenter",args:[t.center]}),We(r.zoom,t.zoom)||o.push({command:"setZoom",args:[t.zoom]}),We(r.bearing,t.bearing)||o.push({command:"setBearing",args:[t.bearing]}),We(r.pitch,t.pitch)||o.push({command:"setPitch",args:[t.pitch]}),We(r.sprite,t.sprite)||o.push({command:"setSprite",args:[t.sprite]}),We(r.glyphs,t.glyphs)||o.push({command:"setGlyphs",args:[t.glyphs]}),We(r.transition,t.transition)||o.push({command:"setTransition",args:[t.transition]}),We(r.light,t.light)||o.push({command:"setLight",args:[t.light]}),We(r.terrain,t.terrain)||o.push({command:"setTerrain",args:[t.terrain]}),We(r.sky,t.sky)||o.push({command:"setSky",args:[t.sky]}),We(r.projection,t.projection)||o.push({command:"setProjection",args:[t.projection]});const l={},f=[];(function(x,b,E,C){let L;for(L in b=b||{},x=x||{})Object.prototype.hasOwnProperty.call(x,L)&&(Object.prototype.hasOwnProperty.call(b,L)||Ze(L,E,C));for(L in b)Object.prototype.hasOwnProperty.call(b,L)&&(Object.prototype.hasOwnProperty.call(x,L)?We(x[L],b[L])||(x[L].type==="geojson"&&b[L].type==="geojson"&&St(x,b,L)?$e(E,{command:"setGeoJSONSourceData",args:[L,b[L].data]}):pt(L,b,E,C)):Qe(L,b,E))})(r.sources,t.sources,f,l);const y=[];r.layers&&r.layers.forEach(x=>{"source"in x&&l[x.source]?o.push({command:"removeLayer",args:[x.id]}):y.push(x)}),o=o.concat(f),function(x,b,E){b=b||[];const C=(x=x||[]).map(Mt),L=b.map(Mt),D=x.reduce(qt,{}),B=b.reduce(qt,{}),V=C.slice(),$=Object.create(null);let G,Q,oe,we,he;for(let xe=0,ze=0;xe@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(o,l,f,y)=>{const x=f||y;return t[l]=!x||x.toLowerCase(),""}),t["max-age"]){const o=parseInt(t["max-age"],10);isNaN(o)?delete t["max-age"]:t["max-age"]=o}return t},m.ab=function(r,t){const o=[];for(const l in r)l in t||o.push(l);return o},m.ac=W,m.ad=function(r,t,o){var l=Math.sin(o),f=Math.cos(o),y=t[0],x=t[1],b=t[2],E=t[3],C=t[4],L=t[5],D=t[6],B=t[7];return t!==r&&(r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[0]=y*f+C*l,r[1]=x*f+L*l,r[2]=b*f+D*l,r[3]=E*f+B*l,r[4]=C*f-y*l,r[5]=L*f-x*l,r[6]=D*f-b*l,r[7]=B*f-E*l,r},m.ae=function(r){var t=new Vl(16);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],t},m.af=sd,m.ag=function(r,t){let o=0,l=0;if(r.kind==="constant")l=r.layoutSize;else if(r.kind!=="source"){const{interpolationType:f,minZoom:y,maxZoom:x}=r,b=f?W(un.interpolationFactor(f,t,y,x),0,1):0;r.kind==="camera"?l=Fr.number(r.minSize,r.maxSize,b):o=b}return{uSizeT:o,uSize:l}},m.ai=function(r,{uSize:t,uSizeT:o},{lowerSize:l,upperSize:f}){return r.kind==="source"?l/Io:r.kind==="composite"?Fr.number(l/Io,f/Io,o):t},m.aj=Rp,m.ak=function(r,t,o,l){const f=t.y-r.y,y=t.x-r.x,x=l.y-o.y,b=l.x-o.x,E=x*y-b*f;if(E===0)return null;const C=(b*(r.y-o.y)-x*(r.x-o.x))/E;return new A(r.x+C*y,r.y+C*f)},m.al=O_,m.am=Sy,m.an=mp,m.ao=function(r){let t=1/0,o=1/0,l=-1/0,f=-1/0;for(const y of r)t=Math.min(t,y.x),o=Math.min(o,y.y),l=Math.max(l,y.x),f=Math.max(f,y.y);return[t,o,l,f]},m.ap=ar,m.ar=Dp,m.as=function(r,t){var o=t[0],l=t[1],f=t[2],y=t[3],x=t[4],b=t[5],E=t[6],C=t[7],L=t[8],D=t[9],B=t[10],V=t[11],$=t[12],G=t[13],Q=t[14],oe=t[15],we=o*b-l*x,he=o*E-f*x,xe=o*C-y*x,ze=l*E-f*b,qe=l*C-y*b,st=f*C-y*E,Tt=L*G-D*$,lt=L*Q-B*$,ot=L*oe-V*$,xt=D*Q-B*G,gt=D*oe-V*G,ft=B*oe-V*Q,Fe=we*ft-he*gt+xe*xt+ze*ot-qe*lt+st*Tt;return Fe?(r[0]=(b*ft-E*gt+C*xt)*(Fe=1/Fe),r[1]=(f*gt-l*ft-y*xt)*Fe,r[2]=(G*st-Q*qe+oe*ze)*Fe,r[3]=(B*qe-D*st-V*ze)*Fe,r[4]=(E*ot-x*ft-C*lt)*Fe,r[5]=(o*ft-f*ot+y*lt)*Fe,r[6]=(Q*xe-$*st-oe*he)*Fe,r[7]=(L*st-B*xe+V*he)*Fe,r[8]=(x*gt-b*ot+C*Tt)*Fe,r[9]=(l*ot-o*gt-y*Tt)*Fe,r[10]=($*qe-G*xe+oe*we)*Fe,r[11]=(D*xe-L*qe-V*we)*Fe,r[12]=(b*lt-x*xt-E*Tt)*Fe,r[13]=(o*xt-l*lt+f*Tt)*Fe,r[14]=(G*he-$*ze-Q*we)*Fe,r[15]=(L*ze-D*he+B*we)*Fe,r):null},m.at=Up,m.au=zp,m.av=qp,m.aw=function(){const r={},t=ae.$version;for(const o in ae.$root){const l=ae.$root[o];if(l.required){let f=null;f=o==="version"?t:l.type==="array"?[]:{},f!=null&&(r[o]=f)}}return r},m.ax=Zh,m.ay=Di,m.az=function(r){r=r.slice();const t=Object.create(null);for(let o=0;oft*ar)}let lt=x?"center":o.get("text-justify").evaluate(C,{},r.canonical);const ot=o.get("symbol-placement")==="point"?o.get("text-max-width").evaluate(C,{},r.canonical)*ar:1/0,xt=()=>{r.bucket.allowVerticalPlacement&&ou(xe)&&($.vertical=fd(G,r.glyphMap,r.glyphPositions,r.imagePositions,L,ot,y,st,"left",qe,oe,m.ah.vertical,!0,B,D))};if(!x&&Tt){const gt=new Set;if(lt==="auto")for(let Fe=0;Fec(void 0,void 0,void 0,function*(){if(r.byteLength===0)return createImageBitmap(new ImageData(1,1));const t=new Blob([new Uint8Array(r)],{type:"image/png"});try{return createImageBitmap(t)}catch(o){throw new Error(`Could not load image because of ${o.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),m.e=Se,m.f=r=>new Promise((t,o)=>{const l=new Image;l.onload=()=>{t(l),URL.revokeObjectURL(l.src),l.onload=null,window.requestAnimationFrame(()=>{l.src=nt})},l.onerror=()=>o(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 f=new Blob([new Uint8Array(r)],{type:"image/png"});l.src=r.byteLength?URL.createObjectURL(f):nt}),m.g=zi,m.h=(r,t)=>Or(Se(r,{type:"json"}),t),m.i=rt,m.j=ge,m.k=ce,m.l=(r,t)=>Or(Se(r,{type:"arrayBuffer"}),t),m.m=Or,m.n=function(r){return new Mp(r).readFields(F2,[])},m.o=yu,m.p=c_,m.q=d,m.r=ap,m.s=cr,m.t=nu,m.u=ct,m.v=ae,m.w=De,m.x=wa,m.y=function([r,t,o]){return t+=90,t*=Math.PI/180,o*=Math.PI/180,{x:r*Math.cos(t)*Math.sin(o),y:r*Math.sin(t)*Math.sin(o),z:r*Math.cos(o)}},m.z=Fr}),h("worker",["./shared"],function(m){class c{constructor(F){this.keyCache={},F&&this.replace(F)}replace(F){this._layerConfigs={},this._layers={},this.update(F,[])}update(F,N){for(const re of F){this._layerConfigs[re.id]=re;const de=this._layers[re.id]=m.aA(re);de._featureFilter=m.a6(de.filter),this.keyCache[re.id]&&delete this.keyCache[re.id]}for(const re of N)delete this.keyCache[re],delete this._layerConfigs[re],delete this._layers[re];this.familiesBySource={};const U=m.bi(Object.values(this._layerConfigs),this.keyCache);for(const re of U){const de=re.map(Oe=>this._layers[Oe.id]),_e=de[0];if(_e.visibility==="none")continue;const be=_e.source||"";let ue=this.familiesBySource[be];ue||(ue=this.familiesBySource[be]={});const Me=_e.sourceLayer||"_geojsonTileLayer";let Ue=ue[Me];Ue||(Ue=ue[Me]=[]),Ue.push(de)}}}class I{constructor(F){const N={},U=[];for(const be in F){const ue=F[be],Me=N[be]={};for(const Ue in ue){const Oe=ue[+Ue];if(!Oe||Oe.bitmap.width===0||Oe.bitmap.height===0)continue;const Re={x:0,y:0,w:Oe.bitmap.width+2,h:Oe.bitmap.height+2};U.push(Re),Me[Ue]={rect:Re,metrics:Oe.metrics}}}const{w:re,h:de}=m.p(U),_e=new m.o({width:re||1,height:de||1});for(const be in F){const ue=F[be];for(const Me in ue){const Ue=ue[+Me];if(!Ue||Ue.bitmap.width===0||Ue.bitmap.height===0)continue;const Oe=N[be][Me].rect;m.o.copy(Ue.bitmap,_e,{x:0,y:0},{x:Oe.x+1,y:Oe.y+1},Ue.bitmap)}}this.image=_e,this.positions=N}}m.bj("GlyphAtlas",I);class k{constructor(F){this.tileID=new m.Q(F.tileID.overscaledZ,F.tileID.wrap,F.tileID.canonical.z,F.tileID.canonical.x,F.tileID.canonical.y),this.uid=F.uid,this.zoom=F.zoom,this.pixelRatio=F.pixelRatio,this.tileSize=F.tileSize,this.source=F.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=F.showCollisionBoxes,this.collectResourceTiming=!!F.collectResourceTiming,this.returnDependencies=!!F.returnDependencies,this.promoteId=F.promoteId,this.inFlightDependencies=[]}parse(F,N,U,re){return m._(this,void 0,void 0,function*(){this.status="parsing",this.data=F,this.collisionBoxArray=new m.a4;const de=new m.bk(Object.keys(F.layers).sort()),_e=new m.bl(this.tileID,this.promoteId);_e.bucketLayerIDs=[];const be={},ue={featureIndex:_e,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:U},Me=N.familiesBySource[this.source];for(const Gt in Me){const Ri=F.layers[Gt];if(!Ri)continue;Ri.version===1&&m.w(`Vector tile source "${this.source}" layer "${Gt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const nr=de.encode(Gt),Wr=[];for(let ln=0;ln=or.maxzoom||or.visibility!=="none"&&(M(ln,this.zoom,U),(be[or.id]=or.createBucket({index:_e.bucketLayerIDs.length,layers:ln,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:nr,sourceID:this.source})).populate(Wr,ue,this.tileID.canonical),_e.bucketLayerIDs.push(ln.map(ms=>ms.id)))}}const Ue=m.aF(ue.glyphDependencies,Gt=>Object.keys(Gt).map(Number));this.inFlightDependencies.forEach(Gt=>Gt==null?void 0:Gt.abort()),this.inFlightDependencies=[];let Oe=Promise.resolve({});if(Object.keys(Ue).length){const Gt=new AbortController;this.inFlightDependencies.push(Gt),Oe=re.sendAsync({type:"GG",data:{stacks:Ue,source:this.source,tileID:this.tileID,type:"glyphs"}},Gt)}const Re=Object.keys(ue.iconDependencies);let It=Promise.resolve({});if(Re.length){const Gt=new AbortController;this.inFlightDependencies.push(Gt),It=re.sendAsync({type:"GI",data:{icons:Re,source:this.source,tileID:this.tileID,type:"icons"}},Gt)}const Et=Object.keys(ue.patternDependencies);let Jt=Promise.resolve({});if(Et.length){const Gt=new AbortController;this.inFlightDependencies.push(Gt),Jt=re.sendAsync({type:"GI",data:{icons:Et,source:this.source,tileID:this.tileID,type:"patterns"}},Gt)}const[Dt,ti,fi]=yield Promise.all([Oe,It,Jt]),Ii=new I(Dt),Ji=new m.bm(ti,fi);for(const Gt in be){const Ri=be[Gt];Ri instanceof m.a5?(M(Ri.layers,this.zoom,U),m.bn({bucket:Ri,glyphMap:Dt,glyphPositions:Ii.positions,imageMap:ti,imagePositions:Ji.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Ri.hasPattern&&(Ri instanceof m.bo||Ri instanceof m.bp||Ri instanceof m.bq)&&(M(Ri.layers,this.zoom,U),Ri.addFeatures(ue,this.tileID.canonical,Ji.patternPositions))}return this.status="done",{buckets:Object.values(be).filter(Gt=>!Gt.isEmpty()),featureIndex:_e,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ii.image,imageAtlas:Ji,glyphMap:this.returnDependencies?Dt:null,iconMap:this.returnDependencies?ti:null,glyphPositions:this.returnDependencies?Ii.positions:null}})}}function M(te,F,N){const U=new m.a8(F);for(const re of te)re.recalculate(U,N)}class A{constructor(F,N,U){this.actor=F,this.layerIndex=N,this.availableImages=U,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(F,N){return m._(this,void 0,void 0,function*(){const U=yield m.l(F.request,N);try{return{vectorTile:new m.br.VectorTile(new m.bs(U.data)),rawData:U.data,cacheControl:U.cacheControl,expires:U.expires}}catch(re){const de=new Uint8Array(U.data);let _e=`Unable to parse the tile at ${F.request.url}, `;throw _e+=de[0]===31&&de[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${re.message}`,new Error(_e)}})}loadTile(F){return m._(this,void 0,void 0,function*(){const N=F.uid,U=!!(F&&F.request&&F.request.collectResourceTiming)&&new m.bt(F.request),re=new k(F);this.loading[N]=re;const de=new AbortController;re.abort=de;try{const _e=yield this.loadVectorTile(F,de);if(delete this.loading[N],!_e)return null;const be=_e.rawData,ue={};_e.expires&&(ue.expires=_e.expires),_e.cacheControl&&(ue.cacheControl=_e.cacheControl);const Me={};if(U){const Oe=U.finish();Oe&&(Me.resourceTiming=JSON.parse(JSON.stringify(Oe)))}re.vectorTile=_e.vectorTile;const Ue=re.parse(_e.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[N]=re,this.fetching[N]={rawTileData:be,cacheControl:ue,resourceTiming:Me};try{const Oe=yield Ue;return m.e({rawTileData:be.slice(0)},Oe,ue,Me)}finally{delete this.fetching[N]}}catch(_e){throw delete this.loading[N],re.status="done",this.loaded[N]=re,_e}})}reloadTile(F){return m._(this,void 0,void 0,function*(){const N=F.uid;if(!this.loaded||!this.loaded[N])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const U=this.loaded[N];if(U.showCollisionBoxes=F.showCollisionBoxes,U.status==="parsing"){const re=yield U.parse(U.vectorTile,this.layerIndex,this.availableImages,this.actor);let de;if(this.fetching[N]){const{rawTileData:_e,cacheControl:be,resourceTiming:ue}=this.fetching[N];delete this.fetching[N],de=m.e({rawTileData:_e.slice(0)},re,be,ue)}else de=re;return de}if(U.status==="done"&&U.vectorTile)return U.parse(U.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(F){return m._(this,void 0,void 0,function*(){const N=this.loading,U=F.uid;N&&N[U]&&N[U].abort&&(N[U].abort.abort(),delete N[U])})}removeTile(F){return m._(this,void 0,void 0,function*(){this.loaded&&this.loaded[F.uid]&&delete this.loaded[F.uid]})}}class z{constructor(){this.loaded={}}loadTile(F){return m._(this,void 0,void 0,function*(){const{uid:N,encoding:U,rawImageData:re,redFactor:de,greenFactor:_e,blueFactor:be,baseShift:ue}=F,Me=re.width+2,Ue=re.height+2,Oe=m.b(re)?new m.R({width:Me,height:Ue},yield m.bu(re,-1,-1,Me,Ue)):re,Re=new m.bv(N,Oe,U,de,_e,be,ue);return this.loaded=this.loaded||{},this.loaded[N]=Re,Re})}removeTile(F){const N=this.loaded,U=F.uid;N&&N[U]&&delete N[U]}}function q(te,F){if(te.length!==0){K(te[0],F);for(var N=1;N=Math.abs(be)?N-ue+be:be-ue+N,N=ue}N+U>=0!=!!F&&te.reverse()}var J=m.bw(function te(F,N){var U,re=F&&F.type;if(re==="FeatureCollection")for(U=0;U>31}function rt(te,F){for(var N=te.loadGeometry(),U=te.type,re=0,de=0,_e=N.length,be=0;be<_e;be++){var ue=N[be],Me=1;U===1&&(Me=ue.length),F.writeVarint(De(1,Me));for(var Ue=U===3?ue.length-1:ue.length,Oe=0;Oete},ei=Math.fround||($t=new Float32Array(1),te=>($t[0]=+te,$t[0]));var $t;const Vt=3,Nt=5,Ei=6;class Xi{constructor(F){this.options=Object.assign(Object.create(nt),F),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(F){const{log:N,minZoom:U,maxZoom:re}=this.options;N&&console.time("total time");const de=`prepare ${F.length} points`;N&&console.time(de),this.points=F;const _e=[];for(let ue=0;ue=U;ue--){const Me=+Date.now();be=this.trees[ue]=this._createTree(this._cluster(be,ue)),N&&console.log("z%d: %d clusters in %dms",ue,be.numItems,+Date.now()-Me)}return N&&console.timeEnd("total time"),this}getClusters(F,N){let U=((F[0]+180)%360+360)%360-180;const re=Math.max(-90,Math.min(90,F[1]));let de=F[2]===180?180:((F[2]+180)%360+360)%360-180;const _e=Math.max(-90,Math.min(90,F[3]));if(F[2]-F[0]>=360)U=-180,de=180;else if(U>de){const Oe=this.getClusters([U,re,180,_e],N),Re=this.getClusters([-180,re,de,_e],N);return Oe.concat(Re)}const be=this.trees[this._limitZoom(N)],ue=be.range(Li(U),Di(_e),Li(de),Di(re)),Me=be.data,Ue=[];for(const Oe of ue){const Re=this.stride*Oe;Ue.push(Me[Re+Nt]>1?zi(Me,Re,this.clusterProps):this.points[Me[Re+Vt]])}return Ue}getChildren(F){const N=this._getOriginId(F),U=this._getOriginZoom(F),re="No cluster with the specified id.",de=this.trees[U];if(!de)throw new Error(re);const _e=de.data;if(N*this.stride>=_e.length)throw new Error(re);const be=this.options.radius/(this.options.extent*Math.pow(2,U-1)),ue=de.within(_e[N*this.stride],_e[N*this.stride+1],be),Me=[];for(const Ue of ue){const Oe=Ue*this.stride;_e[Oe+4]===F&&Me.push(_e[Oe+Nt]>1?zi(_e,Oe,this.clusterProps):this.points[_e[Oe+Vt]])}if(Me.length===0)throw new Error(re);return Me}getLeaves(F,N,U){const re=[];return this._appendLeaves(re,F,N=N||10,U=U||0,0),re}getTile(F,N,U){const re=this.trees[this._limitZoom(F)],de=Math.pow(2,F),{extent:_e,radius:be}=this.options,ue=be/_e,Me=(U-ue)/de,Ue=(U+1+ue)/de,Oe={features:[]};return this._addTileFeatures(re.range((N-ue)/de,Me,(N+1+ue)/de,Ue),re.data,N,U,de,Oe),N===0&&this._addTileFeatures(re.range(1-ue/de,Me,1,Ue),re.data,de,U,de,Oe),N===de-1&&this._addTileFeatures(re.range(0,Me,ue/de,Ue),re.data,-1,U,de,Oe),Oe.features.length?Oe:null}getClusterExpansionZoom(F){let N=this._getOriginZoom(F)-1;for(;N<=this.options.maxZoom;){const U=this.getChildren(F);if(N++,U.length!==1)break;F=U[0].properties.cluster_id}return N}_appendLeaves(F,N,U,re,de){const _e=this.getChildren(N);for(const be of _e){const ue=be.properties;if(ue&&ue.cluster?de+ue.point_count<=re?de+=ue.point_count:de=this._appendLeaves(F,ue.cluster_id,U,re,de):de1;let Ue,Oe,Re;if(Me)Ue=hi(N,ue,this.clusterProps),Oe=N[ue],Re=N[ue+1];else{const Jt=this.points[N[ue+Vt]];Ue=Jt.properties;const[Dt,ti]=Jt.geometry.coordinates;Oe=Li(Dt),Re=Di(ti)}const It={type:1,geometry:[[Math.round(this.options.extent*(Oe*de-U)),Math.round(this.options.extent*(Re*de-re))]],tags:Ue};let Et;Et=Me||this.options.generateId?N[ue+Vt]:this.points[N[ue+Vt]].id,Et!==void 0&&(It.id=Et),_e.features.push(It)}}_limitZoom(F){return Math.max(this.options.minZoom,Math.min(Math.floor(+F),this.options.maxZoom+1))}_cluster(F,N){const{radius:U,extent:re,reduce:de,minPoints:_e}=this.options,be=U/(re*Math.pow(2,N)),ue=F.data,Me=[],Ue=this.stride;for(let Oe=0;OeN&&(Dt+=ue[fi+Nt])}if(Dt>Jt&&Dt>=_e){let ti,fi=Re*Jt,Ii=It*Jt,Ji=-1;const Gt=((Oe/Ue|0)<<5)+(N+1)+this.points.length;for(const Ri of Et){const nr=Ri*Ue;if(ue[nr+2]<=N)continue;ue[nr+2]=N;const Wr=ue[nr+Nt];fi+=ue[nr]*Wr,Ii+=ue[nr+1]*Wr,ue[nr+4]=Gt,de&&(ti||(ti=this._map(ue,Oe,!0),Ji=this.clusterProps.length,this.clusterProps.push(ti)),de(ti,this._map(ue,nr)))}ue[Oe+4]=Gt,Me.push(fi/Dt,Ii/Dt,1/0,Gt,-1,Dt),de&&Me.push(Ji)}else{for(let ti=0;ti1)for(const ti of Et){const fi=ti*Ue;if(!(ue[fi+2]<=N)){ue[fi+2]=N;for(let Ii=0;Ii>5}_getOriginZoom(F){return(F-this.points.length)%32}_map(F,N,U){if(F[N+Nt]>1){const _e=this.clusterProps[F[N+Ei]];return U?Object.assign({},_e):_e}const re=this.points[F[N+Vt]].properties,de=this.options.map(re);return U&&de===re?Object.assign({},de):de}}function zi(te,F,N){return{type:"Feature",id:te[F+Vt],properties:hi(te,F,N),geometry:{type:"Point",coordinates:[(U=te[F],360*(U-.5)),Or(te[F+1])]}};var U}function hi(te,F,N){const U=te[F+Nt],re=U>=1e4?`${Math.round(U/1e3)}k`:U>=1e3?Math.round(U/100)/10+"k":U,de=te[F+Ei],_e=de===-1?{}:Object.assign({},N[de]);return Object.assign(_e,{cluster:!0,cluster_id:te[F+Vt],point_count:U,point_count_abbreviated:re})}function Li(te){return te/360+.5}function Di(te){const F=Math.sin(te*Math.PI/180),N=.5-.25*Math.log((1+F)/(1-F))/Math.PI;return N<0?0:N>1?1:N}function Or(te){const F=(180-360*te)*Math.PI/180;return 360*Math.atan(Math.exp(F))/Math.PI-90}function cr(te,F,N,U){for(var re,de=U,_e=N-F>>1,be=N-F,ue=te[F],Me=te[F+1],Ue=te[N],Oe=te[N+1],Re=F+3;Rede)re=Re,de=It;else if(It===de){var Et=Math.abs(Re-_e);EtU&&(re-F>3&&cr(te,F,re,U),te[re+2]=de,N-re>3&&cr(te,re,N,U))}function Br(te,F,N,U,re,de){var _e=re-N,be=de-U;if(_e!==0||be!==0){var ue=((te-N)*_e+(F-U)*be)/(_e*_e+be*be);ue>1?(N=re,U=de):ue>0&&(N+=_e*ue,U+=be*ue)}return(_e=te-N)*_e+(be=F-U)*be}function rr(te,F,N,U){var re={id:te===void 0?null:te,type:F,geometry:N,tags:U,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(de){var _e=de.geometry,be=de.type;if(be==="Point"||be==="MultiPoint"||be==="LineString")ce(de,_e);else if(be==="Polygon"||be==="MultiLineString")for(var ue=0;ue<_e.length;ue++)ce(de,_e[ue]);else if(be==="MultiPolygon")for(ue=0;ue<_e.length;ue++)for(var Me=0;Me<_e[ue].length;Me++)ce(de,_e[ue][Me])}(re),re}function ce(te,F){for(var N=0;N0&&(_e+=U?(re*Me-ue*de)/2:Math.sqrt(Math.pow(ue-re,2)+Math.pow(Me-de,2))),re=ue,de=Me}var Ue=F.length-3;F[2]=1,cr(F,0,Ue,N),F[Ue+2]=1,F.size=Math.abs(_e),F.start=0,F.end=F.size}function He(te,F,N,U){for(var re=0;re1?1:N}function $e(te,F,N,U,re,de,_e,be){if(U/=F,de>=(N/=F)&&_e=U)return null;for(var ue=[],Me=0;Me=N&&Et=U)){var Jt=[];if(Re==="Point"||Re==="MultiPoint")Qe(Oe,Jt,N,U,re);else if(Re==="LineString")Ze(Oe,Jt,N,U,re,!1,be.lineMetrics);else if(Re==="MultiLineString")St(Oe,Jt,N,U,re,!1);else if(Re==="Polygon")St(Oe,Jt,N,U,re,!0);else if(Re==="MultiPolygon")for(var Dt=0;Dt=N&&_e<=U&&(F.push(te[de]),F.push(te[de+1]),F.push(te[de+2]))}}function Ze(te,F,N,U,re,de,_e){for(var be,ue,Me=pt(te),Ue=re===0?Mt:qt,Oe=te.start,Re=0;ReN&&(ue=Ue(Me,It,Et,Dt,ti,N),_e&&(Me.start=Oe+be*ue)):fi>U?Ii=N&&(ue=Ue(Me,It,Et,Dt,ti,N),Ji=!0),Ii>U&&fi<=U&&(ue=Ue(Me,It,Et,Dt,ti,U),Ji=!0),!de&&Ji&&(_e&&(Me.end=Oe+be*ue),F.push(Me),Me=pt(te)),_e&&(Oe+=be)}var Gt=te.length-3;It=te[Gt],Et=te[Gt+1],Jt=te[Gt+2],(fi=re===0?It:Et)>=N&&fi<=U&&vt(Me,It,Et,Jt),Gt=Me.length-3,de&&Gt>=3&&(Me[Gt]!==Me[0]||Me[Gt+1]!==Me[1])&&vt(Me,Me[0],Me[1],Me[2]),Me.length&&F.push(Me)}function pt(te){var F=[];return F.size=te.size,F.start=te.start,F.end=te.end,F}function St(te,F,N,U,re,de){for(var _e=0;_e_e.maxX&&(_e.maxX=Ue),Oe>_e.maxY&&(_e.maxY=Oe)}return _e}function Ye(te,F,N,U){var re=F.geometry,de=F.type,_e=[];if(de==="Point"||de==="MultiPoint")for(var be=0;be0&&F.size<(re?_e:U))N.numPoints+=F.length/3;else{for(var be=[],ue=0;ue_e)&&(N.numSimplified++,be.push(F[ue]),be.push(F[ue+1])),N.numPoints++;re&&function(Me,Ue){for(var Oe=0,Re=0,It=Me.length,Et=It-2;Re0===Ue)for(Re=0,It=Me.length;Re24)throw new Error("maxZoom should be in the 0-24 range");if(F.promoteId&&F.generateId)throw new Error("promoteId and generateId cannot be used together.");var U=function(re,de){var _e=[];if(re.type==="FeatureCollection")for(var be=0;be1&&console.time("creation"),Re=this.tiles[Oe]=Gr(te,F,N,U,ue),this.tileCoords.push({z:F,x:N,y:U}),Me)){Me>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",F,N,U,Re.numFeatures,Re.numPoints,Re.numSimplified),console.timeEnd("creation"));var It="z"+F;this.stats[It]=(this.stats[It]||0)+1,this.total++}if(Re.source=te,re){if(F===ue.maxZoom||F===re)continue;var Et=1<1&&console.time("clipping");var Jt,Dt,ti,fi,Ii,Ji,Gt=.5*ue.buffer/ue.extent,Ri=.5-Gt,nr=.5+Gt,Wr=1+Gt;Jt=Dt=ti=fi=null,Ii=$e(te,Ue,N-Gt,N+nr,0,Re.minX,Re.maxX,ue),Ji=$e(te,Ue,N+Ri,N+Wr,0,Re.minX,Re.maxX,ue),te=null,Ii&&(Jt=$e(Ii,Ue,U-Gt,U+nr,1,Re.minY,Re.maxY,ue),Dt=$e(Ii,Ue,U+Ri,U+Wr,1,Re.minY,Re.maxY,ue),Ii=null),Ji&&(ti=$e(Ji,Ue,U-Gt,U+nr,1,Re.minY,Re.maxY,ue),fi=$e(Ji,Ue,U+Ri,U+Wr,1,Re.minY,Re.maxY,ue),Ji=null),Me>1&&console.timeEnd("clipping"),be.push(Jt||[],F+1,2*N,2*U),be.push(Dt||[],F+1,2*N,2*U+1),be.push(ti||[],F+1,2*N+1,2*U),be.push(fi||[],F+1,2*N+1,2*U+1)}}},zt.prototype.getTile=function(te,F,N){var U=this.options,re=U.extent,de=U.debug;if(te<0||te>24)return null;var _e=1<1&&console.log("drilling down to z%d-%d-%d",te,F,N);for(var ue,Me=te,Ue=F,Oe=N;!ue&&Me>0;)Me--,Ue=Math.floor(Ue/2),Oe=Math.floor(Oe/2),ue=this.tiles[di(Me,Ue,Oe)];return ue&&ue.source?(de>1&&console.log("found parent tile z%d-%d-%d",Me,Ue,Oe),de>1&&console.time("drilling down"),this.splitTile(ue.source,Me,Ue,Oe,te,F,N),de>1&&console.timeEnd("drilling down"),this.tiles[be]?si(this.tiles[be],re):null):null};class to extends A{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(F,N){return m._(this,void 0,void 0,function*(){const U=F.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const re=this._geoJSONIndex.getTile(U.z,U.x,U.y);if(!re)return null;const de=new class{constructor(be){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=m.W,this.length=be.length,this._features=be}feature(be){return new class{constructor(ue){this._feature=ue,this.extent=m.W,this.type=ue.type,this.properties=ue.tags,"id"in ue&&!isNaN(ue.id)&&(this.id=parseInt(ue.id,10))}loadGeometry(){if(this._feature.type===1){const ue=[];for(const Me of this._feature.geometry)ue.push([new m.P(Me[0],Me[1])]);return ue}{const ue=[];for(const Me of this._feature.geometry){const Ue=[];for(const Oe of Me)Ue.push(new m.P(Oe[0],Oe[1]));ue.push(Ue)}return ue}}toGeoJSON(ue,Me,Ue){return se.call(this,ue,Me,Ue)}}(this._features[be])}}(re.features);let _e=dt(de);return _e.byteOffset===0&&_e.byteLength===_e.buffer.byteLength||(_e=new Uint8Array(_e)),{vectorTile:de,rawData:_e.buffer}})}loadData(F){return m._(this,void 0,void 0,function*(){var N;(N=this._pendingRequest)===null||N===void 0||N.abort();const U=!!(F&&F.request&&F.request.collectResourceTiming)&&new m.bt(F.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(F,this._pendingRequest),this._geoJSONIndex=F.cluster?new Xi(function({superclusterOptions:de,clusterProperties:_e}){if(!_e||!de)return de;const be={},ue={},Me={accumulated:null,zoom:0},Ue={properties:null},Oe=Object.keys(_e);for(const Re of Oe){const[It,Et]=_e[Re],Jt=m.bA(Et),Dt=m.bA(typeof It=="string"?[It,["accumulated"],["get",Re]]:It);be[Re]=Jt.value,ue[Re]=Dt.value}return de.map=Re=>{Ue.properties=Re;const It={};for(const Et of Oe)It[Et]=be[Et].evaluate(Me,Ue);return It},de.reduce=(Re,It)=>{Ue.properties=It;for(const Et of Oe)Me.accumulated=Re[Et],Re[Et]=ue[Et].evaluate(Me,Ue)},de}(F)).load((yield this._pendingData).features):new zt(yield this._pendingData,F.geojsonVtOptions),this.loaded={};const re={};if(U){const de=U.finish();de&&(re.resourceTiming={},re.resourceTiming[F.source]=JSON.parse(JSON.stringify(de)))}return re}catch(re){if(delete this._pendingRequest,m.bz(re))return{abandoned:!0};throw re}})}getData(){return m._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(F){const N=this.loaded;return N&&N[F.uid]?super.reloadTile(F):this.loadTile(F)}loadAndProcessGeoJSON(F,N){return m._(this,void 0,void 0,function*(){let U=yield this.loadGeoJSON(F,N);if(delete this._pendingRequest,typeof U!="object")throw new Error(`Input data given to '${F.source}' is not a valid GeoJSON object.`);if(J(U,!0),F.filter){const re=m.bA(F.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(re.result==="error")throw new Error(re.value.map(_e=>`${_e.key}: ${_e.message}`).join(", "));U={type:"FeatureCollection",features:U.features.filter(_e=>re.value.evaluate({zoom:0},_e))}}return U})}loadGeoJSON(F,N){return m._(this,void 0,void 0,function*(){const{promoteId:U}=F;if(F.request){const re=yield m.h(F.request,N);return this._dataUpdateable=Bt(re.data,U)?eo(re.data,U):void 0,re.data}if(typeof F.data=="string")try{const re=JSON.parse(F.data);return this._dataUpdateable=Bt(re,U)?eo(re,U):void 0,re}catch{throw new Error(`Input data given to '${F.source}' is not a valid GeoJSON object.`)}if(!F.dataDiff)throw new Error(`Input data given to '${F.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${F.source}`);return function(re,de,_e){var be,ue,Me,Ue;if(de.removeAll&&re.clear(),de.remove)for(const Oe of de.remove)re.delete(Oe);if(de.add)for(const Oe of de.add){const Re=Si(Oe,_e);Re!=null&&re.set(Re,Oe)}if(de.update)for(const Oe of de.update){let Re=re.get(Oe.id);if(Re==null)continue;const It=!Oe.removeAllProperties&&(((be=Oe.removeProperties)===null||be===void 0?void 0:be.length)>0||((ue=Oe.addOrUpdateProperties)===null||ue===void 0?void 0:ue.length)>0);if((Oe.newGeometry||Oe.removeAllProperties||It)&&(Re=Object.assign({},Re),re.set(Oe.id,Re),It&&(Re.properties=Object.assign({},Re.properties))),Oe.newGeometry&&(Re.geometry=Oe.newGeometry),Oe.removeAllProperties)Re.properties={};else if(((Me=Oe.removeProperties)===null||Me===void 0?void 0:Me.length)>0)for(const Et of Oe.removeProperties)Object.prototype.hasOwnProperty.call(Re.properties,Et)&&delete Re.properties[Et];if(((Ue=Oe.addOrUpdateProperties)===null||Ue===void 0?void 0:Ue.length)>0)for(const{key:Et,value:Jt}of Oe.addOrUpdateProperties)Re.properties[Et]=Jt}}(this._dataUpdateable,F.dataDiff,U),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(F){return m._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(F){return this._geoJSONIndex.getClusterExpansionZoom(F.clusterId)}getClusterChildren(F){return this._geoJSONIndex.getChildren(F.clusterId)}getClusterLeaves(F){return this._geoJSONIndex.getLeaves(F.clusterId,F.limit,F.offset)}}class hr{constructor(F){this.self=F,this.actor=new m.C(F),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(N,U)=>{if(this.externalWorkerSourceTypes[N])throw new Error(`Worker source with name "${N}" already registered.`);this.externalWorkerSourceTypes[N]=U},this.self.addProtocol=m.bg,this.self.removeProtocol=m.bh,this.self.registerRTLTextPlugin=N=>{if(m.bB.isParsed())throw new Error("RTL text plugin already registered.");m.bB.setMethods(N)},this.actor.registerMessageHandler("LDT",(N,U)=>this._getDEMWorkerSource(N,U.source).loadTile(U)),this.actor.registerMessageHandler("RDT",(N,U)=>m._(this,void 0,void 0,function*(){this._getDEMWorkerSource(N,U.source).removeTile(U)})),this.actor.registerMessageHandler("GCEZ",(N,U)=>m._(this,void 0,void 0,function*(){return this._getWorkerSource(N,U.type,U.source).getClusterExpansionZoom(U)})),this.actor.registerMessageHandler("GCC",(N,U)=>m._(this,void 0,void 0,function*(){return this._getWorkerSource(N,U.type,U.source).getClusterChildren(U)})),this.actor.registerMessageHandler("GCL",(N,U)=>m._(this,void 0,void 0,function*(){return this._getWorkerSource(N,U.type,U.source).getClusterLeaves(U)})),this.actor.registerMessageHandler("LD",(N,U)=>this._getWorkerSource(N,U.type,U.source).loadData(U)),this.actor.registerMessageHandler("GD",(N,U)=>this._getWorkerSource(N,U.type,U.source).getData()),this.actor.registerMessageHandler("LT",(N,U)=>this._getWorkerSource(N,U.type,U.source).loadTile(U)),this.actor.registerMessageHandler("RT",(N,U)=>this._getWorkerSource(N,U.type,U.source).reloadTile(U)),this.actor.registerMessageHandler("AT",(N,U)=>this._getWorkerSource(N,U.type,U.source).abortTile(U)),this.actor.registerMessageHandler("RMT",(N,U)=>this._getWorkerSource(N,U.type,U.source).removeTile(U)),this.actor.registerMessageHandler("RS",(N,U)=>m._(this,void 0,void 0,function*(){if(!this.workerSources[N]||!this.workerSources[N][U.type]||!this.workerSources[N][U.type][U.source])return;const re=this.workerSources[N][U.type][U.source];delete this.workerSources[N][U.type][U.source],re.removeSource!==void 0&&re.removeSource(U)})),this.actor.registerMessageHandler("RM",N=>m._(this,void 0,void 0,function*(){delete this.layerIndexes[N],delete this.availableImages[N],delete this.workerSources[N],delete this.demWorkerSources[N]})),this.actor.registerMessageHandler("SR",(N,U)=>m._(this,void 0,void 0,function*(){this.referrer=U})),this.actor.registerMessageHandler("SRPS",(N,U)=>this._syncRTLPluginState(N,U)),this.actor.registerMessageHandler("IS",(N,U)=>m._(this,void 0,void 0,function*(){this.self.importScripts(U)})),this.actor.registerMessageHandler("SI",(N,U)=>this._setImages(N,U)),this.actor.registerMessageHandler("UL",(N,U)=>m._(this,void 0,void 0,function*(){this._getLayerIndex(N).update(U.layers,U.removedIds)})),this.actor.registerMessageHandler("SL",(N,U)=>m._(this,void 0,void 0,function*(){this._getLayerIndex(N).replace(U)}))}_setImages(F,N){return m._(this,void 0,void 0,function*(){this.availableImages[F]=N;for(const U in this.workerSources[F]){const re=this.workerSources[F][U];for(const de in re)re[de].availableImages=N}})}_syncRTLPluginState(F,N){return m._(this,void 0,void 0,function*(){if(m.bB.isParsed())return m.bB.getState();if(N.pluginStatus!=="loading")return m.bB.setState(N),N;const U=N.pluginURL;if(this.self.importScripts(U),m.bB.isParsed()){const re={pluginStatus:"loaded",pluginURL:U};return m.bB.setState(re),re}throw m.bB.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${U}`)})}_getAvailableImages(F){let N=this.availableImages[F];return N||(N=[]),N}_getLayerIndex(F){let N=this.layerIndexes[F];return N||(N=this.layerIndexes[F]=new c),N}_getWorkerSource(F,N,U){if(this.workerSources[F]||(this.workerSources[F]={}),this.workerSources[F][N]||(this.workerSources[F][N]={}),!this.workerSources[F][N][U]){const re={sendAsync:(de,_e)=>(de.targetMapId=F,this.actor.sendAsync(de,_e))};switch(N){case"vector":this.workerSources[F][N][U]=new A(re,this._getLayerIndex(F),this._getAvailableImages(F));break;case"geojson":this.workerSources[F][N][U]=new to(re,this._getLayerIndex(F),this._getAvailableImages(F));break;default:this.workerSources[F][N][U]=new this.externalWorkerSourceTypes[N](re,this._getLayerIndex(F),this._getAvailableImages(F))}}return this.workerSources[F][N][U]}_getDEMWorkerSource(F,N){return this.demWorkerSources[F]||(this.demWorkerSources[F]={}),this.demWorkerSources[F][N]||(this.demWorkerSources[F][N]=new z),this.demWorkerSources[F][N]}}return m.i(self)&&(self.worker=new hr(self)),hr}),h("index",["exports","./shared"],function(m,c){var I="4.4.1";let k,M;const A={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:_=>new Promise((i,a)=>{const d=requestAnimationFrame(i);_.signal.addEventListener("abort",()=>{cancelAnimationFrame(d),a(c.c())})}),getImageData(_,i=0){return this.getImageCanvasContext(_).getImageData(-i,-i,_.width+2*i,_.height+2*i)},getImageCanvasContext(_){const i=window.document.createElement("canvas"),a=i.getContext("2d",{willReadFrequently:!0});if(!a)throw new Error("failed to create canvas 2d context");return i.width=_.width,i.height=_.height,a.drawImage(_,0,0,_.width,_.height),a},resolveURL:_=>(k||(k=document.createElement("a")),k.href=_,k.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(M==null&&(M=matchMedia("(prefers-reduced-motion: reduce)")),M.matches)}};class z{static testProp(i){if(!z.docStyle)return i[0];for(let a=0;a{window.removeEventListener("click",z.suppressClickInternal,!0)},0)}static getScale(i){const a=i.getBoundingClientRect();return{x:a.width/i.offsetWidth||1,y:a.height/i.offsetHeight||1,boundingClientRect:a}}static getPoint(i,a,d){const p=a.boundingClientRect;return new c.P((d.clientX-p.left)/a.x-i.clientLeft,(d.clientY-p.top)/a.y-i.clientTop)}static mousePos(i,a){const d=z.getScale(i);return z.getPoint(i,d,a)}static touchPos(i,a){const d=[],p=z.getScale(i);for(let v=0;v{K&&ye(K),K=null,ke=!0},J.onerror=()=>{se=!0,K=null},J.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(_){let i,a,d,p;_.resetRequestQueue=()=>{i=[],a=0,d=0,p={}},_.addThrottleControl=T=>{const P=d++;return p[P]=T,P},_.removeThrottleControl=T=>{delete p[T],w()},_.getImage=(T,P,O=!0)=>new Promise((R,j)=>{q.supported&&(T.headers||(T.headers={}),T.headers.accept="image/webp,*/*"),c.e(T,{type:"image"}),i.push({abortController:P,requestParameters:T,supportImageRefresh:O,state:"queued",onError:H=>{j(H)},onSuccess:H=>{R(H)}}),w()});const v=T=>c._(this,void 0,void 0,function*(){T.state="running";const{requestParameters:P,supportImageRefresh:O,onError:R,onSuccess:j,abortController:H}=T,X=O===!1&&!c.i(self)&&!c.g(P.url)&&(!P.headers||Object.keys(P.headers).reduce((le,me)=>le&&me==="accept",!0));a++;const ne=X?S(P,H):c.m(P,H);try{const le=yield ne;delete T.abortController,T.state="completed",le.data instanceof HTMLImageElement||c.b(le.data)?j(le):le.data&&j({data:yield(Y=le.data,typeof createImageBitmap=="function"?c.d(Y):c.f(Y)),cacheControl:le.cacheControl,expires:le.expires})}catch(le){delete T.abortController,R(le)}finally{a--,w()}var Y}),w=()=>{const T=(()=>{for(const P of Object.keys(p))if(p[P]())return!0;return!1})()?c.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:c.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let P=a;P0;P++){const O=i.shift();O.abortController.signal.aborted?P--:v(O)}},S=(T,P)=>new Promise((O,R)=>{const j=new Image,H=T.url,X=T.credentials;X&&X==="include"?j.crossOrigin="use-credentials":(X&&X==="same-origin"||!c.s(H))&&(j.crossOrigin="anonymous"),P.signal.addEventListener("abort",()=>{j.src="",R(c.c())}),j.fetchPriority="high",j.onload=()=>{j.onerror=j.onload=null,O({data:j})},j.onerror=()=>{j.onerror=j.onload=null,P.signal.aborted||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."))},j.src=H})}(Z||(Z={})),Z.resetRequestQueue();class fe{constructor(i){this._transformRequestFn=i}transformRequest(i,a){return this._transformRequestFn&&this._transformRequestFn(i,a)||{url:i}}setTransformRequest(i){this._transformRequestFn=i}}function W(_){var i=new c.A(3);return i[0]=_[0],i[1]=_[1],i[2]=_[2],i}var ee,Se=function(_,i,a){return _[0]=i[0]-a[0],_[1]=i[1]-a[1],_[2]=i[2]-a[2],_};ee=new c.A(3),c.A!=Float32Array&&(ee[0]=0,ee[1]=0,ee[2]=0);var Ee=function(_){var i=_[0],a=_[1];return i*i+a*a};function Le(_){const i=[];if(typeof _=="string")i.push({id:"default",url:_});else if(_&&_.length>0){const a=[];for(const{id:d,url:p}of _){const v=`${d}${p}`;a.indexOf(v)===-1&&(a.push(v),i.push({id:d,url:p}))}}return i}function pe(_,i,a){const d=_.split("?");return d[0]+=`${i}${a}`,d.join("?")}(function(){var _=new c.A(2);c.A!=Float32Array&&(_[0]=0,_[1]=0)})();class Ie{constructor(i,a,d,p){this.context=i,this.format=d,this.texture=i.gl.createTexture(),this.update(a,p)}update(i,a,d){const{width:p,height:v}=i,w=!(this.size&&this.size[0]===p&&this.size[1]===v||d),{context:S}=this,{gl:T}=S;if(this.useMipmap=!!(a&&a.useMipmap),T.bindTexture(T.TEXTURE_2D,this.texture),S.pixelStoreUnpackFlipY.set(!1),S.pixelStoreUnpack.set(1),S.pixelStoreUnpackPremultiplyAlpha.set(this.format===T.RGBA&&(!a||a.premultiply!==!1)),w)this.size=[p,v],i instanceof HTMLImageElement||i instanceof HTMLCanvasElement||i instanceof HTMLVideoElement||i instanceof ImageData||c.b(i)?T.texImage2D(T.TEXTURE_2D,0,this.format,this.format,T.UNSIGNED_BYTE,i):T.texImage2D(T.TEXTURE_2D,0,this.format,p,v,0,this.format,T.UNSIGNED_BYTE,i.data);else{const{x:P,y:O}=d||{x:0,y:0};i instanceof HTMLImageElement||i instanceof HTMLCanvasElement||i instanceof HTMLVideoElement||i instanceof ImageData||c.b(i)?T.texSubImage2D(T.TEXTURE_2D,0,P,O,T.RGBA,T.UNSIGNED_BYTE,i):T.texSubImage2D(T.TEXTURE_2D,0,P,O,p,v,T.RGBA,T.UNSIGNED_BYTE,i.data)}this.useMipmap&&this.isSizePowerOfTwo()&&T.generateMipmap(T.TEXTURE_2D)}bind(i,a,d){const{context:p}=this,{gl:v}=p;v.bindTexture(v.TEXTURE_2D,this.texture),d!==v.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(d=v.LINEAR),i!==this.filter&&(v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MAG_FILTER,i),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MIN_FILTER,d||i),this.filter=i),a!==this.wrap&&(v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_S,a),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_T,a),this.wrap=a)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:i}=this.context;i.deleteTexture(this.texture),this.texture=null}}function Ae(_){const{userImage:i}=_;return!!(i&&i.render&&i.render())&&(_.data.replace(new Uint8Array(i.data.buffer)),!0)}class De extends c.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new c.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(i){if(this.loaded!==i&&(this.loaded=i,i)){for(const{ids:a,promiseResolve:d}of this.requestors)d(this._getImagesForIds(a));this.requestors=[]}}getImage(i){const a=this.images[i];if(a&&!a.data&&a.spriteData){const d=a.spriteData;a.data=new c.R({width:d.width,height:d.height},d.context.getImageData(d.x,d.y,d.width,d.height).data),a.spriteData=null}return a}addImage(i,a){if(this.images[i])throw new Error(`Image id ${i} already exist, use updateImage instead`);this._validate(i,a)&&(this.images[i]=a)}_validate(i,a){let d=!0;const p=a.data||a.spriteData;return this._validateStretch(a.stretchX,p&&p.width)||(this.fire(new c.j(new Error(`Image "${i}" has invalid "stretchX" value`))),d=!1),this._validateStretch(a.stretchY,p&&p.height)||(this.fire(new c.j(new Error(`Image "${i}" has invalid "stretchY" value`))),d=!1),this._validateContent(a.content,a)||(this.fire(new c.j(new Error(`Image "${i}" has invalid "content" value`))),d=!1),d}_validateStretch(i,a){if(!i)return!0;let d=0;for(const p of i){if(p[0]{let p=!0;if(!this.isLoaded())for(const v of i)this.images[v]||(p=!1);this.isLoaded()||p?a(this._getImagesForIds(i)):this.requestors.push({ids:i,promiseResolve:a})})}_getImagesForIds(i){const a={};for(const d of i){let p=this.getImage(d);p||(this.fire(new c.k("styleimagemissing",{id:d})),p=this.getImage(d)),p?a[d]={data:p.data.clone(),pixelRatio:p.pixelRatio,sdf:p.sdf,version:p.version,stretchX:p.stretchX,stretchY:p.stretchY,content:p.content,textFitWidth:p.textFitWidth,textFitHeight:p.textFitHeight,hasRenderCallback:!!(p.userImage&&p.userImage.render)}:c.w(`Image "${d}" 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 a}getPixelSize(){const{width:i,height:a}=this.atlasImage;return{width:i,height:a}}getPattern(i){const a=this.patterns[i],d=this.getImage(i);if(!d)return null;if(a&&a.position.version===d.version)return a.position;if(a)a.position.version=d.version;else{const p={w:d.data.width+2,h:d.data.height+2,x:0,y:0},v=new c.I(p,d);this.patterns[i]={bin:p,position:v}}return this._updatePatternAtlas(),this.patterns[i].position}bind(i){const a=i.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new Ie(i,this.atlasImage,a.RGBA),this.atlasTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE)}_updatePatternAtlas(){const i=[];for(const v in this.patterns)i.push(this.patterns[v].bin);const{w:a,h:d}=c.p(i),p=this.atlasImage;p.resize({width:a||1,height:d||1});for(const v in this.patterns){const{bin:w}=this.patterns[v],S=w.x+1,T=w.y+1,P=this.getImage(v).data,O=P.width,R=P.height;c.R.copy(P,p,{x:0,y:0},{x:S,y:T},{width:O,height:R}),c.R.copy(P,p,{x:0,y:R-1},{x:S,y:T-1},{width:O,height:1}),c.R.copy(P,p,{x:0,y:0},{x:S,y:T+R},{width:O,height:1}),c.R.copy(P,p,{x:O-1,y:0},{x:S-1,y:T},{width:1,height:R}),c.R.copy(P,p,{x:0,y:0},{x:S+O,y:T},{width:1,height:R})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(i){for(const a of i){if(this.callbackDispatchedThisFrame[a])continue;this.callbackDispatchedThisFrame[a]=!0;const d=this.getImage(a);d||c.w(`Image with ID: "${a}" was not found`),Ae(d)&&this.updateImage(a,d)}}}const Ge=1e20;function rt(_,i,a,d,p,v,w,S,T){for(let P=i;P-1);T++,v[T]=S,w[T]=P,w[T+1]=Ge}for(let S=0,T=0;S65535)throw new Error("glyphs > 65535 not supported");if(d.ranges[v])return{stack:i,id:a,glyph:p};if(!this.url)throw new Error("glyphsUrl is not set");if(!d.requests[v]){const S=dt.loadGlyphRange(i,v,this.url,this.requestManager);d.requests[v]=S}const w=yield d.requests[v];for(const S in w)this._doesCharSupportLocalGlyph(+S)||(d.glyphs[+S]=w[+S]);return d.ranges[v]=!0,{stack:i,id:a,glyph:w[a]||null}})}_doesCharSupportLocalGlyph(i){return!!this.localIdeographFontFamily&&(c.u["CJK Unified Ideographs"](i)||c.u["Hangul Syllables"](i)||c.u.Hiragana(i)||c.u.Katakana(i))}_tinySDF(i,a,d){const p=this.localIdeographFontFamily;if(!p||!this._doesCharSupportLocalGlyph(d))return;let v=i.tinySDF;if(!v){let S="400";/bold/i.test(a)?S="900":/medium/i.test(a)?S="500":/light/i.test(a)&&(S="200"),v=i.tinySDF=new dt.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:p,fontWeight:S})}const w=v.draw(String.fromCharCode(d));return{id:d,bitmap:new c.o({width:w.width||60,height:w.height||60},w.data),metrics:{width:w.glyphWidth/2||24,height:w.glyphHeight/2||24,left:w.glyphLeft/2+.5||0,top:w.glyphTop/2-27.5||-8,advance:w.glyphAdvance/2||24,isDoubleResolution:!0}}}}dt.loadGlyphRange=function(_,i,a,d){return c._(this,void 0,void 0,function*(){const p=256*i,v=p+255,w=d.transformRequest(a.replace("{fontstack}",_).replace("{range}",`${p}-${v}`),"Glyphs"),S=yield c.l(w,new AbortController);if(!S||!S.data)throw new Error(`Could not load glyph range. range: ${i}, ${p}-${v}`);const T={};for(const P of c.n(S.data))T[P.id]=P;return T})},dt.TinySDF=class{constructor({fontSize:_=24,buffer:i=3,radius:a=8,cutoff:d=.25,fontFamily:p="sans-serif",fontWeight:v="normal",fontStyle:w="normal"}={}){this.buffer=i,this.cutoff=d,this.radius=a;const S=this.size=_+4*i,T=this._createCanvas(S),P=this.ctx=T.getContext("2d",{willReadFrequently:!0});P.font=`${w} ${v} ${_}px ${p}`,P.textBaseline="alphabetic",P.textAlign="left",P.fillStyle="black",this.gridOuter=new Float64Array(S*S),this.gridInner=new Float64Array(S*S),this.f=new Float64Array(S),this.z=new Float64Array(S+1),this.v=new Uint16Array(S)}_createCanvas(_){const i=document.createElement("canvas");return i.width=i.height=_,i}draw(_){const{width:i,actualBoundingBoxAscent:a,actualBoundingBoxDescent:d,actualBoundingBoxLeft:p,actualBoundingBoxRight:v}=this.ctx.measureText(_),w=Math.ceil(a),S=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(v-p))),T=Math.min(this.size-this.buffer,w+Math.ceil(d)),P=S+2*this.buffer,O=T+2*this.buffer,R=Math.max(P*O,0),j=new Uint8ClampedArray(R),H={data:j,width:P,height:O,glyphWidth:S,glyphHeight:T,glyphTop:w,glyphLeft:0,glyphAdvance:i};if(S===0||T===0)return H;const{ctx:X,buffer:ne,gridInner:Y,gridOuter:le}=this;X.clearRect(ne,ne,S,T),X.fillText(_,ne,ne+w);const me=X.getImageData(ne,ne,S,T);le.fill(Ge,0,R),Y.fill(0,0,R);for(let ie=0;ie0?Ve*Ve:0,Y[Pe]=Ve<0?Ve*Ve:0}}rt(le,0,0,P,O,P,this.f,this.v,this.z),rt(Y,ne,ne,S,T,P,this.f,this.v,this.z);for(let ie=0;ie1&&(T=i[++S]);const O=Math.abs(P-T.left),R=Math.abs(P-T.right),j=Math.min(O,R);let H;const X=v/d*(p+1);if(T.isDash){const ne=p-Math.abs(X);H=Math.sqrt(j*j+ne*ne)}else H=p-Math.sqrt(j*j+X*X);this.data[w+P]=Math.max(0,Math.min(255,H+128))}}}addRegularDash(i){for(let S=i.length-1;S>=0;--S){const T=i[S],P=i[S+1];T.zeroLength?i.splice(S,1):P&&P.isDash===T.isDash&&(P.left=T.left,i.splice(S,1))}const a=i[0],d=i[i.length-1];a.isDash===d.isDash&&(a.left=d.left-this.width,d.right=a.right+this.width);const p=this.width*this.nextRow;let v=0,w=i[v];for(let S=0;S1&&(w=i[++v]);const T=Math.abs(S-w.left),P=Math.abs(S-w.right),O=Math.min(T,P);this.data[p+S]=Math.max(0,Math.min(255,(w.isDash?O:-O)+128))}}addDash(i,a){const d=a?7:0,p=2*d+1;if(this.nextRow+p>this.height)return c.w("LineAtlas out of space"),null;let v=0;for(let S=0;S{a.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Nt]}numActive(){return Object.keys(this.active).length}}const Xi=Math.floor(A.hardwareConcurrency/2);let zi,hi;function Li(){return zi||(zi=new Ei),zi}Ei.workerCount=c.B(globalThis)?Math.max(Math.min(Xi,3),1):1;class Di{constructor(i,a){this.workerPool=i,this.actors=[],this.currentActor=0,this.id=a;const d=this.workerPool.acquire(a);for(let p=0;p{a.remove()}),this.actors=[],i&&this.workerPool.release(this.id)}registerMessageHandler(i,a){for(const d of this.actors)d.registerMessageHandler(i,a)}}function Or(){return hi||(hi=new Di(Li(),c.G),hi.registerMessageHandler("GR",(_,i,a)=>c.m(i,a))),hi}function cr(_,i){const a=c.F();return c.H(a,a,[1,1,0]),c.J(a,a,[.5*_.width,.5*_.height,1]),c.K(a,a,_.calculatePosMatrix(i.toUnwrapped()))}function Br(_,i,a,d,p,v){const w=function(R,j,H){if(R)for(const X of R){const ne=j[X];if(ne&&ne.source===H&&ne.type==="fill-extrusion")return!0}else for(const X in j){const ne=j[X];if(ne.source===H&&ne.type==="fill-extrusion")return!0}return!1}(p&&p.layers,i,_.id),S=v.maxPitchScaleFactor(),T=_.tilesIn(d,S,w);T.sort(rr);const P=[];for(const R of T)P.push({wrappedTileID:R.tileID.wrapped().key,queryResults:R.tile.queryRenderedFeatures(i,a,_._state,R.queryGeometry,R.cameraQueryGeometry,R.scale,p,v,S,cr(_.transform,R.tileID))});const O=function(R){const j={},H={};for(const X of R){const ne=X.queryResults,Y=X.wrappedTileID,le=H[Y]=H[Y]||{};for(const me in ne){const ie=ne[me],ve=le[me]=le[me]||{},Te=j[me]=j[me]||[];for(const Pe of ie)ve[Pe.featureIndex]||(ve[Pe.featureIndex]=!0,Te.push(Pe))}}return j}(P);for(const R in O)O[R].forEach(j=>{const H=j.feature,X=_.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 O}function rr(_,i){const a=_.tileID,d=i.tileID;return a.overscaledZ-d.overscaledZ||a.canonical.y-d.canonical.y||a.wrap-d.wrap||a.canonical.x-d.canonical.x}function ce(_,i,a){return c._(this,void 0,void 0,function*(){let d=_;if(_.url?d=(yield c.h(i.transformRequest(_.url,"Source"),a)).data:yield A.frameAsync(a),!d)return null;const p=c.L(c.e(d,_),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in d&&d.vector_layers&&(p.vectorLayerIds=d.vector_layers.map(v=>v.id)),p})}class ge{constructor(i,a){i&&(a?this.setSouthWest(i).setNorthEast(a):Array.isArray(i)&&(i.length===4?this.setSouthWest([i[0],i[1]]).setNorthEast([i[2],i[3]]):this.setSouthWest(i[0]).setNorthEast(i[1])))}setNorthEast(i){return this._ne=i instanceof c.M?new c.M(i.lng,i.lat):c.M.convert(i),this}setSouthWest(i){return this._sw=i instanceof c.M?new c.M(i.lng,i.lat):c.M.convert(i),this}extend(i){const a=this._sw,d=this._ne;let p,v;if(i instanceof c.M)p=i,v=i;else{if(!(i instanceof ge))return Array.isArray(i)?i.length===4||i.every(Array.isArray)?this.extend(ge.convert(i)):this.extend(c.M.convert(i)):i&&("lng"in i||"lon"in i)&&"lat"in i?this.extend(c.M.convert(i)):this;if(p=i._sw,v=i._ne,!p||!v)return this}return a||d?(a.lng=Math.min(p.lng,a.lng),a.lat=Math.min(p.lat,a.lat),d.lng=Math.max(v.lng,d.lng),d.lat=Math.max(v.lat,d.lat)):(this._sw=new c.M(p.lng,p.lat),this._ne=new c.M(v.lng,v.lat)),this}getCenter(){return new c.M((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 c.M(this.getWest(),this.getNorth())}getSouthEast(){return new c.M(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(i){const{lng:a,lat:d}=c.M.convert(i);let p=this._sw.lng<=a&&a<=this._ne.lng;return this._sw.lng>this._ne.lng&&(p=this._sw.lng>=a&&a>=this._ne.lng),this._sw.lat<=d&&d<=this._ne.lat&&p}static convert(i){return i instanceof ge?i:i&&new ge(i)}static fromLngLat(i,a=0){const d=360*a/40075017,p=d/Math.cos(Math.PI/180*i.lat);return new ge(new c.M(i.lng-p,i.lat-d),new c.M(i.lng+p,i.lat+d))}}class Be{constructor(i,a,d){this.bounds=ge.convert(this.validateBounds(i)),this.minzoom=a||0,this.maxzoom=d||24}validateBounds(i){return Array.isArray(i)&&i.length===4?[Math.max(-180,i[0]),Math.max(-90,i[1]),Math.min(180,i[2]),Math.min(90,i[3])]:[-180,-90,180,90]}contains(i){const a=Math.pow(2,i.z),d=Math.floor(c.N(this.bounds.getWest())*a),p=Math.floor(c.O(this.bounds.getNorth())*a),v=Math.ceil(c.N(this.bounds.getEast())*a),w=Math.ceil(c.O(this.bounds.getSouth())*a);return i.x>=d&&i.x=p&&i.y{this._options.tiles=i}),this}setUrl(i){return this.setSourceProperty(()=>{this.url=i,this._options.url=i}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return c.e({},this._options)}loadTile(i){return c._(this,void 0,void 0,function*(){const a=i.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),d={request:this.map._requestManager.transformRequest(a,"Tile"),uid:i.uid,tileID:i.tileID,zoom:i.tileID.overscaledZ,tileSize:this.tileSize*i.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};d.request.collectResourceTiming=this._collectResourceTiming;let p="RT";if(i.actor&&i.state!=="expired"){if(i.state==="loading")return new Promise((v,w)=>{i.reloadPromise={resolve:v,reject:w}})}else i.actor=this.dispatcher.getActor(),p="LT";i.abortController=new AbortController;try{const v=yield i.actor.sendAsync({type:p,data:d},i.abortController);if(delete i.abortController,i.aborted)return;this._afterTileLoadWorkerResponse(i,v)}catch(v){if(delete i.abortController,i.aborted)return;if(v&&v.status!==404)throw v;this._afterTileLoadWorkerResponse(i,null)}})}_afterTileLoadWorkerResponse(i,a){if(a&&a.resourceTiming&&(i.resourceTiming=a.resourceTiming),a&&this.map._refreshExpiredTiles&&i.setExpiryData(a),i.loadVectorData(a,this.map.painter),i.reloadPromise){const d=i.reloadPromise;i.reloadPromise=null,this.loadTile(i).then(d.resolve).catch(d.reject)}}abortTile(i){return c._(this,void 0,void 0,function*(){i.abortController&&(i.abortController.abort(),delete i.abortController),i.actor&&(yield i.actor.sendAsync({type:"AT",data:{uid:i.uid,type:this.type,source:this.id}}))})}unloadTile(i){return c._(this,void 0,void 0,function*(){i.unloadVectorData(),i.actor&&(yield i.actor.sendAsync({type:"RMT",data:{uid:i.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class He extends c.E{constructor(i,a,d,p){super(),this.id=i,this.dispatcher=d,this.setEventedParent(p),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=c.e({type:"raster"},a),c.e(this,c.L(a,["url","scheme","tileSize"]))}load(){return c._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new c.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const i=yield ce(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,i&&(c.e(this,i),i.bounds&&(this.tileBounds=new Be(i.bounds,this.minzoom,this.maxzoom)),this.fire(new c.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new c.k("data",{dataType:"source",sourceDataType:"content"})))}catch(i){this._tileJSONRequest=null,this.fire(new c.j(i))}})}loaded(){return this._loaded}onAdd(i){this.map=i,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(i){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),i(),this.load()}setTiles(i){return this.setSourceProperty(()=>{this._options.tiles=i}),this}setUrl(i){return this.setSourceProperty(()=>{this.url=i,this._options.url=i}),this}serialize(){return c.e({},this._options)}hasTile(i){return!this.tileBounds||this.tileBounds.contains(i.canonical)}loadTile(i){return c._(this,void 0,void 0,function*(){const a=i.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);i.abortController=new AbortController;try{const d=yield Z.getImage(this.map._requestManager.transformRequest(a,"Tile"),i.abortController,this.map._refreshExpiredTiles);if(delete i.abortController,i.aborted)return void(i.state="unloaded");if(d&&d.data){this.map._refreshExpiredTiles&&d.cacheControl&&d.expires&&i.setExpiryData({cacheControl:d.cacheControl,expires:d.expires});const p=this.map.painter.context,v=p.gl,w=d.data;i.texture=this.map.painter.getTileTexture(w.width),i.texture?i.texture.update(w,{useMipmap:!0}):(i.texture=new Ie(p,w,v.RGBA,{useMipmap:!0}),i.texture.bind(v.LINEAR,v.CLAMP_TO_EDGE,v.LINEAR_MIPMAP_NEAREST),p.extTextureFilterAnisotropic&&v.texParameterf(v.TEXTURE_2D,p.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,p.extTextureFilterAnisotropicMax)),i.state="loaded"}}catch(d){if(delete i.abortController,i.aborted)i.state="unloaded";else if(d)throw i.state="errored",d}})}abortTile(i){return c._(this,void 0,void 0,function*(){i.abortController&&(i.abortController.abort(),delete i.abortController)})}unloadTile(i){return c._(this,void 0,void 0,function*(){i.texture&&this.map.painter.saveTileTexture(i.texture)})}hasTransition(){return!1}}class tt extends He{constructor(i,a,d,p){super(i,a,d,p),this.type="raster-dem",this.maxzoom=22,this._options=c.e({type:"raster-dem"},a),this.encoding=a.encoding||"mapbox",this.redFactor=a.redFactor,this.greenFactor=a.greenFactor,this.blueFactor=a.blueFactor,this.baseShift=a.baseShift}loadTile(i){return c._(this,void 0,void 0,function*(){const a=i.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),d=this.map._requestManager.transformRequest(a,"Tile");i.neighboringTiles=this._getNeighboringTiles(i.tileID),i.abortController=new AbortController;try{const p=yield Z.getImage(d,i.abortController,this.map._refreshExpiredTiles);if(delete i.abortController,i.aborted)return void(i.state="unloaded");if(p&&p.data){const v=p.data;this.map._refreshExpiredTiles&&p.cacheControl&&p.expires&&i.setExpiryData({cacheControl:p.cacheControl,expires:p.expires});const w=c.b(v)&&c.S()?v:yield this.readImageNow(v),S={type:this.type,uid:i.uid,source:this.id,rawImageData:w,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!i.actor||i.state==="expired"){i.actor=this.dispatcher.getActor();const T=yield i.actor.sendAsync({type:"LDT",data:S});i.dem=T,i.needsHillshadePrepare=!0,i.needsTerrainPrepare=!0,i.state="loaded"}}}catch(p){if(delete i.abortController,i.aborted)i.state="unloaded";else if(p)throw i.state="errored",p}})}readImageNow(i){return c._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&c.U()){const a=i.width+2,d=i.height+2;try{return new c.R({width:a,height:d},yield c.V(i,-1,-1,a,d))}catch{}}return A.getImageData(i,1)})}_getNeighboringTiles(i){const a=i.canonical,d=Math.pow(2,a.z),p=(a.x-1+d)%d,v=a.x===0?i.wrap-1:i.wrap,w=(a.x+1+d)%d,S=a.x+1===d?i.wrap+1:i.wrap,T={};return T[new c.Q(i.overscaledZ,v,a.z,p,a.y).key]={backfilled:!1},T[new c.Q(i.overscaledZ,S,a.z,w,a.y).key]={backfilled:!1},a.y>0&&(T[new c.Q(i.overscaledZ,v,a.z,p,a.y-1).key]={backfilled:!1},T[new c.Q(i.overscaledZ,i.wrap,a.z,a.x,a.y-1).key]={backfilled:!1},T[new c.Q(i.overscaledZ,S,a.z,w,a.y-1).key]={backfilled:!1}),a.y+10&&c.e(v,{resourceTiming:p}),this.fire(new c.k("data",Object.assign(Object.assign({},v),{sourceDataType:"metadata"}))),this.fire(new c.k("data",Object.assign(Object.assign({},v),{sourceDataType:"content"})))}catch(d){if(this._pendingLoads--,this._removed)return void this.fire(new c.k("dataabort",{dataType:"source"}));this.fire(new c.j(d))}})}loaded(){return this._pendingLoads===0}loadTile(i){return c._(this,void 0,void 0,function*(){const a=i.actor?"RT":"LT";i.actor=this.actor;const d={type:this.type,uid:i.uid,tileID:i.tileID,zoom:i.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};i.abortController=new AbortController;const p=yield this.actor.sendAsync({type:a,data:d},i.abortController);delete i.abortController,i.unloadVectorData(),i.aborted||i.loadVectorData(p,this.map.painter,a==="RT")})}abortTile(i){return c._(this,void 0,void 0,function*(){i.abortController&&(i.abortController.abort(),delete i.abortController),i.aborted=!0})}unloadTile(i){return c._(this,void 0,void 0,function*(){i.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:i.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return c.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var $e=c.X([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Qe extends c.E{constructor(i,a,d,p){super(),this.id=i,this.dispatcher=d,this.coordinates=a.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(p),this.options=a}load(i){return c._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new c.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const a=yield Z.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,a&&a.data&&(this.image=a.data,i&&(this.coordinates=i),this._finishLoading())}catch(a){this._request=null,this._loaded=!0,this.fire(new c.j(a))}})}loaded(){return this._loaded}updateImage(i){return i.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=i.url,this.load(i.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new c.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(i){this.map=i,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(i){this.coordinates=i;const a=i.map(c.Y.fromLngLat);this.tileID=function(p){let v=1/0,w=1/0,S=-1/0,T=-1/0;for(const j of p)v=Math.min(v,j.x),w=Math.min(w,j.y),S=Math.max(S,j.x),T=Math.max(T,j.y);const P=Math.max(S-v,T-w),O=Math.max(0,Math.floor(-Math.log(P)/Math.LN2)),R=Math.pow(2,O);return new c.a0(O,Math.floor((v+S)/2*R),Math.floor((w+T)/2*R))}(a),this.minzoom=this.maxzoom=this.tileID.z;const d=a.map(p=>this.tileID.getTilePoint(p)._round());return this._boundsArray=new c.Z,this._boundsArray.emplaceBack(d[0].x,d[0].y,0,0),this._boundsArray.emplaceBack(d[1].x,d[1].y,c.W,0),this._boundsArray.emplaceBack(d[3].x,d[3].y,0,c.W),this._boundsArray.emplaceBack(d[2].x,d[2].y,c.W,c.W),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new c.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const i=this.map.painter.context,a=i.gl;this.boundsBuffer||(this.boundsBuffer=i.createVertexBuffer(this._boundsArray,$e.members)),this.boundsSegments||(this.boundsSegments=c.$.simpleSegment(0,0,4,2)),this.texture||(this.texture=new Ie(i,this.image,a.RGBA),this.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE));let d=!1;for(const p in this.tiles){const v=this.tiles[p];v.state!=="loaded"&&(v.state="loaded",v.texture=this.texture,d=!0)}d&&this.fire(new c.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(i){return c._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(i.tileID.canonical)?(this.tiles[String(i.tileID.wrap)]=i,i.buckets={}):i.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Ze extends Qe{constructor(i,a,d,p){super(i,a,d,p),this.roundZoom=!0,this.type="video",this.options=a}load(){return c._(this,void 0,void 0,function*(){this._loaded=!1;const i=this.options;this.urls=[];for(const a of i.urls)this.urls.push(this.map._requestManager.transformRequest(a,"Source").url);try{const a=yield c.a2(this.urls);if(this._loaded=!0,!a)return;this.video=a,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(a){this.fire(new c.j(a))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(i){if(this.video){const a=this.video.seekable;ia.end(0)?this.fire(new c.j(new c.a1(`sources.${this.id}`,null,`Playback for this video can be set only between the ${a.start(0)} and ${a.end(0)}-second mark.`))):this.video.currentTime=i}}getVideo(){return this.video}onAdd(i){this.map||(this.map=i,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 i=this.map.painter.context,a=i.gl;this.boundsBuffer||(this.boundsBuffer=i.createVertexBuffer(this._boundsArray,$e.members)),this.boundsSegments||(this.boundsSegments=c.$.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE),a.texSubImage2D(a.TEXTURE_2D,0,0,0,a.RGBA,a.UNSIGNED_BYTE,this.video)):(this.texture=new Ie(i,this.video,a.RGBA),this.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE));let d=!1;for(const p in this.tiles){const v=this.tiles[p];v.state!=="loaded"&&(v.state="loaded",v.texture=this.texture,d=!0)}d&&this.fire(new c.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 pt extends Qe{constructor(i,a,d,p){super(i,a,d,p),a.coordinates?Array.isArray(a.coordinates)&&a.coordinates.length===4&&!a.coordinates.some(v=>!Array.isArray(v)||v.length!==2||v.some(w=>typeof w!="number"))||this.fire(new c.j(new c.a1(`sources.${i}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new c.j(new c.a1(`sources.${i}`,null,'missing required property "coordinates"'))),a.animate&&typeof a.animate!="boolean"&&this.fire(new c.j(new c.a1(`sources.${i}`,null,'optional "animate" property must be a boolean value'))),a.canvas?typeof a.canvas=="string"||a.canvas instanceof HTMLCanvasElement||this.fire(new c.j(new c.a1(`sources.${i}`,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 c.j(new c.a1(`sources.${i}`,null,'missing required property "canvas"'))),this.options=a,this.animate=a.animate===void 0||a.animate}load(){return c._(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 c.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(i){this.map=i,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let i=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,i=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,i=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const a=this.map.painter.context,d=a.gl;this.boundsBuffer||(this.boundsBuffer=a.createVertexBuffer(this._boundsArray,$e.members)),this.boundsSegments||(this.boundsSegments=c.$.simpleSegment(0,0,4,2)),this.texture?(i||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new Ie(a,this.canvas,d.RGBA,{premultiply:!0});let p=!1;for(const v in this.tiles){const w=this.tiles[v];w.state!=="loaded"&&(w.state="loaded",w.texture=this.texture,p=!0)}p&&this.fire(new c.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const i of[this.canvas.width,this.canvas.height])if(isNaN(i)||i<=0)return!0;return!1}}const St={},vt=_=>{switch(_){case"geojson":return We;case"image":return Qe;case"raster":return He;case"raster-dem":return tt;case"vector":return ae;case"video":return Ze;case"canvas":return pt}return St[_]},Mt="RTLPluginLoaded";class qt extends c.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Or()}_syncState(i){return this.status=i,this.dispatcher.broadcast("SRPS",{pluginStatus:i,pluginURL:this.url}).catch(a=>{throw this.status="error",a})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(i){return c._(this,arguments,void 0,function*(a,d=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=A.resolveURL(a),!this.url)throw new Error(`requested url ${a} is invalid`);if(this.status==="unavailable"){if(!d)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return c._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new c.k(Mt))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ne=null;function Ht(){return Ne||(Ne=new qt),Ne}class si{constructor(i,a){this.timeAdded=0,this.fadeEndTime=0,this.tileID=i,this.uid=c.a3(),this.uses=0,this.tileSize=a,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(i){const a=i+this.timeAdded;av.getLayer(P)).filter(Boolean);if(T.length!==0){S.layers=T,S.stateDependentLayerIds&&(S.stateDependentLayers=S.stateDependentLayerIds.map(P=>T.filter(O=>O.id===P)[0]));for(const P of T)w[P.id]=S}}return w}(i.buckets,a.style),this.hasSymbolBuckets=!1;for(const p in this.buckets){const v=this.buckets[p];if(v instanceof c.a5){if(this.hasSymbolBuckets=!0,!d)break;v.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const p in this.buckets){const v=this.buckets[p];if(v instanceof c.a5&&v.hasRTLText){this.hasRTLText=!0,Ht().lazyLoad();break}}this.queryPadding=0;for(const p in this.buckets){const v=this.buckets[p];this.queryPadding=Math.max(this.queryPadding,a.style.getLayer(p).queryRadius(v))}i.imageAtlas&&(this.imageAtlas=i.imageAtlas),i.glyphAtlasImage&&(this.glyphAtlasImage=i.glyphAtlasImage)}else this.collisionBoxArray=new c.a4}unloadVectorData(){for(const i in this.buckets)this.buckets[i].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(i){return this.buckets[i.id]}upload(i){for(const d in this.buckets){const p=this.buckets[d];p.uploadPending()&&p.upload(i)}const a=i.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Ie(i,this.imageAtlas.image,a.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Ie(i,this.glyphAtlasImage,a.ALPHA),this.glyphAtlasImage=null)}prepare(i){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(i,this.imageAtlasTexture)}queryRenderedFeatures(i,a,d,p,v,w,S,T,P,O){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:p,cameraQueryGeometry:v,scale:w,tileSize:this.tileSize,pixelPosMatrix:O,transform:T,params:S,queryPadding:this.queryPadding*P},i,a,d):{}}querySourceFeatures(i,a){const d=this.latestFeatureIndex;if(!d||!d.rawTileData)return;const p=d.loadVTLayers(),v=a&&a.sourceLayer?a.sourceLayer:"",w=p._geojsonTileLayer||p[v];if(!w)return;const S=c.a6(a&&a.filter),{z:T,x:P,y:O}=this.tileID.canonical,R={z:T,x:P,y:O};for(let j=0;jd)p=!1;else if(a)if(this.expirationTime{this.remove(i,v)},d)),this.data[p].push(v),this.order.push(p),this.order.length>this.max){const w=this._getAndRemoveByKey(this.order[0]);w&&this.onRemove(w)}return this}has(i){return i.wrapped().key in this.data}getAndRemove(i){return this.has(i)?this._getAndRemoveByKey(i.wrapped().key):null}_getAndRemoveByKey(i){const a=this.data[i].shift();return a.timeout&&clearTimeout(a.timeout),this.data[i].length===0&&delete this.data[i],this.order.splice(this.order.indexOf(i),1),a.value}getByKey(i){const a=this.data[i];return a?a[0].value:null}get(i){return this.has(i)?this.data[i.wrapped().key][0].value:null}remove(i,a){if(!this.has(i))return this;const d=i.wrapped().key,p=a===void 0?0:this.data[d].indexOf(a),v=this.data[d][p];return this.data[d].splice(p,1),v.timeout&&clearTimeout(v.timeout),this.data[d].length===0&&delete this.data[d],this.onRemove(v.value),this.order.splice(this.order.indexOf(d),1),this}setMaxSize(i){for(this.max=i;this.order.length>this.max;){const a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this}filter(i){const a=[];for(const d in this.data)for(const p of this.data[d])i(p.value)||a.push(p);for(const d of a)this.remove(d.value.tileID,d)}}class Gr{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(i,a,d){const p=String(a);if(this.stateChanges[i]=this.stateChanges[i]||{},this.stateChanges[i][p]=this.stateChanges[i][p]||{},c.e(this.stateChanges[i][p],d),this.deletedStates[i]===null){this.deletedStates[i]={};for(const v in this.state[i])v!==p&&(this.deletedStates[i][v]=null)}else if(this.deletedStates[i]&&this.deletedStates[i][p]===null){this.deletedStates[i][p]={};for(const v in this.state[i][p])d[v]||(this.deletedStates[i][p][v]=null)}else for(const v in d)this.deletedStates[i]&&this.deletedStates[i][p]&&this.deletedStates[i][p][v]===null&&delete this.deletedStates[i][p][v]}removeFeatureState(i,a,d){if(this.deletedStates[i]===null)return;const p=String(a);if(this.deletedStates[i]=this.deletedStates[i]||{},d&&a!==void 0)this.deletedStates[i][p]!==null&&(this.deletedStates[i][p]=this.deletedStates[i][p]||{},this.deletedStates[i][p][d]=null);else if(a!==void 0)if(this.stateChanges[i]&&this.stateChanges[i][p])for(d in this.deletedStates[i][p]={},this.stateChanges[i][p])this.deletedStates[i][p][d]=null;else this.deletedStates[i][p]=null;else this.deletedStates[i]=null}getState(i,a){const d=String(a),p=c.e({},(this.state[i]||{})[d],(this.stateChanges[i]||{})[d]);if(this.deletedStates[i]===null)return{};if(this.deletedStates[i]){const v=this.deletedStates[i][a];if(v===null)return{};for(const w in v)delete p[w]}return p}initializeTileState(i,a){i.setFeatureState(this.state,a)}coalesceChanges(i,a){const d={};for(const p in this.stateChanges){this.state[p]=this.state[p]||{};const v={};for(const w in this.stateChanges[p])this.state[p][w]||(this.state[p][w]={}),c.e(this.state[p][w],this.stateChanges[p][w]),v[w]=this.state[p][w];d[p]=v}for(const p in this.deletedStates){this.state[p]=this.state[p]||{};const v={};if(this.deletedStates[p]===null)for(const w in this.state[p])v[w]={},this.state[p][w]={};else for(const w in this.deletedStates[p]){if(this.deletedStates[p][w]===null)this.state[p][w]={};else for(const S of Object.keys(this.deletedStates[p][w]))delete this.state[p][w][S];v[w]=this.state[p][w]}d[p]=d[p]||{},c.e(d[p],v)}if(this.stateChanges={},this.deletedStates={},Object.keys(d).length!==0)for(const p in i)i[p].setFeatureState(d,a)}}class Ye extends c.E{constructor(i,a,d){super(),this.id=i,this.dispatcher=d,this.on("data",p=>this._dataHandler(p)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((p,v,w,S)=>{const T=new(vt(v.type))(p,v,w,S);if(T.id!==p)throw new Error(`Expected Source id to be ${p} instead of ${T.id}`);return T})(i,a,d,this),this._tiles={},this._cache=new ur(0,p=>this._unloadTile(p)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Gr,this._didEmitContent=!1,this._updated=!1}onAdd(i){this.map=i,this._maxTileCacheSize=i?i._maxTileCacheSize:null,this._maxTileCacheZoomLevels=i?i._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(i)}onRemove(i){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(i)}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 i in this._tiles){const a=this._tiles[i];if(a.state!=="loaded"&&a.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const i=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,i&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(i,a,d){return c._(this,void 0,void 0,function*(){try{yield this._source.loadTile(i),this._tileLoaded(i,a,d)}catch(p){i.state="errored",p.status!==404?this._source.fire(new c.j(p,{tile:i})):this.update(this.transform,this.terrain)}})}_unloadTile(i){this._source.unloadTile&&this._source.unloadTile(i)}_abortTile(i){this._source.abortTile&&this._source.abortTile(i),this._source.fire(new c.k("dataabort",{tile:i,coord:i.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(i){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const a in this._tiles){const d=this._tiles[a];d.upload(i),d.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(i=>i.tileID).sort(Ot).map(i=>i.key)}getRenderableIds(i){const a=[];for(const d in this._tiles)this._isIdRenderable(d,i)&&a.push(this._tiles[d]);return i?a.sort((d,p)=>{const v=d.tileID,w=p.tileID,S=new c.P(v.canonical.x,v.canonical.y)._rotate(this.transform.angle),T=new c.P(w.canonical.x,w.canonical.y)._rotate(this.transform.angle);return v.overscaledZ-w.overscaledZ||T.y-S.y||T.x-S.x}).map(d=>d.tileID.key):a.map(d=>d.tileID).sort(Ot).map(d=>d.key)}hasRenderableParent(i){const a=this.findLoadedParent(i,0);return!!a&&this._isIdRenderable(a.tileID.key)}_isIdRenderable(i,a){return this._tiles[i]&&this._tiles[i].hasData()&&!this._coveredTiles[i]&&(a||!this._tiles[i].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const i in this._tiles)this._tiles[i].state!=="errored"&&this._reloadTile(i,"reloading")}}_reloadTile(i,a){return c._(this,void 0,void 0,function*(){const d=this._tiles[i];d&&(d.state!=="loading"&&(d.state=a),yield this._loadTile(d,i,a))})}_tileLoaded(i,a,d){i.timeAdded=A.now(),d==="expired"&&(i.refreshedUponExpiration=!0),this._setTileReloadTimer(a,i),this.getSource().type==="raster-dem"&&i.dem&&this._backfillDEM(i),this._state.initializeTileState(i,this.map?this.map.painter:null),i.aborted||this._source.fire(new c.k("data",{dataType:"source",tile:i,coord:i.tileID}))}_backfillDEM(i){const a=this.getRenderableIds();for(let p=0;p1||(Math.abs(w)>1&&(Math.abs(w+T)===1?w+=T:Math.abs(w-T)===1&&(w-=T)),v.dem&&p.dem&&(p.dem.backfillBorder(v.dem,w,S),p.neighboringTiles&&p.neighboringTiles[P]&&(p.neighboringTiles[P].backfilled=!0)))}}getTile(i){return this.getTileByID(i.key)}getTileByID(i){return this._tiles[i]}_retainLoadedChildren(i,a,d,p){for(const v in this._tiles){let w=this._tiles[v];if(p[v]||!w.hasData()||w.tileID.overscaledZ<=a||w.tileID.overscaledZ>d)continue;let S=w.tileID;for(;w&&w.tileID.overscaledZ>a+1;){const P=w.tileID.scaledTo(w.tileID.overscaledZ-1);w=this._tiles[P.key],w&&w.hasData()&&(S=P)}let T=S;for(;T.overscaledZ>a;)if(T=T.scaledTo(T.overscaledZ-1),i[T.key]){p[S.key]=S;break}}}findLoadedParent(i,a){if(i.key in this._loadedParentTiles){const d=this._loadedParentTiles[i.key];return d&&d.tileID.overscaledZ>=a?d:null}for(let d=i.overscaledZ-1;d>=a;d--){const p=i.scaledTo(d),v=this._getLoadedTile(p);if(v)return v}}findLoadedSibling(i){return this._getLoadedTile(i)}_getLoadedTile(i){const a=this._tiles[i.key];return a&&a.hasData()?a:this._cache.getByKey(i.wrapped().key)}updateCacheSize(i){const a=Math.ceil(i.width/this._source.tileSize)+1,d=Math.ceil(i.height/this._source.tileSize)+1,p=Math.floor(a*d*(this._maxTileCacheZoomLevels===null?c.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),v=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,p):p;this._cache.setMaxSize(v)}handleWrapJump(i){const a=Math.round((i-(this._prevLng===void 0?i:this._prevLng))/360);if(this._prevLng=i,a){const d={};for(const p in this._tiles){const v=this._tiles[p];v.tileID=v.tileID.unwrapTo(v.tileID.wrap+a),d[v.tileID.key]=v}this._tiles=d;for(const p in this._timers)clearTimeout(this._timers[p]),delete this._timers[p];for(const p in this._tiles)this._setTileReloadTimer(p,this._tiles[p])}}_updateCoveredAndRetainedTiles(i,a,d,p,v,w){const S={},T={},P=Object.keys(i),O=A.now();for(const R of P){const j=i[R],H=this._tiles[R];if(!H||H.fadeEndTime!==0&&H.fadeEndTime<=O)continue;const X=this.findLoadedParent(j,a),ne=this.findLoadedSibling(j),Y=X||ne||null;Y&&(this._addTile(Y.tileID),S[Y.tileID.key]=Y.tileID),T[R]=j}this._retainLoadedChildren(T,p,d,i);for(const R in S)i[R]||(this._coveredTiles[R]=!0,i[R]=S[R]);if(w){const R={},j={};for(const H of v)this._tiles[H.key].hasData()?R[H.key]=H:j[H.key]=H;for(const H in j){const X=j[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]&&(R[X[0].key]=i[X[0].key]=X[0],R[X[1].key]=i[X[1].key]=X[1],R[X[2].key]=i[X[2].key]=X[2],R[X[3].key]=i[X[3].key]=X[3],delete j[H])}for(const H in j){const X=j[H],ne=this.findLoadedParent(X,this._source.minzoom),Y=this.findLoadedSibling(X),le=ne||Y||null;if(le){R[le.tileID.key]=i[le.tileID.key]=le.tileID;for(const me in R)R[me].isChildOf(le.tileID)&&delete R[me]}}for(const H in this._tiles)R[H]||(this._coveredTiles[H]=!0)}}update(i,a){if(!this._sourceLoaded||this._paused)return;let d;this.transform=i,this.terrain=a,this.updateCacheSize(i),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?d=i.getVisibleUnwrappedCoordinates(this._source.tileID).map(O=>new c.Q(O.canonical.z,O.wrap,O.canonical.z,O.canonical.x,O.canonical.y)):(d=i.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:a}),this._source.hasTile&&(d=d.filter(O=>this._source.hasTile(O)))):d=[];const p=i.coveringZoomLevel(this._source),v=Math.max(p-Ye.maxOverzooming,this._source.minzoom),w=Math.max(p+Ye.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const O={};for(const R of d)if(R.canonical.z>this._source.minzoom){const j=R.scaledTo(R.canonical.z-1);O[j.key]=j;const H=R.scaledTo(Math.max(this._source.minzoom,Math.min(R.canonical.z,5)));O[H.key]=H}d=d.concat(Object.values(O))}const S=d.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,S&&this.fire(new c.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const T=this._updateRetainedTiles(d,p);zt(this._source.type)&&this._updateCoveredAndRetainedTiles(T,v,w,p,d,a);for(const O in T)this._tiles[O].clearFadeHold();const P=c.ab(this._tiles,T);for(const O of P){const R=this._tiles[O];R.hasSymbolBuckets&&!R.holdingForFade()?R.setHoldDuration(this.map._fadeDuration):R.hasSymbolBuckets&&!R.symbolFadeFinished()||this._removeTile(O)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const i in this._tiles)this._tiles[i].holdingForFade()&&this._removeTile(i)}_updateRetainedTiles(i,a){var d;const p={},v={},w=Math.max(a-Ye.maxOverzooming,this._source.minzoom),S=Math.max(a+Ye.maxUnderzooming,this._source.minzoom),T={};for(const P of i){const O=this._addTile(P);p[P.key]=P,O.hasData()||athis._source.maxzoom){const j=P.children(this._source.maxzoom)[0],H=this.getTile(j);if(H&&H.hasData()){p[j.key]=j;continue}}else{const j=P.children(this._source.maxzoom);if(p[j[0].key]&&p[j[1].key]&&p[j[2].key]&&p[j[3].key])continue}let R=O.wasRequested();for(let j=P.overscaledZ-1;j>=w;--j){const H=P.scaledTo(j);if(v[H.key])break;if(v[H.key]=!0,O=this.getTile(H),!O&&R&&(O=this._addTile(H)),O){const X=O.hasData();if((X||!(!((d=this.map)===null||d===void 0)&&d.cancelPendingTileRequestsWhileZooming)||R)&&(p[H.key]=H),R=O.wasRequested(),X)break}}}return p}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const i in this._tiles){const a=[];let d,p=this._tiles[i].tileID;for(;p.overscaledZ>0;){if(p.key in this._loadedParentTiles){d=this._loadedParentTiles[p.key];break}a.push(p.key);const v=p.scaledTo(p.overscaledZ-1);if(d=this._getLoadedTile(v),d)break;p=v}for(const v of a)this._loadedParentTiles[v]=d}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const i in this._tiles){const a=this._tiles[i].tileID,d=this._getLoadedTile(a);this._loadedSiblingTiles[a.key]=d}}_addTile(i){let a=this._tiles[i.key];if(a)return a;a=this._cache.getAndRemove(i),a&&(this._setTileReloadTimer(i.key,a),a.tileID=i,this._state.initializeTileState(a,this.map?this.map.painter:null),this._cacheTimers[i.key]&&(clearTimeout(this._cacheTimers[i.key]),delete this._cacheTimers[i.key],this._setTileReloadTimer(i.key,a)));const d=a;return a||(a=new si(i,this._source.tileSize*i.overscaleFactor()),this._loadTile(a,i.key,a.state)),a.uses++,this._tiles[i.key]=a,d||this._source.fire(new c.k("dataloading",{tile:a,coord:a.tileID,dataType:"source"})),a}_setTileReloadTimer(i,a){i in this._timers&&(clearTimeout(this._timers[i]),delete this._timers[i]);const d=a.getExpiryTimeout();d&&(this._timers[i]=setTimeout(()=>{this._reloadTile(i,"expired"),delete this._timers[i]},d))}_removeTile(i){const a=this._tiles[i];a&&(a.uses--,delete this._tiles[i],this._timers[i]&&(clearTimeout(this._timers[i]),delete this._timers[i]),a.uses>0||(a.hasData()&&a.state!=="reloading"?this._cache.add(a.tileID,a,a.getExpiryTimeout()):(a.aborted=!0,this._abortTile(a),this._unloadTile(a))))}_dataHandler(i){const a=i.sourceDataType;i.dataType==="source"&&a==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&i.dataType==="source"&&a==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const i in this._tiles)this._removeTile(i);this._cache.reset()}tilesIn(i,a,d){const p=[],v=this.transform;if(!v)return p;const w=d?v.getCameraQueryGeometry(i):i,S=i.map(X=>v.pointCoordinate(X,this.terrain)),T=w.map(X=>v.pointCoordinate(X,this.terrain)),P=this.getIds();let O=1/0,R=1/0,j=-1/0,H=-1/0;for(const X of T)O=Math.min(O,X.x),R=Math.min(R,X.y),j=Math.max(j,X.x),H=Math.max(H,X.y);for(let X=0;X=0&&ie[1].y+me>=0){const ve=S.map(Pe=>Y.getTilePoint(Pe)),Te=T.map(Pe=>Y.getTilePoint(Pe));p.push({tile:ne,tileID:Y,queryGeometry:ve,cameraQueryGeometry:Te,scale:le})}}return p}getVisibleCoordinates(i){const a=this.getRenderableIds(i).map(d=>this._tiles[d].tileID);for(const d of a)d.posMatrix=this.transform.calculatePosMatrix(d.toUnwrapped());return a}hasTransition(){if(this._source.hasTransition())return!0;if(zt(this._source.type)){const i=A.now();for(const a in this._tiles)if(this._tiles[a].fadeEndTime>=i)return!0}return!1}setFeatureState(i,a,d){this._state.updateState(i=i||"_geojsonTileLayer",a,d)}removeFeatureState(i,a,d){this._state.removeFeatureState(i=i||"_geojsonTileLayer",a,d)}getFeatureState(i,a){return this._state.getState(i=i||"_geojsonTileLayer",a)}setDependencies(i,a,d){const p=this._tiles[i];p&&p.setDependencies(a,d)}reloadTilesForDependencies(i,a){for(const d in this._tiles)this._tiles[d].hasDependency(i,a)&&this._reloadTile(d,"reloading");this._cache.filter(d=>!d.hasDependency(i,a))}}function Ot(_,i){const a=Math.abs(2*_.wrap)-+(_.wrap<0),d=Math.abs(2*i.wrap)-+(i.wrap<0);return _.overscaledZ-i.overscaledZ||d-a||i.canonical.y-_.canonical.y||i.canonical.x-_.canonical.x}function zt(_){return _==="raster"||_==="image"||_==="video"}Ye.maxOverzooming=10,Ye.maxUnderzooming=3;class di{constructor(i,a){this.reset(i,a)}reset(i,a){this.points=i||[],this._distances=[0];for(let d=1;d0?(p-w)/S:0;return this.points[v].mult(1-T).add(this.points[a].mult(T))}}function Si(_,i){let a=!0;return _==="always"||_!=="never"&&i!=="never"||(a=!1),a}class Bt{constructor(i,a,d){const p=this.boxCells=[],v=this.circleCells=[];this.xCellCount=Math.ceil(i/d),this.yCellCount=Math.ceil(a/d);for(let w=0;wthis.width||p<0||a>this.height)return[];const T=[];if(i<=0&&a<=0&&this.width<=d&&this.height<=p){if(v)return[{key:null,x1:i,y1:a,x2:d,y2:p}];for(let P=0;P0}hitTestCircle(i,a,d,p,v){const w=i-d,S=i+d,T=a-d,P=a+d;if(S<0||w>this.width||P<0||T>this.height)return!1;const O=[];return this._forEachCell(w,T,S,P,this._queryCellCircle,O,{hitTest:!0,overlapMode:p,circle:{x:i,y:a,radius:d},seenUids:{box:{},circle:{}}},v),O.length>0}_queryCell(i,a,d,p,v,w,S,T){const{seenUids:P,hitTest:O,overlapMode:R}=S,j=this.boxCells[v];if(j!==null){const X=this.bboxes;for(const ne of j)if(!P.box[ne]){P.box[ne]=!0;const Y=4*ne,le=this.boxKeys[ne];if(i<=X[Y+2]&&a<=X[Y+3]&&d>=X[Y+0]&&p>=X[Y+1]&&(!T||T(le))&&(!O||!Si(R,le.overlapMode))&&(w.push({key:le,x1:X[Y],y1:X[Y+1],x2:X[Y+2],y2:X[Y+3]}),O))return!0}}const H=this.circleCells[v];if(H!==null){const X=this.circles;for(const ne of H)if(!P.circle[ne]){P.circle[ne]=!0;const Y=3*ne,le=this.circleKeys[ne];if(this._circleAndRectCollide(X[Y],X[Y+1],X[Y+2],i,a,d,p)&&(!T||T(le))&&(!O||!Si(R,le.overlapMode))){const me=X[Y],ie=X[Y+1],ve=X[Y+2];if(w.push({key:le,x1:me-ve,y1:ie-ve,x2:me+ve,y2:ie+ve}),O)return!0}}}return!1}_queryCellCircle(i,a,d,p,v,w,S,T){const{circle:P,seenUids:O,overlapMode:R}=S,j=this.boxCells[v];if(j!==null){const X=this.bboxes;for(const ne of j)if(!O.box[ne]){O.box[ne]=!0;const Y=4*ne,le=this.boxKeys[ne];if(this._circleAndRectCollide(P.x,P.y,P.radius,X[Y+0],X[Y+1],X[Y+2],X[Y+3])&&(!T||T(le))&&!Si(R,le.overlapMode))return w.push(!0),!0}}const H=this.circleCells[v];if(H!==null){const X=this.circles;for(const ne of H)if(!O.circle[ne]){O.circle[ne]=!0;const Y=3*ne,le=this.circleKeys[ne];if(this._circlesCollide(X[Y],X[Y+1],X[Y+2],P.x,P.y,P.radius)&&(!T||T(le))&&!Si(R,le.overlapMode))return w.push(!0),!0}}}_forEachCell(i,a,d,p,v,w,S,T){const P=this._convertToXCellCoord(i),O=this._convertToYCellCoord(a),R=this._convertToXCellCoord(d),j=this._convertToYCellCoord(p);for(let H=P;H<=R;H++)for(let X=O;X<=j;X++)if(v.call(this,i,a,d,p,this.xCellCount*X+H,w,S,T))return}_convertToXCellCoord(i){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(i*this.xScale)))}_convertToYCellCoord(i){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(i*this.yScale)))}_circlesCollide(i,a,d,p,v,w){const S=p-i,T=v-a,P=d+w;return P*P>S*S+T*T}_circleAndRectCollide(i,a,d,p,v,w,S){const T=(w-p)/2,P=Math.abs(i-(p+T));if(P>T+d)return!1;const O=(S-v)/2,R=Math.abs(a-(v+O));if(R>O+d)return!1;if(P<=T||R<=O)return!0;const j=P-T,H=R-O;return j*j+H*H<=d*d}}function eo(_,i,a,d,p){const v=c.F();return i?(c.J(v,v,[1/p,1/p,1]),a||c.ad(v,v,d.angle)):c.K(v,d.labelPlaneMatrix,_),v}function to(_,i,a,d,p){if(i){const v=c.ae(_);return c.J(v,v,[p,p,1]),a||c.ad(v,v,-d.angle),v}return d.glCoordMatrix}function hr(_,i,a){let d;a?(d=[_.x,_.y,a(_.x,_.y),1],c.af(d,d,i)):(d=[_.x,_.y,0,1],function(v,w,S){const T=w[0],P=w[1];v[0]=S[0]*T+S[4]*P+S[12],v[1]=S[1]*T+S[5]*P+S[13],v[3]=S[3]*T+S[7]*P+S[15]}(d,d,i));const p=d[3];return{point:new c.P(d[0]/p,d[1]/p),signedDistanceFromCamera:p,isOccluded:!1}}function te(_,i){return .5+_/i*.5}function F(_,i){return _.x>=-i[0]&&_.x<=i[0]&&_.y>=-i[1]&&_.y<=i[1]}function N(_,i,a,d,p,v,w,S,T,P,O,R,j,H,X){const ne=d?_.textSizeData:_.iconSizeData,Y=c.ag(ne,a.transform.zoom),le=[256/a.width*2+1,256/a.height*2+1],me=d?_.text.dynamicLayoutVertexArray:_.icon.dynamicLayoutVertexArray;me.clear();const ie=_.lineVertexArray,ve=d?_.text.placedSymbolArray:_.icon.placedSymbolArray,Te=a.transform.width/a.transform.height;let Pe=!1;for(let Ve=0;VeMath.abs(a.x-i.x)*d?{useVertical:!0}:(_===c.ah.vertical?i.ya.x)?{needsFlipping:!0}:null}function de(_,i,a,d,p,v,w,S,T,P,O){const R=a/24,j=i.lineOffsetX*R,H=i.lineOffsetY*R;let X;if(i.numGlyphs>1){const ne=i.glyphStartIndex+i.numGlyphs,Y=i.lineStartIndex,le=i.lineStartIndex+i.lineLength,me=U(R,S,j,H,d,i,O,_);if(!me)return{notEnoughRoom:!0};const ie=hr(me.first.point,w,_.getElevation).point,ve=hr(me.last.point,w,_.getElevation).point;if(p&&!d){const Te=re(i.writingMode,ie,ve,P);if(Te)return Te}X=[me.first];for(let Te=i.glyphStartIndex+1;Te0?ie.point:function(Pe,Ve,Ke,ut,ht,Je){return _e(Pe,Ve,Ke,1,ht,Je)}(_.tileAnchorPoint,me,Y,0,v,_),Te=re(i.writingMode,Y,ve,P);if(Te)return Te}const ne=Oe(R*S.getoffsetX(i.glyphStartIndex),j,H,d,i.segment,i.lineStartIndex,i.lineStartIndex+i.lineLength,_,O);if(!ne||_.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};X=[ne]}for(const ne of X)c.aj(T,ne.point,ne.angle);return{}}function _e(_,i,a,d,p,v){const w=_.add(_.sub(i)._unit()),S=p!==void 0?hr(w,p,v.getElevation).point:ue(w.x,w.y,v).point,T=a.sub(S);return a.add(T._mult(d/T.mag()))}function be(_,i,a){const d=i.projectionCache;if(d.projections[_])return d.projections[_];const p=new c.P(i.lineVertexArray.getx(_),i.lineVertexArray.gety(_)),v=ue(p.x,p.y,i);if(v.signedDistanceFromCamera>0)return d.projections[_]=v.point,d.anyProjectionOccluded=d.anyProjectionOccluded||v.isOccluded,v.point;const w=_-a.direction;return function(S,T,P,O,R){return _e(S,T,P,O,void 0,R)}(a.distanceFromAnchor===0?i.tileAnchorPoint:new c.P(i.lineVertexArray.getx(w),i.lineVertexArray.gety(w)),p,a.previousVertex,a.absOffsetX-a.distanceFromAnchor+1,i)}function ue(_,i,a){const d=_+a.translation[0],p=i+a.translation[1];let v;return!a.pitchWithMap&&a.projection.useSpecialProjectionForSymbols?(v=a.projection.projectTileCoordinates(d,p,a.unwrappedTileID,a.getElevation),v.point.x=(.5*v.point.x+.5)*a.width,v.point.y=(.5*-v.point.y+.5)*a.height):(v=hr(new c.P(d,p),a.labelPlaneMatrix,a.getElevation),v.isOccluded=!1),v}function Me(_,i,a){return _._unit()._perp()._mult(i*a)}function Ue(_,i,a,d,p,v,w,S,T){if(S.projectionCache.offsets[_])return S.projectionCache.offsets[_];const P=a.add(i);if(_+T.direction=p)return S.projectionCache.offsets[_]=P,P;const O=be(_+T.direction,S,T),R=Me(O.sub(a),w,T.direction),j=a.add(R),H=O.add(R);return S.projectionCache.offsets[_]=c.ak(v,P,j,H)||P,S.projectionCache.offsets[_]}function Oe(_,i,a,d,p,v,w,S,T){const P=d?_-i:_+i;let O=P>0?1:-1,R=0;d&&(O*=-1,R=Math.PI),O<0&&(R+=Math.PI);let j,H=O>0?v+p:v+p+1;S.projectionCache.cachedAnchorPoint?j=S.projectionCache.cachedAnchorPoint:(j=ue(S.tileAnchorPoint.x,S.tileAnchorPoint.y,S).point,S.projectionCache.cachedAnchorPoint=j);let X,ne,Y=j,le=j,me=0,ie=0;const ve=Math.abs(P),Te=[];let Pe;for(;me+ie<=ve;){if(H+=O,H=w)return null;me+=ie,le=Y,ne=X;const ut={absOffsetX:ve,direction:O,distanceFromAnchor:me,previousVertex:le};if(Y=be(H,S,ut),a===0)Te.push(le),Pe=Y.sub(le);else{let ht;const Je=Y.sub(le);ht=Je.mag()===0?Me(be(H+O,S,ut).sub(Y),a,O):Me(Je,a,O),ne||(ne=le.add(ht)),X=Ue(H,ht,Y,v,w,ne,a,S,ut),Te.push(ne),Pe=X.sub(ne)}ie=Pe.mag()}const Ve=Pe._mult((ve-me)/ie)._add(ne||le),Ke=R+Math.atan2(Y.y-le.y,Y.x-le.x);return Te.push(Ve),{point:Ve,angle:T?Ke:0,path:Te}}const Re=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function It(_,i){for(let a=0;a<_;a++){const d=i.length;i.resize(d+4),i.float32.set(Re,3*d)}}const Et=100;class Jt{constructor(i,a,d=new Bt(i.width+200,i.height+200,25),p=new Bt(i.width+200,i.height+200,25)){this.transform=i,this.mapProjection=a,this.grid=d,this.ignoredGrid=p,this.pitchFactor=Math.cos(i._pitch)*i.cameraToCenterDistance,this.screenRightBoundary=i.width+Et,this.screenBottomBoundary=i.height+Et,this.gridRightBoundary=i.width+200,this.gridBottomBoundary=i.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(i,a,d,p,v,w,S,T,P,O,R){const j=i.anchorPointX+T[0],H=i.anchorPointY+T[1],X=this.projectAndGetPerspectiveRatio(p,j,H,v,O),ne=this._projectCollisionBox(i,d,p,v,w,S,T,X,O,R),[Y,le,me,ie]=ne.box;return this.mapProjection.useSpecialProjectionForSymbols&&(w?ne.allPointsOccluded:this.mapProjection.isOccluded(j,H,v))||X.perspectiveRatio=1;Wt--)at.push(Rt.path[Wt]);for(let Wt=1;WtYt.signedDistanceFromCamera<=0)?[]:Wt.map(Yt=>Yt.point)}let Ti=[];if(at.length>0){const Wt=at[0].clone(),Yt=at[0].clone();for(let Ci=1;Ci=Je.x&&Yt.x<=et.x&&Wt.y>=Je.y&&Yt.y<=et.y?[at]:Yt.xet.x||Yt.yet.y?[]:c.al([at],Je.x,Je.y,et.x,et.y)}for(const Wt of Ti){yt.reset(Wt,.25*ht);let Yt=0;Yt=yt.length<=.5*ht?1:Math.ceil(yt.paddedLength/kt)+1;for(let Ci=0;Cihr(p,d,a.getElevation))}queryRenderedSymbols(i){if(i.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const a=[];let d=1/0,p=1/0,v=-1/0,w=-1/0;for(const O of i){const R=new c.P(O.x+Et,O.y+Et);d=Math.min(d,R.x),p=Math.min(p,R.y),v=Math.max(v,R.x),w=Math.max(w,R.y),a.push(R)}const S=this.grid.query(d,p,v,w).concat(this.ignoredGrid.query(d,p,v,w)),T={},P={};for(const O of S){const R=O.key;if(T[R.bucketInstanceId]===void 0&&(T[R.bucketInstanceId]={}),T[R.bucketInstanceId][R.featureIndex])continue;const j=[new c.P(O.x1,O.y1),new c.P(O.x2,O.y1),new c.P(O.x2,O.y2),new c.P(O.x1,O.y2)];c.am(a,j)&&(T[R.bucketInstanceId][R.featureIndex]=!0,P[R.bucketInstanceId]===void 0&&(P[R.bucketInstanceId]=[]),P[R.bucketInstanceId].push(R.featureIndex))}return P}insertCollisionBox(i,a,d,p,v,w){(d?this.ignoredGrid:this.grid).insert({bucketInstanceId:p,featureIndex:v,collisionGroupID:w,overlapMode:a},i[0],i[1],i[2],i[3])}insertCollisionCircles(i,a,d,p,v,w){const S=d?this.ignoredGrid:this.grid,T={bucketInstanceId:p,featureIndex:v,collisionGroupID:w,overlapMode:a};for(let P=0;P=this.screenRightBoundary||pthis.screenBottomBoundary}isInsideGrid(i,a,d,p){return d>=0&&i=0&&athis.projectAndGetPerspectiveRatio(d,Je.x,Je.y,p,P));ut=ht.some(Je=>!Je.isOccluded),Ke=ht.map(Je=>Je.point)}else ut=!0;return{box:c.ao(Ke),allPointsOccluded:!ut}}}function Dt(_,i,a){return i*(c.W/(_.tileSize*Math.pow(2,a-_.tileID.overscaledZ)))}class ti{constructor(i,a,d,p){this.opacity=i?Math.max(0,Math.min(1,i.opacity+(i.placed?a:-a))):p&&d?1:0,this.placed=d}isHidden(){return this.opacity===0&&!this.placed}}class fi{constructor(i,a,d,p,v){this.text=new ti(i?i.text:null,a,d,v),this.icon=new ti(i?i.icon:null,a,p,v)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ii{constructor(i,a,d){this.text=i,this.icon=a,this.skipFade=d}}class Ji{constructor(){this.invProjMatrix=c.F(),this.viewportMatrix=c.F(),this.circles=[]}}class Gt{constructor(i,a,d,p,v){this.bucketInstanceId=i,this.featureIndex=a,this.sourceLayerIndex=d,this.bucketIndex=p,this.tileID=v}}class Ri{constructor(i){this.crossSourceCollisions=i,this.maxGroupID=0,this.collisionGroups={}}get(i){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[i]){const a=++this.maxGroupID;this.collisionGroups[i]={ID:a,predicate:d=>d.collisionGroupID===a}}return this.collisionGroups[i]}}function nr(_,i,a,d,p){const{horizontalAlign:v,verticalAlign:w}=c.au(_);return new c.P(-(v-.5)*i+d[0]*p,-(w-.5)*a+d[1]*p)}class Wr{constructor(i,a,d,p,v,w){this.transform=i.clone(),this.terrain=d,this.collisionIndex=new Jt(this.transform,a),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=p,this.retainedQueryData={},this.collisionGroups=new Ri(v),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=w,w&&(w.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(i){const a=this.terrain;return a?(d,p)=>a.getElevation(i,d,p):null}getBucketParts(i,a,d,p){const v=d.getBucket(a),w=d.latestFeatureIndex;if(!v||!w||a.id!==v.layerIds[0])return;const S=d.collisionBoxArray,T=v.layers[0].layout,P=v.layers[0].paint,O=Math.pow(2,this.transform.zoom-d.tileID.overscaledZ),R=d.tileSize/c.W,j=d.tileID.toUnwrapped(),H=this.transform.calculatePosMatrix(j),X=T.get("text-pitch-alignment")==="map",ne=T.get("text-rotation-alignment")==="map",Y=Dt(d,1,this.transform.zoom),le=this.collisionIndex.mapProjection.translatePosition(this.transform,d,P.get("text-translate"),P.get("text-translate-anchor")),me=this.collisionIndex.mapProjection.translatePosition(this.transform,d,P.get("icon-translate"),P.get("icon-translate-anchor")),ie=eo(H,X,ne,this.transform,Y);let ve=null;if(X){const Pe=to(H,X,ne,this.transform,Y);ve=c.K([],this.transform.labelPlaneMatrix,Pe)}this.retainedQueryData[v.bucketInstanceId]=new Gt(v.bucketInstanceId,w,v.sourceLayerIndex,v.index,d.tileID);const Te={bucket:v,layout:T,translationText:le,translationIcon:me,posMatrix:H,unwrappedTileID:j,textLabelPlaneMatrix:ie,labelToScreenMatrix:ve,scale:O,textPixelRatio:R,holdingForFade:d.holdingForFade(),collisionBoxArray:S,partiallyEvaluatedTextSize:c.ag(v.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(v.sourceID)};if(p)for(const Pe of v.sortKeyRanges){const{sortKey:Ve,symbolInstanceStart:Ke,symbolInstanceEnd:ut}=Pe;i.push({sortKey:Ve,symbolInstanceStart:Ke,symbolInstanceEnd:ut,parameters:Te})}else i.push({symbolInstanceStart:0,symbolInstanceEnd:v.symbolInstances.length,parameters:Te})}attemptAnchorPlacement(i,a,d,p,v,w,S,T,P,O,R,j,H,X,ne,Y,le,me,ie){const ve=c.aq[i.textAnchor],Te=[i.textOffset0,i.textOffset1],Pe=nr(ve,d,p,Te,v),Ve=this.collisionIndex.placeCollisionBox(a,j,T,P,O,S,w,Y,R.predicate,ie,Pe);if((!me||this.collisionIndex.placeCollisionBox(me,j,T,P,O,S,w,le,R.predicate,ie,Pe).placeable)&&Ve.placeable){let Ke;if(this.prevPlacement&&this.prevPlacement.variableOffsets[H.crossTileID]&&this.prevPlacement.placements[H.crossTileID]&&this.prevPlacement.placements[H.crossTileID].text&&(Ke=this.prevPlacement.variableOffsets[H.crossTileID].anchor),H.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[H.crossTileID]={textOffset:Te,width:d,height:p,anchor:ve,textBoxScale:v,prevAnchor:Ke},this.markUsedJustification(X,ve,H,ne),X.allowVerticalPlacement&&(this.markUsedOrientation(X,ne,H),this.placedOrientations[H.crossTileID]=ne),{shift:Pe,placedGlyphBoxes:Ve}}}placeLayerBucketPart(i,a,d){const{bucket:p,layout:v,translationText:w,translationIcon:S,posMatrix:T,unwrappedTileID:P,textLabelPlaneMatrix:O,labelToScreenMatrix:R,textPixelRatio:j,holdingForFade:H,collisionBoxArray:X,partiallyEvaluatedTextSize:ne,collisionGroup:Y}=i.parameters,le=v.get("text-optional"),me=v.get("icon-optional"),ie=c.ar(v,"text-overlap","text-allow-overlap"),ve=ie==="always",Te=c.ar(v,"icon-overlap","icon-allow-overlap"),Pe=Te==="always",Ve=v.get("text-rotation-alignment")==="map",Ke=v.get("text-pitch-alignment")==="map",ut=v.get("icon-text-fit")!=="none",ht=v.get("symbol-z-order")==="viewport-y",Je=ve&&(Pe||!p.hasIconData()||me),et=Pe&&(ve||!p.hasTextData()||le);!p.collisionArrays&&X&&p.deserializeCollisionBoxes(X);const yt=this._getTerrainElevationFunc(this.retainedQueryData[p.bucketInstanceId].tileID),Rt=(it,at,kt)=>{var Ti,Wt;if(a[it.crossTileID])return;if(H)return void(this.placements[it.crossTileID]=new Ii(!1,!1,!1));let Yt=!1,Ci=!1,Tr=!0,In=null,Ai={box:null,placeable:!1,offscreen:null},Jr={box:null,placeable:!1,offscreen:null},Vr=null,Cr=null,Ar=null,Tn=0,Jo=0,Pl=0;at.textFeatureIndex?Tn=at.textFeatureIndex:it.useRuntimeCollisionCircles&&(Tn=it.featureIndex),at.verticalTextFeatureIndex&&(Jo=at.verticalTextFeatureIndex);const As=at.textBox;if(As){const _r=Mr=>{let kr=c.ah.horizontal;if(p.allowVerticalPlacement&&!Mr&&this.prevPlacement){const dr=this.prevPlacement.placedOrientations[it.crossTileID];dr&&(this.placedOrientations[it.crossTileID]=dr,kr=dr,this.markUsedOrientation(p,kr,it))}return kr},Cn=(Mr,kr)=>{if(p.allowVerticalPlacement&&it.numVerticalGlyphVertices>0&&at.verticalTextBox){for(const dr of p.writingModes)if(dr===c.ah.vertical?(Ai=kr(),Jr=Ai):Ai=Mr(),Ai&&Ai.placeable)break}else Ai=Mr()},Eo=it.textAnchorOffsetStartIndex,Ms=it.textAnchorOffsetEndIndex;if(Ms===Eo){const Mr=(kr,dr)=>{const Bi=this.collisionIndex.placeCollisionBox(kr,ie,j,T,P,Ke,Ve,w,Y.predicate,yt);return Bi&&Bi.placeable&&(this.markUsedOrientation(p,dr,it),this.placedOrientations[it.crossTileID]=dr),Bi};Cn(()=>Mr(As,c.ah.horizontal),()=>{const kr=at.verticalTextBox;return p.allowVerticalPlacement&&it.numVerticalGlyphVertices>0&&kr?Mr(kr,c.ah.vertical):{box:null,offscreen:null}}),_r(Ai&&Ai.placeable)}else{let Mr=c.aq[(Wt=(Ti=this.prevPlacement)===null||Ti===void 0?void 0:Ti.variableOffsets[it.crossTileID])===null||Wt===void 0?void 0:Wt.anchor];const kr=(Bi,ks,uu)=>{const sr=Bi.x2-Bi.x1,Qh=Bi.y2-Bi.y1,Dl=it.textBoxScale,Rl=ut&&Te==="never"?ks:null;let So=null,ed=ie==="never"?1:2,hu="never";Mr&&ed++;for(let du=0;dukr(As,at.iconBox,c.ah.horizontal),()=>{const Bi=at.verticalTextBox;return p.allowVerticalPlacement&&(!Ai||!Ai.placeable)&&it.numVerticalGlyphVertices>0&&Bi?kr(Bi,at.verticalIconBox,c.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Ai&&(Yt=Ai.placeable,Tr=Ai.offscreen);const dr=_r(Ai&&Ai.placeable);if(!Yt&&this.prevPlacement){const Bi=this.prevPlacement.variableOffsets[it.crossTileID];Bi&&(this.variableOffsets[it.crossTileID]=Bi,this.markUsedJustification(p,Bi.anchor,it,dr))}}}if(Vr=Ai,Yt=Vr&&Vr.placeable,Tr=Vr&&Vr.offscreen,it.useRuntimeCollisionCircles){const _r=p.text.placedSymbolArray.get(it.centerJustifiedTextSymbolIndex),Cn=c.ai(p.textSizeData,ne,_r),Eo=v.get("text-padding");Cr=this.collisionIndex.placeCollisionCircles(ie,_r,p.lineVertexArray,p.glyphOffsetArray,Cn,T,P,O,R,d,Ke,Y.predicate,it.collisionCircleDiameter,Eo,w,yt),Cr.circles.length&&Cr.collisionDetected&&!d&&c.w("Collisions detected, but collision boxes are not shown"),Yt=ve||Cr.circles.length>0&&!Cr.collisionDetected,Tr=Tr&&Cr.offscreen}if(at.iconFeatureIndex&&(Pl=at.iconFeatureIndex),at.iconBox){const _r=Cn=>this.collisionIndex.placeCollisionBox(Cn,Te,j,T,P,Ke,Ve,S,Y.predicate,yt,ut&&In?In:void 0);Jr&&Jr.placeable&&at.verticalIconBox?(Ar=_r(at.verticalIconBox),Ci=Ar.placeable):(Ar=_r(at.iconBox),Ci=Ar.placeable),Tr=Tr&&Ar.offscreen}const Yo=le||it.numHorizontalGlyphVertices===0&&it.numVerticalGlyphVertices===0,zl=me||it.numIconVertices===0;Yo||zl?zl?Yo||(Ci=Ci&&Yt):Yt=Ci&&Yt:Ci=Yt=Ci&&Yt;const cu=Ci&&Ar.placeable;if(Yt&&Vr.placeable&&this.collisionIndex.insertCollisionBox(Vr.box,ie,v.get("text-ignore-placement"),p.bucketInstanceId,Jr&&Jr.placeable&&Jo?Jo:Tn,Y.ID),cu&&this.collisionIndex.insertCollisionBox(Ar.box,Te,v.get("icon-ignore-placement"),p.bucketInstanceId,Pl,Y.ID),Cr&&Yt&&this.collisionIndex.insertCollisionCircles(Cr.circles,ie,v.get("text-ignore-placement"),p.bucketInstanceId,Tn,Y.ID),d&&this.storeCollisionData(p.bucketInstanceId,kt,at,Vr,Ar,Cr),it.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(p.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[it.crossTileID]=new Ii(Yt||Je,Ci||et,Tr||p.justReloaded),a[it.crossTileID]=!0};if(ht){if(i.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const it=p.getSortedSymbolIndexes(this.transform.angle);for(let at=it.length-1;at>=0;--at){const kt=it[at];Rt(p.symbolInstances.get(kt),p.collisionArrays[kt],kt)}}else for(let it=i.symbolInstanceStart;it=0&&(i.text.placedSymbolArray.get(S).crossTileID=v>=0&&S!==v?0:d.crossTileID)}markUsedOrientation(i,a,d){const p=a===c.ah.horizontal||a===c.ah.horizontalOnly?a:0,v=a===c.ah.vertical?a:0,w=[d.leftJustifiedTextSymbolIndex,d.centerJustifiedTextSymbolIndex,d.rightJustifiedTextSymbolIndex];for(const S of w)i.text.placedSymbolArray.get(S).placedOrientation=p;d.verticalPlacedTextSymbolIndex&&(i.text.placedSymbolArray.get(d.verticalPlacedTextSymbolIndex).placedOrientation=v)}commit(i){this.commitTime=i,this.zoomAtLastRecencyCheck=this.transform.zoom;const a=this.prevPlacement;let d=!1;this.prevZoomAdjustment=a?a.zoomAdjustment(this.transform.zoom):0;const p=a?a.symbolFadeChange(i):1,v=a?a.opacities:{},w=a?a.variableOffsets:{},S=a?a.placedOrientations:{};for(const T in this.placements){const P=this.placements[T],O=v[T];O?(this.opacities[T]=new fi(O,p,P.text,P.icon),d=d||P.text!==O.text.placed||P.icon!==O.icon.placed):(this.opacities[T]=new fi(null,p,P.text,P.icon,P.skipFade),d=d||P.text||P.icon)}for(const T in v){const P=v[T];if(!this.opacities[T]){const O=new fi(P,p,!1,!1);O.isHidden()||(this.opacities[T]=O,d=d||P.text.placed||P.icon.placed)}}for(const T in w)this.variableOffsets[T]||!this.opacities[T]||this.opacities[T].isHidden()||(this.variableOffsets[T]=w[T]);for(const T in S)this.placedOrientations[T]||!this.opacities[T]||this.opacities[T].isHidden()||(this.placedOrientations[T]=S[T]);if(a&&a.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");d?this.lastPlacementChangeTime=i:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=a?a.lastPlacementChangeTime:i)}updateLayerOpacities(i,a){const d={};for(const p of a){const v=p.getBucket(i);v&&p.latestFeatureIndex&&i.id===v.layerIds[0]&&this.updateBucketOpacities(v,p.tileID,d,p.collisionBoxArray)}}updateBucketOpacities(i,a,d,p){i.hasTextData()&&(i.text.opacityVertexArray.clear(),i.text.hasVisibleVertices=!1),i.hasIconData()&&(i.icon.opacityVertexArray.clear(),i.icon.hasVisibleVertices=!1),i.hasIconCollisionBoxData()&&i.iconCollisionBox.collisionVertexArray.clear(),i.hasTextCollisionBoxData()&&i.textCollisionBox.collisionVertexArray.clear();const v=i.layers[0],w=v.layout,S=new fi(null,0,!1,!1,!0),T=w.get("text-allow-overlap"),P=w.get("icon-allow-overlap"),O=v._unevaluatedLayout.hasValue("text-variable-anchor")||v._unevaluatedLayout.hasValue("text-variable-anchor-offset"),R=w.get("text-rotation-alignment")==="map",j=w.get("text-pitch-alignment")==="map",H=w.get("icon-text-fit")!=="none",X=new fi(null,0,T&&(P||!i.hasIconData()||w.get("icon-optional")),P&&(T||!i.hasTextData()||w.get("text-optional")),!0);!i.collisionArrays&&p&&(i.hasIconCollisionBoxData()||i.hasTextCollisionBoxData())&&i.deserializeCollisionBoxes(p);const ne=(le,me,ie)=>{for(let ve=0;ve0,Ke=this.placedOrientations[me.crossTileID],ut=Ke===c.ah.vertical,ht=Ke===c.ah.horizontal||Ke===c.ah.horizontalOnly;if(ie>0||ve>0){const et=Zr(Pe.text);ne(i.text,ie,ut?sa:et),ne(i.text,ve,ht?sa:et);const yt=Pe.text.isHidden();[me.rightJustifiedTextSymbolIndex,me.centerJustifiedTextSymbolIndex,me.leftJustifiedTextSymbolIndex].forEach(at=>{at>=0&&(i.text.placedSymbolArray.get(at).hidden=yt||ut?1:0)}),me.verticalPlacedTextSymbolIndex>=0&&(i.text.placedSymbolArray.get(me.verticalPlacedTextSymbolIndex).hidden=yt||ht?1:0);const Rt=this.variableOffsets[me.crossTileID];Rt&&this.markUsedJustification(i,Rt.anchor,me,Ke);const it=this.placedOrientations[me.crossTileID];it&&(this.markUsedJustification(i,"left",me,it),this.markUsedOrientation(i,it,me))}if(Ve){const et=Zr(Pe.icon),yt=!(H&&me.verticalPlacedIconSymbolIndex&&ut);me.placedIconSymbolIndex>=0&&(ne(i.icon,me.numIconVertices,yt?et:sa),i.icon.placedSymbolArray.get(me.placedIconSymbolIndex).hidden=Pe.icon.isHidden()),me.verticalPlacedIconSymbolIndex>=0&&(ne(i.icon,me.numVerticalIconVertices,yt?sa:et),i.icon.placedSymbolArray.get(me.verticalPlacedIconSymbolIndex).hidden=Pe.icon.isHidden())}const Je=Y&&Y.has(le)?Y.get(le):{text:null,icon:null};if(i.hasIconCollisionBoxData()||i.hasTextCollisionBoxData()){const et=i.collisionArrays[le];if(et){let yt=new c.P(0,0);if(et.textBox||et.verticalTextBox){let Rt=!0;if(O){const it=this.variableOffsets[Te];it?(yt=nr(it.anchor,it.width,it.height,it.textOffset,it.textBoxScale),R&&yt._rotate(j?this.transform.angle:-this.transform.angle)):Rt=!1}if(et.textBox||et.verticalTextBox){let it;et.textBox&&(it=ut),et.verticalTextBox&&(it=ht),ln(i.textCollisionBox.collisionVertexArray,Pe.text.placed,!Rt||it,Je.text,yt.x,yt.y)}}if(et.iconBox||et.verticalIconBox){const Rt=!!(!ht&&et.verticalIconBox);let it;et.iconBox&&(it=Rt),et.verticalIconBox&&(it=!Rt),ln(i.iconCollisionBox.collisionVertexArray,Pe.icon.placed,it,Je.icon,H?yt.x:0,H?yt.y:0)}}}}if(i.sortFeatures(this.transform.angle),this.retainedQueryData[i.bucketInstanceId]&&(this.retainedQueryData[i.bucketInstanceId].featureSortOrder=i.featureSortOrder),i.hasTextData()&&i.text.opacityVertexBuffer&&i.text.opacityVertexBuffer.updateData(i.text.opacityVertexArray),i.hasIconData()&&i.icon.opacityVertexBuffer&&i.icon.opacityVertexBuffer.updateData(i.icon.opacityVertexArray),i.hasIconCollisionBoxData()&&i.iconCollisionBox.collisionVertexBuffer&&i.iconCollisionBox.collisionVertexBuffer.updateData(i.iconCollisionBox.collisionVertexArray),i.hasTextCollisionBoxData()&&i.textCollisionBox.collisionVertexBuffer&&i.textCollisionBox.collisionVertexBuffer.updateData(i.textCollisionBox.collisionVertexArray),i.text.opacityVertexArray.length!==i.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${i.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${i.text.layoutVertexArray.length}) / 4`);if(i.icon.opacityVertexArray.length!==i.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${i.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${i.icon.layoutVertexArray.length}) / 4`);if(i.bucketInstanceId in this.collisionCircleArrays){const le=this.collisionCircleArrays[i.bucketInstanceId];i.placementInvProjMatrix=le.invProjMatrix,i.placementViewportMatrix=le.viewportMatrix,i.collisionCircleArray=le.circles,delete this.collisionCircleArrays[i.bucketInstanceId]}}symbolFadeChange(i){return this.fadeDuration===0?1:(i-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(i){return Math.max(0,(this.transform.zoom-i)/1.5)}hasTransitions(i){return this.stale||i-this.lastPlacementChangeTimei}setStale(){this.stale=!0}}function ln(_,i,a,d,p,v){d&&d.length!==0||(d=[0,0,0,0]);const w=d[0]-Et,S=d[1]-Et,T=d[2]-Et,P=d[3]-Et;_.emplaceBack(i?1:0,a?1:0,p||0,v||0,w,S),_.emplaceBack(i?1:0,a?1:0,p||0,v||0,T,S),_.emplaceBack(i?1:0,a?1:0,p||0,v||0,T,P),_.emplaceBack(i?1:0,a?1:0,p||0,v||0,w,P)}const or=Math.pow(2,25),ms=Math.pow(2,24),$f=Math.pow(2,17),ui=Math.pow(2,16),wc=Math.pow(2,9),Ec=Math.pow(2,8),cn=Math.pow(2,1);function Zr(_){if(_.opacity===0&&!_.placed)return 0;if(_.opacity===1&&_.placed)return 4294967295;const i=_.placed?1:0,a=Math.floor(127*_.opacity);return a*or+i*ms+a*$f+i*ui+a*wc+i*Ec+a*cn+i}const sa=0;function Xr(){return{isOccluded:(_,i,a)=>!1,getPitchedTextCorrection:(_,i,a)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(_,i,a,d){throw new Error("Not implemented.")},translatePosition:(_,i,a,d)=>function(p,v,w,S,T=!1){if(!w[0]&&!w[1])return[0,0];const P=T?S==="map"?p.angle:0:S==="viewport"?-p.angle:0;if(P){const O=Math.sin(P),R=Math.cos(P);w=[w[0]*R-w[1]*O,w[0]*O+w[1]*R]}return[T?w[0]:Dt(v,w[0],p.zoom),T?w[1]:Dt(v,w[1],p.zoom)]}(_,i,a,d),getCircleRadiusCorrection:_=>1}}class _n{constructor(i){this._sortAcrossTiles=i.layout.get("symbol-z-order")!=="viewport-y"&&!i.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(i,a,d,p,v){const w=this._bucketParts;for(;this._currentTileIndexS.sortKey-T.sortKey));this._currentPartIndex!this._forceFullPlacement&&A.now()-p>2;for(;this._currentPlacementIndex>=0;){const w=a[i[this._currentPlacementIndex]],S=this.placement.collisionIndex.transform.zoom;if(w.type==="symbol"&&(!w.minzoom||w.minzoom<=S)&&(!w.maxzoom||w.maxzoom>S)){if(this._inProgressLayer||(this._inProgressLayer=new _n(w)),this._inProgressLayer.continuePlacement(d[w.source],this.placement,this._showCollisionBoxes,w,v))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(i){return this.placement.commit(i),this.placement}}const io=512/c.W/2;class Yi{constructor(i,a,d){this.tileID=i,this.bucketInstanceId=d,this._symbolsByKey={};const p=new Map;for(let v=0;v({x:Math.floor(T.anchorX*io),y:Math.floor(T.anchorY*io)})),crossTileIDs:w.map(T=>T.crossTileID)};if(S.positions.length>128){const T=new c.av(S.positions.length,16,Uint16Array);for(const{x:P,y:O}of S.positions)T.add(P,O);T.finish(),delete S.positions,S.index=T}this._symbolsByKey[v]=S}}getScaledCoordinates(i,a){const{x:d,y:p,z:v}=this.tileID.canonical,{x:w,y:S,z:T}=a.canonical,P=io/Math.pow(2,T-v),O=(S*c.W+i.anchorY)*P,R=p*c.W*io;return{x:Math.floor((w*c.W+i.anchorX)*P-d*c.W*io),y:Math.floor(O-R)}}findMatches(i,a,d){const p=this.tileID.canonical.zi)}}class aa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class jo{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(i){const a=Math.round((i-this.lng)/360);if(a!==0)for(const d in this.indexes){const p=this.indexes[d],v={};for(const w in p){const S=p[w];S.tileID=S.tileID.unwrapTo(S.tileID.wrap+a),v[S.tileID.key]=S}this.indexes[d]=v}this.lng=i}addBucket(i,a,d){if(this.indexes[i.overscaledZ]&&this.indexes[i.overscaledZ][i.key]){if(this.indexes[i.overscaledZ][i.key].bucketInstanceId===a.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(i.overscaledZ,this.indexes[i.overscaledZ][i.key])}for(let v=0;vi.overscaledZ)for(const S in w){const T=w[S];T.tileID.isChildOf(i)&&T.findMatches(a.symbolInstances,i,p)}else{const S=w[i.scaledTo(Number(v)).key];S&&S.findMatches(a.symbolInstances,i,p)}}for(let v=0;v{a[d]=!0});for(const d in this.layerIndexes)a[d]||delete this.layerIndexes[d]}}const $o=(_,i)=>c.t(_,i&&i.filter(a=>a.identifier!=="source.canvas")),Sn=c.aw();class el extends c.E{constructor(i,a={}){super(),this._rtlPluginLoaded=()=>{for(const d in this.sourceCaches){const p=this.sourceCaches[d].getSource().type;p!=="vector"&&p!=="geojson"||this.sourceCaches[d].reload()}},this.map=i,this.dispatcher=new Di(Li(),i._getMapId()),this.dispatcher.registerMessageHandler("GG",(d,p)=>this.getGlyphs(d,p)),this.dispatcher.registerMessageHandler("GI",(d,p)=>this.getImages(d,p)),this.imageManager=new De,this.imageManager.setEventedParent(this),this.glyphManager=new dt(i._requestManager,a.localIdeographFontFamily),this.lineAtlas=new Vt(256,512),this.crossTileSymbolIndex=new qi,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new c.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",c.ay()),Ht().on(Mt,this._rtlPluginLoaded),this.on("data",d=>{if(d.dataType!=="source"||d.sourceDataType!=="metadata")return;const p=this.sourceCaches[d.sourceId];if(!p)return;const v=p.getSource();if(v&&v.vectorLayerIds)for(const w in this._layers){const S=this._layers[w];S.source===v.id&&this._validateLayer(S)}})}loadURL(i,a={},d){this.fire(new c.k("dataloading",{dataType:"style"})),a.validate=typeof a.validate!="boolean"||a.validate;const p=this.map._requestManager.transformRequest(i,"Style");this._loadStyleRequest=new AbortController,c.h(p,this._loadStyleRequest).then(v=>{this._loadStyleRequest=null,this._load(v.data,a,d)}).catch(v=>{this._loadStyleRequest=null,v&&this.fire(new c.j(v))})}loadJSON(i,a={},d){this.fire(new c.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,A.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,a.validate=a.validate!==!1,this._load(i,a,d)}).catch(()=>{})}loadEmpty(){this.fire(new c.k("dataloading",{dataType:"style"})),this._load(Sn,{validate:!1})}_load(i,a,d){var p;const v=a.transformStyle?a.transformStyle(d,i):i;if(!a.validate||!$o(this,c.x(v))){this._loaded=!0,this.stylesheet=v;for(const w in v.sources)this.addSource(w,v.sources[w],{validate:!1});v.sprite?this._loadSprite(v.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(v.glyphs),this._createLayers(),this.light=new $t(this.stylesheet.light),this.map.setTerrain((p=this.stylesheet.terrain)!==null&&p!==void 0?p:null),this.fire(new c.k("data",{dataType:"style"})),this.fire(new c.k("style.load"))}}_createLayers(){const i=c.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",i),this._order=i.map(a=>a.id),this._layers={},this._serializedLayers=null;for(const a of i){const d=c.aA(a);d.setEventedParent(this,{layer:{id:a.id}}),this._layers[a.id]=d}}_loadSprite(i,a=!1,d=void 0){let p;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(v,w,S,T){return c._(this,void 0,void 0,function*(){const P=Le(v),O=S>1?"@2x":"",R={},j={};for(const{id:H,url:X}of P){const ne=w.transformRequest(pe(X,O,".json"),"SpriteJSON");R[H]=c.h(ne,T);const Y=w.transformRequest(pe(X,O,".png"),"SpriteImage");j[H]=Z.getImage(Y,T)}return yield Promise.all([...Object.values(R),...Object.values(j)]),function(H,X){return c._(this,void 0,void 0,function*(){const ne={};for(const Y in H){ne[Y]={};const le=A.getImageCanvasContext((yield X[Y]).data),me=(yield H[Y]).data;for(const ie in me){const{width:ve,height:Te,x:Pe,y:Ve,sdf:Ke,pixelRatio:ut,stretchX:ht,stretchY:Je,content:et,textFitWidth:yt,textFitHeight:Rt}=me[ie];ne[Y][ie]={data:null,pixelRatio:ut,sdf:Ke,stretchX:ht,stretchY:Je,content:et,textFitWidth:yt,textFitHeight:Rt,spriteData:{width:ve,height:Te,x:Pe,y:Ve,context:le}}}}return ne})}(R,j)})}(i,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(v=>{if(this._spriteRequest=null,v)for(const w in v){this._spritesImagesIds[w]=[];const S=this._spritesImagesIds[w]?this._spritesImagesIds[w].filter(T=>!(T in v)):[];for(const T of S)this.imageManager.removeImage(T),this._changedImages[T]=!0;for(const T in v[w]){const P=w==="default"?T:`${w}:${T}`;this._spritesImagesIds[w].push(P),P in this.imageManager.images?this.imageManager.updateImage(P,v[w][T],!1):this.imageManager.addImage(P,v[w][T]),a&&(this._changedImages[P]=!0)}}}).catch(v=>{this._spriteRequest=null,p=v,this.fire(new c.j(p))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),a&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.k("data",{dataType:"style"})),d&&d(p)})}_unloadSprite(){for(const i of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(i),this._changedImages[i]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.k("data",{dataType:"style"}))}_validateLayer(i){const a=this.sourceCaches[i.source];if(!a)return;const d=i.sourceLayer;if(!d)return;const p=a.getSource();(p.type==="geojson"||p.vectorLayerIds&&p.vectorLayerIds.indexOf(d)===-1)&&this.fire(new c.j(new Error(`Source layer "${d}" does not exist on source "${p.id}" as specified by style layer "${i.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const i in this.sourceCaches)if(!this.sourceCaches[i].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(i){const a=this._serializedAllLayers();if(!i||i.length===0)return Object.values(a);const d=[];for(const p of i)a[p]&&d.push(a[p]);return d}_serializedAllLayers(){let i=this._serializedLayers;if(i)return i;i=this._serializedLayers={};const a=Object.keys(this._layers);for(const d of a){const p=this._layers[d];p.type!=="custom"&&(i[d]=p.serialize())}return i}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const i in this.sourceCaches)if(this.sourceCaches[i].hasTransition())return!0;for(const i in this._layers)if(this._layers[i].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(i){if(!this._loaded)return;const a=this._changed;if(a){const p=Object.keys(this._updatedLayers),v=Object.keys(this._removedLayers);(p.length||v.length)&&this._updateWorkerLayers(p,v);for(const w in this._updatedSources){const S=this._updatedSources[w];if(S==="reload")this._reloadSource(w);else{if(S!=="clear")throw new Error(`Invalid action ${S}`);this._clearSource(w)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const w in this._updatedPaintProps)this._layers[w].updateTransitions(i);this.light.updateTransitions(i),this._resetUpdates()}const d={};for(const p in this.sourceCaches){const v=this.sourceCaches[p];d[p]=v.used,v.used=!1}for(const p of this._order){const v=this._layers[p];v.recalculate(i,this._availableImages),!v.isHidden(i.zoom)&&v.source&&(this.sourceCaches[v.source].used=!0)}for(const p in d){const v=this.sourceCaches[p];!!d[p]!=!!v.used&&v.fire(new c.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:p}))}this.light.recalculate(i),this.z=i.zoom,a&&this.fire(new c.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const i=Object.keys(this._changedImages);if(i.length){for(const a in this.sourceCaches)this.sourceCaches[a].reloadTilesForDependencies(["icons","patterns"],i);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const i in this.sourceCaches)this.sourceCaches[i].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(i,a){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(i),removedIds:a})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(i,a={}){var d;this._checkLoaded();const p=this.serialize();if(i=a.transformStyle?a.transformStyle(p,i):i,((d=a.validate)===null||d===void 0||d)&&$o(this,c.x(i)))return!1;(i=c.aB(i)).layers=c.az(i.layers);const v=c.aC(p,i),w=this._getOperationsToPerform(v);if(w.unimplemented.length>0)throw new Error(`Unimplemented: ${w.unimplemented.join(", ")}.`);if(w.operations.length===0)return!1;for(const S of w.operations)S();return this.stylesheet=i,this._serializedLayers=null,!0}_getOperationsToPerform(i){const a=[],d=[];for(const p of i)switch(p.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":a.push(()=>this.addLayer.apply(this,p.args));break;case"removeLayer":a.push(()=>this.removeLayer.apply(this,p.args));break;case"setPaintProperty":a.push(()=>this.setPaintProperty.apply(this,p.args));break;case"setLayoutProperty":a.push(()=>this.setLayoutProperty.apply(this,p.args));break;case"setFilter":a.push(()=>this.setFilter.apply(this,p.args));break;case"addSource":a.push(()=>this.addSource.apply(this,p.args));break;case"removeSource":a.push(()=>this.removeSource.apply(this,p.args));break;case"setLayerZoomRange":a.push(()=>this.setLayerZoomRange.apply(this,p.args));break;case"setLight":a.push(()=>this.setLight.apply(this,p.args));break;case"setGeoJSONSourceData":a.push(()=>this.setGeoJSONSourceData.apply(this,p.args));break;case"setGlyphs":a.push(()=>this.setGlyphs.apply(this,p.args));break;case"setSprite":a.push(()=>this.setSprite.apply(this,p.args));break;case"setTerrain":a.push(()=>this.map.setTerrain.apply(this,p.args));break;case"setTransition":a.push(()=>{});break;default:d.push(p.command)}return{operations:a,unimplemented:d}}addImage(i,a){if(this.getImage(i))return this.fire(new c.j(new Error(`An image named "${i}" already exists.`)));this.imageManager.addImage(i,a),this._afterImageUpdated(i)}updateImage(i,a){this.imageManager.updateImage(i,a)}getImage(i){return this.imageManager.getImage(i)}removeImage(i){if(!this.getImage(i))return this.fire(new c.j(new Error(`An image named "${i}" does not exist.`)));this.imageManager.removeImage(i),this._afterImageUpdated(i)}_afterImageUpdated(i){this._availableImages=this.imageManager.listImages(),this._changedImages[i]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(i,a,d={}){if(this._checkLoaded(),this.sourceCaches[i]!==void 0)throw new Error(`Source "${i}" already exists.`);if(!a.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(a).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(a.type)>=0&&this._validate(c.x.source,`sources.${i}`,a,null,d))return;this.map&&this.map._collectResourceTiming&&(a.collectResourceTiming=!0);const p=this.sourceCaches[i]=new Ye(i,a,this.dispatcher);p.style=this,p.setEventedParent(this,()=>({isSourceLoaded:p.loaded(),source:p.serialize(),sourceId:i})),p.onAdd(this.map),this._changed=!0}removeSource(i){if(this._checkLoaded(),this.sourceCaches[i]===void 0)throw new Error("There is no source with this ID");for(const d in this._layers)if(this._layers[d].source===i)return this.fire(new c.j(new Error(`Source "${i}" cannot be removed while layer "${d}" is using it.`)));const a=this.sourceCaches[i];delete this.sourceCaches[i],delete this._updatedSources[i],a.fire(new c.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:i})),a.setEventedParent(null),a.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(i,a){if(this._checkLoaded(),this.sourceCaches[i]===void 0)throw new Error(`There is no source with this ID=${i}`);const d=this.sourceCaches[i].getSource();if(d.type!=="geojson")throw new Error(`geojsonSource.type is ${d.type}, which is !== 'geojson`);d.setData(a),this._changed=!0}getSource(i){return this.sourceCaches[i]&&this.sourceCaches[i].getSource()}addLayer(i,a,d={}){this._checkLoaded();const p=i.id;if(this.getLayer(p))return void this.fire(new c.j(new Error(`Layer "${p}" already exists on this map.`)));let v;if(i.type==="custom"){if($o(this,c.aD(i)))return;v=c.aA(i)}else{if("source"in i&&typeof i.source=="object"&&(this.addSource(p,i.source),i=c.aB(i),i=c.e(i,{source:p})),this._validate(c.x.layer,`layers.${p}`,i,{arrayIndex:-1},d))return;v=c.aA(i),this._validateLayer(v),v.setEventedParent(this,{layer:{id:p}})}const w=a?this._order.indexOf(a):this._order.length;if(a&&w===-1)this.fire(new c.j(new Error(`Cannot add layer "${p}" before non-existing layer "${a}".`)));else{if(this._order.splice(w,0,p),this._layerOrderChanged=!0,this._layers[p]=v,this._removedLayers[p]&&v.source&&v.type!=="custom"){const S=this._removedLayers[p];delete this._removedLayers[p],S.type!==v.type?this._updatedSources[v.source]="clear":(this._updatedSources[v.source]="reload",this.sourceCaches[v.source].pause())}this._updateLayer(v),v.onAdd&&v.onAdd(this.map)}}moveLayer(i,a){if(this._checkLoaded(),this._changed=!0,!this._layers[i])return void this.fire(new c.j(new Error(`The layer '${i}' does not exist in the map's style and cannot be moved.`)));if(i===a)return;const d=this._order.indexOf(i);this._order.splice(d,1);const p=a?this._order.indexOf(a):this._order.length;a&&p===-1?this.fire(new c.j(new Error(`Cannot move layer "${i}" before non-existing layer "${a}".`))):(this._order.splice(p,0,i),this._layerOrderChanged=!0)}removeLayer(i){this._checkLoaded();const a=this._layers[i];if(!a)return void this.fire(new c.j(new Error(`Cannot remove non-existing layer "${i}".`)));a.setEventedParent(null);const d=this._order.indexOf(i);this._order.splice(d,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[i]=a,delete this._layers[i],this._serializedLayers&&delete this._serializedLayers[i],delete this._updatedLayers[i],delete this._updatedPaintProps[i],a.onRemove&&a.onRemove(this.map)}getLayer(i){return this._layers[i]}getLayersOrder(){return[...this._order]}hasLayer(i){return i in this._layers}setLayerZoomRange(i,a,d){this._checkLoaded();const p=this.getLayer(i);p?p.minzoom===a&&p.maxzoom===d||(a!=null&&(p.minzoom=a),d!=null&&(p.maxzoom=d),this._updateLayer(p)):this.fire(new c.j(new Error(`Cannot set the zoom range of non-existing layer "${i}".`)))}setFilter(i,a,d={}){this._checkLoaded();const p=this.getLayer(i);if(p){if(!c.aE(p.filter,a))return a==null?(p.filter=void 0,void this._updateLayer(p)):void(this._validate(c.x.filter,`layers.${p.id}.filter`,a,null,d)||(p.filter=c.aB(a),this._updateLayer(p)))}else this.fire(new c.j(new Error(`Cannot filter non-existing layer "${i}".`)))}getFilter(i){return c.aB(this.getLayer(i).filter)}setLayoutProperty(i,a,d,p={}){this._checkLoaded();const v=this.getLayer(i);v?c.aE(v.getLayoutProperty(a),d)||(v.setLayoutProperty(a,d,p),this._updateLayer(v)):this.fire(new c.j(new Error(`Cannot style non-existing layer "${i}".`)))}getLayoutProperty(i,a){const d=this.getLayer(i);if(d)return d.getLayoutProperty(a);this.fire(new c.j(new Error(`Cannot get style of non-existing layer "${i}".`)))}setPaintProperty(i,a,d,p={}){this._checkLoaded();const v=this.getLayer(i);v?c.aE(v.getPaintProperty(a),d)||(v.setPaintProperty(a,d,p)&&this._updateLayer(v),this._changed=!0,this._updatedPaintProps[i]=!0,this._serializedLayers=null):this.fire(new c.j(new Error(`Cannot style non-existing layer "${i}".`)))}getPaintProperty(i,a){return this.getLayer(i).getPaintProperty(a)}setFeatureState(i,a){this._checkLoaded();const d=i.source,p=i.sourceLayer,v=this.sourceCaches[d];if(v===void 0)return void this.fire(new c.j(new Error(`The source '${d}' does not exist in the map's style.`)));const w=v.getSource().type;w==="geojson"&&p?this.fire(new c.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):w!=="vector"||p?(i.id===void 0&&this.fire(new c.j(new Error("The feature id parameter must be provided."))),v.setFeatureState(p,i.id,a)):this.fire(new c.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(i,a){this._checkLoaded();const d=i.source,p=this.sourceCaches[d];if(p===void 0)return void this.fire(new c.j(new Error(`The source '${d}' does not exist in the map's style.`)));const v=p.getSource().type,w=v==="vector"?i.sourceLayer:void 0;v!=="vector"||w?a&&typeof i.id!="string"&&typeof i.id!="number"?this.fire(new c.j(new Error("A feature id is required to remove its specific state property."))):p.removeFeatureState(w,i.id,a):this.fire(new c.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(i){this._checkLoaded();const a=i.source,d=i.sourceLayer,p=this.sourceCaches[a];if(p!==void 0)return p.getSource().type!=="vector"||d?(i.id===void 0&&this.fire(new c.j(new Error("The feature id parameter must be provided."))),p.getFeatureState(d,i.id)):void this.fire(new c.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new c.j(new Error(`The source '${a}' does not exist in the map's style.`)))}getTransition(){return c.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const i=c.aF(this.sourceCaches,v=>v.serialize()),a=this._serializeByIds(this._order),d=this.map.getTerrain()||void 0,p=this.stylesheet;return c.aG({version:p.version,name:p.name,metadata:p.metadata,light:p.light,center:p.center,zoom:p.zoom,bearing:p.bearing,pitch:p.pitch,sprite:p.sprite,glyphs:p.glyphs,transition:p.transition,sources:i,layers:a,terrain:d},v=>v!==void 0)}_updateLayer(i){this._updatedLayers[i.id]=!0,i.source&&!this._updatedSources[i.source]&&this.sourceCaches[i.source].getSource().type!=="raster"&&(this._updatedSources[i.source]="reload",this.sourceCaches[i.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(i){const a=w=>this._layers[w].type==="fill-extrusion",d={},p=[];for(let w=this._order.length-1;w>=0;w--){const S=this._order[w];if(a(S)){d[S]=w;for(const T of i){const P=T[S];if(P)for(const O of P)p.push(O)}}}p.sort((w,S)=>S.intersectionZ-w.intersectionZ);const v=[];for(let w=this._order.length-1;w>=0;w--){const S=this._order[w];if(a(S))for(let T=p.length-1;T>=0;T--){const P=p[T].feature;if(d[P.layer.id]{const Ke=le.featureSortOrder;if(Ke){const ut=Ke.indexOf(Pe.featureIndex);return Ke.indexOf(Ve.featureIndex)-ut}return Ve.featureIndex-Pe.featureIndex});for(const Pe of Te)ve.push(Pe)}}for(const le in X)X[le].forEach(me=>{const ie=me.feature,ve=P[S[le].source].getFeatureState(ie.layer["source-layer"],ie.id);ie.source=ie.layer.source,ie.layer["source-layer"]&&(ie.sourceLayer=ie.layer["source-layer"]),ie.state=ve});return X}(this._layers,w,this.sourceCaches,i,a,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(v)}querySourceFeatures(i,a){a&&a.filter&&this._validate(c.x.filter,"querySourceFeatures.filter",a.filter,null,a);const d=this.sourceCaches[i];return d?function(p,v){const w=p.getRenderableIds().map(P=>p.getTileByID(P)),S=[],T={};for(let P=0;Pj.getTileByID(H)).sort((H,X)=>X.tileID.overscaledZ-H.tileID.overscaledZ||(H.tileID.isLessThan(X.tileID)?-1:1))}const R=this.crossTileSymbolIndex.addLayer(O,T[O.source],i.center.lng);w=w||R}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((v=v||this._layerOrderChanged||d===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(A.now(),i.zoom))&&(this.pauseablePlacement=new gh(i,this.map.terrain,this._order,v,a,d,p,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,T),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(A.now()),S=!0),w&&this.pauseablePlacement.placement.setStale()),S||w)for(const P of this._order){const O=this._layers[P];O.type==="symbol"&&this.placement.updateLayerOpacities(O,T[O.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(A.now())}_releaseSymbolFadeTiles(){for(const i in this.sourceCaches)this.sourceCaches[i].releaseSymbolFadeTiles()}getImages(i,a){return c._(this,void 0,void 0,function*(){const d=yield this.imageManager.getImages(a.icons);this._updateTilesForChangedImages();const p=this.sourceCaches[a.source];return p&&p.setDependencies(a.tileID.key,a.type,a.icons),d})}getGlyphs(i,a){return c._(this,void 0,void 0,function*(){const d=yield this.glyphManager.getGlyphs(a.stacks),p=this.sourceCaches[a.source];return p&&p.setDependencies(a.tileID.key,a.type,[""]),d})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(i,a={}){this._checkLoaded(),i&&this._validate(c.x.glyphs,"glyphs",i,null,a)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=i,this.glyphManager.entries={},this.glyphManager.setURL(i))}addSprite(i,a,d={},p){this._checkLoaded();const v=[{id:i,url:a}],w=[...Le(this.stylesheet.sprite),...v];this._validate(c.x.sprite,"sprite",w,null,d)||(this.stylesheet.sprite=w,this._loadSprite(v,!0,p))}removeSprite(i){this._checkLoaded();const a=Le(this.stylesheet.sprite);if(a.find(d=>d.id===i)){if(this._spritesImagesIds[i])for(const d of this._spritesImagesIds[i])this.imageManager.removeImage(d),this._changedImages[d]=!0;a.splice(a.findIndex(d=>d.id===i),1),this.stylesheet.sprite=a.length>0?a:void 0,delete this._spritesImagesIds[i],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.k("data",{dataType:"style"}))}else this.fire(new c.j(new Error(`Sprite "${i}" doesn't exists on this map.`)))}getSprite(){return Le(this.stylesheet.sprite)}setSprite(i,a={},d){this._checkLoaded(),i&&this._validate(c.x.sprite,"sprite",i,null,a)||(this.stylesheet.sprite=i,i?this._loadSprite(i,!0,d):(this._unloadSprite(),d&&d(null)))}}var Nn=c.X([{name:"a_pos",type:"Int16",components:2}]),Sc="attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_depth;void main() {float extent=8192.0;float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/extent;gl_Position=u_matrix*vec4(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}";const gs={prelude:ai(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) @@ -614,6 +614,6 @@ uniform ${O} ${R} u_${j}; #endif `}),staticAttributes:d,staticUniforms:w}}class tl{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(i,a,d,p,v,w,S,T,P){this.context=i;let O=this.boundPaintVertexBuffers.length!==p.length;for(let R=0;!O&&R({u_depth:new c.aH(Pe,Ve.u_depth),u_terrain:new c.aH(Pe,Ve.u_terrain),u_terrain_dim:new c.aI(Pe,Ve.u_terrain_dim),u_terrain_matrix:new c.aJ(Pe,Ve.u_terrain_matrix),u_terrain_unpack:new c.aK(Pe,Ve.u_terrain_unpack),u_terrain_exaggeration:new c.aI(Pe,Ve.u_terrain_exaggeration)}))(i,Te),this.binderUniforms=d?d.getUniforms(i,Te):[]}draw(i,a,d,p,v,w,S,T,P,O,R,j,H,X,ne,Y,le,me){const ie=i.gl;if(this.failedToCreate)return;if(i.program.set(this.program),i.setDepthMode(d),i.setStencilMode(p),i.setColorMode(v),i.setCullFace(w),T){i.activeTexture.set(ie.TEXTURE2),ie.bindTexture(ie.TEXTURE_2D,T.depthTexture),i.activeTexture.set(ie.TEXTURE3),ie.bindTexture(ie.TEXTURE_2D,T.texture);for(const Te in this.terrainUniforms)this.terrainUniforms[Te].set(T[Te])}for(const Te in this.fixedUniforms)this.fixedUniforms[Te].set(S[Te]);ne&&ne.setUniforms(i,this.binderUniforms,H,{zoom:X});let ve=0;switch(a){case ie.LINES:ve=2;break;case ie.TRIANGLES:ve=3;break;case ie.LINE_STRIP:ve=1}for(const Te of j.get()){const Pe=Te.vaos||(Te.vaos={});(Pe[P]||(Pe[P]=new tl)).bind(i,this,O,ne?ne.getPaintVertexBuffers():[],R,Te.vertexOffset,Y,le,me),ie.drawElements(a,Te.primitiveLength*ve,ie.UNSIGNED_SHORT,Te.primitiveOffset*ve*2)}}}function il(_,i,a){const d=1/Dt(a,1,i.transform.tileZoom),p=Math.pow(2,a.tileID.overscaledZ),v=a.tileSize*Math.pow(2,i.transform.tileZoom)/p,w=v*(a.tileID.canonical.x+a.tileID.wrap*p),S=v*a.tileID.canonical.y;return{u_image:0,u_texsize:a.imageAtlasTexture.size,u_scale:[d,_.fromScale,_.toScale],u_fade:_.t,u_pixel_coord_upper:[w>>16,S>>16],u_pixel_coord_lower:[65535&w,65535&S]}}const la=(_,i,a,d)=>{const p=i.style.light,v=p.properties.get("position"),w=[v.x,v.y,v.z],S=function(){var P=new c.A(9);return c.A!=Float32Array&&(P[1]=0,P[2]=0,P[3]=0,P[5]=0,P[6]=0,P[7]=0),P[0]=1,P[4]=1,P[8]=1,P}();p.properties.get("anchor")==="viewport"&&function(P,O){var R=Math.sin(O),j=Math.cos(O);P[0]=j,P[1]=R,P[2]=0,P[3]=-R,P[4]=j,P[5]=0,P[6]=0,P[7]=0,P[8]=1}(S,-i.transform.angle),function(P,O,R){var j=O[0],H=O[1],X=O[2];P[0]=j*R[0]+H*R[3]+X*R[6],P[1]=j*R[1]+H*R[4]+X*R[7],P[2]=j*R[2]+H*R[5]+X*R[8]}(w,w,S);const T=p.properties.get("color");return{u_matrix:_,u_lightpos:w,u_lightintensity:p.properties.get("intensity"),u_lightcolor:[T.r,T.g,T.b],u_vertical_gradient:+a,u_opacity:d}},Tc=(_,i,a,d,p,v,w)=>c.e(la(_,i,a,d),il(v,i,w),{u_height_factor:-Math.pow(2,p.overscaledZ)/w.tileSize/8}),rl=_=>({u_matrix:_}),ca=(_,i,a,d)=>c.e(rl(_),il(a,i,d)),nl=(_,i)=>({u_matrix:_,u_world:i}),ua=(_,i,a,d,p)=>c.e(ca(_,i,a,d),{u_world:p}),Uf=(_,i,a,d)=>{const p=_.transform;let v,w;if(d.paint.get("circle-pitch-alignment")==="map"){const S=Dt(a,1,p.zoom);v=!0,w=[S,S]}else v=!1,w=p.pixelsToGLUnits;return{u_camera_to_center_distance:p.cameraToCenterDistance,u_scale_with_map:+(d.paint.get("circle-pitch-scale")==="map"),u_matrix:_.translatePosMatrix(i.posMatrix,a,d.paint.get("circle-translate"),d.paint.get("circle-translate-anchor")),u_pitch_with_map:+v,u_device_pixel_ratio:_.pixelRatio,u_extrude_scale:w}},qf=(_,i,a)=>({u_matrix:_,u_inv_matrix:i,u_camera_to_center_distance:a.cameraToCenterDistance,u_viewport_size:[a.width,a.height]}),Cc=(_,i,a=1)=>({u_matrix:_,u_color:i,u_overlay:0,u_overlay_scale:a}),yh=_=>({u_matrix:_}),Uo=(_,i,a,d)=>({u_matrix:_,u_extrude_scale:Dt(i,1,a),u_intensity:d});function ol(_,i){const a=Math.pow(2,i.canonical.z),d=i.canonical.y;return[new c.Y(0,d/a).toLngLat().lat,new c.Y(0,(d+1)/a).toLngLat().lat]}const Fr=(_,i,a,d)=>{const p=_.transform;return{u_matrix:kc(_,i,a,d),u_ratio:1/Dt(i,1,p.zoom),u_device_pixel_ratio:_.pixelRatio,u_units_to_pixels:[1/p.pixelsToGLUnits[0],1/p.pixelsToGLUnits[1]]}},un=(_,i,a,d,p)=>c.e(Fr(_,i,a,p),{u_image:0,u_image_height:d}),Ac=(_,i,a,d,p)=>{const v=_.transform,w=Mc(i,v);return{u_matrix:kc(_,i,a,p),u_texsize:i.imageAtlasTexture.size,u_ratio:1/Dt(i,1,v.zoom),u_device_pixel_ratio:_.pixelRatio,u_image:0,u_scale:[w,d.fromScale,d.toScale],u_fade:d.t,u_units_to_pixels:[1/v.pixelsToGLUnits[0],1/v.pixelsToGLUnits[1]]}},sl=(_,i,a,d,p,v)=>{const w=_.lineAtlas,S=Mc(i,_.transform),T=a.layout.get("line-cap")==="round",P=w.getDash(d.from,T),O=w.getDash(d.to,T),R=P.width*p.fromScale,j=O.width*p.toScale;return c.e(Fr(_,i,a,v),{u_patternscale_a:[S/R,-P.height/2],u_patternscale_b:[S/j,-O.height/2],u_sdfgamma:w.width/(256*Math.min(R,j)*_.pixelRatio)/2,u_image:0,u_tex_y_a:P.y,u_tex_y_b:O.y,u_mix:p.t})};function Mc(_,i){return 1/Dt(_,1,i.tileZoom)}function kc(_,i,a,d){return _.translatePosMatrix(d?d.posMatrix:i.tileID.posMatrix,i,a.paint.get("line-translate"),a.paint.get("line-translate-anchor"))}const _s=(_,i,a,d,p)=>{return{u_matrix:_,u_tl_parent:i,u_scale_parent:a,u_buffer_scale:1,u_fade_t:d.mix,u_opacity:d.opacity*p.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:p.paint.get("raster-brightness-min"),u_brightness_high:p.paint.get("raster-brightness-max"),u_saturation_factor:(w=p.paint.get("raster-saturation"),w>0?1-1/(1.001-w):-w),u_contrast_factor:(v=p.paint.get("raster-contrast"),v>0?1/(1-v):1+v),u_spin_weights:Hf(p.paint.get("raster-hue-rotate"))};var v,w};function Hf(_){_*=Math.PI/180;const i=Math.sin(_),a=Math.cos(_);return[(2*a+1)/3,(-Math.sqrt(3)*i-a+1)/3,(Math.sqrt(3)*i-a+1)/3]}const _h=(_,i,a,d,p,v,w,S,T,P,O,R,j,H)=>{const X=w.transform;return{u_is_size_zoom_constant:+(_==="constant"||_==="source"),u_is_size_feature_constant:+(_==="constant"||_==="camera"),u_size_t:i?i.uSizeT:0,u_size:i?i.uSize:0,u_camera_to_center_distance:X.cameraToCenterDistance,u_pitch:X.pitch/360*2*Math.PI,u_rotate_symbol:+a,u_aspect_ratio:X.width/X.height,u_fade_change:w.options.fadeDuration?w.symbolFadeChange:1,u_matrix:S,u_label_plane_matrix:T,u_coord_matrix:P,u_is_text:+R,u_pitch_with_map:+d,u_is_along_line:p,u_is_variable_anchor:v,u_texsize:j,u_texture:0,u_translation:O,u_pitched_scale:H}},vh=(_,i,a,d,p,v,w,S,T,P,O,R,j,H,X)=>{const ne=w.transform;return c.e(_h(_,i,a,d,p,v,w,S,T,P,O,R,j,X),{u_gamma_scale:d?Math.cos(ne._pitch)*ne.cameraToCenterDistance:1,u_device_pixel_ratio:w.pixelRatio,u_is_halo:+H})},Gf=(_,i,a,d,p,v,w,S,T,P,O,R,j,H)=>c.e(vh(_,i,a,d,p,v,w,S,T,P,O,!0,R,!0,H),{u_texsize_icon:j,u_texture_icon:1}),Zf=(_,i,a)=>({u_matrix:_,u_opacity:i,u_color:a}),Wf=(_,i,a,d,p,v)=>c.e(function(w,S,T,P){const O=T.imageManager.getPattern(w.from.toString()),R=T.imageManager.getPattern(w.to.toString()),{width:j,height:H}=T.imageManager.getPixelSize(),X=Math.pow(2,P.tileID.overscaledZ),ne=P.tileSize*Math.pow(2,T.transform.tileZoom)/X,Y=ne*(P.tileID.canonical.x+P.tileID.wrap*X),le=ne*P.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:O.tl,u_pattern_br_a:O.br,u_pattern_tl_b:R.tl,u_pattern_br_b:R.br,u_texsize:[j,H],u_mix:S.t,u_pattern_size_a:O.displaySize,u_pattern_size_b:R.displaySize,u_scale_a:S.fromScale,u_scale_b:S.toScale,u_tile_units_to_pixels:1/Dt(P,1,T.transform.tileZoom),u_pixel_coord_upper:[Y>>16,le>>16],u_pixel_coord_lower:[65535&Y,65535&le]}}(d,v,a,p),{u_matrix:_,u_opacity:i}),al={fillExtrusion:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_lightpos:new c.aL(_,i.u_lightpos),u_lightintensity:new c.aI(_,i.u_lightintensity),u_lightcolor:new c.aL(_,i.u_lightcolor),u_vertical_gradient:new c.aI(_,i.u_vertical_gradient),u_opacity:new c.aI(_,i.u_opacity)}),fillExtrusionPattern:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_lightpos:new c.aL(_,i.u_lightpos),u_lightintensity:new c.aI(_,i.u_lightintensity),u_lightcolor:new c.aL(_,i.u_lightcolor),u_vertical_gradient:new c.aI(_,i.u_vertical_gradient),u_height_factor:new c.aI(_,i.u_height_factor),u_image:new c.aH(_,i.u_image),u_texsize:new c.aM(_,i.u_texsize),u_pixel_coord_upper:new c.aM(_,i.u_pixel_coord_upper),u_pixel_coord_lower:new c.aM(_,i.u_pixel_coord_lower),u_scale:new c.aL(_,i.u_scale),u_fade:new c.aI(_,i.u_fade),u_opacity:new c.aI(_,i.u_opacity)}),fill:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix)}),fillPattern:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_image:new c.aH(_,i.u_image),u_texsize:new c.aM(_,i.u_texsize),u_pixel_coord_upper:new c.aM(_,i.u_pixel_coord_upper),u_pixel_coord_lower:new c.aM(_,i.u_pixel_coord_lower),u_scale:new c.aL(_,i.u_scale),u_fade:new c.aI(_,i.u_fade)}),fillOutline:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_world:new c.aM(_,i.u_world)}),fillOutlinePattern:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_world:new c.aM(_,i.u_world),u_image:new c.aH(_,i.u_image),u_texsize:new c.aM(_,i.u_texsize),u_pixel_coord_upper:new c.aM(_,i.u_pixel_coord_upper),u_pixel_coord_lower:new c.aM(_,i.u_pixel_coord_lower),u_scale:new c.aL(_,i.u_scale),u_fade:new c.aI(_,i.u_fade)}),circle:(_,i)=>({u_camera_to_center_distance:new c.aI(_,i.u_camera_to_center_distance),u_scale_with_map:new c.aH(_,i.u_scale_with_map),u_pitch_with_map:new c.aH(_,i.u_pitch_with_map),u_extrude_scale:new c.aM(_,i.u_extrude_scale),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_matrix:new c.aJ(_,i.u_matrix)}),collisionBox:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_pixel_extrude_scale:new c.aM(_,i.u_pixel_extrude_scale)}),collisionCircle:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_inv_matrix:new c.aJ(_,i.u_inv_matrix),u_camera_to_center_distance:new c.aI(_,i.u_camera_to_center_distance),u_viewport_size:new c.aM(_,i.u_viewport_size)}),debug:(_,i)=>({u_color:new c.aN(_,i.u_color),u_matrix:new c.aJ(_,i.u_matrix),u_overlay:new c.aH(_,i.u_overlay),u_overlay_scale:new c.aI(_,i.u_overlay_scale)}),clippingMask:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix)}),heatmap:(_,i)=>({u_extrude_scale:new c.aI(_,i.u_extrude_scale),u_intensity:new c.aI(_,i.u_intensity),u_matrix:new c.aJ(_,i.u_matrix)}),heatmapTexture:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_world:new c.aM(_,i.u_world),u_image:new c.aH(_,i.u_image),u_color_ramp:new c.aH(_,i.u_color_ramp),u_opacity:new c.aI(_,i.u_opacity)}),hillshade:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_image:new c.aH(_,i.u_image),u_latrange:new c.aM(_,i.u_latrange),u_light:new c.aM(_,i.u_light),u_shadow:new c.aN(_,i.u_shadow),u_highlight:new c.aN(_,i.u_highlight),u_accent:new c.aN(_,i.u_accent)}),hillshadePrepare:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_image:new c.aH(_,i.u_image),u_dimension:new c.aM(_,i.u_dimension),u_zoom:new c.aI(_,i.u_zoom),u_unpack:new c.aK(_,i.u_unpack)}),line:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_ratio:new c.aI(_,i.u_ratio),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_units_to_pixels:new c.aM(_,i.u_units_to_pixels)}),lineGradient:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_ratio:new c.aI(_,i.u_ratio),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_units_to_pixels:new c.aM(_,i.u_units_to_pixels),u_image:new c.aH(_,i.u_image),u_image_height:new c.aI(_,i.u_image_height)}),linePattern:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_texsize:new c.aM(_,i.u_texsize),u_ratio:new c.aI(_,i.u_ratio),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_image:new c.aH(_,i.u_image),u_units_to_pixels:new c.aM(_,i.u_units_to_pixels),u_scale:new c.aL(_,i.u_scale),u_fade:new c.aI(_,i.u_fade)}),lineSDF:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_ratio:new c.aI(_,i.u_ratio),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_units_to_pixels:new c.aM(_,i.u_units_to_pixels),u_patternscale_a:new c.aM(_,i.u_patternscale_a),u_patternscale_b:new c.aM(_,i.u_patternscale_b),u_sdfgamma:new c.aI(_,i.u_sdfgamma),u_image:new c.aH(_,i.u_image),u_tex_y_a:new c.aI(_,i.u_tex_y_a),u_tex_y_b:new c.aI(_,i.u_tex_y_b),u_mix:new c.aI(_,i.u_mix)}),raster:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_tl_parent:new c.aM(_,i.u_tl_parent),u_scale_parent:new c.aI(_,i.u_scale_parent),u_buffer_scale:new c.aI(_,i.u_buffer_scale),u_fade_t:new c.aI(_,i.u_fade_t),u_opacity:new c.aI(_,i.u_opacity),u_image0:new c.aH(_,i.u_image0),u_image1:new c.aH(_,i.u_image1),u_brightness_low:new c.aI(_,i.u_brightness_low),u_brightness_high:new c.aI(_,i.u_brightness_high),u_saturation_factor:new c.aI(_,i.u_saturation_factor),u_contrast_factor:new c.aI(_,i.u_contrast_factor),u_spin_weights:new c.aL(_,i.u_spin_weights)}),symbolIcon:(_,i)=>({u_is_size_zoom_constant:new c.aH(_,i.u_is_size_zoom_constant),u_is_size_feature_constant:new c.aH(_,i.u_is_size_feature_constant),u_size_t:new c.aI(_,i.u_size_t),u_size:new c.aI(_,i.u_size),u_camera_to_center_distance:new c.aI(_,i.u_camera_to_center_distance),u_pitch:new c.aI(_,i.u_pitch),u_rotate_symbol:new c.aH(_,i.u_rotate_symbol),u_aspect_ratio:new c.aI(_,i.u_aspect_ratio),u_fade_change:new c.aI(_,i.u_fade_change),u_matrix:new c.aJ(_,i.u_matrix),u_label_plane_matrix:new c.aJ(_,i.u_label_plane_matrix),u_coord_matrix:new c.aJ(_,i.u_coord_matrix),u_is_text:new c.aH(_,i.u_is_text),u_pitch_with_map:new c.aH(_,i.u_pitch_with_map),u_is_along_line:new c.aH(_,i.u_is_along_line),u_is_variable_anchor:new c.aH(_,i.u_is_variable_anchor),u_texsize:new c.aM(_,i.u_texsize),u_texture:new c.aH(_,i.u_texture),u_translation:new c.aM(_,i.u_translation),u_pitched_scale:new c.aI(_,i.u_pitched_scale)}),symbolSDF:(_,i)=>({u_is_size_zoom_constant:new c.aH(_,i.u_is_size_zoom_constant),u_is_size_feature_constant:new c.aH(_,i.u_is_size_feature_constant),u_size_t:new c.aI(_,i.u_size_t),u_size:new c.aI(_,i.u_size),u_camera_to_center_distance:new c.aI(_,i.u_camera_to_center_distance),u_pitch:new c.aI(_,i.u_pitch),u_rotate_symbol:new c.aH(_,i.u_rotate_symbol),u_aspect_ratio:new c.aI(_,i.u_aspect_ratio),u_fade_change:new c.aI(_,i.u_fade_change),u_matrix:new c.aJ(_,i.u_matrix),u_label_plane_matrix:new c.aJ(_,i.u_label_plane_matrix),u_coord_matrix:new c.aJ(_,i.u_coord_matrix),u_is_text:new c.aH(_,i.u_is_text),u_pitch_with_map:new c.aH(_,i.u_pitch_with_map),u_is_along_line:new c.aH(_,i.u_is_along_line),u_is_variable_anchor:new c.aH(_,i.u_is_variable_anchor),u_texsize:new c.aM(_,i.u_texsize),u_texture:new c.aH(_,i.u_texture),u_gamma_scale:new c.aI(_,i.u_gamma_scale),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_is_halo:new c.aH(_,i.u_is_halo),u_translation:new c.aM(_,i.u_translation),u_pitched_scale:new c.aI(_,i.u_pitched_scale)}),symbolTextAndIcon:(_,i)=>({u_is_size_zoom_constant:new c.aH(_,i.u_is_size_zoom_constant),u_is_size_feature_constant:new c.aH(_,i.u_is_size_feature_constant),u_size_t:new c.aI(_,i.u_size_t),u_size:new c.aI(_,i.u_size),u_camera_to_center_distance:new c.aI(_,i.u_camera_to_center_distance),u_pitch:new c.aI(_,i.u_pitch),u_rotate_symbol:new c.aH(_,i.u_rotate_symbol),u_aspect_ratio:new c.aI(_,i.u_aspect_ratio),u_fade_change:new c.aI(_,i.u_fade_change),u_matrix:new c.aJ(_,i.u_matrix),u_label_plane_matrix:new c.aJ(_,i.u_label_plane_matrix),u_coord_matrix:new c.aJ(_,i.u_coord_matrix),u_is_text:new c.aH(_,i.u_is_text),u_pitch_with_map:new c.aH(_,i.u_pitch_with_map),u_is_along_line:new c.aH(_,i.u_is_along_line),u_is_variable_anchor:new c.aH(_,i.u_is_variable_anchor),u_texsize:new c.aM(_,i.u_texsize),u_texsize_icon:new c.aM(_,i.u_texsize_icon),u_texture:new c.aH(_,i.u_texture),u_texture_icon:new c.aH(_,i.u_texture_icon),u_gamma_scale:new c.aI(_,i.u_gamma_scale),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_is_halo:new c.aH(_,i.u_is_halo),u_translation:new c.aM(_,i.u_translation),u_pitched_scale:new c.aI(_,i.u_pitched_scale)}),background:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_opacity:new c.aI(_,i.u_opacity),u_color:new c.aN(_,i.u_color)}),backgroundPattern:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_opacity:new c.aI(_,i.u_opacity),u_image:new c.aH(_,i.u_image),u_pattern_tl_a:new c.aM(_,i.u_pattern_tl_a),u_pattern_br_a:new c.aM(_,i.u_pattern_br_a),u_pattern_tl_b:new c.aM(_,i.u_pattern_tl_b),u_pattern_br_b:new c.aM(_,i.u_pattern_br_b),u_texsize:new c.aM(_,i.u_texsize),u_mix:new c.aI(_,i.u_mix),u_pattern_size_a:new c.aM(_,i.u_pattern_size_a),u_pattern_size_b:new c.aM(_,i.u_pattern_size_b),u_scale_a:new c.aI(_,i.u_scale_a),u_scale_b:new c.aI(_,i.u_scale_b),u_pixel_coord_upper:new c.aM(_,i.u_pixel_coord_upper),u_pixel_coord_lower:new c.aM(_,i.u_pixel_coord_lower),u_tile_units_to_pixels:new c.aI(_,i.u_tile_units_to_pixels)}),terrain:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_texture:new c.aH(_,i.u_texture),u_ele_delta:new c.aI(_,i.u_ele_delta)}),terrainDepth:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_ele_delta:new c.aI(_,i.u_ele_delta)}),terrainCoords:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_texture:new c.aH(_,i.u_texture),u_terrain_coords_id:new c.aI(_,i.u_terrain_coords_id),u_ele_delta:new c.aI(_,i.u_ele_delta)})};class Lc{constructor(i,a,d){this.context=i;const p=i.gl;this.buffer=p.createBuffer(),this.dynamicDraw=!!d,this.context.unbindVAO(),i.bindElementBuffer.set(this.buffer),p.bufferData(p.ELEMENT_ARRAY_BUFFER,a.arrayBuffer,this.dynamicDraw?p.DYNAMIC_DRAW:p.STATIC_DRAW),this.dynamicDraw||delete a.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(i){const a=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),a.bufferSubData(a.ELEMENT_ARRAY_BUFFER,0,i.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const ll={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Pc{constructor(i,a,d,p){this.length=a.length,this.attributes=d,this.itemSize=a.bytesPerElement,this.dynamicDraw=p,this.context=i;const v=i.gl;this.buffer=v.createBuffer(),i.bindVertexBuffer.set(this.buffer),v.bufferData(v.ARRAY_BUFFER,a.arrayBuffer,this.dynamicDraw?v.DYNAMIC_DRAW:v.STATIC_DRAW),this.dynamicDraw||delete a.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(i){if(i.length!==this.length)throw new Error(`Length of new data is ${i.length}, which doesn't match current length of ${this.length}`);const a=this.context.gl;this.bind(),a.bufferSubData(a.ARRAY_BUFFER,0,i.arrayBuffer)}enableAttributes(i,a){for(let d=0;d0){const Pe=c.F();c.aQ(Pe,ie.placementInvProjMatrix,_.transform.glCoordMatrix),c.aQ(Pe,Pe,ie.placementViewportMatrix),T.push({circleArray:Te,circleOffset:O,transform:me.posMatrix,invTransform:Pe,coord:me}),P+=Te.length/4,O=P}ve&&S.draw(v,w.LINES,Xt.disabled,Oi.disabled,_.colorModeForRenderPass(),Pi.disabled,{u_matrix:me.posMatrix,u_pixel_extrude_scale:[1/(R=_.transform).width,1/R.height]},_.style.map.terrain&&_.style.map.terrain.getTerrainData(me),a.id,ve.layoutVertexBuffer,ve.indexBuffer,ve.segments,null,_.transform.zoom,null,null,ve.collisionVertexBuffer)}var R;if(!p||!T.length)return;const j=_.useProgram("collisionCircle"),H=new c.aR;H.resize(4*P),H._trim();let X=0;for(const le of T)for(let me=0;me=0&&(le[ie.associatedIconIndex]={shiftedAnchor:kt,angle:Ii})}else It(ie.numGlyphs,ne)}if(P){Y.clear();const me=_.icon.placedSymbolArray;for(let ie=0;ie_.style.map.terrain.getElevation(Je,uu,sr):null,ks=a.layout.get("text-rotation-alignment")==="map";N(yt,Je.posMatrix,_,p,Jo,As,le,P,ks,ne,Je.toUnwrapped(),X.width,X.height,Yo,Bi)}const yr=Je.posMatrix,Cn=p&&Ke||cu,Eo=me||Cn?Nc:Jo,Ms=Pl,Ar=at&&a.paint.get(p?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Mr;Mr=at?yt.iconsInText?Gf(kt.kind,Yt,ie,le,me,Cn,_,yr,Eo,Ms,Yo,Ir,Vr,ht):vh(kt.kind,Yt,ie,le,me,Cn,_,yr,Eo,Ms,Yo,p,Ir,!0,ht):_h(kt.kind,Yt,ie,le,me,Cn,_,yr,Eo,Ms,Yo,p,Ir,ht);const dr={program:Zt,buffers:Rt,uniformValues:Mr,atlasTexture:In,atlasTextureIcon:Tr,atlasInterpolation:Ci,atlasInterpolationIcon:Jr,isSDF:at,hasHalo:Ar};if(Te&&yt.canOverlap){Pe=!0;const Bi=Rt.segments.get();for(const ks of Bi)ut.push({segments:new c.$([ks]),sortKey:ks.sortKey,state:dr,terrainData:Ti})}else ut.push({segments:Rt.segments,sortKey:0,state:dr,terrainData:Ti})}Pe&&ut.sort((Je,et)=>Je.sortKey-et.sortKey);for(const Je of ut){const et=Je.state;if(j.activeTexture.set(H.TEXTURE0),et.atlasTexture.bind(et.atlasInterpolation,H.CLAMP_TO_EDGE),et.atlasTextureIcon&&(j.activeTexture.set(H.TEXTURE1),et.atlasTextureIcon&&et.atlasTextureIcon.bind(et.atlasInterpolationIcon,H.CLAMP_TO_EDGE)),et.isSDF){const yt=et.uniformValues;et.hasHalo&&(yt.u_is_halo=1,pl(et.buffers,Je.segments,a,_,et.program,Ve,O,R,yt,Je.terrainData)),yt.u_is_halo=0}pl(et.buffers,Je.segments,a,_,et.program,Ve,O,R,et.uniformValues,Je.terrainData)}}function pl(_,i,a,d,p,v,w,S,T,P){const O=d.context;p.draw(O,O.gl.TRIANGLES,v,w,S,Pi.disabled,T,P,a.id,_.layoutVertexBuffer,_.indexBuffer,i,a.paint,d.transform.zoom,_.programConfigurations.get(a.id),_.dynamicLayoutVertexBuffer,_.opacityVertexBuffer)}function _o(_,i,a,d,p){if(!a||!d||!d.imageAtlas)return;const v=d.imageAtlas.patternPositions;let w=v[a.to.toString()],S=v[a.from.toString()];if(!w&&S&&(w=S),!S&&w&&(S=w),!w||!S){const T=p.getPaintProperty(i);w=v[T],S=v[T]}w&&S&&_.setConstantPatternPositions(w,S)}function Ho(_,i,a,d,p,v,w){const S=_.context.gl,T="fill-pattern",P=a.paint.get(T),O=P&&P.constantOr(1),R=a.getCrossfadeParameters();let j,H,X,ne,Y;w?(H=O&&!a.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",j=S.LINES):(H=O?"fillPattern":"fill",j=S.TRIANGLES);const le=P.constantOr(null);for(const me of d){const ie=i.getTile(me);if(O&&!ie.patternsLoaded())continue;const ve=ie.getBucket(a);if(!ve)continue;const Te=ve.programConfigurations.get(a.id),Pe=_.useProgram(H,Te),Ve=_.style.map.terrain&&_.style.map.terrain.getTerrainData(me);O&&(_.context.activeTexture.set(S.TEXTURE0),ie.imageAtlasTexture.bind(S.LINEAR,S.CLAMP_TO_EDGE),Te.updatePaintBuffers(R)),_o(Te,T,le,ie,a);const Ke=Ve?me:null,ut=_.translatePosMatrix(Ke?Ke.posMatrix:me.posMatrix,ie,a.paint.get("fill-translate"),a.paint.get("fill-translate-anchor"));if(w){ne=ve.indexBuffer2,Y=ve.segments2;const ht=[S.drawingBufferWidth,S.drawingBufferHeight];X=H==="fillOutlinePattern"&&O?ua(ut,_,R,ie,ht):nl(ut,ht)}else ne=ve.indexBuffer,Y=ve.segments,X=O?ca(ut,_,R,ie):rl(ut);Pe.draw(_.context,j,p,_.stencilModeForClipping(me),v,Pi.disabled,X,Ve,a.id,ve.layoutVertexBuffer,ne,Y,a.paint,_.transform.zoom,Te)}}function Kr(_,i,a,d,p,v,w){const S=_.context,T=S.gl,P="fill-extrusion-pattern",O=a.paint.get(P),R=O.constantOr(1),j=a.getCrossfadeParameters(),H=a.paint.get("fill-extrusion-opacity"),X=O.constantOr(null);for(const ne of d){const Y=i.getTile(ne),le=Y.getBucket(a);if(!le)continue;const me=_.style.map.terrain&&_.style.map.terrain.getTerrainData(ne),ie=le.programConfigurations.get(a.id),ve=_.useProgram(R?"fillExtrusionPattern":"fillExtrusion",ie);R&&(_.context.activeTexture.set(T.TEXTURE0),Y.imageAtlasTexture.bind(T.LINEAR,T.CLAMP_TO_EDGE),ie.updatePaintBuffers(j)),_o(ie,P,X,Y,a);const Te=_.translatePosMatrix(ne.posMatrix,Y,a.paint.get("fill-extrusion-translate"),a.paint.get("fill-extrusion-translate-anchor")),Pe=a.paint.get("fill-extrusion-vertical-gradient"),Ve=R?Tc(Te,_,Pe,H,ne,j,Y):la(Te,_,Pe,H);ve.draw(S,S.gl.TRIANGLES,p,v,w,Pi.backCCW,Ve,me,a.id,le.layoutVertexBuffer,le.indexBuffer,le.segments,a.paint,_.transform.zoom,ie,_.style.map.terrain&&le.centroidVertexBuffer)}}function Dh(_,i,a,d,p,v,w){const S=_.context,T=S.gl,P=a.fbo;if(!P)return;const O=_.useProgram("hillshade"),R=_.style.map.terrain&&_.style.map.terrain.getTerrainData(i);S.activeTexture.set(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,P.colorAttachment.get()),O.draw(S,T.TRIANGLES,p,v,w,Pi.disabled,((j,H,X,ne)=>{const Y=X.paint.get("hillshade-shadow-color"),le=X.paint.get("hillshade-highlight-color"),me=X.paint.get("hillshade-accent-color");let ie=X.paint.get("hillshade-illumination-direction")*(Math.PI/180);X.paint.get("hillshade-illumination-anchor")==="viewport"&&(ie-=j.transform.angle);const ve=!j.options.moving;return{u_matrix:ne?ne.posMatrix:j.transform.calculatePosMatrix(H.tileID.toUnwrapped(),ve),u_image:0,u_latrange:ol(0,H.tileID),u_light:[X.paint.get("hillshade-exaggeration"),ie],u_shadow:Y,u_highlight:le,u_accent:me}})(_,a,d,R?i:null),R,d.id,_.rasterBoundsBuffer,_.quadTriangleIndexBuffer,_.rasterBoundsSegments)}function Rh(_,i,a,d,p,v){const w=_.context,S=w.gl,T=i.dem;if(T&&T.data){const P=T.dim,O=T.stride,R=T.getPixels();if(w.activeTexture.set(S.TEXTURE1),w.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture=i.demTexture||_.getTileTexture(O),i.demTexture){const H=i.demTexture;H.update(R,{premultiply:!1}),H.bind(S.NEAREST,S.CLAMP_TO_EDGE)}else i.demTexture=new Ie(w,R,S.RGBA,{premultiply:!1}),i.demTexture.bind(S.NEAREST,S.CLAMP_TO_EDGE);w.activeTexture.set(S.TEXTURE0);let j=i.fbo;if(!j){const H=new Ie(w,{width:P,height:P,data:null},S.RGBA);H.bind(S.LINEAR,S.CLAMP_TO_EDGE),j=i.fbo=w.createFramebuffer(P,P,!0,!1),j.colorAttachment.set(H.texture)}w.bindFramebuffer.set(j.framebuffer),w.viewport.set([0,0,P,P]),_.useProgram("hillshadePrepare").draw(w,S.TRIANGLES,d,p,v,Pi.disabled,((H,X)=>{const ne=X.stride,Y=c.F();return c.aO(Y,0,c.W,-c.W,0,0,1),c.H(Y,Y,[0,-c.W,0]),{u_matrix:Y,u_image:1,u_dimension:[ne,ne],u_zoom:H.overscaledZ,u_unpack:X.getUnpackVector()}})(i.tileID,T),null,a.id,_.rasterBoundsBuffer,_.quadTriangleIndexBuffer,_.rasterBoundsSegments),i.needsHillshadePrepare=!1}}function jc(_,i,a,d,p,v){const w=d.paint.get("raster-fade-duration");if(!v&&w>0){const S=A.now(),T=(S-_.timeAdded)/w,P=i?(S-i.timeAdded)/w:-1,O=a.getSource(),R=p.coveringZoomLevel({tileSize:O.tileSize,roundZoom:O.roundZoom}),j=!i||Math.abs(i.tileID.overscaledZ-R)>Math.abs(_.tileID.overscaledZ-R),H=j&&_.refreshedUponExpiration?1:c.ac(j?T:1-P,0,1);return _.refreshedUponExpiration&&T>=1&&(_.refreshedUponExpiration=!1),i?{opacity:1,mix:1-H}:{opacity:H,mix:0}}return{opacity:1,mix:0}}const Go=new c.aP(1,0,0,1),ml=new c.aP(0,1,0,1),gl=new c.aP(0,0,1,1),ya=new c.aP(1,0,1,1),yl=new c.aP(0,1,1,1);function $c(_,i,a,d){no(_,0,i+a/2,_.transform.width,a,d)}function Zo(_,i,a,d){no(_,i-a/2,0,a,_.transform.height,d)}function no(_,i,a,d,p,v){const w=_.context,S=w.gl;S.enable(S.SCISSOR_TEST),S.scissor(i*_.pixelRatio,a*_.pixelRatio,d*_.pixelRatio,p*_.pixelRatio),w.clear({color:v}),S.disable(S.SCISSOR_TEST)}function Oh(_,i,a){const d=_.context,p=d.gl,v=a.posMatrix,w=_.useProgram("debug"),S=Xt.disabled,T=Oi.disabled,P=_.colorModeForRenderPass(),O="$debug",R=_.style.map.terrain&&_.style.map.terrain.getTerrainData(a);d.activeTexture.set(p.TEXTURE0);const j=i.getTileByID(a.key).latestRawTileData,H=Math.floor((j&&j.byteLength||0)/1024),X=i.getTile(a).tileSize,ne=512/Math.min(X,512)*(a.overscaledZ/_.transform.zoom)*.5;let Y=a.canonical.toString();a.overscaledZ!==a.canonical.z&&(Y+=` => ${a.overscaledZ}`),function(le,me){le.initDebugOverlayCanvas();const ie=le.debugOverlayCanvas,ve=le.context.gl,Te=le.debugOverlayCanvas.getContext("2d");Te.clearRect(0,0,ie.width,ie.height),Te.shadowColor="white",Te.shadowBlur=2,Te.lineWidth=1.5,Te.strokeStyle="white",Te.textBaseline="top",Te.font="bold 36px Open Sans, sans-serif",Te.fillText(me,5,5),Te.strokeText(me,5,5),le.debugOverlayTexture.update(ie),le.debugOverlayTexture.bind(ve.LINEAR,ve.CLAMP_TO_EDGE)}(_,`${Y} ${H}kB`),w.draw(d,p.TRIANGLES,S,T,Hi.alphaBlended,Pi.disabled,Cc(v,c.aP.transparent,ne),null,O,_.debugBuffer,_.quadTriangleIndexBuffer,_.debugSegments),w.draw(d,p.LINE_STRIP,S,T,P,Pi.disabled,Cc(v,c.aP.red),R,O,_.debugBuffer,_.tileBorderIndexBuffer,_.debugSegments)}function _l(_,i,a){const d=_.context,p=d.gl,v=_.colorModeForRenderPass(),w=new Xt(p.LEQUAL,Xt.ReadWrite,_.depthRangeFor3D),S=_.useProgram("terrain"),T=i.getTerrainMesh();d.bindFramebuffer.set(null),d.viewport.set([0,0,_.width,_.height]);for(const P of a){const O=_.renderToTexture.getTexture(P),R=i.getTerrainData(P.tileID);d.activeTexture.set(p.TEXTURE0),p.bindTexture(p.TEXTURE_2D,O.texture);const j={u_matrix:_.transform.calculatePosMatrix(P.tileID.toUnwrapped()),u_texture:0,u_ele_delta:i.getMeshFrameDelta(_.transform.zoom)};S.draw(d,p.TRIANGLES,w,Oi.disabled,v,Pi.backCCW,j,R,"terrain",T.vertexBuffer,T.indexBuffer,T.segments)}}class ni{constructor(i,a){this.context=new Vc(i),this.transform=a,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:c.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Ye.maxUnderzooming+Ye.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new qi}resize(i,a,d){if(this.width=Math.floor(i*d),this.height=Math.floor(a*d),this.pixelRatio=d,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const p of this.style._order)this.style._layers[p].resize()}setup(){const i=this.context,a=new c.aW;a.emplaceBack(0,0),a.emplaceBack(c.W,0),a.emplaceBack(0,c.W),a.emplaceBack(c.W,c.W),this.tileExtentBuffer=i.createVertexBuffer(a,Nn.members),this.tileExtentSegments=c.$.simpleSegment(0,0,4,2);const d=new c.aW;d.emplaceBack(0,0),d.emplaceBack(c.W,0),d.emplaceBack(0,c.W),d.emplaceBack(c.W,c.W),this.debugBuffer=i.createVertexBuffer(d,Nn.members),this.debugSegments=c.$.simpleSegment(0,0,4,5);const p=new c.Z;p.emplaceBack(0,0,0,0),p.emplaceBack(c.W,0,c.W,0),p.emplaceBack(0,c.W,0,c.W),p.emplaceBack(c.W,c.W,c.W,c.W),this.rasterBoundsBuffer=i.createVertexBuffer(p,$e.members),this.rasterBoundsSegments=c.$.simpleSegment(0,0,4,2);const v=new c.aW;v.emplaceBack(0,0),v.emplaceBack(1,0),v.emplaceBack(0,1),v.emplaceBack(1,1),this.viewportBuffer=i.createVertexBuffer(v,Nn.members),this.viewportSegments=c.$.simpleSegment(0,0,4,2);const w=new c.aX;w.emplaceBack(0),w.emplaceBack(1),w.emplaceBack(3),w.emplaceBack(2),w.emplaceBack(0),this.tileBorderIndexBuffer=i.createIndexBuffer(w);const S=new c.aY;S.emplaceBack(0,1,2),S.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=i.createIndexBuffer(S);const T=this.context.gl;this.stencilClearMode=new Oi({func:T.ALWAYS,mask:0},0,255,T.ZERO,T.ZERO,T.ZERO)}clearStencil(){const i=this.context,a=i.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const d=c.F();c.aO(d,0,this.width,this.height,0,0,1),c.J(d,d,[a.drawingBufferWidth,a.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(i,a.TRIANGLES,Xt.disabled,this.stencilClearMode,Hi.disabled,Pi.disabled,yh(d),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(i,a){if(this.currentStencilSource===i.source||!i.isTileClipped()||!a||!a.length)return;this.currentStencilSource=i.source;const d=this.context,p=d.gl;this.nextStencilID+a.length>256&&this.clearStencil(),d.setColorMode(Hi.disabled),d.setDepthMode(Xt.disabled);const v=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const w of a){const S=this._tileClippingMaskIDs[w.key]=this.nextStencilID++,T=this.style.map.terrain&&this.style.map.terrain.getTerrainData(w);v.draw(d,p.TRIANGLES,Xt.disabled,new Oi({func:p.ALWAYS,mask:0},S,255,p.KEEP,p.KEEP,p.REPLACE),Hi.disabled,Pi.disabled,yh(w.posMatrix),T,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const i=this.nextStencilID++,a=this.context.gl;return new Oi({func:a.NOTEQUAL,mask:255},i,255,a.KEEP,a.KEEP,a.REPLACE)}stencilModeForClipping(i){const a=this.context.gl;return new Oi({func:a.EQUAL,mask:255},this._tileClippingMaskIDs[i.key],0,a.KEEP,a.KEEP,a.REPLACE)}stencilConfigForOverlap(i){const a=this.context.gl,d=i.sort((w,S)=>S.overscaledZ-w.overscaledZ),p=d[d.length-1].overscaledZ,v=d[0].overscaledZ-p+1;if(v>1){this.currentStencilSource=void 0,this.nextStencilID+v>256&&this.clearStencil();const w={};for(let S=0;S=0;this.currentLayer--){const T=this.style._layers[d[this.currentLayer]],P=p[T.source],O=v[T.source];this._renderTileClippingMasks(T,O),this.renderLayer(this,P,T,O)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerY.source&&!Y.isHidden(O)?[P.sourceCaches[Y.source]]:[]),H=j.filter(Y=>Y.getSource().type==="vector"),X=j.filter(Y=>Y.getSource().type!=="vector"),ne=Y=>{(!R||R.getSource().maxzoomne(Y)),R||X.forEach(Y=>ne(Y)),R}(this.style,this.transform.zoom);T&&function(P,O,R){for(let j=0;j0),p&&(c.a$(a,d),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(v,w){const S=v.context,T=S.gl,P=Hi.unblended,O=new Xt(T.LEQUAL,Xt.ReadWrite,[0,1]),R=w.getTerrainMesh(),j=w.sourceCache.getRenderableTiles(),H=v.useProgram("terrainDepth");S.bindFramebuffer.set(w.getFramebuffer("depth").framebuffer),S.viewport.set([0,0,v.width/devicePixelRatio,v.height/devicePixelRatio]),S.clear({color:c.aP.transparent,depth:1});for(const X of j){const ne=w.getTerrainData(X.tileID),Y={u_matrix:v.transform.calculatePosMatrix(X.tileID.toUnwrapped()),u_ele_delta:w.getMeshFrameDelta(v.transform.zoom)};H.draw(S,T.TRIANGLES,O,Oi.disabled,P,Pi.backCCW,Y,ne,"terrain",R.vertexBuffer,R.indexBuffer,R.segments)}S.bindFramebuffer.set(null),S.viewport.set([0,0,v.width,v.height])}(this,this.style.map.terrain),function(v,w){const S=v.context,T=S.gl,P=Hi.unblended,O=new Xt(T.LEQUAL,Xt.ReadWrite,[0,1]),R=w.getTerrainMesh(),j=w.getCoordsTexture(),H=w.sourceCache.getRenderableTiles(),X=v.useProgram("terrainCoords");S.bindFramebuffer.set(w.getFramebuffer("coords").framebuffer),S.viewport.set([0,0,v.width/devicePixelRatio,v.height/devicePixelRatio]),S.clear({color:c.aP.transparent,depth:1}),w.coordsIndex=[];for(const ne of H){const Y=w.getTerrainData(ne.tileID);S.activeTexture.set(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,j.texture);const le={u_matrix:v.transform.calculatePosMatrix(ne.tileID.toUnwrapped()),u_terrain_coords_id:(255-w.coordsIndex.length)/255,u_texture:0,u_ele_delta:w.getMeshFrameDelta(v.transform.zoom)};X.draw(S,T.TRIANGLES,O,Oi.disabled,P,Pi.backCCW,le,Y,"terrain",R.vertexBuffer,R.indexBuffer,R.segments),w.coordsIndex.push(ne.tileID.key)}S.bindFramebuffer.set(null),S.viewport.set([0,0,v.width,v.height])}(this,this.style.map.terrain))}renderLayer(i,a,d,p){if(!d.isHidden(this.transform.zoom)&&(d.type==="background"||d.type==="custom"||(p||[]).length))switch(this.id=d.id,d.type){case"symbol":(function(v,w,S,T,P){if(v.renderPass!=="translucent")return;const O=Oi.disabled,R=v.colorModeForRenderPass();(S._unevaluatedLayout.hasValue("text-variable-anchor")||S._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(j,H,X,ne,Y,le,me,ie,ve){const Te=H.transform,Pe=Xr(),Ve=Y==="map",Ke=le==="map";for(const ut of j){const ht=ne.getTile(ut),Je=ht.getBucket(X);if(!Je||!Je.text||!Je.text.segments.get().length)continue;const et=c.ag(Je.textSizeData,Te.zoom),yt=Dt(ht,1,H.transform.zoom),Rt=eo(ut.posMatrix,Ke,Ve,H.transform,yt),it=X.layout.get("icon-text-fit")!=="none"&&Je.hasIconData();if(et){const at=Math.pow(2,Te.zoom-ht.tileID.overscaledZ),kt=H.style.map.terrain?(Zt,Yt)=>H.style.map.terrain.getElevation(ut,Zt,Yt):null,Ii=Pe.translatePosition(Te,ht,me,ie);dl(Je,Ve,Ke,ve,Te,Rt,ut.posMatrix,at,et,it,Pe,Ii,ut.toUnwrapped(),kt)}}}(T,v,S,w,S.layout.get("text-rotation-alignment"),S.layout.get("text-pitch-alignment"),S.paint.get("text-translate"),S.paint.get("text-translate-anchor"),P),S.paint.get("icon-opacity").constantOr(1)!==0&&ga(v,w,S,T,!1,S.paint.get("icon-translate"),S.paint.get("icon-translate-anchor"),S.layout.get("icon-rotation-alignment"),S.layout.get("icon-pitch-alignment"),S.layout.get("icon-keep-upright"),O,R),S.paint.get("text-opacity").constantOr(1)!==0&&ga(v,w,S,T,!0,S.paint.get("text-translate"),S.paint.get("text-translate-anchor"),S.layout.get("text-rotation-alignment"),S.layout.get("text-pitch-alignment"),S.layout.get("text-keep-upright"),O,R),w.map.showCollisionBoxes&&(Ph(v,w,S,T,!0),Ph(v,w,S,T,!1))})(i,a,d,p,this.style.placement.variableOffsets);break;case"circle":(function(v,w,S,T){if(v.renderPass!=="translucent")return;const P=S.paint.get("circle-opacity"),O=S.paint.get("circle-stroke-width"),R=S.paint.get("circle-stroke-opacity"),j=!S.layout.get("circle-sort-key").isConstant();if(P.constantOr(1)===0&&(O.constantOr(1)===0||R.constantOr(1)===0))return;const H=v.context,X=H.gl,ne=v.depthModeForSublayer(0,Xt.ReadOnly),Y=Oi.disabled,le=v.colorModeForRenderPass(),me=[];for(let ie=0;ieie.sortKey-ve.sortKey);for(const ie of me){const{programConfiguration:ve,program:Te,layoutVertexBuffer:Pe,indexBuffer:Ve,uniformValues:Ke,terrainData:ut}=ie.state;Te.draw(H,X.TRIANGLES,ne,Y,le,Pi.disabled,Ke,ut,S.id,Pe,Ve,ie.segments,S.paint,v.transform.zoom,ve)}})(i,a,d,p);break;case"heatmap":(function(v,w,S,T){if(S.paint.get("heatmap-opacity")!==0)if(v.renderPass==="offscreen"){const P=v.context,O=P.gl,R=Oi.disabled,j=new Hi([O.ONE,O.ONE],c.aP.transparent,[!0,!0,!0,!0]);(function(H,X,ne){const Y=H.gl;H.activeTexture.set(Y.TEXTURE1),H.viewport.set([0,0,X.width/4,X.height/4]);let le=ne.heatmapFbo;if(le)Y.bindTexture(Y.TEXTURE_2D,le.colorAttachment.get()),H.bindFramebuffer.set(le.framebuffer);else{const me=Y.createTexture();Y.bindTexture(Y.TEXTURE_2D,me),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_WRAP_S,Y.CLAMP_TO_EDGE),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_WRAP_T,Y.CLAMP_TO_EDGE),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_MIN_FILTER,Y.LINEAR),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_MAG_FILTER,Y.LINEAR),le=ne.heatmapFbo=H.createFramebuffer(X.width/4,X.height/4,!1,!1),function(ie,ve,Te,Pe){var Ve,Ke;const ut=ie.gl,ht=(Ve=ie.HALF_FLOAT)!==null&&Ve!==void 0?Ve:ut.UNSIGNED_BYTE,Je=(Ke=ie.RGBA16F)!==null&&Ke!==void 0?Ke:ut.RGBA;ut.texImage2D(ut.TEXTURE_2D,0,Je,ve.width/4,ve.height/4,0,ut.RGBA,ht,null),Pe.colorAttachment.set(Te)}(H,X,me,le)}})(P,v,S),P.clear({color:c.aP.transparent});for(let H=0;H{const ie=c.F();c.aO(ie,0,ne.width,ne.height,0,0,1);const ve=ne.context.gl;return{u_matrix:ie,u_world:[ve.drawingBufferWidth,ve.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:Y.paint.get("heatmap-opacity")}})(P,O),null,O.id,P.viewportBuffer,P.quadTriangleIndexBuffer,P.viewportSegments,O.paint,P.transform.zoom)}(v,S))})(i,a,d,p);break;case"line":(function(v,w,S,T){if(v.renderPass!=="translucent")return;const P=S.paint.get("line-opacity"),O=S.paint.get("line-width");if(P.constantOr(1)===0||O.constantOr(1)===0)return;const R=v.depthModeForSublayer(0,Xt.ReadOnly),j=v.colorModeForRenderPass(),H=S.paint.get("line-dasharray"),X=S.paint.get("line-pattern"),ne=X.constantOr(1),Y=S.paint.get("line-gradient"),le=S.getCrossfadeParameters(),me=ne?"linePattern":H?"lineSDF":Y?"lineGradient":"line",ie=v.context,ve=ie.gl;let Te=!0;for(const Pe of T){const Ve=w.getTile(Pe);if(ne&&!Ve.patternsLoaded())continue;const Ke=Ve.getBucket(S);if(!Ke)continue;const ut=Ke.programConfigurations.get(S.id),ht=v.context.program.get(),Je=v.useProgram(me,ut),et=Te||Je.program!==ht,yt=v.style.map.terrain&&v.style.map.terrain.getTerrainData(Pe),Rt=X.constantOr(null);if(Rt&&Ve.imageAtlas){const kt=Ve.imageAtlas,Ii=kt.patternPositions[Rt.to.toString()],Zt=kt.patternPositions[Rt.from.toString()];Ii&&Zt&&ut.setConstantPatternPositions(Ii,Zt)}const it=yt?Pe:null,at=ne?Ac(v,Ve,S,le,it):H?sl(v,Ve,S,H,le,it):Y?un(v,Ve,S,Ke.lineClipsArray.length,it):Fr(v,Ve,S,it);if(ne)ie.activeTexture.set(ve.TEXTURE0),Ve.imageAtlasTexture.bind(ve.LINEAR,ve.CLAMP_TO_EDGE),ut.updatePaintBuffers(le);else if(H&&(et||v.lineAtlas.dirty))ie.activeTexture.set(ve.TEXTURE0),v.lineAtlas.bind(ie);else if(Y){const kt=Ke.gradients[S.id];let Ii=kt.texture;if(S.gradientVersion!==kt.version){let Zt=256;if(S.stepInterpolant){const Yt=w.getSource().maxzoom,Ti=Pe.canonical.z===Yt?Math.ceil(1<0?a.pop():null}isPatternMissing(i){if(!i)return!1;if(!i.from||!i.to)return!0;const a=this.imageManager.getPattern(i.from.toString()),d=this.imageManager.getPattern(i.to.toString());return!a||!d}useProgram(i,a){this.cache=this.cache||{};const d=i+(a?a.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[d]||(this.cache[d]=new Ic(this.context,gs[i],a,al[i],this._showOverdrawInspector,this.style.map.terrain)),this.cache[d]}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 i=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(i.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new Ie(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:i,drawingBufferHeight:a}=this.context.gl;return this.width!==i||this.height!==a}}class bs{constructor(i,a){this.points=i,this.planes=a}static fromInvProjectionMatrix(i,a,d){const p=Math.pow(2,d),v=[[-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(S=>{const T=1/(S=c.af([],S,i))[3]/a*p;return c.b0(S,S,[T,T,1/S[3],T])}),w=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(S=>{const T=function(j,H){var X=H[0],ne=H[1],Y=H[2],le=X*X+ne*ne+Y*Y;return le>0&&(le=1/Math.sqrt(le)),j[0]=H[0]*le,j[1]=H[1]*le,j[2]=H[2]*le,j}([],function(j,H,X){var ne=H[0],Y=H[1],le=H[2],me=X[0],ie=X[1],ve=X[2];return j[0]=Y*ve-le*ie,j[1]=le*me-ne*ve,j[2]=ne*ie-Y*me,j}([],Se([],v[S[0]],v[S[1]]),Se([],v[S[2]],v[S[1]]))),P=-((O=T)[0]*(R=v[S[1]])[0]+O[1]*R[1]+O[2]*R[2]);var O,R;return T.concat(P)});return new bs(v,w)}}class vl{constructor(i,a){this.min=i,this.max=a,this.center=function(d,p,v){return d[0]=.5*p[0],d[1]=.5*p[1],d[2]=.5*p[2],d}([],function(d,p,v){return d[0]=p[0]+v[0],d[1]=p[1]+v[1],d[2]=p[2]+v[2],d}([],this.min,this.max))}quadrant(i){const a=[i%2==0,i<2],d=Z(this.min),p=Z(this.max);for(let v=0;v=0&&w++;if(w===0)return 0;w!==a.length&&(d=!1)}if(d)return 2;for(let p=0;p<3;p++){let v=Number.MAX_VALUE,w=-Number.MAX_VALUE;for(let S=0;Sthis.max[p]-this.min[p])return 0}return 1}}class _a{constructor(i=0,a=0,d=0,p=0){if(isNaN(i)||i<0||isNaN(a)||a<0||isNaN(d)||d<0||isNaN(p)||p<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=i,this.bottom=a,this.left=d,this.right=p}interpolate(i,a,d){return a.top!=null&&i.top!=null&&(this.top=c.z.number(i.top,a.top,d)),a.bottom!=null&&i.bottom!=null&&(this.bottom=c.z.number(i.bottom,a.bottom,d)),a.left!=null&&i.left!=null&&(this.left=c.z.number(i.left,a.left,d)),a.right!=null&&i.right!=null&&(this.right=c.z.number(i.right,a.right,d)),this}getCenter(i,a){const d=c.ac((this.left+i-this.right)/2,0,i),p=c.ac((this.top+a-this.bottom)/2,0,a);return new c.P(d,p)}equals(i){return this.top===i.top&&this.bottom===i.bottom&&this.left===i.left&&this.right===i.right}clone(){return new _a(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const ws=85.051129;class Uc{constructor(i,a,d,p,v){this.tileSize=512,this._renderWorldCopies=v===void 0||!!v,this._minZoom=i||0,this._maxZoom=a||22,this._minPitch=d??0,this._maxPitch=p??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new c.M(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new _a,this._posMatrixCache={},this._alignedPosMatrixCache={},this.minElevationForCurrentTile=0}clone(){const i=new Uc(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return i.apply(this),i}apply(i){this.tileSize=i.tileSize,this.latRange=i.latRange,this.width=i.width,this.height=i.height,this._center=i._center,this._elevation=i._elevation,this.minElevationForCurrentTile=i.minElevationForCurrentTile,this.zoom=i.zoom,this.angle=i.angle,this._fov=i._fov,this._pitch=i._pitch,this._unmodified=i._unmodified,this._edgeInsets=i._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(i){this._minZoom!==i&&(this._minZoom=i,this.zoom=Math.max(this.zoom,i))}get maxZoom(){return this._maxZoom}set maxZoom(i){this._maxZoom!==i&&(this._maxZoom=i,this.zoom=Math.min(this.zoom,i))}get minPitch(){return this._minPitch}set minPitch(i){this._minPitch!==i&&(this._minPitch=i,this.pitch=Math.max(this.pitch,i))}get maxPitch(){return this._maxPitch}set maxPitch(i){this._maxPitch!==i&&(this._maxPitch=i,this.pitch=Math.min(this.pitch,i))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(i){i===void 0?i=!0:i===null&&(i=!1),this._renderWorldCopies=i}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new c.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(i){const a=-c.b2(i,-180,180)*Math.PI/180;this.angle!==a&&(this._unmodified=!1,this.angle=a,this._calcMatrices(),this.rotationMatrix=function(){var d=new c.A(4);return c.A!=Float32Array&&(d[1]=0,d[2]=0),d[0]=1,d[3]=1,d}(),function(d,p,v){var w=p[0],S=p[1],T=p[2],P=p[3],O=Math.sin(v),R=Math.cos(v);d[0]=w*R+T*O,d[1]=S*R+P*O,d[2]=w*-O+T*R,d[3]=S*-O+P*R}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(i){const a=c.ac(i,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==a&&(this._unmodified=!1,this._pitch=a,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(i){i=Math.max(.01,Math.min(60,i)),this._fov!==i&&(this._unmodified=!1,this._fov=i/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(i){const a=Math.min(Math.max(i,this.minZoom),this.maxZoom);this._zoom!==a&&(this._unmodified=!1,this._zoom=a,this.tileZoom=Math.max(0,Math.floor(a)),this.scale=this.zoomScale(a),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(i){i.lat===this._center.lat&&i.lng===this._center.lng||(this._unmodified=!1,this._center=i,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(i){i!==this._elevation&&(this._elevation=i,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(i){this._edgeInsets.equals(i)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,i,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(i){return this._edgeInsets.equals(i)}interpolatePadding(i,a,d){this._unmodified=!1,this._edgeInsets.interpolate(i,a,d),this._constrain(),this._calcMatrices()}coveringZoomLevel(i){const a=(i.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/i.tileSize));return Math.max(0,a)}getVisibleUnwrappedCoordinates(i){const a=[new c.b3(0,i)];if(this._renderWorldCopies){const d=this.pointCoordinate(new c.P(0,0)),p=this.pointCoordinate(new c.P(this.width,0)),v=this.pointCoordinate(new c.P(this.width,this.height)),w=this.pointCoordinate(new c.P(0,this.height)),S=Math.floor(Math.min(d.x,p.x,v.x,w.x)),T=Math.floor(Math.max(d.x,p.x,v.x,w.x)),P=1;for(let O=S-P;O<=T+P;O++)O!==0&&a.push(new c.b3(O,i))}return a}coveringTiles(i){var a,d;let p=this.coveringZoomLevel(i);const v=p;if(i.minzoom!==void 0&&pi.maxzoom&&(p=i.maxzoom);const w=this.pointCoordinate(this.getCameraPoint()),S=c.Y.fromLngLat(this.center),T=Math.pow(2,p),P=[T*w.x,T*w.y,0],O=[T*S.x,T*S.y,0],R=bs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,p);let j=i.minzoom||0;!i.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(j=p);const H=i.terrain?2/Math.min(this.tileSize,i.tileSize)*this.tileSize:3,X=ie=>({aabb:new vl([ie*T,0,0],[(ie+1)*T,T,0]),zoom:0,x:0,y:0,wrap:ie,fullyVisible:!1}),ne=[],Y=[],le=p,me=i.reparseOverscaled?v:p;if(this._renderWorldCopies)for(let ie=1;ie<=3;ie++)ne.push(X(-ie)),ne.push(X(ie));for(ne.push(X(0));ne.length>0;){const ie=ne.pop(),ve=ie.x,Te=ie.y;let Pe=ie.fullyVisible;if(!Pe){const Je=ie.aabb.intersects(R);if(Je===0)continue;Pe=Je===2}const Ve=i.terrain?P:O,Ke=ie.aabb.distanceX(Ve),ut=ie.aabb.distanceY(Ve),ht=Math.max(Math.abs(Ke),Math.abs(ut));if(ie.zoom===le||ht>H+(1<=j){const Je=le-ie.zoom,et=P[0]-.5-(ve<>1),Rt=ie.zoom+1;let it=ie.aabb.quadrant(Je);if(i.terrain){const at=new c.Q(Rt,ie.wrap,Rt,et,yt),kt=i.terrain.getMinMaxElevation(at),Ii=(a=kt.minElevation)!==null&&a!==void 0?a:this.elevation,Zt=(d=kt.maxElevation)!==null&&d!==void 0?d:this.elevation;it=new vl([it.min[0],it.min[1],Ii],[it.max[0],it.max[1],Zt])}ne.push({aabb:it,zoom:Rt,x:et,y:yt,wrap:ie.wrap,fullyVisible:Pe})}}return Y.sort((ie,ve)=>ie.distanceSq-ve.distanceSq).map(ie=>ie.tileID)}resize(i,a){this.width=i,this.height=a,this.pixelsToGLUnits=[2/i,-2/a],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(i){return Math.pow(2,i)}scaleZoom(i){return Math.log(i)/Math.LN2}project(i){const a=c.ac(i.lat,-85.051129,ws);return new c.P(c.N(i.lng)*this.worldSize,c.O(a)*this.worldSize)}unproject(i){return new c.Y(i.x/this.worldSize,i.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(i){const a=this.elevation,d=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,p=this.pointLocation(this.centerPoint,i),v=i.getElevationForLngLatZoom(p,this.tileZoom);if(!(this.elevation-v))return;const w=d+a-v,S=Math.cos(this._pitch)*this.cameraToCenterDistance/w/c.b4(1,p.lat),T=this.scaleZoom(S/this.tileSize);this._elevation=v,this._center=p,this.zoom=T}setLocationAtPoint(i,a){const d=this.pointCoordinate(a),p=this.pointCoordinate(this.centerPoint),v=this.locationCoordinate(i),w=new c.Y(v.x-(d.x-p.x),v.y-(d.y-p.y));this.center=this.coordinateLocation(w),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(i,a){return a?this.coordinatePoint(this.locationCoordinate(i),a.getElevationForLngLatZoom(i,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(i))}pointLocation(i,a){return this.coordinateLocation(this.pointCoordinate(i,a))}locationCoordinate(i){return c.Y.fromLngLat(i)}coordinateLocation(i){return i&&i.toLngLat()}pointCoordinate(i,a){if(a){const j=a.pointCoordinate(i);if(j!=null)return j}const d=[i.x,i.y,0,1],p=[i.x,i.y,1,1];c.af(d,d,this.pixelMatrixInverse),c.af(p,p,this.pixelMatrixInverse);const v=d[3],w=p[3],S=d[1]/v,T=p[1]/w,P=d[2]/v,O=p[2]/w,R=P===O?0:(0-P)/(O-P);return new c.Y(c.z.number(d[0]/v,p[0]/w,R)/this.worldSize,c.z.number(S,T,R)/this.worldSize)}coordinatePoint(i,a=0,d=this.pixelMatrix){const p=[i.x*this.worldSize,i.y*this.worldSize,a,1];return c.af(p,p,d),new c.P(p[0]/p[3],p[1]/p[3])}getBounds(){const i=Math.max(0,this.height/2-this.getHorizon());return new ge().extend(this.pointLocation(new c.P(0,i))).extend(this.pointLocation(new c.P(this.width,i))).extend(this.pointLocation(new c.P(this.width,this.height))).extend(this.pointLocation(new c.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ge([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(i){i?(this.lngRange=[i.getWest(),i.getEast()],this.latRange=[i.getSouth(),i.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,ws])}calculatePosMatrix(i,a=!1){const d=i.key,p=a?this._alignedPosMatrixCache:this._posMatrixCache;if(p[d])return p[d];const v=i.canonical,w=this.worldSize/this.zoomScale(v.z),S=v.x+Math.pow(2,v.z)*i.wrap,T=c.an(new Float64Array(16));return c.H(T,T,[S*w,v.y*w,0]),c.J(T,T,[w/c.W,w/c.W,1]),c.K(T,a?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,T),p[d]=new Float32Array(T),p[d]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(i,a){a=c.ac(+a,this.minZoom,this.maxZoom);const d={center:new c.M(i.lng,i.lat),zoom:a};let p=this.lngRange;if(!this._renderWorldCopies&&p===null){const ie=179.9999999999;p=[-ie,ie]}const v=this.tileSize*this.zoomScale(d.zoom);let w=0,S=v,T=0,P=v,O=0,R=0;const{x:j,y:H}=this.size;if(this.latRange){const ie=this.latRange;w=c.O(ie[1])*v,S=c.O(ie[0])*v,S-wS&&(le=S-ie)}if(p){const ie=(T+P)/2;let ve=X;this._renderWorldCopies&&(ve=c.b2(X,ie-v/2,ie+v/2));const Te=j/2;ve-TeP&&(Y=P-Te)}if(Y!==void 0||le!==void 0){const ie=new c.P(Y??X,le??ne);d.center=this.unproject.call({worldSize:v},ie).wrap()}return d}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const i=this._unmodified,{center:a,zoom:d}=this.getConstrained(this.center,this.zoom);this.center=a,this.zoom=d,this._unmodified=i,this._constraining=!1}_calcMatrices(){if(!this.height)return;const i=this.centerOffset,a=this.point.x,d=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=c.b4(1,this.center.lat)*this.worldSize;let p=c.an(new Float64Array(16));c.J(p,p,[this.width/2,-this.height/2,1]),c.H(p,p,[1,-1,0]),this.labelPlaneMatrix=p,p=c.an(new Float64Array(16)),c.J(p,p,[1,-1,1]),c.H(p,p,[-1,-1,0]),c.J(p,p,[2/this.width,2/this.height,1]),this.glCoordMatrix=p;const v=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),w=Math.min(this.elevation,this.minElevationForCurrentTile),S=v-w*this._pixelPerMeter/Math.cos(this._pitch),T=w<0?S:v,P=Math.PI/2+this._pitch,O=this._fov*(.5+i.y/this.height),R=Math.sin(O)*T/Math.sin(c.ac(Math.PI-P-O,.01,Math.PI-.01)),j=this.getHorizon(),H=2*Math.atan(j/this.cameraToCenterDistance)*(.5+i.y/(2*j)),X=Math.sin(H)*T/Math.sin(c.ac(Math.PI-P-H,.01,Math.PI-.01)),ne=Math.min(R,X),Y=1.01*(Math.cos(Math.PI/2-this._pitch)*ne+T),le=this.height/50;p=new Float64Array(16),c.b5(p,this._fov,this.width/this.height,le,Y),p[8]=2*-i.x/this.width,p[9]=2*i.y/this.height,c.J(p,p,[1,-1,1]),c.H(p,p,[0,0,-this.cameraToCenterDistance]),c.b6(p,p,this._pitch),c.ad(p,p,this.angle),c.H(p,p,[-a,-d,0]),this.mercatorMatrix=c.J([],p,[this.worldSize,this.worldSize,this.worldSize]),c.J(p,p,[1,1,this._pixelPerMeter]),this.pixelMatrix=c.K(new Float64Array(16),this.labelPlaneMatrix,p),c.H(p,p,[0,0,-this.elevation]),this.modelViewProjectionMatrix=p,this.invModelViewProjectionMatrix=c.as([],p),this.pixelMatrix3D=c.K(new Float64Array(16),this.labelPlaneMatrix,p);const me=this.width%2/2,ie=this.height%2/2,ve=Math.cos(this.angle),Te=Math.sin(this.angle),Pe=a-Math.round(a)+ve*me+Te*ie,Ve=d-Math.round(d)+ve*ie+Te*me,Ke=new Float64Array(p);if(c.H(Ke,Ke,[Pe>.5?Pe-1:Pe,Ve>.5?Ve-1:Ve,0]),this.alignedModelViewProjectionMatrix=Ke,p=c.as(new Float64Array(16),this.pixelMatrix),!p)throw new Error("failed to invert matrix");this.pixelMatrixInverse=p,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const i=this.pointCoordinate(new c.P(0,0)),a=[i.x*this.worldSize,i.y*this.worldSize,0,1];return c.af(a,a,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const i=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new c.P(0,i))}getCameraQueryGeometry(i){const a=this.getCameraPoint();if(i.length===1)return[i[0],a];{let d=a.x,p=a.y,v=a.x,w=a.y;for(const S of i)d=Math.min(d,S.x),p=Math.min(p,S.y),v=Math.max(v,S.x),w=Math.max(w,S.y);return[new c.P(d,p),new c.P(v,p),new c.P(v,w),new c.P(d,w),new c.P(d,p)]}}lngLatToCameraDepth(i,a){const d=this.locationCoordinate(i),p=[d.x*this.worldSize,d.y*this.worldSize,a,1];return c.af(p,p,this.modelViewProjectionMatrix),p[2]/p[3]}}function Bh(_,i){let a,d=!1,p=null,v=null;const w=()=>{p=null,d&&(_.apply(v,a),p=setTimeout(w,i),d=!1)};return(...S)=>(d=!0,v=this,a=S,p||w(),p)}class qc{constructor(i){this._getCurrentHash=()=>{const a=window.location.hash.replace("#","");if(this._hashName){let d;return a.split("&").map(p=>p.split("=")).forEach(p=>{p[0]===this._hashName&&(d=p)}),(d&&d[1]||"").split("/")}return a.split("/")},this._onHashChange=()=>{const a=this._getCurrentHash();if(a.length>=3&&!a.some(d=>isNaN(d))){const d=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(a[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+a[2],+a[1]],zoom:+a[0],bearing:d,pitch:+(a[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const a=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,a)}catch{}},this._updateHash=Bh(this._updateHashUnthrottled,300),this._hashName=i&&encodeURIComponent(i)}addTo(i){return this._map=i,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()),delete this._map,this}getHashString(i){const a=this._map.getCenter(),d=Math.round(100*this._map.getZoom())/100,p=Math.ceil((d*Math.LN2+Math.log(512/360/.5))/Math.LN10),v=Math.pow(10,p),w=Math.round(a.lng*v)/v,S=Math.round(a.lat*v)/v,T=this._map.getBearing(),P=this._map.getPitch();let O="";if(O+=i?`/${w}/${S}/${d}`:`${d}/${S}/${w}`,(T||P)&&(O+="/"+Math.round(10*T)/10),P&&(O+=`/${Math.round(P)}`),this._hashName){const R=this._hashName;let j=!1;const H=window.location.hash.slice(1).split("&").map(X=>{const ne=X.split("=")[0];return ne===R?(j=!0,`${ne}=${O}`):X}).filter(X=>X);return j||H.push(`${R}=${O}`),`#${H.join("&")}`}return`#${O}`}}const xl={linearity:.3,easing:c.b7(0,0,.3,1)},Hc=c.e({deceleration:2500,maxSpeed:1400},xl),bl=c.e({deceleration:20,maxSpeed:1400},xl),wl=c.e({deceleration:1e3,maxSpeed:360},xl),Gc=c.e({deceleration:1e3,maxSpeed:90},xl);class Zc{constructor(i){this._map=i,this.clear()}clear(){this._inertiaBuffer=[]}record(i){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:A.now(),settings:i})}_drainInertiaBuffer(){const i=this._inertiaBuffer,a=A.now();for(;i.length>0&&a-i[0].time>160;)i.shift()}_onMoveEnd(i){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const a={zoom:0,bearing:0,pitch:0,pan:new c.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:v}of this._inertiaBuffer)a.zoom+=v.zoomDelta||0,a.bearing+=v.bearingDelta||0,a.pitch+=v.pitchDelta||0,v.panDelta&&a.pan._add(v.panDelta),v.around&&(a.around=v.around),v.pinchAround&&(a.pinchAround=v.pinchAround);const d=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,p={};if(a.pan.mag()){const v=Wo(a.pan.mag(),d,c.e({},Hc,i||{}));p.offset=a.pan.mult(v.amount/a.pan.mag()),p.center=this._map.transform.center,va(p,v)}if(a.zoom){const v=Wo(a.zoom,d,bl);p.zoom=this._map.transform.zoom+v.amount,va(p,v)}if(a.bearing){const v=Wo(a.bearing,d,wl);p.bearing=this._map.transform.bearing+c.ac(v.amount,-179,179),va(p,v)}if(a.pitch){const v=Wo(a.pitch,d,Gc);p.pitch=this._map.transform.pitch+v.amount,va(p,v)}if(p.zoom||p.bearing){const v=a.pinchAround===void 0?a.around:a.pinchAround;p.around=v?this._map.unproject(v):this._map.getCenter()}return this.clear(),c.e(p,{noMoveStart:!0})}}function va(_,i){(!_.duration||_.durationa.unproject(T)),S=v.reduce((T,P,O,R)=>T.add(P.div(R.length)),new c.P(0,0));super(i,{points:v,point:S,lngLats:w,lngLat:a.unproject(S),originalEvent:d}),this._defaultPrevented=!1}}class Fh extends c.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(i,a,d){super(i,{originalEvent:d}),this._defaultPrevented=!1}}class Wc{constructor(i,a){this._map=i,this._clickTolerance=a.clickTolerance}reset(){delete this._mousedownPos}wheel(i){return this._firePreventable(new Fh(i.type,this._map,i))}mousedown(i,a){return this._mousedownPos=a,this._firePreventable(new Sr(i.type,this._map,i))}mouseup(i){this._map.fire(new Sr(i.type,this._map,i))}click(i,a){this._mousedownPos&&this._mousedownPos.dist(a)>=this._clickTolerance||this._map.fire(new Sr(i.type,this._map,i))}dblclick(i){return this._firePreventable(new Sr(i.type,this._map,i))}mouseover(i){this._map.fire(new Sr(i.type,this._map,i))}mouseout(i){this._map.fire(new Sr(i.type,this._map,i))}touchstart(i){return this._firePreventable(new Xo(i.type,this._map,i))}touchmove(i){this._map.fire(new Xo(i.type,this._map,i))}touchend(i){this._map.fire(new Xo(i.type,this._map,i))}touchcancel(i){this._map.fire(new Xo(i.type,this._map,i))}_firePreventable(i){if(this._map.fire(i),i.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class op{constructor(i){this._map=i}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(i){this._map.fire(new Sr(i.type,this._map,i))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Sr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(i){this._delayContextMenu?this._contextMenuEvent=i:this._ignoreContextMenu||this._map.fire(new Sr(i.type,this._map,i)),this._map.listens("contextmenu")&&i.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Es{constructor(i){this._map=i}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(i){return this.transform.pointLocation(c.P.convert(i),this._map.terrain)}}class xa{constructor(i,a){this._map=i,this._tr=new Es(i),this._el=i.getCanvasContainer(),this._container=i.getContainer(),this._clickTolerance=a.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(i,a){this.isEnabled()&&i.shiftKey&&i.button===0&&(z.disableDrag(),this._startPos=this._lastPos=a,this._active=!0)}mousemoveWindow(i,a){if(!this._active)return;const d=a;if(this._lastPos.equals(d)||!this._box&&d.dist(this._startPos)v.fitScreenCoordinates(d,p,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",i)}keydown(i){this._active&&i.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",i))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(z.remove(this._box),this._box=null),z.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(i,a){return this._map.fire(new c.k(i,{originalEvent:a}))}}function ba(_,i){if(_.length!==i.length)throw new Error(`The number of touches and points are not equal - touches ${_.length}, points ${i.length}`);const a={};for(let d=0;d<_.length;d++)a[_[d].identifier]=i[d];return a}class Vh{constructor(i){this.reset(),this.numTouches=i.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(i,a,d){(this.centroid||d.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=i.timeStamp),d.length===this.numTouches&&(this.centroid=function(p){const v=new c.P(0,0);for(const w of p)v._add(w);return v.div(p.length)}(a),this.touches=ba(d,a)))}touchmove(i,a,d){if(this.aborted||!this.centroid)return;const p=ba(d,a);for(const v in this.touches){const w=p[v];(!w||w.dist(this.touches[v])>30)&&(this.aborted=!0)}}touchend(i,a,d){if((!this.centroid||i.timeStamp-this.startTime>500)&&(this.aborted=!0),d.length===0){const p=!this.aborted&&this.centroid;if(this.reset(),p)return p}}}class El{constructor(i){this.singleTap=new Vh(i),this.numTaps=i.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(i,a,d){this.singleTap.touchstart(i,a,d)}touchmove(i,a,d){this.singleTap.touchmove(i,a,d)}touchend(i,a,d){const p=this.singleTap.touchend(i,a,d);if(p){const v=i.timeStamp-this.lastTime<500,w=!this.lastTap||this.lastTap.dist(p)<30;if(v&&w||this.reset(),this.count++,this.lastTime=i.timeStamp,this.lastTap=p,this.count===this.numTaps)return this.reset(),p}}}class Sl{constructor(i){this._tr=new Es(i),this._zoomIn=new El({numTouches:1,numTaps:2}),this._zoomOut=new El({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(i,a,d){this._zoomIn.touchstart(i,a,d),this._zoomOut.touchstart(i,a,d)}touchmove(i,a,d){this._zoomIn.touchmove(i,a,d),this._zoomOut.touchmove(i,a,d)}touchend(i,a,d){const p=this._zoomIn.touchend(i,a,d),v=this._zoomOut.touchend(i,a,d),w=this._tr;return p?(this._active=!0,i.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:S=>S.easeTo({duration:300,zoom:w.zoom+1,around:w.unproject(p)},{originalEvent:i})}):v?(this._active=!0,i.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:S=>S.easeTo({duration:300,zoom:w.zoom-1,around:w.unproject(v)},{originalEvent:i})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ko{constructor(i){this._enabled=!!i.enable,this._moveStateManager=i.moveStateManager,this._clickTolerance=i.clickTolerance||1,this._moveFunction=i.move,this._activateOnStart=!!i.activateOnStart,i.assignEvents(this),this.reset()}reset(i){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(i)}_move(...i){const a=this._moveFunction(...i);if(a.bearingDelta||a.pitchDelta||a.around||a.panDelta)return this._active=!0,a}dragStart(i,a){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(i)&&(this._moveStateManager.startMove(i),this._lastPoint=a.length?a[0]:a,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(i,a){if(!this.isEnabled())return;const d=this._lastPoint;if(!d)return;if(i.preventDefault(),!this._moveStateManager.isValidMoveEvent(i))return void this.reset(i);const p=a.length?a[0]:a;return!this._moved&&p.dist(d){_.mousedown=_.dragStart,_.mousemoveWindow=_.dragMove,_.mouseup=_.dragEnd,_.contextmenu=i=>{i.preventDefault()}},dn=({enable:_,clickTolerance:i,bearingDegreesPerPixelMoved:a=.8})=>{const d=new Il({checkCorrectEvent:p=>z.mouseButton(p)===0&&p.ctrlKey||z.mouseButton(p)===2});return new Ko({clickTolerance:i,move:(p,v)=>({bearingDelta:(v.x-p.x)*a}),moveStateManager:d,enable:_,assignEvents:oo})},Tl=({enable:_,clickTolerance:i,pitchDegreesPerPixelMoved:a=-.5})=>{const d=new Il({checkCorrectEvent:p=>z.mouseButton(p)===0&&p.ctrlKey||z.mouseButton(p)===2});return new Ko({clickTolerance:i,move:(p,v)=>({pitchDelta:(v.y-p.y)*a}),moveStateManager:d,enable:_,assignEvents:oo})};class Xc{constructor(i,a){this._clickTolerance=i.clickTolerance||1,this._map=a,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new c.P(0,0)}minTouchs(){return this._map.cooperativeGestures.isEnabled()?2:1}touchstart(i,a,d){return this._calculateTransform(i,a,d)}touchmove(i,a,d){if(this._active&&!(d.length0&&(this._active=!0);const p=ba(d,a),v=new c.P(0,0),w=new c.P(0,0);let S=0;for(const P in p){const O=p[P],R=this._touches[P];R&&(v._add(O),w._add(O.sub(R)),S++,p[P]=O)}if(this._touches=p,SMath.abs(_.x)}class Yc extends Cl{constructor(i){super(),this._currentTouchCount=0,this._map=i}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(i,a,d){super.touchstart(i,a,d),this._currentTouchCount=d.length}_start(i){this._lastPoints=i,Ml(i[0].sub(i[1]))&&(this._valid=!1)}_move(i,a,d){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const p=i[0].sub(this._lastPoints[0]),v=i[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(p,v,d.timeStamp),this._valid?(this._lastPoints=i,this._active=!0,{pitchDelta:(p.y+v.y)/2*-.5}):void 0}gestureBeginsVertically(i,a,d){if(this._valid!==void 0)return this._valid;const p=i.mag()>=2,v=a.mag()>=2;if(!p&&!v)return;if(!p||!v)return this._firstMove===void 0&&(this._firstMove=d),d-this._firstMove<100&&void 0;const w=i.y>0==a.y>0;return Ml(i)&&Ml(a)&&w}}const Nh={panStep:100,bearingStep:15,pitchStep:10};class vo{constructor(i){this._tr=new Es(i);const a=Nh;this._panStep=a.panStep,this._bearingStep=a.bearingStep,this._pitchStep=a.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(i){if(i.altKey||i.ctrlKey||i.metaKey)return;let a=0,d=0,p=0,v=0,w=0;switch(i.keyCode){case 61:case 107:case 171:case 187:a=1;break;case 189:case 109:case 173:a=-1;break;case 37:i.shiftKey?d=-1:(i.preventDefault(),v=-1);break;case 39:i.shiftKey?d=1:(i.preventDefault(),v=1);break;case 38:i.shiftKey?p=1:(i.preventDefault(),w=-1);break;case 40:i.shiftKey?p=-1:(i.preventDefault(),w=1);break;default:return}return this._rotationDisabled&&(d=0,p=0),{cameraAnimation:S=>{const T=this._tr;S.easeTo({duration:300,easeId:"keyboardHandler",easing:jh,zoom:a?Math.round(T.zoom)+a*(i.shiftKey?2:1):T.zoom,bearing:T.bearing+d*this._bearingStep,pitch:T.pitch+p*this._pitchStep,offset:[-v*this._panStep,-w*this._panStep],center:T.center},{originalEvent:i})}}}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 jh(_){return _*(2-_)}const Qc=4.000244140625;class eu{constructor(i,a){this._onTimeout=d=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(d)},this._map=i,this._tr=new Es(i),this._triggerRenderFrame=a,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(i){this._defaultZoomRate=i}setWheelZoomRate(i){this._wheelZoomRate=i}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(i){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!i&&i.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(i){if(!this.isEnabled()||this._map.cooperativeGestures.isEnabled()&&!i[this._map.cooperativeGestures._bypassKey])return;let a=i.deltaMode===WheelEvent.DOM_DELTA_LINE?40*i.deltaY:i.deltaY;const d=A.now(),p=d-(this._lastWheelEventTime||0);this._lastWheelEventTime=d,a!==0&&a%Qc==0?this._type="wheel":a!==0&&Math.abs(a)<4?this._type="trackpad":p>400?(this._type=null,this._lastValue=a,this._timeout=setTimeout(this._onTimeout,40,i)):this._type||(this._type=Math.abs(p*a)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,a+=this._lastValue)),i.shiftKey&&a&&(a/=4),this._type&&(this._lastWheelEvent=i,this._delta-=a,this._active||this._start(i)),i.preventDefault()}_start(i){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 a=z.mousePos(this._map.getCanvas(),i),d=this._tr;this._around=a.y>d.transform.height/2-d.transform.getHorizon()?c.M.convert(this._aroundCenter?d.center:d.unproject(a)):c.M.convert(d.center),this._aroundPoint=d.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const i=this._tr.transform;if(this._delta!==0){const S=this._type==="wheel"&&Math.abs(this._delta)>Qc?this._wheelZoomRate:this._defaultZoomRate;let T=2/(1+Math.exp(-Math.abs(this._delta*S)));this._delta<0&&T!==0&&(T=1/T);const P=typeof this._targetZoom=="number"?i.zoomScale(this._targetZoom):i.scale;this._targetZoom=Math.min(i.maxZoom,Math.max(i.minZoom,i.scaleZoom(P*T))),this._type==="wheel"&&(this._startZoom=i.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const a=typeof this._targetZoom=="number"?this._targetZoom:i.zoom,d=this._startZoom,p=this._easing;let v,w=!1;if(this._type==="wheel"&&d&&p){const S=Math.min((A.now()-this._lastWheelEventTime)/200,1),T=p(S);v=c.z.number(d,a,T),S<1?this._frameId||(this._frameId=!0):w=!0}else v=a,w=!0;return this._active=!0,w&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!w,zoomDelta:v-i.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(i){let a=c.b8;if(this._prevEase){const d=this._prevEase,p=(A.now()-d.start)/d.duration,v=d.easing(p+.01)-d.easing(p),w=.27/Math.sqrt(v*v+1e-4)*.01,S=Math.sqrt(.0729-w*w);a=c.b7(w,S,.25,1)}return this._prevEase={start:A.now(),duration:i,easing:a},a}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class tu{constructor(i,a){this._clickZoom=i,this._tapZoom=a}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 $h{constructor(i){this._tr=new Es(i),this.reset()}reset(){this._active=!1}dblclick(i,a){return i.preventDefault(),{cameraAnimation:d=>{d.easeTo({duration:300,zoom:this._tr.zoom+(i.shiftKey?-1:1),around:this._tr.unproject(a)},{originalEvent:i})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Uh{constructor(){this._tap=new El({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(i,a,d){if(!this._swipePoint)if(this._tapTime){const p=a[0],v=i.timeStamp-this._tapTime<500,w=this._tapPoint.dist(p)<30;v&&w?d.length>0&&(this._swipePoint=p,this._swipeTouch=d[0].identifier):this.reset()}else this._tap.touchstart(i,a,d)}touchmove(i,a,d){if(this._tapTime){if(this._swipePoint){if(d[0].identifier!==this._swipeTouch)return;const p=a[0],v=p.y-this._swipePoint.y;return this._swipePoint=p,i.preventDefault(),this._active=!0,{zoomDelta:v/128}}}else this._tap.touchmove(i,a,d)}touchend(i,a,d){if(this._tapTime)this._swipePoint&&d.length===0&&this.reset();else{const p=this._tap.touchend(i,a,d);p&&(this._tapTime=i.timeStamp,this._tapPoint=p)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class iu{constructor(i,a,d){this._el=i,this._mousePan=a,this._touchPan=d}enable(i){this._inertiaOptions=i||{},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 Is{constructor(i,a,d){this._pitchWithRotate=i.pitchWithRotate,this._mouseRotate=a,this._mousePitch=d}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 ru{constructor(i,a,d,p){this._el=i,this._touchZoom=a,this._touchRotate=d,this._tapDragZoom=p,this._rotationDisabled=!1,this._enabled=!0}enable(i){this._touchZoom.enable(i),this._rotationDisabled||this._touchRotate.enable(i),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 vn{constructor(i,a){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=i,this._options=a,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const i=this._map.getCanvasContainer();i.classList.add("maplibregl-cooperative-gestures"),this._container=z.create("div","maplibregl-cooperative-gesture-screen",i);let a=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(a=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const d=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),p=document.createElement("div");p.className="maplibregl-desktop-message",p.textContent=a,this._container.appendChild(p);const v=document.createElement("div");v.className="maplibregl-mobile-message",v.textContent=d,this._container.appendChild(v),this._container.setAttribute("aria-hidden","true")}_destoryUI(){this._container&&(z.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._destoryUI()}isEnabled(){return this._enabled}touchmove(i){this._onCooperativeGesture(i.touches.length===1)}wheel(i){this._map.scrollZoom.isEnabled()&&this._onCooperativeGesture(!i[this._bypassKey])}_onCooperativeGesture(i){this._enabled&&i&&(this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const fn=_=>_.zoom||_.drag||_.pitch||_.rotate;class qh extends c.k{}function xn(_){return _.panDelta&&_.panDelta.mag()||_.zoomDelta||_.bearingDelta||_.pitchDelta}class wa{constructor(i,a){this.handleWindowEvent=p=>{this.handleEvent(p,`${p.type}Window`)},this.handleEvent=(p,v)=>{if(p.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const w=p.type==="renderFrame"?void 0:p,S={needsRenderFrame:!1},T={},P={},O=p.touches,R=O?this._getMapTouches(O):void 0,j=R?z.touchPos(this._map.getCanvas(),R):z.mousePos(this._map.getCanvas(),p);for(const{handlerName:ne,handler:Y,allowed:le}of this._handlers){if(!Y.isEnabled())continue;let me;this._blockedByActive(P,le,ne)?Y.reset():Y[v||p.type]&&(me=Y[v||p.type](p,j,R),this.mergeHandlerResult(S,T,me,ne,w),me&&me.needsRenderFrame&&this._triggerRenderFrame()),(me||Y.isActive())&&(P[ne]=Y)}const H={};for(const ne in this._previousActiveHandlers)P[ne]||(H[ne]=w);this._previousActiveHandlers=P,(Object.keys(H).length||xn(S))&&(this._changes.push([S,T,H]),this._triggerRenderFrame()),(Object.keys(P).length||xn(S))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:X}=S;X&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],X(this._map))},this._map=i,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Zc(i),this._bearingSnap=a.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(a);const d=this._el;this._listeners=[[d,"touchstart",{passive:!0}],[d,"touchmove",{passive:!1}],[d,"touchend",void 0],[d,"touchcancel",void 0],[d,"mousedown",void 0],[d,"mousemove",void 0],[d,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[d,"mouseover",void 0],[d,"mouseout",void 0],[d,"dblclick",void 0],[d,"click",void 0],[d,"keydown",{capture:!1}],[d,"keyup",void 0],[d,"wheel",{passive:!1}],[d,"contextmenu",void 0],[window,"blur",void 0]];for(const[p,v,w]of this._listeners)z.addEventListener(p,v,p===document?this.handleWindowEvent:this.handleEvent,w)}destroy(){for(const[i,a,d]of this._listeners)z.removeEventListener(i,a,i===document?this.handleWindowEvent:this.handleEvent,d)}_addDefaultHandlers(i){const a=this._map,d=a.getCanvasContainer();this._add("mapEvent",new Wc(a,i));const p=a.boxZoom=new xa(a,i);this._add("boxZoom",p),i.interactive&&i.boxZoom&&p.enable();const v=a.cooperativeGestures=new vn(a,i.cooperativeGestures);this._add("cooperativeGestures",v),i.cooperativeGestures&&v.enable();const w=new Sl(a),S=new $h(a);a.doubleClickZoom=new tu(S,w),this._add("tapZoom",w),this._add("clickZoom",S),i.interactive&&i.doubleClickZoom&&a.doubleClickZoom.enable();const T=new Uh;this._add("tapDragZoom",T);const P=a.touchPitch=new Yc(a);this._add("touchPitch",P),i.interactive&&i.touchPitch&&a.touchPitch.enable(i.touchPitch);const O=dn(i),R=Tl(i);a.dragRotate=new Is(i,O,R),this._add("mouseRotate",O,["mousePitch"]),this._add("mousePitch",R,["mouseRotate"]),i.interactive&&i.dragRotate&&a.dragRotate.enable();const j=(({enable:me,clickTolerance:ie})=>{const ve=new Il({checkCorrectEvent:Te=>z.mouseButton(Te)===0&&!Te.ctrlKey});return new Ko({clickTolerance:ie,move:(Te,Pe)=>({around:Pe,panDelta:Pe.sub(Te)}),activateOnStart:!0,moveStateManager:ve,enable:me,assignEvents:oo})})(i),H=new Xc(i,a);a.dragPan=new iu(d,j,H),this._add("mousePan",j),this._add("touchPan",H,["touchZoom","touchRotate"]),i.interactive&&i.dragPan&&a.dragPan.enable(i.dragPan);const X=new Jc,ne=new Al;a.touchZoomRotate=new ru(d,ne,X,T),this._add("touchRotate",X,["touchPan","touchZoom"]),this._add("touchZoom",ne,["touchPan","touchRotate"]),i.interactive&&i.touchZoomRotate&&a.touchZoomRotate.enable(i.touchZoomRotate);const Y=a.scrollZoom=new eu(a,()=>this._triggerRenderFrame());this._add("scrollZoom",Y,["mousePan"]),i.interactive&&i.scrollZoom&&a.scrollZoom.enable(i.scrollZoom);const le=a.keyboard=new vo(a);this._add("keyboard",le),i.interactive&&i.keyboard&&a.keyboard.enable(),this._add("blockableMapEvent",new op(a))}_add(i,a,d){this._handlers.push({handlerName:i,handler:a,allowed:d}),this._handlersById[i]=a}stop(i){if(!this._updatingCamera){for(const{handler:a}of this._handlers)a.reset();this._inertia.clear(),this._fireEvents({},{},i),this._changes=[]}}isActive(){for(const{handler:i}of this._handlers)if(i.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!fn(this._eventsInProgress)||this.isZooming()}_blockedByActive(i,a,d){for(const p in i)if(p!==d&&(!a||a.indexOf(p)<0))return!0;return!1}_getMapTouches(i){const a=[];for(const d of i)this._el.contains(d.target)&&a.push(d);return a}mergeHandlerResult(i,a,d,p,v){if(!d)return;c.e(i,d);const w={handlerName:p,originalEvent:d.originalEvent||v};d.zoomDelta!==void 0&&(a.zoom=w),d.panDelta!==void 0&&(a.drag=w),d.pitchDelta!==void 0&&(a.pitch=w),d.bearingDelta!==void 0&&(a.rotate=w)}_applyChanges(){const i={},a={},d={};for(const[p,v,w]of this._changes)p.panDelta&&(i.panDelta=(i.panDelta||new c.P(0,0))._add(p.panDelta)),p.zoomDelta&&(i.zoomDelta=(i.zoomDelta||0)+p.zoomDelta),p.bearingDelta&&(i.bearingDelta=(i.bearingDelta||0)+p.bearingDelta),p.pitchDelta&&(i.pitchDelta=(i.pitchDelta||0)+p.pitchDelta),p.around!==void 0&&(i.around=p.around),p.pinchAround!==void 0&&(i.pinchAround=p.pinchAround),p.noInertia&&(i.noInertia=p.noInertia),c.e(a,v),c.e(d,w);this._updateMapTransform(i,a,d),this._changes=[]}_updateMapTransform(i,a,d){const p=this._map,v=p._getTransformForUpdate(),w=p.terrain;if(!(xn(i)||w&&this._terrainMovement))return this._fireEvents(a,d,!0);let{panDelta:S,zoomDelta:T,bearingDelta:P,pitchDelta:O,around:R,pinchAround:j}=i;j!==void 0&&(R=j),p._stop(!0),R=R||p.transform.centerPoint;const H=v.pointLocation(S?R.sub(S):R);P&&(v.bearing+=P),O&&(v.pitch+=O),T&&(v.zoom+=T),w?this._terrainMovement||!a.drag&&!a.zoom?a.drag&&this._terrainMovement?v.center=v.pointLocation(v.centerPoint.sub(S)):v.setLocationAtPoint(H,R):(this._terrainMovement=!0,this._map._elevationFreeze=!0,v.setLocationAtPoint(H,R)):v.setLocationAtPoint(H,R),p._applyUpdatedTransform(v),this._map._update(),i.noInertia||this._inertia.record(i),this._fireEvents(a,d,!0)}_fireEvents(i,a,d){const p=fn(this._eventsInProgress),v=fn(i),w={};for(const R in i){const{originalEvent:j}=i[R];this._eventsInProgress[R]||(w[`${R}start`]=j),this._eventsInProgress[R]=i[R]}!p&&v&&this._fireEvent("movestart",v.originalEvent);for(const R in w)this._fireEvent(R,w[R]);v&&this._fireEvent("move",v.originalEvent);for(const R in i){const{originalEvent:j}=i[R];this._fireEvent(R,j)}const S={};let T;for(const R in this._eventsInProgress){const{handlerName:j,originalEvent:H}=this._eventsInProgress[R];this._handlersById[j].isActive()||(delete this._eventsInProgress[R],T=a[j]||H,S[`${R}end`]=T)}for(const R in S)this._fireEvent(R,S[R]);const P=fn(this._eventsInProgress),O=(p||v)&&!P;if(O&&this._terrainMovement&&(this._map._elevationFreeze=!1,this._terrainMovement=!1,this._map.transform.recalculateZoom(this._map.terrain)),d&&O){this._updatingCamera=!0;const R=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),j=H=>H!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new qh("renderFrame",{timeStamp:i})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ap extends c.E{constructor(i,a){super(),this._renderFrameCallback=()=>{const d=Math.min((A.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(d)),d<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=i,this._bearingSnap=a.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new c.M(this.transform.center.lng,this.transform.center.lat)}setCenter(i,a){return this.jumpTo({center:i},a)}panBy(i,a,d){return i=c.P.convert(i).mult(-1),this.panTo(this.transform.center,c.e({offset:i},a),d)}panTo(i,a,d){return this.easeTo(c.e({center:i},a),d)}getZoom(){return this.transform.zoom}setZoom(i,a){return this.jumpTo({zoom:i},a),this}zoomTo(i,a,d){return this.easeTo(c.e({zoom:i},a),d)}zoomIn(i,a){return this.zoomTo(this.getZoom()+1,i,a),this}zoomOut(i,a){return this.zoomTo(this.getZoom()-1,i,a),this}getBearing(){return this.transform.bearing}setBearing(i,a){return this.jumpTo({bearing:i},a),this}getPadding(){return this.transform.padding}setPadding(i,a){return this.jumpTo({padding:i},a),this}rotateTo(i,a,d){return this.easeTo(c.e({bearing:i},a),d)}resetNorth(i,a){return this.rotateTo(0,c.e({duration:1e3},i),a),this}resetNorthPitch(i,a){return this.easeTo(c.e({bearing:0,pitch:0,duration:1e3},i),a),this}snapToNorth(i,a){return Math.abs(this.getBearing()){if(this._zooming&&(p.zoom=c.z.number(v,Y,Ve)),this._rotating&&(p.bearing=c.z.number(w,P,Ve)),this._pitching&&(p.pitch=c.z.number(S,O,Ve)),this._padding&&(p.interpolatePadding(T,R,Ve),H=p.centerPoint.add(j)),this.terrain&&!i.freezeElevation&&this._updateElevation(Ve),ve)p.setLocationAtPoint(ve,Te);else{const Ke=p.zoomScale(p.zoom-v),ut=Y>v?Math.min(2,ie):Math.max(.5,ie),ht=Math.pow(ut,1-Ve),Je=p.unproject(le.add(me.mult(Ve*ht)).mult(Ke));p.setLocationAtPoint(p.renderWorldCopies?Je.wrap():Je,H)}this._applyUpdatedTransform(p),this._fireMoveEvents(a)},Ve=>{this.terrain&&i.freezeElevation&&this._finalizeElevation(),this._afterEase(a,Ve)},i),this}_prepareEase(i,a,d={}){this._moving=!0,a||d.moving||this.fire(new c.k("movestart",i)),this._zooming&&!d.zooming&&this.fire(new c.k("zoomstart",i)),this._rotating&&!d.rotating&&this.fire(new c.k("rotatestart",i)),this._pitching&&!d.pitching&&this.fire(new c.k("pitchstart",i))}_prepareElevation(i){this._elevationCenter=i,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(i,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(i){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const a=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(i<1&&a!==this._elevationTarget){const d=this._elevationTarget-this._elevationStart;this._elevationStart+=i*(d-(a-(d*i+this._elevationStart))/(1-i)),this._elevationTarget=a}this.transform.elevation=c.z.number(this._elevationStart,this._elevationTarget,i)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_applyUpdatedTransform(i){if(!this.transformCameraUpdate)return;const a=i.clone(),{center:d,zoom:p,pitch:v,bearing:w,elevation:S}=this.transformCameraUpdate(a);d&&(a.center=d),p!==void 0&&(a.zoom=p),v!==void 0&&(a.pitch=v),w!==void 0&&(a.bearing=w),S!==void 0&&(a.elevation=S),this.transform.apply(a)}_fireMoveEvents(i){this.fire(new c.k("move",i)),this._zooming&&this.fire(new c.k("zoom",i)),this._rotating&&this.fire(new c.k("rotate",i)),this._pitching&&this.fire(new c.k("pitch",i))}_afterEase(i,a){if(this._easeId&&a&&this._easeId===a)return;delete this._easeId;const d=this._zooming,p=this._rotating,v=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,d&&this.fire(new c.k("zoomend",i)),p&&this.fire(new c.k("rotateend",i)),v&&this.fire(new c.k("pitchend",i)),this.fire(new c.k("moveend",i))}flyTo(i,a){var d;if(!i.essential&&A.prefersReducedMotion){const at=c.L(i,["center","zoom","bearing","pitch","around"]);return this.jumpTo(at,a)}this.stop(),i=c.e({offset:[0,0],speed:1.2,curve:1.42,easing:c.b8},i);const p=this._getTransformForUpdate(),v=this.getZoom(),w=this.getBearing(),S=this.getPitch(),T=this.getPadding(),P="bearing"in i?this._normalizeBearing(i.bearing,w):w,O="pitch"in i?+i.pitch:S,R="padding"in i?i.padding:p.padding,j=c.P.convert(i.offset);let H=p.centerPoint.add(j);const X=p.pointLocation(H),{center:ne,zoom:Y}=p.getConstrained(c.M.convert(i.center||X),(d=i.zoom)!==null&&d!==void 0?d:v);this._normalizeCenter(ne);const le=p.zoomScale(Y-v),me=p.project(X),ie=p.project(ne).sub(me);let ve=i.curve;const Te=Math.max(p.width,p.height),Pe=Te/le,Ve=ie.mag();if("minZoom"in i){const at=c.ac(Math.min(i.minZoom,v,Y),p.minZoom,p.maxZoom),kt=Te/p.zoomScale(at-v);ve=Math.sqrt(kt/Ve*2)}const Ke=ve*ve;function ut(at){const kt=(Pe*Pe-Te*Te+(at?-1:1)*Ke*Ke*Ve*Ve)/(2*(at?Pe:Te)*Ke*Ve);return Math.log(Math.sqrt(kt*kt+1)-kt)}function ht(at){return(Math.exp(at)-Math.exp(-at))/2}function Je(at){return(Math.exp(at)+Math.exp(-at))/2}const et=ut(!1);let yt=function(at){return Je(et)/Je(et+ve*at)},Rt=function(at){return Te*((Je(et)*(ht(kt=et+ve*at)/Je(kt))-ht(et))/Ke)/Ve;var kt},it=(ut(!0)-et)/ve;if(Math.abs(Ve)<1e-6||!isFinite(it)){if(Math.abs(Te-Pe)<1e-6)return this.easeTo(i,a);const at=Pe0,yt=kt=>Math.exp(at*ve*kt)}return i.duration="duration"in i?+i.duration:1e3*it/("screenSpeed"in i?+i.screenSpeed/ve:+i.speed),i.maxDuration&&i.duration>i.maxDuration&&(i.duration=0),this._zooming=!0,this._rotating=w!==P,this._pitching=O!==S,this._padding=!p.isPaddingEqual(R),this._prepareEase(a,!1),this.terrain&&this._prepareElevation(ne),this._ease(at=>{const kt=at*it,Ii=1/yt(kt);p.zoom=at===1?Y:v+p.scaleZoom(Ii),this._rotating&&(p.bearing=c.z.number(w,P,at)),this._pitching&&(p.pitch=c.z.number(S,O,at)),this._padding&&(p.interpolatePadding(T,R,at),H=p.centerPoint.add(j)),this.terrain&&!i.freezeElevation&&this._updateElevation(at);const Zt=at===1?ne:p.unproject(me.add(ie.mult(Rt(kt))).mult(Ii));p.setLocationAtPoint(p.renderWorldCopies?Zt.wrap():Zt,H),this._applyUpdatedTransform(p),this._fireMoveEvents(a)},()=>{this.terrain&&i.freezeElevation&&this._finalizeElevation(),this._afterEase(a)},i),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(i,a){var d;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const p=this._onEaseEnd;delete this._onEaseEnd,p.call(this,a)}return i||(d=this.handlers)===null||d===void 0||d.stop(!1),this}_ease(i,a,d){d.animate===!1||d.duration===0?(i(1),a()):(this._easeStart=A.now(),this._easeOptions=d,this._onEaseFrame=i,this._onEaseEnd=a,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(i,a){i=c.b2(i,-180,180);const d=Math.abs(i-a);return Math.abs(i-360-a)180?-360:d<-180?360:0}queryTerrainElevation(i){return this.terrain?this.terrain.getElevationForLngLatZoom(c.M.convert(i),this.transform.tileZoom)-this.transform.elevation:null}}const Hh={compact:!0,customAttribution:'MapLibre'};class Gh{constructor(i=Hh){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=a=>{!a||a.sourceDataType!=="metadata"&&a.sourceDataType!=="visibility"&&a.dataType!=="style"&&a.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=i}getDefaultPosition(){return"bottom-right"}onAdd(i){return this._map=i,this._compact=this.options.compact,this._container=z.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=z.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=z.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(){z.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(i,a){const d=this._map._getUIString(`AttributionControl.${a}`);i.title=d,i.setAttribute("aria-label",d)}_updateAttributions(){if(!this._map.style)return;let i=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?i=i.concat(this.options.customAttribution.map(p=>typeof p!="string"?"":p)):typeof this.options.customAttribution=="string"&&i.push(this.options.customAttribution)),this._map.style.stylesheet){const p=this._map.style.stylesheet;this.styleOwner=p.owner,this.styleId=p.id}const a=this._map.style.sourceCaches;for(const p in a){const v=a[p];if(v.used||v.usedForTerrain){const w=v.getSource();w.attribution&&i.indexOf(w.attribution)<0&&i.push(w.attribution)}}i=i.filter(p=>String(p).trim()),i.sort((p,v)=>p.length-v.length),i=i.filter((p,v)=>{for(let w=v+1;w=0)return!1;return!0});const d=i.join(" | ");d!==this._attribHTML&&(this._attribHTML=d,i.length?(this._innerContainer.innerHTML=d,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class nu{constructor(i={}){this._updateCompact=()=>{const a=this._container.children;if(a.length){const d=a[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&d.classList.add("maplibregl-compact"):d.classList.remove("maplibregl-compact")}},this.options=i}getDefaultPosition(){return"bottom-left"}onAdd(i){this._map=i,this._compact=this.options&&this.options.compact,this._container=z.create("div","maplibregl-ctrl");const a=z.create("a","maplibregl-ctrl-logo");return a.target="_blank",a.rel="noopener nofollow",a.href="https://maplibre.org/",a.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),a.setAttribute("rel","noopener nofollow"),this._container.appendChild(a),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){z.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ea{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(i){const a=++this._id;return this._queue.push({callback:i,id:a,cancelled:!1}),a}remove(i){const a=this._currentlyRunning,d=a?this._queue.concat(a):this._queue;for(const p of d)if(p.id===i)return void(p.cancelled=!0)}run(i=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const a=this._currentlyRunning=this._queue;this._queue=[];for(const d of a)if(!d.cancelled&&(d.callback(i),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var xo=c.X([{name:"a_pos3d",type:"Int16",components:3}]);class mt extends c.E{constructor(i){super(),this.sourceCache=i,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,i.usedForTerrain=!0,i.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(i,a){this.sourceCache.update(i,a),this._renderableTilesKeys=[];const d={};for(const p of i.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:a}))d[p.key]=!0,this._renderableTilesKeys.push(p.key),this._tiles[p.key]||(p.posMatrix=new Float64Array(16),c.aO(p.posMatrix,0,c.W,0,c.W,0,1),this._tiles[p.key]=new si(p,this.tileSize));for(const p in this._tiles)d[p]||delete this._tiles[p]}freeRtt(i){for(const a in this._tiles){const d=this._tiles[a];(!i||d.tileID.equals(i)||d.tileID.isChildOf(i)||i.isChildOf(d.tileID))&&(d.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(i=>this.getTileByID(i))}getTileByID(i){return this._tiles[i]}getTerrainCoords(i){const a={};for(const d of this._renderableTilesKeys){const p=this._tiles[d].tileID;if(p.canonical.equals(i.canonical)){const v=i.clone();v.posMatrix=new Float64Array(16),c.aO(v.posMatrix,0,c.W,0,c.W,0,1),a[d]=v}else if(p.canonical.isChildOf(i.canonical)){const v=i.clone();v.posMatrix=new Float64Array(16);const w=p.canonical.z-i.canonical.z,S=p.canonical.x-(p.canonical.x>>w<>w<>w;c.aO(v.posMatrix,0,P,0,P,0,1),c.H(v.posMatrix,v.posMatrix,[-S*P,-T*P,0]),a[d]=v}else if(i.canonical.isChildOf(p.canonical)){const v=i.clone();v.posMatrix=new Float64Array(16);const w=i.canonical.z-p.canonical.z,S=i.canonical.x-(i.canonical.x>>w<>w<>w;c.aO(v.posMatrix,0,c.W,0,c.W,0,1),c.H(v.posMatrix,v.posMatrix,[S*P,T*P,0]),c.J(v.posMatrix,v.posMatrix,[1/2**w,1/2**w,0]),a[d]=v}}return a}getSourceTile(i,a){const d=this.sourceCache._source;let p=i.overscaledZ-this.deltaZoom;if(p>d.maxzoom&&(p=d.maxzoom),p=d.minzoom&&(!v||!v.dem);)v=this.sourceCache.getTileByID(i.scaledTo(p--).key);return v}tilesAfterTime(i=Date.now()){return Object.values(this._tiles).filter(a=>a.timeAdded>=i)}}class Zh{constructor(i,a,d){this.painter=i,this.sourceCache=new mt(a),this.options=d,this.exaggeration=typeof d.exaggeration=="number"?d.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(i,a,d,p=c.W){var v;if(!(a>=0&&a=0&&di.canonical.z&&(i.canonical.z>=p?v=i.canonical.z-p:c.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const w=i.canonical.x-(i.canonical.x>>v<>v<>8<<4|v>>8,a[w+3]=0;const d=new c.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(a.buffer)),p=new Ie(i,d,i.gl.RGBA,{premultiply:!1});return p.bind(i.gl.NEAREST,i.gl.CLAMP_TO_EDGE),this._coordsTexture=p,p}pointCoordinate(i){this.painter.maybeDrawDepthAndCoords(!0);const a=new Uint8Array(4),d=this.painter.context,p=d.gl,v=Math.round(i.x*this.painter.pixelRatio/devicePixelRatio),w=Math.round(i.y*this.painter.pixelRatio/devicePixelRatio),S=Math.round(this.painter.height/devicePixelRatio);d.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),p.readPixels(v,S-w-1,1,1,p.RGBA,p.UNSIGNED_BYTE,a),d.bindFramebuffer.set(null);const T=a[0]+(a[2]>>4<<8),P=a[1]+((15&a[2])<<8),O=this.coordsIndex[255-a[3]],R=O&&this.sourceCache.getTileByID(O);if(!R)return null;const j=this._coordsTextureSize,H=(1<i.id!==a),this._recentlyUsed.push(i.id)}stampObject(i){i.stamp=++this._stamp}getOrCreateFreeObject(){for(const a of this._recentlyUsed)if(!this._objects[a].inUse)return this._objects[a];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const i=this._createObject(this._objects.length);return this._objects.push(i),i}freeObject(i){i.inUse=!1}freeAllObjects(){for(const i of this._objects)this.freeObject(i)}isFull(){return!(this._objects.length!i.inUse)===!1}}const jn={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Wh{constructor(i,a){this.painter=i,this.terrain=a,this.pool=new Sa(i.context,30,a.sourceCache.tileSize*a.qualityFactor)}destruct(){this.pool.destruct()}getTexture(i){return this.pool.getObjectForId(i.rtt[this._stacks.length-1].id).texture}prepareForRender(i,a){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=i._order.filter(d=>!i._layers[d].isHidden(a)),this._coordsDescendingInv={};for(const d in i.sourceCaches){this._coordsDescendingInv[d]={};const p=i.sourceCaches[d].getVisibleCoordinates();for(const v of p){const w=this.terrain.sourceCache.getTerrainCoords(v);for(const S in w)this._coordsDescendingInv[d][S]||(this._coordsDescendingInv[d][S]=[]),this._coordsDescendingInv[d][S].push(w[S])}}this._coordsDescendingInvStr={};for(const d of i._order){const p=i._layers[d],v=p.source;if(jn[p.type]&&!this._coordsDescendingInvStr[v]){this._coordsDescendingInvStr[v]={};for(const w in this._coordsDescendingInv[v])this._coordsDescendingInvStr[v][w]=this._coordsDescendingInv[v][w].map(S=>S.key).sort().join()}}for(const d of this._renderableTiles)for(const p in this._coordsDescendingInvStr){const v=this._coordsDescendingInvStr[p][d.tileID.key];v&&v!==d.rttCoords[p]&&(d.rtt=[])}}renderLayer(i){if(i.isHidden(this.painter.transform.zoom))return!1;const a=i.type,d=this.painter,p=this._renderableLayerIds[this._renderableLayerIds.length-1]===i.id;if(jn[a]&&(this._prevType&&jn[this._prevType]||this._stacks.push([]),this._prevType=a,this._stacks[this._stacks.length-1].push(i.id),!p))return!0;if(jn[this._prevType]||jn[a]&&p){this._prevType=a;const v=this._stacks.length-1,w=this._stacks[v]||[];for(const S of this._renderableTiles){if(this.pool.isFull()&&(_l(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(S),S.rtt[v]){const P=this.pool.getObjectForId(S.rtt[v].id);if(P.stamp===S.rtt[v].stamp){this.pool.useObject(P);continue}}const T=this.pool.getOrCreateFreeObject();this.pool.useObject(T),this.pool.stampObject(T),S.rtt[v]={id:T.id,stamp:T.stamp},d.context.bindFramebuffer.set(T.fbo.framebuffer),d.context.clear({color:c.aP.transparent,stencil:0}),d.currentStencilSource=void 0;for(let P=0;P{_.touchstart=_.dragStart,_.touchmoveWindow=_.dragMove,_.touchend=_.dragEnd},su={showCompass:!0,showZoom:!0,visualizePitch:!1};class Kh{constructor(i,a,d=!1){this.mousedown=w=>{this.startMouse(c.e({},w,{ctrlKey:!0,preventDefault:()=>w.preventDefault()}),z.mousePos(this.element,w)),z.addEventListener(window,"mousemove",this.mousemove),z.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=w=>{this.moveMouse(w,z.mousePos(this.element,w))},this.mouseup=w=>{this.mouseRotate.dragEnd(w),this.mousePitch&&this.mousePitch.dragEnd(w),this.offTemp()},this.touchstart=w=>{w.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=z.touchPos(this.element,w.targetTouches)[0],this.startTouch(w,this._startPos),z.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),z.addEventListener(window,"touchend",this.touchend))},this.touchmove=w=>{w.targetTouches.length!==1?this.reset():(this._lastPos=z.touchPos(this.element,w.targetTouches)[0],this.moveTouch(w,this._lastPos))},this.touchend=w=>{w.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){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 p=i.dragRotate._mouseRotate.getClickTolerance(),v=i.dragRotate._mousePitch.getClickTolerance();this.element=a,this.mouseRotate=dn({clickTolerance:p,enable:!0}),this.touchRotate=(({enable:w,clickTolerance:S,bearingDegreesPerPixelMoved:T=.8})=>{const P=new Vi;return new Ko({clickTolerance:S,move:(O,R)=>({bearingDelta:(R.x-O.x)*T}),moveStateManager:P,enable:w,assignEvents:Xh})})({clickTolerance:p,enable:!0}),this.map=i,d&&(this.mousePitch=Tl({clickTolerance:v,enable:!0}),this.touchPitch=(({enable:w,clickTolerance:S,pitchDegreesPerPixelMoved:T=-.5})=>{const P=new Vi;return new Ko({clickTolerance:S,move:(O,R)=>({pitchDelta:(R.y-O.y)*T}),moveStateManager:P,enable:w,assignEvents:Xh})})({clickTolerance:v,enable:!0})),z.addEventListener(a,"mousedown",this.mousedown),z.addEventListener(a,"touchstart",this.touchstart,{passive:!1}),z.addEventListener(a,"touchcancel",this.reset)}startMouse(i,a){this.mouseRotate.dragStart(i,a),this.mousePitch&&this.mousePitch.dragStart(i,a),z.disableDrag()}startTouch(i,a){this.touchRotate.dragStart(i,a),this.touchPitch&&this.touchPitch.dragStart(i,a),z.disableDrag()}moveMouse(i,a){const d=this.map,{bearingDelta:p}=this.mouseRotate.dragMove(i,a)||{};if(p&&d.setBearing(d.getBearing()+p),this.mousePitch){const{pitchDelta:v}=this.mousePitch.dragMove(i,a)||{};v&&d.setPitch(d.getPitch()+v)}}moveTouch(i,a){const d=this.map,{bearingDelta:p}=this.touchRotate.dragMove(i,a)||{};if(p&&d.setBearing(d.getBearing()+p),this.touchPitch){const{pitchDelta:v}=this.touchPitch.dragMove(i,a)||{};v&&d.setPitch(d.getPitch()+v)}}off(){const i=this.element;z.removeEventListener(i,"mousedown",this.mousedown),z.removeEventListener(i,"touchstart",this.touchstart,{passive:!1}),z.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),z.removeEventListener(window,"touchend",this.touchend),z.removeEventListener(i,"touchcancel",this.reset),this.offTemp()}offTemp(){z.enableDrag(),z.removeEventListener(window,"mousemove",this.mousemove),z.removeEventListener(window,"mouseup",this.mouseup),z.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),z.removeEventListener(window,"touchend",this.touchend)}}let bo;function Jh(_,i,a){const d=new c.M(_.lng,_.lat);if(_=new c.M(_.lng,_.lat),i){const p=new c.M(_.lng-360,_.lat),v=new c.M(_.lng+360,_.lat),w=a.locationPoint(_).distSqr(i);a.locationPoint(p).distSqr(i)180;){const p=a.locationPoint(_);if(p.x>=0&&p.y>=0&&p.x<=a.width&&p.y<=a.height)break;_.lng>a.center.lng?_.lng-=360:_.lng+=360}return _.lng!==d.lng&&a.locationPoint(_).y>a.height/2-a.getHorizon()?_:d}const au={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 wo(_,i,a){const d=_.classList;for(const p in au)d.remove(`maplibregl-${a}-anchor-${p}`);d.add(`maplibregl-${a}-anchor-${i}`)}class xi extends c.E{constructor(i){if(super(),this._onKeyPress=a=>{const d=a.code,p=a.charCode||a.keyCode;d!=="Space"&&d!=="Enter"&&p!==32&&p!==13||this.togglePopup()},this._onMapClick=a=>{const d=a.originalEvent.target,p=this._element;this._popup&&(d===p||p.contains(d))&&this.togglePopup()},this._update=a=>{var d;if(!this._map)return;const p=this._map.loaded()&&!this._map.isMoving();((a==null?void 0:a.type)==="terrain"||(a==null?void 0:a.type)==="render"&&!p)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Jh(this._lngLat,this._flatPos,this._map.transform):(d=this._lngLat)===null||d===void 0?void 0:d.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 v="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?v=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(v=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let w="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?w="rotateX(0deg)":this._pitchAlignment==="map"&&(w=`rotateX(${this._map.getPitch()}deg)`),a&&a.type!=="moveend"||(this._pos=this._pos.round()),z.setTransform(this._element,`${au[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${w} ${v}`),A.frameAsync(new AbortController).then(()=>{this._updateOpacity(a&&a.type==="moveend")}).catch(()=>{})},this._onMove=a=>{if(!this._isDragging){const d=this._clickTolerance||this._map._clickTolerance;this._isDragging=a.point.dist(this._pointerdownPos)>=d}this._isDragging&&(this._pos=a.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 c.k("dragstart"))),this.fire(new c.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 c.k("dragend")),this._state="inactive"},this._addDragHandler=a=>{this._element.contains(a.originalEvent.target)&&(a.preventDefault(),this._positionDelta=a.point.sub(this._pos).add(this._offset),this._pointerdownPos=a.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=i&&i.anchor||"center",this._color=i&&i.color||"#3FB1CE",this._scale=i&&i.scale||1,this._draggable=i&&i.draggable||!1,this._clickTolerance=i&&i.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=i&&i.rotation||0,this._rotationAlignment=i&&i.rotationAlignment||"auto",this._pitchAlignment=i&&i.pitchAlignment&&i.pitchAlignment!=="auto"?i.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(i==null?void 0:i.opacity,i==null?void 0:i.opacityWhenCovered),i&&i.element)this._element=i.element,this._offset=c.P.convert(i&&i.offset||[0,0]);else{this._defaultMarker=!0,this._element=z.create("div");const a=z.createNS("http://www.w3.org/2000/svg","svg"),d=41,p=27;a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height",`${d}px`),a.setAttributeNS(null,"width",`${p}px`),a.setAttributeNS(null,"viewBox",`0 0 ${p} ${d}`);const v=z.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"stroke","none"),v.setAttributeNS(null,"stroke-width","1"),v.setAttributeNS(null,"fill","none"),v.setAttributeNS(null,"fill-rule","evenodd");const w=z.createNS("http://www.w3.org/2000/svg","g");w.setAttributeNS(null,"fill-rule","nonzero");const S=z.createNS("http://www.w3.org/2000/svg","g");S.setAttributeNS(null,"transform","translate(3.0, 29.0)"),S.setAttributeNS(null,"fill","#000000");const T=[{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 le of T){const me=z.createNS("http://www.w3.org/2000/svg","ellipse");me.setAttributeNS(null,"opacity","0.04"),me.setAttributeNS(null,"cx","10.5"),me.setAttributeNS(null,"cy","5.80029008"),me.setAttributeNS(null,"rx",le.rx),me.setAttributeNS(null,"ry",le.ry),S.appendChild(me)}const P=z.createNS("http://www.w3.org/2000/svg","g");P.setAttributeNS(null,"fill",this._color);const O=z.createNS("http://www.w3.org/2000/svg","path");O.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),P.appendChild(O);const R=z.createNS("http://www.w3.org/2000/svg","g");R.setAttributeNS(null,"opacity","0.25"),R.setAttributeNS(null,"fill","#000000");const j=z.createNS("http://www.w3.org/2000/svg","path");j.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"),R.appendChild(j);const H=z.createNS("http://www.w3.org/2000/svg","g");H.setAttributeNS(null,"transform","translate(6.0, 7.0)"),H.setAttributeNS(null,"fill","#FFFFFF");const X=z.createNS("http://www.w3.org/2000/svg","g");X.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ne=z.createNS("http://www.w3.org/2000/svg","circle");ne.setAttributeNS(null,"fill","#000000"),ne.setAttributeNS(null,"opacity","0.25"),ne.setAttributeNS(null,"cx","5.5"),ne.setAttributeNS(null,"cy","5.5"),ne.setAttributeNS(null,"r","5.4999962");const Y=z.createNS("http://www.w3.org/2000/svg","circle");Y.setAttributeNS(null,"fill","#FFFFFF"),Y.setAttributeNS(null,"cx","5.5"),Y.setAttributeNS(null,"cy","5.5"),Y.setAttributeNS(null,"r","5.4999962"),X.appendChild(ne),X.appendChild(Y),w.appendChild(S),w.appendChild(P),w.appendChild(R),w.appendChild(H),w.appendChild(X),a.appendChild(w),a.setAttributeNS(null,"height",d*this._scale+"px"),a.setAttributeNS(null,"width",p*this._scale+"px"),this._element.appendChild(a),this._offset=c.P.convert(i&&i.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",a=>{a.preventDefault()}),this._element.addEventListener("mousedown",a=>{a.preventDefault()}),wo(this._element,this._anchor,"marker"),i&&i.className)for(const a of i.className.split(" "))this._element.classList.add(a);this._popup=null}addTo(i){return this.remove(),this._map=i,this._element.setAttribute("aria-label",i._getUIString("Marker.Title")),i.getCanvasContainer().appendChild(this._element),i.on("move",this._update),i.on("moveend",this._update),i.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),z.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(i){return this._lngLat=c.M.convert(i),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(i){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),i){if(!("offset"in i.options)){const p=Math.abs(13.5)/Math.SQRT2;i.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[p,-1*(38.1-13.5+p)],"bottom-right":[-p,-1*(38.1-13.5+p)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=i,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}getPopup(){return this._popup}togglePopup(){const i=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:i?(i.isOpen()?i.remove():(i.setLngLat(this._lngLat),i.addTo(this._map)),this):this}_updateOpacity(i=!1){var a,d;if(!(!((a=this._map)===null||a===void 0)&&a.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(i)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const p=this._map,v=p.terrain.depthAtPoint(this._pos),w=p.terrain.getElevationForLngLatZoom(this._lngLat,p.transform.tileZoom);if(p.transform.lngLatToCameraDepth(this._lngLat,w)-v<.006)return void(this._element.style.opacity=this._opacity);const S=-this._offset.y/p.transform._pixelPerMeter,T=Math.sin(p.getPitch()*Math.PI/180)*S,P=p.terrain.depthAtPoint(new c.P(this._pos.x,this._pos.y-this._offset.y)),O=p.transform.lngLatToCameraDepth(this._lngLat,w+T)-P>.006;!((d=this._popup)===null||d===void 0)&&d.isOpen()&&O&&this._popup.remove(),this._element.style.opacity=O?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(i){return this._offset=c.P.convert(i),this._update(),this}addClassName(i){this._element.classList.add(i)}removeClassName(i){this._element.classList.remove(i)}toggleClassName(i){return this._element.classList.toggle(i)}setDraggable(i){return this._draggable=!!i,this._map&&(i?(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(i){return this._rotation=i||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(i){return this._rotationAlignment=i||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(i){return this._pitchAlignment=i&&i!=="auto"?i:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(i,a){return i===void 0&&a===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),i!==void 0&&(this._opacity=i),a!==void 0&&(this._opacityWhenCovered=a),this._map&&this._updateOpacity(!0),this}}const kl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Ts=0,Cs=!1;const Yh={maxWidth:100,unit:"metric"};function lu(_,i,a){const d=a&&a.maxWidth||100,p=_._container.clientHeight/2,v=_.unproject([0,p]),w=_.unproject([d,p]),S=v.distanceTo(w);if(a&&a.unit==="imperial"){const T=3.2808*S;T>5280?Ia(i,d,T/5280,_._getUIString("ScaleControl.Miles")):Ia(i,d,T,_._getUIString("ScaleControl.Feet"))}else a&&a.unit==="nautical"?Ia(i,d,S/1852,_._getUIString("ScaleControl.NauticalMiles")):S>=1e3?Ia(i,d,S/1e3,_._getUIString("ScaleControl.Kilometers")):Ia(i,d,S,_._getUIString("ScaleControl.Meters"))}function Ia(_,i,a,d){const p=function(v){const w=Math.pow(10,`${Math.floor(v)}`.length-1);let S=v/w;return S=S>=10?10:S>=5?5:S>=3?3:S>=2?2:S>=1?1:function(T){const P=Math.pow(10,Math.ceil(-Math.log(T)/Math.LN10));return Math.round(T*P)/P}(S),w*S}(a);_.style.width=i*(p/a)+"px",_.innerHTML=`${p} ${d}`}const $n={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Ll=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function bt(_){if(_){if(typeof _=="number"){const i=Math.round(Math.abs(_)/Math.SQRT2);return{center:new c.P(0,0),top:new c.P(0,_),"top-left":new c.P(i,i),"top-right":new c.P(-i,i),bottom:new c.P(0,-_),"bottom-left":new c.P(i,-i),"bottom-right":new c.P(-i,-i),left:new c.P(_,0),right:new c.P(-_,0)}}if(_ instanceof c.P||Array.isArray(_)){const i=c.P.convert(_);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:c.P.convert(_.center||[0,0]),top:c.P.convert(_.top||[0,0]),"top-left":c.P.convert(_["top-left"]||[0,0]),"top-right":c.P.convert(_["top-right"]||[0,0]),bottom:c.P.convert(_.bottom||[0,0]),"bottom-left":c.P.convert(_["bottom-left"]||[0,0]),"bottom-right":c.P.convert(_["bottom-right"]||[0,0]),left:c.P.convert(_.left||[0,0]),right:c.P.convert(_.right||[0,0])}}return bt(new c.P(0,0))}const Ct=I;m.AJAXError=c.bf,m.Evented=c.E,m.LngLat=c.M,m.MercatorCoordinate=c.Y,m.Point=c.P,m.addProtocol=c.bg,m.config=c.a,m.removeProtocol=c.bh,m.AttributionControl=Gh,m.BoxZoomHandler=xa,m.CanvasSource=pt,m.CooperativeGesturesHandler=vn,m.DoubleClickZoomHandler=tu,m.DragPanHandler=iu,m.DragRotateHandler=Is,m.EdgeInsets=_a,m.FullscreenControl=class extends c.E{constructor(_={}){super(),this._onFullscreenChange=()=>{var i;let a=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((i=a==null?void 0:a.shadowRoot)===null||i===void 0)&&i.fullscreenElement;)a=a.shadowRoot.fullscreenElement;a===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,_&&_.container&&(_.container instanceof HTMLElement?this._container=_.container:c.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(_){return this._map=_,this._container||(this._container=this._map.getContainer()),this._controlContainer=z.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){z.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const _=this._fullscreenButton=z.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);z.create("span","maplibregl-ctrl-icon",_).setAttribute("aria-hidden","true"),_.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const _=this._getTitle();this._fullscreenButton.setAttribute("aria-label",_),this._fullscreenButton.title=_}_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 c.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new c.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()}},m.GeoJSONSource=Ze,m.GeolocateControl=class extends c.E{constructor(_){super(),this._onSuccess=i=>{if(this._map){if(this._isOutOfMapMaxBounds(i))return this._setErrorState(),this.fire(new c.k("outofmaxbounds",i)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=i,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(i),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(i),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new c.k("geolocate",i)),this._finish()}},this._updateCamera=i=>{const a=new c.M(i.coords.longitude,i.coords.latitude),d=i.coords.accuracy,p=this._map.getBearing(),v=c.e({bearing:p},this.options.fitBoundsOptions),w=ge.fromLngLat(a,d);this._map.fitBounds(w,v,{geolocateSource:!0})},this._updateMarker=i=>{if(i){const a=new c.M(i.coords.longitude,i.coords.latitude);this._accuracyCircleMarker.setLngLat(a).addTo(this._map),this._userLocationDotMarker.setLngLat(a).addTo(this._map),this._accuracy=i.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=i=>{if(this._map){if(this.options.trackUserLocation)if(i.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 a=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(i.code===3&&Cs)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new c.k("error",i)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=i=>{if(this._map){if(this._container.addEventListener("contextmenu",a=>a.preventDefault()),this._geolocateButton=z.create("button","maplibregl-ctrl-geolocate",this._container),z.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",i===!1){c.w("Geolocation support is not available so the GeolocateControl will be disabled.");const a=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}else{const a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=z.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new xi({element:this._dotElement}),this._circleElement=z.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new xi({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",a=>{a.geolocateSource||this._watchState!=="ACTIVE_LOCK"||a.originalEvent&&a.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 c.k("trackuserlocationend")),this.fire(new c.k("userlocationlostfocus")))})}},this.options=c.e({},kl,_)}onAdd(_){return this._map=_,this._container=z.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(){return c._(this,arguments,void 0,function*(i=!1){if(bo!==void 0&&!i)return bo;if(window.navigator.permissions===void 0)return bo=!!window.navigator.geolocation,bo;try{bo=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{bo=!!window.navigator.geolocation}return bo})}().then(i=>this._setupUI(i)),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(),z.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Ts=0,Cs=!1}_isOutOfMapMaxBounds(_){const i=this._map.getMaxBounds(),a=_.coords;return i&&(a.longitudei.getEast()||a.latitudei.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const _=this._map.getBounds(),i=_.getSouthEast(),a=_.getNorthEast(),d=i.distanceTo(a),p=Math.ceil(this._accuracy/(d/this._map._container.clientHeight)*2);this._circleElement.style.width=`${p}px`,this._circleElement.style.height=`${p}px`}trigger(){if(!this._setup)return c.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 c.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ts--,Cs=!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 c.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 c.k("trackuserlocationstart")),this.fire(new c.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 _;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ts++,Ts>1?(_={maximumAge:6e5,timeout:0},Cs=!0):(_=this.options.positionOptions,Cs=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,_)}}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)}},m.Hash=qc,m.ImageSource=Qe,m.KeyboardHandler=vo,m.LngLatBounds=ge,m.LogoControl=nu,m.Map=class extends ap{constructor(_){c.bd.mark(c.be.create);const i=Object.assign(Object.assign({},lp),_);if(i.minZoom!=null&&i.maxZoom!=null&&i.minZoom>i.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(i.minPitch!=null&&i.maxPitch!=null&&i.minPitch>i.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(i.minPitch!=null&&i.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(i.maxPitch!=null&&i.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Uc(i.minZoom,i.maxZoom,i.minPitch,i.maxPitch,i.renderWorldCopies),{bearingSnap:i.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ea,this._controls=[],this._mapId=c.a3(),this._contextLost=a=>{a.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new c.k("webglcontextlost",{originalEvent:a}))},this._contextRestored=a=>{this._setupPainter(),this.resize(),this._update(),this.fire(new c.k("webglcontextrestored",{originalEvent:a}))},this._onMapScroll=a=>{if(a.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=i.interactive,this._maxTileCacheSize=i.maxTileCacheSize,this._maxTileCacheZoomLevels=i.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=i.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=i.preserveDrawingBuffer===!0,this._antialias=i.antialias===!0,this._trackResize=i.trackResize===!0,this._bearingSnap=i.bearingSnap,this._refreshExpiredTiles=i.refreshExpiredTiles===!0,this._fadeDuration=i.fadeDuration,this._crossSourceCollisions=i.crossSourceCollisions===!0,this._collectResourceTiming=i.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},ct),i.locale),this._clickTolerance=i.clickTolerance,this._overridePixelRatio=i.pixelRatio,this._maxCanvasSize=i.maxCanvasSize,this.transformCameraUpdate=i.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=i.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=W.addThrottleControl(()=>this.isMoving()),this._requestManager=new fe(i.transformRequest),typeof i.container=="string"){if(this._container=document.getElementById(i.container),!this._container)throw new Error(`Container '${i.container}' not found.`)}else{if(!(i.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=i.container}if(i.maxBounds&&this.setMaxBounds(i.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 a=!1;const d=Bh(p=>{this._trackResize&&!this._removed&&this.resize(p)._update()},50);this._resizeObserver=new ResizeObserver(p=>{a?d(p):a=!0}),this._resizeObserver.observe(this._container)}this.handlers=new wa(this,i),this._hash=i.hash&&new qc(typeof i.hash=="string"&&i.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch}),i.bounds&&(this.resize(),this.fitBounds(i.bounds,c.e({},i.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=i.localIdeographFontFamily,this._validateStyle=i.validateStyle,i.style&&this.setStyle(i.style,{localIdeographFontFamily:i.localIdeographFontFamily}),i.attributionControl&&this.addControl(new Gh(typeof i.attributionControl=="boolean"?void 0:i.attributionControl)),i.maplibreLogo&&this.addControl(new nu,i.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",a=>{this._update(a.dataType==="style"),this.fire(new c.k(`${a.dataType}data`,a))}),this.on("dataloading",a=>{this.fire(new c.k(`${a.dataType}dataloading`,a))}),this.on("dataabort",a=>{this.fire(new c.k("sourcedataabort",a))})}_getMapId(){return this._mapId}addControl(_,i){if(i===void 0&&(i=_.getDefaultPosition?_.getDefaultPosition():"top-right"),!_||!_.onAdd)return this.fire(new c.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const a=_.onAdd(this);this._controls.push(_);const d=this._controlPositions[i];return i.indexOf("bottom")!==-1?d.insertBefore(a,d.firstChild):d.appendChild(a),this}removeControl(_){if(!_||!_.onRemove)return this.fire(new c.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const i=this._controls.indexOf(_);return i>-1&&this._controls.splice(i,1),_.onRemove(this),this}hasControl(_){return this._controls.indexOf(_)>-1}calculateCameraOptionsFromTo(_,i,a,d){return d==null&&this.terrain&&(d=this.terrain.getElevationForLngLatZoom(a,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(_,i,a,d)}resize(_){var i;const a=this._containerDimensions(),d=a[0],p=a[1],v=this._getClampedPixelRatio(d,p);if(this._resizeCanvas(d,p,v),this.painter.resize(d,p,v),this.painter.overLimit()){const S=this.painter.context.gl;this._maxCanvasSize=[S.drawingBufferWidth,S.drawingBufferHeight];const T=this._getClampedPixelRatio(d,p);this._resizeCanvas(d,p,T),this.painter.resize(d,p,T)}this.transform.resize(d,p),(i=this._requestedCameraState)===null||i===void 0||i.resize(d,p);const w=!this._moving;return w&&(this.stop(),this.fire(new c.k("movestart",_)).fire(new c.k("move",_))),this.fire(new c.k("resize",_)),w&&this.fire(new c.k("moveend",_)),this}_getClampedPixelRatio(_,i){const{0:a,1:d}=this._maxCanvasSize,p=this.getPixelRatio(),v=_*p,w=i*p;return Math.min(v>a?a/v:1,w>d?d/w:1)*p}getPixelRatio(){var _;return(_=this._overridePixelRatio)!==null&&_!==void 0?_:devicePixelRatio}setPixelRatio(_){this._overridePixelRatio=_,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(_){return this.transform.setMaxBounds(ge.convert(_)),this._update()}setMinZoom(_){if((_=_??-2)>=-2&&_<=this.transform.maxZoom)return this.transform.minZoom=_,this._update(),this.getZoom()<_&&this.setZoom(_),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(_){if((_=_??22)>=this.transform.minZoom)return this.transform.maxZoom=_,this._update(),this.getZoom()>_&&this.setZoom(_),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(_){if((_=_??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(_>=0&&_<=this.transform.maxPitch)return this.transform.minPitch=_,this._update(),this.getPitch()<_&&this.setPitch(_),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(_){if((_=_??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(_>=this.transform.minPitch)return this.transform.maxPitch=_,this._update(),this.getPitch()>_&&this.setPitch(_),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(_){return this.transform.renderWorldCopies=_,this._update()}project(_){return this.transform.locationPoint(c.M.convert(_),this.style&&this.terrain)}unproject(_){return this.transform.pointLocation(c.P.convert(_),this.terrain)}isMoving(){var _;return this._moving||((_=this.handlers)===null||_===void 0?void 0:_.isMoving())}isZooming(){var _;return this._zooming||((_=this.handlers)===null||_===void 0?void 0:_.isZooming())}isRotating(){var _;return this._rotating||((_=this.handlers)===null||_===void 0?void 0:_.isRotating())}_createDelegatedListener(_,i,a){if(_==="mouseenter"||_==="mouseover"){let d=!1;return{layer:i,listener:a,delegates:{mousemove:v=>{const w=this.getLayer(i)?this.queryRenderedFeatures(v.point,{layers:[i]}):[];w.length?d||(d=!0,a.call(this,new Sr(_,this,v.originalEvent,{features:w}))):d=!1},mouseout:()=>{d=!1}}}}if(_==="mouseleave"||_==="mouseout"){let d=!1;return{layer:i,listener:a,delegates:{mousemove:w=>{(this.getLayer(i)?this.queryRenderedFeatures(w.point,{layers:[i]}):[]).length?d=!0:d&&(d=!1,a.call(this,new Sr(_,this,w.originalEvent)))},mouseout:w=>{d&&(d=!1,a.call(this,new Sr(_,this,w.originalEvent)))}}}}{const d=p=>{const v=this.getLayer(i)?this.queryRenderedFeatures(p.point,{layers:[i]}):[];v.length&&(p.features=v,a.call(this,p),delete p.features)};return{layer:i,listener:a,delegates:{[_]:d}}}}on(_,i,a){if(a===void 0)return super.on(_,i);const d=this._createDelegatedListener(_,i,a);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[_]=this._delegatedListeners[_]||[],this._delegatedListeners[_].push(d);for(const p in d.delegates)this.on(p,d.delegates[p]);return this}once(_,i,a){if(a===void 0)return super.once(_,i);const d=this._createDelegatedListener(_,i,a);for(const p in d.delegates)this.once(p,d.delegates[p]);return this}off(_,i,a){return a===void 0?super.off(_,i):(this._delegatedListeners&&this._delegatedListeners[_]&&(d=>{const p=this._delegatedListeners[_];for(let v=0;vthis._updateStyle(_,i));const a=this.style&&i.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!_)),_?(this.style=new el(this,i||{}),this.style.setEventedParent(this,{style:this.style}),typeof _=="string"?this.style.loadURL(_,i,a):this.style.loadJSON(_,i,a),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new el(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(_,i){if(typeof _=="string"){const a=this._requestManager.transformRequest(_,"Style");c.h(a,new AbortController).then(d=>{this._updateDiff(d.data,i)}).catch(d=>{d&&this.fire(new c.j(d))})}else typeof _=="object"&&this._updateDiff(_,i)}_updateDiff(_,i){try{this.style.setState(_,i)&&this._update(!0)}catch(a){c.w(`Unable to perform style diff: ${a.message||a.error||a}. Rebuilding the style from scratch.`),this._updateStyle(_,i)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():c.w("There is no style added to the map.")}addSource(_,i){return this._lazyInitEmptyStyle(),this.style.addSource(_,i),this._update(!0)}isSourceLoaded(_){const i=this.style&&this.style.sourceCaches[_];if(i!==void 0)return i.loaded();this.fire(new c.j(new Error(`There is no source with ID '${_}'`)))}setTerrain(_){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),_){const i=this.style.sourceCaches[_.source];if(!i)throw new Error(`cannot load terrain, because there exists no source with ID: ${_.source}`);this.terrain===null&&i.reload();for(const a in this.style._layers){const d=this.style._layers[a];d.type==="hillshade"&&d.source===_.source&&c.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 Zh(this.painter,i,_),this.painter.renderToTexture=new Wh(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=a=>{a.dataType==="style"?this.terrain.sourceCache.freeRtt():a.dataType==="source"&&a.tile&&(a.sourceId!==_.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(a.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 c.k("terrain",{terrain:_})),this}getTerrain(){var _,i;return(i=(_=this.terrain)===null||_===void 0?void 0:_.options)!==null&&i!==void 0?i:null}areTilesLoaded(){const _=this.style&&this.style.sourceCaches;for(const i in _){const a=_[i]._tiles;for(const d in a){const p=a[d];if(p.state!=="loaded"&&p.state!=="errored")return!1}}return!0}removeSource(_){return this.style.removeSource(_),this._update(!0)}getSource(_){return this.style.getSource(_)}addImage(_,i,a={}){const{pixelRatio:d=1,sdf:p=!1,stretchX:v,stretchY:w,content:S,textFitWidth:T,textFitHeight:P}=a;if(this._lazyInitEmptyStyle(),!(i instanceof HTMLImageElement||c.b(i))){if(i.width===void 0||i.height===void 0)return this.fire(new c.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:O,height:R,data:j}=i,H=i;return this.style.addImage(_,{data:new c.R({width:O,height:R},new Uint8Array(j)),pixelRatio:d,stretchX:v,stretchY:w,content:S,textFitWidth:T,textFitHeight:P,sdf:p,version:0,userImage:H}),H.onAdd&&H.onAdd(this,_),this}}{const{width:O,height:R,data:j}=A.getImageData(i);this.style.addImage(_,{data:new c.R({width:O,height:R},j),pixelRatio:d,stretchX:v,stretchY:w,content:S,textFitWidth:T,textFitHeight:P,sdf:p,version:0})}}updateImage(_,i){const a=this.style.getImage(_);if(!a)return this.fire(new c.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const d=i instanceof HTMLImageElement||c.b(i)?A.getImageData(i):i,{width:p,height:v,data:w}=d;if(p===void 0||v===void 0)return this.fire(new c.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(p!==a.data.width||v!==a.data.height)return this.fire(new c.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const S=!(i instanceof HTMLImageElement||c.b(i));return a.data.replace(w,S),this.style.updateImage(_,a),this}getImage(_){return this.style.getImage(_)}hasImage(_){return _?!!this.style.getImage(_):(this.fire(new c.j(new Error("Missing required image id"))),!1)}removeImage(_){this.style.removeImage(_)}loadImage(_){return W.getImage(this._requestManager.transformRequest(_,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(_,i){return this._lazyInitEmptyStyle(),this.style.addLayer(_,i),this._update(!0)}moveLayer(_,i){return this.style.moveLayer(_,i),this._update(!0)}removeLayer(_){return this.style.removeLayer(_),this._update(!0)}getLayer(_){return this.style.getLayer(_)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(_,i,a){return this.style.setLayerZoomRange(_,i,a),this._update(!0)}setFilter(_,i,a={}){return this.style.setFilter(_,i,a),this._update(!0)}getFilter(_){return this.style.getFilter(_)}setPaintProperty(_,i,a,d={}){return this.style.setPaintProperty(_,i,a,d),this._update(!0)}getPaintProperty(_,i){return this.style.getPaintProperty(_,i)}setLayoutProperty(_,i,a,d={}){return this.style.setLayoutProperty(_,i,a,d),this._update(!0)}getLayoutProperty(_,i){return this.style.getLayoutProperty(_,i)}setGlyphs(_,i={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(_,i),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(_,i,a={}){return this._lazyInitEmptyStyle(),this.style.addSprite(_,i,a,d=>{d||this._update(!0)}),this}removeSprite(_){return this._lazyInitEmptyStyle(),this.style.removeSprite(_),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(_,i={}){return this._lazyInitEmptyStyle(),this.style.setSprite(_,i,a=>{a||this._update(!0)}),this}setLight(_,i={}){return this._lazyInitEmptyStyle(),this.style.setLight(_,i),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(_,i){return this.style.setFeatureState(_,i),this._update()}removeFeatureState(_,i){return this.style.removeFeatureState(_,i),this._update()}getFeatureState(_){return this.style.getFeatureState(_)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let _=0,i=0;return this._container&&(_=this._container.clientWidth||400,i=this._container.clientHeight||300),[_,i]}_setupContainer(){const _=this._container;_.classList.add("maplibregl-map");const i=this._canvasContainer=z.create("div","maplibregl-canvas-container",_);this._interactive&&i.classList.add("maplibregl-interactive"),this._canvas=z.create("canvas","maplibregl-canvas",i),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 a=this._containerDimensions(),d=this._getClampedPixelRatio(a[0],a[1]);this._resizeCanvas(a[0],a[1],d);const p=this._controlContainer=z.create("div","maplibregl-control-container",_),v=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(w=>{v[w]=z.create("div",`maplibregl-ctrl-${w} `,p)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(_,i,a){this._canvas.width=Math.floor(a*_),this._canvas.height=Math.floor(a*i),this._canvas.style.width=`${_}px`,this._canvas.style.height=`${i}px`}_setupPainter(){const _={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let i=null;this._canvas.addEventListener("webglcontextcreationerror",d=>{i={requestedAttributes:_},d&&(i.statusMessage=d.statusMessage,i.type=d.type)},{once:!0});const a=this._canvas.getContext("webgl2",_)||this._canvas.getContext("webgl",_);if(!a){const d="Failed to initialize WebGL";throw i?(i.message=d,new Error(JSON.stringify(i))):new Error(d)}this.painter=new ni(a,this.transform),q.testSupport(a)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(_){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||_,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(_){return this._update(),this._renderTaskQueue.add(_)}_cancelRenderFrame(_){this._renderTaskQueue.remove(_)}_render(_){const i=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(_),this._removed)return;let a=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const p=this.transform.zoom,v=A.now();this.style.zoomHistory.update(p,v);const w=new c.a8(p,{now:v,fadeDuration:i,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),S=w.crossFadingFactor();S===1&&S===this._crossFadingFactor||(a=!0,this._crossFadingFactor=S),this.style.update(w)}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,i,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:i,showPadding:this.showPadding}),this.fire(new c.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,c.bd.mark(c.be.load),this.fire(new c.k("load"))),this.style&&(this.style.hasTransitions()||a)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const d=this._sourcesDirty||this._styleDirty||this._placementDirty;return d||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new c.k("idle")),!this._loaded||this._fullyLoaded||d||(this._fullyLoaded=!0,c.bd.mark(c.be.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var _;this._hash&&this._hash.remove();for(const a of this._controls)a.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),W.removeThrottleControl(this._imageQueueHandle),(_=this._resizeObserver)===null||_===void 0||_.disconnect();const i=this.painter.context.gl.getExtension("WEBGL_lose_context");i!=null&&i.loseContext&&i.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),z.remove(this._canvasContainer),z.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),c.bd.clearMetrics(),this._removed=!0,this.fire(new c.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,A.frameAsync(this._frameRequest).then(_=>{c.bd.frame(_),this._frameRequest=null,this._render(_)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(_){this._showTileBoundaries!==_&&(this._showTileBoundaries=_,this._update())}get showPadding(){return!!this._showPadding}set showPadding(_){this._showPadding!==_&&(this._showPadding=_,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(_){this._showCollisionBoxes!==_&&(this._showCollisionBoxes=_,_?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(_){this._showOverdrawInspector!==_&&(this._showOverdrawInspector=_,this._update())}get repaint(){return!!this._repaint}set repaint(_){this._repaint!==_&&(this._repaint=_,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(_){this._vertices=_,this._update()}get version(){return ou}getCameraTargetElevation(){return this.transform.elevation}},m.MapMouseEvent=Sr,m.MapTouchEvent=Xo,m.MapWheelEvent=Fh,m.Marker=xi,m.NavigationControl=class{constructor(_){this._updateZoomButtons=()=>{const i=this._map.getZoom(),a=i===this._map.getMaxZoom(),d=i===this._map.getMinZoom();this._zoomInButton.disabled=a,this._zoomOutButton.disabled=d,this._zoomInButton.setAttribute("aria-disabled",a.toString()),this._zoomOutButton.setAttribute("aria-disabled",d.toString())},this._rotateCompassArrow=()=>{const i=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=i},this._setButtonTitle=(i,a)=>{const d=this._map._getUIString(`NavigationControl.${a}`);i.title=d,i.setAttribute("aria-label",d)},this.options=c.e({},su,_),this._container=z.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",i=>i.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",i=>this._map.zoomIn({},{originalEvent:i})),z.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",i=>this._map.zoomOut({},{originalEvent:i})),z.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",i=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:i}):this._map.resetNorth({},{originalEvent:i})}),this._compassIcon=z.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(_){return this._map=_,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 Kh(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){z.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(_,i){const a=z.create("button",_,this._container);return a.type="button",a.addEventListener("click",i),a}},m.Popup=class extends c.E{constructor(_){super(),this.remove=()=>(this._content&&z.remove(this._content),this._container&&(z.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 c.k("close"))),this),this._onMouseUp=i=>{this._update(i.point)},this._onMouseMove=i=>{this._update(i.point)},this._onDrag=i=>{this._update(i.point)},this._update=i=>{var a;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=z.create("div","maplibregl-popup",this._map.getContainer()),this._tip=z.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const S of this.options.className.split(" "))this._container.classList.add(S);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?Jh(this._lngLat,this._flatPos,this._map.transform):(a=this._lngLat)===null||a===void 0?void 0:a.wrap(),this._trackPointer&&!i)return;const d=this._flatPos=this._pos=this._trackPointer&&i?i:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&i?i:this._map.transform.locationPoint(this._lngLat));let p=this.options.anchor;const v=bt(this.options.offset);if(!p){const S=this._container.offsetWidth,T=this._container.offsetHeight;let P;P=d.y+v.bottom.ythis._map.transform.height-T?["bottom"]:[],d.xthis._map.transform.width-S/2&&P.push("right"),p=P.length===0?"bottom":P.join("-")}let w=d.add(v[p]);this.options.subpixelPositioning||(w=w.round()),z.setTransform(this._container,`${au[p]} translate(${w.x}px,${w.y}px)`),wo(this._container,p,"popup")},this._onClose=()=>{this.remove()},this.options=c.e(Object.create($n),_)}addTo(_){return this._map&&this.remove(),this._map=_,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 c.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(_){return this._lngLat=c.M.convert(_),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(_){return this.setDOMContent(document.createTextNode(_))}setHTML(_){const i=document.createDocumentFragment(),a=document.createElement("body");let d;for(a.innerHTML=_;d=a.firstChild,d;)i.appendChild(d);return this.setDOMContent(i)}getMaxWidth(){var _;return(_=this._container)===null||_===void 0?void 0:_.style.maxWidth}setMaxWidth(_){return this.options.maxWidth=_,this._update(),this}setDOMContent(_){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=z.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(_),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(_){return this._container&&this._container.classList.add(_),this}removeClassName(_){return this._container&&this._container.classList.remove(_),this}setOffset(_){return this.options.offset=_,this._update(),this}toggleClassName(_){if(this._container)return this._container.classList.toggle(_)}setSubpixelPositioning(_){this.options.subpixelPositioning=_}_createCloseButton(){this.options.closeButton&&(this._closeButton=z.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 _=this._container.querySelector(Ll);_&&_.focus()}},m.RasterDEMTileSource=tt,m.RasterTileSource=He,m.ScaleControl=class{constructor(_){this._onMove=()=>{lu(this._map,this._container,this.options)},this.setUnit=i=>{this.options.unit=i,lu(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Yh),_)}getDefaultPosition(){return"bottom-left"}onAdd(_){return this._map=_,this._container=z.create("div","maplibregl-ctrl maplibregl-ctrl-scale",_.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){z.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},m.ScrollZoomHandler=eu,m.Style=el,m.TerrainControl=class{constructor(_){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=_}onAdd(_){return this._map=_,this._container=z.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=z.create("button","maplibregl-ctrl-terrain",this._container),z.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(){z.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},m.TwoFingersTouchPitchHandler=Yc,m.TwoFingersTouchRotateHandler=Jc,m.TwoFingersTouchZoomHandler=Al,m.TwoFingersTouchZoomRotateHandler=ru,m.VectorTileSource=ae,m.VideoSource=We,m.addSourceType=(_,i)=>c._(void 0,void 0,void 0,function*(){if(vt(_))throw new Error(`A source type called "${_}" already exists.`);((a,d)=>{St[a]=d})(_,i)}),m.clearPrewarmedResources=function(){const _=zi;_&&(_.isPreloaded()&&_.numActive()===1?(_.release(Nt),zi=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()"))},m.getMaxParallelImageRequests=function(){return c.a.MAX_PARALLEL_IMAGE_REQUESTS},m.getRTLTextPluginStatus=function(){return Ht().getRTLTextPluginStatus()},m.getVersion=function(){return Ct},m.getWorkerCount=function(){return wi.workerCount},m.getWorkerUrl=function(){return c.a.WORKER_URL},m.importScriptInWorkers=function(_){return Or().broadcast("IS",_)},m.prewarm=function(){Li().acquire(Nt)},m.setMaxParallelImageRequests=function(_){c.a.MAX_PARALLEL_IMAGE_REQUESTS=_},m.setRTLTextPlugin=function(_,i){return Ht().setRTLTextPlugin(_,i)},m.setWorkerCount=function(_){wi.workerCount=_},m.setWorkerUrl=function(_){c.a.WORKER_URL=_}});var g=s;return g})})(uw);var dw=uw.exports;const m5=p5(dw),Hv=["3036","3622","3623","3624","3631","3641","3653","3724","3725","3741","3823","3824","3831","3841","3926","3927","3928","3942","4027","4028","4040","4042","4128","4129","4142","4229","4230","4328","4329","4429","4440","4529","4530","4531","4540","4629","4630","4631","4728","4729","4730","4731","4739","4740","4828","4829","4830","4831","4839","4928","4929","4930","4931","4932","4933","4934","4939","5029","5030","5031","5032","5033","5034","5035","5036","5038","5039","5129","5130","5131","5132","5133","5134","5135","5136","5137","5138","5139","5229","5231","5232","5233","5234","5235","5236","5237","5238","5239","5240","5332","5333","5334","5335","5336","5337","5338","5339","5340","5432","5433","5435","5436","5437","5438","5439","5440","5531","5536","5537","5538","5539","5540","5541","5636","5637","5638","5639","5640","5641","5738","5739","5740","5741","5839","5840","5841","5939","5940","5941","5942","6039","6040","6041","6139","6140","6141","6239","6240","6241","6243","6339","6340","6341","6342","6343","6439","6440","6441","6442","6443","6444","6445","6540","6541","6542","6543","6544","6545","6546","6641","6642","6643","6644","6645","6646","6647","6740","6741","6742","6747","6748","6840","6841","6842","6847","6848"],Ce={LEVEL_80000:{LEVEL:8e4,DIGIT:4,DISTANCE:{LAT:40/60,LNG:1},SECTION:{X:{MIN:22,MAX:53},Y:{MIN:30,MAX:68},LAT:{MIN:20},LNG:{MIN:122}}},LEVEL_10000:{LEVEL:1e4,DIGIT:6,RANGE:{MIN:0,MAX:7},DISTANCE:{LAT:5/60,LNG:7/60+30/60/60}},LEVEL_5000:{LEVEL:5e3,DIGIT:7,RANGE:{MIN:1,MAX:4},DISTANCE:{LAT:150/60/60,LNG:225/60/60}},LEVEL_2000:{LEVEL:2e3,DIGIT:9,RANGE:{MIN:0,MAX:8},DISTANCE:{LAT:60/60/60,LNG:90/60/60}},LEVEL_1000:{LEVEL:1e3,DIGIT:8,RANGE:{MIN:0,MAX:9},DISTANCE:{LAT:30/60/60,LNG:45/60/60}},LEVEL_500:{LEVEL:500,DIGIT:9,RANGE:{MIN:1,MAX:4},DISTANCE:{LAT:15/60/60,LNG:22.5/60/60}},LEVEL_250:{LEVEL:250,DIGIT:10,RANGE:{MIN:1,MAX:4},DISTANCE:{LAT:7.5/60/60,LNG:11.25/60/60}},LEVEL_125:{LEVEL:125,DIGIT:11,RANGE:{MIN:1,MAX:4},DISTANCE:{LAT:3.75/60/60,LNG:5.625/60/60}}},Kl=Object.values(Ce).map(e=>e.LEVEL),g5=[Ce.LEVEL_10000.LEVEL,Ce.LEVEL_5000.LEVEL,Ce.LEVEL_2000.LEVEL];class Fu{constructor(n,s){za(this,"lat");za(this,"lng");this.lat=n,this.lng=s}}class fw{constructor(n,s,u,h){za(this,"northLat");za(this,"eastLng");za(this,"southLat");za(this,"westLng");this.northLat=n,this.eastLng=s,this.southLat=u,this.westLng=h}getCenter(){const n=(this.northLat+this.southLat)/2,s=(this.eastLng+this.westLng)/2;return new Fu(n,s)}getNorthEast(){return new Fu(this.northLat,this.eastLng)}getNorthWest(){return new Fu(this.northLat,this.westLng)}getSouthWest(){return new Fu(this.southLat,this.westLng)}getSouthEast(){return new Fu(this.southLat,this.eastLng)}contains(n){const s=n.lat,u=n.lng;return this.southLat<=s&&s<=this.northLat&&this.westLng<=u&&u<=this.eastLng}}class yn{static toCode(n,s,u=Ce.LEVEL_125.LEVEL){if(Kl.includes(u)===!1)throw new Error(`invalid level. available : ${Kl.join(", ")}`);const h=Math.floor(n*60/40),g=n*60%40,m=Math.floor(g/5),c=g%5,I=Math.floor(c*60/30),k=c*60%30,M=Math.floor(k/15),A=k%15,z=Math.floor(A/7.5),q=A%7.5,K=Math.floor(q/3.75),J=Math.floor(s-100),se=s-100-J,ke=Math.floor(se*60/7.5),ye=se*60%7.5,W=Math.floor(ye*60/45),fe=ye*60%45,Z=Math.floor(fe/22.5),ee=fe%22.5,Se=Math.floor(ee/11.25),Ee=ee%11.25,Le=Math.floor(Ee/5.625),pe=M*2+(Z+1),Ie=z*2+(Se+1),Ae=K*2+(Le+1),De=`${h}${J}${m}${ke}${I}${W}${pe}${Ie}${Ae}`;if(yn.isValidCode(De)===!1)throw new Error(`lat: ${n} and lng: ${s} are invalid location.`);const Ge=De.slice(0,Ce.LEVEL_10000.DIGIT);switch(u){case Ce.LEVEL_80000.LEVEL:return De.slice(0,Ce.LEVEL_80000.DIGIT);case Ce.LEVEL_10000.LEVEL:return Ge;case Ce.LEVEL_5000.LEVEL:return Gv(Ge,n,s,u);case Ce.LEVEL_2000.LEVEL:return Gv(Ge,n,s,u);case Ce.LEVEL_1000.LEVEL:return De.slice(0,Ce.LEVEL_1000.DIGIT);case Ce.LEVEL_500.LEVEL:return De.slice(0,Ce.LEVEL_500.DIGIT);case Ce.LEVEL_250.LEVEL:return De.slice(0,Ce.LEVEL_250.DIGIT);default:return De}}static toLatLngBounds(n){const s=Zv(n),u=s[0],h=s[2];return new fw(u[1],u[0],h[1],h[0])}static toGeoJSON(n,s={}){const u=Zv(n);return y5(u,s)}static getLevel(n){if(yn.isValidCode(n)===!1)throw new Error(`'${n}' is invalid mesh code.`);const s=n.length;return s===Ce.LEVEL_80000.DIGIT?Ce.LEVEL_80000.LEVEL:s===Ce.LEVEL_10000.DIGIT?Ce.LEVEL_10000.LEVEL:s===Ce.LEVEL_5000.DIGIT?Ce.LEVEL_5000.LEVEL:s===Ce.LEVEL_2000.DIGIT&&n[n.length-1]==="5"?Ce.LEVEL_2000.LEVEL:s===Ce.LEVEL_1000.DIGIT?Ce.LEVEL_1000.LEVEL:s===Ce.LEVEL_500.DIGIT?Ce.LEVEL_500.LEVEL:s===Ce.LEVEL_250.DIGIT?Ce.LEVEL_250.LEVEL:Ce.LEVEL_125.LEVEL}static getCodes(n=null,s=null){if(n===null&&s===null)return Hv;if(n===null)throw new Error("code is required.");if(s===null)throw new Error("level is required.");if(yn.isValidCode(n)===!1)throw new Error(`'${n}' is invalid mesh code.`);if(Kl.includes(s)===!1)throw new Error(`${s} is invalid level. available : ${Kl.join(", ")}`);const u=yn.getLevel(n);if(u<=s)throw new Error("code level is lower than the specified level.");const h=[];if(u>Ce.LEVEL_10000.LEVEL){for(let g=Ce.LEVEL_10000.RANGE.MIN;g<=Ce.LEVEL_10000.RANGE.MAX;g++)for(let m=Ce.LEVEL_10000.RANGE.MIN;m<=Ce.LEVEL_10000.RANGE.MAX;m++)h.push(`${n}${g}${m}`);if(s===Ce.LEVEL_10000.LEVEL)return h}else h.push(n.slice(0,Ce.LEVEL_10000.DIGIT));if(g5.includes(s)){if(s===Ce.LEVEL_5000.LEVEL){const g=[];return h.forEach(m=>{for(let c=Ce.LEVEL_5000.RANGE.MIN;c<=Ce.LEVEL_5000.RANGE.MAX;c++)g.push(`${m}${c}`)}),g}else if(s===Ce.LEVEL_2000.LEVEL){const g=[];return h.forEach(m=>{let c=[0,2,4,6,8],I=[0,2,4,6,8];if(u===Ce.LEVEL_5000.LEVEL){const k=Number(n[6]);k===1?(c=[0,2,4],I=[0,2,4]):k===2?(c=[0,2,4],I=[4,6,8]):k===3?(c=[4,6,8],I=[0,2,4]):k===4&&(c=[4,6,8],I=[4,6,8])}c.forEach(k=>{I.forEach(M=>{g.push(`${m}${k}${M}5`)})})}),g}}else{const g=[];if(u>Ce.LEVEL_1000.LEVEL){let k=Ce.LEVEL_1000.RANGE.MIN,M=Ce.LEVEL_1000.RANGE.MAX,A=Ce.LEVEL_1000.RANGE.MIN,z=Ce.LEVEL_1000.RANGE.MAX;if(u===Ce.LEVEL_5000.LEVEL){const q=Number(n[6]);q===1?(M=(Ce.LEVEL_1000.RANGE.MAX+1)/2,z=(Ce.LEVEL_1000.RANGE.MAX+1)/2):q===2?(M=(Ce.LEVEL_1000.RANGE.MAX+1)/2,A=(Ce.LEVEL_1000.RANGE.MAX+1)/2):q===3?(k=(Ce.LEVEL_1000.RANGE.MAX+1)/2,z=(Ce.LEVEL_1000.RANGE.MAX+1)/2):q===4&&(k=(Ce.LEVEL_1000.RANGE.MAX+1)/2,A=(Ce.LEVEL_1000.RANGE.MAX+1)/2)}else if(u===Ce.LEVEL_2000.LEVEL){const q=Number(n[7]),K=Number(n[6]);k=K,M=K+1,A=q,z=q+1}if(h.forEach(q=>{for(let K=k;K<=M;K++)for(let J=A;J<=z;J++)g.push(`${q}${K}${J}`)}),s===Ce.LEVEL_1000.LEVEL)return g}else g.push(n.slice(0,Ce.LEVEL_1000.DIGIT));const m=[];if(u>Ce.LEVEL_500.LEVEL){if(g.forEach(k=>{for(let M=Ce.LEVEL_500.RANGE.MIN;M<=Ce.LEVEL_500.RANGE.MAX;M++)m.push(`${k}${M}`)}),s===Ce.LEVEL_500.LEVEL)return m}else m.push(n.slice(0,Ce.LEVEL_500.DIGIT));const c=[];if(u>Ce.LEVEL_250.LEVEL){if(m.forEach(k=>{for(let M=Ce.LEVEL_250.RANGE.MIN;M<=Ce.LEVEL_250.RANGE.MAX;M++)c.push(`${k}${M}`)}),s===Ce.LEVEL_250.LEVEL)return c}else c.push(n.slice(0,Ce.LEVEL_250.DIGIT));const I=[];if(u>Ce.LEVEL_125.LEVEL&&(c.forEach(k=>{for(let M=Ce.LEVEL_125.RANGE.MIN;M<=Ce.LEVEL_125.RANGE.MAX;M++)I.push(`${k}${M}`)}),s===Ce.LEVEL_125.LEVEL))return I}}static getCodesWithinBounds(n,s=Ce.LEVEL_80000.LEVEL){if(Kl.includes(s)===!1)throw new Error(`${s} is invalid level. available : ${Kl.join(", ")}`);const u=n.getNorthEast(),h=n.getSouthWest(),g=u.lat-h.lat,m=u.lng-h.lng,c=_5(s),I=c.LAT,k=c.LNG,M=Math.ceil(g/I)+1,A=Math.ceil(m/k)+1,z=[],q=1e-8;for(let K=0;K<=M;K++)for(let J=0;J<=A;J++){const se=Math.min(Math.max(h.lat+I*K-I/2,h.lat+q),u.lat-q),ke=Math.min(Math.max(h.lng+k*J-k/2,h.lng+q),u.lng-q);try{const ye=yn.toCode(se,ke,s);z.includes(ye)||z.push(ye)}catch{}}return z}static isValidCode(n){if(n.length!==Ce.LEVEL_80000.DIGIT&&n.length!==Ce.LEVEL_10000.DIGIT&&n.length!==Ce.LEVEL_5000.DIGIT&&n.length!==Ce.LEVEL_2000.DIGIT&&n.length!==Ce.LEVEL_1000.DIGIT&&n.length!==Ce.LEVEL_500.DIGIT&&n.length!==Ce.LEVEL_250.DIGIT&&n.length!==Ce.LEVEL_125.DIGIT||!Hv.includes(n.slice(0,Ce.LEVEL_80000.DIGIT)))return!1;if(n.length>=Ce.LEVEL_10000.DIGIT){const s=Number(n[4]),u=Number(n[5]);if(sCe.LEVEL_10000.RANGE.MAX||uCe.LEVEL_10000.RANGE.MAX)return!1}if(pw(n)){if(n.length===Ce.LEVEL_5000.DIGIT){const s=Number(n[6]);if(sCe.LEVEL_5000.RANGE.MAX)return!1}else if(n.length===Ce.LEVEL_2000.DIGIT){const s=Number(n[6]),u=Number(n[7]),h=[0,2,4,6,8];if(!h.includes(s)||!h.includes(u))return!1}}else{if(n.length>=Ce.LEVEL_1000.DIGIT){const s=Number(n[6]),u=Number(n[7]);if(sCe.LEVEL_1000.RANGE.MAX||uCe.LEVEL_1000.RANGE.MAX)return!1}if(n.length>=Ce.LEVEL_500.DIGIT){const s=Number(n[8]);if(sCe.LEVEL_500.RANGE.MAX)return!1}if(n.length>=Ce.LEVEL_250.DIGIT){const s=Number(n[9]);if(sCe.LEVEL_250.RANGE.MAX)return!1}if(n.length>=Ce.LEVEL_125.DIGIT){const s=Number(n[10]);if(sCe.LEVEL_125.RANGE.MAX)return!1}}return!0}}function Gv(e,n,s,u){let h=e;const m=yn.toLatLngBounds(e).getSouthWest();if(u===Ce.LEVEL_5000.LEVEL){const c=Math.floor((n-m.lat)/Ce.LEVEL_5000.DISTANCE.LAT),I=Math.floor((s-m.lng)/Ce.LEVEL_5000.DISTANCE.LNG);I===0&&c===0?h+="1":I===1&&c===0?h+="2":I===0&&c===1?h+="3":h+="4"}else if(u===Ce.LEVEL_2000.LEVEL){const c=Math.floor((n-m.lat)/Ce.LEVEL_2000.DISTANCE.LAT)*2,I=Math.floor((s-m.lng)/Ce.LEVEL_2000.DISTANCE.LNG)*2;h+=`${c}${I}5`}return h}function Zv(e){if(yn.isValidCode(e)===!1)throw new Error(`'${e}' is invalid mesh code.`);const n=Number(e.slice(2,4)),s=Number(e.slice(0,2));let u=0,h=0,g=0,m=0;if(e.length>=Ce.LEVEL_80000.DIGIT&&(u=Ce.LEVEL_80000.SECTION.LNG.MIN+(n-Ce.LEVEL_80000.SECTION.X.MIN)*Ce.LEVEL_80000.DISTANCE.LNG,h=u+Ce.LEVEL_80000.DISTANCE.LNG,g=Ce.LEVEL_80000.SECTION.LAT.MIN+(s-Ce.LEVEL_80000.SECTION.Y.MIN)*Ce.LEVEL_80000.DISTANCE.LAT,m=g+Ce.LEVEL_80000.DISTANCE.LAT),e.length>=Ce.LEVEL_10000.DIGIT){const A=Number(e[5]),z=Number(e[4]);u+=A*Ce.LEVEL_10000.DISTANCE.LNG,h=u+Ce.LEVEL_10000.DISTANCE.LNG,g+=z*Ce.LEVEL_10000.DISTANCE.LAT,m=g+Ce.LEVEL_10000.DISTANCE.LAT}if(pw(e)){if(e.length===Ce.LEVEL_5000.DIGIT){const A=Number(e[6]),z=A===1||A===3?0:1,q=A===1||A===2?0:1;u+=z*Ce.LEVEL_5000.DISTANCE.LNG,h=u+Ce.LEVEL_5000.DISTANCE.LNG,g+=q*Ce.LEVEL_5000.DISTANCE.LAT,m=g+Ce.LEVEL_5000.DISTANCE.LAT}else if(e.length===Ce.LEVEL_2000.DIGIT){const A=Number(e[7]),z=Number(e[6]);u+=A/2*Ce.LEVEL_2000.DISTANCE.LNG,h=u+Ce.LEVEL_2000.DISTANCE.LNG,g+=z/2*Ce.LEVEL_2000.DISTANCE.LAT,m=g+Ce.LEVEL_2000.DISTANCE.LAT}}else{if(e.length>=Ce.LEVEL_1000.DIGIT){const A=Number(e[7]),z=Number(e[6]);u+=A*Ce.LEVEL_1000.DISTANCE.LNG,h=u+Ce.LEVEL_1000.DISTANCE.LNG,g+=z*Ce.LEVEL_1000.DISTANCE.LAT,m=g+Ce.LEVEL_1000.DISTANCE.LAT}if(e.length>=Ce.LEVEL_500.DIGIT){const A=Number(e[8]),z=A===1||A===3?0:1,q=A===1||A===2?0:1;u+=z*Ce.LEVEL_500.DISTANCE.LNG,h=u+Ce.LEVEL_500.DISTANCE.LNG,g+=q*Ce.LEVEL_500.DISTANCE.LAT,m=g+Ce.LEVEL_500.DISTANCE.LAT}if(e.length>=Ce.LEVEL_250.DIGIT){const A=Number(e[9]),z=A===1||A===3?0:1,q=A===1||A===2?0:1;u+=z*Ce.LEVEL_250.DISTANCE.LNG,h=u+Ce.LEVEL_250.DISTANCE.LNG,g+=q*Ce.LEVEL_250.DISTANCE.LAT,m=g+Ce.LEVEL_250.DISTANCE.LAT}if(e.length>=Ce.LEVEL_125.DIGIT){const A=Number(e[10]),z=A===1||A===3?0:1,q=A===1||A===2?0:1;u+=z*Ce.LEVEL_125.DISTANCE.LNG,h=u+Ce.LEVEL_125.DISTANCE.LNG,g+=q*Ce.LEVEL_125.DISTANCE.LAT,m=g+Ce.LEVEL_125.DISTANCE.LAT}}return[[h,m],[u,m],[u,g],[h,g]]}function y5(e,n={}){return e.push(e[0]),{type:"Feature",properties:n,geometry:{type:"Polygon",coordinates:[e]}}}function pw(e){return e.length===Ce.LEVEL_10000.DIGIT||e.length===Ce.LEVEL_5000.DIGIT||e.length===Ce.LEVEL_2000.DIGIT&&e[e.length-1]==="5"}function _5(e){switch(e){case Ce.LEVEL_10000.LEVEL:return Ce.LEVEL_10000.DISTANCE;case Ce.LEVEL_5000.LEVEL:return Ce.LEVEL_5000.DISTANCE;case Ce.LEVEL_2000.LEVEL:return Ce.LEVEL_2000.DISTANCE;case Ce.LEVEL_1000.LEVEL:return Ce.LEVEL_1000.DISTANCE;case Ce.LEVEL_500.LEVEL:return Ce.LEVEL_500.DISTANCE;case Ce.LEVEL_250.LEVEL:return Ce.LEVEL_250.DISTANCE;case Ce.LEVEL_125.LEVEL:return Ce.LEVEL_125.DISTANCE;default:return Ce.LEVEL_80000.DISTANCE}}const Gn={toCode:yn.toCode,toLatLngBounds:yn.toLatLngBounds,toGeoJSON:yn.toGeoJSON,getLevel:yn.getLevel,getCodes:yn.getCodes,getCodesWithinBounds:yn.getCodesWithinBounds,isValidCode:yn.isValidCode};var sc=Math.pow,sn=(e,n,s)=>new Promise((u,h)=>{var g=I=>{try{c(s.next(I))}catch(k){h(k)}},m=I=>{try{c(s.throw(I))}catch(k){h(k)}},c=I=>I.done?u(I.value):Promise.resolve(I.value).then(g,m);c((s=s.apply(e,n)).next())}),Rn=Uint8Array,Ju=Uint16Array,v5=Int32Array,mw=new Rn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),gw=new Rn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),x5=new Rn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yw=function(e,n){for(var s=new Ju(31),u=0;u<31;++u)s[u]=n+=1<>1|(yi&21845)<<1,as=(as&52428)>>2|(as&13107)<<2,as=(as&61680)>>4|(as&3855)<<4,xw[yi]=((as&65280)>>8|(as&255)<<8)>>1;var as,yi,Yu=function(e,n,s){for(var u=e.length,h=0,g=new Ju(n);h>I]=k}return c},mh=new Rn(288);for(yi=0;yi<144;++yi)mh[yi]=8;var yi;for(yi=144;yi<256;++yi)mh[yi]=9;var yi;for(yi=256;yi<280;++yi)mh[yi]=7;var yi;for(yi=280;yi<288;++yi)mh[yi]=8;var yi,bw=new Rn(32);for(yi=0;yi<32;++yi)bw[yi]=5;var yi,S5=Yu(mh,9),I5=Yu(bw,5),xm=function(e){for(var n=e[0],s=1;sn&&(n=e[s]);return n},uo=function(e,n,s){var u=n/8|0;return(e[u]|e[u+1]<<8)>>(n&7)&s},bm=function(e,n){var s=n/8|0;return(e[s]|e[s+1]<<8|e[s+2]<<16)>>(n&7)},T5=function(e){return(e+7)/8|0},C5=function(e,n,s){(s==null||s>e.length)&&(s=e.length);var u=new Rn(s-n);return u.set(e.subarray(n,s)),u},A5=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Dn=function(e,n,s){var u=new Error(n||A5[e]);if(u.code=e,Error.captureStackTrace&&Error.captureStackTrace(u,Dn),!s)throw u;return u},yy=function(e,n,s,u){var h=e.length,g=0;if(!h||n.f&&!n.l)return s||new Rn(0);var m=!s||n.i!=2,c=n.i;s||(s=new Rn(h*3));var I=function(cr){var Br=s.length;if(cr>Br){var rr=new Rn(Math.max(Br*2,cr));rr.set(s),s=rr}},k=n.f||0,M=n.p||0,A=n.b||0,z=n.l,q=n.d,K=n.m,J=n.n,se=h*8;do{if(!z){k=uo(e,M,1);var ke=uo(e,M+1,3);if(M+=3,ke)if(ke==1)z=S5,q=I5,K=9,J=5;else if(ke==2){var Z=uo(e,M,31)+257,ee=uo(e,M+10,15)+4,Se=Z+uo(e,M+5,31)+1;M+=14;for(var Ee=new Rn(Se),Le=new Rn(19),pe=0;pe>4;if(ye<16)Ee[pe++]=ye;else{var rt=0,Xe=0;for(ye==16?(Xe=3+uo(e,M,3),M+=2,rt=Ee[pe-1]):ye==17?(Xe=3+uo(e,M,7),M+=3):ye==18&&(Xe=11+uo(e,M,127),M+=7);Xe--;)Ee[pe++]=rt}}var dt=Ee.subarray(0,Z),nt=Ee.subarray(Z);K=xm(dt),J=xm(nt),z=Yu(dt,K),q=Yu(nt,J)}else Dn(1);else{var ye=T5(M)+4,W=e[ye-4]|e[ye-3]<<8,fe=ye+W;if(fe>h){c&&Dn(0);break}m&&I(A+W),s.set(e.subarray(ye,fe),A),n.b=A+=W,n.p=M=fe*8,n.f=k;continue}if(M>se){c&&Dn(0);break}}m&&I(A+131072);for(var ei=(1<>4;if(M+=rt&15,M>se){c&&Dn(0);break}if(rt||Dn(2),Nt<256)s[A++]=Nt;else if(Nt==256){Vt=M,z=null;break}else{var wi=Nt-254;if(Nt>264){var pe=Nt-257,Xi=mw[pe];wi=uo(e,M,(1<>4;zi||Dn(3),M+=zi&15;var nt=E5[hi];if(hi>3){var Xi=gw[hi];nt+=bm(e,M)&(1<se){c&&Dn(0);break}m&&I(A+131072);var Li=A+wi;if(A>3&1)+(n>>4&1);u>0;u-=!e[s++]);return s+(n&2)},L5=function(e){var n=e.length;return(e[n-4]|e[n-3]<<8|e[n-2]<<16|e[n-1]<<24)>>>0},P5=function(e,n){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&Dn(6,"invalid zlib data"),(e[1]>>5&1)==+!n&&Dn(6,"invalid zlib data: "+(e[1]&32?"need":"unexpected")+" dictionary"),(e[1]>>3&4)+2};function z5(e,n){return yy(e,{i:2},n,n)}function D5(e,n){var s=k5(e);return s+8>e.length&&Dn(6,"invalid gzip data"),yy(e.subarray(s,-8),{i:2},new Rn(L5(e)),n)}function R5(e,n){return yy(e.subarray(P5(e,n),-4),{i:2},n,n)}function fg(e,n){return e[0]==31&&e[1]==139&&e[2]==8?D5(e,n):(e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31?z5(e,n):R5(e,n)}var O5=typeof TextDecoder<"u"&&new TextDecoder,B5=0;try{O5.decode(M5,{stream:!0}),B5=1}catch{}var ww=(e,n)=>e*sc(2,n),Vu=(e,n)=>Math.floor(e/sc(2,n)),bf=(e,n)=>ww(e.getUint16(n+1,!0),8)+e.getUint8(n),Ew=(e,n)=>ww(e.getUint32(n+2,!0),16)+e.getUint16(n,!0),F5=(e,n,s,u,h)=>{if(e!==u.getUint8(h))return e-u.getUint8(h);const g=bf(u,h+1);if(n!==g)return n-g;const m=bf(u,h+4);return s!==m?s-m:0},V5=(e,n,s,u)=>{const h=Sw(e,n|128,s,u);return h?{z:n,x:s,y:u,offset:h[0],length:h[1],isDir:!0}:null},Wv=(e,n,s,u)=>{const h=Sw(e,n,s,u);return h?{z:n,x:s,y:u,offset:h[0],length:h[1],isDir:!1}:null},Sw=(e,n,s,u)=>{let h=0,g=e.byteLength/17-1;for(;h<=g;){const m=g+h>>1,c=F5(n,s,u,e,m*17);if(c>0)h=m+1;else if(c<0)g=m-1;else return[Ew(e,m*17+7),e.getUint32(m*17+13,!0)]}return null},N5=(e,n)=>e.isDir&&!n.isDir?1:!e.isDir&&n.isDir?-1:e.z!==n.z?e.z-n.z:e.x!==n.x?e.x-n.x:e.y-n.y,Iw=(e,n)=>{const s=e.getUint8(n*17);return{z:s&127,x:bf(e,n*17+1),y:bf(e,n*17+4),offset:Ew(e,n*17+7),length:e.getUint32(n*17+13,!0),isDir:s>>7===1}},Xv=e=>{const n=[],s=new DataView(e);for(let u=0;u{e.sort(N5);const n=new ArrayBuffer(17*e.length),s=new Uint8Array(n);for(let u=0;u>8&255,s[u*17+3]=h.x>>16&255,s[u*17+4]=h.y&255,s[u*17+5]=h.y>>8&255,s[u*17+6]=h.y>>16&255,s[u*17+7]=h.offset&255,s[u*17+8]=Vu(h.offset,8)&255,s[u*17+9]=Vu(h.offset,16)&255,s[u*17+10]=Vu(h.offset,24)&255,s[u*17+11]=Vu(h.offset,32)&255,s[u*17+12]=Vu(h.offset,48)&255,s[u*17+13]=h.length&255,s[u*17+14]=h.length>>8&255,s[u*17+15]=h.length>>16&255,s[u*17+16]=h.length>>24&255}return n},$5=(e,n)=>{if(e.byteLength<17)return null;const s=e.byteLength/17,u=Iw(e,s-1);if(u.isDir){const h=u.z,g=n.z-h,m=Math.trunc(n.x/(1<(n,s)=>{if(s instanceof AbortController)return e(n,s);const u=new AbortController;return e(n,u).then(h=>s(void 0,h.data,h.cacheControl||"",h.expires||""),h=>s(h)).catch(h=>s(h)),{cancel:()=>u.abort()}},G5=class{constructor(){this.tilev4=(e,n)=>sn(this,null,function*(){if(e.type==="json"){const A=e.url.substr(10);let z=this.tiles.get(A);z||(z=new Kv(A),this.tiles.set(A,z));const q=yield z.getHeader();return{data:{tiles:[`${e.url}/{z}/{x}/{y}`],minzoom:q.minZoom,maxzoom:q.maxZoom,bounds:[q.minLon,q.minLat,q.maxLon,q.maxLat]}}}const s=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),u=e.url.match(s);if(!u)throw new Error("Invalid PMTiles protocol URL");const h=u[1];let g=this.tiles.get(h);g||(g=new Kv(h),this.tiles.set(h,g));const m=u[2],c=u[3],I=u[4],k=yield g.getHeader(),M=yield g==null?void 0:g.getZxy(+m,+c,+I,n.signal);return M?{data:new Uint8Array(M.data),cacheControl:M.cacheControl,expires:M.expires}:k.tileType===1?{data:new Uint8Array}:{data:null}}),this.tile=H5(this.tilev4),this.tiles=new Map}add(e){this.tiles.set(e.source.getKey(),e)}get(e){return this.tiles.get(e)}};function Jl(e,n){return(n>>>0)*4294967296+(e>>>0)}function Z5(e,n){const s=n.buf;let u=s[n.pos++],h=(u&112)>>4;if(u<128||(u=s[n.pos++],h|=(u&127)<<3,u<128)||(u=s[n.pos++],h|=(u&127)<<10,u<128)||(u=s[n.pos++],h|=(u&127)<<17,u<128)||(u=s[n.pos++],h|=(u&127)<<24,u<128)||(u=s[n.pos++],h|=(u&1)<<31,u<128))return Jl(e,h);throw new Error("Expected varint not more than 10 bytes")}function Nu(e){const n=e.buf;let s=n[e.pos++],u=s&127;return s<128||(s=n[e.pos++],u|=(s&127)<<7,s<128)||(s=n[e.pos++],u|=(s&127)<<14,s<128)||(s=n[e.pos++],u|=(s&127)<<21,s<128)?u:(s=n[e.pos],u|=(s&15)<<28,Z5(u,e))}function W5(e,n,s,u){if(u===0){s===1&&(n[0]=e-1-n[0],n[1]=e-1-n[1]);const h=n[0];n[0]=n[1],n[1]=h}}var X5=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function K5(e,n,s){if(e>26)throw Error("Tile zoom level exceeds max safe number limit (26)");if(n>sc(2,e)-1||s>sc(2,e)-1)throw Error("tile x/y outside zoom level bounds");const u=X5[e],h=sc(2,e);let g=0,m=0,c=0;const I=[n,s];let k=h/2;for(;k>0;)g=(I[0]&k)>0?1:0,m=(I[1]&k)>0?1:0,c+=k*k*(3*g^m),W5(k,I,g,m),k=k/2;return u+c}function Cw(e,n){return sn(this,null,function*(){if(n===1||n===0)return e;if(n===2){if(typeof globalThis.DecompressionStream>"u")return fg(new Uint8Array(e));const s=new Response(e).body;if(!s)throw Error("Failed to read response stream");const u=s.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(u).arrayBuffer()}throw Error("Compression method not supported")})}var J5=127;function Y5(e,n){let s=0,u=e.length-1;for(;s<=u;){const h=u+s>>1,g=n-e[h].tileId;if(g>0)s=h+1;else if(g<0)u=h-1;else return e[h]}return u>=0&&(e[u].runLength===0||n-e[u].tileId=300)throw Error(`Bad response code: ${I.status}`);const M=I.headers.get("Content-Length");if(I.status===200&&(!M||+M>n))throw h&&h.abort(),Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield I.arrayBuffer(),etag:k||void 0,cacheControl:I.headers.get("Cache-Control")||void 0,expires:I.headers.get("Expires")||void 0}})}};function ho(e,n){const s=e.getUint32(n+4,!0),u=e.getUint32(n+0,!0);return s*sc(2,32)+u}function eD(e,n){const s=new DataView(e),u=s.getUint8(7);if(u>3)throw Error(`Archive is spec version ${u} but this library supports up to spec version 3`);return{specVersion:u,rootDirectoryOffset:ho(s,8),rootDirectoryLength:ho(s,16),jsonMetadataOffset:ho(s,24),jsonMetadataLength:ho(s,32),leafDirectoryOffset:ho(s,40),leafDirectoryLength:ho(s,48),tileDataOffset:ho(s,56),tileDataLength:ho(s,64),numAddressedTiles:ho(s,72),numTileEntries:ho(s,80),numTileContents:ho(s,88),clustered:s.getUint8(96)===1,internalCompression:s.getUint8(97),tileCompression:s.getUint8(98),tileType:s.getUint8(99),minZoom:s.getUint8(100),maxZoom:s.getUint8(101),minLon:s.getInt32(102,!0)/1e7,minLat:s.getInt32(106,!0)/1e7,maxLon:s.getInt32(110,!0)/1e7,maxLat:s.getInt32(114,!0)/1e7,centerZoom:s.getUint8(118),centerLon:s.getInt32(119,!0)/1e7,centerLat:s.getInt32(123,!0)/1e7,etag:n}}function Aw(e){const n={buf:new Uint8Array(e),pos:0},s=Nu(n),u=[];let h=0;for(let g=0;g0?u[g].offset=u[g-1].offset+u[g-1].length:u[g].offset=m-1}return u}function tD(e){const n=new DataView(e);return n.getUint16(2,!0)===2?(console.warn("PMTiles spec version 2 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),2):n.getUint16(2,!0)===1?(console.warn("PMTiles spec version 1 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),1):3}var pg=class extends Error{};function iD(e,n){return sn(this,null,function*(){const s=yield e.getBytes(0,16384);if(new DataView(s.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");if(tD(s.data)<3)return[yield Tw.getHeader(e)];const h=s.data.slice(0,J5),g=eD(h,s.etag),m=s.data.slice(g.rootDirectoryOffset,g.rootDirectoryOffset+g.rootDirectoryLength),c=`${e.getKey()}|${g.etag||""}|${g.rootDirectoryOffset}|${g.rootDirectoryLength}`,I=Aw(yield n(m,g.internalCompression));return[g,[c,I.length,I]]})}function rD(e,n,s,u,h){return sn(this,null,function*(){const g=yield e.getBytes(s,u,void 0,h.etag),m=yield n(g.data,h.internalCompression),c=Aw(m);if(c.length===0)throw new Error("Empty directory is invalid");return c})}var nD=class{constructor(e=100,n=!0,s=Cw){this.cache=new Map,this.invalidations=new Map,this.maxCacheEntries=e,this.counter=1,this.decompress=s}getHeader(e){return sn(this,null,function*(){const n=e.getKey(),s=this.cache.get(n);if(s)return s.lastUsed=this.counter++,yield s.data;const u=new Promise((h,g)=>{iD(e,this.decompress).then(m=>{m[1]&&this.cache.set(m[1][0],{lastUsed:this.counter++,data:Promise.resolve(m[1][2])}),h(m[0]),this.prune()}).catch(m=>{g(m)})});return this.cache.set(n,{lastUsed:this.counter++,data:u}),u})}getDirectory(e,n,s,u){return sn(this,null,function*(){const h=`${e.getKey()}|${u.etag||""}|${n}|${s}`,g=this.cache.get(h);if(g)return g.lastUsed=this.counter++,yield g.data;const m=new Promise((c,I)=>{rD(e,this.decompress,n,s,u).then(k=>{c(k),this.prune()}).catch(k=>{I(k)})});return this.cache.set(h,{lastUsed:this.counter++,data:m}),m})}getArrayBuffer(e,n,s,u){return sn(this,null,function*(){const h=`${e.getKey()}|${u.etag||""}|${n}|${s}`,g=this.cache.get(h);if(g)return g.lastUsed=this.counter++,yield g.data;const m=new Promise((c,I)=>{e.getBytes(n,s,void 0,u.etag).then(k=>{c(k.data),this.cache.has(h),this.prune()}).catch(k=>{I(k)})});return this.cache.set(h,{lastUsed:this.counter++,data:m}),m})}prune(){if(this.cache.size>=this.maxCacheEntries){let e=1/0,n;this.cache.forEach((s,u)=>{s.lastUsed{this.getHeader(e).then(g=>{u(),this.invalidations.delete(n)}).catch(g=>{h(g)})});this.invalidations.set(n,s)})}},Kv=class{constructor(e,n,s){typeof e=="string"?this.source=new Q5(e):this.source=e,s?this.decompress=s:this.decompress=Cw,n?this.cache=n:this.cache=new nD}getHeader(){return sn(this,null,function*(){return yield this.cache.getHeader(this.source)})}getZxyAttempt(e,n,s,u){return sn(this,null,function*(){const h=K5(e,n,s),g=yield this.cache.getHeader(this.source);if(g.specVersion<3)return Tw.getZxy(g,this.source,this.cache,e,n,s,u);if(eg.maxZoom)return;let m=g.rootDirectoryOffset,c=g.rootDirectoryLength;for(let I=0;I<=3;I++){const k=yield this.cache.getDirectory(this.source,m,c,g),M=Y5(k,h);if(M){if(M.runLength>0){const A=yield this.source.getBytes(g.tileDataOffset+M.offset,M.length,u,g.etag);return{data:yield this.decompress(A.data,g.tileCompression),cacheControl:A.cacheControl,expires:A.expires}}m=g.leafDirectoryOffset+M.offset,c=M.length}else return}throw Error("Maximum directory depth exceeded")})}getZxy(e,n,s,u){return sn(this,null,function*(){try{return yield this.getZxyAttempt(e,n,s,u)}catch(h){if(h instanceof pg)return this.cache.invalidate(this.source),yield this.getZxyAttempt(e,n,s,u);throw h}})}getMetadataAttempt(){return sn(this,null,function*(){const e=yield this.cache.getHeader(this.source),n=yield this.source.getBytes(e.jsonMetadataOffset,e.jsonMetadataLength,void 0,e.etag),s=yield this.decompress(n.data,e.internalCompression),u=new TextDecoder("utf-8");return JSON.parse(u.decode(s))})}getMetadata(){return sn(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(e){if(e instanceof pg)return this.cache.invalidate(this.source),yield this.getMetadataAttempt();throw e}})}};const Jv={LIGHT:"https://tiles.geodig.jp/styles/white.json",DARK:"https://tiles.geodig.jp/styles/black.json"},wm=[{id:8e4,minZoom:4,maxZoom:8,level:"80km",name:"80倍地域メッシュ(第1次地域区画)"},{id:1e4,minZoom:8,maxZoom:11,level:"10km",name:"10倍地域メッシュ(第2次地域区画)"},{id:5e3,minZoom:11,maxZoom:12,level:"5km",name:"5倍地域メッシュ"},{id:2e3,minZoom:12,maxZoom:13,level:"2km",name:"2倍地域メッシュ"},{id:1e3,minZoom:13,maxZoom:14,level:"1km",name:"基準地域メッシュ(第3次地域区画)"},{id:500,minZoom:14,maxZoom:15,level:"500m",name:"2分の1地域メッシュ"},{id:250,minZoom:15,maxZoom:16,level:"250m",name:"4分の1地域メッシュ"},{id:125,minZoom:16,maxZoom:18,level:"125m",name:"8分の1地域メッシュ"}],oD=e=>(Lx("data-v-cc2458a8"),e=e(),Px(),e),sD={class:"relative"},aD={class:"absolute top-2 left-2 z-10 flex items-center"},lD={class:"absolute top-2 right-2 z-10 flex items-center"},cD={class:"truncate"},uD={class:"truncate"},hD=oD(()=>lr("div",{id:"map"},null,-1)),dD=Ui({__name:"MeshMap",setup(e){const n=Ng(),s=Fo(),u=C1(),h=Lt(n.query.code||""),g=Lt(wm[0]),m=Lt(!1);let c=null;const I=Lt(!1),k=je(()=>u.preference==="light"?Jv.LIGHT:Jv.DARK),M=je(()=>Gn.isValidCode(h.value)),A=je(()=>I.value?"i-heroicons-clipboard-document-check":"i-heroicons-clipboard-document"),z=je(()=>I.value?"コピーしました":"GeoJSON をコピー");Ji(u,()=>{if(!c)return;c.setStyle(k.value);const Z=ye(c.getZoom());setTimeout(()=>K(c,Z),1e3)}),Ji(h,Z=>{if(c)if(Z){if(!Gn.isValidCode(Z))return;J(c),q(Z),s.push({query:{code:Z}})}else{const ee=ye(c.getZoom());K(c,ee),s.push({query:{}})}}),Ji(g,Z=>{if(!c)return;m.value=!1;const ee=c.getZoom();(ee<=Z.minZoom||ee>Z.maxZoom)&&c.setZoom(Z.maxZoom)}),Ji(m,Z=>{c&&(Z?(c.setMinZoom(g.value.minZoom),c.setMaxZoom(g.value.maxZoom)):(c.setMinZoom(4),c.setMaxZoom(18)))}),an(()=>{let Z=[138.517821,34.380147],ee=4,Se=8e4;if(h.value){const pe=Gn.toLatLngBounds(h.value).getCenter();Z=[pe.lng,pe.lat],ee=W(h.value),Se=Gn.getLevel(h.value)}c=new dw.Map({container:"map",style:k.value,center:Z,zoom:ee,minZoom:4,maxZoom:18});const Ee=new G5;m5.addProtocol("pmtiles",Ee.tile),c.on("load",()=>{c&&(K(c,Se),c.on("click","polygon-mesh-fill",Le=>{const pe=Le.features;h.value=pe[0].properties.code}))}),c.on("moveend",()=>{if(!c)return;const Le=ye(c.getZoom());K(c,Le)})});function q(Z){if(!c)return;const Se=Gn.toLatLngBounds(Z).getCenter(),Ee=W(Z);c.getZoom()===Ee?c.panTo([Se.lng,Se.lat]):c.flyTo({center:[Se.lng,Se.lat],zoom:Ee})}function K(Z,ee){const Se=wm.find(Ee=>Ee.id===ee);Se&&(g.value=Se),J(Z),se(Z,ee)}async function J(Z){const ee=Z.getSource("polygon-selected-mesh");if(!(ee&&(await ee.getData()).properties.code===h.value)&&(Z.getLayer("polygon-selected-mesh")&&Z.removeLayer("polygon-selected-mesh"),Z.getSource("polygon-selected-mesh")&&Z.removeSource("polygon-selected-mesh"),h.value)){Z.addSource("polygon-selected-mesh",{type:"geojson",data:Gn.toGeoJSON(h.value,{code:h.value})});const Se=Z.getLayer("polygon-mesh-line")?"polygon-mesh-line":void 0;Z.addLayer({id:"polygon-selected-mesh",type:"fill",source:"polygon-selected-mesh",paint:{"fill-color":"#f87171","fill-opacity":.5}},Se)}}async function se(Z,ee){const Se=ke(Z,ee);if(!Se)return;const Ee=Z.getSource("polygon-mesh");if(Ee){const Ae=(await Ee.getData()).features.map(De=>De.properties.code);if(Se.sort().toString()===Ae.sort().toString())return}const Le={type:"FeatureCollection",features:Se.map(Ie=>Gn.toGeoJSON(Ie,{code:Ie}))},pe={type:"FeatureCollection",features:Se.map(Ie=>{const De=Gn.toLatLngBounds(Ie).getCenter();return{type:"Feature",geometry:{type:"Point",coordinates:[De.lng,De.lat]},properties:{code:Ie}}})};Z.getLayer("polygon-mesh-line")&&Z.removeLayer("polygon-mesh-line"),Z.getLayer("polygon-mesh-fill")&&Z.removeLayer("polygon-mesh-fill"),Z.getLayer("polygon-mesh-symbol")&&Z.removeLayer("polygon-mesh-symbol"),Z.getSource("polygon-mesh")&&Z.removeSource("polygon-mesh"),Z.getSource("center-mesh")&&Z.removeSource("center-mesh"),Z.addSource("polygon-mesh",{type:"geojson",data:Le}),Z.addSource("center-mesh",{type:"geojson",data:pe}),Z.addLayer({id:"polygon-mesh-line",type:"line",source:"polygon-mesh",paint:{"line-color":"#f87171","line-width":1}}),Z.addLayer({id:"polygon-mesh-fill",type:"fill",source:"polygon-mesh",paint:{"fill-opacity":0}}),Z.addLayer({id:"polygon-mesh-symbol",type:"symbol",source:"center-mesh",layout:{"text-field":["get","code"],"text-font":["Open Sans Semibold","Arial Unicode MS Bold"],"text-size":["interpolate",["linear"],["zoom"],4,8,9,14],"text-anchor":"center","text-justify":"center","text-allow-overlap":!0},paint:{"text-halo-color":"#fff","text-halo-width":1}})}function ke(Z,ee){if(ee){const Se=Z.getBounds().getNorthEast(),Ee=Z.getBounds().getSouthWest(),Le=new fw(Se.lat,Se.lng,Ee.lat,Ee.lng);return Gn.getCodesWithinBounds(Le,ee)}return Gn.getCodes()}function ye(Z){let ee;return Z<=9?ee=8e4:Z>9&&Z<=11?ee=1e4:Z>11&&Z<=12?ee=5e3:Z>12&&Z<=13?ee=2e3:Z>13&&Z<=14?ee=1e3:Z>14&&Z<=15?ee=500:Z>15&&Z<=16?ee=250:Z>16?ee=125:ee=8e4,ee}function W(Z){switch(Gn.getLevel(Z)){case 8e4:return 9;case 1e4:return 11;case 5e3:return 12;case 2e3:return 13;case 1e3:return 14;case 500:return 15;case 250:return 16;case 125:return 17;default:return 4}}async function fe(){const Z=Gn.toGeoJSON(h.value,{code:h.value});await navigator.clipboard.writeText(JSON.stringify(Z,null,2)),I.value=!0,setTimeout(()=>I.value=!1,3e3)}return(Z,ee)=>{const Se=T1,Ee=KL,Le=s1,pe=d5;return At(),Mi("div",sD,[lr("div",aD,[ri(Ee,{modelValue:ii(h),"onUpdate:modelValue":ee[1]||(ee[1]=Ie=>gr(h)?h.value=Ie:null),name:"selectedCode",placeholder:"メッシュコード",icon:"i-heroicons-magnifying-glass-20-solid",autocomplete:"off",size:"md",ui:{icon:{trailing:{pointer:""}}}},{trailing:Rr(()=>[RS(ri(Se,{color:"gray",variant:"link",icon:"i-heroicons-x-mark-20-solid",padded:!1,onClick:ee[0]||(ee[0]=Ie=>h.value="")},null,512),[[PI,ii(h)!==""]])]),_:1},8,["modelValue"]),ii(M)?(At(),ki(Se,{key:0,icon:ii(A),color:"white",variant:"solid",size:"md",class:"ml-2",onClick:fe},{default:Rr(()=>[hs(nn(ii(z)),1)]),_:1},8,["icon"])):Dr("",!0)]),lr("div",lD,[ri(pe,{modelValue:ii(g),"onUpdate:modelValue":ee[2]||(ee[2]=Ie=>gr(g)?g.value=Ie:null),options:ii(wm),class:"w-80",disabled:ii(m)},{label:Rr(()=>[ri(Le,{variant:"outline",class:"w-12 justify-center"},{default:Rr(()=>[hs(nn(ii(g).level),1)]),_:1}),lr("span",cD,nn(ii(g).name),1)]),option:Rr(({option:Ie})=>[ri(Le,{variant:"outline",class:"w-12 justify-center"},{default:Rr(()=>[hs(nn(Ie.level),1)]),_:2},1024),lr("span",uD,nn(Ie.name),1)]),_:1},8,["modelValue","options","disabled"])]),hD])}}}),fD=yo(dD,[["__scopeId","data-v-cc2458a8"]]),pD={};function mD(e,n){const s=GL,u=fD;return At(),Mi("div",null,[ri(s),lr("main",null,[ri(u)])])}const gD=yo(pD,[["render",mD]]),yD={__name:"nuxt-error-page",props:{error:Object},setup(e){const s=e.error;s.stack&&s.stack.split(` +`),ie=S.createShader(S.FRAGMENT_SHADER);if(S.isContextLost())return void(this.failedToCreate=!0);if(S.shaderSource(ie,le),S.compileShader(ie),!S.getShaderParameter(ie,S.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${S.getShaderInfoLog(ie)}`);S.attachShader(this.program,ie);const ve=S.createShader(S.VERTEX_SHADER);if(S.isContextLost())return void(this.failedToCreate=!0);if(S.shaderSource(ve,me),S.compileShader(ve),!S.getShaderParameter(ve,S.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${S.getShaderInfoLog(ve)}`);S.attachShader(this.program,ve),this.attributes={};const Te={};this.numAttributes=O.length;for(let Pe=0;Pe({u_depth:new c.aH(Pe,Ve.u_depth),u_terrain:new c.aH(Pe,Ve.u_terrain),u_terrain_dim:new c.aI(Pe,Ve.u_terrain_dim),u_terrain_matrix:new c.aJ(Pe,Ve.u_terrain_matrix),u_terrain_unpack:new c.aK(Pe,Ve.u_terrain_unpack),u_terrain_exaggeration:new c.aI(Pe,Ve.u_terrain_exaggeration)}))(i,Te),this.binderUniforms=d?d.getUniforms(i,Te):[]}draw(i,a,d,p,v,w,S,T,P,O,R,j,H,X,ne,Y,le,me){const ie=i.gl;if(this.failedToCreate)return;if(i.program.set(this.program),i.setDepthMode(d),i.setStencilMode(p),i.setColorMode(v),i.setCullFace(w),T){i.activeTexture.set(ie.TEXTURE2),ie.bindTexture(ie.TEXTURE_2D,T.depthTexture),i.activeTexture.set(ie.TEXTURE3),ie.bindTexture(ie.TEXTURE_2D,T.texture);for(const Te in this.terrainUniforms)this.terrainUniforms[Te].set(T[Te])}for(const Te in this.fixedUniforms)this.fixedUniforms[Te].set(S[Te]);ne&&ne.setUniforms(i,this.binderUniforms,H,{zoom:X});let ve=0;switch(a){case ie.LINES:ve=2;break;case ie.TRIANGLES:ve=3;break;case ie.LINE_STRIP:ve=1}for(const Te of j.get()){const Pe=Te.vaos||(Te.vaos={});(Pe[P]||(Pe[P]=new tl)).bind(i,this,O,ne?ne.getPaintVertexBuffers():[],R,Te.vertexOffset,Y,le,me),ie.drawElements(a,Te.primitiveLength*ve,ie.UNSIGNED_SHORT,Te.primitiveOffset*ve*2)}}}function il(_,i,a){const d=1/Dt(a,1,i.transform.tileZoom),p=Math.pow(2,a.tileID.overscaledZ),v=a.tileSize*Math.pow(2,i.transform.tileZoom)/p,w=v*(a.tileID.canonical.x+a.tileID.wrap*p),S=v*a.tileID.canonical.y;return{u_image:0,u_texsize:a.imageAtlasTexture.size,u_scale:[d,_.fromScale,_.toScale],u_fade:_.t,u_pixel_coord_upper:[w>>16,S>>16],u_pixel_coord_lower:[65535&w,65535&S]}}const la=(_,i,a,d)=>{const p=i.style.light,v=p.properties.get("position"),w=[v.x,v.y,v.z],S=function(){var P=new c.A(9);return c.A!=Float32Array&&(P[1]=0,P[2]=0,P[3]=0,P[5]=0,P[6]=0,P[7]=0),P[0]=1,P[4]=1,P[8]=1,P}();p.properties.get("anchor")==="viewport"&&function(P,O){var R=Math.sin(O),j=Math.cos(O);P[0]=j,P[1]=R,P[2]=0,P[3]=-R,P[4]=j,P[5]=0,P[6]=0,P[7]=0,P[8]=1}(S,-i.transform.angle),function(P,O,R){var j=O[0],H=O[1],X=O[2];P[0]=j*R[0]+H*R[3]+X*R[6],P[1]=j*R[1]+H*R[4]+X*R[7],P[2]=j*R[2]+H*R[5]+X*R[8]}(w,w,S);const T=p.properties.get("color");return{u_matrix:_,u_lightpos:w,u_lightintensity:p.properties.get("intensity"),u_lightcolor:[T.r,T.g,T.b],u_vertical_gradient:+a,u_opacity:d}},Tc=(_,i,a,d,p,v,w)=>c.e(la(_,i,a,d),il(v,i,w),{u_height_factor:-Math.pow(2,p.overscaledZ)/w.tileSize/8}),rl=_=>({u_matrix:_}),ca=(_,i,a,d)=>c.e(rl(_),il(a,i,d)),nl=(_,i)=>({u_matrix:_,u_world:i}),ua=(_,i,a,d,p)=>c.e(ca(_,i,a,d),{u_world:p}),Uf=(_,i,a,d)=>{const p=_.transform;let v,w;if(d.paint.get("circle-pitch-alignment")==="map"){const S=Dt(a,1,p.zoom);v=!0,w=[S,S]}else v=!1,w=p.pixelsToGLUnits;return{u_camera_to_center_distance:p.cameraToCenterDistance,u_scale_with_map:+(d.paint.get("circle-pitch-scale")==="map"),u_matrix:_.translatePosMatrix(i.posMatrix,a,d.paint.get("circle-translate"),d.paint.get("circle-translate-anchor")),u_pitch_with_map:+v,u_device_pixel_ratio:_.pixelRatio,u_extrude_scale:w}},qf=(_,i,a)=>({u_matrix:_,u_inv_matrix:i,u_camera_to_center_distance:a.cameraToCenterDistance,u_viewport_size:[a.width,a.height]}),Cc=(_,i,a=1)=>({u_matrix:_,u_color:i,u_overlay:0,u_overlay_scale:a}),yh=_=>({u_matrix:_}),Uo=(_,i,a,d)=>({u_matrix:_,u_extrude_scale:Dt(i,1,a),u_intensity:d});function ol(_,i){const a=Math.pow(2,i.canonical.z),d=i.canonical.y;return[new c.Y(0,d/a).toLngLat().lat,new c.Y(0,(d+1)/a).toLngLat().lat]}const Fr=(_,i,a,d)=>{const p=_.transform;return{u_matrix:kc(_,i,a,d),u_ratio:1/Dt(i,1,p.zoom),u_device_pixel_ratio:_.pixelRatio,u_units_to_pixels:[1/p.pixelsToGLUnits[0],1/p.pixelsToGLUnits[1]]}},un=(_,i,a,d,p)=>c.e(Fr(_,i,a,p),{u_image:0,u_image_height:d}),Ac=(_,i,a,d,p)=>{const v=_.transform,w=Mc(i,v);return{u_matrix:kc(_,i,a,p),u_texsize:i.imageAtlasTexture.size,u_ratio:1/Dt(i,1,v.zoom),u_device_pixel_ratio:_.pixelRatio,u_image:0,u_scale:[w,d.fromScale,d.toScale],u_fade:d.t,u_units_to_pixels:[1/v.pixelsToGLUnits[0],1/v.pixelsToGLUnits[1]]}},sl=(_,i,a,d,p,v)=>{const w=_.lineAtlas,S=Mc(i,_.transform),T=a.layout.get("line-cap")==="round",P=w.getDash(d.from,T),O=w.getDash(d.to,T),R=P.width*p.fromScale,j=O.width*p.toScale;return c.e(Fr(_,i,a,v),{u_patternscale_a:[S/R,-P.height/2],u_patternscale_b:[S/j,-O.height/2],u_sdfgamma:w.width/(256*Math.min(R,j)*_.pixelRatio)/2,u_image:0,u_tex_y_a:P.y,u_tex_y_b:O.y,u_mix:p.t})};function Mc(_,i){return 1/Dt(_,1,i.tileZoom)}function kc(_,i,a,d){return _.translatePosMatrix(d?d.posMatrix:i.tileID.posMatrix,i,a.paint.get("line-translate"),a.paint.get("line-translate-anchor"))}const _s=(_,i,a,d,p)=>{return{u_matrix:_,u_tl_parent:i,u_scale_parent:a,u_buffer_scale:1,u_fade_t:d.mix,u_opacity:d.opacity*p.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:p.paint.get("raster-brightness-min"),u_brightness_high:p.paint.get("raster-brightness-max"),u_saturation_factor:(w=p.paint.get("raster-saturation"),w>0?1-1/(1.001-w):-w),u_contrast_factor:(v=p.paint.get("raster-contrast"),v>0?1/(1-v):1+v),u_spin_weights:Hf(p.paint.get("raster-hue-rotate"))};var v,w};function Hf(_){_*=Math.PI/180;const i=Math.sin(_),a=Math.cos(_);return[(2*a+1)/3,(-Math.sqrt(3)*i-a+1)/3,(Math.sqrt(3)*i-a+1)/3]}const _h=(_,i,a,d,p,v,w,S,T,P,O,R,j,H)=>{const X=w.transform;return{u_is_size_zoom_constant:+(_==="constant"||_==="source"),u_is_size_feature_constant:+(_==="constant"||_==="camera"),u_size_t:i?i.uSizeT:0,u_size:i?i.uSize:0,u_camera_to_center_distance:X.cameraToCenterDistance,u_pitch:X.pitch/360*2*Math.PI,u_rotate_symbol:+a,u_aspect_ratio:X.width/X.height,u_fade_change:w.options.fadeDuration?w.symbolFadeChange:1,u_matrix:S,u_label_plane_matrix:T,u_coord_matrix:P,u_is_text:+R,u_pitch_with_map:+d,u_is_along_line:p,u_is_variable_anchor:v,u_texsize:j,u_texture:0,u_translation:O,u_pitched_scale:H}},vh=(_,i,a,d,p,v,w,S,T,P,O,R,j,H,X)=>{const ne=w.transform;return c.e(_h(_,i,a,d,p,v,w,S,T,P,O,R,j,X),{u_gamma_scale:d?Math.cos(ne._pitch)*ne.cameraToCenterDistance:1,u_device_pixel_ratio:w.pixelRatio,u_is_halo:+H})},Gf=(_,i,a,d,p,v,w,S,T,P,O,R,j,H)=>c.e(vh(_,i,a,d,p,v,w,S,T,P,O,!0,R,!0,H),{u_texsize_icon:j,u_texture_icon:1}),Wf=(_,i,a)=>({u_matrix:_,u_opacity:i,u_color:a}),Zf=(_,i,a,d,p,v)=>c.e(function(w,S,T,P){const O=T.imageManager.getPattern(w.from.toString()),R=T.imageManager.getPattern(w.to.toString()),{width:j,height:H}=T.imageManager.getPixelSize(),X=Math.pow(2,P.tileID.overscaledZ),ne=P.tileSize*Math.pow(2,T.transform.tileZoom)/X,Y=ne*(P.tileID.canonical.x+P.tileID.wrap*X),le=ne*P.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:O.tl,u_pattern_br_a:O.br,u_pattern_tl_b:R.tl,u_pattern_br_b:R.br,u_texsize:[j,H],u_mix:S.t,u_pattern_size_a:O.displaySize,u_pattern_size_b:R.displaySize,u_scale_a:S.fromScale,u_scale_b:S.toScale,u_tile_units_to_pixels:1/Dt(P,1,T.transform.tileZoom),u_pixel_coord_upper:[Y>>16,le>>16],u_pixel_coord_lower:[65535&Y,65535&le]}}(d,v,a,p),{u_matrix:_,u_opacity:i}),al={fillExtrusion:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_lightpos:new c.aL(_,i.u_lightpos),u_lightintensity:new c.aI(_,i.u_lightintensity),u_lightcolor:new c.aL(_,i.u_lightcolor),u_vertical_gradient:new c.aI(_,i.u_vertical_gradient),u_opacity:new c.aI(_,i.u_opacity)}),fillExtrusionPattern:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_lightpos:new c.aL(_,i.u_lightpos),u_lightintensity:new c.aI(_,i.u_lightintensity),u_lightcolor:new c.aL(_,i.u_lightcolor),u_vertical_gradient:new c.aI(_,i.u_vertical_gradient),u_height_factor:new c.aI(_,i.u_height_factor),u_image:new c.aH(_,i.u_image),u_texsize:new c.aM(_,i.u_texsize),u_pixel_coord_upper:new c.aM(_,i.u_pixel_coord_upper),u_pixel_coord_lower:new c.aM(_,i.u_pixel_coord_lower),u_scale:new c.aL(_,i.u_scale),u_fade:new c.aI(_,i.u_fade),u_opacity:new c.aI(_,i.u_opacity)}),fill:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix)}),fillPattern:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_image:new c.aH(_,i.u_image),u_texsize:new c.aM(_,i.u_texsize),u_pixel_coord_upper:new c.aM(_,i.u_pixel_coord_upper),u_pixel_coord_lower:new c.aM(_,i.u_pixel_coord_lower),u_scale:new c.aL(_,i.u_scale),u_fade:new c.aI(_,i.u_fade)}),fillOutline:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_world:new c.aM(_,i.u_world)}),fillOutlinePattern:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_world:new c.aM(_,i.u_world),u_image:new c.aH(_,i.u_image),u_texsize:new c.aM(_,i.u_texsize),u_pixel_coord_upper:new c.aM(_,i.u_pixel_coord_upper),u_pixel_coord_lower:new c.aM(_,i.u_pixel_coord_lower),u_scale:new c.aL(_,i.u_scale),u_fade:new c.aI(_,i.u_fade)}),circle:(_,i)=>({u_camera_to_center_distance:new c.aI(_,i.u_camera_to_center_distance),u_scale_with_map:new c.aH(_,i.u_scale_with_map),u_pitch_with_map:new c.aH(_,i.u_pitch_with_map),u_extrude_scale:new c.aM(_,i.u_extrude_scale),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_matrix:new c.aJ(_,i.u_matrix)}),collisionBox:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_pixel_extrude_scale:new c.aM(_,i.u_pixel_extrude_scale)}),collisionCircle:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_inv_matrix:new c.aJ(_,i.u_inv_matrix),u_camera_to_center_distance:new c.aI(_,i.u_camera_to_center_distance),u_viewport_size:new c.aM(_,i.u_viewport_size)}),debug:(_,i)=>({u_color:new c.aN(_,i.u_color),u_matrix:new c.aJ(_,i.u_matrix),u_overlay:new c.aH(_,i.u_overlay),u_overlay_scale:new c.aI(_,i.u_overlay_scale)}),clippingMask:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix)}),heatmap:(_,i)=>({u_extrude_scale:new c.aI(_,i.u_extrude_scale),u_intensity:new c.aI(_,i.u_intensity),u_matrix:new c.aJ(_,i.u_matrix)}),heatmapTexture:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_world:new c.aM(_,i.u_world),u_image:new c.aH(_,i.u_image),u_color_ramp:new c.aH(_,i.u_color_ramp),u_opacity:new c.aI(_,i.u_opacity)}),hillshade:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_image:new c.aH(_,i.u_image),u_latrange:new c.aM(_,i.u_latrange),u_light:new c.aM(_,i.u_light),u_shadow:new c.aN(_,i.u_shadow),u_highlight:new c.aN(_,i.u_highlight),u_accent:new c.aN(_,i.u_accent)}),hillshadePrepare:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_image:new c.aH(_,i.u_image),u_dimension:new c.aM(_,i.u_dimension),u_zoom:new c.aI(_,i.u_zoom),u_unpack:new c.aK(_,i.u_unpack)}),line:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_ratio:new c.aI(_,i.u_ratio),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_units_to_pixels:new c.aM(_,i.u_units_to_pixels)}),lineGradient:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_ratio:new c.aI(_,i.u_ratio),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_units_to_pixels:new c.aM(_,i.u_units_to_pixels),u_image:new c.aH(_,i.u_image),u_image_height:new c.aI(_,i.u_image_height)}),linePattern:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_texsize:new c.aM(_,i.u_texsize),u_ratio:new c.aI(_,i.u_ratio),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_image:new c.aH(_,i.u_image),u_units_to_pixels:new c.aM(_,i.u_units_to_pixels),u_scale:new c.aL(_,i.u_scale),u_fade:new c.aI(_,i.u_fade)}),lineSDF:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_ratio:new c.aI(_,i.u_ratio),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_units_to_pixels:new c.aM(_,i.u_units_to_pixels),u_patternscale_a:new c.aM(_,i.u_patternscale_a),u_patternscale_b:new c.aM(_,i.u_patternscale_b),u_sdfgamma:new c.aI(_,i.u_sdfgamma),u_image:new c.aH(_,i.u_image),u_tex_y_a:new c.aI(_,i.u_tex_y_a),u_tex_y_b:new c.aI(_,i.u_tex_y_b),u_mix:new c.aI(_,i.u_mix)}),raster:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_tl_parent:new c.aM(_,i.u_tl_parent),u_scale_parent:new c.aI(_,i.u_scale_parent),u_buffer_scale:new c.aI(_,i.u_buffer_scale),u_fade_t:new c.aI(_,i.u_fade_t),u_opacity:new c.aI(_,i.u_opacity),u_image0:new c.aH(_,i.u_image0),u_image1:new c.aH(_,i.u_image1),u_brightness_low:new c.aI(_,i.u_brightness_low),u_brightness_high:new c.aI(_,i.u_brightness_high),u_saturation_factor:new c.aI(_,i.u_saturation_factor),u_contrast_factor:new c.aI(_,i.u_contrast_factor),u_spin_weights:new c.aL(_,i.u_spin_weights)}),symbolIcon:(_,i)=>({u_is_size_zoom_constant:new c.aH(_,i.u_is_size_zoom_constant),u_is_size_feature_constant:new c.aH(_,i.u_is_size_feature_constant),u_size_t:new c.aI(_,i.u_size_t),u_size:new c.aI(_,i.u_size),u_camera_to_center_distance:new c.aI(_,i.u_camera_to_center_distance),u_pitch:new c.aI(_,i.u_pitch),u_rotate_symbol:new c.aH(_,i.u_rotate_symbol),u_aspect_ratio:new c.aI(_,i.u_aspect_ratio),u_fade_change:new c.aI(_,i.u_fade_change),u_matrix:new c.aJ(_,i.u_matrix),u_label_plane_matrix:new c.aJ(_,i.u_label_plane_matrix),u_coord_matrix:new c.aJ(_,i.u_coord_matrix),u_is_text:new c.aH(_,i.u_is_text),u_pitch_with_map:new c.aH(_,i.u_pitch_with_map),u_is_along_line:new c.aH(_,i.u_is_along_line),u_is_variable_anchor:new c.aH(_,i.u_is_variable_anchor),u_texsize:new c.aM(_,i.u_texsize),u_texture:new c.aH(_,i.u_texture),u_translation:new c.aM(_,i.u_translation),u_pitched_scale:new c.aI(_,i.u_pitched_scale)}),symbolSDF:(_,i)=>({u_is_size_zoom_constant:new c.aH(_,i.u_is_size_zoom_constant),u_is_size_feature_constant:new c.aH(_,i.u_is_size_feature_constant),u_size_t:new c.aI(_,i.u_size_t),u_size:new c.aI(_,i.u_size),u_camera_to_center_distance:new c.aI(_,i.u_camera_to_center_distance),u_pitch:new c.aI(_,i.u_pitch),u_rotate_symbol:new c.aH(_,i.u_rotate_symbol),u_aspect_ratio:new c.aI(_,i.u_aspect_ratio),u_fade_change:new c.aI(_,i.u_fade_change),u_matrix:new c.aJ(_,i.u_matrix),u_label_plane_matrix:new c.aJ(_,i.u_label_plane_matrix),u_coord_matrix:new c.aJ(_,i.u_coord_matrix),u_is_text:new c.aH(_,i.u_is_text),u_pitch_with_map:new c.aH(_,i.u_pitch_with_map),u_is_along_line:new c.aH(_,i.u_is_along_line),u_is_variable_anchor:new c.aH(_,i.u_is_variable_anchor),u_texsize:new c.aM(_,i.u_texsize),u_texture:new c.aH(_,i.u_texture),u_gamma_scale:new c.aI(_,i.u_gamma_scale),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_is_halo:new c.aH(_,i.u_is_halo),u_translation:new c.aM(_,i.u_translation),u_pitched_scale:new c.aI(_,i.u_pitched_scale)}),symbolTextAndIcon:(_,i)=>({u_is_size_zoom_constant:new c.aH(_,i.u_is_size_zoom_constant),u_is_size_feature_constant:new c.aH(_,i.u_is_size_feature_constant),u_size_t:new c.aI(_,i.u_size_t),u_size:new c.aI(_,i.u_size),u_camera_to_center_distance:new c.aI(_,i.u_camera_to_center_distance),u_pitch:new c.aI(_,i.u_pitch),u_rotate_symbol:new c.aH(_,i.u_rotate_symbol),u_aspect_ratio:new c.aI(_,i.u_aspect_ratio),u_fade_change:new c.aI(_,i.u_fade_change),u_matrix:new c.aJ(_,i.u_matrix),u_label_plane_matrix:new c.aJ(_,i.u_label_plane_matrix),u_coord_matrix:new c.aJ(_,i.u_coord_matrix),u_is_text:new c.aH(_,i.u_is_text),u_pitch_with_map:new c.aH(_,i.u_pitch_with_map),u_is_along_line:new c.aH(_,i.u_is_along_line),u_is_variable_anchor:new c.aH(_,i.u_is_variable_anchor),u_texsize:new c.aM(_,i.u_texsize),u_texsize_icon:new c.aM(_,i.u_texsize_icon),u_texture:new c.aH(_,i.u_texture),u_texture_icon:new c.aH(_,i.u_texture_icon),u_gamma_scale:new c.aI(_,i.u_gamma_scale),u_device_pixel_ratio:new c.aI(_,i.u_device_pixel_ratio),u_is_halo:new c.aH(_,i.u_is_halo),u_translation:new c.aM(_,i.u_translation),u_pitched_scale:new c.aI(_,i.u_pitched_scale)}),background:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_opacity:new c.aI(_,i.u_opacity),u_color:new c.aN(_,i.u_color)}),backgroundPattern:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_opacity:new c.aI(_,i.u_opacity),u_image:new c.aH(_,i.u_image),u_pattern_tl_a:new c.aM(_,i.u_pattern_tl_a),u_pattern_br_a:new c.aM(_,i.u_pattern_br_a),u_pattern_tl_b:new c.aM(_,i.u_pattern_tl_b),u_pattern_br_b:new c.aM(_,i.u_pattern_br_b),u_texsize:new c.aM(_,i.u_texsize),u_mix:new c.aI(_,i.u_mix),u_pattern_size_a:new c.aM(_,i.u_pattern_size_a),u_pattern_size_b:new c.aM(_,i.u_pattern_size_b),u_scale_a:new c.aI(_,i.u_scale_a),u_scale_b:new c.aI(_,i.u_scale_b),u_pixel_coord_upper:new c.aM(_,i.u_pixel_coord_upper),u_pixel_coord_lower:new c.aM(_,i.u_pixel_coord_lower),u_tile_units_to_pixels:new c.aI(_,i.u_tile_units_to_pixels)}),terrain:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_texture:new c.aH(_,i.u_texture),u_ele_delta:new c.aI(_,i.u_ele_delta)}),terrainDepth:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_ele_delta:new c.aI(_,i.u_ele_delta)}),terrainCoords:(_,i)=>({u_matrix:new c.aJ(_,i.u_matrix),u_texture:new c.aH(_,i.u_texture),u_terrain_coords_id:new c.aI(_,i.u_terrain_coords_id),u_ele_delta:new c.aI(_,i.u_ele_delta)})};class Lc{constructor(i,a,d){this.context=i;const p=i.gl;this.buffer=p.createBuffer(),this.dynamicDraw=!!d,this.context.unbindVAO(),i.bindElementBuffer.set(this.buffer),p.bufferData(p.ELEMENT_ARRAY_BUFFER,a.arrayBuffer,this.dynamicDraw?p.DYNAMIC_DRAW:p.STATIC_DRAW),this.dynamicDraw||delete a.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(i){const a=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),a.bufferSubData(a.ELEMENT_ARRAY_BUFFER,0,i.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const ll={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Pc{constructor(i,a,d,p){this.length=a.length,this.attributes=d,this.itemSize=a.bytesPerElement,this.dynamicDraw=p,this.context=i;const v=i.gl;this.buffer=v.createBuffer(),i.bindVertexBuffer.set(this.buffer),v.bufferData(v.ARRAY_BUFFER,a.arrayBuffer,this.dynamicDraw?v.DYNAMIC_DRAW:v.STATIC_DRAW),this.dynamicDraw||delete a.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(i){if(i.length!==this.length)throw new Error(`Length of new data is ${i.length}, which doesn't match current length of ${this.length}`);const a=this.context.gl;this.bind(),a.bufferSubData(a.ARRAY_BUFFER,0,i.arrayBuffer)}enableAttributes(i,a){for(let d=0;d0){const Pe=c.F();c.aQ(Pe,ie.placementInvProjMatrix,_.transform.glCoordMatrix),c.aQ(Pe,Pe,ie.placementViewportMatrix),T.push({circleArray:Te,circleOffset:O,transform:me.posMatrix,invTransform:Pe,coord:me}),P+=Te.length/4,O=P}ve&&S.draw(v,w.LINES,Xt.disabled,Oi.disabled,_.colorModeForRenderPass(),Pi.disabled,{u_matrix:me.posMatrix,u_pixel_extrude_scale:[1/(R=_.transform).width,1/R.height]},_.style.map.terrain&&_.style.map.terrain.getTerrainData(me),a.id,ve.layoutVertexBuffer,ve.indexBuffer,ve.segments,null,_.transform.zoom,null,null,ve.collisionVertexBuffer)}var R;if(!p||!T.length)return;const j=_.useProgram("collisionCircle"),H=new c.aR;H.resize(4*P),H._trim();let X=0;for(const le of T)for(let me=0;me=0&&(le[ie.associatedIconIndex]={shiftedAnchor:kt,angle:Ti})}else It(ie.numGlyphs,ne)}if(P){Y.clear();const me=_.icon.placedSymbolArray;for(let ie=0;ie_.style.map.terrain.getElevation(Je,uu,sr):null,ks=a.layout.get("text-rotation-alignment")==="map";N(yt,Je.posMatrix,_,p,Jo,As,le,P,ks,ne,Je.toUnwrapped(),X.width,X.height,Yo,Bi)}const _r=Je.posMatrix,Cn=p&&Ke||cu,Eo=me||Cn?Nc:Jo,Ms=Pl,Mr=at&&a.paint.get(p?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let kr;kr=at?yt.iconsInText?Gf(kt.kind,Yt,ie,le,me,Cn,_,_r,Eo,Ms,Yo,Tr,Vr,ht):vh(kt.kind,Yt,ie,le,me,Cn,_,_r,Eo,Ms,Yo,p,Tr,!0,ht):_h(kt.kind,Yt,ie,le,me,Cn,_,_r,Eo,Ms,Yo,p,Tr,ht);const dr={program:Wt,buffers:Rt,uniformValues:kr,atlasTexture:In,atlasTextureIcon:Cr,atlasInterpolation:Ai,atlasInterpolationIcon:Jr,isSDF:at,hasHalo:Mr};if(Te&&yt.canOverlap){Pe=!0;const Bi=Rt.segments.get();for(const ks of Bi)ut.push({segments:new c.$([ks]),sortKey:ks.sortKey,state:dr,terrainData:Ci})}else ut.push({segments:Rt.segments,sortKey:0,state:dr,terrainData:Ci})}Pe&&ut.sort((Je,et)=>Je.sortKey-et.sortKey);for(const Je of ut){const et=Je.state;if(j.activeTexture.set(H.TEXTURE0),et.atlasTexture.bind(et.atlasInterpolation,H.CLAMP_TO_EDGE),et.atlasTextureIcon&&(j.activeTexture.set(H.TEXTURE1),et.atlasTextureIcon&&et.atlasTextureIcon.bind(et.atlasInterpolationIcon,H.CLAMP_TO_EDGE)),et.isSDF){const yt=et.uniformValues;et.hasHalo&&(yt.u_is_halo=1,pl(et.buffers,Je.segments,a,_,et.program,Ve,O,R,yt,Je.terrainData)),yt.u_is_halo=0}pl(et.buffers,Je.segments,a,_,et.program,Ve,O,R,et.uniformValues,Je.terrainData)}}function pl(_,i,a,d,p,v,w,S,T,P){const O=d.context;p.draw(O,O.gl.TRIANGLES,v,w,S,Pi.disabled,T,P,a.id,_.layoutVertexBuffer,_.indexBuffer,i,a.paint,d.transform.zoom,_.programConfigurations.get(a.id),_.dynamicLayoutVertexBuffer,_.opacityVertexBuffer)}function _o(_,i,a,d,p){if(!a||!d||!d.imageAtlas)return;const v=d.imageAtlas.patternPositions;let w=v[a.to.toString()],S=v[a.from.toString()];if(!w&&S&&(w=S),!S&&w&&(S=w),!w||!S){const T=p.getPaintProperty(i);w=v[T],S=v[T]}w&&S&&_.setConstantPatternPositions(w,S)}function Ho(_,i,a,d,p,v,w){const S=_.context.gl,T="fill-pattern",P=a.paint.get(T),O=P&&P.constantOr(1),R=a.getCrossfadeParameters();let j,H,X,ne,Y;w?(H=O&&!a.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",j=S.LINES):(H=O?"fillPattern":"fill",j=S.TRIANGLES);const le=P.constantOr(null);for(const me of d){const ie=i.getTile(me);if(O&&!ie.patternsLoaded())continue;const ve=ie.getBucket(a);if(!ve)continue;const Te=ve.programConfigurations.get(a.id),Pe=_.useProgram(H,Te),Ve=_.style.map.terrain&&_.style.map.terrain.getTerrainData(me);O&&(_.context.activeTexture.set(S.TEXTURE0),ie.imageAtlasTexture.bind(S.LINEAR,S.CLAMP_TO_EDGE),Te.updatePaintBuffers(R)),_o(Te,T,le,ie,a);const Ke=Ve?me:null,ut=_.translatePosMatrix(Ke?Ke.posMatrix:me.posMatrix,ie,a.paint.get("fill-translate"),a.paint.get("fill-translate-anchor"));if(w){ne=ve.indexBuffer2,Y=ve.segments2;const ht=[S.drawingBufferWidth,S.drawingBufferHeight];X=H==="fillOutlinePattern"&&O?ua(ut,_,R,ie,ht):nl(ut,ht)}else ne=ve.indexBuffer,Y=ve.segments,X=O?ca(ut,_,R,ie):rl(ut);Pe.draw(_.context,j,p,_.stencilModeForClipping(me),v,Pi.disabled,X,Ve,a.id,ve.layoutVertexBuffer,ne,Y,a.paint,_.transform.zoom,Te)}}function Kr(_,i,a,d,p,v,w){const S=_.context,T=S.gl,P="fill-extrusion-pattern",O=a.paint.get(P),R=O.constantOr(1),j=a.getCrossfadeParameters(),H=a.paint.get("fill-extrusion-opacity"),X=O.constantOr(null);for(const ne of d){const Y=i.getTile(ne),le=Y.getBucket(a);if(!le)continue;const me=_.style.map.terrain&&_.style.map.terrain.getTerrainData(ne),ie=le.programConfigurations.get(a.id),ve=_.useProgram(R?"fillExtrusionPattern":"fillExtrusion",ie);R&&(_.context.activeTexture.set(T.TEXTURE0),Y.imageAtlasTexture.bind(T.LINEAR,T.CLAMP_TO_EDGE),ie.updatePaintBuffers(j)),_o(ie,P,X,Y,a);const Te=_.translatePosMatrix(ne.posMatrix,Y,a.paint.get("fill-extrusion-translate"),a.paint.get("fill-extrusion-translate-anchor")),Pe=a.paint.get("fill-extrusion-vertical-gradient"),Ve=R?Tc(Te,_,Pe,H,ne,j,Y):la(Te,_,Pe,H);ve.draw(S,S.gl.TRIANGLES,p,v,w,Pi.backCCW,Ve,me,a.id,le.layoutVertexBuffer,le.indexBuffer,le.segments,a.paint,_.transform.zoom,ie,_.style.map.terrain&&le.centroidVertexBuffer)}}function Dh(_,i,a,d,p,v,w){const S=_.context,T=S.gl,P=a.fbo;if(!P)return;const O=_.useProgram("hillshade"),R=_.style.map.terrain&&_.style.map.terrain.getTerrainData(i);S.activeTexture.set(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,P.colorAttachment.get()),O.draw(S,T.TRIANGLES,p,v,w,Pi.disabled,((j,H,X,ne)=>{const Y=X.paint.get("hillshade-shadow-color"),le=X.paint.get("hillshade-highlight-color"),me=X.paint.get("hillshade-accent-color");let ie=X.paint.get("hillshade-illumination-direction")*(Math.PI/180);X.paint.get("hillshade-illumination-anchor")==="viewport"&&(ie-=j.transform.angle);const ve=!j.options.moving;return{u_matrix:ne?ne.posMatrix:j.transform.calculatePosMatrix(H.tileID.toUnwrapped(),ve),u_image:0,u_latrange:ol(0,H.tileID),u_light:[X.paint.get("hillshade-exaggeration"),ie],u_shadow:Y,u_highlight:le,u_accent:me}})(_,a,d,R?i:null),R,d.id,_.rasterBoundsBuffer,_.quadTriangleIndexBuffer,_.rasterBoundsSegments)}function Rh(_,i,a,d,p,v){const w=_.context,S=w.gl,T=i.dem;if(T&&T.data){const P=T.dim,O=T.stride,R=T.getPixels();if(w.activeTexture.set(S.TEXTURE1),w.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture=i.demTexture||_.getTileTexture(O),i.demTexture){const H=i.demTexture;H.update(R,{premultiply:!1}),H.bind(S.NEAREST,S.CLAMP_TO_EDGE)}else i.demTexture=new Ie(w,R,S.RGBA,{premultiply:!1}),i.demTexture.bind(S.NEAREST,S.CLAMP_TO_EDGE);w.activeTexture.set(S.TEXTURE0);let j=i.fbo;if(!j){const H=new Ie(w,{width:P,height:P,data:null},S.RGBA);H.bind(S.LINEAR,S.CLAMP_TO_EDGE),j=i.fbo=w.createFramebuffer(P,P,!0,!1),j.colorAttachment.set(H.texture)}w.bindFramebuffer.set(j.framebuffer),w.viewport.set([0,0,P,P]),_.useProgram("hillshadePrepare").draw(w,S.TRIANGLES,d,p,v,Pi.disabled,((H,X)=>{const ne=X.stride,Y=c.F();return c.aO(Y,0,c.W,-c.W,0,0,1),c.H(Y,Y,[0,-c.W,0]),{u_matrix:Y,u_image:1,u_dimension:[ne,ne],u_zoom:H.overscaledZ,u_unpack:X.getUnpackVector()}})(i.tileID,T),null,a.id,_.rasterBoundsBuffer,_.quadTriangleIndexBuffer,_.rasterBoundsSegments),i.needsHillshadePrepare=!1}}function jc(_,i,a,d,p,v){const w=d.paint.get("raster-fade-duration");if(!v&&w>0){const S=A.now(),T=(S-_.timeAdded)/w,P=i?(S-i.timeAdded)/w:-1,O=a.getSource(),R=p.coveringZoomLevel({tileSize:O.tileSize,roundZoom:O.roundZoom}),j=!i||Math.abs(i.tileID.overscaledZ-R)>Math.abs(_.tileID.overscaledZ-R),H=j&&_.refreshedUponExpiration?1:c.ac(j?T:1-P,0,1);return _.refreshedUponExpiration&&T>=1&&(_.refreshedUponExpiration=!1),i?{opacity:1,mix:1-H}:{opacity:H,mix:0}}return{opacity:1,mix:0}}const Go=new c.aP(1,0,0,1),ml=new c.aP(0,1,0,1),gl=new c.aP(0,0,1,1),ya=new c.aP(1,0,1,1),yl=new c.aP(0,1,1,1);function $c(_,i,a,d){no(_,0,i+a/2,_.transform.width,a,d)}function Wo(_,i,a,d){no(_,i-a/2,0,a,_.transform.height,d)}function no(_,i,a,d,p,v){const w=_.context,S=w.gl;S.enable(S.SCISSOR_TEST),S.scissor(i*_.pixelRatio,a*_.pixelRatio,d*_.pixelRatio,p*_.pixelRatio),w.clear({color:v}),S.disable(S.SCISSOR_TEST)}function Oh(_,i,a){const d=_.context,p=d.gl,v=a.posMatrix,w=_.useProgram("debug"),S=Xt.disabled,T=Oi.disabled,P=_.colorModeForRenderPass(),O="$debug",R=_.style.map.terrain&&_.style.map.terrain.getTerrainData(a);d.activeTexture.set(p.TEXTURE0);const j=i.getTileByID(a.key).latestRawTileData,H=Math.floor((j&&j.byteLength||0)/1024),X=i.getTile(a).tileSize,ne=512/Math.min(X,512)*(a.overscaledZ/_.transform.zoom)*.5;let Y=a.canonical.toString();a.overscaledZ!==a.canonical.z&&(Y+=` => ${a.overscaledZ}`),function(le,me){le.initDebugOverlayCanvas();const ie=le.debugOverlayCanvas,ve=le.context.gl,Te=le.debugOverlayCanvas.getContext("2d");Te.clearRect(0,0,ie.width,ie.height),Te.shadowColor="white",Te.shadowBlur=2,Te.lineWidth=1.5,Te.strokeStyle="white",Te.textBaseline="top",Te.font="bold 36px Open Sans, sans-serif",Te.fillText(me,5,5),Te.strokeText(me,5,5),le.debugOverlayTexture.update(ie),le.debugOverlayTexture.bind(ve.LINEAR,ve.CLAMP_TO_EDGE)}(_,`${Y} ${H}kB`),w.draw(d,p.TRIANGLES,S,T,Hi.alphaBlended,Pi.disabled,Cc(v,c.aP.transparent,ne),null,O,_.debugBuffer,_.quadTriangleIndexBuffer,_.debugSegments),w.draw(d,p.LINE_STRIP,S,T,P,Pi.disabled,Cc(v,c.aP.red),R,O,_.debugBuffer,_.tileBorderIndexBuffer,_.debugSegments)}function _l(_,i,a){const d=_.context,p=d.gl,v=_.colorModeForRenderPass(),w=new Xt(p.LEQUAL,Xt.ReadWrite,_.depthRangeFor3D),S=_.useProgram("terrain"),T=i.getTerrainMesh();d.bindFramebuffer.set(null),d.viewport.set([0,0,_.width,_.height]);for(const P of a){const O=_.renderToTexture.getTexture(P),R=i.getTerrainData(P.tileID);d.activeTexture.set(p.TEXTURE0),p.bindTexture(p.TEXTURE_2D,O.texture);const j={u_matrix:_.transform.calculatePosMatrix(P.tileID.toUnwrapped()),u_texture:0,u_ele_delta:i.getMeshFrameDelta(_.transform.zoom)};S.draw(d,p.TRIANGLES,w,Oi.disabled,v,Pi.backCCW,j,R,"terrain",T.vertexBuffer,T.indexBuffer,T.segments)}}class ni{constructor(i,a){this.context=new Vc(i),this.transform=a,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:c.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Ye.maxUnderzooming+Ye.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new qi}resize(i,a,d){if(this.width=Math.floor(i*d),this.height=Math.floor(a*d),this.pixelRatio=d,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const p of this.style._order)this.style._layers[p].resize()}setup(){const i=this.context,a=new c.aW;a.emplaceBack(0,0),a.emplaceBack(c.W,0),a.emplaceBack(0,c.W),a.emplaceBack(c.W,c.W),this.tileExtentBuffer=i.createVertexBuffer(a,Nn.members),this.tileExtentSegments=c.$.simpleSegment(0,0,4,2);const d=new c.aW;d.emplaceBack(0,0),d.emplaceBack(c.W,0),d.emplaceBack(0,c.W),d.emplaceBack(c.W,c.W),this.debugBuffer=i.createVertexBuffer(d,Nn.members),this.debugSegments=c.$.simpleSegment(0,0,4,5);const p=new c.Z;p.emplaceBack(0,0,0,0),p.emplaceBack(c.W,0,c.W,0),p.emplaceBack(0,c.W,0,c.W),p.emplaceBack(c.W,c.W,c.W,c.W),this.rasterBoundsBuffer=i.createVertexBuffer(p,$e.members),this.rasterBoundsSegments=c.$.simpleSegment(0,0,4,2);const v=new c.aW;v.emplaceBack(0,0),v.emplaceBack(1,0),v.emplaceBack(0,1),v.emplaceBack(1,1),this.viewportBuffer=i.createVertexBuffer(v,Nn.members),this.viewportSegments=c.$.simpleSegment(0,0,4,2);const w=new c.aX;w.emplaceBack(0),w.emplaceBack(1),w.emplaceBack(3),w.emplaceBack(2),w.emplaceBack(0),this.tileBorderIndexBuffer=i.createIndexBuffer(w);const S=new c.aY;S.emplaceBack(0,1,2),S.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=i.createIndexBuffer(S);const T=this.context.gl;this.stencilClearMode=new Oi({func:T.ALWAYS,mask:0},0,255,T.ZERO,T.ZERO,T.ZERO)}clearStencil(){const i=this.context,a=i.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const d=c.F();c.aO(d,0,this.width,this.height,0,0,1),c.J(d,d,[a.drawingBufferWidth,a.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(i,a.TRIANGLES,Xt.disabled,this.stencilClearMode,Hi.disabled,Pi.disabled,yh(d),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(i,a){if(this.currentStencilSource===i.source||!i.isTileClipped()||!a||!a.length)return;this.currentStencilSource=i.source;const d=this.context,p=d.gl;this.nextStencilID+a.length>256&&this.clearStencil(),d.setColorMode(Hi.disabled),d.setDepthMode(Xt.disabled);const v=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const w of a){const S=this._tileClippingMaskIDs[w.key]=this.nextStencilID++,T=this.style.map.terrain&&this.style.map.terrain.getTerrainData(w);v.draw(d,p.TRIANGLES,Xt.disabled,new Oi({func:p.ALWAYS,mask:0},S,255,p.KEEP,p.KEEP,p.REPLACE),Hi.disabled,Pi.disabled,yh(w.posMatrix),T,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const i=this.nextStencilID++,a=this.context.gl;return new Oi({func:a.NOTEQUAL,mask:255},i,255,a.KEEP,a.KEEP,a.REPLACE)}stencilModeForClipping(i){const a=this.context.gl;return new Oi({func:a.EQUAL,mask:255},this._tileClippingMaskIDs[i.key],0,a.KEEP,a.KEEP,a.REPLACE)}stencilConfigForOverlap(i){const a=this.context.gl,d=i.sort((w,S)=>S.overscaledZ-w.overscaledZ),p=d[d.length-1].overscaledZ,v=d[0].overscaledZ-p+1;if(v>1){this.currentStencilSource=void 0,this.nextStencilID+v>256&&this.clearStencil();const w={};for(let S=0;S=0;this.currentLayer--){const T=this.style._layers[d[this.currentLayer]],P=p[T.source],O=v[T.source];this._renderTileClippingMasks(T,O),this.renderLayer(this,P,T,O)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerY.source&&!Y.isHidden(O)?[P.sourceCaches[Y.source]]:[]),H=j.filter(Y=>Y.getSource().type==="vector"),X=j.filter(Y=>Y.getSource().type!=="vector"),ne=Y=>{(!R||R.getSource().maxzoomne(Y)),R||X.forEach(Y=>ne(Y)),R}(this.style,this.transform.zoom);T&&function(P,O,R){for(let j=0;j0),p&&(c.a$(a,d),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(v,w){const S=v.context,T=S.gl,P=Hi.unblended,O=new Xt(T.LEQUAL,Xt.ReadWrite,[0,1]),R=w.getTerrainMesh(),j=w.sourceCache.getRenderableTiles(),H=v.useProgram("terrainDepth");S.bindFramebuffer.set(w.getFramebuffer("depth").framebuffer),S.viewport.set([0,0,v.width/devicePixelRatio,v.height/devicePixelRatio]),S.clear({color:c.aP.transparent,depth:1});for(const X of j){const ne=w.getTerrainData(X.tileID),Y={u_matrix:v.transform.calculatePosMatrix(X.tileID.toUnwrapped()),u_ele_delta:w.getMeshFrameDelta(v.transform.zoom)};H.draw(S,T.TRIANGLES,O,Oi.disabled,P,Pi.backCCW,Y,ne,"terrain",R.vertexBuffer,R.indexBuffer,R.segments)}S.bindFramebuffer.set(null),S.viewport.set([0,0,v.width,v.height])}(this,this.style.map.terrain),function(v,w){const S=v.context,T=S.gl,P=Hi.unblended,O=new Xt(T.LEQUAL,Xt.ReadWrite,[0,1]),R=w.getTerrainMesh(),j=w.getCoordsTexture(),H=w.sourceCache.getRenderableTiles(),X=v.useProgram("terrainCoords");S.bindFramebuffer.set(w.getFramebuffer("coords").framebuffer),S.viewport.set([0,0,v.width/devicePixelRatio,v.height/devicePixelRatio]),S.clear({color:c.aP.transparent,depth:1}),w.coordsIndex=[];for(const ne of H){const Y=w.getTerrainData(ne.tileID);S.activeTexture.set(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,j.texture);const le={u_matrix:v.transform.calculatePosMatrix(ne.tileID.toUnwrapped()),u_terrain_coords_id:(255-w.coordsIndex.length)/255,u_texture:0,u_ele_delta:w.getMeshFrameDelta(v.transform.zoom)};X.draw(S,T.TRIANGLES,O,Oi.disabled,P,Pi.backCCW,le,Y,"terrain",R.vertexBuffer,R.indexBuffer,R.segments),w.coordsIndex.push(ne.tileID.key)}S.bindFramebuffer.set(null),S.viewport.set([0,0,v.width,v.height])}(this,this.style.map.terrain))}renderLayer(i,a,d,p){if(!d.isHidden(this.transform.zoom)&&(d.type==="background"||d.type==="custom"||(p||[]).length))switch(this.id=d.id,d.type){case"symbol":(function(v,w,S,T,P){if(v.renderPass!=="translucent")return;const O=Oi.disabled,R=v.colorModeForRenderPass();(S._unevaluatedLayout.hasValue("text-variable-anchor")||S._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(j,H,X,ne,Y,le,me,ie,ve){const Te=H.transform,Pe=Xr(),Ve=Y==="map",Ke=le==="map";for(const ut of j){const ht=ne.getTile(ut),Je=ht.getBucket(X);if(!Je||!Je.text||!Je.text.segments.get().length)continue;const et=c.ag(Je.textSizeData,Te.zoom),yt=Dt(ht,1,H.transform.zoom),Rt=eo(ut.posMatrix,Ke,Ve,H.transform,yt),it=X.layout.get("icon-text-fit")!=="none"&&Je.hasIconData();if(et){const at=Math.pow(2,Te.zoom-ht.tileID.overscaledZ),kt=H.style.map.terrain?(Wt,Yt)=>H.style.map.terrain.getElevation(ut,Wt,Yt):null,Ti=Pe.translatePosition(Te,ht,me,ie);dl(Je,Ve,Ke,ve,Te,Rt,ut.posMatrix,at,et,it,Pe,Ti,ut.toUnwrapped(),kt)}}}(T,v,S,w,S.layout.get("text-rotation-alignment"),S.layout.get("text-pitch-alignment"),S.paint.get("text-translate"),S.paint.get("text-translate-anchor"),P),S.paint.get("icon-opacity").constantOr(1)!==0&&ga(v,w,S,T,!1,S.paint.get("icon-translate"),S.paint.get("icon-translate-anchor"),S.layout.get("icon-rotation-alignment"),S.layout.get("icon-pitch-alignment"),S.layout.get("icon-keep-upright"),O,R),S.paint.get("text-opacity").constantOr(1)!==0&&ga(v,w,S,T,!0,S.paint.get("text-translate"),S.paint.get("text-translate-anchor"),S.layout.get("text-rotation-alignment"),S.layout.get("text-pitch-alignment"),S.layout.get("text-keep-upright"),O,R),w.map.showCollisionBoxes&&(Ph(v,w,S,T,!0),Ph(v,w,S,T,!1))})(i,a,d,p,this.style.placement.variableOffsets);break;case"circle":(function(v,w,S,T){if(v.renderPass!=="translucent")return;const P=S.paint.get("circle-opacity"),O=S.paint.get("circle-stroke-width"),R=S.paint.get("circle-stroke-opacity"),j=!S.layout.get("circle-sort-key").isConstant();if(P.constantOr(1)===0&&(O.constantOr(1)===0||R.constantOr(1)===0))return;const H=v.context,X=H.gl,ne=v.depthModeForSublayer(0,Xt.ReadOnly),Y=Oi.disabled,le=v.colorModeForRenderPass(),me=[];for(let ie=0;ieie.sortKey-ve.sortKey);for(const ie of me){const{programConfiguration:ve,program:Te,layoutVertexBuffer:Pe,indexBuffer:Ve,uniformValues:Ke,terrainData:ut}=ie.state;Te.draw(H,X.TRIANGLES,ne,Y,le,Pi.disabled,Ke,ut,S.id,Pe,Ve,ie.segments,S.paint,v.transform.zoom,ve)}})(i,a,d,p);break;case"heatmap":(function(v,w,S,T){if(S.paint.get("heatmap-opacity")!==0)if(v.renderPass==="offscreen"){const P=v.context,O=P.gl,R=Oi.disabled,j=new Hi([O.ONE,O.ONE],c.aP.transparent,[!0,!0,!0,!0]);(function(H,X,ne){const Y=H.gl;H.activeTexture.set(Y.TEXTURE1),H.viewport.set([0,0,X.width/4,X.height/4]);let le=ne.heatmapFbo;if(le)Y.bindTexture(Y.TEXTURE_2D,le.colorAttachment.get()),H.bindFramebuffer.set(le.framebuffer);else{const me=Y.createTexture();Y.bindTexture(Y.TEXTURE_2D,me),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_WRAP_S,Y.CLAMP_TO_EDGE),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_WRAP_T,Y.CLAMP_TO_EDGE),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_MIN_FILTER,Y.LINEAR),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_MAG_FILTER,Y.LINEAR),le=ne.heatmapFbo=H.createFramebuffer(X.width/4,X.height/4,!1,!1),function(ie,ve,Te,Pe){var Ve,Ke;const ut=ie.gl,ht=(Ve=ie.HALF_FLOAT)!==null&&Ve!==void 0?Ve:ut.UNSIGNED_BYTE,Je=(Ke=ie.RGBA16F)!==null&&Ke!==void 0?Ke:ut.RGBA;ut.texImage2D(ut.TEXTURE_2D,0,Je,ve.width/4,ve.height/4,0,ut.RGBA,ht,null),Pe.colorAttachment.set(Te)}(H,X,me,le)}})(P,v,S),P.clear({color:c.aP.transparent});for(let H=0;H{const ie=c.F();c.aO(ie,0,ne.width,ne.height,0,0,1);const ve=ne.context.gl;return{u_matrix:ie,u_world:[ve.drawingBufferWidth,ve.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:Y.paint.get("heatmap-opacity")}})(P,O),null,O.id,P.viewportBuffer,P.quadTriangleIndexBuffer,P.viewportSegments,O.paint,P.transform.zoom)}(v,S))})(i,a,d,p);break;case"line":(function(v,w,S,T){if(v.renderPass!=="translucent")return;const P=S.paint.get("line-opacity"),O=S.paint.get("line-width");if(P.constantOr(1)===0||O.constantOr(1)===0)return;const R=v.depthModeForSublayer(0,Xt.ReadOnly),j=v.colorModeForRenderPass(),H=S.paint.get("line-dasharray"),X=S.paint.get("line-pattern"),ne=X.constantOr(1),Y=S.paint.get("line-gradient"),le=S.getCrossfadeParameters(),me=ne?"linePattern":H?"lineSDF":Y?"lineGradient":"line",ie=v.context,ve=ie.gl;let Te=!0;for(const Pe of T){const Ve=w.getTile(Pe);if(ne&&!Ve.patternsLoaded())continue;const Ke=Ve.getBucket(S);if(!Ke)continue;const ut=Ke.programConfigurations.get(S.id),ht=v.context.program.get(),Je=v.useProgram(me,ut),et=Te||Je.program!==ht,yt=v.style.map.terrain&&v.style.map.terrain.getTerrainData(Pe),Rt=X.constantOr(null);if(Rt&&Ve.imageAtlas){const kt=Ve.imageAtlas,Ti=kt.patternPositions[Rt.to.toString()],Wt=kt.patternPositions[Rt.from.toString()];Ti&&Wt&&ut.setConstantPatternPositions(Ti,Wt)}const it=yt?Pe:null,at=ne?Ac(v,Ve,S,le,it):H?sl(v,Ve,S,H,le,it):Y?un(v,Ve,S,Ke.lineClipsArray.length,it):Fr(v,Ve,S,it);if(ne)ie.activeTexture.set(ve.TEXTURE0),Ve.imageAtlasTexture.bind(ve.LINEAR,ve.CLAMP_TO_EDGE),ut.updatePaintBuffers(le);else if(H&&(et||v.lineAtlas.dirty))ie.activeTexture.set(ve.TEXTURE0),v.lineAtlas.bind(ie);else if(Y){const kt=Ke.gradients[S.id];let Ti=kt.texture;if(S.gradientVersion!==kt.version){let Wt=256;if(S.stepInterpolant){const Yt=w.getSource().maxzoom,Ci=Pe.canonical.z===Yt?Math.ceil(1<0?a.pop():null}isPatternMissing(i){if(!i)return!1;if(!i.from||!i.to)return!0;const a=this.imageManager.getPattern(i.from.toString()),d=this.imageManager.getPattern(i.to.toString());return!a||!d}useProgram(i,a){this.cache=this.cache||{};const d=i+(a?a.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[d]||(this.cache[d]=new Ic(this.context,gs[i],a,al[i],this._showOverdrawInspector,this.style.map.terrain)),this.cache[d]}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 i=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(i.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new Ie(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:i,drawingBufferHeight:a}=this.context.gl;return this.width!==i||this.height!==a}}class bs{constructor(i,a){this.points=i,this.planes=a}static fromInvProjectionMatrix(i,a,d){const p=Math.pow(2,d),v=[[-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(S=>{const T=1/(S=c.af([],S,i))[3]/a*p;return c.b0(S,S,[T,T,1/S[3],T])}),w=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(S=>{const T=function(j,H){var X=H[0],ne=H[1],Y=H[2],le=X*X+ne*ne+Y*Y;return le>0&&(le=1/Math.sqrt(le)),j[0]=H[0]*le,j[1]=H[1]*le,j[2]=H[2]*le,j}([],function(j,H,X){var ne=H[0],Y=H[1],le=H[2],me=X[0],ie=X[1],ve=X[2];return j[0]=Y*ve-le*ie,j[1]=le*me-ne*ve,j[2]=ne*ie-Y*me,j}([],Se([],v[S[0]],v[S[1]]),Se([],v[S[2]],v[S[1]]))),P=-((O=T)[0]*(R=v[S[1]])[0]+O[1]*R[1]+O[2]*R[2]);var O,R;return T.concat(P)});return new bs(v,w)}}class vl{constructor(i,a){this.min=i,this.max=a,this.center=function(d,p,v){return d[0]=.5*p[0],d[1]=.5*p[1],d[2]=.5*p[2],d}([],function(d,p,v){return d[0]=p[0]+v[0],d[1]=p[1]+v[1],d[2]=p[2]+v[2],d}([],this.min,this.max))}quadrant(i){const a=[i%2==0,i<2],d=W(this.min),p=W(this.max);for(let v=0;v=0&&w++;if(w===0)return 0;w!==a.length&&(d=!1)}if(d)return 2;for(let p=0;p<3;p++){let v=Number.MAX_VALUE,w=-Number.MAX_VALUE;for(let S=0;Sthis.max[p]-this.min[p])return 0}return 1}}class _a{constructor(i=0,a=0,d=0,p=0){if(isNaN(i)||i<0||isNaN(a)||a<0||isNaN(d)||d<0||isNaN(p)||p<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=i,this.bottom=a,this.left=d,this.right=p}interpolate(i,a,d){return a.top!=null&&i.top!=null&&(this.top=c.z.number(i.top,a.top,d)),a.bottom!=null&&i.bottom!=null&&(this.bottom=c.z.number(i.bottom,a.bottom,d)),a.left!=null&&i.left!=null&&(this.left=c.z.number(i.left,a.left,d)),a.right!=null&&i.right!=null&&(this.right=c.z.number(i.right,a.right,d)),this}getCenter(i,a){const d=c.ac((this.left+i-this.right)/2,0,i),p=c.ac((this.top+a-this.bottom)/2,0,a);return new c.P(d,p)}equals(i){return this.top===i.top&&this.bottom===i.bottom&&this.left===i.left&&this.right===i.right}clone(){return new _a(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const ws=85.051129;class Uc{constructor(i,a,d,p,v){this.tileSize=512,this._renderWorldCopies=v===void 0||!!v,this._minZoom=i||0,this._maxZoom=a||22,this._minPitch=d??0,this._maxPitch=p??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new c.M(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new _a,this._posMatrixCache={},this._alignedPosMatrixCache={},this.minElevationForCurrentTile=0}clone(){const i=new Uc(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return i.apply(this),i}apply(i){this.tileSize=i.tileSize,this.latRange=i.latRange,this.width=i.width,this.height=i.height,this._center=i._center,this._elevation=i._elevation,this.minElevationForCurrentTile=i.minElevationForCurrentTile,this.zoom=i.zoom,this.angle=i.angle,this._fov=i._fov,this._pitch=i._pitch,this._unmodified=i._unmodified,this._edgeInsets=i._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(i){this._minZoom!==i&&(this._minZoom=i,this.zoom=Math.max(this.zoom,i))}get maxZoom(){return this._maxZoom}set maxZoom(i){this._maxZoom!==i&&(this._maxZoom=i,this.zoom=Math.min(this.zoom,i))}get minPitch(){return this._minPitch}set minPitch(i){this._minPitch!==i&&(this._minPitch=i,this.pitch=Math.max(this.pitch,i))}get maxPitch(){return this._maxPitch}set maxPitch(i){this._maxPitch!==i&&(this._maxPitch=i,this.pitch=Math.min(this.pitch,i))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(i){i===void 0?i=!0:i===null&&(i=!1),this._renderWorldCopies=i}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new c.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(i){const a=-c.b2(i,-180,180)*Math.PI/180;this.angle!==a&&(this._unmodified=!1,this.angle=a,this._calcMatrices(),this.rotationMatrix=function(){var d=new c.A(4);return c.A!=Float32Array&&(d[1]=0,d[2]=0),d[0]=1,d[3]=1,d}(),function(d,p,v){var w=p[0],S=p[1],T=p[2],P=p[3],O=Math.sin(v),R=Math.cos(v);d[0]=w*R+T*O,d[1]=S*R+P*O,d[2]=w*-O+T*R,d[3]=S*-O+P*R}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(i){const a=c.ac(i,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==a&&(this._unmodified=!1,this._pitch=a,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(i){i=Math.max(.01,Math.min(60,i)),this._fov!==i&&(this._unmodified=!1,this._fov=i/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(i){const a=Math.min(Math.max(i,this.minZoom),this.maxZoom);this._zoom!==a&&(this._unmodified=!1,this._zoom=a,this.tileZoom=Math.max(0,Math.floor(a)),this.scale=this.zoomScale(a),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(i){i.lat===this._center.lat&&i.lng===this._center.lng||(this._unmodified=!1,this._center=i,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(i){i!==this._elevation&&(this._elevation=i,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(i){this._edgeInsets.equals(i)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,i,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(i){return this._edgeInsets.equals(i)}interpolatePadding(i,a,d){this._unmodified=!1,this._edgeInsets.interpolate(i,a,d),this._constrain(),this._calcMatrices()}coveringZoomLevel(i){const a=(i.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/i.tileSize));return Math.max(0,a)}getVisibleUnwrappedCoordinates(i){const a=[new c.b3(0,i)];if(this._renderWorldCopies){const d=this.pointCoordinate(new c.P(0,0)),p=this.pointCoordinate(new c.P(this.width,0)),v=this.pointCoordinate(new c.P(this.width,this.height)),w=this.pointCoordinate(new c.P(0,this.height)),S=Math.floor(Math.min(d.x,p.x,v.x,w.x)),T=Math.floor(Math.max(d.x,p.x,v.x,w.x)),P=1;for(let O=S-P;O<=T+P;O++)O!==0&&a.push(new c.b3(O,i))}return a}coveringTiles(i){var a,d;let p=this.coveringZoomLevel(i);const v=p;if(i.minzoom!==void 0&&pi.maxzoom&&(p=i.maxzoom);const w=this.pointCoordinate(this.getCameraPoint()),S=c.Y.fromLngLat(this.center),T=Math.pow(2,p),P=[T*w.x,T*w.y,0],O=[T*S.x,T*S.y,0],R=bs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,p);let j=i.minzoom||0;!i.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(j=p);const H=i.terrain?2/Math.min(this.tileSize,i.tileSize)*this.tileSize:3,X=ie=>({aabb:new vl([ie*T,0,0],[(ie+1)*T,T,0]),zoom:0,x:0,y:0,wrap:ie,fullyVisible:!1}),ne=[],Y=[],le=p,me=i.reparseOverscaled?v:p;if(this._renderWorldCopies)for(let ie=1;ie<=3;ie++)ne.push(X(-ie)),ne.push(X(ie));for(ne.push(X(0));ne.length>0;){const ie=ne.pop(),ve=ie.x,Te=ie.y;let Pe=ie.fullyVisible;if(!Pe){const Je=ie.aabb.intersects(R);if(Je===0)continue;Pe=Je===2}const Ve=i.terrain?P:O,Ke=ie.aabb.distanceX(Ve),ut=ie.aabb.distanceY(Ve),ht=Math.max(Math.abs(Ke),Math.abs(ut));if(ie.zoom===le||ht>H+(1<=j){const Je=le-ie.zoom,et=P[0]-.5-(ve<>1),Rt=ie.zoom+1;let it=ie.aabb.quadrant(Je);if(i.terrain){const at=new c.Q(Rt,ie.wrap,Rt,et,yt),kt=i.terrain.getMinMaxElevation(at),Ti=(a=kt.minElevation)!==null&&a!==void 0?a:this.elevation,Wt=(d=kt.maxElevation)!==null&&d!==void 0?d:this.elevation;it=new vl([it.min[0],it.min[1],Ti],[it.max[0],it.max[1],Wt])}ne.push({aabb:it,zoom:Rt,x:et,y:yt,wrap:ie.wrap,fullyVisible:Pe})}}return Y.sort((ie,ve)=>ie.distanceSq-ve.distanceSq).map(ie=>ie.tileID)}resize(i,a){this.width=i,this.height=a,this.pixelsToGLUnits=[2/i,-2/a],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(i){return Math.pow(2,i)}scaleZoom(i){return Math.log(i)/Math.LN2}project(i){const a=c.ac(i.lat,-85.051129,ws);return new c.P(c.N(i.lng)*this.worldSize,c.O(a)*this.worldSize)}unproject(i){return new c.Y(i.x/this.worldSize,i.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(i){const a=this.elevation,d=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,p=this.pointLocation(this.centerPoint,i),v=i.getElevationForLngLatZoom(p,this.tileZoom);if(!(this.elevation-v))return;const w=d+a-v,S=Math.cos(this._pitch)*this.cameraToCenterDistance/w/c.b4(1,p.lat),T=this.scaleZoom(S/this.tileSize);this._elevation=v,this._center=p,this.zoom=T}setLocationAtPoint(i,a){const d=this.pointCoordinate(a),p=this.pointCoordinate(this.centerPoint),v=this.locationCoordinate(i),w=new c.Y(v.x-(d.x-p.x),v.y-(d.y-p.y));this.center=this.coordinateLocation(w),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(i,a){return a?this.coordinatePoint(this.locationCoordinate(i),a.getElevationForLngLatZoom(i,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(i))}pointLocation(i,a){return this.coordinateLocation(this.pointCoordinate(i,a))}locationCoordinate(i){return c.Y.fromLngLat(i)}coordinateLocation(i){return i&&i.toLngLat()}pointCoordinate(i,a){if(a){const j=a.pointCoordinate(i);if(j!=null)return j}const d=[i.x,i.y,0,1],p=[i.x,i.y,1,1];c.af(d,d,this.pixelMatrixInverse),c.af(p,p,this.pixelMatrixInverse);const v=d[3],w=p[3],S=d[1]/v,T=p[1]/w,P=d[2]/v,O=p[2]/w,R=P===O?0:(0-P)/(O-P);return new c.Y(c.z.number(d[0]/v,p[0]/w,R)/this.worldSize,c.z.number(S,T,R)/this.worldSize)}coordinatePoint(i,a=0,d=this.pixelMatrix){const p=[i.x*this.worldSize,i.y*this.worldSize,a,1];return c.af(p,p,d),new c.P(p[0]/p[3],p[1]/p[3])}getBounds(){const i=Math.max(0,this.height/2-this.getHorizon());return new ge().extend(this.pointLocation(new c.P(0,i))).extend(this.pointLocation(new c.P(this.width,i))).extend(this.pointLocation(new c.P(this.width,this.height))).extend(this.pointLocation(new c.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ge([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(i){i?(this.lngRange=[i.getWest(),i.getEast()],this.latRange=[i.getSouth(),i.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,ws])}calculatePosMatrix(i,a=!1){const d=i.key,p=a?this._alignedPosMatrixCache:this._posMatrixCache;if(p[d])return p[d];const v=i.canonical,w=this.worldSize/this.zoomScale(v.z),S=v.x+Math.pow(2,v.z)*i.wrap,T=c.an(new Float64Array(16));return c.H(T,T,[S*w,v.y*w,0]),c.J(T,T,[w/c.W,w/c.W,1]),c.K(T,a?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,T),p[d]=new Float32Array(T),p[d]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(i,a){a=c.ac(+a,this.minZoom,this.maxZoom);const d={center:new c.M(i.lng,i.lat),zoom:a};let p=this.lngRange;if(!this._renderWorldCopies&&p===null){const ie=179.9999999999;p=[-ie,ie]}const v=this.tileSize*this.zoomScale(d.zoom);let w=0,S=v,T=0,P=v,O=0,R=0;const{x:j,y:H}=this.size;if(this.latRange){const ie=this.latRange;w=c.O(ie[1])*v,S=c.O(ie[0])*v,S-wS&&(le=S-ie)}if(p){const ie=(T+P)/2;let ve=X;this._renderWorldCopies&&(ve=c.b2(X,ie-v/2,ie+v/2));const Te=j/2;ve-TeP&&(Y=P-Te)}if(Y!==void 0||le!==void 0){const ie=new c.P(Y??X,le??ne);d.center=this.unproject.call({worldSize:v},ie).wrap()}return d}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const i=this._unmodified,{center:a,zoom:d}=this.getConstrained(this.center,this.zoom);this.center=a,this.zoom=d,this._unmodified=i,this._constraining=!1}_calcMatrices(){if(!this.height)return;const i=this.centerOffset,a=this.point.x,d=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=c.b4(1,this.center.lat)*this.worldSize;let p=c.an(new Float64Array(16));c.J(p,p,[this.width/2,-this.height/2,1]),c.H(p,p,[1,-1,0]),this.labelPlaneMatrix=p,p=c.an(new Float64Array(16)),c.J(p,p,[1,-1,1]),c.H(p,p,[-1,-1,0]),c.J(p,p,[2/this.width,2/this.height,1]),this.glCoordMatrix=p;const v=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),w=Math.min(this.elevation,this.minElevationForCurrentTile),S=v-w*this._pixelPerMeter/Math.cos(this._pitch),T=w<0?S:v,P=Math.PI/2+this._pitch,O=this._fov*(.5+i.y/this.height),R=Math.sin(O)*T/Math.sin(c.ac(Math.PI-P-O,.01,Math.PI-.01)),j=this.getHorizon(),H=2*Math.atan(j/this.cameraToCenterDistance)*(.5+i.y/(2*j)),X=Math.sin(H)*T/Math.sin(c.ac(Math.PI-P-H,.01,Math.PI-.01)),ne=Math.min(R,X),Y=1.01*(Math.cos(Math.PI/2-this._pitch)*ne+T),le=this.height/50;p=new Float64Array(16),c.b5(p,this._fov,this.width/this.height,le,Y),p[8]=2*-i.x/this.width,p[9]=2*i.y/this.height,c.J(p,p,[1,-1,1]),c.H(p,p,[0,0,-this.cameraToCenterDistance]),c.b6(p,p,this._pitch),c.ad(p,p,this.angle),c.H(p,p,[-a,-d,0]),this.mercatorMatrix=c.J([],p,[this.worldSize,this.worldSize,this.worldSize]),c.J(p,p,[1,1,this._pixelPerMeter]),this.pixelMatrix=c.K(new Float64Array(16),this.labelPlaneMatrix,p),c.H(p,p,[0,0,-this.elevation]),this.modelViewProjectionMatrix=p,this.invModelViewProjectionMatrix=c.as([],p),this.pixelMatrix3D=c.K(new Float64Array(16),this.labelPlaneMatrix,p);const me=this.width%2/2,ie=this.height%2/2,ve=Math.cos(this.angle),Te=Math.sin(this.angle),Pe=a-Math.round(a)+ve*me+Te*ie,Ve=d-Math.round(d)+ve*ie+Te*me,Ke=new Float64Array(p);if(c.H(Ke,Ke,[Pe>.5?Pe-1:Pe,Ve>.5?Ve-1:Ve,0]),this.alignedModelViewProjectionMatrix=Ke,p=c.as(new Float64Array(16),this.pixelMatrix),!p)throw new Error("failed to invert matrix");this.pixelMatrixInverse=p,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const i=this.pointCoordinate(new c.P(0,0)),a=[i.x*this.worldSize,i.y*this.worldSize,0,1];return c.af(a,a,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const i=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new c.P(0,i))}getCameraQueryGeometry(i){const a=this.getCameraPoint();if(i.length===1)return[i[0],a];{let d=a.x,p=a.y,v=a.x,w=a.y;for(const S of i)d=Math.min(d,S.x),p=Math.min(p,S.y),v=Math.max(v,S.x),w=Math.max(w,S.y);return[new c.P(d,p),new c.P(v,p),new c.P(v,w),new c.P(d,w),new c.P(d,p)]}}lngLatToCameraDepth(i,a){const d=this.locationCoordinate(i),p=[d.x*this.worldSize,d.y*this.worldSize,a,1];return c.af(p,p,this.modelViewProjectionMatrix),p[2]/p[3]}}function Bh(_,i){let a,d=!1,p=null,v=null;const w=()=>{p=null,d&&(_.apply(v,a),p=setTimeout(w,i),d=!1)};return(...S)=>(d=!0,v=this,a=S,p||w(),p)}class qc{constructor(i){this._getCurrentHash=()=>{const a=window.location.hash.replace("#","");if(this._hashName){let d;return a.split("&").map(p=>p.split("=")).forEach(p=>{p[0]===this._hashName&&(d=p)}),(d&&d[1]||"").split("/")}return a.split("/")},this._onHashChange=()=>{const a=this._getCurrentHash();if(a.length>=3&&!a.some(d=>isNaN(d))){const d=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(a[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+a[2],+a[1]],zoom:+a[0],bearing:d,pitch:+(a[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const a=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,a)}catch{}},this._updateHash=Bh(this._updateHashUnthrottled,300),this._hashName=i&&encodeURIComponent(i)}addTo(i){return this._map=i,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()),delete this._map,this}getHashString(i){const a=this._map.getCenter(),d=Math.round(100*this._map.getZoom())/100,p=Math.ceil((d*Math.LN2+Math.log(512/360/.5))/Math.LN10),v=Math.pow(10,p),w=Math.round(a.lng*v)/v,S=Math.round(a.lat*v)/v,T=this._map.getBearing(),P=this._map.getPitch();let O="";if(O+=i?`/${w}/${S}/${d}`:`${d}/${S}/${w}`,(T||P)&&(O+="/"+Math.round(10*T)/10),P&&(O+=`/${Math.round(P)}`),this._hashName){const R=this._hashName;let j=!1;const H=window.location.hash.slice(1).split("&").map(X=>{const ne=X.split("=")[0];return ne===R?(j=!0,`${ne}=${O}`):X}).filter(X=>X);return j||H.push(`${R}=${O}`),`#${H.join("&")}`}return`#${O}`}}const xl={linearity:.3,easing:c.b7(0,0,.3,1)},Hc=c.e({deceleration:2500,maxSpeed:1400},xl),bl=c.e({deceleration:20,maxSpeed:1400},xl),wl=c.e({deceleration:1e3,maxSpeed:360},xl),Gc=c.e({deceleration:1e3,maxSpeed:90},xl);class Wc{constructor(i){this._map=i,this.clear()}clear(){this._inertiaBuffer=[]}record(i){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:A.now(),settings:i})}_drainInertiaBuffer(){const i=this._inertiaBuffer,a=A.now();for(;i.length>0&&a-i[0].time>160;)i.shift()}_onMoveEnd(i){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const a={zoom:0,bearing:0,pitch:0,pan:new c.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:v}of this._inertiaBuffer)a.zoom+=v.zoomDelta||0,a.bearing+=v.bearingDelta||0,a.pitch+=v.pitchDelta||0,v.panDelta&&a.pan._add(v.panDelta),v.around&&(a.around=v.around),v.pinchAround&&(a.pinchAround=v.pinchAround);const d=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,p={};if(a.pan.mag()){const v=Zo(a.pan.mag(),d,c.e({},Hc,i||{}));p.offset=a.pan.mult(v.amount/a.pan.mag()),p.center=this._map.transform.center,va(p,v)}if(a.zoom){const v=Zo(a.zoom,d,bl);p.zoom=this._map.transform.zoom+v.amount,va(p,v)}if(a.bearing){const v=Zo(a.bearing,d,wl);p.bearing=this._map.transform.bearing+c.ac(v.amount,-179,179),va(p,v)}if(a.pitch){const v=Zo(a.pitch,d,Gc);p.pitch=this._map.transform.pitch+v.amount,va(p,v)}if(p.zoom||p.bearing){const v=a.pinchAround===void 0?a.around:a.pinchAround;p.around=v?this._map.unproject(v):this._map.getCenter()}return this.clear(),c.e(p,{noMoveStart:!0})}}function va(_,i){(!_.duration||_.durationa.unproject(T)),S=v.reduce((T,P,O,R)=>T.add(P.div(R.length)),new c.P(0,0));super(i,{points:v,point:S,lngLats:w,lngLat:a.unproject(S),originalEvent:d}),this._defaultPrevented=!1}}class Fh extends c.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(i,a,d){super(i,{originalEvent:d}),this._defaultPrevented=!1}}class Zc{constructor(i,a){this._map=i,this._clickTolerance=a.clickTolerance}reset(){delete this._mousedownPos}wheel(i){return this._firePreventable(new Fh(i.type,this._map,i))}mousedown(i,a){return this._mousedownPos=a,this._firePreventable(new Ir(i.type,this._map,i))}mouseup(i){this._map.fire(new Ir(i.type,this._map,i))}click(i,a){this._mousedownPos&&this._mousedownPos.dist(a)>=this._clickTolerance||this._map.fire(new Ir(i.type,this._map,i))}dblclick(i){return this._firePreventable(new Ir(i.type,this._map,i))}mouseover(i){this._map.fire(new Ir(i.type,this._map,i))}mouseout(i){this._map.fire(new Ir(i.type,this._map,i))}touchstart(i){return this._firePreventable(new Xo(i.type,this._map,i))}touchmove(i){this._map.fire(new Xo(i.type,this._map,i))}touchend(i){this._map.fire(new Xo(i.type,this._map,i))}touchcancel(i){this._map.fire(new Xo(i.type,this._map,i))}_firePreventable(i){if(this._map.fire(i),i.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class op{constructor(i){this._map=i}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(i){this._map.fire(new Ir(i.type,this._map,i))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ir("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(i){this._delayContextMenu?this._contextMenuEvent=i:this._ignoreContextMenu||this._map.fire(new Ir(i.type,this._map,i)),this._map.listens("contextmenu")&&i.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Es{constructor(i){this._map=i}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(i){return this.transform.pointLocation(c.P.convert(i),this._map.terrain)}}class xa{constructor(i,a){this._map=i,this._tr=new Es(i),this._el=i.getCanvasContainer(),this._container=i.getContainer(),this._clickTolerance=a.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(i,a){this.isEnabled()&&i.shiftKey&&i.button===0&&(z.disableDrag(),this._startPos=this._lastPos=a,this._active=!0)}mousemoveWindow(i,a){if(!this._active)return;const d=a;if(this._lastPos.equals(d)||!this._box&&d.dist(this._startPos)v.fitScreenCoordinates(d,p,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",i)}keydown(i){this._active&&i.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",i))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(z.remove(this._box),this._box=null),z.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(i,a){return this._map.fire(new c.k(i,{originalEvent:a}))}}function ba(_,i){if(_.length!==i.length)throw new Error(`The number of touches and points are not equal - touches ${_.length}, points ${i.length}`);const a={};for(let d=0;d<_.length;d++)a[_[d].identifier]=i[d];return a}class Vh{constructor(i){this.reset(),this.numTouches=i.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(i,a,d){(this.centroid||d.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=i.timeStamp),d.length===this.numTouches&&(this.centroid=function(p){const v=new c.P(0,0);for(const w of p)v._add(w);return v.div(p.length)}(a),this.touches=ba(d,a)))}touchmove(i,a,d){if(this.aborted||!this.centroid)return;const p=ba(d,a);for(const v in this.touches){const w=p[v];(!w||w.dist(this.touches[v])>30)&&(this.aborted=!0)}}touchend(i,a,d){if((!this.centroid||i.timeStamp-this.startTime>500)&&(this.aborted=!0),d.length===0){const p=!this.aborted&&this.centroid;if(this.reset(),p)return p}}}class El{constructor(i){this.singleTap=new Vh(i),this.numTaps=i.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(i,a,d){this.singleTap.touchstart(i,a,d)}touchmove(i,a,d){this.singleTap.touchmove(i,a,d)}touchend(i,a,d){const p=this.singleTap.touchend(i,a,d);if(p){const v=i.timeStamp-this.lastTime<500,w=!this.lastTap||this.lastTap.dist(p)<30;if(v&&w||this.reset(),this.count++,this.lastTime=i.timeStamp,this.lastTap=p,this.count===this.numTaps)return this.reset(),p}}}class Sl{constructor(i){this._tr=new Es(i),this._zoomIn=new El({numTouches:1,numTaps:2}),this._zoomOut=new El({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(i,a,d){this._zoomIn.touchstart(i,a,d),this._zoomOut.touchstart(i,a,d)}touchmove(i,a,d){this._zoomIn.touchmove(i,a,d),this._zoomOut.touchmove(i,a,d)}touchend(i,a,d){const p=this._zoomIn.touchend(i,a,d),v=this._zoomOut.touchend(i,a,d),w=this._tr;return p?(this._active=!0,i.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:S=>S.easeTo({duration:300,zoom:w.zoom+1,around:w.unproject(p)},{originalEvent:i})}):v?(this._active=!0,i.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:S=>S.easeTo({duration:300,zoom:w.zoom-1,around:w.unproject(v)},{originalEvent:i})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ko{constructor(i){this._enabled=!!i.enable,this._moveStateManager=i.moveStateManager,this._clickTolerance=i.clickTolerance||1,this._moveFunction=i.move,this._activateOnStart=!!i.activateOnStart,i.assignEvents(this),this.reset()}reset(i){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(i)}_move(...i){const a=this._moveFunction(...i);if(a.bearingDelta||a.pitchDelta||a.around||a.panDelta)return this._active=!0,a}dragStart(i,a){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(i)&&(this._moveStateManager.startMove(i),this._lastPoint=a.length?a[0]:a,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(i,a){if(!this.isEnabled())return;const d=this._lastPoint;if(!d)return;if(i.preventDefault(),!this._moveStateManager.isValidMoveEvent(i))return void this.reset(i);const p=a.length?a[0]:a;return!this._moved&&p.dist(d){_.mousedown=_.dragStart,_.mousemoveWindow=_.dragMove,_.mouseup=_.dragEnd,_.contextmenu=i=>{i.preventDefault()}},dn=({enable:_,clickTolerance:i,bearingDegreesPerPixelMoved:a=.8})=>{const d=new Il({checkCorrectEvent:p=>z.mouseButton(p)===0&&p.ctrlKey||z.mouseButton(p)===2});return new Ko({clickTolerance:i,move:(p,v)=>({bearingDelta:(v.x-p.x)*a}),moveStateManager:d,enable:_,assignEvents:oo})},Tl=({enable:_,clickTolerance:i,pitchDegreesPerPixelMoved:a=-.5})=>{const d=new Il({checkCorrectEvent:p=>z.mouseButton(p)===0&&p.ctrlKey||z.mouseButton(p)===2});return new Ko({clickTolerance:i,move:(p,v)=>({pitchDelta:(v.y-p.y)*a}),moveStateManager:d,enable:_,assignEvents:oo})};class Xc{constructor(i,a){this._clickTolerance=i.clickTolerance||1,this._map=a,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new c.P(0,0)}minTouchs(){return this._map.cooperativeGestures.isEnabled()?2:1}touchstart(i,a,d){return this._calculateTransform(i,a,d)}touchmove(i,a,d){if(this._active&&!(d.length0&&(this._active=!0);const p=ba(d,a),v=new c.P(0,0),w=new c.P(0,0);let S=0;for(const P in p){const O=p[P],R=this._touches[P];R&&(v._add(O),w._add(O.sub(R)),S++,p[P]=O)}if(this._touches=p,SMath.abs(_.x)}class Yc extends Cl{constructor(i){super(),this._currentTouchCount=0,this._map=i}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(i,a,d){super.touchstart(i,a,d),this._currentTouchCount=d.length}_start(i){this._lastPoints=i,Ml(i[0].sub(i[1]))&&(this._valid=!1)}_move(i,a,d){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const p=i[0].sub(this._lastPoints[0]),v=i[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(p,v,d.timeStamp),this._valid?(this._lastPoints=i,this._active=!0,{pitchDelta:(p.y+v.y)/2*-.5}):void 0}gestureBeginsVertically(i,a,d){if(this._valid!==void 0)return this._valid;const p=i.mag()>=2,v=a.mag()>=2;if(!p&&!v)return;if(!p||!v)return this._firstMove===void 0&&(this._firstMove=d),d-this._firstMove<100&&void 0;const w=i.y>0==a.y>0;return Ml(i)&&Ml(a)&&w}}const Nh={panStep:100,bearingStep:15,pitchStep:10};class vo{constructor(i){this._tr=new Es(i);const a=Nh;this._panStep=a.panStep,this._bearingStep=a.bearingStep,this._pitchStep=a.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(i){if(i.altKey||i.ctrlKey||i.metaKey)return;let a=0,d=0,p=0,v=0,w=0;switch(i.keyCode){case 61:case 107:case 171:case 187:a=1;break;case 189:case 109:case 173:a=-1;break;case 37:i.shiftKey?d=-1:(i.preventDefault(),v=-1);break;case 39:i.shiftKey?d=1:(i.preventDefault(),v=1);break;case 38:i.shiftKey?p=1:(i.preventDefault(),w=-1);break;case 40:i.shiftKey?p=-1:(i.preventDefault(),w=1);break;default:return}return this._rotationDisabled&&(d=0,p=0),{cameraAnimation:S=>{const T=this._tr;S.easeTo({duration:300,easeId:"keyboardHandler",easing:jh,zoom:a?Math.round(T.zoom)+a*(i.shiftKey?2:1):T.zoom,bearing:T.bearing+d*this._bearingStep,pitch:T.pitch+p*this._pitchStep,offset:[-v*this._panStep,-w*this._panStep],center:T.center},{originalEvent:i})}}}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 jh(_){return _*(2-_)}const Qc=4.000244140625;class eu{constructor(i,a){this._onTimeout=d=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(d)},this._map=i,this._tr=new Es(i),this._triggerRenderFrame=a,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(i){this._defaultZoomRate=i}setWheelZoomRate(i){this._wheelZoomRate=i}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(i){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!i&&i.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(i){if(!this.isEnabled()||this._map.cooperativeGestures.isEnabled()&&!i[this._map.cooperativeGestures._bypassKey])return;let a=i.deltaMode===WheelEvent.DOM_DELTA_LINE?40*i.deltaY:i.deltaY;const d=A.now(),p=d-(this._lastWheelEventTime||0);this._lastWheelEventTime=d,a!==0&&a%Qc==0?this._type="wheel":a!==0&&Math.abs(a)<4?this._type="trackpad":p>400?(this._type=null,this._lastValue=a,this._timeout=setTimeout(this._onTimeout,40,i)):this._type||(this._type=Math.abs(p*a)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,a+=this._lastValue)),i.shiftKey&&a&&(a/=4),this._type&&(this._lastWheelEvent=i,this._delta-=a,this._active||this._start(i)),i.preventDefault()}_start(i){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 a=z.mousePos(this._map.getCanvas(),i),d=this._tr;this._around=a.y>d.transform.height/2-d.transform.getHorizon()?c.M.convert(this._aroundCenter?d.center:d.unproject(a)):c.M.convert(d.center),this._aroundPoint=d.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const i=this._tr.transform;if(this._delta!==0){const S=this._type==="wheel"&&Math.abs(this._delta)>Qc?this._wheelZoomRate:this._defaultZoomRate;let T=2/(1+Math.exp(-Math.abs(this._delta*S)));this._delta<0&&T!==0&&(T=1/T);const P=typeof this._targetZoom=="number"?i.zoomScale(this._targetZoom):i.scale;this._targetZoom=Math.min(i.maxZoom,Math.max(i.minZoom,i.scaleZoom(P*T))),this._type==="wheel"&&(this._startZoom=i.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const a=typeof this._targetZoom=="number"?this._targetZoom:i.zoom,d=this._startZoom,p=this._easing;let v,w=!1;if(this._type==="wheel"&&d&&p){const S=Math.min((A.now()-this._lastWheelEventTime)/200,1),T=p(S);v=c.z.number(d,a,T),S<1?this._frameId||(this._frameId=!0):w=!0}else v=a,w=!0;return this._active=!0,w&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!w,zoomDelta:v-i.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(i){let a=c.b8;if(this._prevEase){const d=this._prevEase,p=(A.now()-d.start)/d.duration,v=d.easing(p+.01)-d.easing(p),w=.27/Math.sqrt(v*v+1e-4)*.01,S=Math.sqrt(.0729-w*w);a=c.b7(w,S,.25,1)}return this._prevEase={start:A.now(),duration:i,easing:a},a}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class tu{constructor(i,a){this._clickZoom=i,this._tapZoom=a}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 $h{constructor(i){this._tr=new Es(i),this.reset()}reset(){this._active=!1}dblclick(i,a){return i.preventDefault(),{cameraAnimation:d=>{d.easeTo({duration:300,zoom:this._tr.zoom+(i.shiftKey?-1:1),around:this._tr.unproject(a)},{originalEvent:i})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Uh{constructor(){this._tap=new El({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(i,a,d){if(!this._swipePoint)if(this._tapTime){const p=a[0],v=i.timeStamp-this._tapTime<500,w=this._tapPoint.dist(p)<30;v&&w?d.length>0&&(this._swipePoint=p,this._swipeTouch=d[0].identifier):this.reset()}else this._tap.touchstart(i,a,d)}touchmove(i,a,d){if(this._tapTime){if(this._swipePoint){if(d[0].identifier!==this._swipeTouch)return;const p=a[0],v=p.y-this._swipePoint.y;return this._swipePoint=p,i.preventDefault(),this._active=!0,{zoomDelta:v/128}}}else this._tap.touchmove(i,a,d)}touchend(i,a,d){if(this._tapTime)this._swipePoint&&d.length===0&&this.reset();else{const p=this._tap.touchend(i,a,d);p&&(this._tapTime=i.timeStamp,this._tapPoint=p)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class iu{constructor(i,a,d){this._el=i,this._mousePan=a,this._touchPan=d}enable(i){this._inertiaOptions=i||{},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 Is{constructor(i,a,d){this._pitchWithRotate=i.pitchWithRotate,this._mouseRotate=a,this._mousePitch=d}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 ru{constructor(i,a,d,p){this._el=i,this._touchZoom=a,this._touchRotate=d,this._tapDragZoom=p,this._rotationDisabled=!1,this._enabled=!0}enable(i){this._touchZoom.enable(i),this._rotationDisabled||this._touchRotate.enable(i),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 vn{constructor(i,a){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=i,this._options=a,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const i=this._map.getCanvasContainer();i.classList.add("maplibregl-cooperative-gestures"),this._container=z.create("div","maplibregl-cooperative-gesture-screen",i);let a=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(a=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const d=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),p=document.createElement("div");p.className="maplibregl-desktop-message",p.textContent=a,this._container.appendChild(p);const v=document.createElement("div");v.className="maplibregl-mobile-message",v.textContent=d,this._container.appendChild(v),this._container.setAttribute("aria-hidden","true")}_destoryUI(){this._container&&(z.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._destoryUI()}isEnabled(){return this._enabled}touchmove(i){this._onCooperativeGesture(i.touches.length===1)}wheel(i){this._map.scrollZoom.isEnabled()&&this._onCooperativeGesture(!i[this._bypassKey])}_onCooperativeGesture(i){this._enabled&&i&&(this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const fn=_=>_.zoom||_.drag||_.pitch||_.rotate;class qh extends c.k{}function xn(_){return _.panDelta&&_.panDelta.mag()||_.zoomDelta||_.bearingDelta||_.pitchDelta}class wa{constructor(i,a){this.handleWindowEvent=p=>{this.handleEvent(p,`${p.type}Window`)},this.handleEvent=(p,v)=>{if(p.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const w=p.type==="renderFrame"?void 0:p,S={needsRenderFrame:!1},T={},P={},O=p.touches,R=O?this._getMapTouches(O):void 0,j=R?z.touchPos(this._map.getCanvas(),R):z.mousePos(this._map.getCanvas(),p);for(const{handlerName:ne,handler:Y,allowed:le}of this._handlers){if(!Y.isEnabled())continue;let me;this._blockedByActive(P,le,ne)?Y.reset():Y[v||p.type]&&(me=Y[v||p.type](p,j,R),this.mergeHandlerResult(S,T,me,ne,w),me&&me.needsRenderFrame&&this._triggerRenderFrame()),(me||Y.isActive())&&(P[ne]=Y)}const H={};for(const ne in this._previousActiveHandlers)P[ne]||(H[ne]=w);this._previousActiveHandlers=P,(Object.keys(H).length||xn(S))&&(this._changes.push([S,T,H]),this._triggerRenderFrame()),(Object.keys(P).length||xn(S))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:X}=S;X&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],X(this._map))},this._map=i,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Wc(i),this._bearingSnap=a.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(a);const d=this._el;this._listeners=[[d,"touchstart",{passive:!0}],[d,"touchmove",{passive:!1}],[d,"touchend",void 0],[d,"touchcancel",void 0],[d,"mousedown",void 0],[d,"mousemove",void 0],[d,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[d,"mouseover",void 0],[d,"mouseout",void 0],[d,"dblclick",void 0],[d,"click",void 0],[d,"keydown",{capture:!1}],[d,"keyup",void 0],[d,"wheel",{passive:!1}],[d,"contextmenu",void 0],[window,"blur",void 0]];for(const[p,v,w]of this._listeners)z.addEventListener(p,v,p===document?this.handleWindowEvent:this.handleEvent,w)}destroy(){for(const[i,a,d]of this._listeners)z.removeEventListener(i,a,i===document?this.handleWindowEvent:this.handleEvent,d)}_addDefaultHandlers(i){const a=this._map,d=a.getCanvasContainer();this._add("mapEvent",new Zc(a,i));const p=a.boxZoom=new xa(a,i);this._add("boxZoom",p),i.interactive&&i.boxZoom&&p.enable();const v=a.cooperativeGestures=new vn(a,i.cooperativeGestures);this._add("cooperativeGestures",v),i.cooperativeGestures&&v.enable();const w=new Sl(a),S=new $h(a);a.doubleClickZoom=new tu(S,w),this._add("tapZoom",w),this._add("clickZoom",S),i.interactive&&i.doubleClickZoom&&a.doubleClickZoom.enable();const T=new Uh;this._add("tapDragZoom",T);const P=a.touchPitch=new Yc(a);this._add("touchPitch",P),i.interactive&&i.touchPitch&&a.touchPitch.enable(i.touchPitch);const O=dn(i),R=Tl(i);a.dragRotate=new Is(i,O,R),this._add("mouseRotate",O,["mousePitch"]),this._add("mousePitch",R,["mouseRotate"]),i.interactive&&i.dragRotate&&a.dragRotate.enable();const j=(({enable:me,clickTolerance:ie})=>{const ve=new Il({checkCorrectEvent:Te=>z.mouseButton(Te)===0&&!Te.ctrlKey});return new Ko({clickTolerance:ie,move:(Te,Pe)=>({around:Pe,panDelta:Pe.sub(Te)}),activateOnStart:!0,moveStateManager:ve,enable:me,assignEvents:oo})})(i),H=new Xc(i,a);a.dragPan=new iu(d,j,H),this._add("mousePan",j),this._add("touchPan",H,["touchZoom","touchRotate"]),i.interactive&&i.dragPan&&a.dragPan.enable(i.dragPan);const X=new Jc,ne=new Al;a.touchZoomRotate=new ru(d,ne,X,T),this._add("touchRotate",X,["touchPan","touchZoom"]),this._add("touchZoom",ne,["touchPan","touchRotate"]),i.interactive&&i.touchZoomRotate&&a.touchZoomRotate.enable(i.touchZoomRotate);const Y=a.scrollZoom=new eu(a,()=>this._triggerRenderFrame());this._add("scrollZoom",Y,["mousePan"]),i.interactive&&i.scrollZoom&&a.scrollZoom.enable(i.scrollZoom);const le=a.keyboard=new vo(a);this._add("keyboard",le),i.interactive&&i.keyboard&&a.keyboard.enable(),this._add("blockableMapEvent",new op(a))}_add(i,a,d){this._handlers.push({handlerName:i,handler:a,allowed:d}),this._handlersById[i]=a}stop(i){if(!this._updatingCamera){for(const{handler:a}of this._handlers)a.reset();this._inertia.clear(),this._fireEvents({},{},i),this._changes=[]}}isActive(){for(const{handler:i}of this._handlers)if(i.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!fn(this._eventsInProgress)||this.isZooming()}_blockedByActive(i,a,d){for(const p in i)if(p!==d&&(!a||a.indexOf(p)<0))return!0;return!1}_getMapTouches(i){const a=[];for(const d of i)this._el.contains(d.target)&&a.push(d);return a}mergeHandlerResult(i,a,d,p,v){if(!d)return;c.e(i,d);const w={handlerName:p,originalEvent:d.originalEvent||v};d.zoomDelta!==void 0&&(a.zoom=w),d.panDelta!==void 0&&(a.drag=w),d.pitchDelta!==void 0&&(a.pitch=w),d.bearingDelta!==void 0&&(a.rotate=w)}_applyChanges(){const i={},a={},d={};for(const[p,v,w]of this._changes)p.panDelta&&(i.panDelta=(i.panDelta||new c.P(0,0))._add(p.panDelta)),p.zoomDelta&&(i.zoomDelta=(i.zoomDelta||0)+p.zoomDelta),p.bearingDelta&&(i.bearingDelta=(i.bearingDelta||0)+p.bearingDelta),p.pitchDelta&&(i.pitchDelta=(i.pitchDelta||0)+p.pitchDelta),p.around!==void 0&&(i.around=p.around),p.pinchAround!==void 0&&(i.pinchAround=p.pinchAround),p.noInertia&&(i.noInertia=p.noInertia),c.e(a,v),c.e(d,w);this._updateMapTransform(i,a,d),this._changes=[]}_updateMapTransform(i,a,d){const p=this._map,v=p._getTransformForUpdate(),w=p.terrain;if(!(xn(i)||w&&this._terrainMovement))return this._fireEvents(a,d,!0);let{panDelta:S,zoomDelta:T,bearingDelta:P,pitchDelta:O,around:R,pinchAround:j}=i;j!==void 0&&(R=j),p._stop(!0),R=R||p.transform.centerPoint;const H=v.pointLocation(S?R.sub(S):R);P&&(v.bearing+=P),O&&(v.pitch+=O),T&&(v.zoom+=T),w?this._terrainMovement||!a.drag&&!a.zoom?a.drag&&this._terrainMovement?v.center=v.pointLocation(v.centerPoint.sub(S)):v.setLocationAtPoint(H,R):(this._terrainMovement=!0,this._map._elevationFreeze=!0,v.setLocationAtPoint(H,R)):v.setLocationAtPoint(H,R),p._applyUpdatedTransform(v),this._map._update(),i.noInertia||this._inertia.record(i),this._fireEvents(a,d,!0)}_fireEvents(i,a,d){const p=fn(this._eventsInProgress),v=fn(i),w={};for(const R in i){const{originalEvent:j}=i[R];this._eventsInProgress[R]||(w[`${R}start`]=j),this._eventsInProgress[R]=i[R]}!p&&v&&this._fireEvent("movestart",v.originalEvent);for(const R in w)this._fireEvent(R,w[R]);v&&this._fireEvent("move",v.originalEvent);for(const R in i){const{originalEvent:j}=i[R];this._fireEvent(R,j)}const S={};let T;for(const R in this._eventsInProgress){const{handlerName:j,originalEvent:H}=this._eventsInProgress[R];this._handlersById[j].isActive()||(delete this._eventsInProgress[R],T=a[j]||H,S[`${R}end`]=T)}for(const R in S)this._fireEvent(R,S[R]);const P=fn(this._eventsInProgress),O=(p||v)&&!P;if(O&&this._terrainMovement&&(this._map._elevationFreeze=!1,this._terrainMovement=!1,this._map.transform.recalculateZoom(this._map.terrain)),d&&O){this._updatingCamera=!0;const R=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),j=H=>H!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new qh("renderFrame",{timeStamp:i})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ap extends c.E{constructor(i,a){super(),this._renderFrameCallback=()=>{const d=Math.min((A.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(d)),d<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=i,this._bearingSnap=a.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new c.M(this.transform.center.lng,this.transform.center.lat)}setCenter(i,a){return this.jumpTo({center:i},a)}panBy(i,a,d){return i=c.P.convert(i).mult(-1),this.panTo(this.transform.center,c.e({offset:i},a),d)}panTo(i,a,d){return this.easeTo(c.e({center:i},a),d)}getZoom(){return this.transform.zoom}setZoom(i,a){return this.jumpTo({zoom:i},a),this}zoomTo(i,a,d){return this.easeTo(c.e({zoom:i},a),d)}zoomIn(i,a){return this.zoomTo(this.getZoom()+1,i,a),this}zoomOut(i,a){return this.zoomTo(this.getZoom()-1,i,a),this}getBearing(){return this.transform.bearing}setBearing(i,a){return this.jumpTo({bearing:i},a),this}getPadding(){return this.transform.padding}setPadding(i,a){return this.jumpTo({padding:i},a),this}rotateTo(i,a,d){return this.easeTo(c.e({bearing:i},a),d)}resetNorth(i,a){return this.rotateTo(0,c.e({duration:1e3},i),a),this}resetNorthPitch(i,a){return this.easeTo(c.e({bearing:0,pitch:0,duration:1e3},i),a),this}snapToNorth(i,a){return Math.abs(this.getBearing()){if(this._zooming&&(p.zoom=c.z.number(v,Y,Ve)),this._rotating&&(p.bearing=c.z.number(w,P,Ve)),this._pitching&&(p.pitch=c.z.number(S,O,Ve)),this._padding&&(p.interpolatePadding(T,R,Ve),H=p.centerPoint.add(j)),this.terrain&&!i.freezeElevation&&this._updateElevation(Ve),ve)p.setLocationAtPoint(ve,Te);else{const Ke=p.zoomScale(p.zoom-v),ut=Y>v?Math.min(2,ie):Math.max(.5,ie),ht=Math.pow(ut,1-Ve),Je=p.unproject(le.add(me.mult(Ve*ht)).mult(Ke));p.setLocationAtPoint(p.renderWorldCopies?Je.wrap():Je,H)}this._applyUpdatedTransform(p),this._fireMoveEvents(a)},Ve=>{this.terrain&&i.freezeElevation&&this._finalizeElevation(),this._afterEase(a,Ve)},i),this}_prepareEase(i,a,d={}){this._moving=!0,a||d.moving||this.fire(new c.k("movestart",i)),this._zooming&&!d.zooming&&this.fire(new c.k("zoomstart",i)),this._rotating&&!d.rotating&&this.fire(new c.k("rotatestart",i)),this._pitching&&!d.pitching&&this.fire(new c.k("pitchstart",i))}_prepareElevation(i){this._elevationCenter=i,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(i,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(i){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const a=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(i<1&&a!==this._elevationTarget){const d=this._elevationTarget-this._elevationStart;this._elevationStart+=i*(d-(a-(d*i+this._elevationStart))/(1-i)),this._elevationTarget=a}this.transform.elevation=c.z.number(this._elevationStart,this._elevationTarget,i)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_applyUpdatedTransform(i){if(!this.transformCameraUpdate)return;const a=i.clone(),{center:d,zoom:p,pitch:v,bearing:w,elevation:S}=this.transformCameraUpdate(a);d&&(a.center=d),p!==void 0&&(a.zoom=p),v!==void 0&&(a.pitch=v),w!==void 0&&(a.bearing=w),S!==void 0&&(a.elevation=S),this.transform.apply(a)}_fireMoveEvents(i){this.fire(new c.k("move",i)),this._zooming&&this.fire(new c.k("zoom",i)),this._rotating&&this.fire(new c.k("rotate",i)),this._pitching&&this.fire(new c.k("pitch",i))}_afterEase(i,a){if(this._easeId&&a&&this._easeId===a)return;delete this._easeId;const d=this._zooming,p=this._rotating,v=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,d&&this.fire(new c.k("zoomend",i)),p&&this.fire(new c.k("rotateend",i)),v&&this.fire(new c.k("pitchend",i)),this.fire(new c.k("moveend",i))}flyTo(i,a){var d;if(!i.essential&&A.prefersReducedMotion){const at=c.L(i,["center","zoom","bearing","pitch","around"]);return this.jumpTo(at,a)}this.stop(),i=c.e({offset:[0,0],speed:1.2,curve:1.42,easing:c.b8},i);const p=this._getTransformForUpdate(),v=this.getZoom(),w=this.getBearing(),S=this.getPitch(),T=this.getPadding(),P="bearing"in i?this._normalizeBearing(i.bearing,w):w,O="pitch"in i?+i.pitch:S,R="padding"in i?i.padding:p.padding,j=c.P.convert(i.offset);let H=p.centerPoint.add(j);const X=p.pointLocation(H),{center:ne,zoom:Y}=p.getConstrained(c.M.convert(i.center||X),(d=i.zoom)!==null&&d!==void 0?d:v);this._normalizeCenter(ne);const le=p.zoomScale(Y-v),me=p.project(X),ie=p.project(ne).sub(me);let ve=i.curve;const Te=Math.max(p.width,p.height),Pe=Te/le,Ve=ie.mag();if("minZoom"in i){const at=c.ac(Math.min(i.minZoom,v,Y),p.minZoom,p.maxZoom),kt=Te/p.zoomScale(at-v);ve=Math.sqrt(kt/Ve*2)}const Ke=ve*ve;function ut(at){const kt=(Pe*Pe-Te*Te+(at?-1:1)*Ke*Ke*Ve*Ve)/(2*(at?Pe:Te)*Ke*Ve);return Math.log(Math.sqrt(kt*kt+1)-kt)}function ht(at){return(Math.exp(at)-Math.exp(-at))/2}function Je(at){return(Math.exp(at)+Math.exp(-at))/2}const et=ut(!1);let yt=function(at){return Je(et)/Je(et+ve*at)},Rt=function(at){return Te*((Je(et)*(ht(kt=et+ve*at)/Je(kt))-ht(et))/Ke)/Ve;var kt},it=(ut(!0)-et)/ve;if(Math.abs(Ve)<1e-6||!isFinite(it)){if(Math.abs(Te-Pe)<1e-6)return this.easeTo(i,a);const at=Pe0,yt=kt=>Math.exp(at*ve*kt)}return i.duration="duration"in i?+i.duration:1e3*it/("screenSpeed"in i?+i.screenSpeed/ve:+i.speed),i.maxDuration&&i.duration>i.maxDuration&&(i.duration=0),this._zooming=!0,this._rotating=w!==P,this._pitching=O!==S,this._padding=!p.isPaddingEqual(R),this._prepareEase(a,!1),this.terrain&&this._prepareElevation(ne),this._ease(at=>{const kt=at*it,Ti=1/yt(kt);p.zoom=at===1?Y:v+p.scaleZoom(Ti),this._rotating&&(p.bearing=c.z.number(w,P,at)),this._pitching&&(p.pitch=c.z.number(S,O,at)),this._padding&&(p.interpolatePadding(T,R,at),H=p.centerPoint.add(j)),this.terrain&&!i.freezeElevation&&this._updateElevation(at);const Wt=at===1?ne:p.unproject(me.add(ie.mult(Rt(kt))).mult(Ti));p.setLocationAtPoint(p.renderWorldCopies?Wt.wrap():Wt,H),this._applyUpdatedTransform(p),this._fireMoveEvents(a)},()=>{this.terrain&&i.freezeElevation&&this._finalizeElevation(),this._afterEase(a)},i),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(i,a){var d;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const p=this._onEaseEnd;delete this._onEaseEnd,p.call(this,a)}return i||(d=this.handlers)===null||d===void 0||d.stop(!1),this}_ease(i,a,d){d.animate===!1||d.duration===0?(i(1),a()):(this._easeStart=A.now(),this._easeOptions=d,this._onEaseFrame=i,this._onEaseEnd=a,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(i,a){i=c.b2(i,-180,180);const d=Math.abs(i-a);return Math.abs(i-360-a)180?-360:d<-180?360:0}queryTerrainElevation(i){return this.terrain?this.terrain.getElevationForLngLatZoom(c.M.convert(i),this.transform.tileZoom)-this.transform.elevation:null}}const Hh={compact:!0,customAttribution:'MapLibre'};class Gh{constructor(i=Hh){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=a=>{!a||a.sourceDataType!=="metadata"&&a.sourceDataType!=="visibility"&&a.dataType!=="style"&&a.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=i}getDefaultPosition(){return"bottom-right"}onAdd(i){return this._map=i,this._compact=this.options.compact,this._container=z.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=z.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=z.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(){z.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(i,a){const d=this._map._getUIString(`AttributionControl.${a}`);i.title=d,i.setAttribute("aria-label",d)}_updateAttributions(){if(!this._map.style)return;let i=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?i=i.concat(this.options.customAttribution.map(p=>typeof p!="string"?"":p)):typeof this.options.customAttribution=="string"&&i.push(this.options.customAttribution)),this._map.style.stylesheet){const p=this._map.style.stylesheet;this.styleOwner=p.owner,this.styleId=p.id}const a=this._map.style.sourceCaches;for(const p in a){const v=a[p];if(v.used||v.usedForTerrain){const w=v.getSource();w.attribution&&i.indexOf(w.attribution)<0&&i.push(w.attribution)}}i=i.filter(p=>String(p).trim()),i.sort((p,v)=>p.length-v.length),i=i.filter((p,v)=>{for(let w=v+1;w=0)return!1;return!0});const d=i.join(" | ");d!==this._attribHTML&&(this._attribHTML=d,i.length?(this._innerContainer.innerHTML=d,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class nu{constructor(i={}){this._updateCompact=()=>{const a=this._container.children;if(a.length){const d=a[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&d.classList.add("maplibregl-compact"):d.classList.remove("maplibregl-compact")}},this.options=i}getDefaultPosition(){return"bottom-left"}onAdd(i){this._map=i,this._compact=this.options&&this.options.compact,this._container=z.create("div","maplibregl-ctrl");const a=z.create("a","maplibregl-ctrl-logo");return a.target="_blank",a.rel="noopener nofollow",a.href="https://maplibre.org/",a.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),a.setAttribute("rel","noopener nofollow"),this._container.appendChild(a),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){z.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ea{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(i){const a=++this._id;return this._queue.push({callback:i,id:a,cancelled:!1}),a}remove(i){const a=this._currentlyRunning,d=a?this._queue.concat(a):this._queue;for(const p of d)if(p.id===i)return void(p.cancelled=!0)}run(i=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const a=this._currentlyRunning=this._queue;this._queue=[];for(const d of a)if(!d.cancelled&&(d.callback(i),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var xo=c.X([{name:"a_pos3d",type:"Int16",components:3}]);class mt extends c.E{constructor(i){super(),this.sourceCache=i,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,i.usedForTerrain=!0,i.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(i,a){this.sourceCache.update(i,a),this._renderableTilesKeys=[];const d={};for(const p of i.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:a}))d[p.key]=!0,this._renderableTilesKeys.push(p.key),this._tiles[p.key]||(p.posMatrix=new Float64Array(16),c.aO(p.posMatrix,0,c.W,0,c.W,0,1),this._tiles[p.key]=new si(p,this.tileSize));for(const p in this._tiles)d[p]||delete this._tiles[p]}freeRtt(i){for(const a in this._tiles){const d=this._tiles[a];(!i||d.tileID.equals(i)||d.tileID.isChildOf(i)||i.isChildOf(d.tileID))&&(d.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(i=>this.getTileByID(i))}getTileByID(i){return this._tiles[i]}getTerrainCoords(i){const a={};for(const d of this._renderableTilesKeys){const p=this._tiles[d].tileID;if(p.canonical.equals(i.canonical)){const v=i.clone();v.posMatrix=new Float64Array(16),c.aO(v.posMatrix,0,c.W,0,c.W,0,1),a[d]=v}else if(p.canonical.isChildOf(i.canonical)){const v=i.clone();v.posMatrix=new Float64Array(16);const w=p.canonical.z-i.canonical.z,S=p.canonical.x-(p.canonical.x>>w<>w<>w;c.aO(v.posMatrix,0,P,0,P,0,1),c.H(v.posMatrix,v.posMatrix,[-S*P,-T*P,0]),a[d]=v}else if(i.canonical.isChildOf(p.canonical)){const v=i.clone();v.posMatrix=new Float64Array(16);const w=i.canonical.z-p.canonical.z,S=i.canonical.x-(i.canonical.x>>w<>w<>w;c.aO(v.posMatrix,0,c.W,0,c.W,0,1),c.H(v.posMatrix,v.posMatrix,[S*P,T*P,0]),c.J(v.posMatrix,v.posMatrix,[1/2**w,1/2**w,0]),a[d]=v}}return a}getSourceTile(i,a){const d=this.sourceCache._source;let p=i.overscaledZ-this.deltaZoom;if(p>d.maxzoom&&(p=d.maxzoom),p=d.minzoom&&(!v||!v.dem);)v=this.sourceCache.getTileByID(i.scaledTo(p--).key);return v}tilesAfterTime(i=Date.now()){return Object.values(this._tiles).filter(a=>a.timeAdded>=i)}}class Wh{constructor(i,a,d){this.painter=i,this.sourceCache=new mt(a),this.options=d,this.exaggeration=typeof d.exaggeration=="number"?d.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(i,a,d,p=c.W){var v;if(!(a>=0&&a=0&&di.canonical.z&&(i.canonical.z>=p?v=i.canonical.z-p:c.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const w=i.canonical.x-(i.canonical.x>>v<>v<>8<<4|v>>8,a[w+3]=0;const d=new c.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(a.buffer)),p=new Ie(i,d,i.gl.RGBA,{premultiply:!1});return p.bind(i.gl.NEAREST,i.gl.CLAMP_TO_EDGE),this._coordsTexture=p,p}pointCoordinate(i){this.painter.maybeDrawDepthAndCoords(!0);const a=new Uint8Array(4),d=this.painter.context,p=d.gl,v=Math.round(i.x*this.painter.pixelRatio/devicePixelRatio),w=Math.round(i.y*this.painter.pixelRatio/devicePixelRatio),S=Math.round(this.painter.height/devicePixelRatio);d.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),p.readPixels(v,S-w-1,1,1,p.RGBA,p.UNSIGNED_BYTE,a),d.bindFramebuffer.set(null);const T=a[0]+(a[2]>>4<<8),P=a[1]+((15&a[2])<<8),O=this.coordsIndex[255-a[3]],R=O&&this.sourceCache.getTileByID(O);if(!R)return null;const j=this._coordsTextureSize,H=(1<i.id!==a),this._recentlyUsed.push(i.id)}stampObject(i){i.stamp=++this._stamp}getOrCreateFreeObject(){for(const a of this._recentlyUsed)if(!this._objects[a].inUse)return this._objects[a];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const i=this._createObject(this._objects.length);return this._objects.push(i),i}freeObject(i){i.inUse=!1}freeAllObjects(){for(const i of this._objects)this.freeObject(i)}isFull(){return!(this._objects.length!i.inUse)===!1}}const jn={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Zh{constructor(i,a){this.painter=i,this.terrain=a,this.pool=new Sa(i.context,30,a.sourceCache.tileSize*a.qualityFactor)}destruct(){this.pool.destruct()}getTexture(i){return this.pool.getObjectForId(i.rtt[this._stacks.length-1].id).texture}prepareForRender(i,a){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=i._order.filter(d=>!i._layers[d].isHidden(a)),this._coordsDescendingInv={};for(const d in i.sourceCaches){this._coordsDescendingInv[d]={};const p=i.sourceCaches[d].getVisibleCoordinates();for(const v of p){const w=this.terrain.sourceCache.getTerrainCoords(v);for(const S in w)this._coordsDescendingInv[d][S]||(this._coordsDescendingInv[d][S]=[]),this._coordsDescendingInv[d][S].push(w[S])}}this._coordsDescendingInvStr={};for(const d of i._order){const p=i._layers[d],v=p.source;if(jn[p.type]&&!this._coordsDescendingInvStr[v]){this._coordsDescendingInvStr[v]={};for(const w in this._coordsDescendingInv[v])this._coordsDescendingInvStr[v][w]=this._coordsDescendingInv[v][w].map(S=>S.key).sort().join()}}for(const d of this._renderableTiles)for(const p in this._coordsDescendingInvStr){const v=this._coordsDescendingInvStr[p][d.tileID.key];v&&v!==d.rttCoords[p]&&(d.rtt=[])}}renderLayer(i){if(i.isHidden(this.painter.transform.zoom))return!1;const a=i.type,d=this.painter,p=this._renderableLayerIds[this._renderableLayerIds.length-1]===i.id;if(jn[a]&&(this._prevType&&jn[this._prevType]||this._stacks.push([]),this._prevType=a,this._stacks[this._stacks.length-1].push(i.id),!p))return!0;if(jn[this._prevType]||jn[a]&&p){this._prevType=a;const v=this._stacks.length-1,w=this._stacks[v]||[];for(const S of this._renderableTiles){if(this.pool.isFull()&&(_l(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(S),S.rtt[v]){const P=this.pool.getObjectForId(S.rtt[v].id);if(P.stamp===S.rtt[v].stamp){this.pool.useObject(P);continue}}const T=this.pool.getOrCreateFreeObject();this.pool.useObject(T),this.pool.stampObject(T),S.rtt[v]={id:T.id,stamp:T.stamp},d.context.bindFramebuffer.set(T.fbo.framebuffer),d.context.clear({color:c.aP.transparent,stencil:0}),d.currentStencilSource=void 0;for(let P=0;P{_.touchstart=_.dragStart,_.touchmoveWindow=_.dragMove,_.touchend=_.dragEnd},su={showCompass:!0,showZoom:!0,visualizePitch:!1};class Kh{constructor(i,a,d=!1){this.mousedown=w=>{this.startMouse(c.e({},w,{ctrlKey:!0,preventDefault:()=>w.preventDefault()}),z.mousePos(this.element,w)),z.addEventListener(window,"mousemove",this.mousemove),z.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=w=>{this.moveMouse(w,z.mousePos(this.element,w))},this.mouseup=w=>{this.mouseRotate.dragEnd(w),this.mousePitch&&this.mousePitch.dragEnd(w),this.offTemp()},this.touchstart=w=>{w.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=z.touchPos(this.element,w.targetTouches)[0],this.startTouch(w,this._startPos),z.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),z.addEventListener(window,"touchend",this.touchend))},this.touchmove=w=>{w.targetTouches.length!==1?this.reset():(this._lastPos=z.touchPos(this.element,w.targetTouches)[0],this.moveTouch(w,this._lastPos))},this.touchend=w=>{w.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){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 p=i.dragRotate._mouseRotate.getClickTolerance(),v=i.dragRotate._mousePitch.getClickTolerance();this.element=a,this.mouseRotate=dn({clickTolerance:p,enable:!0}),this.touchRotate=(({enable:w,clickTolerance:S,bearingDegreesPerPixelMoved:T=.8})=>{const P=new Vi;return new Ko({clickTolerance:S,move:(O,R)=>({bearingDelta:(R.x-O.x)*T}),moveStateManager:P,enable:w,assignEvents:Xh})})({clickTolerance:p,enable:!0}),this.map=i,d&&(this.mousePitch=Tl({clickTolerance:v,enable:!0}),this.touchPitch=(({enable:w,clickTolerance:S,pitchDegreesPerPixelMoved:T=-.5})=>{const P=new Vi;return new Ko({clickTolerance:S,move:(O,R)=>({pitchDelta:(R.y-O.y)*T}),moveStateManager:P,enable:w,assignEvents:Xh})})({clickTolerance:v,enable:!0})),z.addEventListener(a,"mousedown",this.mousedown),z.addEventListener(a,"touchstart",this.touchstart,{passive:!1}),z.addEventListener(a,"touchcancel",this.reset)}startMouse(i,a){this.mouseRotate.dragStart(i,a),this.mousePitch&&this.mousePitch.dragStart(i,a),z.disableDrag()}startTouch(i,a){this.touchRotate.dragStart(i,a),this.touchPitch&&this.touchPitch.dragStart(i,a),z.disableDrag()}moveMouse(i,a){const d=this.map,{bearingDelta:p}=this.mouseRotate.dragMove(i,a)||{};if(p&&d.setBearing(d.getBearing()+p),this.mousePitch){const{pitchDelta:v}=this.mousePitch.dragMove(i,a)||{};v&&d.setPitch(d.getPitch()+v)}}moveTouch(i,a){const d=this.map,{bearingDelta:p}=this.touchRotate.dragMove(i,a)||{};if(p&&d.setBearing(d.getBearing()+p),this.touchPitch){const{pitchDelta:v}=this.touchPitch.dragMove(i,a)||{};v&&d.setPitch(d.getPitch()+v)}}off(){const i=this.element;z.removeEventListener(i,"mousedown",this.mousedown),z.removeEventListener(i,"touchstart",this.touchstart,{passive:!1}),z.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),z.removeEventListener(window,"touchend",this.touchend),z.removeEventListener(i,"touchcancel",this.reset),this.offTemp()}offTemp(){z.enableDrag(),z.removeEventListener(window,"mousemove",this.mousemove),z.removeEventListener(window,"mouseup",this.mouseup),z.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),z.removeEventListener(window,"touchend",this.touchend)}}let bo;function Jh(_,i,a){const d=new c.M(_.lng,_.lat);if(_=new c.M(_.lng,_.lat),i){const p=new c.M(_.lng-360,_.lat),v=new c.M(_.lng+360,_.lat),w=a.locationPoint(_).distSqr(i);a.locationPoint(p).distSqr(i)180;){const p=a.locationPoint(_);if(p.x>=0&&p.y>=0&&p.x<=a.width&&p.y<=a.height)break;_.lng>a.center.lng?_.lng-=360:_.lng+=360}return _.lng!==d.lng&&a.locationPoint(_).y>a.height/2-a.getHorizon()?_:d}const au={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 wo(_,i,a){const d=_.classList;for(const p in au)d.remove(`maplibregl-${a}-anchor-${p}`);d.add(`maplibregl-${a}-anchor-${i}`)}class xi extends c.E{constructor(i){if(super(),this._onKeyPress=a=>{const d=a.code,p=a.charCode||a.keyCode;d!=="Space"&&d!=="Enter"&&p!==32&&p!==13||this.togglePopup()},this._onMapClick=a=>{const d=a.originalEvent.target,p=this._element;this._popup&&(d===p||p.contains(d))&&this.togglePopup()},this._update=a=>{var d;if(!this._map)return;const p=this._map.loaded()&&!this._map.isMoving();((a==null?void 0:a.type)==="terrain"||(a==null?void 0:a.type)==="render"&&!p)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Jh(this._lngLat,this._flatPos,this._map.transform):(d=this._lngLat)===null||d===void 0?void 0:d.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 v="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?v=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(v=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let w="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?w="rotateX(0deg)":this._pitchAlignment==="map"&&(w=`rotateX(${this._map.getPitch()}deg)`),a&&a.type!=="moveend"||(this._pos=this._pos.round()),z.setTransform(this._element,`${au[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${w} ${v}`),A.frameAsync(new AbortController).then(()=>{this._updateOpacity(a&&a.type==="moveend")}).catch(()=>{})},this._onMove=a=>{if(!this._isDragging){const d=this._clickTolerance||this._map._clickTolerance;this._isDragging=a.point.dist(this._pointerdownPos)>=d}this._isDragging&&(this._pos=a.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 c.k("dragstart"))),this.fire(new c.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 c.k("dragend")),this._state="inactive"},this._addDragHandler=a=>{this._element.contains(a.originalEvent.target)&&(a.preventDefault(),this._positionDelta=a.point.sub(this._pos).add(this._offset),this._pointerdownPos=a.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=i&&i.anchor||"center",this._color=i&&i.color||"#3FB1CE",this._scale=i&&i.scale||1,this._draggable=i&&i.draggable||!1,this._clickTolerance=i&&i.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=i&&i.rotation||0,this._rotationAlignment=i&&i.rotationAlignment||"auto",this._pitchAlignment=i&&i.pitchAlignment&&i.pitchAlignment!=="auto"?i.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(i==null?void 0:i.opacity,i==null?void 0:i.opacityWhenCovered),i&&i.element)this._element=i.element,this._offset=c.P.convert(i&&i.offset||[0,0]);else{this._defaultMarker=!0,this._element=z.create("div");const a=z.createNS("http://www.w3.org/2000/svg","svg"),d=41,p=27;a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height",`${d}px`),a.setAttributeNS(null,"width",`${p}px`),a.setAttributeNS(null,"viewBox",`0 0 ${p} ${d}`);const v=z.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"stroke","none"),v.setAttributeNS(null,"stroke-width","1"),v.setAttributeNS(null,"fill","none"),v.setAttributeNS(null,"fill-rule","evenodd");const w=z.createNS("http://www.w3.org/2000/svg","g");w.setAttributeNS(null,"fill-rule","nonzero");const S=z.createNS("http://www.w3.org/2000/svg","g");S.setAttributeNS(null,"transform","translate(3.0, 29.0)"),S.setAttributeNS(null,"fill","#000000");const T=[{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 le of T){const me=z.createNS("http://www.w3.org/2000/svg","ellipse");me.setAttributeNS(null,"opacity","0.04"),me.setAttributeNS(null,"cx","10.5"),me.setAttributeNS(null,"cy","5.80029008"),me.setAttributeNS(null,"rx",le.rx),me.setAttributeNS(null,"ry",le.ry),S.appendChild(me)}const P=z.createNS("http://www.w3.org/2000/svg","g");P.setAttributeNS(null,"fill",this._color);const O=z.createNS("http://www.w3.org/2000/svg","path");O.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),P.appendChild(O);const R=z.createNS("http://www.w3.org/2000/svg","g");R.setAttributeNS(null,"opacity","0.25"),R.setAttributeNS(null,"fill","#000000");const j=z.createNS("http://www.w3.org/2000/svg","path");j.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"),R.appendChild(j);const H=z.createNS("http://www.w3.org/2000/svg","g");H.setAttributeNS(null,"transform","translate(6.0, 7.0)"),H.setAttributeNS(null,"fill","#FFFFFF");const X=z.createNS("http://www.w3.org/2000/svg","g");X.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ne=z.createNS("http://www.w3.org/2000/svg","circle");ne.setAttributeNS(null,"fill","#000000"),ne.setAttributeNS(null,"opacity","0.25"),ne.setAttributeNS(null,"cx","5.5"),ne.setAttributeNS(null,"cy","5.5"),ne.setAttributeNS(null,"r","5.4999962");const Y=z.createNS("http://www.w3.org/2000/svg","circle");Y.setAttributeNS(null,"fill","#FFFFFF"),Y.setAttributeNS(null,"cx","5.5"),Y.setAttributeNS(null,"cy","5.5"),Y.setAttributeNS(null,"r","5.4999962"),X.appendChild(ne),X.appendChild(Y),w.appendChild(S),w.appendChild(P),w.appendChild(R),w.appendChild(H),w.appendChild(X),a.appendChild(w),a.setAttributeNS(null,"height",d*this._scale+"px"),a.setAttributeNS(null,"width",p*this._scale+"px"),this._element.appendChild(a),this._offset=c.P.convert(i&&i.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",a=>{a.preventDefault()}),this._element.addEventListener("mousedown",a=>{a.preventDefault()}),wo(this._element,this._anchor,"marker"),i&&i.className)for(const a of i.className.split(" "))this._element.classList.add(a);this._popup=null}addTo(i){return this.remove(),this._map=i,this._element.setAttribute("aria-label",i._getUIString("Marker.Title")),i.getCanvasContainer().appendChild(this._element),i.on("move",this._update),i.on("moveend",this._update),i.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),z.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(i){return this._lngLat=c.M.convert(i),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(i){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),i){if(!("offset"in i.options)){const p=Math.abs(13.5)/Math.SQRT2;i.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[p,-1*(38.1-13.5+p)],"bottom-right":[-p,-1*(38.1-13.5+p)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=i,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}getPopup(){return this._popup}togglePopup(){const i=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:i?(i.isOpen()?i.remove():(i.setLngLat(this._lngLat),i.addTo(this._map)),this):this}_updateOpacity(i=!1){var a,d;if(!(!((a=this._map)===null||a===void 0)&&a.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(i)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const p=this._map,v=p.terrain.depthAtPoint(this._pos),w=p.terrain.getElevationForLngLatZoom(this._lngLat,p.transform.tileZoom);if(p.transform.lngLatToCameraDepth(this._lngLat,w)-v<.006)return void(this._element.style.opacity=this._opacity);const S=-this._offset.y/p.transform._pixelPerMeter,T=Math.sin(p.getPitch()*Math.PI/180)*S,P=p.terrain.depthAtPoint(new c.P(this._pos.x,this._pos.y-this._offset.y)),O=p.transform.lngLatToCameraDepth(this._lngLat,w+T)-P>.006;!((d=this._popup)===null||d===void 0)&&d.isOpen()&&O&&this._popup.remove(),this._element.style.opacity=O?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(i){return this._offset=c.P.convert(i),this._update(),this}addClassName(i){this._element.classList.add(i)}removeClassName(i){this._element.classList.remove(i)}toggleClassName(i){return this._element.classList.toggle(i)}setDraggable(i){return this._draggable=!!i,this._map&&(i?(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(i){return this._rotation=i||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(i){return this._rotationAlignment=i||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(i){return this._pitchAlignment=i&&i!=="auto"?i:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(i,a){return i===void 0&&a===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),i!==void 0&&(this._opacity=i),a!==void 0&&(this._opacityWhenCovered=a),this._map&&this._updateOpacity(!0),this}}const kl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Ts=0,Cs=!1;const Yh={maxWidth:100,unit:"metric"};function lu(_,i,a){const d=a&&a.maxWidth||100,p=_._container.clientHeight/2,v=_.unproject([0,p]),w=_.unproject([d,p]),S=v.distanceTo(w);if(a&&a.unit==="imperial"){const T=3.2808*S;T>5280?Ia(i,d,T/5280,_._getUIString("ScaleControl.Miles")):Ia(i,d,T,_._getUIString("ScaleControl.Feet"))}else a&&a.unit==="nautical"?Ia(i,d,S/1852,_._getUIString("ScaleControl.NauticalMiles")):S>=1e3?Ia(i,d,S/1e3,_._getUIString("ScaleControl.Kilometers")):Ia(i,d,S,_._getUIString("ScaleControl.Meters"))}function Ia(_,i,a,d){const p=function(v){const w=Math.pow(10,`${Math.floor(v)}`.length-1);let S=v/w;return S=S>=10?10:S>=5?5:S>=3?3:S>=2?2:S>=1?1:function(T){const P=Math.pow(10,Math.ceil(-Math.log(T)/Math.LN10));return Math.round(T*P)/P}(S),w*S}(a);_.style.width=i*(p/a)+"px",_.innerHTML=`${p} ${d}`}const $n={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Ll=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function bt(_){if(_){if(typeof _=="number"){const i=Math.round(Math.abs(_)/Math.SQRT2);return{center:new c.P(0,0),top:new c.P(0,_),"top-left":new c.P(i,i),"top-right":new c.P(-i,i),bottom:new c.P(0,-_),"bottom-left":new c.P(i,-i),"bottom-right":new c.P(-i,-i),left:new c.P(_,0),right:new c.P(-_,0)}}if(_ instanceof c.P||Array.isArray(_)){const i=c.P.convert(_);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:c.P.convert(_.center||[0,0]),top:c.P.convert(_.top||[0,0]),"top-left":c.P.convert(_["top-left"]||[0,0]),"top-right":c.P.convert(_["top-right"]||[0,0]),bottom:c.P.convert(_.bottom||[0,0]),"bottom-left":c.P.convert(_["bottom-left"]||[0,0]),"bottom-right":c.P.convert(_["bottom-right"]||[0,0]),left:c.P.convert(_.left||[0,0]),right:c.P.convert(_.right||[0,0])}}return bt(new c.P(0,0))}const Ct=I;m.AJAXError=c.bf,m.Evented=c.E,m.LngLat=c.M,m.MercatorCoordinate=c.Y,m.Point=c.P,m.addProtocol=c.bg,m.config=c.a,m.removeProtocol=c.bh,m.AttributionControl=Gh,m.BoxZoomHandler=xa,m.CanvasSource=pt,m.CooperativeGesturesHandler=vn,m.DoubleClickZoomHandler=tu,m.DragPanHandler=iu,m.DragRotateHandler=Is,m.EdgeInsets=_a,m.FullscreenControl=class extends c.E{constructor(_={}){super(),this._onFullscreenChange=()=>{var i;let a=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((i=a==null?void 0:a.shadowRoot)===null||i===void 0)&&i.fullscreenElement;)a=a.shadowRoot.fullscreenElement;a===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,_&&_.container&&(_.container instanceof HTMLElement?this._container=_.container:c.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(_){return this._map=_,this._container||(this._container=this._map.getContainer()),this._controlContainer=z.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){z.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const _=this._fullscreenButton=z.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);z.create("span","maplibregl-ctrl-icon",_).setAttribute("aria-hidden","true"),_.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const _=this._getTitle();this._fullscreenButton.setAttribute("aria-label",_),this._fullscreenButton.title=_}_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 c.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new c.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()}},m.GeoJSONSource=We,m.GeolocateControl=class extends c.E{constructor(_){super(),this._onSuccess=i=>{if(this._map){if(this._isOutOfMapMaxBounds(i))return this._setErrorState(),this.fire(new c.k("outofmaxbounds",i)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=i,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(i),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(i),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new c.k("geolocate",i)),this._finish()}},this._updateCamera=i=>{const a=new c.M(i.coords.longitude,i.coords.latitude),d=i.coords.accuracy,p=this._map.getBearing(),v=c.e({bearing:p},this.options.fitBoundsOptions),w=ge.fromLngLat(a,d);this._map.fitBounds(w,v,{geolocateSource:!0})},this._updateMarker=i=>{if(i){const a=new c.M(i.coords.longitude,i.coords.latitude);this._accuracyCircleMarker.setLngLat(a).addTo(this._map),this._userLocationDotMarker.setLngLat(a).addTo(this._map),this._accuracy=i.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=i=>{if(this._map){if(this.options.trackUserLocation)if(i.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 a=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(i.code===3&&Cs)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new c.k("error",i)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=i=>{if(this._map){if(this._container.addEventListener("contextmenu",a=>a.preventDefault()),this._geolocateButton=z.create("button","maplibregl-ctrl-geolocate",this._container),z.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",i===!1){c.w("Geolocation support is not available so the GeolocateControl will be disabled.");const a=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}else{const a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=z.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new xi({element:this._dotElement}),this._circleElement=z.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new xi({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",a=>{a.geolocateSource||this._watchState!=="ACTIVE_LOCK"||a.originalEvent&&a.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 c.k("trackuserlocationend")),this.fire(new c.k("userlocationlostfocus")))})}},this.options=c.e({},kl,_)}onAdd(_){return this._map=_,this._container=z.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(){return c._(this,arguments,void 0,function*(i=!1){if(bo!==void 0&&!i)return bo;if(window.navigator.permissions===void 0)return bo=!!window.navigator.geolocation,bo;try{bo=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{bo=!!window.navigator.geolocation}return bo})}().then(i=>this._setupUI(i)),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(),z.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Ts=0,Cs=!1}_isOutOfMapMaxBounds(_){const i=this._map.getMaxBounds(),a=_.coords;return i&&(a.longitudei.getEast()||a.latitudei.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const _=this._map.getBounds(),i=_.getSouthEast(),a=_.getNorthEast(),d=i.distanceTo(a),p=Math.ceil(this._accuracy/(d/this._map._container.clientHeight)*2);this._circleElement.style.width=`${p}px`,this._circleElement.style.height=`${p}px`}trigger(){if(!this._setup)return c.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 c.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ts--,Cs=!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 c.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 c.k("trackuserlocationstart")),this.fire(new c.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 _;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ts++,Ts>1?(_={maximumAge:6e5,timeout:0},Cs=!0):(_=this.options.positionOptions,Cs=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,_)}}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)}},m.Hash=qc,m.ImageSource=Qe,m.KeyboardHandler=vo,m.LngLatBounds=ge,m.LogoControl=nu,m.Map=class extends ap{constructor(_){c.bd.mark(c.be.create);const i=Object.assign(Object.assign({},lp),_);if(i.minZoom!=null&&i.maxZoom!=null&&i.minZoom>i.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(i.minPitch!=null&&i.maxPitch!=null&&i.minPitch>i.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(i.minPitch!=null&&i.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(i.maxPitch!=null&&i.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Uc(i.minZoom,i.maxZoom,i.minPitch,i.maxPitch,i.renderWorldCopies),{bearingSnap:i.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ea,this._controls=[],this._mapId=c.a3(),this._contextLost=a=>{a.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new c.k("webglcontextlost",{originalEvent:a}))},this._contextRestored=a=>{this._setupPainter(),this.resize(),this._update(),this.fire(new c.k("webglcontextrestored",{originalEvent:a}))},this._onMapScroll=a=>{if(a.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=i.interactive,this._maxTileCacheSize=i.maxTileCacheSize,this._maxTileCacheZoomLevels=i.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=i.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=i.preserveDrawingBuffer===!0,this._antialias=i.antialias===!0,this._trackResize=i.trackResize===!0,this._bearingSnap=i.bearingSnap,this._refreshExpiredTiles=i.refreshExpiredTiles===!0,this._fadeDuration=i.fadeDuration,this._crossSourceCollisions=i.crossSourceCollisions===!0,this._collectResourceTiming=i.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},ct),i.locale),this._clickTolerance=i.clickTolerance,this._overridePixelRatio=i.pixelRatio,this._maxCanvasSize=i.maxCanvasSize,this.transformCameraUpdate=i.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=i.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=Z.addThrottleControl(()=>this.isMoving()),this._requestManager=new fe(i.transformRequest),typeof i.container=="string"){if(this._container=document.getElementById(i.container),!this._container)throw new Error(`Container '${i.container}' not found.`)}else{if(!(i.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=i.container}if(i.maxBounds&&this.setMaxBounds(i.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 a=!1;const d=Bh(p=>{this._trackResize&&!this._removed&&this.resize(p)._update()},50);this._resizeObserver=new ResizeObserver(p=>{a?d(p):a=!0}),this._resizeObserver.observe(this._container)}this.handlers=new wa(this,i),this._hash=i.hash&&new qc(typeof i.hash=="string"&&i.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch}),i.bounds&&(this.resize(),this.fitBounds(i.bounds,c.e({},i.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=i.localIdeographFontFamily,this._validateStyle=i.validateStyle,i.style&&this.setStyle(i.style,{localIdeographFontFamily:i.localIdeographFontFamily}),i.attributionControl&&this.addControl(new Gh(typeof i.attributionControl=="boolean"?void 0:i.attributionControl)),i.maplibreLogo&&this.addControl(new nu,i.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",a=>{this._update(a.dataType==="style"),this.fire(new c.k(`${a.dataType}data`,a))}),this.on("dataloading",a=>{this.fire(new c.k(`${a.dataType}dataloading`,a))}),this.on("dataabort",a=>{this.fire(new c.k("sourcedataabort",a))})}_getMapId(){return this._mapId}addControl(_,i){if(i===void 0&&(i=_.getDefaultPosition?_.getDefaultPosition():"top-right"),!_||!_.onAdd)return this.fire(new c.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const a=_.onAdd(this);this._controls.push(_);const d=this._controlPositions[i];return i.indexOf("bottom")!==-1?d.insertBefore(a,d.firstChild):d.appendChild(a),this}removeControl(_){if(!_||!_.onRemove)return this.fire(new c.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const i=this._controls.indexOf(_);return i>-1&&this._controls.splice(i,1),_.onRemove(this),this}hasControl(_){return this._controls.indexOf(_)>-1}calculateCameraOptionsFromTo(_,i,a,d){return d==null&&this.terrain&&(d=this.terrain.getElevationForLngLatZoom(a,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(_,i,a,d)}resize(_){var i;const a=this._containerDimensions(),d=a[0],p=a[1],v=this._getClampedPixelRatio(d,p);if(this._resizeCanvas(d,p,v),this.painter.resize(d,p,v),this.painter.overLimit()){const S=this.painter.context.gl;this._maxCanvasSize=[S.drawingBufferWidth,S.drawingBufferHeight];const T=this._getClampedPixelRatio(d,p);this._resizeCanvas(d,p,T),this.painter.resize(d,p,T)}this.transform.resize(d,p),(i=this._requestedCameraState)===null||i===void 0||i.resize(d,p);const w=!this._moving;return w&&(this.stop(),this.fire(new c.k("movestart",_)).fire(new c.k("move",_))),this.fire(new c.k("resize",_)),w&&this.fire(new c.k("moveend",_)),this}_getClampedPixelRatio(_,i){const{0:a,1:d}=this._maxCanvasSize,p=this.getPixelRatio(),v=_*p,w=i*p;return Math.min(v>a?a/v:1,w>d?d/w:1)*p}getPixelRatio(){var _;return(_=this._overridePixelRatio)!==null&&_!==void 0?_:devicePixelRatio}setPixelRatio(_){this._overridePixelRatio=_,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(_){return this.transform.setMaxBounds(ge.convert(_)),this._update()}setMinZoom(_){if((_=_??-2)>=-2&&_<=this.transform.maxZoom)return this.transform.minZoom=_,this._update(),this.getZoom()<_&&this.setZoom(_),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(_){if((_=_??22)>=this.transform.minZoom)return this.transform.maxZoom=_,this._update(),this.getZoom()>_&&this.setZoom(_),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(_){if((_=_??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(_>=0&&_<=this.transform.maxPitch)return this.transform.minPitch=_,this._update(),this.getPitch()<_&&this.setPitch(_),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(_){if((_=_??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(_>=this.transform.minPitch)return this.transform.maxPitch=_,this._update(),this.getPitch()>_&&this.setPitch(_),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(_){return this.transform.renderWorldCopies=_,this._update()}project(_){return this.transform.locationPoint(c.M.convert(_),this.style&&this.terrain)}unproject(_){return this.transform.pointLocation(c.P.convert(_),this.terrain)}isMoving(){var _;return this._moving||((_=this.handlers)===null||_===void 0?void 0:_.isMoving())}isZooming(){var _;return this._zooming||((_=this.handlers)===null||_===void 0?void 0:_.isZooming())}isRotating(){var _;return this._rotating||((_=this.handlers)===null||_===void 0?void 0:_.isRotating())}_createDelegatedListener(_,i,a){if(_==="mouseenter"||_==="mouseover"){let d=!1;return{layer:i,listener:a,delegates:{mousemove:v=>{const w=this.getLayer(i)?this.queryRenderedFeatures(v.point,{layers:[i]}):[];w.length?d||(d=!0,a.call(this,new Ir(_,this,v.originalEvent,{features:w}))):d=!1},mouseout:()=>{d=!1}}}}if(_==="mouseleave"||_==="mouseout"){let d=!1;return{layer:i,listener:a,delegates:{mousemove:w=>{(this.getLayer(i)?this.queryRenderedFeatures(w.point,{layers:[i]}):[]).length?d=!0:d&&(d=!1,a.call(this,new Ir(_,this,w.originalEvent)))},mouseout:w=>{d&&(d=!1,a.call(this,new Ir(_,this,w.originalEvent)))}}}}{const d=p=>{const v=this.getLayer(i)?this.queryRenderedFeatures(p.point,{layers:[i]}):[];v.length&&(p.features=v,a.call(this,p),delete p.features)};return{layer:i,listener:a,delegates:{[_]:d}}}}on(_,i,a){if(a===void 0)return super.on(_,i);const d=this._createDelegatedListener(_,i,a);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[_]=this._delegatedListeners[_]||[],this._delegatedListeners[_].push(d);for(const p in d.delegates)this.on(p,d.delegates[p]);return this}once(_,i,a){if(a===void 0)return super.once(_,i);const d=this._createDelegatedListener(_,i,a);for(const p in d.delegates)this.once(p,d.delegates[p]);return this}off(_,i,a){return a===void 0?super.off(_,i):(this._delegatedListeners&&this._delegatedListeners[_]&&(d=>{const p=this._delegatedListeners[_];for(let v=0;vthis._updateStyle(_,i));const a=this.style&&i.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!_)),_?(this.style=new el(this,i||{}),this.style.setEventedParent(this,{style:this.style}),typeof _=="string"?this.style.loadURL(_,i,a):this.style.loadJSON(_,i,a),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new el(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(_,i){if(typeof _=="string"){const a=this._requestManager.transformRequest(_,"Style");c.h(a,new AbortController).then(d=>{this._updateDiff(d.data,i)}).catch(d=>{d&&this.fire(new c.j(d))})}else typeof _=="object"&&this._updateDiff(_,i)}_updateDiff(_,i){try{this.style.setState(_,i)&&this._update(!0)}catch(a){c.w(`Unable to perform style diff: ${a.message||a.error||a}. Rebuilding the style from scratch.`),this._updateStyle(_,i)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():c.w("There is no style added to the map.")}addSource(_,i){return this._lazyInitEmptyStyle(),this.style.addSource(_,i),this._update(!0)}isSourceLoaded(_){const i=this.style&&this.style.sourceCaches[_];if(i!==void 0)return i.loaded();this.fire(new c.j(new Error(`There is no source with ID '${_}'`)))}setTerrain(_){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),_){const i=this.style.sourceCaches[_.source];if(!i)throw new Error(`cannot load terrain, because there exists no source with ID: ${_.source}`);this.terrain===null&&i.reload();for(const a in this.style._layers){const d=this.style._layers[a];d.type==="hillshade"&&d.source===_.source&&c.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 Wh(this.painter,i,_),this.painter.renderToTexture=new Zh(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=a=>{a.dataType==="style"?this.terrain.sourceCache.freeRtt():a.dataType==="source"&&a.tile&&(a.sourceId!==_.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(a.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 c.k("terrain",{terrain:_})),this}getTerrain(){var _,i;return(i=(_=this.terrain)===null||_===void 0?void 0:_.options)!==null&&i!==void 0?i:null}areTilesLoaded(){const _=this.style&&this.style.sourceCaches;for(const i in _){const a=_[i]._tiles;for(const d in a){const p=a[d];if(p.state!=="loaded"&&p.state!=="errored")return!1}}return!0}removeSource(_){return this.style.removeSource(_),this._update(!0)}getSource(_){return this.style.getSource(_)}addImage(_,i,a={}){const{pixelRatio:d=1,sdf:p=!1,stretchX:v,stretchY:w,content:S,textFitWidth:T,textFitHeight:P}=a;if(this._lazyInitEmptyStyle(),!(i instanceof HTMLImageElement||c.b(i))){if(i.width===void 0||i.height===void 0)return this.fire(new c.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:O,height:R,data:j}=i,H=i;return this.style.addImage(_,{data:new c.R({width:O,height:R},new Uint8Array(j)),pixelRatio:d,stretchX:v,stretchY:w,content:S,textFitWidth:T,textFitHeight:P,sdf:p,version:0,userImage:H}),H.onAdd&&H.onAdd(this,_),this}}{const{width:O,height:R,data:j}=A.getImageData(i);this.style.addImage(_,{data:new c.R({width:O,height:R},j),pixelRatio:d,stretchX:v,stretchY:w,content:S,textFitWidth:T,textFitHeight:P,sdf:p,version:0})}}updateImage(_,i){const a=this.style.getImage(_);if(!a)return this.fire(new c.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const d=i instanceof HTMLImageElement||c.b(i)?A.getImageData(i):i,{width:p,height:v,data:w}=d;if(p===void 0||v===void 0)return this.fire(new c.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(p!==a.data.width||v!==a.data.height)return this.fire(new c.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const S=!(i instanceof HTMLImageElement||c.b(i));return a.data.replace(w,S),this.style.updateImage(_,a),this}getImage(_){return this.style.getImage(_)}hasImage(_){return _?!!this.style.getImage(_):(this.fire(new c.j(new Error("Missing required image id"))),!1)}removeImage(_){this.style.removeImage(_)}loadImage(_){return Z.getImage(this._requestManager.transformRequest(_,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(_,i){return this._lazyInitEmptyStyle(),this.style.addLayer(_,i),this._update(!0)}moveLayer(_,i){return this.style.moveLayer(_,i),this._update(!0)}removeLayer(_){return this.style.removeLayer(_),this._update(!0)}getLayer(_){return this.style.getLayer(_)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(_,i,a){return this.style.setLayerZoomRange(_,i,a),this._update(!0)}setFilter(_,i,a={}){return this.style.setFilter(_,i,a),this._update(!0)}getFilter(_){return this.style.getFilter(_)}setPaintProperty(_,i,a,d={}){return this.style.setPaintProperty(_,i,a,d),this._update(!0)}getPaintProperty(_,i){return this.style.getPaintProperty(_,i)}setLayoutProperty(_,i,a,d={}){return this.style.setLayoutProperty(_,i,a,d),this._update(!0)}getLayoutProperty(_,i){return this.style.getLayoutProperty(_,i)}setGlyphs(_,i={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(_,i),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(_,i,a={}){return this._lazyInitEmptyStyle(),this.style.addSprite(_,i,a,d=>{d||this._update(!0)}),this}removeSprite(_){return this._lazyInitEmptyStyle(),this.style.removeSprite(_),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(_,i={}){return this._lazyInitEmptyStyle(),this.style.setSprite(_,i,a=>{a||this._update(!0)}),this}setLight(_,i={}){return this._lazyInitEmptyStyle(),this.style.setLight(_,i),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(_,i){return this.style.setFeatureState(_,i),this._update()}removeFeatureState(_,i){return this.style.removeFeatureState(_,i),this._update()}getFeatureState(_){return this.style.getFeatureState(_)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let _=0,i=0;return this._container&&(_=this._container.clientWidth||400,i=this._container.clientHeight||300),[_,i]}_setupContainer(){const _=this._container;_.classList.add("maplibregl-map");const i=this._canvasContainer=z.create("div","maplibregl-canvas-container",_);this._interactive&&i.classList.add("maplibregl-interactive"),this._canvas=z.create("canvas","maplibregl-canvas",i),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 a=this._containerDimensions(),d=this._getClampedPixelRatio(a[0],a[1]);this._resizeCanvas(a[0],a[1],d);const p=this._controlContainer=z.create("div","maplibregl-control-container",_),v=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(w=>{v[w]=z.create("div",`maplibregl-ctrl-${w} `,p)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(_,i,a){this._canvas.width=Math.floor(a*_),this._canvas.height=Math.floor(a*i),this._canvas.style.width=`${_}px`,this._canvas.style.height=`${i}px`}_setupPainter(){const _={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let i=null;this._canvas.addEventListener("webglcontextcreationerror",d=>{i={requestedAttributes:_},d&&(i.statusMessage=d.statusMessage,i.type=d.type)},{once:!0});const a=this._canvas.getContext("webgl2",_)||this._canvas.getContext("webgl",_);if(!a){const d="Failed to initialize WebGL";throw i?(i.message=d,new Error(JSON.stringify(i))):new Error(d)}this.painter=new ni(a,this.transform),q.testSupport(a)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(_){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||_,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(_){return this._update(),this._renderTaskQueue.add(_)}_cancelRenderFrame(_){this._renderTaskQueue.remove(_)}_render(_){const i=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(_),this._removed)return;let a=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const p=this.transform.zoom,v=A.now();this.style.zoomHistory.update(p,v);const w=new c.a8(p,{now:v,fadeDuration:i,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),S=w.crossFadingFactor();S===1&&S===this._crossFadingFactor||(a=!0,this._crossFadingFactor=S),this.style.update(w)}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,i,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:i,showPadding:this.showPadding}),this.fire(new c.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,c.bd.mark(c.be.load),this.fire(new c.k("load"))),this.style&&(this.style.hasTransitions()||a)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const d=this._sourcesDirty||this._styleDirty||this._placementDirty;return d||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new c.k("idle")),!this._loaded||this._fullyLoaded||d||(this._fullyLoaded=!0,c.bd.mark(c.be.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var _;this._hash&&this._hash.remove();for(const a of this._controls)a.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),Z.removeThrottleControl(this._imageQueueHandle),(_=this._resizeObserver)===null||_===void 0||_.disconnect();const i=this.painter.context.gl.getExtension("WEBGL_lose_context");i!=null&&i.loseContext&&i.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),z.remove(this._canvasContainer),z.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),c.bd.clearMetrics(),this._removed=!0,this.fire(new c.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,A.frameAsync(this._frameRequest).then(_=>{c.bd.frame(_),this._frameRequest=null,this._render(_)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(_){this._showTileBoundaries!==_&&(this._showTileBoundaries=_,this._update())}get showPadding(){return!!this._showPadding}set showPadding(_){this._showPadding!==_&&(this._showPadding=_,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(_){this._showCollisionBoxes!==_&&(this._showCollisionBoxes=_,_?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(_){this._showOverdrawInspector!==_&&(this._showOverdrawInspector=_,this._update())}get repaint(){return!!this._repaint}set repaint(_){this._repaint!==_&&(this._repaint=_,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(_){this._vertices=_,this._update()}get version(){return ou}getCameraTargetElevation(){return this.transform.elevation}},m.MapMouseEvent=Ir,m.MapTouchEvent=Xo,m.MapWheelEvent=Fh,m.Marker=xi,m.NavigationControl=class{constructor(_){this._updateZoomButtons=()=>{const i=this._map.getZoom(),a=i===this._map.getMaxZoom(),d=i===this._map.getMinZoom();this._zoomInButton.disabled=a,this._zoomOutButton.disabled=d,this._zoomInButton.setAttribute("aria-disabled",a.toString()),this._zoomOutButton.setAttribute("aria-disabled",d.toString())},this._rotateCompassArrow=()=>{const i=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=i},this._setButtonTitle=(i,a)=>{const d=this._map._getUIString(`NavigationControl.${a}`);i.title=d,i.setAttribute("aria-label",d)},this.options=c.e({},su,_),this._container=z.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",i=>i.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",i=>this._map.zoomIn({},{originalEvent:i})),z.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",i=>this._map.zoomOut({},{originalEvent:i})),z.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",i=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:i}):this._map.resetNorth({},{originalEvent:i})}),this._compassIcon=z.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(_){return this._map=_,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 Kh(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){z.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(_,i){const a=z.create("button",_,this._container);return a.type="button",a.addEventListener("click",i),a}},m.Popup=class extends c.E{constructor(_){super(),this.remove=()=>(this._content&&z.remove(this._content),this._container&&(z.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 c.k("close"))),this),this._onMouseUp=i=>{this._update(i.point)},this._onMouseMove=i=>{this._update(i.point)},this._onDrag=i=>{this._update(i.point)},this._update=i=>{var a;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=z.create("div","maplibregl-popup",this._map.getContainer()),this._tip=z.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const S of this.options.className.split(" "))this._container.classList.add(S);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?Jh(this._lngLat,this._flatPos,this._map.transform):(a=this._lngLat)===null||a===void 0?void 0:a.wrap(),this._trackPointer&&!i)return;const d=this._flatPos=this._pos=this._trackPointer&&i?i:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&i?i:this._map.transform.locationPoint(this._lngLat));let p=this.options.anchor;const v=bt(this.options.offset);if(!p){const S=this._container.offsetWidth,T=this._container.offsetHeight;let P;P=d.y+v.bottom.ythis._map.transform.height-T?["bottom"]:[],d.xthis._map.transform.width-S/2&&P.push("right"),p=P.length===0?"bottom":P.join("-")}let w=d.add(v[p]);this.options.subpixelPositioning||(w=w.round()),z.setTransform(this._container,`${au[p]} translate(${w.x}px,${w.y}px)`),wo(this._container,p,"popup")},this._onClose=()=>{this.remove()},this.options=c.e(Object.create($n),_)}addTo(_){return this._map&&this.remove(),this._map=_,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 c.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(_){return this._lngLat=c.M.convert(_),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(_){return this.setDOMContent(document.createTextNode(_))}setHTML(_){const i=document.createDocumentFragment(),a=document.createElement("body");let d;for(a.innerHTML=_;d=a.firstChild,d;)i.appendChild(d);return this.setDOMContent(i)}getMaxWidth(){var _;return(_=this._container)===null||_===void 0?void 0:_.style.maxWidth}setMaxWidth(_){return this.options.maxWidth=_,this._update(),this}setDOMContent(_){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=z.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(_),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(_){return this._container&&this._container.classList.add(_),this}removeClassName(_){return this._container&&this._container.classList.remove(_),this}setOffset(_){return this.options.offset=_,this._update(),this}toggleClassName(_){if(this._container)return this._container.classList.toggle(_)}setSubpixelPositioning(_){this.options.subpixelPositioning=_}_createCloseButton(){this.options.closeButton&&(this._closeButton=z.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 _=this._container.querySelector(Ll);_&&_.focus()}},m.RasterDEMTileSource=tt,m.RasterTileSource=He,m.ScaleControl=class{constructor(_){this._onMove=()=>{lu(this._map,this._container,this.options)},this.setUnit=i=>{this.options.unit=i,lu(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Yh),_)}getDefaultPosition(){return"bottom-left"}onAdd(_){return this._map=_,this._container=z.create("div","maplibregl-ctrl maplibregl-ctrl-scale",_.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){z.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},m.ScrollZoomHandler=eu,m.Style=el,m.TerrainControl=class{constructor(_){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=_}onAdd(_){return this._map=_,this._container=z.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=z.create("button","maplibregl-ctrl-terrain",this._container),z.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(){z.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},m.TwoFingersTouchPitchHandler=Yc,m.TwoFingersTouchRotateHandler=Jc,m.TwoFingersTouchZoomHandler=Al,m.TwoFingersTouchZoomRotateHandler=ru,m.VectorTileSource=ae,m.VideoSource=Ze,m.addSourceType=(_,i)=>c._(void 0,void 0,void 0,function*(){if(vt(_))throw new Error(`A source type called "${_}" already exists.`);((a,d)=>{St[a]=d})(_,i)}),m.clearPrewarmedResources=function(){const _=zi;_&&(_.isPreloaded()&&_.numActive()===1?(_.release(Nt),zi=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()"))},m.getMaxParallelImageRequests=function(){return c.a.MAX_PARALLEL_IMAGE_REQUESTS},m.getRTLTextPluginStatus=function(){return Ht().getRTLTextPluginStatus()},m.getVersion=function(){return Ct},m.getWorkerCount=function(){return Ei.workerCount},m.getWorkerUrl=function(){return c.a.WORKER_URL},m.importScriptInWorkers=function(_){return Or().broadcast("IS",_)},m.prewarm=function(){Li().acquire(Nt)},m.setMaxParallelImageRequests=function(_){c.a.MAX_PARALLEL_IMAGE_REQUESTS=_},m.setRTLTextPlugin=function(_,i){return Ht().setRTLTextPlugin(_,i)},m.setWorkerCount=function(_){Ei.workerCount=_},m.setWorkerUrl=function(_){c.a.WORKER_URL=_}});var g=s;return g})})(uw);var dw=uw.exports;const m5=p5(dw),Hv=["3036","3622","3623","3624","3631","3641","3653","3724","3725","3741","3823","3824","3831","3841","3926","3927","3928","3942","4027","4028","4040","4042","4128","4129","4142","4229","4230","4328","4329","4429","4440","4529","4530","4531","4540","4629","4630","4631","4728","4729","4730","4731","4739","4740","4828","4829","4830","4831","4839","4928","4929","4930","4931","4932","4933","4934","4939","5029","5030","5031","5032","5033","5034","5035","5036","5038","5039","5129","5130","5131","5132","5133","5134","5135","5136","5137","5138","5139","5229","5231","5232","5233","5234","5235","5236","5237","5238","5239","5240","5332","5333","5334","5335","5336","5337","5338","5339","5340","5432","5433","5435","5436","5437","5438","5439","5440","5531","5536","5537","5538","5539","5540","5541","5636","5637","5638","5639","5640","5641","5738","5739","5740","5741","5839","5840","5841","5939","5940","5941","5942","6039","6040","6041","6139","6140","6141","6239","6240","6241","6243","6339","6340","6341","6342","6343","6439","6440","6441","6442","6443","6444","6445","6540","6541","6542","6543","6544","6545","6546","6641","6642","6643","6644","6645","6646","6647","6740","6741","6742","6747","6748","6840","6841","6842","6847","6848"],Ce={LEVEL_80000:{LEVEL:8e4,DIGIT:4,DISTANCE:{LAT:40/60,LNG:1},SECTION:{X:{MIN:22,MAX:53},Y:{MIN:30,MAX:68},LAT:{MIN:20},LNG:{MIN:122}}},LEVEL_10000:{LEVEL:1e4,DIGIT:6,RANGE:{MIN:0,MAX:7},DISTANCE:{LAT:5/60,LNG:7/60+30/60/60}},LEVEL_5000:{LEVEL:5e3,DIGIT:7,RANGE:{MIN:1,MAX:4},DISTANCE:{LAT:150/60/60,LNG:225/60/60}},LEVEL_2000:{LEVEL:2e3,DIGIT:9,RANGE:{MIN:0,MAX:8},DISTANCE:{LAT:60/60/60,LNG:90/60/60}},LEVEL_1000:{LEVEL:1e3,DIGIT:8,RANGE:{MIN:0,MAX:9},DISTANCE:{LAT:30/60/60,LNG:45/60/60}},LEVEL_500:{LEVEL:500,DIGIT:9,RANGE:{MIN:1,MAX:4},DISTANCE:{LAT:15/60/60,LNG:22.5/60/60}},LEVEL_250:{LEVEL:250,DIGIT:10,RANGE:{MIN:1,MAX:4},DISTANCE:{LAT:7.5/60/60,LNG:11.25/60/60}},LEVEL_125:{LEVEL:125,DIGIT:11,RANGE:{MIN:1,MAX:4},DISTANCE:{LAT:3.75/60/60,LNG:5.625/60/60}}},Kl=Object.values(Ce).map(e=>e.LEVEL),g5=[Ce.LEVEL_10000.LEVEL,Ce.LEVEL_5000.LEVEL,Ce.LEVEL_2000.LEVEL];class Fu{constructor(n,s){za(this,"lat");za(this,"lng");this.lat=n,this.lng=s}}class fw{constructor(n,s,u,h){za(this,"northLat");za(this,"eastLng");za(this,"southLat");za(this,"westLng");this.northLat=n,this.eastLng=s,this.southLat=u,this.westLng=h}getCenter(){const n=(this.northLat+this.southLat)/2,s=(this.eastLng+this.westLng)/2;return new Fu(n,s)}getNorthEast(){return new Fu(this.northLat,this.eastLng)}getNorthWest(){return new Fu(this.northLat,this.westLng)}getSouthWest(){return new Fu(this.southLat,this.westLng)}getSouthEast(){return new Fu(this.southLat,this.eastLng)}contains(n){const s=n.lat,u=n.lng;return this.southLat<=s&&s<=this.northLat&&this.westLng<=u&&u<=this.eastLng}}class yn{static toCode(n,s,u=Ce.LEVEL_125.LEVEL){if(Kl.includes(u)===!1)throw new Error(`invalid level. available : ${Kl.join(", ")}`);const h=Math.floor(n*60/40),g=n*60%40,m=Math.floor(g/5),c=g%5,I=Math.floor(c*60/30),k=c*60%30,M=Math.floor(k/15),A=k%15,z=Math.floor(A/7.5),q=A%7.5,K=Math.floor(q/3.75),J=Math.floor(s-100),se=s-100-J,ke=Math.floor(se*60/7.5),ye=se*60%7.5,Z=Math.floor(ye*60/45),fe=ye*60%45,W=Math.floor(fe/22.5),ee=fe%22.5,Se=Math.floor(ee/11.25),Ee=ee%11.25,Le=Math.floor(Ee/5.625),pe=M*2+(W+1),Ie=z*2+(Se+1),Ae=K*2+(Le+1),De=`${h}${J}${m}${ke}${I}${Z}${pe}${Ie}${Ae}`;if(yn.isValidCode(De)===!1)throw new Error(`lat: ${n} and lng: ${s} are invalid location.`);const Ge=De.slice(0,Ce.LEVEL_10000.DIGIT);switch(u){case Ce.LEVEL_80000.LEVEL:return De.slice(0,Ce.LEVEL_80000.DIGIT);case Ce.LEVEL_10000.LEVEL:return Ge;case Ce.LEVEL_5000.LEVEL:return Gv(Ge,n,s,u);case Ce.LEVEL_2000.LEVEL:return Gv(Ge,n,s,u);case Ce.LEVEL_1000.LEVEL:return De.slice(0,Ce.LEVEL_1000.DIGIT);case Ce.LEVEL_500.LEVEL:return De.slice(0,Ce.LEVEL_500.DIGIT);case Ce.LEVEL_250.LEVEL:return De.slice(0,Ce.LEVEL_250.DIGIT);default:return De}}static toLatLngBounds(n){const s=Wv(n),u=s[0],h=s[2];return new fw(u[1],u[0],h[1],h[0])}static toGeoJSON(n,s={}){const u=Wv(n);return y5(u,s)}static getLevel(n){if(yn.isValidCode(n)===!1)throw new Error(`'${n}' is invalid mesh code.`);const s=n.length;return s===Ce.LEVEL_80000.DIGIT?Ce.LEVEL_80000.LEVEL:s===Ce.LEVEL_10000.DIGIT?Ce.LEVEL_10000.LEVEL:s===Ce.LEVEL_5000.DIGIT?Ce.LEVEL_5000.LEVEL:s===Ce.LEVEL_2000.DIGIT&&n[n.length-1]==="5"?Ce.LEVEL_2000.LEVEL:s===Ce.LEVEL_1000.DIGIT?Ce.LEVEL_1000.LEVEL:s===Ce.LEVEL_500.DIGIT?Ce.LEVEL_500.LEVEL:s===Ce.LEVEL_250.DIGIT?Ce.LEVEL_250.LEVEL:Ce.LEVEL_125.LEVEL}static getCodes(n=null,s=null){if(n===null&&s===null)return Hv;if(n===null)throw new Error("code is required.");if(s===null)throw new Error("level is required.");if(yn.isValidCode(n)===!1)throw new Error(`'${n}' is invalid mesh code.`);if(Kl.includes(s)===!1)throw new Error(`${s} is invalid level. available : ${Kl.join(", ")}`);const u=yn.getLevel(n);if(u<=s)throw new Error("code level is lower than the specified level.");const h=[];if(u>Ce.LEVEL_10000.LEVEL){for(let g=Ce.LEVEL_10000.RANGE.MIN;g<=Ce.LEVEL_10000.RANGE.MAX;g++)for(let m=Ce.LEVEL_10000.RANGE.MIN;m<=Ce.LEVEL_10000.RANGE.MAX;m++)h.push(`${n}${g}${m}`);if(s===Ce.LEVEL_10000.LEVEL)return h}else h.push(n.slice(0,Ce.LEVEL_10000.DIGIT));if(g5.includes(s)){if(s===Ce.LEVEL_5000.LEVEL){const g=[];return h.forEach(m=>{for(let c=Ce.LEVEL_5000.RANGE.MIN;c<=Ce.LEVEL_5000.RANGE.MAX;c++)g.push(`${m}${c}`)}),g}else if(s===Ce.LEVEL_2000.LEVEL){const g=[];return h.forEach(m=>{let c=[0,2,4,6,8],I=[0,2,4,6,8];if(u===Ce.LEVEL_5000.LEVEL){const k=Number(n[6]);k===1?(c=[0,2,4],I=[0,2,4]):k===2?(c=[0,2,4],I=[4,6,8]):k===3?(c=[4,6,8],I=[0,2,4]):k===4&&(c=[4,6,8],I=[4,6,8])}c.forEach(k=>{I.forEach(M=>{g.push(`${m}${k}${M}5`)})})}),g}}else{const g=[];if(u>Ce.LEVEL_1000.LEVEL){let k=Ce.LEVEL_1000.RANGE.MIN,M=Ce.LEVEL_1000.RANGE.MAX,A=Ce.LEVEL_1000.RANGE.MIN,z=Ce.LEVEL_1000.RANGE.MAX;if(u===Ce.LEVEL_5000.LEVEL){const q=Number(n[6]);q===1?(M=(Ce.LEVEL_1000.RANGE.MAX+1)/2,z=(Ce.LEVEL_1000.RANGE.MAX+1)/2):q===2?(M=(Ce.LEVEL_1000.RANGE.MAX+1)/2,A=(Ce.LEVEL_1000.RANGE.MAX+1)/2):q===3?(k=(Ce.LEVEL_1000.RANGE.MAX+1)/2,z=(Ce.LEVEL_1000.RANGE.MAX+1)/2):q===4&&(k=(Ce.LEVEL_1000.RANGE.MAX+1)/2,A=(Ce.LEVEL_1000.RANGE.MAX+1)/2)}else if(u===Ce.LEVEL_2000.LEVEL){const q=Number(n[7]),K=Number(n[6]);k=K,M=K+1,A=q,z=q+1}if(h.forEach(q=>{for(let K=k;K<=M;K++)for(let J=A;J<=z;J++)g.push(`${q}${K}${J}`)}),s===Ce.LEVEL_1000.LEVEL)return g}else g.push(n.slice(0,Ce.LEVEL_1000.DIGIT));const m=[];if(u>Ce.LEVEL_500.LEVEL){if(g.forEach(k=>{for(let M=Ce.LEVEL_500.RANGE.MIN;M<=Ce.LEVEL_500.RANGE.MAX;M++)m.push(`${k}${M}`)}),s===Ce.LEVEL_500.LEVEL)return m}else m.push(n.slice(0,Ce.LEVEL_500.DIGIT));const c=[];if(u>Ce.LEVEL_250.LEVEL){if(m.forEach(k=>{for(let M=Ce.LEVEL_250.RANGE.MIN;M<=Ce.LEVEL_250.RANGE.MAX;M++)c.push(`${k}${M}`)}),s===Ce.LEVEL_250.LEVEL)return c}else c.push(n.slice(0,Ce.LEVEL_250.DIGIT));const I=[];if(u>Ce.LEVEL_125.LEVEL&&(c.forEach(k=>{for(let M=Ce.LEVEL_125.RANGE.MIN;M<=Ce.LEVEL_125.RANGE.MAX;M++)I.push(`${k}${M}`)}),s===Ce.LEVEL_125.LEVEL))return I}}static getCodesWithinBounds(n,s=Ce.LEVEL_80000.LEVEL){if(Kl.includes(s)===!1)throw new Error(`${s} is invalid level. available : ${Kl.join(", ")}`);const u=n.getNorthEast(),h=n.getSouthWest(),g=u.lat-h.lat,m=u.lng-h.lng,c=_5(s),I=c.LAT,k=c.LNG,M=Math.ceil(g/I)+1,A=Math.ceil(m/k)+1,z=[],q=1e-8;for(let K=0;K<=M;K++)for(let J=0;J<=A;J++){const se=Math.min(Math.max(h.lat+I*K-I/2,h.lat+q),u.lat-q),ke=Math.min(Math.max(h.lng+k*J-k/2,h.lng+q),u.lng-q);try{const ye=yn.toCode(se,ke,s);z.includes(ye)||z.push(ye)}catch{}}return z}static isValidCode(n){if(n.length!==Ce.LEVEL_80000.DIGIT&&n.length!==Ce.LEVEL_10000.DIGIT&&n.length!==Ce.LEVEL_5000.DIGIT&&n.length!==Ce.LEVEL_2000.DIGIT&&n.length!==Ce.LEVEL_1000.DIGIT&&n.length!==Ce.LEVEL_500.DIGIT&&n.length!==Ce.LEVEL_250.DIGIT&&n.length!==Ce.LEVEL_125.DIGIT||!Hv.includes(n.slice(0,Ce.LEVEL_80000.DIGIT)))return!1;if(n.length>=Ce.LEVEL_10000.DIGIT){const s=Number(n[4]),u=Number(n[5]);if(sCe.LEVEL_10000.RANGE.MAX||uCe.LEVEL_10000.RANGE.MAX)return!1}if(pw(n)){if(n.length===Ce.LEVEL_5000.DIGIT){const s=Number(n[6]);if(sCe.LEVEL_5000.RANGE.MAX)return!1}else if(n.length===Ce.LEVEL_2000.DIGIT){const s=Number(n[6]),u=Number(n[7]),h=[0,2,4,6,8];if(!h.includes(s)||!h.includes(u))return!1}}else{if(n.length>=Ce.LEVEL_1000.DIGIT){const s=Number(n[6]),u=Number(n[7]);if(sCe.LEVEL_1000.RANGE.MAX||uCe.LEVEL_1000.RANGE.MAX)return!1}if(n.length>=Ce.LEVEL_500.DIGIT){const s=Number(n[8]);if(sCe.LEVEL_500.RANGE.MAX)return!1}if(n.length>=Ce.LEVEL_250.DIGIT){const s=Number(n[9]);if(sCe.LEVEL_250.RANGE.MAX)return!1}if(n.length>=Ce.LEVEL_125.DIGIT){const s=Number(n[10]);if(sCe.LEVEL_125.RANGE.MAX)return!1}}return!0}}function Gv(e,n,s,u){let h=e;const m=yn.toLatLngBounds(e).getSouthWest();if(u===Ce.LEVEL_5000.LEVEL){const c=Math.floor((n-m.lat)/Ce.LEVEL_5000.DISTANCE.LAT),I=Math.floor((s-m.lng)/Ce.LEVEL_5000.DISTANCE.LNG);I===0&&c===0?h+="1":I===1&&c===0?h+="2":I===0&&c===1?h+="3":h+="4"}else if(u===Ce.LEVEL_2000.LEVEL){const c=Math.floor((n-m.lat)/Ce.LEVEL_2000.DISTANCE.LAT)*2,I=Math.floor((s-m.lng)/Ce.LEVEL_2000.DISTANCE.LNG)*2;h+=`${c}${I}5`}return h}function Wv(e){if(yn.isValidCode(e)===!1)throw new Error(`'${e}' is invalid mesh code.`);const n=Number(e.slice(2,4)),s=Number(e.slice(0,2));let u=0,h=0,g=0,m=0;if(e.length>=Ce.LEVEL_80000.DIGIT&&(u=Ce.LEVEL_80000.SECTION.LNG.MIN+(n-Ce.LEVEL_80000.SECTION.X.MIN)*Ce.LEVEL_80000.DISTANCE.LNG,h=u+Ce.LEVEL_80000.DISTANCE.LNG,g=Ce.LEVEL_80000.SECTION.LAT.MIN+(s-Ce.LEVEL_80000.SECTION.Y.MIN)*Ce.LEVEL_80000.DISTANCE.LAT,m=g+Ce.LEVEL_80000.DISTANCE.LAT),e.length>=Ce.LEVEL_10000.DIGIT){const A=Number(e[5]),z=Number(e[4]);u+=A*Ce.LEVEL_10000.DISTANCE.LNG,h=u+Ce.LEVEL_10000.DISTANCE.LNG,g+=z*Ce.LEVEL_10000.DISTANCE.LAT,m=g+Ce.LEVEL_10000.DISTANCE.LAT}if(pw(e)){if(e.length===Ce.LEVEL_5000.DIGIT){const A=Number(e[6]),z=A===1||A===3?0:1,q=A===1||A===2?0:1;u+=z*Ce.LEVEL_5000.DISTANCE.LNG,h=u+Ce.LEVEL_5000.DISTANCE.LNG,g+=q*Ce.LEVEL_5000.DISTANCE.LAT,m=g+Ce.LEVEL_5000.DISTANCE.LAT}else if(e.length===Ce.LEVEL_2000.DIGIT){const A=Number(e[7]),z=Number(e[6]);u+=A/2*Ce.LEVEL_2000.DISTANCE.LNG,h=u+Ce.LEVEL_2000.DISTANCE.LNG,g+=z/2*Ce.LEVEL_2000.DISTANCE.LAT,m=g+Ce.LEVEL_2000.DISTANCE.LAT}}else{if(e.length>=Ce.LEVEL_1000.DIGIT){const A=Number(e[7]),z=Number(e[6]);u+=A*Ce.LEVEL_1000.DISTANCE.LNG,h=u+Ce.LEVEL_1000.DISTANCE.LNG,g+=z*Ce.LEVEL_1000.DISTANCE.LAT,m=g+Ce.LEVEL_1000.DISTANCE.LAT}if(e.length>=Ce.LEVEL_500.DIGIT){const A=Number(e[8]),z=A===1||A===3?0:1,q=A===1||A===2?0:1;u+=z*Ce.LEVEL_500.DISTANCE.LNG,h=u+Ce.LEVEL_500.DISTANCE.LNG,g+=q*Ce.LEVEL_500.DISTANCE.LAT,m=g+Ce.LEVEL_500.DISTANCE.LAT}if(e.length>=Ce.LEVEL_250.DIGIT){const A=Number(e[9]),z=A===1||A===3?0:1,q=A===1||A===2?0:1;u+=z*Ce.LEVEL_250.DISTANCE.LNG,h=u+Ce.LEVEL_250.DISTANCE.LNG,g+=q*Ce.LEVEL_250.DISTANCE.LAT,m=g+Ce.LEVEL_250.DISTANCE.LAT}if(e.length>=Ce.LEVEL_125.DIGIT){const A=Number(e[10]),z=A===1||A===3?0:1,q=A===1||A===2?0:1;u+=z*Ce.LEVEL_125.DISTANCE.LNG,h=u+Ce.LEVEL_125.DISTANCE.LNG,g+=q*Ce.LEVEL_125.DISTANCE.LAT,m=g+Ce.LEVEL_125.DISTANCE.LAT}}return[[h,m],[u,m],[u,g],[h,g]]}function y5(e,n={}){return e.push(e[0]),{type:"Feature",properties:n,geometry:{type:"Polygon",coordinates:[e]}}}function pw(e){return e.length===Ce.LEVEL_10000.DIGIT||e.length===Ce.LEVEL_5000.DIGIT||e.length===Ce.LEVEL_2000.DIGIT&&e[e.length-1]==="5"}function _5(e){switch(e){case Ce.LEVEL_10000.LEVEL:return Ce.LEVEL_10000.DISTANCE;case Ce.LEVEL_5000.LEVEL:return Ce.LEVEL_5000.DISTANCE;case Ce.LEVEL_2000.LEVEL:return Ce.LEVEL_2000.DISTANCE;case Ce.LEVEL_1000.LEVEL:return Ce.LEVEL_1000.DISTANCE;case Ce.LEVEL_500.LEVEL:return Ce.LEVEL_500.DISTANCE;case Ce.LEVEL_250.LEVEL:return Ce.LEVEL_250.DISTANCE;case Ce.LEVEL_125.LEVEL:return Ce.LEVEL_125.DISTANCE;default:return Ce.LEVEL_80000.DISTANCE}}const Gn={toCode:yn.toCode,toLatLngBounds:yn.toLatLngBounds,toGeoJSON:yn.toGeoJSON,getLevel:yn.getLevel,getCodes:yn.getCodes,getCodesWithinBounds:yn.getCodesWithinBounds,isValidCode:yn.isValidCode};var sc=Math.pow,sn=(e,n,s)=>new Promise((u,h)=>{var g=I=>{try{c(s.next(I))}catch(k){h(k)}},m=I=>{try{c(s.throw(I))}catch(k){h(k)}},c=I=>I.done?u(I.value):Promise.resolve(I.value).then(g,m);c((s=s.apply(e,n)).next())}),Rn=Uint8Array,Ju=Uint16Array,v5=Int32Array,mw=new Rn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),gw=new Rn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),x5=new Rn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yw=function(e,n){for(var s=new Ju(31),u=0;u<31;++u)s[u]=n+=1<>1|(yi&21845)<<1,as=(as&52428)>>2|(as&13107)<<2,as=(as&61680)>>4|(as&3855)<<4,xw[yi]=((as&65280)>>8|(as&255)<<8)>>1;var as,yi,Yu=function(e,n,s){for(var u=e.length,h=0,g=new Ju(n);h>I]=k}return c},mh=new Rn(288);for(yi=0;yi<144;++yi)mh[yi]=8;var yi;for(yi=144;yi<256;++yi)mh[yi]=9;var yi;for(yi=256;yi<280;++yi)mh[yi]=7;var yi;for(yi=280;yi<288;++yi)mh[yi]=8;var yi,bw=new Rn(32);for(yi=0;yi<32;++yi)bw[yi]=5;var yi,S5=Yu(mh,9),I5=Yu(bw,5),xm=function(e){for(var n=e[0],s=1;sn&&(n=e[s]);return n},uo=function(e,n,s){var u=n/8|0;return(e[u]|e[u+1]<<8)>>(n&7)&s},bm=function(e,n){var s=n/8|0;return(e[s]|e[s+1]<<8|e[s+2]<<16)>>(n&7)},T5=function(e){return(e+7)/8|0},C5=function(e,n,s){(s==null||s>e.length)&&(s=e.length);var u=new Rn(s-n);return u.set(e.subarray(n,s)),u},A5=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Dn=function(e,n,s){var u=new Error(n||A5[e]);if(u.code=e,Error.captureStackTrace&&Error.captureStackTrace(u,Dn),!s)throw u;return u},yy=function(e,n,s,u){var h=e.length,g=0;if(!h||n.f&&!n.l)return s||new Rn(0);var m=!s||n.i!=2,c=n.i;s||(s=new Rn(h*3));var I=function(cr){var Br=s.length;if(cr>Br){var rr=new Rn(Math.max(Br*2,cr));rr.set(s),s=rr}},k=n.f||0,M=n.p||0,A=n.b||0,z=n.l,q=n.d,K=n.m,J=n.n,se=h*8;do{if(!z){k=uo(e,M,1);var ke=uo(e,M+1,3);if(M+=3,ke)if(ke==1)z=S5,q=I5,K=9,J=5;else if(ke==2){var W=uo(e,M,31)+257,ee=uo(e,M+10,15)+4,Se=W+uo(e,M+5,31)+1;M+=14;for(var Ee=new Rn(Se),Le=new Rn(19),pe=0;pe>4;if(ye<16)Ee[pe++]=ye;else{var rt=0,Xe=0;for(ye==16?(Xe=3+uo(e,M,3),M+=2,rt=Ee[pe-1]):ye==17?(Xe=3+uo(e,M,7),M+=3):ye==18&&(Xe=11+uo(e,M,127),M+=7);Xe--;)Ee[pe++]=rt}}var dt=Ee.subarray(0,W),nt=Ee.subarray(W);K=xm(dt),J=xm(nt),z=Yu(dt,K),q=Yu(nt,J)}else Dn(1);else{var ye=T5(M)+4,Z=e[ye-4]|e[ye-3]<<8,fe=ye+Z;if(fe>h){c&&Dn(0);break}m&&I(A+Z),s.set(e.subarray(ye,fe),A),n.b=A+=Z,n.p=M=fe*8,n.f=k;continue}if(M>se){c&&Dn(0);break}}m&&I(A+131072);for(var ei=(1<>4;if(M+=rt&15,M>se){c&&Dn(0);break}if(rt||Dn(2),Nt<256)s[A++]=Nt;else if(Nt==256){Vt=M,z=null;break}else{var Ei=Nt-254;if(Nt>264){var pe=Nt-257,Xi=mw[pe];Ei=uo(e,M,(1<>4;zi||Dn(3),M+=zi&15;var nt=E5[hi];if(hi>3){var Xi=gw[hi];nt+=bm(e,M)&(1<se){c&&Dn(0);break}m&&I(A+131072);var Li=A+Ei;if(A>3&1)+(n>>4&1);u>0;u-=!e[s++]);return s+(n&2)},L5=function(e){var n=e.length;return(e[n-4]|e[n-3]<<8|e[n-2]<<16|e[n-1]<<24)>>>0},P5=function(e,n){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&Dn(6,"invalid zlib data"),(e[1]>>5&1)==+!n&&Dn(6,"invalid zlib data: "+(e[1]&32?"need":"unexpected")+" dictionary"),(e[1]>>3&4)+2};function z5(e,n){return yy(e,{i:2},n,n)}function D5(e,n){var s=k5(e);return s+8>e.length&&Dn(6,"invalid gzip data"),yy(e.subarray(s,-8),{i:2},new Rn(L5(e)),n)}function R5(e,n){return yy(e.subarray(P5(e,n),-4),{i:2},n,n)}function fg(e,n){return e[0]==31&&e[1]==139&&e[2]==8?D5(e,n):(e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31?z5(e,n):R5(e,n)}var O5=typeof TextDecoder<"u"&&new TextDecoder,B5=0;try{O5.decode(M5,{stream:!0}),B5=1}catch{}var ww=(e,n)=>e*sc(2,n),Vu=(e,n)=>Math.floor(e/sc(2,n)),bf=(e,n)=>ww(e.getUint16(n+1,!0),8)+e.getUint8(n),Ew=(e,n)=>ww(e.getUint32(n+2,!0),16)+e.getUint16(n,!0),F5=(e,n,s,u,h)=>{if(e!==u.getUint8(h))return e-u.getUint8(h);const g=bf(u,h+1);if(n!==g)return n-g;const m=bf(u,h+4);return s!==m?s-m:0},V5=(e,n,s,u)=>{const h=Sw(e,n|128,s,u);return h?{z:n,x:s,y:u,offset:h[0],length:h[1],isDir:!0}:null},Zv=(e,n,s,u)=>{const h=Sw(e,n,s,u);return h?{z:n,x:s,y:u,offset:h[0],length:h[1],isDir:!1}:null},Sw=(e,n,s,u)=>{let h=0,g=e.byteLength/17-1;for(;h<=g;){const m=g+h>>1,c=F5(n,s,u,e,m*17);if(c>0)h=m+1;else if(c<0)g=m-1;else return[Ew(e,m*17+7),e.getUint32(m*17+13,!0)]}return null},N5=(e,n)=>e.isDir&&!n.isDir?1:!e.isDir&&n.isDir?-1:e.z!==n.z?e.z-n.z:e.x!==n.x?e.x-n.x:e.y-n.y,Iw=(e,n)=>{const s=e.getUint8(n*17);return{z:s&127,x:bf(e,n*17+1),y:bf(e,n*17+4),offset:Ew(e,n*17+7),length:e.getUint32(n*17+13,!0),isDir:s>>7===1}},Xv=e=>{const n=[],s=new DataView(e);for(let u=0;u{e.sort(N5);const n=new ArrayBuffer(17*e.length),s=new Uint8Array(n);for(let u=0;u>8&255,s[u*17+3]=h.x>>16&255,s[u*17+4]=h.y&255,s[u*17+5]=h.y>>8&255,s[u*17+6]=h.y>>16&255,s[u*17+7]=h.offset&255,s[u*17+8]=Vu(h.offset,8)&255,s[u*17+9]=Vu(h.offset,16)&255,s[u*17+10]=Vu(h.offset,24)&255,s[u*17+11]=Vu(h.offset,32)&255,s[u*17+12]=Vu(h.offset,48)&255,s[u*17+13]=h.length&255,s[u*17+14]=h.length>>8&255,s[u*17+15]=h.length>>16&255,s[u*17+16]=h.length>>24&255}return n},$5=(e,n)=>{if(e.byteLength<17)return null;const s=e.byteLength/17,u=Iw(e,s-1);if(u.isDir){const h=u.z,g=n.z-h,m=Math.trunc(n.x/(1<(n,s)=>{if(s instanceof AbortController)return e(n,s);const u=new AbortController;return e(n,u).then(h=>s(void 0,h.data,h.cacheControl||"",h.expires||""),h=>s(h)).catch(h=>s(h)),{cancel:()=>u.abort()}},G5=class{constructor(){this.tilev4=(e,n)=>sn(this,null,function*(){if(e.type==="json"){const A=e.url.substr(10);let z=this.tiles.get(A);z||(z=new Kv(A),this.tiles.set(A,z));const q=yield z.getHeader();return{data:{tiles:[`${e.url}/{z}/{x}/{y}`],minzoom:q.minZoom,maxzoom:q.maxZoom,bounds:[q.minLon,q.minLat,q.maxLon,q.maxLat]}}}const s=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),u=e.url.match(s);if(!u)throw new Error("Invalid PMTiles protocol URL");const h=u[1];let g=this.tiles.get(h);g||(g=new Kv(h),this.tiles.set(h,g));const m=u[2],c=u[3],I=u[4],k=yield g.getHeader(),M=yield g==null?void 0:g.getZxy(+m,+c,+I,n.signal);return M?{data:new Uint8Array(M.data),cacheControl:M.cacheControl,expires:M.expires}:k.tileType===1?{data:new Uint8Array}:{data:null}}),this.tile=H5(this.tilev4),this.tiles=new Map}add(e){this.tiles.set(e.source.getKey(),e)}get(e){return this.tiles.get(e)}};function Jl(e,n){return(n>>>0)*4294967296+(e>>>0)}function W5(e,n){const s=n.buf;let u=s[n.pos++],h=(u&112)>>4;if(u<128||(u=s[n.pos++],h|=(u&127)<<3,u<128)||(u=s[n.pos++],h|=(u&127)<<10,u<128)||(u=s[n.pos++],h|=(u&127)<<17,u<128)||(u=s[n.pos++],h|=(u&127)<<24,u<128)||(u=s[n.pos++],h|=(u&1)<<31,u<128))return Jl(e,h);throw new Error("Expected varint not more than 10 bytes")}function Nu(e){const n=e.buf;let s=n[e.pos++],u=s&127;return s<128||(s=n[e.pos++],u|=(s&127)<<7,s<128)||(s=n[e.pos++],u|=(s&127)<<14,s<128)||(s=n[e.pos++],u|=(s&127)<<21,s<128)?u:(s=n[e.pos],u|=(s&15)<<28,W5(u,e))}function Z5(e,n,s,u){if(u===0){s===1&&(n[0]=e-1-n[0],n[1]=e-1-n[1]);const h=n[0];n[0]=n[1],n[1]=h}}var X5=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function K5(e,n,s){if(e>26)throw Error("Tile zoom level exceeds max safe number limit (26)");if(n>sc(2,e)-1||s>sc(2,e)-1)throw Error("tile x/y outside zoom level bounds");const u=X5[e],h=sc(2,e);let g=0,m=0,c=0;const I=[n,s];let k=h/2;for(;k>0;)g=(I[0]&k)>0?1:0,m=(I[1]&k)>0?1:0,c+=k*k*(3*g^m),Z5(k,I,g,m),k=k/2;return u+c}function Cw(e,n){return sn(this,null,function*(){if(n===1||n===0)return e;if(n===2){if(typeof globalThis.DecompressionStream>"u")return fg(new Uint8Array(e));const s=new Response(e).body;if(!s)throw Error("Failed to read response stream");const u=s.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(u).arrayBuffer()}throw Error("Compression method not supported")})}var J5=127;function Y5(e,n){let s=0,u=e.length-1;for(;s<=u;){const h=u+s>>1,g=n-e[h].tileId;if(g>0)s=h+1;else if(g<0)u=h-1;else return e[h]}return u>=0&&(e[u].runLength===0||n-e[u].tileId=300)throw Error(`Bad response code: ${I.status}`);const M=I.headers.get("Content-Length");if(I.status===200&&(!M||+M>n))throw h&&h.abort(),Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield I.arrayBuffer(),etag:k||void 0,cacheControl:I.headers.get("Cache-Control")||void 0,expires:I.headers.get("Expires")||void 0}})}};function ho(e,n){const s=e.getUint32(n+4,!0),u=e.getUint32(n+0,!0);return s*sc(2,32)+u}function eD(e,n){const s=new DataView(e),u=s.getUint8(7);if(u>3)throw Error(`Archive is spec version ${u} but this library supports up to spec version 3`);return{specVersion:u,rootDirectoryOffset:ho(s,8),rootDirectoryLength:ho(s,16),jsonMetadataOffset:ho(s,24),jsonMetadataLength:ho(s,32),leafDirectoryOffset:ho(s,40),leafDirectoryLength:ho(s,48),tileDataOffset:ho(s,56),tileDataLength:ho(s,64),numAddressedTiles:ho(s,72),numTileEntries:ho(s,80),numTileContents:ho(s,88),clustered:s.getUint8(96)===1,internalCompression:s.getUint8(97),tileCompression:s.getUint8(98),tileType:s.getUint8(99),minZoom:s.getUint8(100),maxZoom:s.getUint8(101),minLon:s.getInt32(102,!0)/1e7,minLat:s.getInt32(106,!0)/1e7,maxLon:s.getInt32(110,!0)/1e7,maxLat:s.getInt32(114,!0)/1e7,centerZoom:s.getUint8(118),centerLon:s.getInt32(119,!0)/1e7,centerLat:s.getInt32(123,!0)/1e7,etag:n}}function Aw(e){const n={buf:new Uint8Array(e),pos:0},s=Nu(n),u=[];let h=0;for(let g=0;g0?u[g].offset=u[g-1].offset+u[g-1].length:u[g].offset=m-1}return u}function tD(e){const n=new DataView(e);return n.getUint16(2,!0)===2?(console.warn("PMTiles spec version 2 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),2):n.getUint16(2,!0)===1?(console.warn("PMTiles spec version 1 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),1):3}var pg=class extends Error{};function iD(e,n){return sn(this,null,function*(){const s=yield e.getBytes(0,16384);if(new DataView(s.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");if(tD(s.data)<3)return[yield Tw.getHeader(e)];const h=s.data.slice(0,J5),g=eD(h,s.etag),m=s.data.slice(g.rootDirectoryOffset,g.rootDirectoryOffset+g.rootDirectoryLength),c=`${e.getKey()}|${g.etag||""}|${g.rootDirectoryOffset}|${g.rootDirectoryLength}`,I=Aw(yield n(m,g.internalCompression));return[g,[c,I.length,I]]})}function rD(e,n,s,u,h){return sn(this,null,function*(){const g=yield e.getBytes(s,u,void 0,h.etag),m=yield n(g.data,h.internalCompression),c=Aw(m);if(c.length===0)throw new Error("Empty directory is invalid");return c})}var nD=class{constructor(e=100,n=!0,s=Cw){this.cache=new Map,this.invalidations=new Map,this.maxCacheEntries=e,this.counter=1,this.decompress=s}getHeader(e){return sn(this,null,function*(){const n=e.getKey(),s=this.cache.get(n);if(s)return s.lastUsed=this.counter++,yield s.data;const u=new Promise((h,g)=>{iD(e,this.decompress).then(m=>{m[1]&&this.cache.set(m[1][0],{lastUsed:this.counter++,data:Promise.resolve(m[1][2])}),h(m[0]),this.prune()}).catch(m=>{g(m)})});return this.cache.set(n,{lastUsed:this.counter++,data:u}),u})}getDirectory(e,n,s,u){return sn(this,null,function*(){const h=`${e.getKey()}|${u.etag||""}|${n}|${s}`,g=this.cache.get(h);if(g)return g.lastUsed=this.counter++,yield g.data;const m=new Promise((c,I)=>{rD(e,this.decompress,n,s,u).then(k=>{c(k),this.prune()}).catch(k=>{I(k)})});return this.cache.set(h,{lastUsed:this.counter++,data:m}),m})}getArrayBuffer(e,n,s,u){return sn(this,null,function*(){const h=`${e.getKey()}|${u.etag||""}|${n}|${s}`,g=this.cache.get(h);if(g)return g.lastUsed=this.counter++,yield g.data;const m=new Promise((c,I)=>{e.getBytes(n,s,void 0,u.etag).then(k=>{c(k.data),this.cache.has(h),this.prune()}).catch(k=>{I(k)})});return this.cache.set(h,{lastUsed:this.counter++,data:m}),m})}prune(){if(this.cache.size>=this.maxCacheEntries){let e=1/0,n;this.cache.forEach((s,u)=>{s.lastUsed{this.getHeader(e).then(g=>{u(),this.invalidations.delete(n)}).catch(g=>{h(g)})});this.invalidations.set(n,s)})}},Kv=class{constructor(e,n,s){typeof e=="string"?this.source=new Q5(e):this.source=e,s?this.decompress=s:this.decompress=Cw,n?this.cache=n:this.cache=new nD}getHeader(){return sn(this,null,function*(){return yield this.cache.getHeader(this.source)})}getZxyAttempt(e,n,s,u){return sn(this,null,function*(){const h=K5(e,n,s),g=yield this.cache.getHeader(this.source);if(g.specVersion<3)return Tw.getZxy(g,this.source,this.cache,e,n,s,u);if(eg.maxZoom)return;let m=g.rootDirectoryOffset,c=g.rootDirectoryLength;for(let I=0;I<=3;I++){const k=yield this.cache.getDirectory(this.source,m,c,g),M=Y5(k,h);if(M){if(M.runLength>0){const A=yield this.source.getBytes(g.tileDataOffset+M.offset,M.length,u,g.etag);return{data:yield this.decompress(A.data,g.tileCompression),cacheControl:A.cacheControl,expires:A.expires}}m=g.leafDirectoryOffset+M.offset,c=M.length}else return}throw Error("Maximum directory depth exceeded")})}getZxy(e,n,s,u){return sn(this,null,function*(){try{return yield this.getZxyAttempt(e,n,s,u)}catch(h){if(h instanceof pg)return this.cache.invalidate(this.source),yield this.getZxyAttempt(e,n,s,u);throw h}})}getMetadataAttempt(){return sn(this,null,function*(){const e=yield this.cache.getHeader(this.source),n=yield this.source.getBytes(e.jsonMetadataOffset,e.jsonMetadataLength,void 0,e.etag),s=yield this.decompress(n.data,e.internalCompression),u=new TextDecoder("utf-8");return JSON.parse(u.decode(s))})}getMetadata(){return sn(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(e){if(e instanceof pg)return this.cache.invalidate(this.source),yield this.getMetadataAttempt();throw e}})}};const Jv={LIGHT:"https://tiles.geodig.jp/styles/white.json",DARK:"https://tiles.geodig.jp/styles/black.json"},wm=[{id:8e4,minZoom:4,maxZoom:8,level:"80km",name:"80倍地域メッシュ(第1次地域区画)"},{id:1e4,minZoom:8,maxZoom:11,level:"10km",name:"10倍地域メッシュ(第2次地域区画)"},{id:5e3,minZoom:11,maxZoom:12,level:"5km",name:"5倍地域メッシュ"},{id:2e3,minZoom:12,maxZoom:13,level:"2km",name:"2倍地域メッシュ"},{id:1e3,minZoom:13,maxZoom:14,level:"1km",name:"基準地域メッシュ(第3次地域区画)"},{id:500,minZoom:14,maxZoom:15,level:"500m",name:"2分の1地域メッシュ"},{id:250,minZoom:15,maxZoom:16,level:"250m",name:"4分の1地域メッシュ"},{id:125,minZoom:16,maxZoom:18,level:"125m",name:"8分の1地域メッシュ"}],oD=e=>(Lx("data-v-1281fd16"),e=e(),Px(),e),sD={class:"relative"},aD={class:"absolute top-2 left-2 z-10 flex items-center"},lD={class:"absolute top-2 right-2 z-10 flex items-center"},cD={class:"truncate"},uD={class:"truncate"},hD=oD(()=>lr("div",{id:"map"},null,-1)),dD=Ui({__name:"MeshMap",setup(e){const n=Ng(),s=Fo(),u=C1(),h=Lt(n.query.code||""),g=Lt(wm[0]);let m=null;const c=Lt(!1),I=Lt(!1),k=je(()=>u.preference==="light"?Jv.LIGHT:Jv.DARK),M=je(()=>Gn.isValidCode(h.value)),A=je(()=>I.value?"i-heroicons-clipboard-document-check":"i-heroicons-clipboard-document"),z=je(()=>I.value?"コピーしました":"GeoJSON をコピー");er(u,()=>{if(!m)return;m.setStyle(k.value);const W=ye(m.getZoom());setTimeout(()=>K(m,W),1e3)}),er(h,W=>{if(m)if(W){if(!Gn.isValidCode(W))return;J(m),q(W),s.push({query:{code:W}})}else{const ee=ye(m.getZoom());K(m,ee),s.push({query:{}})}}),er(g,W=>{if(!m)return;const ee=m.getZoom();(ee<=W.minZoom||ee>W.maxZoom)&&m.setZoom(W.maxZoom)}),an(()=>{let W=[138.517821,34.380147],ee=4,Se=8e4;if(h.value){const pe=Gn.toLatLngBounds(h.value).getCenter();W=[pe.lng,pe.lat],ee=Z(h.value),Se=Gn.getLevel(h.value)}m=new dw.Map({container:"map",style:k.value,center:W,zoom:ee,minZoom:4,maxZoom:18});const Ee=new G5;m5.addProtocol("pmtiles",Ee.tile),m.on("load",()=>{m&&(c.value=!0,K(m,Se),m.on("click","polygon-mesh-fill",Le=>{const pe=Le.features;h.value=pe[0].properties.code}))}),m.on("moveend",()=>{if(!m)return;const Le=ye(m.getZoom());K(m,Le)})});function q(W){if(!m)return;const Se=Gn.toLatLngBounds(W).getCenter(),Ee=Z(W);m.getZoom()===Ee?m.panTo([Se.lng,Se.lat]):m.flyTo({center:[Se.lng,Se.lat],zoom:Ee})}function K(W,ee){const Se=wm.find(Ee=>Ee.id===ee);Se&&(g.value=Se),J(W),se(W,ee)}async function J(W){const ee=W.getSource("polygon-selected-mesh");if(!(ee&&(await ee.getData()).properties.code===h.value)&&(W.getLayer("polygon-selected-mesh")&&W.removeLayer("polygon-selected-mesh"),W.getSource("polygon-selected-mesh")&&W.removeSource("polygon-selected-mesh"),h.value)){W.addSource("polygon-selected-mesh",{type:"geojson",data:Gn.toGeoJSON(h.value,{code:h.value})});const Se=W.getLayer("polygon-mesh-line")?"polygon-mesh-line":void 0;W.addLayer({id:"polygon-selected-mesh",type:"fill",source:"polygon-selected-mesh",paint:{"fill-color":"#f87171","fill-opacity":.5}},Se)}}async function se(W,ee){const Se=ke(W,ee);if(!Se)return;const Ee=W.getSource("polygon-mesh");if(Ee){const Ae=(await Ee.getData()).features.map(De=>De.properties.code);if(Se.sort().toString()===Ae.sort().toString())return}const Le={type:"FeatureCollection",features:Se.map(Ie=>Gn.toGeoJSON(Ie,{code:Ie}))},pe={type:"FeatureCollection",features:Se.map(Ie=>{const De=Gn.toLatLngBounds(Ie).getCenter();return{type:"Feature",geometry:{type:"Point",coordinates:[De.lng,De.lat]},properties:{code:Ie}}})};W.getLayer("polygon-mesh-line")&&W.removeLayer("polygon-mesh-line"),W.getLayer("polygon-mesh-fill")&&W.removeLayer("polygon-mesh-fill"),W.getLayer("polygon-mesh-symbol")&&W.removeLayer("polygon-mesh-symbol"),W.getSource("polygon-mesh")&&W.removeSource("polygon-mesh"),W.getSource("center-mesh")&&W.removeSource("center-mesh"),W.addSource("polygon-mesh",{type:"geojson",data:Le}),W.addSource("center-mesh",{type:"geojson",data:pe}),W.addLayer({id:"polygon-mesh-line",type:"line",source:"polygon-mesh",paint:{"line-color":"#f87171","line-width":1}}),W.addLayer({id:"polygon-mesh-fill",type:"fill",source:"polygon-mesh",paint:{"fill-opacity":0}}),W.addLayer({id:"polygon-mesh-symbol",type:"symbol",source:"center-mesh",layout:{"text-field":["get","code"],"text-font":["Open Sans Semibold","Arial Unicode MS Bold"],"text-size":["interpolate",["linear"],["zoom"],4,8,9,14],"text-anchor":"center","text-justify":"center","text-allow-overlap":!0},paint:{"text-halo-color":"#fff","text-halo-width":1}})}function ke(W,ee){if(ee){const Se=W.getBounds().getNorthEast(),Ee=W.getBounds().getSouthWest(),Le=new fw(Se.lat,Se.lng,Ee.lat,Ee.lng);return Gn.getCodesWithinBounds(Le,ee)}return Gn.getCodes()}function ye(W){let ee;return W<=9?ee=8e4:W>9&&W<=11?ee=1e4:W>11&&W<=12?ee=5e3:W>12&&W<=13?ee=2e3:W>13&&W<=14?ee=1e3:W>14&&W<=15?ee=500:W>15&&W<=16?ee=250:W>16?ee=125:ee=8e4,ee}function Z(W){switch(Gn.getLevel(W)){case 8e4:return 9;case 1e4:return 11;case 5e3:return 12;case 2e3:return 13;case 1e3:return 14;case 500:return 15;case 250:return 16;case 125:return 17;default:return 4}}async function fe(){const W=Gn.toGeoJSON(h.value,{code:h.value});await navigator.clipboard.writeText(JSON.stringify(W,null,2)),I.value=!0,setTimeout(()=>I.value=!1,3e3)}return(W,ee)=>{const Se=T1,Ee=KL,Le=s1,pe=d5;return At(),wi("div",sD,[ii(c)?(At(),wi(mr,{key:0},[lr("div",aD,[ri(Ee,{modelValue:ii(h),"onUpdate:modelValue":ee[1]||(ee[1]=Ie=>yr(h)?h.value=Ie:null),name:"selectedCode",placeholder:"メッシュコード",icon:"i-heroicons-magnifying-glass-20-solid",autocomplete:"off",size:"md",ui:{icon:{trailing:{pointer:""}}}},{trailing:Rr(()=>[RS(ri(Se,{color:"gray",variant:"link",icon:"i-heroicons-x-mark-20-solid",padded:!1,onClick:ee[0]||(ee[0]=Ie=>h.value="")},null,512),[[PI,ii(h)!==""]])]),_:1},8,["modelValue"]),ii(M)?(At(),ki(Se,{key:0,icon:ii(A),color:"white",variant:"solid",size:"md",class:"ml-2",onClick:fe},{default:Rr(()=>[hs(nn(ii(z)),1)]),_:1},8,["icon"])):xr("",!0)]),lr("div",lD,[ri(pe,{modelValue:ii(g),"onUpdate:modelValue":ee[2]||(ee[2]=Ie=>yr(g)?g.value=Ie:null),options:ii(wm),class:"w-80"},{label:Rr(()=>[ri(Le,{variant:"outline",class:"w-12 justify-center"},{default:Rr(()=>[hs(nn(ii(g).level),1)]),_:1}),lr("span",cD,nn(ii(g).name),1)]),option:Rr(({option:Ie})=>[ri(Le,{variant:"outline",class:"w-12 justify-center"},{default:Rr(()=>[hs(nn(Ie.level),1)]),_:2},1024),lr("span",uD,nn(Ie.name),1)]),_:1},8,["modelValue","options"])])],64)):xr("",!0),hD])}}}),fD=yo(dD,[["__scopeId","data-v-1281fd16"]]),pD={};function mD(e,n){const s=GL,u=fD;return At(),wi("div",null,[ri(s),lr("main",null,[ri(u)])])}const gD=yo(pD,[["render",mD]]),yD={__name:"nuxt-error-page",props:{error:Object},setup(e){const s=e.error;s.stack&&s.stack.split(` `).splice(1).map(A=>({text:A.replace("webpack:/","").replace(".vue",".js").trim(),internal:A.includes("node_modules")&&!A.includes(".cache")||A.includes("internal")||A.includes("new Promise")})).map(A=>`${A.text}`).join(` -`);const u=Number(s.statusCode||500),h=u===404,g=s.statusMessage??(h?"Page Not Found":"Internal Server Error"),m=s.message||s.toString(),c=void 0,M=h?rf(()=>yf(()=>import("./Djj1s0de.js"),__vite__mapDeps([2,3]),import.meta.url).then(A=>A.default||A)):rf(()=>yf(()=>import("./Di1SuN-O.js"),__vite__mapDeps([4,5]),import.meta.url).then(A=>A.default||A));return(A,z)=>(At(),ki(ii(M),Em(af({statusCode:ii(u),statusMessage:ii(g),description:ii(m),stack:ii(c)})),null,16))}},_D={key:0},Yv={__name:"nuxt-root",setup(e){const n=()=>null,s=Wi(),u=s.deferHydration();if(s.isHydrating){const I=s.hooks.hookOnce("app:error",u);Fo().beforeEach(I)}const h=!1;ta(Fb,Ng()),s.hooks.callHookWith(I=>I.map(k=>k()),"vue:setup");const g=jg(),m=!1;Bx((I,k,M)=>{if(s.hooks.callHook("vue:error",I,k,M).catch(A=>console.error("[nuxt] Error in `vue:error` hook",A)),SC(I)&&(I.fatal||I.unhandled))return s.runWithContext(()=>wC(I)),!1});const c=!1;return(I,k)=>(At(),ki(ES,{onResolve:ii(u)},{default:Rr(()=>[ii(m)?(At(),Mi("div",_D)):ii(g)?(At(),ki(ii(yD),{key:1,error:ii(g)},null,8,["error"])):ii(c)?(At(),ki(ii(n),{key:2,context:ii(c)},null,8,["context"])):ii(h)?(At(),ki(cs(ii(h)),{key:3})):(At(),ki(ii(gD),{key:4}))]),_:1},8,["onResolve"]))}};let Qv;{let e;Qv=async function(){var m,c;if(e)return e;const u=!!((m=window.__NUXT__)!=null&&m.serverRendered||((c=document.getElementById("__NUXT_DATA__"))==null?void 0:c.dataset.ssr)==="true")?KI(Yv):XI(Yv),h=nC({vueApp:u});async function g(I){await h.callHook("app:error",I),h.payload.error=h.payload.error||$g(I)}u.config.errorHandler=g;try{await aC(h,uk)}catch(I){g(I)}try{await h.hooks.callHook("app:created",u),await h.hooks.callHook("app:beforeMount",u),u.mount(iC),await h.hooks.callHook("app:mounted",u),await $r()}catch(I){g(I)}return u.config.errorHandler===g&&(u.config.errorHandler=void 0),u},e=Qv().catch(n=>{throw console.error("Error while mounting app:",n),n})}export{yo as _,lr as a,ri as b,Mi as c,hs as d,n1 as e,Px as f,Ui as g,xD as h,Of as i,je as j,Ha as n,At as o,Lx as p,LL as r,nn as t,fA as u,Rr as w}; +`);const u=Number(s.statusCode||500),h=u===404,g=s.statusMessage??(h?"Page Not Found":"Internal Server Error"),m=s.message||s.toString(),c=void 0,M=h?rf(()=>yf(()=>import("./CO7BEIdq.js"),__vite__mapDeps([2,3]),import.meta.url).then(A=>A.default||A)):rf(()=>yf(()=>import("./BAXeh9PG.js"),__vite__mapDeps([4,5]),import.meta.url).then(A=>A.default||A));return(A,z)=>(At(),ki(ii(M),Em(af({statusCode:ii(u),statusMessage:ii(g),description:ii(m),stack:ii(c)})),null,16))}},_D={key:0},Yv={__name:"nuxt-root",setup(e){const n=()=>null,s=Zi(),u=s.deferHydration();if(s.isHydrating){const I=s.hooks.hookOnce("app:error",u);Fo().beforeEach(I)}const h=!1;ta(Fb,Ng()),s.hooks.callHookWith(I=>I.map(k=>k()),"vue:setup");const g=jg(),m=!1;Bx((I,k,M)=>{if(s.hooks.callHook("vue:error",I,k,M).catch(A=>console.error("[nuxt] Error in `vue:error` hook",A)),SC(I)&&(I.fatal||I.unhandled))return s.runWithContext(()=>wC(I)),!1});const c=!1;return(I,k)=>(At(),ki(ES,{onResolve:ii(u)},{default:Rr(()=>[ii(m)?(At(),wi("div",_D)):ii(g)?(At(),ki(ii(yD),{key:1,error:ii(g)},null,8,["error"])):ii(c)?(At(),ki(ii(n),{key:2,context:ii(c)},null,8,["context"])):ii(h)?(At(),ki(cs(ii(h)),{key:3})):(At(),ki(ii(gD),{key:4}))]),_:1},8,["onResolve"]))}};let Qv;{let e;Qv=async function(){var m,c;if(e)return e;const u=!!((m=window.__NUXT__)!=null&&m.serverRendered||((c=document.getElementById("__NUXT_DATA__"))==null?void 0:c.dataset.ssr)==="true")?KI(Yv):XI(Yv),h=nC({vueApp:u});async function g(I){await h.callHook("app:error",I),h.payload.error=h.payload.error||$g(I)}u.config.errorHandler=g;try{await aC(h,uk)}catch(I){g(I)}try{await h.hooks.callHook("app:created",u),await h.hooks.callHook("app:beforeMount",u),u.mount(iC),await h.hooks.callHook("app:mounted",u),await $r()}catch(I){g(I)}return u.config.errorHandler===g&&(u.config.errorHandler=void 0),u},e=Qv().catch(n=>{throw console.error("Error while mounting app:",n),n})}export{yo as _,lr as a,ri as b,wi as c,hs as d,n1 as e,Px as f,Ui as g,xD as h,Of as i,je as j,Ha as n,At as o,Lx as p,LL as r,nn as t,fA as u,Rr as w}; diff --git a/docs/assets/d-UY-aAO.js b/docs/assets/DNUVdy4O.js similarity index 93% rename from docs/assets/d-UY-aAO.js rename to docs/assets/DNUVdy4O.js index 10f2d0c..0b29dd8 100644 --- a/docs/assets/d-UY-aAO.js +++ b/docs/assets/DNUVdy4O.js @@ -1 +1 @@ -import{g as f,h as m,i as I,j as r,r as d,o as x,c as v,n as _,_ as S}from"./1LWmkWKD.js";const g=f({__name:"IconCSS",props:{name:{type:String,required:!0},size:{type:String,default:""}},setup(u){m(e=>({efdb04fa:p.value}));const t=I(),s=u,l=r(()=>{var e,n;return(n=(e=t.nuxtIcon)==null?void 0:e.aliases)!=null&&n[s.name]?t.nuxtIcon.aliases[s.name]:s.name}),c=r(()=>d(l.value)),p=r(()=>{var o,a;const e=(a=(o=t.nuxtIcon)==null?void 0:o.iconifyApiOptions)==null?void 0:a.url;if(e)try{new URL(e)}catch{console.warn("Nuxt IconCSS: Invalid custom Iconify API URL");return}return`url('${e||"https://api.iconify.design"}/${c.value.prefix}/${c.value.name}.svg')`}),i=r(()=>{var n,o,a;if(!s.size&&typeof((n=t.nuxtIcon)==null?void 0:n.size)=="boolean"&&!((o=t.nuxtIcon)!=null&&o.size))return;const e=s.size||((a=t.nuxtIcon)==null?void 0:a.size)||"1em";return String(Number(e))===e?`${e}px`:e});return(e,n)=>(x(),v("span",{style:_({width:i.value,height:i.value})},null,4))}}),h=S(g,[["__scopeId","data-v-41e8d397"]]);export{h as default}; +import{g as f,h as m,i as I,j as r,r as d,o as x,c as v,n as _,_ as S}from"./DGAPDmwC.js";const g=f({__name:"IconCSS",props:{name:{type:String,required:!0},size:{type:String,default:""}},setup(u){m(e=>({efdb04fa:p.value}));const t=I(),s=u,l=r(()=>{var e,n;return(n=(e=t.nuxtIcon)==null?void 0:e.aliases)!=null&&n[s.name]?t.nuxtIcon.aliases[s.name]:s.name}),c=r(()=>d(l.value)),p=r(()=>{var o,a;const e=(a=(o=t.nuxtIcon)==null?void 0:o.iconifyApiOptions)==null?void 0:a.url;if(e)try{new URL(e)}catch{console.warn("Nuxt IconCSS: Invalid custom Iconify API URL");return}return`url('${e||"https://api.iconify.design"}/${c.value.prefix}/${c.value.name}.svg')`}),i=r(()=>{var n,o,a;if(!s.size&&typeof((n=t.nuxtIcon)==null?void 0:n.size)=="boolean"&&!((o=t.nuxtIcon)!=null&&o.size))return;const e=s.size||((a=t.nuxtIcon)==null?void 0:a.size)||"1em";return String(Number(e))===e?`${e}px`:e});return(e,n)=>(x(),v("span",{style:_({width:i.value,height:i.value})},null,4))}}),h=S(g,[["__scopeId","data-v-41e8d397"]]);export{h as default}; diff --git a/docs/assets/builds/latest.json b/docs/assets/builds/latest.json index da30817..9401676 100644 --- a/docs/assets/builds/latest.json +++ b/docs/assets/builds/latest.json @@ -1 +1 @@ -{"id":"7c1674ba-d3ab-42f8-a69a-13907389b823","timestamp":1722084073691} \ No newline at end of file +{"id":"c3c07807-23c8-44e3-8c81-d82fca11e41f","timestamp":1722084846061} \ No newline at end of file diff --git a/docs/assets/builds/meta/7c1674ba-d3ab-42f8-a69a-13907389b823.json b/docs/assets/builds/meta/7c1674ba-d3ab-42f8-a69a-13907389b823.json deleted file mode 100644 index 3f83729..0000000 --- a/docs/assets/builds/meta/7c1674ba-d3ab-42f8-a69a-13907389b823.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"7c1674ba-d3ab-42f8-a69a-13907389b823","timestamp":1722084073691,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":["/"]} \ No newline at end of file diff --git a/docs/assets/builds/meta/c3c07807-23c8-44e3-8c81-d82fca11e41f.json b/docs/assets/builds/meta/c3c07807-23c8-44e3-8c81-d82fca11e41f.json new file mode 100644 index 0000000..8c86367 --- /dev/null +++ b/docs/assets/builds/meta/c3c07807-23c8-44e3-8c81-d82fca11e41f.json @@ -0,0 +1 @@ +{"id":"c3c07807-23c8-44e3-8c81-d82fca11e41f","timestamp":1722084846061,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":["/"]} \ No newline at end of file diff --git a/docs/assets/entry.vUUp6RlE.css b/docs/assets/entry.l94Ot5Oz.css similarity index 99% rename from docs/assets/entry.vUUp6RlE.css rename to docs/assets/entry.l94Ot5Oz.css index 6d800b1..a47c667 100644 --- a/docs/assets/entry.vUUp6RlE.css +++ b/docs/assets/entry.l94Ot5Oz.css @@ -1 +1 @@ -.icon[data-v-e8d572f6]{display:inline-block;vertical-align:middle}header[data-v-82e603f3]{height:var(--header-height)}.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:#0000000d}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:#ffffff80;margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:#ffffff80;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:#0000000d}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:#000000bf;text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:#ffffffbf;border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:#0000000d}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px #00000059;box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:#0006;color:#fff;display:flex;font-size:1.4em;top:0;right:0;bottom:0;left:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}#map[data-v-cc2458a8]{height:calc(100vh - var(--header-height));width:100%}:root{--header-height:60px} +.icon[data-v-e8d572f6]{display:inline-block;vertical-align:middle}header[data-v-82e603f3]{height:var(--header-height)}.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:#0000000d}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:#ffffff80;margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:#ffffff80;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:#0000000d}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:#000000bf;text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:#ffffffbf;border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:#0000000d}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px #00000059;box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:#0006;color:#fff;display:flex;font-size:1.4em;top:0;right:0;bottom:0;left:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}#map[data-v-1281fd16]{height:calc(100vh - var(--header-height));width:100%}:root{--header-height:60px} diff --git a/docs/index.html b/docs/index.html index 35b0b88..f44f140 100644 --- a/docs/index.html +++ b/docs/index.html @@ -36,13 +36,13 @@ - + - - - - - -
- \ No newline at end of file + + + + + +
+ \ No newline at end of file diff --git a/packages/docs/components/MeshMap.vue b/packages/docs/components/MeshMap.vue index 7dbae19..2a8d75a 100644 --- a/packages/docs/components/MeshMap.vue +++ b/packages/docs/components/MeshMap.vue @@ -1,52 +1,51 @@ @@ -65,9 +64,9 @@ const colorMode = useColorMode() const selectedCode = ref(route.query.code as string || '') const selectedLevel = ref(MESH_LEVELS[0]) -const fixedLevel = ref(false) let map: Map | null = null +const loaded = ref(false) const copied = ref(false) const mapStyleUrl = computed(() => colorMode.preference === 'light' ? MAP_STYLE.LIGHT : MAP_STYLE.DARK) @@ -102,24 +101,12 @@ watch(selectedCode, (code) => { watch(selectedLevel, (mesh) => { if (!map) return - fixedLevel.value = false const zoom = map.getZoom() if (zoom <= mesh.minZoom || zoom > mesh.maxZoom) { map.setZoom(mesh.maxZoom) } }) -watch(fixedLevel, (value) => { - if (!map) return - if (value) { - map.setMinZoom(selectedLevel.value.minZoom) - map.setMaxZoom(selectedLevel.value.maxZoom) - } else { - map.setMinZoom(4) - map.setMaxZoom(18) - } -}) - onMounted(() => { let defaultCenter: maplibregl.LngLatLike = [138.517821, 34.380147] let defaultZoom = 4 @@ -145,6 +132,7 @@ onMounted(() => { map.on('load', () => { if (!map) return + loaded.value = true drawMesh(map, defaultLevel) map.on('click', `polygon-mesh-fill`, (e) => { const features = e.features as maplibregl.MapGeoJSONFeature[];