@abi-software/flatmapvuer 1.1.4-beta.0 → 1.1.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/flatmapvuer.js +22 -10
- package/dist/flatmapvuer.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/services/flatmapQueries.js +44 -14
package/dist/flatmapvuer.js
CHANGED
|
@@ -12391,6 +12391,19 @@ let xit = function() {
|
|
|
12391
12391
|
}), n.flat();
|
|
12392
12392
|
}, this.stripPMIDPrefix = function(e) {
|
|
12393
12393
|
return e.split(":")[1];
|
|
12394
|
+
}, this.extractTermFromURLString = function(e) {
|
|
12395
|
+
if (!e)
|
|
12396
|
+
return;
|
|
12397
|
+
const t = decodeURIComponent(e);
|
|
12398
|
+
let r = "";
|
|
12399
|
+
return [
|
|
12400
|
+
"doi.org/",
|
|
12401
|
+
"nih.gov/pubmed/",
|
|
12402
|
+
"pubmed.ncbi.nlm.nih.gov/"
|
|
12403
|
+
].forEach((i) => {
|
|
12404
|
+
const o = t.lastIndexOf(i);
|
|
12405
|
+
o !== -1 && (r = t.slice(o + i.length));
|
|
12406
|
+
}), r.endsWith("/") && (r = r.slice(0, -1)), r;
|
|
12394
12407
|
}, this.buildPubmedSqlStatement = function(e) {
|
|
12395
12408
|
let t = "select distinct publication from publications where entity in (";
|
|
12396
12409
|
if (e.length === 1)
|
|
@@ -12419,11 +12432,7 @@ let xit = function() {
|
|
|
12419
12432
|
return;
|
|
12420
12433
|
const i = this.buildPubmedSqlStatement(r);
|
|
12421
12434
|
this.flatmapQuery(i).then((o) => {
|
|
12422
|
-
o.values.length > 0 ? (this.urls =
|
|
12423
|
-
this.pubmedSearchUrl(
|
|
12424
|
-
o.values.map((a) => this.stripPMIDPrefix(a[0]))
|
|
12425
|
-
)
|
|
12426
|
-
], t(!0)) : this.pubmedQueryOnModels(n).then((a) => {
|
|
12435
|
+
o.values.length > 0 ? (this.urls = this.getURLsForPubMed(o), t(!0)) : this.pubmedQueryOnModels(n).then((a) => {
|
|
12427
12436
|
t(a);
|
|
12428
12437
|
});
|
|
12429
12438
|
});
|
|
@@ -12431,11 +12440,14 @@ let xit = function() {
|
|
|
12431
12440
|
}, this.pubmedQueryOnModels = function(e) {
|
|
12432
12441
|
return this.flatmapQuery(
|
|
12433
12442
|
this.buildPubmedSqlStatementForModels(e)
|
|
12434
|
-
).then((t) => Array.isArray(t.values) && t.values.length > 0 ? (this.urls = [
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
-
|
|
12443
|
+
).then((t) => Array.isArray(t.values) && t.values.length > 0 ? (this.urls = this.getURLsForPubMed(t), !0) : (this.urls = [], !1));
|
|
12444
|
+
}, this.getURLsForPubMed = function(e) {
|
|
12445
|
+
const t = e.values.map((n) => this.extractTermFromURLString(n[0])), r = this.transformPubMedSearchTerms(t);
|
|
12446
|
+
return [
|
|
12447
|
+
this.pubmedSearchUrl(r)
|
|
12448
|
+
];
|
|
12449
|
+
}, this.transformPubMedSearchTerms = function(e) {
|
|
12450
|
+
return e.join(" OR ");
|
|
12439
12451
|
}, this.pubmedSearchUrl = function(e) {
|
|
12440
12452
|
let t = "https://pubmed.ncbi.nlm.nih.gov/?", r = new URLSearchParams();
|
|
12441
12453
|
return r.append("term", e), t + r.toString();
|
package/dist/flatmapvuer.umd.cjs
CHANGED
|
@@ -30,7 +30,7 @@ usage: app.provide(ID_INJECTION_KEY, {
|
|
|
30
30
|
<circle cx="12.5" cy="12.5" r="9" fill="#fff"></circle>
|
|
31
31
|
<text x="12" y="17.5" style="font-size:14px;fill:#000;text-anchor:middle">2</text>
|
|
32
32
|
</svg>
|
|
33
|
-
</div>`,Zm=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},f7={},BH=async function(e,t){return f7&&f7.hasOwnProperty(t)?f7[t]:new Promise(r=>{fetch(`${e}knowledge/label/${t}`,{method:"GET"}).then(n=>n.json()).then(n=>{let i=n.label;i==="Mammalia"&&(i="Mammalia not otherwise specified"),f7[t]=i,r(i)}).catch(n=>{console.error("Error:",n),f7[t]=t,r(t)})})},DH=function(e,t){if(!e||!t)return!1;let r=JSON.stringify(e),n=JSON.stringify(t);return r.indexOf(n)!==-1};let irt=function(){this.initialise=function(e){this.flatmapApi=e,this.destinations=[],this.origins=[],this.components=[],this.urls=[],this.controller=void 0,this.uberons=[],this.lookUp=[]},this.createTooltipData=async function(e){let t=[];e.feature.hyperlinks&&e.feature.hyperlinks.length>0?t=e.feature.hyperlinks:t=this.urls.map(i=>({url:i,id:"pubmed"}));let r;if(e.provenanceTaxonomy){r=[];for(let i=0;e.provenanceTaxonomy.length>i;i++)r.push(await BH(this.flatmapAPI,e.provenanceTaxonomy[i]))}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,title:e.label,featureId:e.resource,hyperlinks:t,provenanceTaxonomy:e.provenanceTaxonomy,provenanceTaxonomyLabel:r}},this.createComponentsLabelList=function(e,t){let r=[];return e.forEach(n=>{r.push(this.createLabelFromNeuralNode(n[0]),t),n.length===2&&r.push(this.createLabelFromNeuralNode(n[1]),t)}),r},this.createLabelLookup=function(e){return new Promise(t=>{let r={};this.uberons=[];const n={sql:this.buildLabelSqlStatement(e)};fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(i=>i.json()).then(i=>{const o=i.keys.indexOf("entity"),a=i.keys.indexOf("label");o>-1&&a>-1&&i.values.forEach(s=>{r[s[o]]=s[a],this.uberons.push({id:s[o],name:s[a]})}),t(r)})})},this.buildConnectivitySqlStatement=function(e){let t="select knowledge from knowledge where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildLabelSqlStatement=function(e){let t="select entity, label from labels where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.findAllIdsFromConnectivity=function(e){let t=e.connectivity.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),[...new Set(n.flat())]},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=Zm(t),n=[],i=!1;return r.forEach(o=>{i=!1,DH(e.axons,o)&&(i=!0),DH(e.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.retrieveFlatmapKnowledgeForEvent=async function(e){this.controller&&this.controller.abort(),this.controller=new AbortController;const t=this.controller.signal,r=e.resource;if(this.destinations=[],this.origins=[],this.components=[],!r||r.length==0)return;let n=this.queryForConnectivity(r,t),i=await this.pubmedQueryOnIds(e);return await Promise.all([n,i])},this.queryForConnectivity=function(e,t,r=!0){const n={sql:this.buildConnectivitySqlStatement(e)},i={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),...t?{signal:t}:{}};return new Promise(o=>{fetch(`${this.flatmapApi}knowledge/query/`,i).then(a=>a.json()).then(a=>{if(this.connectivityExists(a)){let s=JSON.parse(a.values[0][0]);r?this.processConnectivity(s).then(h=>{o(h)}):o(s)}else o(!1)}).catch(a=>{console.error("Error:",a),o(!1)})})},this.connectivityExists=function(e){return!!(e.values&&e.values.length>0&&JSON.parse(e.values[0][0]).connectivity&&JSON.parse(e.values[0][0]).connectivity.length>0)},this.findIfNodeIsSingle=function(e){return e.length===1?(console.error("Server returns a single node",e),e[0]):e.length===2&&e[1].length===0?e[0]:!1},this.createLabelFromNeuralNode=function(e,t){let r=this.findIfNodeIsSingle(e);if(r)return t[r];let n=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(i=>{t[i]==null?n+=`, ${i}`:n+=`, ${t[i]}`}),n},this.flattenAndFindDatasets=function(e,t,r){let n=this.flattenConntectivity(e),i=this.flattenConntectivity(t),o=this.flattenConntectivity(r);this.destinationsWithDatasets=this.uberons.filter(a=>i.indexOf(a.id)!==-1),this.originsWithDatasets=this.uberons.filter(a=>o.indexOf(a.id)!==-1),this.componentsWithDatasets=this.uberons.filter(a=>n.indexOf(a.id)!==-1)},this.processConnectivity=function(e){return new Promise(t=>{let r=this.findComponents(e),n=Zm(e.axons),i=Zm(e.dendrites),o=this.findAllIdsFromConnectivity(e);this.createLabelLookup(o).then(a=>{this.destinations=n.map(s=>this.createLabelFromNeuralNode(s,a)),this.origins=i.map(s=>this.createLabelFromNeuralNode(s,a)),this.components=r.map(s=>this.createLabelFromNeuralNode(s,a)),this.flattenAndFindDatasets(r,n,i),t({ids:{axons:n,dendrites:i,components:r},labels:{destinations:this.destinations,origins:this.origins,components:this.components}})})})},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.stripPMIDPrefix=function(e){return e.split(":")[1]},this.buildPubmedSqlStatement=function(e){let t="select distinct publication from publications where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.flatmapQuery=function(e){const t={sql:e};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(r=>r.json()).catch(r=>{console.error("Error:",r)})},this.pubmedQueryOnIds=function(e){return new Promise(t=>{const r=e.resource,n=e.feature.source;if(!r||r.length===0)return;const i=this.buildPubmedSqlStatement(r);this.flatmapQuery(i).then(o=>{o.values.length>0?(this.urls=[this.pubmedSearchUrl(o.values.map(a=>this.stripPMIDPrefix(a[0])))],t(!0)):this.pubmedQueryOnModels(n).then(a=>{t(a)})})})},this.pubmedQueryOnModels=function(e){return this.flatmapQuery(this.buildPubmedSqlStatementForModels(e)).then(t=>Array.isArray(t.values)&&t.values.length>0?(this.urls=[this.pubmedSearchUrl(t.values.map(r=>this.stripPMIDPrefix(r[0])))],!0):(this.urls=[],!1))},this.pubmedSearchUrl=function(e){let t="https://pubmed.ncbi.nlm.nih.gov/?",r=new URLSearchParams;return r.append("term",e),t+r.toString()}};const ort='<svg width="195px" height="24px" viewBox="0 0 200 24" fill="yellow"><path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/><text x="47" y="52%" style="white-space: pre" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#333333">Featured dataset marker</text></svg>';var FH={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(typeof window<"u"?window:LK,function(){if(typeof window>"u")return null;var r=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),n=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(f){return r.setTimeout(f,20)},i=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||function(f){r.clearTimeout(f)};function o(f,Q){var m=Object.prototype.toString.call(f),_=m==="[object Array]"||m==="[object NodeList]"||m==="[object HTMLCollection]"||m==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,v=0,b=f.length;if(_)for(;v<b;v++)Q(f[v]);else Q(f)}function a(f){if(!f.getBoundingClientRect)return{width:f.offsetWidth,height:f.offsetHeight};var Q=f.getBoundingClientRect();return{width:Math.round(Q.width),height:Math.round(Q.height)}}function s(f,Q){Object.keys(Q).forEach(function(m){f.style[m]=Q[m]})}var h=function(f,Q){var m=0;function _(){var b=[];this.add=function(O){b.push(O)};var M,E;this.call=function(O){for(M=0,E=b.length;M<E;M++)b[M].call(this,O)},this.remove=function(O){var V=[];for(M=0,E=b.length;M<E;M++)b[M]!==O&&V.push(b[M]);b=V},this.length=function(){return b.length}}function v(b,M){if(b){if(b.resizedAttached){b.resizedAttached.add(M);return}b.resizedAttached=new _,b.resizedAttached.add(M),b.resizeSensor=document.createElement("div"),b.resizeSensor.dir="ltr",b.resizeSensor.className="resize-sensor";var E={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},O={position:"absolute",left:"0px",top:"0px",transition:"0s"};s(b.resizeSensor,E);var V=document.createElement("div");V.className="resize-sensor-expand",s(V,E);var N=document.createElement("div");s(N,O),V.appendChild(N);var j=document.createElement("div");j.className="resize-sensor-shrink",s(j,E);var $=document.createElement("div");s($,O),s($,{width:"200%",height:"200%"}),j.appendChild($),b.resizeSensor.appendChild(V),b.resizeSensor.appendChild(j),b.appendChild(b.resizeSensor);var G=window.getComputedStyle(b),J=G?G.getPropertyValue("position"):null;J!=="absolute"&&J!=="relative"&&J!=="fixed"&&J!=="sticky"&&(b.style.position="relative");var tt=!1,at=0,rt=a(b),Qt=0,Ct=0,Ut=!0;m=0;var ee=function(){var Xt=b.offsetWidth,le=b.offsetHeight;N.style.width=Xt+10+"px",N.style.height=le+10+"px",V.scrollLeft=Xt+10,V.scrollTop=le+10,j.scrollLeft=Xt+10,j.scrollTop=le+10},he=function(){if(Ut){var Xt=b.offsetWidth===0&&b.offsetHeight===0;if(Xt){m||(m=n(function(){m=0,he()}));return}else Ut=!1}ee()};b.resizeSensor.resetSensor=he;var Gt=function(){at=0,tt&&(Qt=rt.width,Ct=rt.height,b.resizedAttached&&b.resizedAttached.call(rt))},fe=function(){rt=a(b),tt=rt.width!==Qt||rt.height!==Ct,tt&&!at&&(at=n(Gt)),he()},hr=function(Xt,le,me){Xt.attachEvent?Xt.attachEvent("on"+le,me):Xt.addEventListener(le,me)};hr(V,"scroll",fe),hr(j,"scroll",fe),m=n(function(){m=0,he()})}}o(f,function(b){v(b,Q)}),this.detach=function(b){m||(i(m),m=0),h.detach(f,b)},this.reset=function(){f.resizeSensor.resetSensor()}};if(h.reset=function(f){o(f,function(Q){Q.resizeSensor.resetSensor()})},h.detach=function(f,Q){o(f,function(m){m&&(m.resizedAttached&&typeof Q=="function"&&(m.resizedAttached.remove(Q),m.resizedAttached.length())||m.resizeSensor&&(m.contains(m.resizeSensor)&&m.removeChild(m.resizeSensor),delete m.resizeSensor,delete m.resizedAttached))})},typeof MutationObserver<"u"){var d=new MutationObserver(function(f){for(var Q in f)if(f.hasOwnProperty(Q))for(var m=f[Q].addedNodes,_=0;_<m.length;_++)m[_].resizeSensor&&h.reset(m[_])});document.addEventListener("DOMContentLoaded",function(f){d.observe(document.body,{childList:!0,subtree:!0})})}return h})})(FH);var art=FH.exports;const srt=xK(art);var lrt=Object.defineProperty,crt=(e,t,r)=>t in e?lrt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wm=(e,t,r)=>(crt(e,typeof t!="symbol"?t+"":t,r),r),qm=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},At=(e,t,r)=>(qm(e,t,"read from private field"),r?r.call(e):t.get(e)),Ue=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Qr=(e,t,r,n)=>(qm(e,t,"write to private field"),t.set(e,r),r),lr=(e,t,r)=>(qm(e,t,"access private method"),r);function urt(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var I=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function z3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function hrt(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var ro=function(e){try{return!!e()}catch{return!0}},drt=ro,Xm=!drt(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),jH=Xm,zH=Function.prototype,Km=zH.call,prt=jH&&zH.bind.bind(Km,Km),w1=jH?prt:function(e){return function(){return Km.apply(e,arguments)}},GH=w1,Trt=GH({}.toString),frt=GH("".slice),Q7=function(e){return frt(Trt(e),8,-1)},Qrt=w1,mrt=ro,grt=Q7,Ym=Object,yrt=Qrt("".split),_rt=mrt(function(){return!Ym("z").propertyIsEnumerable(0)})?function(e){return grt(e)==="String"?yrt(e,""):Ym(e)}:Ym,m7=function(e){return e==null},vrt=m7,brt=TypeError,j9=function(e){if(vrt(e))throw new brt("Can't call method on "+e);return e},Lrt=_rt,xrt=j9,G0=function(e){return Lrt(xrt(e))},g7=function(e){return e&&e.Math===Math&&e},Bo=g7(typeof globalThis=="object"&&globalThis)||g7(typeof window=="object"&&window)||g7(typeof self=="object"&&self)||g7(typeof I=="object"&&I)||g7(typeof I=="object"&&I)||function(){return this}()||Function("return this")(),UH={exports:{}},$H=Bo,wrt=Object.defineProperty,Jm=function(e,t){try{wrt($H,e,{value:t,configurable:!0,writable:!0})}catch{$H[e]=t}return t},Ert=Bo,Mrt=Jm,ZH="__core-js_shared__",WH=UH.exports=Ert[ZH]||Mrt(ZH,{});(WH.versions||(WH.versions=[])).push({version:"3.37.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"});var tg=UH.exports,qH=tg,XH=function(e,t){return qH[e]||(qH[e]=t||{})},Hrt=j9,Srt=Object,KH=function(e){return Srt(Hrt(e))},Crt=w1,Art=KH,Ort=Crt({}.hasOwnProperty),xa=Object.hasOwn||function(e,t){return Ort(Art(e),t)},krt=w1,Vrt=0,Prt=Math.random(),Irt=krt(1 .toString),eg=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Irt(++Vrt+Prt,36)},Rrt=typeof navigator<"u"&&String(navigator.userAgent)||"",YH=Bo,rg=Rrt,JH=YH.process,tS=YH.Deno,eS=JH&&JH.versions||tS&&tS.version,rS=eS&&eS.v8,U2,z9;rS&&(U2=rS.split("."),z9=U2[0]>0&&U2[0]<4?1:+(U2[0]+U2[1])),!z9&&rg&&(U2=rg.match(/Edge\/(\d+)/),(!U2||U2[1]>=74)&&(U2=rg.match(/Chrome\/(\d+)/),U2&&(z9=+U2[1])));var Nrt=z9,nS=Nrt,Brt=ro,Drt=Bo,Frt=Drt.String,iS=!!Object.getOwnPropertySymbols&&!Brt(function(){var e=Symbol("symbol detection");return!Frt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&nS&&nS<41}),jrt=iS,oS=jrt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",zrt=Bo,Grt=XH,aS=xa,Urt=eg,$rt=iS,Zrt=oS,U0=zrt.Symbol,ng=Grt("wks"),Wrt=Zrt?U0.for||U0:U0&&U0.withoutSetter||Urt,d2=function(e){return aS(ng,e)||(ng[e]=$rt&&aS(U0,e)?U0[e]:Wrt("Symbol."+e)),ng[e]},ig=typeof document=="object"&&document.all,D1=typeof ig>"u"&&ig!==void 0?function(e){return typeof e=="function"||e===ig}:function(e){return typeof e=="function"},qrt=D1,p2=function(e){return typeof e=="object"?e!==null:qrt(e)},Xrt=p2,Krt=String,Yrt=TypeError,G3=function(e){if(Xrt(e))return e;throw new Yrt(Krt(e)+" is not an object")},sS={},Jrt=ro,$2=!Jrt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),tnt=$2,ent=ro,lS=tnt&&ent(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),wa={},rnt=Bo,cS=p2,og=rnt.document,nnt=cS(og)&&cS(og.createElement),ag=function(e){return nnt?og.createElement(e):{}},int=$2,ont=ro,ant=ag,uS=!int&&!ont(function(){return Object.defineProperty(ant("div"),"a",{get:function(){return 7}}).a!==7}),snt=Xm,G9=Function.prototype.call,Vs=snt?G9.bind(G9):function(){return G9.apply(G9,arguments)},sg=Bo,lnt=D1,cnt=function(e){return lnt(e)?e:void 0},y7=function(e,t){return arguments.length<2?cnt(sg[e]):sg[e]&&sg[e][t]},unt=w1,lg=unt({}.isPrototypeOf),hnt=y7,dnt=D1,pnt=lg,Tnt=oS,fnt=Object,hS=Tnt?function(e){return typeof e=="symbol"}:function(e){var t=hnt("Symbol");return dnt(t)&&pnt(t.prototype,fnt(e))},Qnt=String,cg=function(e){try{return Qnt(e)}catch{return"Object"}},mnt=D1,gnt=cg,ynt=TypeError,_7=function(e){if(mnt(e))return e;throw new ynt(gnt(e)+" is not a function")},_nt=_7,vnt=m7,ug=function(e,t){var r=e[t];return vnt(r)?void 0:_nt(r)},hg=Vs,dg=D1,pg=p2,bnt=TypeError,Lnt=function(e,t){var r,n;if(t==="string"&&dg(r=e.toString)&&!pg(n=hg(r,e))||dg(r=e.valueOf)&&!pg(n=hg(r,e))||t!=="string"&&dg(r=e.toString)&&!pg(n=hg(r,e)))return n;throw new bnt("Can't convert object to primitive value")},xnt=Vs,dS=p2,pS=hS,wnt=ug,Ent=Lnt,Mnt=d2,Hnt=TypeError,Snt=Mnt("toPrimitive"),Cnt=function(e,t){if(!dS(e)||pS(e))return e;var r=wnt(e,Snt),n;if(r){if(t===void 0&&(t="default"),n=xnt(r,e,t),!dS(n)||pS(n))return n;throw new Hnt("Can't convert object to primitive value")}return t===void 0&&(t="number"),Ent(e,t)},Ant=Cnt,Ont=hS,TS=function(e){var t=Ant(e,"string");return Ont(t)?t:t+""},knt=$2,Vnt=uS,Pnt=lS,U9=G3,fS=TS,Int=TypeError,Tg=Object.defineProperty,Rnt=Object.getOwnPropertyDescriptor,fg="enumerable",Qg="configurable",mg="writable";wa.f=knt?Pnt?function(e,t,r){if(U9(e),t=fS(t),U9(r),typeof e=="function"&&t==="prototype"&&"value"in r&&mg in r&&!r[mg]){var n=Rnt(e,t);n&&n[mg]&&(e[t]=r.value,r={configurable:Qg in r?r[Qg]:n[Qg],enumerable:fg in r?r[fg]:n[fg],writable:!1})}return Tg(e,t,r)}:Tg:function(e,t,r){if(U9(e),t=fS(t),U9(r),Vnt)try{return Tg(e,t,r)}catch{}if("get"in r||"set"in r)throw new Int("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Nnt=Math.ceil,Bnt=Math.floor,Dnt=Math.trunc||function(e){var t=+e;return(t>0?Bnt:Nnt)(t)},Fnt=Dnt,$9=function(e){var t=+e;return t!==t||t===0?0:Fnt(t)},jnt=$9,znt=Math.max,Gnt=Math.min,Unt=function(e,t){var r=jnt(e);return r<0?znt(r+t,0):Gnt(r,t)},$nt=$9,Znt=Math.min,Wnt=function(e){var t=$nt(e);return t>0?Znt(t,9007199254740991):0},qnt=Wnt,QS=function(e){return qnt(e.length)},Xnt=G0,Knt=Unt,Ynt=QS,mS=function(e){return function(t,r,n){var i=Xnt(t),o=Ynt(i);if(o===0)return!e&&-1;var a=Knt(n,o),s;if(e&&r!==r){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===r)return e||a||0;return!e&&-1}},Jnt={includes:mS(!0),indexOf:mS(!1)},Z9={},tit=w1,gg=xa,eit=G0,rit=Jnt.indexOf,nit=Z9,gS=tit([].push),yS=function(e,t){var r=eit(e),n=0,i=[],o;for(o in r)!gg(nit,o)&&gg(r,o)&&gS(i,o);for(;t.length>n;)gg(r,o=t[n++])&&(~rit(i,o)||gS(i,o));return i},yg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],iit=yS,oit=yg,ait=Object.keys||function(e){return iit(e,oit)},sit=$2,lit=lS,cit=wa,uit=G3,hit=G0,dit=ait;sS.f=sit&&!lit?Object.defineProperties:function(e,t){uit(e);for(var r=hit(t),n=dit(t),i=n.length,o=0,a;i>o;)cit.f(e,a=n[o++],r[a]);return e};var pit=y7,Tit=pit("document","documentElement"),fit=XH,Qit=eg,_S=fit("keys"),_g=function(e){return _S[e]||(_S[e]=Qit(e))},mit=G3,git=sS,vS=yg,yit=Z9,_it=Tit,vit=ag,bit=_g,bS=">",LS="<",vg="prototype",bg="script",xS=bit("IE_PROTO"),Lg=function(){},wS=function(e){return LS+bg+bS+e+LS+"/"+bg+bS},ES=function(e){e.write(wS("")),e.close();var t=e.parentWindow.Object;return e=null,t},Lit=function(){var e=vit("iframe"),t="java"+bg+":",r;return e.style.display="none",_it.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(wS("document.F=Object")),r.close(),r.F},W9,q9=function(){try{W9=new ActiveXObject("htmlfile")}catch{}q9=typeof document<"u"?document.domain&&W9?ES(W9):Lit():ES(W9);for(var e=vS.length;e--;)delete q9[vg][vS[e]];return q9()};yit[xS]=!0;var xg=Object.create||function(e,t){var r;return e!==null?(Lg[vg]=mit(e),r=new Lg,Lg[vg]=null,r[xS]=e):r=q9(),t===void 0?r:git.f(r,t)},xit=d2,wit=xg,Eit=wa.f,wg=xit("unscopables"),Eg=Array.prototype;Eg[wg]===void 0&&Eit(Eg,wg,{configurable:!0,value:wit(null)});var Mit=function(e){Eg[wg][e]=!0},v7={},Hit=Bo,Sit=D1,MS=Hit.WeakMap,Cit=Sit(MS)&&/native code/.test(String(MS)),Mg=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Ait=$2,Oit=wa,kit=Mg,X9=Ait?function(e,t,r){return Oit.f(e,t,kit(1,r))}:function(e,t,r){return e[t]=r,e},Vit=Cit,HS=Bo,Pit=p2,Iit=X9,Hg=xa,Sg=tg,Rit=_g,Nit=Z9,SS="Object already initialized",Cg=HS.TypeError,Bit=HS.WeakMap,K9,b7,Y9,Dit=function(e){return Y9(e)?b7(e):K9(e,{})},Fit=function(e){return function(t){var r;if(!Pit(t)||(r=b7(t)).type!==e)throw new Cg("Incompatible receiver, "+e+" required");return r}};if(Vit||Sg.state){var Ea=Sg.state||(Sg.state=new Bit);Ea.get=Ea.get,Ea.has=Ea.has,Ea.set=Ea.set,K9=function(e,t){if(Ea.has(e))throw new Cg(SS);return t.facade=e,Ea.set(e,t),t},b7=function(e){return Ea.get(e)||{}},Y9=function(e){return Ea.has(e)}}else{var $0=Rit("state");Nit[$0]=!0,K9=function(e,t){if(Hg(e,$0))throw new Cg(SS);return t.facade=e,Iit(e,$0,t),t},b7=function(e){return Hg(e,$0)?e[$0]:{}},Y9=function(e){return Hg(e,$0)}}var J9={set:K9,get:b7,has:Y9,enforce:Dit,getterFor:Fit},Ag={},CS={},AS={}.propertyIsEnumerable,OS=Object.getOwnPropertyDescriptor,jit=OS&&!AS.call({1:2},1);CS.f=jit?function(e){var t=OS(this,e);return!!t&&t.enumerable}:AS;var zit=$2,Git=Vs,Uit=CS,$it=Mg,Zit=G0,Wit=TS,qit=xa,Xit=uS,kS=Object.getOwnPropertyDescriptor;Ag.f=zit?kS:function(e,t){if(e=Zit(e),t=Wit(t),Xit)try{return kS(e,t)}catch{}if(qit(e,t))return $it(!Git(Uit.f,e,t),e[t])};var VS={exports:{}},Og=$2,Kit=xa,PS=Function.prototype,Yit=Og&&Object.getOwnPropertyDescriptor,kg=Kit(PS,"name"),Jit=kg&&(function(){}).name==="something",t1t=kg&&(!Og||Og&&Yit(PS,"name").configurable),IS={EXISTS:kg,PROPER:Jit,CONFIGURABLE:t1t},e1t=w1,r1t=D1,Vg=tg,n1t=e1t(Function.toString);r1t(Vg.inspectSource)||(Vg.inspectSource=function(e){return n1t(e)});var i1t=Vg.inspectSource,Pg=w1,o1t=ro,a1t=D1,th=xa,Ig=$2,s1t=IS.CONFIGURABLE,l1t=i1t,RS=J9,c1t=RS.enforce,u1t=RS.get,NS=String,eh=Object.defineProperty,h1t=Pg("".slice),d1t=Pg("".replace),p1t=Pg([].join),T1t=Ig&&!o1t(function(){return eh(function(){},"length",{value:8}).length!==8}),f1t=String(String).split("String"),Q1t=VS.exports=function(e,t,r){h1t(NS(t),0,7)==="Symbol("&&(t="["+d1t(NS(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!th(e,"name")||s1t&&e.name!==t)&&(Ig?eh(e,"name",{value:t,configurable:!0}):e.name=t),T1t&&r&&th(r,"arity")&&e.length!==r.arity&&eh(e,"length",{value:r.arity});try{r&&th(r,"constructor")&&r.constructor?Ig&&eh(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=c1t(e);return th(n,"source")||(n.source=p1t(f1t,typeof t=="string"?t:"")),e};Function.prototype.toString=Q1t(function(){return a1t(this)&&u1t(this).source||l1t(this)},"toString");var BS=VS.exports,m1t=D1,g1t=wa,y1t=BS,_1t=Jm,Z0=function(e,t,r,n){n||(n={});var i=n.enumerable,o=n.name!==void 0?n.name:t;if(m1t(r)&&y1t(r,o,n),n.global)i?e[t]=r:_1t(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch{}i?e[t]=r:g1t.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},rh={},v1t=yS,b1t=yg,L1t=b1t.concat("length","prototype");rh.f=Object.getOwnPropertyNames||function(e){return v1t(e,L1t)};var DS={};DS.f=Object.getOwnPropertySymbols;var x1t=y7,w1t=w1,E1t=rh,M1t=DS,H1t=G3,S1t=w1t([].concat),C1t=x1t("Reflect","ownKeys")||function(e){var t=E1t.f(H1t(e)),r=M1t.f;return r?S1t(t,r(e)):t},FS=xa,A1t=C1t,O1t=Ag,k1t=wa,V1t=function(e,t,r){for(var n=A1t(t),i=k1t.f,o=O1t.f,a=0;a<n.length;a++){var s=n[a];!FS(e,s)&&!(r&&FS(r,s))&&i(e,s,o(t,s))}},P1t=ro,I1t=D1,R1t=/#|\.prototype\./,L7=function(e,t){var r=B1t[N1t(e)];return r===F1t?!0:r===D1t?!1:I1t(t)?P1t(t):!!t},N1t=L7.normalize=function(e){return String(e).replace(R1t,".").toLowerCase()},B1t=L7.data={},D1t=L7.NATIVE="N",F1t=L7.POLYFILL="P",jS=L7,nh=Bo,j1t=Ag.f,z1t=X9,G1t=Z0,U1t=Jm,$1t=V1t,Z1t=jS,Ma=function(e,t){var r=e.target,n=e.global,i=e.stat,o,a,s,h,d,f;if(n?a=nh:i?a=nh[r]||U1t(r,{}):a=nh[r]&&nh[r].prototype,a)for(s in t){if(d=t[s],e.dontCallGetSet?(f=j1t(a,s),h=f&&f.value):h=a[s],o=Z1t(n?s:r+(i?".":"#")+s,e.forced),!o&&h!==void 0){if(typeof d==typeof h)continue;$1t(d,h)}(e.sham||h&&h.sham)&&z1t(d,"sham",!0),G1t(a,s,d,e)}},W1t=ro,q1t=!W1t(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),X1t=xa,K1t=D1,Y1t=KH,J1t=_g,tot=q1t,zS=J1t("IE_PROTO"),Rg=Object,eot=Rg.prototype,GS=tot?Rg.getPrototypeOf:function(e){var t=Y1t(e);if(X1t(t,zS))return t[zS];var r=t.constructor;return K1t(r)&&t instanceof r?r.prototype:t instanceof Rg?eot:null},rot=ro,not=D1,iot=p2,US=GS,oot=Z0,aot=d2,Ng=aot("iterator"),$S=!1,n6,Bg,Dg;[].keys&&(Dg=[].keys(),"next"in Dg?(Bg=US(US(Dg)),Bg!==Object.prototype&&(n6=Bg)):$S=!0);var sot=!iot(n6)||rot(function(){var e={};return n6[Ng].call(e)!==e});sot&&(n6={}),not(n6[Ng])||oot(n6,Ng,function(){return this});var ZS={IteratorPrototype:n6,BUGGY_SAFARI_ITERATORS:$S},lot=wa.f,cot=xa,uot=d2,WS=uot("toStringTag"),ih=function(e,t,r){e&&!r&&(e=e.prototype),e&&!cot(e,WS)&&lot(e,WS,{configurable:!0,value:t})},hot=ZS.IteratorPrototype,dot=xg,pot=Mg,Tot=ih,fot=v7,Qot=function(){return this},mot=function(e,t,r,n){var i=t+" Iterator";return e.prototype=dot(hot,{next:pot(+!n,r)}),Tot(e,i,!1),fot[i]=Qot,e},got=w1,yot=_7,qS=function(e,t,r){try{return got(yot(Object.getOwnPropertyDescriptor(e,t)[r]))}catch{}},_ot=p2,vot=function(e){return _ot(e)||e===null},bot=vot,Lot=String,xot=TypeError,wot=function(e){if(bot(e))return e;throw new xot("Can't set "+Lot(e)+" as a prototype")},Eot=qS,Mot=p2,Hot=j9,Sot=wot,XS=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=Eot(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch{}return function(n,i){return Hot(n),Sot(i),Mot(n)&&(e?r(n,i):n.__proto__=i),n}}():void 0),Cot=Ma,Aot=Vs,KS=IS,Oot=D1,kot=mot,YS=GS,JS=XS,Vot=ih,Pot=X9,Fg=Z0,Iot=d2,Rot=v7,tC=ZS,Not=KS.PROPER,Bot=KS.CONFIGURABLE,eC=tC.IteratorPrototype,oh=tC.BUGGY_SAFARI_ITERATORS,x7=Iot("iterator"),rC="keys",w7="values",nC="entries",Dot=function(){return this},jg=function(e,t,r,n,i,o,a){kot(r,t,n);var s=function(E){if(E===i&&m)return m;if(!oh&&E&&E in f)return f[E];switch(E){case rC:return function(){return new r(this,E)};case w7:return function(){return new r(this,E)};case nC:return function(){return new r(this,E)}}return function(){return new r(this)}},h=t+" Iterator",d=!1,f=e.prototype,Q=f[x7]||f["@@iterator"]||i&&f[i],m=!oh&&Q||s(i),_=t==="Array"&&f.entries||Q,v,b,M;if(_&&(v=YS(_.call(new e)),v!==Object.prototype&&v.next&&(YS(v)!==eC&&(JS?JS(v,eC):Oot(v[x7])||Fg(v,x7,Dot)),Vot(v,h,!0))),Not&&i===w7&&Q&&Q.name!==w7&&(Bot?Pot(f,"name",w7):(d=!0,m=function(){return Aot(Q,this)})),i)if(b={values:s(w7),keys:o?m:s(rC),entries:s(nC)},a)for(M in b)(oh||d||!(M in f))&&Fg(f,M,b[M]);else Cot({target:t,proto:!0,forced:oh||d},b);return f[x7]!==m&&Fg(f,x7,m,{name:i}),Rot[t]=m,b},zg=function(e,t){return{value:e,done:t}},Fot=G0,Gg=Mit,iC=v7,oC=J9,jot=wa.f,zot=jg,ah=zg,Got=$2,aC="Array Iterator",Uot=oC.set,$ot=oC.getterFor(aC),Zot=zot(Array,"Array",function(e,t){Uot(this,{type:aC,target:Fot(e),index:0,kind:t})},function(){var e=$ot(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,ah(void 0,!0);switch(e.kind){case"keys":return ah(r,!1);case"values":return ah(t[r],!1)}return ah([r,t[r]],!1)},"values"),sC=iC.Arguments=iC.Array;if(Gg("keys"),Gg("values"),Gg("entries"),Got&&sC.name!=="values")try{jot(sC,"name",{value:"values"})}catch{}var Wot=d2,qot=Wot("toStringTag"),lC={};lC[qot]="z";var Ug=String(lC)==="[object z]",Xot=Ug,Kot=D1,sh=Q7,Yot=d2,Jot=Yot("toStringTag"),t2t=Object,e2t=sh(function(){return arguments}())==="Arguments",r2t=function(e,t){try{return e[t]}catch{}},$g=Xot?sh:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=r2t(t=t2t(e),Jot))=="string"?r:e2t?sh(t):(n=sh(t))==="Object"&&Kot(t.callee)?"Arguments":n},n2t=Ug,i2t=$g,o2t=n2t?{}.toString:function(){return"[object "+i2t(this)+"]"},a2t=Ug,s2t=Z0,l2t=o2t;a2t||s2t(Object.prototype,"toString",l2t,{unsafe:!0});var cC={exports:{}},uC={},c2t=w1,u2t=c2t([].slice),h2t=Q7,d2t=G0,hC=rh.f,p2t=u2t,dC=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],T2t=function(e){try{return hC(e)}catch{return p2t(dC)}};uC.f=function(e){return dC&&h2t(e)==="Window"?T2t(e):hC(d2t(e))};var f2t=ro,Q2t=f2t(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),m2t=ro,g2t=p2,y2t=Q7,pC=Q2t,lh=Object.isExtensible,_2t=m2t(function(){lh(1)}),v2t=_2t||pC?function(e){return!g2t(e)||pC&&y2t(e)==="ArrayBuffer"?!1:lh?lh(e):!0}:lh,b2t=ro,L2t=!b2t(function(){return Object.isExtensible(Object.preventExtensions({}))}),x2t=Ma,w2t=w1,E2t=Z9,M2t=p2,Zg=xa,H2t=wa.f,TC=rh,S2t=uC,Wg=v2t,C2t=eg,A2t=L2t,fC=!1,Ps=C2t("meta"),O2t=0,qg=function(e){H2t(e,Ps,{value:{objectID:"O"+O2t++,weakData:{}}})},k2t=function(e,t){if(!M2t(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!Zg(e,Ps)){if(!Wg(e))return"F";if(!t)return"E";qg(e)}return e[Ps].objectID},V2t=function(e,t){if(!Zg(e,Ps)){if(!Wg(e))return!0;if(!t)return!1;qg(e)}return e[Ps].weakData},P2t=function(e){return A2t&&fC&&Wg(e)&&!Zg(e,Ps)&&qg(e),e},I2t=function(){R2t.enable=function(){},fC=!0;var e=TC.f,t=w2t([].splice),r={};r[Ps]=1,e(r).length&&(TC.f=function(n){for(var i=e(n),o=0,a=i.length;o<a;o++)if(i[o]===Ps){t(i,o,1);break}return i},x2t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:S2t.f}))},R2t=cC.exports={enable:I2t,fastKey:k2t,getWeakData:V2t,onFreeze:P2t};E2t[Ps]=!0;var QC=cC.exports,N2t=Q7,B2t=w1,D2t=function(e){if(N2t(e)==="Function")return B2t(e)},mC=D2t,F2t=_7,j2t=Xm,z2t=mC(mC.bind),gC=function(e,t){return F2t(e),t===void 0?e:j2t?z2t(e,t):function(){return e.apply(t,arguments)}},G2t=d2,U2t=v7,$2t=G2t("iterator"),Z2t=Array.prototype,W2t=function(e){return e!==void 0&&(U2t.Array===e||Z2t[$2t]===e)},q2t=$g,yC=ug,X2t=m7,K2t=v7,Y2t=d2,J2t=Y2t("iterator"),_C=function(e){if(!X2t(e))return yC(e,J2t)||yC(e,"@@iterator")||K2t[q2t(e)]},tat=Vs,eat=_7,rat=G3,nat=cg,iat=_C,oat=TypeError,aat=function(e,t){var r=arguments.length<2?iat(e):t;if(eat(r))return rat(tat(r,e));throw new oat(nat(e)+" is not iterable")},sat=Vs,vC=G3,lat=ug,Xg=function(e,t,r){var n,i;vC(e);try{if(n=lat(e,"return"),!n){if(t==="throw")throw r;return r}n=sat(n,e)}catch(o){i=!0,n=o}if(t==="throw")throw r;if(i)throw n;return vC(n),r},cat=gC,uat=Vs,hat=G3,dat=cg,pat=W2t,Tat=QS,bC=lg,fat=aat,Qat=_C,LC=Xg,mat=TypeError,ch=function(e,t){this.stopped=e,this.result=t},xC=ch.prototype,wC=function(e,t,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),o=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),h=cat(t,n),d,f,Q,m,_,v,b,M=function(O){return d&&LC(d,"normal",O),new ch(!0,O)},E=function(O){return i?(hat(O),s?h(O[0],O[1],M):h(O[0],O[1])):s?h(O,M):h(O)};if(o)d=e.iterator;else if(a)d=e;else{if(f=Qat(e),!f)throw new mat(dat(e)+" is not iterable");if(pat(f)){for(Q=0,m=Tat(e);m>Q;Q++)if(_=E(e[Q]),_&&bC(xC,_))return _;return new ch(!1)}d=fat(e,f)}for(v=o?e.next:d.next;!(b=uat(v,d)).done;){try{_=E(b.value)}catch(O){LC(d,"throw",O)}if(typeof _=="object"&&_&&bC(xC,_))return _}return new ch(!1)},gat=lg,yat=TypeError,EC=function(e,t){if(gat(t,e))return e;throw new yat("Incorrect invocation")},_at=d2,MC=_at("iterator"),HC=!1;try{var vat=0,SC={next:function(){return{done:!!vat++}},return:function(){HC=!0}};SC[MC]=function(){return this},Array.from(SC,function(){throw 2})}catch{}var bat=function(e,t){try{if(!t&&!HC)return!1}catch{return!1}var r=!1;try{var n={};n[MC]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},Lat=D1,xat=p2,CC=XS,wat=function(e,t,r){var n,i;return CC&&Lat(n=t.constructor)&&n!==r&&xat(i=n.prototype)&&i!==r.prototype&&CC(e,i),e},Eat=Ma,Mat=Bo,Hat=w1,AC=jS,Sat=Z0,Cat=QC,Aat=wC,Oat=EC,kat=D1,Vat=m7,Kg=p2,Yg=ro,Pat=bat,Iat=ih,Rat=wat,Nat=function(e,t,r){var n=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=n?"set":"add",a=Mat[e],s=a&&a.prototype,h=a,d={},f=function(E){var O=Hat(s[E]);Sat(s,E,E==="add"?function(V){return O(this,V===0?0:V),this}:E==="delete"?function(V){return i&&!Kg(V)?!1:O(this,V===0?0:V)}:E==="get"?function(V){return i&&!Kg(V)?void 0:O(this,V===0?0:V)}:E==="has"?function(V){return i&&!Kg(V)?!1:O(this,V===0?0:V)}:function(V,N){return O(this,V===0?0:V,N),this})},Q=AC(e,!kat(a)||!(i||s.forEach&&!Yg(function(){new a().entries().next()})));if(Q)h=r.getConstructor(t,e,n,o),Cat.enable();else if(AC(e,!0)){var m=new h,_=m[o](i?{}:-0,1)!==m,v=Yg(function(){m.has(1)}),b=Pat(function(E){new a(E)}),M=!i&&Yg(function(){for(var E=new a,O=5;O--;)E[o](O,O);return!E.has(-0)});b||(h=t(function(E,O){Oat(E,s);var V=Rat(new a,E,h);return Vat(O)||Aat(O,V[o],{that:V,AS_ENTRIES:n}),V}),h.prototype=s,s.constructor=h),(v||M)&&(f("delete"),f("has"),n&&f("get")),(M||_)&&f(o),i&&s.clear&&delete s.clear}return d[e]=h,Eat({global:!0,constructor:!0,forced:h!==a},d),Iat(h,e),i||r.setStrong(h,e,n),h},OC=BS,Bat=wa,kC=function(e,t,r){return r.get&&OC(r.get,t,{getter:!0}),r.set&&OC(r.set,t,{setter:!0}),Bat.f(e,t,r)},Dat=Z0,Fat=function(e,t,r){for(var n in t)Dat(e,n,t[n],r);return e},jat=y7,zat=kC,Gat=d2,Uat=$2,VC=Gat("species"),$at=function(e){var t=jat(e);Uat&&t&&!t[VC]&&zat(t,VC,{configurable:!0,get:function(){return this}})},PC=xg,Zat=kC,IC=Fat,Wat=gC,qat=EC,Xat=m7,Kat=wC,Yat=jg,RC=zg,Jat=$at,E7=$2,NC=QC.fastKey,BC=J9,DC=BC.set,Jg=BC.getterFor,tst={getConstructor:function(e,t,r,n){var i=e(function(d,f){qat(d,o),DC(d,{type:t,index:PC(null),first:void 0,last:void 0,size:0}),E7||(d.size=0),Xat(f)||Kat(f,d[n],{that:d,AS_ENTRIES:r})}),o=i.prototype,a=Jg(t),s=function(d,f,Q){var m=a(d),_=h(d,f),v,b;return _?_.value=Q:(m.last=_={index:b=NC(f,!0),key:f,value:Q,previous:v=m.last,next:void 0,removed:!1},m.first||(m.first=_),v&&(v.next=_),E7?m.size++:d.size++,b!=="F"&&(m.index[b]=_)),d},h=function(d,f){var Q=a(d),m=NC(f),_;if(m!=="F")return Q.index[m];for(_=Q.first;_;_=_.next)if(_.key===f)return _};return IC(o,{clear:function(){for(var d=this,f=a(d),Q=f.first;Q;)Q.removed=!0,Q.previous&&(Q.previous=Q.previous.next=void 0),Q=Q.next;f.first=f.last=void 0,f.index=PC(null),E7?f.size=0:d.size=0},delete:function(d){var f=this,Q=a(f),m=h(f,d);if(m){var _=m.next,v=m.previous;delete Q.index[m.index],m.removed=!0,v&&(v.next=_),_&&(_.previous=v),Q.first===m&&(Q.first=_),Q.last===m&&(Q.last=v),E7?Q.size--:f.size--}return!!m},forEach:function(d){for(var f=a(this),Q=Wat(d,arguments.length>1?arguments[1]:void 0),m;m=m?m.next:f.first;)for(Q(m.value,m.key,this);m&&m.removed;)m=m.previous},has:function(d){return!!h(this,d)}}),IC(o,r?{get:function(d){var f=h(this,d);return f&&f.value},set:function(d,f){return s(this,d===0?0:d,f)}}:{add:function(d){return s(this,d=d===0?0:d,d)}}),E7&&Zat(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=Jg(t),o=Jg(n);Yat(e,t,function(a,s){DC(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,h=a.last;h&&h.removed;)h=h.previous;return!a.target||!(a.last=h=h?h.next:a.state.first)?(a.target=void 0,RC(void 0,!0)):RC(s==="keys"?h.key:s==="values"?h.value:[h.key,h.value],!1)},r?"entries":"values",!r,!0),Jat(t)}},est=Nat,rst=tst;est("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},rst);var ty=w1,uh=Set.prototype,Ha={Set,add:ty(uh.add),has:ty(uh.has),remove:ty(uh.delete),proto:uh},nst=Ha.has,i6=function(e){return nst(e),e},ist=Vs,o6=function(e,t,r){for(var n=r?e:e.iterator,i=e.next,o,a;!(o=ist(i,n)).done;)if(a=t(o.value),a!==void 0)return a},FC=w1,ost=o6,jC=Ha,ast=jC.Set,zC=jC.proto,sst=FC(zC.forEach),GC=FC(zC.keys),lst=GC(new ast).next,M7=function(e,t,r){return r?ost({iterator:GC(e),next:lst},t):sst(e,t)},UC=Ha,cst=M7,ust=UC.Set,hst=UC.add,ey=function(e){var t=new ust;return cst(e,function(r){hst(t,r)}),t},dst=qS,pst=Ha,H7=dst(pst.proto,"size","get")||function(e){return e.size},Tst=function(e){return{iterator:e,next:e.next,done:!1}},$C=_7,ZC=G3,WC=Vs,fst=$9,Qst=Tst,qC="Invalid size",mst=RangeError,gst=TypeError,yst=Math.max,XC=function(e,t){this.set=e,this.size=yst(t,0),this.has=$C(e.has),this.keys=$C(e.keys)};XC.prototype={getIterator:function(){return Qst(ZC(WC(this.keys,this.set)))},includes:function(e){return WC(this.has,this.set,e)}};var a6=function(e){ZC(e);var t=+e.size;if(t!==t)throw new gst(qC);var r=fst(t);if(r<0)throw new mst(qC);return new XC(e,r)},_st=i6,KC=Ha,vst=ey,bst=H7,Lst=a6,xst=M7,wst=o6,Est=KC.has,YC=KC.remove,Mst=function(e){var t=_st(this),r=Lst(e),n=vst(t);return bst(t)<=r.size?xst(t,function(i){r.includes(i)&&YC(n,i)}):wst(r.getIterator(),function(i){Est(t,i)&&YC(n,i)}),n},Hst=y7,JC=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},s6=function(e){var t=Hst("Set");try{new t()[e](JC(0));try{return new t()[e](JC(-1)),!1}catch{return!0}}catch{return!1}},Sst=Ma,Cst=Mst,Ast=s6;Sst({target:"Set",proto:!0,real:!0,forced:!Ast("difference")},{difference:Cst});var Ost=i6,ry=Ha,kst=H7,Vst=a6,Pst=M7,Ist=o6,Rst=ry.Set,tA=ry.add,Nst=ry.has,Bst=function(e){var t=Ost(this),r=Vst(e),n=new Rst;return kst(t)>r.size?Ist(r.getIterator(),function(i){Nst(t,i)&&tA(n,i)}):Pst(t,function(i){r.includes(i)&&tA(n,i)}),n},Dst=Ma,Fst=ro,jst=Bst,zst=s6,Gst=!zst("intersection")||Fst(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});Dst({target:"Set",proto:!0,real:!0,forced:Gst},{intersection:jst});var Ust=i6,$st=Ha.has,Zst=H7,Wst=a6,qst=M7,Xst=o6,Kst=Xg,Yst=function(e){var t=Ust(this),r=Wst(e);if(Zst(t)<=r.size)return qst(t,function(i){if(r.includes(i))return!1},!0)!==!1;var n=r.getIterator();return Xst(n,function(i){if($st(t,i))return Kst(n,"normal",!1)})!==!1},Jst=Ma,t3t=Yst,e3t=s6;Jst({target:"Set",proto:!0,real:!0,forced:!e3t("isDisjointFrom")},{isDisjointFrom:t3t});var r3t=i6,n3t=H7,i3t=M7,o3t=a6,a3t=function(e){var t=r3t(this),r=o3t(e);return n3t(t)>r.size?!1:i3t(t,function(n){if(!r.includes(n))return!1},!0)!==!1},s3t=Ma,l3t=a3t,c3t=s6;s3t({target:"Set",proto:!0,real:!0,forced:!c3t("isSubsetOf")},{isSubsetOf:l3t});var u3t=i6,h3t=Ha.has,d3t=H7,p3t=a6,T3t=o6,f3t=Xg,Q3t=function(e){var t=u3t(this),r=p3t(e);if(d3t(t)<r.size)return!1;var n=r.getIterator();return T3t(n,function(i){if(!h3t(t,i))return f3t(n,"normal",!1)})!==!1},m3t=Ma,g3t=Q3t,y3t=s6;m3t({target:"Set",proto:!0,real:!0,forced:!y3t("isSupersetOf")},{isSupersetOf:g3t});var _3t=i6,ny=Ha,v3t=ey,b3t=a6,L3t=o6,x3t=ny.add,w3t=ny.has,E3t=ny.remove,M3t=function(e){var t=_3t(this),r=b3t(e).getIterator(),n=v3t(t);return L3t(r,function(i){w3t(t,i)?E3t(n,i):x3t(n,i)}),n},H3t=Ma,S3t=M3t,C3t=s6;H3t({target:"Set",proto:!0,real:!0,forced:!C3t("symmetricDifference")},{symmetricDifference:S3t});var A3t=i6,O3t=Ha.add,k3t=ey,V3t=a6,P3t=o6,I3t=function(e){var t=A3t(this),r=V3t(e).getIterator(),n=k3t(t);return P3t(r,function(i){O3t(n,i)}),n},R3t=Ma,N3t=I3t,B3t=s6;R3t({target:"Set",proto:!0,real:!0,forced:!B3t("union")},{union:N3t});var D3t=$g,F3t=String,eA=function(e){if(D3t(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return F3t(e)},iy=w1,j3t=$9,z3t=eA,G3t=j9,U3t=iy("".charAt),rA=iy("".charCodeAt),$3t=iy("".slice),nA=function(e){return function(t,r){var n=z3t(G3t(t)),i=j3t(r),o=n.length,a,s;return i<0||i>=o?e?"":void 0:(a=rA(n,i),a<55296||a>56319||i+1===o||(s=rA(n,i+1))<56320||s>57343?e?U3t(n,i):a:e?$3t(n,i,i+2):(a-55296<<10)+(s-56320)+65536)}},Z3t={codeAt:nA(!1),charAt:nA(!0)},W3t=Z3t.charAt,q3t=eA,iA=J9,X3t=jg,oA=zg,aA="String Iterator",K3t=iA.set,Y3t=iA.getterFor(aA);X3t(String,"String",function(e){K3t(this,{type:aA,string:q3t(e),index:0})},function(){var e=Y3t(this),t=e.string,r=e.index,n;return r>=t.length?oA(void 0,!0):(n=W3t(t,r),e.index+=n.length,oA(n,!1))});var J3t=Bo,t4t=J3t,e4t=t4t,r4t=e4t.Set,n4t={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},i4t=ag,oy=i4t("span").classList,sA=oy&&oy.constructor&&oy.constructor.prototype,o4t=sA===Object.prototype?void 0:sA,lA=Bo,cA=n4t,a4t=o4t,S7=Zot,uA=X9,s4t=ih,l4t=d2,ay=l4t("iterator"),sy=S7.values,hA=function(e,t){if(e){if(e[ay]!==sy)try{uA(e,ay,sy)}catch{e[ay]=sy}if(s4t(e,t,!0),cA[t]){for(var r in S7)if(e[r]!==S7[r])try{uA(e,r,S7[r])}catch{e[r]=S7[r]}}}};for(var ly in cA)hA(lA[ly]&&lA[ly].prototype,ly);hA(a4t,"DOMTokenList");var c4t=r4t,u4t=c4t,h4t=u4t,d4t=h4t;const C7=z3(d4t);var dA={exports:{}};/**
|
|
33
|
+
</div>`,Zm=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},f7={},BH=async function(e,t){return f7&&f7.hasOwnProperty(t)?f7[t]:new Promise(r=>{fetch(`${e}knowledge/label/${t}`,{method:"GET"}).then(n=>n.json()).then(n=>{let i=n.label;i==="Mammalia"&&(i="Mammalia not otherwise specified"),f7[t]=i,r(i)}).catch(n=>{console.error("Error:",n),f7[t]=t,r(t)})})},DH=function(e,t){if(!e||!t)return!1;let r=JSON.stringify(e),n=JSON.stringify(t);return r.indexOf(n)!==-1};let irt=function(){this.initialise=function(e){this.flatmapApi=e,this.destinations=[],this.origins=[],this.components=[],this.urls=[],this.controller=void 0,this.uberons=[],this.lookUp=[]},this.createTooltipData=async function(e){let t=[];e.feature.hyperlinks&&e.feature.hyperlinks.length>0?t=e.feature.hyperlinks:t=this.urls.map(i=>({url:i,id:"pubmed"}));let r;if(e.provenanceTaxonomy){r=[];for(let i=0;e.provenanceTaxonomy.length>i;i++)r.push(await BH(this.flatmapAPI,e.provenanceTaxonomy[i]))}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,title:e.label,featureId:e.resource,hyperlinks:t,provenanceTaxonomy:e.provenanceTaxonomy,provenanceTaxonomyLabel:r}},this.createComponentsLabelList=function(e,t){let r=[];return e.forEach(n=>{r.push(this.createLabelFromNeuralNode(n[0]),t),n.length===2&&r.push(this.createLabelFromNeuralNode(n[1]),t)}),r},this.createLabelLookup=function(e){return new Promise(t=>{let r={};this.uberons=[];const n={sql:this.buildLabelSqlStatement(e)};fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(i=>i.json()).then(i=>{const o=i.keys.indexOf("entity"),a=i.keys.indexOf("label");o>-1&&a>-1&&i.values.forEach(s=>{r[s[o]]=s[a],this.uberons.push({id:s[o],name:s[a]})}),t(r)})})},this.buildConnectivitySqlStatement=function(e){let t="select knowledge from knowledge where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildLabelSqlStatement=function(e){let t="select entity, label from labels where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.findAllIdsFromConnectivity=function(e){let t=e.connectivity.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),[...new Set(n.flat())]},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=Zm(t),n=[],i=!1;return r.forEach(o=>{i=!1,DH(e.axons,o)&&(i=!0),DH(e.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.retrieveFlatmapKnowledgeForEvent=async function(e){this.controller&&this.controller.abort(),this.controller=new AbortController;const t=this.controller.signal,r=e.resource;if(this.destinations=[],this.origins=[],this.components=[],!r||r.length==0)return;let n=this.queryForConnectivity(r,t),i=await this.pubmedQueryOnIds(e);return await Promise.all([n,i])},this.queryForConnectivity=function(e,t,r=!0){const n={sql:this.buildConnectivitySqlStatement(e)},i={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),...t?{signal:t}:{}};return new Promise(o=>{fetch(`${this.flatmapApi}knowledge/query/`,i).then(a=>a.json()).then(a=>{if(this.connectivityExists(a)){let s=JSON.parse(a.values[0][0]);r?this.processConnectivity(s).then(h=>{o(h)}):o(s)}else o(!1)}).catch(a=>{console.error("Error:",a),o(!1)})})},this.connectivityExists=function(e){return!!(e.values&&e.values.length>0&&JSON.parse(e.values[0][0]).connectivity&&JSON.parse(e.values[0][0]).connectivity.length>0)},this.findIfNodeIsSingle=function(e){return e.length===1?(console.error("Server returns a single node",e),e[0]):e.length===2&&e[1].length===0?e[0]:!1},this.createLabelFromNeuralNode=function(e,t){let r=this.findIfNodeIsSingle(e);if(r)return t[r];let n=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(i=>{t[i]==null?n+=`, ${i}`:n+=`, ${t[i]}`}),n},this.flattenAndFindDatasets=function(e,t,r){let n=this.flattenConntectivity(e),i=this.flattenConntectivity(t),o=this.flattenConntectivity(r);this.destinationsWithDatasets=this.uberons.filter(a=>i.indexOf(a.id)!==-1),this.originsWithDatasets=this.uberons.filter(a=>o.indexOf(a.id)!==-1),this.componentsWithDatasets=this.uberons.filter(a=>n.indexOf(a.id)!==-1)},this.processConnectivity=function(e){return new Promise(t=>{let r=this.findComponents(e),n=Zm(e.axons),i=Zm(e.dendrites),o=this.findAllIdsFromConnectivity(e);this.createLabelLookup(o).then(a=>{this.destinations=n.map(s=>this.createLabelFromNeuralNode(s,a)),this.origins=i.map(s=>this.createLabelFromNeuralNode(s,a)),this.components=r.map(s=>this.createLabelFromNeuralNode(s,a)),this.flattenAndFindDatasets(r,n,i),t({ids:{axons:n,dendrites:i,components:r},labels:{destinations:this.destinations,origins:this.origins,components:this.components}})})})},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.stripPMIDPrefix=function(e){return e.split(":")[1]},this.extractTermFromURLString=function(e){if(!e)return;const t=decodeURIComponent(e);let r="";return["doi.org/","nih.gov/pubmed/","pubmed.ncbi.nlm.nih.gov/"].forEach(i=>{const o=t.lastIndexOf(i);o!==-1&&(r=t.slice(o+i.length))}),r.endsWith("/")&&(r=r.slice(0,-1)),r},this.buildPubmedSqlStatement=function(e){let t="select distinct publication from publications where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.flatmapQuery=function(e){const t={sql:e};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(r=>r.json()).catch(r=>{console.error("Error:",r)})},this.pubmedQueryOnIds=function(e){return new Promise(t=>{const r=e.resource,n=e.feature.source;if(!r||r.length===0)return;const i=this.buildPubmedSqlStatement(r);this.flatmapQuery(i).then(o=>{o.values.length>0?(this.urls=this.getURLsForPubMed(o),t(!0)):this.pubmedQueryOnModels(n).then(a=>{t(a)})})})},this.pubmedQueryOnModels=function(e){return this.flatmapQuery(this.buildPubmedSqlStatementForModels(e)).then(t=>Array.isArray(t.values)&&t.values.length>0?(this.urls=this.getURLsForPubMed(t),!0):(this.urls=[],!1))},this.getURLsForPubMed=function(e){const t=e.values.map(n=>this.extractTermFromURLString(n[0])),r=this.transformPubMedSearchTerms(t);return[this.pubmedSearchUrl(r)]},this.transformPubMedSearchTerms=function(e){return e.join(" OR ")},this.pubmedSearchUrl=function(e){let t="https://pubmed.ncbi.nlm.nih.gov/?",r=new URLSearchParams;return r.append("term",e),t+r.toString()}};const ort='<svg width="195px" height="24px" viewBox="0 0 200 24" fill="yellow"><path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/><text x="47" y="52%" style="white-space: pre" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#333333">Featured dataset marker</text></svg>';var FH={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(typeof window<"u"?window:LK,function(){if(typeof window>"u")return null;var r=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),n=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(f){return r.setTimeout(f,20)},i=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||function(f){r.clearTimeout(f)};function o(f,Q){var m=Object.prototype.toString.call(f),_=m==="[object Array]"||m==="[object NodeList]"||m==="[object HTMLCollection]"||m==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,v=0,b=f.length;if(_)for(;v<b;v++)Q(f[v]);else Q(f)}function a(f){if(!f.getBoundingClientRect)return{width:f.offsetWidth,height:f.offsetHeight};var Q=f.getBoundingClientRect();return{width:Math.round(Q.width),height:Math.round(Q.height)}}function s(f,Q){Object.keys(Q).forEach(function(m){f.style[m]=Q[m]})}var h=function(f,Q){var m=0;function _(){var b=[];this.add=function(O){b.push(O)};var M,E;this.call=function(O){for(M=0,E=b.length;M<E;M++)b[M].call(this,O)},this.remove=function(O){var V=[];for(M=0,E=b.length;M<E;M++)b[M]!==O&&V.push(b[M]);b=V},this.length=function(){return b.length}}function v(b,M){if(b){if(b.resizedAttached){b.resizedAttached.add(M);return}b.resizedAttached=new _,b.resizedAttached.add(M),b.resizeSensor=document.createElement("div"),b.resizeSensor.dir="ltr",b.resizeSensor.className="resize-sensor";var E={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},O={position:"absolute",left:"0px",top:"0px",transition:"0s"};s(b.resizeSensor,E);var V=document.createElement("div");V.className="resize-sensor-expand",s(V,E);var N=document.createElement("div");s(N,O),V.appendChild(N);var j=document.createElement("div");j.className="resize-sensor-shrink",s(j,E);var $=document.createElement("div");s($,O),s($,{width:"200%",height:"200%"}),j.appendChild($),b.resizeSensor.appendChild(V),b.resizeSensor.appendChild(j),b.appendChild(b.resizeSensor);var G=window.getComputedStyle(b),J=G?G.getPropertyValue("position"):null;J!=="absolute"&&J!=="relative"&&J!=="fixed"&&J!=="sticky"&&(b.style.position="relative");var tt=!1,at=0,rt=a(b),Qt=0,Ct=0,Ut=!0;m=0;var ee=function(){var Xt=b.offsetWidth,le=b.offsetHeight;N.style.width=Xt+10+"px",N.style.height=le+10+"px",V.scrollLeft=Xt+10,V.scrollTop=le+10,j.scrollLeft=Xt+10,j.scrollTop=le+10},he=function(){if(Ut){var Xt=b.offsetWidth===0&&b.offsetHeight===0;if(Xt){m||(m=n(function(){m=0,he()}));return}else Ut=!1}ee()};b.resizeSensor.resetSensor=he;var Gt=function(){at=0,tt&&(Qt=rt.width,Ct=rt.height,b.resizedAttached&&b.resizedAttached.call(rt))},fe=function(){rt=a(b),tt=rt.width!==Qt||rt.height!==Ct,tt&&!at&&(at=n(Gt)),he()},hr=function(Xt,le,me){Xt.attachEvent?Xt.attachEvent("on"+le,me):Xt.addEventListener(le,me)};hr(V,"scroll",fe),hr(j,"scroll",fe),m=n(function(){m=0,he()})}}o(f,function(b){v(b,Q)}),this.detach=function(b){m||(i(m),m=0),h.detach(f,b)},this.reset=function(){f.resizeSensor.resetSensor()}};if(h.reset=function(f){o(f,function(Q){Q.resizeSensor.resetSensor()})},h.detach=function(f,Q){o(f,function(m){m&&(m.resizedAttached&&typeof Q=="function"&&(m.resizedAttached.remove(Q),m.resizedAttached.length())||m.resizeSensor&&(m.contains(m.resizeSensor)&&m.removeChild(m.resizeSensor),delete m.resizeSensor,delete m.resizedAttached))})},typeof MutationObserver<"u"){var d=new MutationObserver(function(f){for(var Q in f)if(f.hasOwnProperty(Q))for(var m=f[Q].addedNodes,_=0;_<m.length;_++)m[_].resizeSensor&&h.reset(m[_])});document.addEventListener("DOMContentLoaded",function(f){d.observe(document.body,{childList:!0,subtree:!0})})}return h})})(FH);var art=FH.exports;const srt=xK(art);var lrt=Object.defineProperty,crt=(e,t,r)=>t in e?lrt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wm=(e,t,r)=>(crt(e,typeof t!="symbol"?t+"":t,r),r),qm=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},At=(e,t,r)=>(qm(e,t,"read from private field"),r?r.call(e):t.get(e)),Ue=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Qr=(e,t,r,n)=>(qm(e,t,"write to private field"),t.set(e,r),r),lr=(e,t,r)=>(qm(e,t,"access private method"),r);function urt(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var I=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function z3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function hrt(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var ro=function(e){try{return!!e()}catch{return!0}},drt=ro,Xm=!drt(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),jH=Xm,zH=Function.prototype,Km=zH.call,prt=jH&&zH.bind.bind(Km,Km),w1=jH?prt:function(e){return function(){return Km.apply(e,arguments)}},GH=w1,Trt=GH({}.toString),frt=GH("".slice),Q7=function(e){return frt(Trt(e),8,-1)},Qrt=w1,mrt=ro,grt=Q7,Ym=Object,yrt=Qrt("".split),_rt=mrt(function(){return!Ym("z").propertyIsEnumerable(0)})?function(e){return grt(e)==="String"?yrt(e,""):Ym(e)}:Ym,m7=function(e){return e==null},vrt=m7,brt=TypeError,j9=function(e){if(vrt(e))throw new brt("Can't call method on "+e);return e},Lrt=_rt,xrt=j9,G0=function(e){return Lrt(xrt(e))},g7=function(e){return e&&e.Math===Math&&e},Bo=g7(typeof globalThis=="object"&&globalThis)||g7(typeof window=="object"&&window)||g7(typeof self=="object"&&self)||g7(typeof I=="object"&&I)||g7(typeof I=="object"&&I)||function(){return this}()||Function("return this")(),UH={exports:{}},$H=Bo,wrt=Object.defineProperty,Jm=function(e,t){try{wrt($H,e,{value:t,configurable:!0,writable:!0})}catch{$H[e]=t}return t},Ert=Bo,Mrt=Jm,ZH="__core-js_shared__",WH=UH.exports=Ert[ZH]||Mrt(ZH,{});(WH.versions||(WH.versions=[])).push({version:"3.37.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"});var tg=UH.exports,qH=tg,XH=function(e,t){return qH[e]||(qH[e]=t||{})},Hrt=j9,Srt=Object,KH=function(e){return Srt(Hrt(e))},Crt=w1,Art=KH,Ort=Crt({}.hasOwnProperty),xa=Object.hasOwn||function(e,t){return Ort(Art(e),t)},krt=w1,Vrt=0,Prt=Math.random(),Irt=krt(1 .toString),eg=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Irt(++Vrt+Prt,36)},Rrt=typeof navigator<"u"&&String(navigator.userAgent)||"",YH=Bo,rg=Rrt,JH=YH.process,tS=YH.Deno,eS=JH&&JH.versions||tS&&tS.version,rS=eS&&eS.v8,U2,z9;rS&&(U2=rS.split("."),z9=U2[0]>0&&U2[0]<4?1:+(U2[0]+U2[1])),!z9&&rg&&(U2=rg.match(/Edge\/(\d+)/),(!U2||U2[1]>=74)&&(U2=rg.match(/Chrome\/(\d+)/),U2&&(z9=+U2[1])));var Nrt=z9,nS=Nrt,Brt=ro,Drt=Bo,Frt=Drt.String,iS=!!Object.getOwnPropertySymbols&&!Brt(function(){var e=Symbol("symbol detection");return!Frt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&nS&&nS<41}),jrt=iS,oS=jrt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",zrt=Bo,Grt=XH,aS=xa,Urt=eg,$rt=iS,Zrt=oS,U0=zrt.Symbol,ng=Grt("wks"),Wrt=Zrt?U0.for||U0:U0&&U0.withoutSetter||Urt,d2=function(e){return aS(ng,e)||(ng[e]=$rt&&aS(U0,e)?U0[e]:Wrt("Symbol."+e)),ng[e]},ig=typeof document=="object"&&document.all,D1=typeof ig>"u"&&ig!==void 0?function(e){return typeof e=="function"||e===ig}:function(e){return typeof e=="function"},qrt=D1,p2=function(e){return typeof e=="object"?e!==null:qrt(e)},Xrt=p2,Krt=String,Yrt=TypeError,G3=function(e){if(Xrt(e))return e;throw new Yrt(Krt(e)+" is not an object")},sS={},Jrt=ro,$2=!Jrt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),tnt=$2,ent=ro,lS=tnt&&ent(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),wa={},rnt=Bo,cS=p2,og=rnt.document,nnt=cS(og)&&cS(og.createElement),ag=function(e){return nnt?og.createElement(e):{}},int=$2,ont=ro,ant=ag,uS=!int&&!ont(function(){return Object.defineProperty(ant("div"),"a",{get:function(){return 7}}).a!==7}),snt=Xm,G9=Function.prototype.call,Vs=snt?G9.bind(G9):function(){return G9.apply(G9,arguments)},sg=Bo,lnt=D1,cnt=function(e){return lnt(e)?e:void 0},y7=function(e,t){return arguments.length<2?cnt(sg[e]):sg[e]&&sg[e][t]},unt=w1,lg=unt({}.isPrototypeOf),hnt=y7,dnt=D1,pnt=lg,Tnt=oS,fnt=Object,hS=Tnt?function(e){return typeof e=="symbol"}:function(e){var t=hnt("Symbol");return dnt(t)&&pnt(t.prototype,fnt(e))},Qnt=String,cg=function(e){try{return Qnt(e)}catch{return"Object"}},mnt=D1,gnt=cg,ynt=TypeError,_7=function(e){if(mnt(e))return e;throw new ynt(gnt(e)+" is not a function")},_nt=_7,vnt=m7,ug=function(e,t){var r=e[t];return vnt(r)?void 0:_nt(r)},hg=Vs,dg=D1,pg=p2,bnt=TypeError,Lnt=function(e,t){var r,n;if(t==="string"&&dg(r=e.toString)&&!pg(n=hg(r,e))||dg(r=e.valueOf)&&!pg(n=hg(r,e))||t!=="string"&&dg(r=e.toString)&&!pg(n=hg(r,e)))return n;throw new bnt("Can't convert object to primitive value")},xnt=Vs,dS=p2,pS=hS,wnt=ug,Ent=Lnt,Mnt=d2,Hnt=TypeError,Snt=Mnt("toPrimitive"),Cnt=function(e,t){if(!dS(e)||pS(e))return e;var r=wnt(e,Snt),n;if(r){if(t===void 0&&(t="default"),n=xnt(r,e,t),!dS(n)||pS(n))return n;throw new Hnt("Can't convert object to primitive value")}return t===void 0&&(t="number"),Ent(e,t)},Ant=Cnt,Ont=hS,TS=function(e){var t=Ant(e,"string");return Ont(t)?t:t+""},knt=$2,Vnt=uS,Pnt=lS,U9=G3,fS=TS,Int=TypeError,Tg=Object.defineProperty,Rnt=Object.getOwnPropertyDescriptor,fg="enumerable",Qg="configurable",mg="writable";wa.f=knt?Pnt?function(e,t,r){if(U9(e),t=fS(t),U9(r),typeof e=="function"&&t==="prototype"&&"value"in r&&mg in r&&!r[mg]){var n=Rnt(e,t);n&&n[mg]&&(e[t]=r.value,r={configurable:Qg in r?r[Qg]:n[Qg],enumerable:fg in r?r[fg]:n[fg],writable:!1})}return Tg(e,t,r)}:Tg:function(e,t,r){if(U9(e),t=fS(t),U9(r),Vnt)try{return Tg(e,t,r)}catch{}if("get"in r||"set"in r)throw new Int("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Nnt=Math.ceil,Bnt=Math.floor,Dnt=Math.trunc||function(e){var t=+e;return(t>0?Bnt:Nnt)(t)},Fnt=Dnt,$9=function(e){var t=+e;return t!==t||t===0?0:Fnt(t)},jnt=$9,znt=Math.max,Gnt=Math.min,Unt=function(e,t){var r=jnt(e);return r<0?znt(r+t,0):Gnt(r,t)},$nt=$9,Znt=Math.min,Wnt=function(e){var t=$nt(e);return t>0?Znt(t,9007199254740991):0},qnt=Wnt,QS=function(e){return qnt(e.length)},Xnt=G0,Knt=Unt,Ynt=QS,mS=function(e){return function(t,r,n){var i=Xnt(t),o=Ynt(i);if(o===0)return!e&&-1;var a=Knt(n,o),s;if(e&&r!==r){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===r)return e||a||0;return!e&&-1}},Jnt={includes:mS(!0),indexOf:mS(!1)},Z9={},tit=w1,gg=xa,eit=G0,rit=Jnt.indexOf,nit=Z9,gS=tit([].push),yS=function(e,t){var r=eit(e),n=0,i=[],o;for(o in r)!gg(nit,o)&&gg(r,o)&&gS(i,o);for(;t.length>n;)gg(r,o=t[n++])&&(~rit(i,o)||gS(i,o));return i},yg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],iit=yS,oit=yg,ait=Object.keys||function(e){return iit(e,oit)},sit=$2,lit=lS,cit=wa,uit=G3,hit=G0,dit=ait;sS.f=sit&&!lit?Object.defineProperties:function(e,t){uit(e);for(var r=hit(t),n=dit(t),i=n.length,o=0,a;i>o;)cit.f(e,a=n[o++],r[a]);return e};var pit=y7,Tit=pit("document","documentElement"),fit=XH,Qit=eg,_S=fit("keys"),_g=function(e){return _S[e]||(_S[e]=Qit(e))},mit=G3,git=sS,vS=yg,yit=Z9,_it=Tit,vit=ag,bit=_g,bS=">",LS="<",vg="prototype",bg="script",xS=bit("IE_PROTO"),Lg=function(){},wS=function(e){return LS+bg+bS+e+LS+"/"+bg+bS},ES=function(e){e.write(wS("")),e.close();var t=e.parentWindow.Object;return e=null,t},Lit=function(){var e=vit("iframe"),t="java"+bg+":",r;return e.style.display="none",_it.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(wS("document.F=Object")),r.close(),r.F},W9,q9=function(){try{W9=new ActiveXObject("htmlfile")}catch{}q9=typeof document<"u"?document.domain&&W9?ES(W9):Lit():ES(W9);for(var e=vS.length;e--;)delete q9[vg][vS[e]];return q9()};yit[xS]=!0;var xg=Object.create||function(e,t){var r;return e!==null?(Lg[vg]=mit(e),r=new Lg,Lg[vg]=null,r[xS]=e):r=q9(),t===void 0?r:git.f(r,t)},xit=d2,wit=xg,Eit=wa.f,wg=xit("unscopables"),Eg=Array.prototype;Eg[wg]===void 0&&Eit(Eg,wg,{configurable:!0,value:wit(null)});var Mit=function(e){Eg[wg][e]=!0},v7={},Hit=Bo,Sit=D1,MS=Hit.WeakMap,Cit=Sit(MS)&&/native code/.test(String(MS)),Mg=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Ait=$2,Oit=wa,kit=Mg,X9=Ait?function(e,t,r){return Oit.f(e,t,kit(1,r))}:function(e,t,r){return e[t]=r,e},Vit=Cit,HS=Bo,Pit=p2,Iit=X9,Hg=xa,Sg=tg,Rit=_g,Nit=Z9,SS="Object already initialized",Cg=HS.TypeError,Bit=HS.WeakMap,K9,b7,Y9,Dit=function(e){return Y9(e)?b7(e):K9(e,{})},Fit=function(e){return function(t){var r;if(!Pit(t)||(r=b7(t)).type!==e)throw new Cg("Incompatible receiver, "+e+" required");return r}};if(Vit||Sg.state){var Ea=Sg.state||(Sg.state=new Bit);Ea.get=Ea.get,Ea.has=Ea.has,Ea.set=Ea.set,K9=function(e,t){if(Ea.has(e))throw new Cg(SS);return t.facade=e,Ea.set(e,t),t},b7=function(e){return Ea.get(e)||{}},Y9=function(e){return Ea.has(e)}}else{var $0=Rit("state");Nit[$0]=!0,K9=function(e,t){if(Hg(e,$0))throw new Cg(SS);return t.facade=e,Iit(e,$0,t),t},b7=function(e){return Hg(e,$0)?e[$0]:{}},Y9=function(e){return Hg(e,$0)}}var J9={set:K9,get:b7,has:Y9,enforce:Dit,getterFor:Fit},Ag={},CS={},AS={}.propertyIsEnumerable,OS=Object.getOwnPropertyDescriptor,jit=OS&&!AS.call({1:2},1);CS.f=jit?function(e){var t=OS(this,e);return!!t&&t.enumerable}:AS;var zit=$2,Git=Vs,Uit=CS,$it=Mg,Zit=G0,Wit=TS,qit=xa,Xit=uS,kS=Object.getOwnPropertyDescriptor;Ag.f=zit?kS:function(e,t){if(e=Zit(e),t=Wit(t),Xit)try{return kS(e,t)}catch{}if(qit(e,t))return $it(!Git(Uit.f,e,t),e[t])};var VS={exports:{}},Og=$2,Kit=xa,PS=Function.prototype,Yit=Og&&Object.getOwnPropertyDescriptor,kg=Kit(PS,"name"),Jit=kg&&(function(){}).name==="something",t1t=kg&&(!Og||Og&&Yit(PS,"name").configurable),IS={EXISTS:kg,PROPER:Jit,CONFIGURABLE:t1t},e1t=w1,r1t=D1,Vg=tg,n1t=e1t(Function.toString);r1t(Vg.inspectSource)||(Vg.inspectSource=function(e){return n1t(e)});var i1t=Vg.inspectSource,Pg=w1,o1t=ro,a1t=D1,th=xa,Ig=$2,s1t=IS.CONFIGURABLE,l1t=i1t,RS=J9,c1t=RS.enforce,u1t=RS.get,NS=String,eh=Object.defineProperty,h1t=Pg("".slice),d1t=Pg("".replace),p1t=Pg([].join),T1t=Ig&&!o1t(function(){return eh(function(){},"length",{value:8}).length!==8}),f1t=String(String).split("String"),Q1t=VS.exports=function(e,t,r){h1t(NS(t),0,7)==="Symbol("&&(t="["+d1t(NS(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!th(e,"name")||s1t&&e.name!==t)&&(Ig?eh(e,"name",{value:t,configurable:!0}):e.name=t),T1t&&r&&th(r,"arity")&&e.length!==r.arity&&eh(e,"length",{value:r.arity});try{r&&th(r,"constructor")&&r.constructor?Ig&&eh(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=c1t(e);return th(n,"source")||(n.source=p1t(f1t,typeof t=="string"?t:"")),e};Function.prototype.toString=Q1t(function(){return a1t(this)&&u1t(this).source||l1t(this)},"toString");var BS=VS.exports,m1t=D1,g1t=wa,y1t=BS,_1t=Jm,Z0=function(e,t,r,n){n||(n={});var i=n.enumerable,o=n.name!==void 0?n.name:t;if(m1t(r)&&y1t(r,o,n),n.global)i?e[t]=r:_1t(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch{}i?e[t]=r:g1t.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},rh={},v1t=yS,b1t=yg,L1t=b1t.concat("length","prototype");rh.f=Object.getOwnPropertyNames||function(e){return v1t(e,L1t)};var DS={};DS.f=Object.getOwnPropertySymbols;var x1t=y7,w1t=w1,E1t=rh,M1t=DS,H1t=G3,S1t=w1t([].concat),C1t=x1t("Reflect","ownKeys")||function(e){var t=E1t.f(H1t(e)),r=M1t.f;return r?S1t(t,r(e)):t},FS=xa,A1t=C1t,O1t=Ag,k1t=wa,V1t=function(e,t,r){for(var n=A1t(t),i=k1t.f,o=O1t.f,a=0;a<n.length;a++){var s=n[a];!FS(e,s)&&!(r&&FS(r,s))&&i(e,s,o(t,s))}},P1t=ro,I1t=D1,R1t=/#|\.prototype\./,L7=function(e,t){var r=B1t[N1t(e)];return r===F1t?!0:r===D1t?!1:I1t(t)?P1t(t):!!t},N1t=L7.normalize=function(e){return String(e).replace(R1t,".").toLowerCase()},B1t=L7.data={},D1t=L7.NATIVE="N",F1t=L7.POLYFILL="P",jS=L7,nh=Bo,j1t=Ag.f,z1t=X9,G1t=Z0,U1t=Jm,$1t=V1t,Z1t=jS,Ma=function(e,t){var r=e.target,n=e.global,i=e.stat,o,a,s,h,d,f;if(n?a=nh:i?a=nh[r]||U1t(r,{}):a=nh[r]&&nh[r].prototype,a)for(s in t){if(d=t[s],e.dontCallGetSet?(f=j1t(a,s),h=f&&f.value):h=a[s],o=Z1t(n?s:r+(i?".":"#")+s,e.forced),!o&&h!==void 0){if(typeof d==typeof h)continue;$1t(d,h)}(e.sham||h&&h.sham)&&z1t(d,"sham",!0),G1t(a,s,d,e)}},W1t=ro,q1t=!W1t(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),X1t=xa,K1t=D1,Y1t=KH,J1t=_g,tot=q1t,zS=J1t("IE_PROTO"),Rg=Object,eot=Rg.prototype,GS=tot?Rg.getPrototypeOf:function(e){var t=Y1t(e);if(X1t(t,zS))return t[zS];var r=t.constructor;return K1t(r)&&t instanceof r?r.prototype:t instanceof Rg?eot:null},rot=ro,not=D1,iot=p2,US=GS,oot=Z0,aot=d2,Ng=aot("iterator"),$S=!1,n6,Bg,Dg;[].keys&&(Dg=[].keys(),"next"in Dg?(Bg=US(US(Dg)),Bg!==Object.prototype&&(n6=Bg)):$S=!0);var sot=!iot(n6)||rot(function(){var e={};return n6[Ng].call(e)!==e});sot&&(n6={}),not(n6[Ng])||oot(n6,Ng,function(){return this});var ZS={IteratorPrototype:n6,BUGGY_SAFARI_ITERATORS:$S},lot=wa.f,cot=xa,uot=d2,WS=uot("toStringTag"),ih=function(e,t,r){e&&!r&&(e=e.prototype),e&&!cot(e,WS)&&lot(e,WS,{configurable:!0,value:t})},hot=ZS.IteratorPrototype,dot=xg,pot=Mg,Tot=ih,fot=v7,Qot=function(){return this},mot=function(e,t,r,n){var i=t+" Iterator";return e.prototype=dot(hot,{next:pot(+!n,r)}),Tot(e,i,!1),fot[i]=Qot,e},got=w1,yot=_7,qS=function(e,t,r){try{return got(yot(Object.getOwnPropertyDescriptor(e,t)[r]))}catch{}},_ot=p2,vot=function(e){return _ot(e)||e===null},bot=vot,Lot=String,xot=TypeError,wot=function(e){if(bot(e))return e;throw new xot("Can't set "+Lot(e)+" as a prototype")},Eot=qS,Mot=p2,Hot=j9,Sot=wot,XS=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=Eot(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch{}return function(n,i){return Hot(n),Sot(i),Mot(n)&&(e?r(n,i):n.__proto__=i),n}}():void 0),Cot=Ma,Aot=Vs,KS=IS,Oot=D1,kot=mot,YS=GS,JS=XS,Vot=ih,Pot=X9,Fg=Z0,Iot=d2,Rot=v7,tC=ZS,Not=KS.PROPER,Bot=KS.CONFIGURABLE,eC=tC.IteratorPrototype,oh=tC.BUGGY_SAFARI_ITERATORS,x7=Iot("iterator"),rC="keys",w7="values",nC="entries",Dot=function(){return this},jg=function(e,t,r,n,i,o,a){kot(r,t,n);var s=function(E){if(E===i&&m)return m;if(!oh&&E&&E in f)return f[E];switch(E){case rC:return function(){return new r(this,E)};case w7:return function(){return new r(this,E)};case nC:return function(){return new r(this,E)}}return function(){return new r(this)}},h=t+" Iterator",d=!1,f=e.prototype,Q=f[x7]||f["@@iterator"]||i&&f[i],m=!oh&&Q||s(i),_=t==="Array"&&f.entries||Q,v,b,M;if(_&&(v=YS(_.call(new e)),v!==Object.prototype&&v.next&&(YS(v)!==eC&&(JS?JS(v,eC):Oot(v[x7])||Fg(v,x7,Dot)),Vot(v,h,!0))),Not&&i===w7&&Q&&Q.name!==w7&&(Bot?Pot(f,"name",w7):(d=!0,m=function(){return Aot(Q,this)})),i)if(b={values:s(w7),keys:o?m:s(rC),entries:s(nC)},a)for(M in b)(oh||d||!(M in f))&&Fg(f,M,b[M]);else Cot({target:t,proto:!0,forced:oh||d},b);return f[x7]!==m&&Fg(f,x7,m,{name:i}),Rot[t]=m,b},zg=function(e,t){return{value:e,done:t}},Fot=G0,Gg=Mit,iC=v7,oC=J9,jot=wa.f,zot=jg,ah=zg,Got=$2,aC="Array Iterator",Uot=oC.set,$ot=oC.getterFor(aC),Zot=zot(Array,"Array",function(e,t){Uot(this,{type:aC,target:Fot(e),index:0,kind:t})},function(){var e=$ot(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,ah(void 0,!0);switch(e.kind){case"keys":return ah(r,!1);case"values":return ah(t[r],!1)}return ah([r,t[r]],!1)},"values"),sC=iC.Arguments=iC.Array;if(Gg("keys"),Gg("values"),Gg("entries"),Got&&sC.name!=="values")try{jot(sC,"name",{value:"values"})}catch{}var Wot=d2,qot=Wot("toStringTag"),lC={};lC[qot]="z";var Ug=String(lC)==="[object z]",Xot=Ug,Kot=D1,sh=Q7,Yot=d2,Jot=Yot("toStringTag"),t2t=Object,e2t=sh(function(){return arguments}())==="Arguments",r2t=function(e,t){try{return e[t]}catch{}},$g=Xot?sh:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=r2t(t=t2t(e),Jot))=="string"?r:e2t?sh(t):(n=sh(t))==="Object"&&Kot(t.callee)?"Arguments":n},n2t=Ug,i2t=$g,o2t=n2t?{}.toString:function(){return"[object "+i2t(this)+"]"},a2t=Ug,s2t=Z0,l2t=o2t;a2t||s2t(Object.prototype,"toString",l2t,{unsafe:!0});var cC={exports:{}},uC={},c2t=w1,u2t=c2t([].slice),h2t=Q7,d2t=G0,hC=rh.f,p2t=u2t,dC=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],T2t=function(e){try{return hC(e)}catch{return p2t(dC)}};uC.f=function(e){return dC&&h2t(e)==="Window"?T2t(e):hC(d2t(e))};var f2t=ro,Q2t=f2t(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),m2t=ro,g2t=p2,y2t=Q7,pC=Q2t,lh=Object.isExtensible,_2t=m2t(function(){lh(1)}),v2t=_2t||pC?function(e){return!g2t(e)||pC&&y2t(e)==="ArrayBuffer"?!1:lh?lh(e):!0}:lh,b2t=ro,L2t=!b2t(function(){return Object.isExtensible(Object.preventExtensions({}))}),x2t=Ma,w2t=w1,E2t=Z9,M2t=p2,Zg=xa,H2t=wa.f,TC=rh,S2t=uC,Wg=v2t,C2t=eg,A2t=L2t,fC=!1,Ps=C2t("meta"),O2t=0,qg=function(e){H2t(e,Ps,{value:{objectID:"O"+O2t++,weakData:{}}})},k2t=function(e,t){if(!M2t(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!Zg(e,Ps)){if(!Wg(e))return"F";if(!t)return"E";qg(e)}return e[Ps].objectID},V2t=function(e,t){if(!Zg(e,Ps)){if(!Wg(e))return!0;if(!t)return!1;qg(e)}return e[Ps].weakData},P2t=function(e){return A2t&&fC&&Wg(e)&&!Zg(e,Ps)&&qg(e),e},I2t=function(){R2t.enable=function(){},fC=!0;var e=TC.f,t=w2t([].splice),r={};r[Ps]=1,e(r).length&&(TC.f=function(n){for(var i=e(n),o=0,a=i.length;o<a;o++)if(i[o]===Ps){t(i,o,1);break}return i},x2t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:S2t.f}))},R2t=cC.exports={enable:I2t,fastKey:k2t,getWeakData:V2t,onFreeze:P2t};E2t[Ps]=!0;var QC=cC.exports,N2t=Q7,B2t=w1,D2t=function(e){if(N2t(e)==="Function")return B2t(e)},mC=D2t,F2t=_7,j2t=Xm,z2t=mC(mC.bind),gC=function(e,t){return F2t(e),t===void 0?e:j2t?z2t(e,t):function(){return e.apply(t,arguments)}},G2t=d2,U2t=v7,$2t=G2t("iterator"),Z2t=Array.prototype,W2t=function(e){return e!==void 0&&(U2t.Array===e||Z2t[$2t]===e)},q2t=$g,yC=ug,X2t=m7,K2t=v7,Y2t=d2,J2t=Y2t("iterator"),_C=function(e){if(!X2t(e))return yC(e,J2t)||yC(e,"@@iterator")||K2t[q2t(e)]},tat=Vs,eat=_7,rat=G3,nat=cg,iat=_C,oat=TypeError,aat=function(e,t){var r=arguments.length<2?iat(e):t;if(eat(r))return rat(tat(r,e));throw new oat(nat(e)+" is not iterable")},sat=Vs,vC=G3,lat=ug,Xg=function(e,t,r){var n,i;vC(e);try{if(n=lat(e,"return"),!n){if(t==="throw")throw r;return r}n=sat(n,e)}catch(o){i=!0,n=o}if(t==="throw")throw r;if(i)throw n;return vC(n),r},cat=gC,uat=Vs,hat=G3,dat=cg,pat=W2t,Tat=QS,bC=lg,fat=aat,Qat=_C,LC=Xg,mat=TypeError,ch=function(e,t){this.stopped=e,this.result=t},xC=ch.prototype,wC=function(e,t,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),o=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),h=cat(t,n),d,f,Q,m,_,v,b,M=function(O){return d&&LC(d,"normal",O),new ch(!0,O)},E=function(O){return i?(hat(O),s?h(O[0],O[1],M):h(O[0],O[1])):s?h(O,M):h(O)};if(o)d=e.iterator;else if(a)d=e;else{if(f=Qat(e),!f)throw new mat(dat(e)+" is not iterable");if(pat(f)){for(Q=0,m=Tat(e);m>Q;Q++)if(_=E(e[Q]),_&&bC(xC,_))return _;return new ch(!1)}d=fat(e,f)}for(v=o?e.next:d.next;!(b=uat(v,d)).done;){try{_=E(b.value)}catch(O){LC(d,"throw",O)}if(typeof _=="object"&&_&&bC(xC,_))return _}return new ch(!1)},gat=lg,yat=TypeError,EC=function(e,t){if(gat(t,e))return e;throw new yat("Incorrect invocation")},_at=d2,MC=_at("iterator"),HC=!1;try{var vat=0,SC={next:function(){return{done:!!vat++}},return:function(){HC=!0}};SC[MC]=function(){return this},Array.from(SC,function(){throw 2})}catch{}var bat=function(e,t){try{if(!t&&!HC)return!1}catch{return!1}var r=!1;try{var n={};n[MC]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},Lat=D1,xat=p2,CC=XS,wat=function(e,t,r){var n,i;return CC&&Lat(n=t.constructor)&&n!==r&&xat(i=n.prototype)&&i!==r.prototype&&CC(e,i),e},Eat=Ma,Mat=Bo,Hat=w1,AC=jS,Sat=Z0,Cat=QC,Aat=wC,Oat=EC,kat=D1,Vat=m7,Kg=p2,Yg=ro,Pat=bat,Iat=ih,Rat=wat,Nat=function(e,t,r){var n=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=n?"set":"add",a=Mat[e],s=a&&a.prototype,h=a,d={},f=function(E){var O=Hat(s[E]);Sat(s,E,E==="add"?function(V){return O(this,V===0?0:V),this}:E==="delete"?function(V){return i&&!Kg(V)?!1:O(this,V===0?0:V)}:E==="get"?function(V){return i&&!Kg(V)?void 0:O(this,V===0?0:V)}:E==="has"?function(V){return i&&!Kg(V)?!1:O(this,V===0?0:V)}:function(V,N){return O(this,V===0?0:V,N),this})},Q=AC(e,!kat(a)||!(i||s.forEach&&!Yg(function(){new a().entries().next()})));if(Q)h=r.getConstructor(t,e,n,o),Cat.enable();else if(AC(e,!0)){var m=new h,_=m[o](i?{}:-0,1)!==m,v=Yg(function(){m.has(1)}),b=Pat(function(E){new a(E)}),M=!i&&Yg(function(){for(var E=new a,O=5;O--;)E[o](O,O);return!E.has(-0)});b||(h=t(function(E,O){Oat(E,s);var V=Rat(new a,E,h);return Vat(O)||Aat(O,V[o],{that:V,AS_ENTRIES:n}),V}),h.prototype=s,s.constructor=h),(v||M)&&(f("delete"),f("has"),n&&f("get")),(M||_)&&f(o),i&&s.clear&&delete s.clear}return d[e]=h,Eat({global:!0,constructor:!0,forced:h!==a},d),Iat(h,e),i||r.setStrong(h,e,n),h},OC=BS,Bat=wa,kC=function(e,t,r){return r.get&&OC(r.get,t,{getter:!0}),r.set&&OC(r.set,t,{setter:!0}),Bat.f(e,t,r)},Dat=Z0,Fat=function(e,t,r){for(var n in t)Dat(e,n,t[n],r);return e},jat=y7,zat=kC,Gat=d2,Uat=$2,VC=Gat("species"),$at=function(e){var t=jat(e);Uat&&t&&!t[VC]&&zat(t,VC,{configurable:!0,get:function(){return this}})},PC=xg,Zat=kC,IC=Fat,Wat=gC,qat=EC,Xat=m7,Kat=wC,Yat=jg,RC=zg,Jat=$at,E7=$2,NC=QC.fastKey,BC=J9,DC=BC.set,Jg=BC.getterFor,tst={getConstructor:function(e,t,r,n){var i=e(function(d,f){qat(d,o),DC(d,{type:t,index:PC(null),first:void 0,last:void 0,size:0}),E7||(d.size=0),Xat(f)||Kat(f,d[n],{that:d,AS_ENTRIES:r})}),o=i.prototype,a=Jg(t),s=function(d,f,Q){var m=a(d),_=h(d,f),v,b;return _?_.value=Q:(m.last=_={index:b=NC(f,!0),key:f,value:Q,previous:v=m.last,next:void 0,removed:!1},m.first||(m.first=_),v&&(v.next=_),E7?m.size++:d.size++,b!=="F"&&(m.index[b]=_)),d},h=function(d,f){var Q=a(d),m=NC(f),_;if(m!=="F")return Q.index[m];for(_=Q.first;_;_=_.next)if(_.key===f)return _};return IC(o,{clear:function(){for(var d=this,f=a(d),Q=f.first;Q;)Q.removed=!0,Q.previous&&(Q.previous=Q.previous.next=void 0),Q=Q.next;f.first=f.last=void 0,f.index=PC(null),E7?f.size=0:d.size=0},delete:function(d){var f=this,Q=a(f),m=h(f,d);if(m){var _=m.next,v=m.previous;delete Q.index[m.index],m.removed=!0,v&&(v.next=_),_&&(_.previous=v),Q.first===m&&(Q.first=_),Q.last===m&&(Q.last=v),E7?Q.size--:f.size--}return!!m},forEach:function(d){for(var f=a(this),Q=Wat(d,arguments.length>1?arguments[1]:void 0),m;m=m?m.next:f.first;)for(Q(m.value,m.key,this);m&&m.removed;)m=m.previous},has:function(d){return!!h(this,d)}}),IC(o,r?{get:function(d){var f=h(this,d);return f&&f.value},set:function(d,f){return s(this,d===0?0:d,f)}}:{add:function(d){return s(this,d=d===0?0:d,d)}}),E7&&Zat(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=Jg(t),o=Jg(n);Yat(e,t,function(a,s){DC(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,h=a.last;h&&h.removed;)h=h.previous;return!a.target||!(a.last=h=h?h.next:a.state.first)?(a.target=void 0,RC(void 0,!0)):RC(s==="keys"?h.key:s==="values"?h.value:[h.key,h.value],!1)},r?"entries":"values",!r,!0),Jat(t)}},est=Nat,rst=tst;est("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},rst);var ty=w1,uh=Set.prototype,Ha={Set,add:ty(uh.add),has:ty(uh.has),remove:ty(uh.delete),proto:uh},nst=Ha.has,i6=function(e){return nst(e),e},ist=Vs,o6=function(e,t,r){for(var n=r?e:e.iterator,i=e.next,o,a;!(o=ist(i,n)).done;)if(a=t(o.value),a!==void 0)return a},FC=w1,ost=o6,jC=Ha,ast=jC.Set,zC=jC.proto,sst=FC(zC.forEach),GC=FC(zC.keys),lst=GC(new ast).next,M7=function(e,t,r){return r?ost({iterator:GC(e),next:lst},t):sst(e,t)},UC=Ha,cst=M7,ust=UC.Set,hst=UC.add,ey=function(e){var t=new ust;return cst(e,function(r){hst(t,r)}),t},dst=qS,pst=Ha,H7=dst(pst.proto,"size","get")||function(e){return e.size},Tst=function(e){return{iterator:e,next:e.next,done:!1}},$C=_7,ZC=G3,WC=Vs,fst=$9,Qst=Tst,qC="Invalid size",mst=RangeError,gst=TypeError,yst=Math.max,XC=function(e,t){this.set=e,this.size=yst(t,0),this.has=$C(e.has),this.keys=$C(e.keys)};XC.prototype={getIterator:function(){return Qst(ZC(WC(this.keys,this.set)))},includes:function(e){return WC(this.has,this.set,e)}};var a6=function(e){ZC(e);var t=+e.size;if(t!==t)throw new gst(qC);var r=fst(t);if(r<0)throw new mst(qC);return new XC(e,r)},_st=i6,KC=Ha,vst=ey,bst=H7,Lst=a6,xst=M7,wst=o6,Est=KC.has,YC=KC.remove,Mst=function(e){var t=_st(this),r=Lst(e),n=vst(t);return bst(t)<=r.size?xst(t,function(i){r.includes(i)&&YC(n,i)}):wst(r.getIterator(),function(i){Est(t,i)&&YC(n,i)}),n},Hst=y7,JC=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},s6=function(e){var t=Hst("Set");try{new t()[e](JC(0));try{return new t()[e](JC(-1)),!1}catch{return!0}}catch{return!1}},Sst=Ma,Cst=Mst,Ast=s6;Sst({target:"Set",proto:!0,real:!0,forced:!Ast("difference")},{difference:Cst});var Ost=i6,ry=Ha,kst=H7,Vst=a6,Pst=M7,Ist=o6,Rst=ry.Set,tA=ry.add,Nst=ry.has,Bst=function(e){var t=Ost(this),r=Vst(e),n=new Rst;return kst(t)>r.size?Ist(r.getIterator(),function(i){Nst(t,i)&&tA(n,i)}):Pst(t,function(i){r.includes(i)&&tA(n,i)}),n},Dst=Ma,Fst=ro,jst=Bst,zst=s6,Gst=!zst("intersection")||Fst(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});Dst({target:"Set",proto:!0,real:!0,forced:Gst},{intersection:jst});var Ust=i6,$st=Ha.has,Zst=H7,Wst=a6,qst=M7,Xst=o6,Kst=Xg,Yst=function(e){var t=Ust(this),r=Wst(e);if(Zst(t)<=r.size)return qst(t,function(i){if(r.includes(i))return!1},!0)!==!1;var n=r.getIterator();return Xst(n,function(i){if($st(t,i))return Kst(n,"normal",!1)})!==!1},Jst=Ma,t3t=Yst,e3t=s6;Jst({target:"Set",proto:!0,real:!0,forced:!e3t("isDisjointFrom")},{isDisjointFrom:t3t});var r3t=i6,n3t=H7,i3t=M7,o3t=a6,a3t=function(e){var t=r3t(this),r=o3t(e);return n3t(t)>r.size?!1:i3t(t,function(n){if(!r.includes(n))return!1},!0)!==!1},s3t=Ma,l3t=a3t,c3t=s6;s3t({target:"Set",proto:!0,real:!0,forced:!c3t("isSubsetOf")},{isSubsetOf:l3t});var u3t=i6,h3t=Ha.has,d3t=H7,p3t=a6,T3t=o6,f3t=Xg,Q3t=function(e){var t=u3t(this),r=p3t(e);if(d3t(t)<r.size)return!1;var n=r.getIterator();return T3t(n,function(i){if(!h3t(t,i))return f3t(n,"normal",!1)})!==!1},m3t=Ma,g3t=Q3t,y3t=s6;m3t({target:"Set",proto:!0,real:!0,forced:!y3t("isSupersetOf")},{isSupersetOf:g3t});var _3t=i6,ny=Ha,v3t=ey,b3t=a6,L3t=o6,x3t=ny.add,w3t=ny.has,E3t=ny.remove,M3t=function(e){var t=_3t(this),r=b3t(e).getIterator(),n=v3t(t);return L3t(r,function(i){w3t(t,i)?E3t(n,i):x3t(n,i)}),n},H3t=Ma,S3t=M3t,C3t=s6;H3t({target:"Set",proto:!0,real:!0,forced:!C3t("symmetricDifference")},{symmetricDifference:S3t});var A3t=i6,O3t=Ha.add,k3t=ey,V3t=a6,P3t=o6,I3t=function(e){var t=A3t(this),r=V3t(e).getIterator(),n=k3t(t);return P3t(r,function(i){O3t(n,i)}),n},R3t=Ma,N3t=I3t,B3t=s6;R3t({target:"Set",proto:!0,real:!0,forced:!B3t("union")},{union:N3t});var D3t=$g,F3t=String,eA=function(e){if(D3t(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return F3t(e)},iy=w1,j3t=$9,z3t=eA,G3t=j9,U3t=iy("".charAt),rA=iy("".charCodeAt),$3t=iy("".slice),nA=function(e){return function(t,r){var n=z3t(G3t(t)),i=j3t(r),o=n.length,a,s;return i<0||i>=o?e?"":void 0:(a=rA(n,i),a<55296||a>56319||i+1===o||(s=rA(n,i+1))<56320||s>57343?e?U3t(n,i):a:e?$3t(n,i,i+2):(a-55296<<10)+(s-56320)+65536)}},Z3t={codeAt:nA(!1),charAt:nA(!0)},W3t=Z3t.charAt,q3t=eA,iA=J9,X3t=jg,oA=zg,aA="String Iterator",K3t=iA.set,Y3t=iA.getterFor(aA);X3t(String,"String",function(e){K3t(this,{type:aA,string:q3t(e),index:0})},function(){var e=Y3t(this),t=e.string,r=e.index,n;return r>=t.length?oA(void 0,!0):(n=W3t(t,r),e.index+=n.length,oA(n,!1))});var J3t=Bo,t4t=J3t,e4t=t4t,r4t=e4t.Set,n4t={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},i4t=ag,oy=i4t("span").classList,sA=oy&&oy.constructor&&oy.constructor.prototype,o4t=sA===Object.prototype?void 0:sA,lA=Bo,cA=n4t,a4t=o4t,S7=Zot,uA=X9,s4t=ih,l4t=d2,ay=l4t("iterator"),sy=S7.values,hA=function(e,t){if(e){if(e[ay]!==sy)try{uA(e,ay,sy)}catch{e[ay]=sy}if(s4t(e,t,!0),cA[t]){for(var r in S7)if(e[r]!==S7[r])try{uA(e,r,S7[r])}catch{e[r]=S7[r]}}}};for(var ly in cA)hA(lA[ly]&&lA[ly].prototype,ly);hA(a4t,"DOMTokenList");var c4t=r4t,u4t=c4t,h4t=u4t,d4t=h4t;const C7=z3(d4t);var dA={exports:{}};/**
|
|
34
34
|
* MapLibre GL JS
|
|
35
35
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.3.2/LICENSE.txt
|
|
36
36
|
*/(function(e,t){(function(r,n){e.exports=n()})(I,function(){var r={},n={};function i(a,s,h){if(n[a]=h,a==="index"){var d="var sharedModule = {}; ("+n.shared+")(sharedModule); ("+n.worker+")(sharedModule);",f={};return n.shared(f),n.index(r,f),typeof window<"u"&&r.setWorkerUrl(window.URL.createObjectURL(new Blob([d],{type:"text/javascript"}))),r}}i("shared",["exports"],function(a){function s(u,l,T,y){return new(T||(T=Promise))(function(x,S){function A(U){try{B(y.next(U))}catch(q){S(q)}}function k(U){try{B(y.throw(U))}catch(q){S(q)}}function B(U){var q;U.done?x(U.value):(q=U.value,q instanceof T?q:new T(function(K){K(q)})).then(A,k)}B((y=y.apply(u,l||[])).next())})}function h(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}typeof SuppressedError=="function"&&SuppressedError;var d=f;function f(u,l){this.x=u,this.y=l}f.prototype={clone:function(){return new f(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,l){return this.clone()._rotateAround(u,l)},matMult:function(u){return this.clone()._matMult(u)},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(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var l=u.x-this.x,T=u.y-this.y;return l*l+T*T},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,l){return Math.atan2(this.x*l-this.y*u,this.x*u+this.y*l)},_matMult:function(u){var l=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=l,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var l=Math.cos(u),T=Math.sin(u),y=T*this.x+l*this.y;return this.x=l*this.x-T*this.y,this.y=y,this},_rotateAround:function(u,l){var T=Math.cos(u),y=Math.sin(u),x=l.y+y*(this.x-l.x)+T*(this.y-l.y);return this.x=l.x+T*(this.x-l.x)-y*(this.y-l.y),this.y=x,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},f.convert=function(u){return u instanceof f?u:Array.isArray(u)?new f(u[0],u[1]):u};var Q=h(d),m=_;function _(u,l,T,y){this.cx=3*u,this.bx=3*(T-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(y-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=l,this.p2x=T,this.p2y=y}_.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,l){if(l===void 0&&(l=1e-6),u<0)return 0;if(u>1)return 1;for(var T=u,y=0;y<8;y++){var x=this.sampleCurveX(T)-u;if(Math.abs(x)<l)return T;var S=this.sampleCurveDerivativeX(T);if(Math.abs(S)<1e-6)break;T-=x/S}var A=0,k=1;for(T=u,y=0;y<20&&(x=this.sampleCurveX(T),!(Math.abs(x-u)<l));y++)u>x?A=T:k=T,T=.5*(k-A)+A;return T},solve:function(u,l){return this.sampleCurveY(this.solveCurveX(u,l))}};var v=h(m);let b,M;function E(){return b==null&&(b=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),b}function O(){if(M==null&&(M=!1,E())){const u=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(u){for(let T=0;T<5*5;T++){const y=4*T;u.fillStyle=`rgb(${y},${y+1},${y+2})`,u.fillRect(T%5,Math.floor(T/5),1,1)}const l=u.getImageData(0,0,5,5).data;for(let T=0;T<5*5*4;T++)if(T%4!=3&&l[T]!==T){M=!0;break}}}return M||!1}function V(u,l,T,y){const x=new v(u,l,T,y);return S=>x.solve(S)}const N=V(.25,.1,.25,1);function j(u,l,T){return Math.min(T,Math.max(l,u))}function $(u,l,T){const y=T-l,x=((u-l)%y+y)%y+l;return x===l?T:x}function G(u,...l){for(const T of l)for(const y in T)u[y]=T[y];return u}let J=1;function tt(u,l,T){const y={};for(const x in u)y[x]=l.call(this,u[x],x,u);return y}function at(u,l,T){const y={};for(const x in u)l.call(this,u[x],x,u)&&(y[x]=u[x]);return y}function rt(u){return Array.isArray(u)?u.map(rt):typeof u=="object"&&u?tt(u,rt):u}const Qt={};function Ct(u){Qt[u]||(typeof console<"u"&&console.warn(u),Qt[u]=!0)}function Ut(u,l,T){return(T.y-u.y)*(l.x-u.x)>(l.y-u.y)*(T.x-u.x)}function ee(u){return typeof WorkerGlobalScope<"u"&&u!==void 0&&u instanceof WorkerGlobalScope}let he=null;function Gt(u){return typeof ImageBitmap<"u"&&u instanceof ImageBitmap}const fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function hr(u,l,T,y,x){return s(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const S=new VideoFrame(u,{timestamp:0});try{const A=S==null?void 0:S.format;if(!A||!A.startsWith("BGR")&&!A.startsWith("RGB"))throw new Error(`Unrecognized format ${A}`);const k=A.startsWith("BGR"),B=new Uint8ClampedArray(y*x*4);if(yield S.copyTo(B,function(U,q,K,nt,lt){const ht=4*Math.max(-q,0),ft=(Math.max(0,K)-K)*nt*4+ht,vt=4*nt,wt=Math.max(0,q),Dt=Math.max(0,K);return{rect:{x:wt,y:Dt,width:Math.min(U.width,q+nt)-wt,height:Math.min(U.height,K+lt)-Dt},layout:[{offset:ft,stride:vt}]}}(u,l,T,y,x)),k)for(let U=0;U<B.length;U+=4){const q=B[U];B[U]=B[U+2],B[U+2]=q}return B}finally{S.close()}})}let Xt,le;const me="AbortError";function ve(){return new Error(me)}const $e={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function je(u){return $e.REGISTERED_PROTOCOLS[u.substring(0,u.indexOf("://"))]}const Re="global-dispatcher";class jt extends Error{constructor(l,T,y,x){super(`AJAXError: ${T} (${l}): ${y}`),this.status=l,this.statusText=T,this.url=y,this.body=x}}const Kt=()=>ee(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,ue=function(u,l){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const y=je(u.url);if(y)return y(u,l);if(ee(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,targetMapId:Re},l)}if(!(/^file:/.test(T=u.url)||/^file:/.test(Kt())&&!/^\w+:/.test(T))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(y,x){return s(this,void 0,void 0,function*(){const S=new Request(y.url,{method:y.method||"GET",body:y.body,credentials:y.credentials,headers:y.headers,cache:y.cache,referrer:Kt(),signal:x.signal});y.type==="json"&&S.headers.set("Accept","application/json");const A=yield fetch(S);if(!A.ok){const U=yield A.blob();throw new jt(A.status,A.statusText,y.url,U)}let k;k=y.type==="arrayBuffer"||y.type==="image"?A.arrayBuffer():y.type==="json"?A.json():A.text();const B=yield k;if(x.signal.aborted)throw ve();return{data:B,cacheControl:A.headers.get("Cache-Control"),expires:A.headers.get("Expires")}})}(u,l);if(ee(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,mustQueue:!0,targetMapId:Re},l)}var T;return function(y,x){return new Promise((S,A)=>{const k=new XMLHttpRequest;k.open(y.method||"GET",y.url,!0),y.type!=="arrayBuffer"&&y.type!=="image"||(k.responseType="arraybuffer");for(const B in y.headers)k.setRequestHeader(B,y.headers[B]);y.type==="json"&&(k.responseType="text",k.setRequestHeader("Accept","application/json")),k.withCredentials=y.credentials==="include",k.onerror=()=>{A(new Error(k.statusText))},k.onload=()=>{if(!x.signal.aborted)if((k.status>=200&&k.status<300||k.status===0)&&k.response!==null){let B=k.response;if(y.type==="json")try{B=JSON.parse(k.response)}catch(U){return void A(U)}S({data:B,cacheControl:k.getResponseHeader("Cache-Control"),expires:k.getResponseHeader("Expires")})}else{const B=new Blob([k.response],{type:k.getResponseHeader("Content-Type")});A(new jt(k.status,k.statusText,y.url,B))}},x.signal.addEventListener("abort",()=>{k.abort(),A(ve())}),k.send(y.body)})}(u,l)};function $t(u){if(!u||u.indexOf("://")<=0||u.indexOf("data:image/")===0||u.indexOf("blob:")===0)return!0;const l=new URL(u),T=window.location;return l.protocol===T.protocol&&l.host===T.host}function de(u,l,T){T[u]&&T[u].indexOf(l)!==-1||(T[u]=T[u]||[],T[u].push(l))}function Ae(u,l,T){if(T&&T[u]){const y=T[u].indexOf(l);y!==-1&&T[u].splice(y,1)}}class Me{constructor(l,T={}){G(this,T),this.type=l}}class Le extends Me{constructor(l,T={}){super("error",G({error:l},T))}}class Ke{on(l,T){return this._listeners=this._listeners||{},de(l,T,this._listeners),this}off(l,T){return Ae(l,T,this._listeners),Ae(l,T,this._oneTimeListeners),this}once(l,T){return T?(this._oneTimeListeners=this._oneTimeListeners||{},de(l,T,this._oneTimeListeners),this):new Promise(y=>this.once(l,y))}fire(l,T){typeof l=="string"&&(l=new Me(l,T||{}));const y=l.type;if(this.listens(y)){l.target=this;const x=this._listeners&&this._listeners[y]?this._listeners[y].slice():[];for(const k of x)k.call(this,l);const S=this._oneTimeListeners&&this._oneTimeListeners[y]?this._oneTimeListeners[y].slice():[];for(const k of S)Ae(y,k,this._oneTimeListeners),k.call(this,l);const A=this._eventedParent;A&&(G(l,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),A.fire(l))}else l instanceof Le&&console.error(l.error);return this}listens(l){return this._listeners&&this._listeners[l]&&this._listeners[l].length>0||this._oneTimeListeners&&this._oneTimeListeners[l]&&this._oneTimeListeners[l].length>0||this._eventedParent&&this._eventedParent.listens(l)}setEventedParent(l,T){return this._eventedParent=l,this._eventedParentData=T,this}}var Ot={$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"},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},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-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}},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 Dr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Gr(u,l){const T={};for(const y in u)y!=="ref"&&(T[y]=u[y]);return Dr.forEach(y=>{y in l&&(T[y]=l[y])}),T}function _r(u,l){if(Array.isArray(u)){if(!Array.isArray(l)||u.length!==l.length)return!1;for(let T=0;T<u.length;T++)if(!_r(u[T],l[T]))return!1;return!0}if(typeof u=="object"&&u!==null&&l!==null){if(typeof l!="object"||Object.keys(u).length!==Object.keys(l).length)return!1;for(const T in u)if(!_r(u[T],l[T]))return!1;return!0}return u===l}function gr(u,l){u.push(l)}function zr(u,l,T){gr(T,{command:"addSource",args:[u,l[u]]})}function mi(u,l,T){gr(l,{command:"removeSource",args:[u]}),T[u]=!0}function zi(u,l,T,y){mi(u,T,y),zr(u,l,T)}function Rn(u,l,T){let y;for(y in u[T])if(Object.prototype.hasOwnProperty.call(u[T],y)&&y!=="data"&&!_r(u[T][y],l[T][y]))return!1;for(y in l[T])if(Object.prototype.hasOwnProperty.call(l[T],y)&&y!=="data"&&!_r(u[T][y],l[T][y]))return!1;return!0}function Te(u,l,T,y,x,S){u=u||{},l=l||{};for(const A in u)Object.prototype.hasOwnProperty.call(u,A)&&(_r(u[A],l[A])||T.push({command:S,args:[y,A,l[A],x]}));for(const A in l)Object.prototype.hasOwnProperty.call(l,A)&&!Object.prototype.hasOwnProperty.call(u,A)&&(_r(u[A],l[A])||T.push({command:S,args:[y,A,l[A],x]}))}function pr(u){return u.id}function Yr(u,l){return u[l.id]=l,u}class pe{constructor(l,T,y,x){this.message=(l?`${l}: `:"")+y,x&&(this.identifier=x),T!=null&&T.__line__&&(this.line=T.__line__)}}function En(u,...l){for(const T of l)for(const y in T)u[y]=T[y];return u}class Nn extends Error{constructor(l,T){super(T),this.message=T,this.key=l}}class gi{constructor(l,T=[]){this.parent=l,this.bindings={};for(const[y,x]of T)this.bindings[y]=x}concat(l){return new gi(this,l)}get(l){if(this.bindings[l])return this.bindings[l];if(this.parent)return this.parent.get(l);throw new Error(`${l} not found in scope.`)}has(l){return!!this.bindings[l]||!!this.parent&&this.parent.has(l)}}const Gi={kind:"null"},ge={kind:"number"},Sr={kind:"string"},vr={kind:"boolean"},Bn={kind:"color"},yi={kind:"object"},Tr={kind:"value"},ni={kind:"collator"},h1={kind:"formatted"},yn={kind:"padding"},yt={kind:"resolvedImage"},ot={kind:"variableAnchorOffsetCollection"};function st(u,l){return{kind:"array",itemType:u,N:l}}function ut(u){if(u.kind==="array"){const l=ut(u.itemType);return typeof u.N=="number"?`array<${l}, ${u.N}>`:u.itemType.kind==="value"?"array":`array<${l}>`}return u.kind}const bt=[Gi,ge,Sr,vr,Bn,h1,yi,st(Tr),yn,yt,ot];function Ht(u,l){if(l.kind==="error")return null;if(u.kind==="array"){if(l.kind==="array"&&(l.N===0&&l.itemType.kind==="value"||!Ht(u.itemType,l.itemType))&&(typeof u.N!="number"||u.N===l.N))return null}else{if(u.kind===l.kind)return null;if(u.kind==="value"){for(const T of bt)if(!Ht(T,l))return null}}return`Expected ${ut(u)} but found ${ut(l)} instead.`}function Pt(u,l){return l.some(T=>T.kind===u.kind)}function It(u,l){return l.some(T=>T==="null"?u===null:T==="array"?Array.isArray(u):T==="object"?u&&!Array.isArray(u)&&typeof u=="object":T===typeof u)}function Mt(u,l){return u.kind==="array"&&l.kind==="array"?u.itemType.kind===l.itemType.kind&&typeof u.N=="number":u.kind===l.kind}const Ft=.96422,ie=.82521,Yt=4/29,te=6/29,Vt=3*te*te,Jt=te*te*te,De=Math.PI/180,Ge=180/Math.PI;function br(u){return(u%=360)<0&&(u+=360),u}function Ir([u,l,T,y]){let x,S;const A=on((.2225045*(u=qr(u))+.7168786*(l=qr(l))+.0606169*(T=qr(T)))/1);u===l&&l===T?x=S=A:(x=on((.4360747*u+.3850649*l+.1430804*T)/Ft),S=on((.0139322*u+.0971045*l+.7141733*T)/ie));const k=116*A-16;return[k<0?0:k,500*(x-A),200*(A-S),y]}function qr(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function on(u){return u>Jt?Math.pow(u,1/3):u/Vt+Yt}function Ze([u,l,T,y]){let x=(u+16)/116,S=isNaN(l)?x:x+l/500,A=isNaN(T)?x:x-T/200;return x=1*Mn(x),S=Ft*Mn(S),A=ie*Mn(A),[Zr(3.1338561*S-1.6168667*x-.4906146*A),Zr(-.9787684*S+1.9161415*x+.033454*A),Zr(.0719453*S-.2289914*x+1.4052427*A),y]}function Zr(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function Mn(u){return u>te?u*u*u:Vt*(u-Yt)}function ui(u){return parseInt(u.padEnd(2,u),16)/255}function _i(u,l){return Zn(l?u/100:u,0,1)}function Zn(u,l,T){return Math.min(Math.max(l,u),T)}function Co(u){return!u.some(Number.isNaN)}const J6={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 Ur{constructor(l,T,y,x=1,S=!0){this.r=l,this.g=T,this.b=y,this.a=x,S||(this.r*=x,this.g*=x,this.b*=x,x||this.overwriteGetter("rgb",[l,T,y,x]))}static parse(l){if(l instanceof Ur)return l;if(typeof l!="string")return;const T=function(y){if((y=y.toLowerCase().trim())==="transparent")return[0,0,0,0];const x=J6[y];if(x){const[A,k,B]=x;return[A/255,k/255,B/255,1]}if(y.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(y)){const A=y.length<6?1:2;let k=1;return[ui(y.slice(k,k+=A)),ui(y.slice(k,k+=A)),ui(y.slice(k,k+=A)),ui(y.slice(k,k+A)||"ff")]}if(y.startsWith("rgb")){const A=y.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(A){const[k,B,U,q,K,nt,lt,ht,ft,vt,wt,Dt]=A,St=[q||" ",lt||" ",vt].join("");if(St===" "||St===" /"||St===",,"||St===",,,"){const Nt=[U,nt,ft].join(""),ne=Nt==="%%%"?100:Nt===""?255:0;if(ne){const ae=[Zn(+B/ne,0,1),Zn(+K/ne,0,1),Zn(+ht/ne,0,1),wt?_i(+wt,Dt):1];if(Co(ae))return ae}}return}}const S=y.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(S){const[A,k,B,U,q,K,nt,lt,ht]=S,ft=[B||" ",q||" ",nt].join("");if(ft===" "||ft===" /"||ft===",,"||ft===",,,"){const vt=[+k,Zn(+U,0,100),Zn(+K,0,100),lt?_i(+lt,ht):1];if(Co(vt))return function([wt,Dt,St,Nt]){function ne(ae){const Be=(ae+wt/30)%12,er=Dt*Math.min(St,1-St);return St-er*Math.max(-1,Math.min(Be-3,9-Be,1))}return wt=br(wt),Dt/=100,St/=100,[ne(0),ne(8),ne(4),Nt]}(vt)}}}(l);return T?new Ur(...T,!1):void 0}get rgb(){const{r:l,g:T,b:y,a:x}=this,S=x||1/0;return this.overwriteGetter("rgb",[l/S,T/S,y/S,x])}get hcl(){return this.overwriteGetter("hcl",function(l){const[T,y,x,S]=Ir(l),A=Math.sqrt(y*y+x*x);return[Math.round(1e4*A)?br(Math.atan2(x,y)*Ge):NaN,A,T,S]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Ir(this.rgb))}overwriteGetter(l,T){return Object.defineProperty(this,l,{value:T}),T}toString(){const[l,T,y,x]=this.rgb;return`rgba(${[l,T,y].map(S=>Math.round(255*S)).join(",")},${x})`}}Ur.black=new Ur(0,0,0,1),Ur.white=new Ur(1,1,1,1),Ur.transparent=new Ur(0,0,0,0),Ur.red=new Ur(1,0,0,1);class Ei{constructor(l,T,y){this.sensitivity=l?T?"variant":"case":T?"accent":"base",this.locale=y,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(l,T){return this.collator.compare(l,T)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class U1{constructor(l,T,y,x,S){this.text=l,this.image=T,this.scale=y,this.fontStack=x,this.textColor=S}}class Fr{constructor(l){this.sections=l}static fromString(l){return new Fr([new U1(l,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(l=>l.text.length!==0||l.image&&l.image.name.length!==0)}static factory(l){return l instanceof Fr?l:Fr.fromString(l)}toString(){return this.sections.length===0?"":this.sections.map(l=>l.text).join("")}}class Hn{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof Hn)return l;if(typeof l=="number")return new Hn([l,l,l,l]);if(Array.isArray(l)&&!(l.length<1||l.length>4)){for(const T of l)if(typeof T!="number")return;switch(l.length){case 1:l=[l[0],l[0],l[0],l[0]];break;case 2:l=[l[0],l[1],l[0],l[1]];break;case 3:l=[l[0],l[1],l[2],l[1]]}return new Hn(l)}}toString(){return JSON.stringify(this.values)}}const $1=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Jr{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof Jr)return l;if(Array.isArray(l)&&!(l.length<1)&&l.length%2==0){for(let T=0;T<l.length;T+=2){const y=l[T],x=l[T+1];if(typeof y!="string"||!$1.has(y)||!Array.isArray(x)||x.length!==2||typeof x[0]!="number"||typeof x[1]!="number")return}return new Jr(l)}}toString(){return JSON.stringify(this.values)}}class an{constructor(l){this.name=l.name,this.available=l.available}toString(){return this.name}static fromString(l){return l?new an({name:l,available:!1}):null}}function M2(u,l,T,y){return typeof u=="number"&&u>=0&&u<=255&&typeof l=="number"&&l>=0&&l<=255&&typeof T=="number"&&T>=0&&T<=255?y===void 0||typeof y=="number"&&y>=0&&y<=1?null:`Invalid rgba value [${[u,l,T,y].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof y=="number"?[u,l,T,y]:[u,l,T]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Mi(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof Ur||u instanceof Ei||u instanceof Fr||u instanceof Hn||u instanceof Jr||u instanceof an)return!0;if(Array.isArray(u)){for(const l of u)if(!Mi(l))return!1;return!0}if(typeof u=="object"){for(const l in u)if(!Mi(u[l]))return!1;return!0}return!1}function sn(u){if(u===null)return Gi;if(typeof u=="string")return Sr;if(typeof u=="boolean")return vr;if(typeof u=="number")return ge;if(u instanceof Ur)return Bn;if(u instanceof Ei)return ni;if(u instanceof Fr)return h1;if(u instanceof Hn)return yn;if(u instanceof Jr)return ot;if(u instanceof an)return yt;if(Array.isArray(u)){const l=u.length;let T;for(const y of u){const x=sn(y);if(T){if(T===x)continue;T=Tr;break}T=x}return st(T||Tr,l)}return yi}function Hi(u){const l=typeof u;return u===null?"":l==="string"||l==="number"||l==="boolean"?String(u):u instanceof Ur||u instanceof Fr||u instanceof Hn||u instanceof Jr||u instanceof an?u.toString():JSON.stringify(u)}class Z1{constructor(l,T){this.type=l,this.value=T}static parse(l,T){if(l.length!==2)return T.error(`'literal' expression requires exactly one argument, but found ${l.length-1} instead.`);if(!Mi(l[1]))return T.error("invalid value");const y=l[1];let x=sn(y);const S=T.expectedType;return x.kind!=="array"||x.N!==0||!S||S.kind!=="array"||typeof S.N=="number"&&S.N!==0||(x=S),new Z1(x,y)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class _n{constructor(l){this.name="ExpressionEvaluationError",this.message=l}toJSON(){return this.message}}const co={string:Sr,number:ge,boolean:vr,object:yi};class Ui{constructor(l,T){this.type=l,this.args=T}static parse(l,T){if(l.length<2)return T.error("Expected at least one argument.");let y,x=1;const S=l[0];if(S==="array"){let k,B;if(l.length>2){const U=l[1];if(typeof U!="string"||!(U in co)||U==="object")return T.error('The item type argument of "array" must be one of string, number, boolean',1);k=co[U],x++}else k=Tr;if(l.length>3){if(l[2]!==null&&(typeof l[2]!="number"||l[2]<0||l[2]!==Math.floor(l[2])))return T.error('The length argument to "array" must be a positive integer literal',2);B=l[2],x++}y=st(k,B)}else{if(!co[S])throw new Error(`Types doesn't contain name = ${S}`);y=co[S]}const A=[];for(;x<l.length;x++){const k=T.parse(l[x],x,Tr);if(!k)return null;A.push(k)}return new Ui(y,A)}evaluate(l){for(let T=0;T<this.args.length;T++){const y=this.args[T].evaluate(l);if(!Ht(this.type,sn(y)))return y;if(T===this.args.length-1)throw new _n(`Expected value to be of type ${ut(this.type)}, but found ${ut(sn(y))} instead.`)}throw new Error}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const Ao={"to-boolean":vr,"to-color":Bn,"to-number":ge,"to-string":Sr};class $i{constructor(l,T){this.type=l,this.args=T}static parse(l,T){if(l.length<2)return T.error("Expected at least one argument.");const y=l[0];if(!Ao[y])throw new Error(`Can't parse ${y} as it is not part of the known types`);if((y==="to-boolean"||y==="to-string")&&l.length!==2)return T.error("Expected one argument.");const x=Ao[y],S=[];for(let A=1;A<l.length;A++){const k=T.parse(l[A],A,Tr);if(!k)return null;S.push(k)}return new $i(x,S)}evaluate(l){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(l);case"color":{let T,y;for(const x of this.args){if(T=x.evaluate(l),y=null,T instanceof Ur)return T;if(typeof T=="string"){const S=l.parseColor(T);if(S)return S}else if(Array.isArray(T)&&(y=T.length<3||T.length>4?`Invalid rbga value ${JSON.stringify(T)}: expected an array containing either three or four numeric values.`:M2(T[0],T[1],T[2],T[3]),!y))return new Ur(T[0]/255,T[1]/255,T[2]/255,T[3])}throw new _n(y||`Could not parse color from value '${typeof T=="string"?T:JSON.stringify(T)}'`)}case"padding":{let T;for(const y of this.args){T=y.evaluate(l);const x=Hn.parse(T);if(x)return x}throw new _n(`Could not parse padding from value '${typeof T=="string"?T:JSON.stringify(T)}'`)}case"variableAnchorOffsetCollection":{let T;for(const y of this.args){T=y.evaluate(l);const x=Jr.parse(T);if(x)return x}throw new _n(`Could not parse variableAnchorOffsetCollection from value '${typeof T=="string"?T:JSON.stringify(T)}'`)}case"number":{let T=null;for(const y of this.args){if(T=y.evaluate(l),T===null)return 0;const x=Number(T);if(!isNaN(x))return x}throw new _n(`Could not convert ${JSON.stringify(T)} to number.`)}case"formatted":return Fr.fromString(Hi(this.args[0].evaluate(l)));case"resolvedImage":return an.fromString(Hi(this.args[0].evaluate(l)));default:return Hi(this.args[0].evaluate(l))}}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const C1=["Unknown","Point","LineString","Polygon"];class H2{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"?C1[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(l){let T=this._parseColorCache[l];return T||(T=this._parseColorCache[l]=Ur.parse(l)),T}}class Wr{constructor(l,T,y=[],x,S=new gi,A=[]){this.registry=l,this.path=y,this.key=y.map(k=>`[${k}]`).join(""),this.scope=S,this.errors=A,this.expectedType=x,this._isConstant=T}parse(l,T,y,x,S={}){return T?this.concat(T,y,x)._parse(l,S):this._parse(l,S)}_parse(l,T){function y(x,S,A){return A==="assert"?new Ui(S,[x]):A==="coerce"?new $i(S,[x]):x}if(l!==null&&typeof l!="string"&&typeof l!="boolean"&&typeof l!="number"||(l=["literal",l]),Array.isArray(l)){if(l.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const x=l[0];if(typeof x!="string")return this.error(`Expression name must be a string, but found ${typeof x} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const S=this.registry[x];if(S){let A=S.parse(l,this);if(!A)return null;if(this.expectedType){const k=this.expectedType,B=A.type;if(k.kind!=="string"&&k.kind!=="number"&&k.kind!=="boolean"&&k.kind!=="object"&&k.kind!=="array"||B.kind!=="value")if(k.kind!=="color"&&k.kind!=="formatted"&&k.kind!=="resolvedImage"||B.kind!=="value"&&B.kind!=="string")if(k.kind!=="padding"||B.kind!=="value"&&B.kind!=="number"&&B.kind!=="array")if(k.kind!=="variableAnchorOffsetCollection"||B.kind!=="value"&&B.kind!=="array"){if(this.checkSubtype(k,B))return null}else A=y(A,k,T.typeAnnotation||"coerce");else A=y(A,k,T.typeAnnotation||"coerce");else A=y(A,k,T.typeAnnotation||"coerce");else A=y(A,k,T.typeAnnotation||"assert")}if(!(A instanceof Z1)&&A.type.kind!=="resolvedImage"&&this._isConstant(A)){const k=new H2;try{A=new Z1(A.type,A.evaluate(k))}catch(B){return this.error(B.message),null}}return A}return this.error(`Unknown expression "${x}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(l===void 0?"'undefined' value invalid. Use null instead.":typeof l=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof l} instead.`)}concat(l,T,y){const x=typeof l=="number"?this.path.concat(l):this.path,S=y?this.scope.concat(y):this.scope;return new Wr(this.registry,this._isConstant,x,T||null,S,this.errors)}error(l,...T){const y=`${this.key}${T.map(x=>`[${x}]`).join("")}`;this.errors.push(new Nn(y,l))}checkSubtype(l,T){const y=Ht(l,T);return y&&this.error(y),y}}class S2{constructor(l,T){this.type=T.type,this.bindings=[].concat(l),this.result=T}evaluate(l){return this.result.evaluate(l)}eachChild(l){for(const T of this.bindings)l(T[1]);l(this.result)}static parse(l,T){if(l.length<4)return T.error(`Expected at least 3 arguments, but found ${l.length-1} instead.`);const y=[];for(let S=1;S<l.length-1;S+=2){const A=l[S];if(typeof A!="string")return T.error(`Expected string, but found ${typeof A} instead.`,S);if(/[^a-zA-Z0-9_]/.test(A))return T.error("Variable names must contain only alphanumeric characters or '_'.",S);const k=T.parse(l[S+1],S+1);if(!k)return null;y.push([A,k])}const x=T.parse(l[l.length-1],l.length-1,T.expectedType,y);return x?new S2(y,x):null}outputDefined(){return this.result.outputDefined()}}class W1{constructor(l,T){this.type=T.type,this.name=l,this.boundExpression=T}static parse(l,T){if(l.length!==2||typeof l[1]!="string")return T.error("'var' expression requires exactly one string literal argument.");const y=l[1];return T.scope.has(y)?new W1(y,T.scope.get(y)):T.error(`Unknown variable "${y}". Make sure "${y}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(l){return this.boundExpression.evaluate(l)}eachChild(){}outputDefined(){return!1}}class P{constructor(l,T,y){this.type=l,this.index=T,this.input=y}static parse(l,T){if(l.length!==3)return T.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=T.parse(l[1],1,ge),x=T.parse(l[2],2,st(T.expectedType||Tr));return y&&x?new P(x.type.itemType,y,x):null}evaluate(l){const T=this.index.evaluate(l),y=this.input.evaluate(l);if(T<0)throw new _n(`Array index out of bounds: ${T} < 0.`);if(T>=y.length)throw new _n(`Array index out of bounds: ${T} > ${y.length-1}.`);if(T!==Math.floor(T))throw new _n(`Array index must be an integer, but found ${T} instead.`);return y[T]}eachChild(l){l(this.index),l(this.input)}outputDefined(){return!1}}class Z{constructor(l,T){this.type=vr,this.needle=l,this.haystack=T}static parse(l,T){if(l.length!==3)return T.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=T.parse(l[1],1,Tr),x=T.parse(l[2],2,Tr);return y&&x?Pt(y.type,[vr,Sr,ge,Gi,Tr])?new Z(y,x):T.error(`Expected first argument to be of type boolean, string, number or null, but found ${ut(y.type)} instead`):null}evaluate(l){const T=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!y)return!1;if(!It(T,["boolean","string","number","null"]))throw new _n(`Expected first argument to be of type boolean, string, number or null, but found ${ut(sn(T))} instead.`);if(!It(y,["string","array"]))throw new _n(`Expected second argument to be of type array or string, but found ${ut(sn(y))} instead.`);return y.indexOf(T)>=0}eachChild(l){l(this.needle),l(this.haystack)}outputDefined(){return!0}}class F{constructor(l,T,y){this.type=ge,this.needle=l,this.haystack=T,this.fromIndex=y}static parse(l,T){if(l.length<=2||l.length>=5)return T.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=T.parse(l[1],1,Tr),x=T.parse(l[2],2,Tr);if(!y||!x)return null;if(!Pt(y.type,[vr,Sr,ge,Gi,Tr]))return T.error(`Expected first argument to be of type boolean, string, number or null, but found ${ut(y.type)} instead`);if(l.length===4){const S=T.parse(l[3],3,ge);return S?new F(y,x,S):null}return new F(y,x)}evaluate(l){const T=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!It(T,["boolean","string","number","null"]))throw new _n(`Expected first argument to be of type boolean, string, number or null, but found ${ut(sn(T))} instead.`);if(!It(y,["string","array"]))throw new _n(`Expected second argument to be of type array or string, but found ${ut(sn(y))} instead.`);if(this.fromIndex){const x=this.fromIndex.evaluate(l);return y.indexOf(T,x)}return y.indexOf(T)}eachChild(l){l(this.needle),l(this.haystack),this.fromIndex&&l(this.fromIndex)}outputDefined(){return!1}}class X{constructor(l,T,y,x,S,A){this.inputType=l,this.type=T,this.input=y,this.cases=x,this.outputs=S,this.otherwise=A}static parse(l,T){if(l.length<5)return T.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if(l.length%2!=1)return T.error("Expected an even number of arguments.");let y,x;T.expectedType&&T.expectedType.kind!=="value"&&(x=T.expectedType);const S={},A=[];for(let U=2;U<l.length-1;U+=2){let q=l[U];const K=l[U+1];Array.isArray(q)||(q=[q]);const nt=T.concat(U);if(q.length===0)return nt.error("Expected at least one branch label.");for(const ht of q){if(typeof ht!="number"&&typeof ht!="string")return nt.error("Branch labels must be numbers or strings.");if(typeof ht=="number"&&Math.abs(ht)>Number.MAX_SAFE_INTEGER)return nt.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ht=="number"&&Math.floor(ht)!==ht)return nt.error("Numeric branch labels must be integer values.");if(y){if(nt.checkSubtype(y,sn(ht)))return null}else y=sn(ht);if(S[String(ht)]!==void 0)return nt.error("Branch labels must be unique.");S[String(ht)]=A.length}const lt=T.parse(K,U,x);if(!lt)return null;x=x||lt.type,A.push(lt)}const k=T.parse(l[1],1,Tr);if(!k)return null;const B=T.parse(l[l.length-1],l.length-1,x);return B?k.type.kind!=="value"&&T.concat(1).checkSubtype(y,k.type)?null:new X(y,x,k,S,A,B):null}evaluate(l){const T=this.input.evaluate(l);return(sn(T)===this.inputType&&this.outputs[this.cases[T]]||this.otherwise).evaluate(l)}eachChild(l){l(this.input),this.outputs.forEach(l),l(this.otherwise)}outputDefined(){return this.outputs.every(l=>l.outputDefined())&&this.otherwise.outputDefined()}}class it{constructor(l,T,y){this.type=l,this.branches=T,this.otherwise=y}static parse(l,T){if(l.length<4)return T.error(`Expected at least 3 arguments, but found only ${l.length-1}.`);if(l.length%2!=0)return T.error("Expected an odd number of arguments.");let y;T.expectedType&&T.expectedType.kind!=="value"&&(y=T.expectedType);const x=[];for(let A=1;A<l.length-1;A+=2){const k=T.parse(l[A],A,vr);if(!k)return null;const B=T.parse(l[A+1],A+1,y);if(!B)return null;x.push([k,B]),y=y||B.type}const S=T.parse(l[l.length-1],l.length-1,y);if(!S)return null;if(!y)throw new Error("Can't infer output type");return new it(y,x,S)}evaluate(l){for(const[T,y]of this.branches)if(T.evaluate(l))return y.evaluate(l);return this.otherwise.evaluate(l)}eachChild(l){for(const[T,y]of this.branches)l(T),l(y);l(this.otherwise)}outputDefined(){return this.branches.every(([l,T])=>T.outputDefined())&&this.otherwise.outputDefined()}}class pt{constructor(l,T,y,x){this.type=l,this.input=T,this.beginIndex=y,this.endIndex=x}static parse(l,T){if(l.length<=2||l.length>=5)return T.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=T.parse(l[1],1,Tr),x=T.parse(l[2],2,ge);if(!y||!x)return null;if(!Pt(y.type,[st(Tr),Sr,Tr]))return T.error(`Expected first argument to be of type array or string, but found ${ut(y.type)} instead`);if(l.length===4){const S=T.parse(l[3],3,ge);return S?new pt(y.type,y,x,S):null}return new pt(y.type,y,x)}evaluate(l){const T=this.input.evaluate(l),y=this.beginIndex.evaluate(l);if(!It(T,["string","array"]))throw new _n(`Expected first argument to be of type array or string, but found ${ut(sn(T))} instead.`);if(this.endIndex){const x=this.endIndex.evaluate(l);return T.slice(y,x)}return T.slice(y)}eachChild(l){l(this.input),l(this.beginIndex),this.endIndex&&l(this.endIndex)}outputDefined(){return!1}}function gt(u,l){const T=u.length-1;let y,x,S=0,A=T,k=0;for(;S<=A;)if(k=Math.floor((S+A)/2),y=u[k],x=u[k+1],y<=l){if(k===T||l<x)return k;S=k+1}else{if(!(y>l))throw new _n("Input is not a number.");A=k-1}return 0}class Wt{constructor(l,T,y){this.type=l,this.input=T,this.labels=[],this.outputs=[];for(const[x,S]of y)this.labels.push(x),this.outputs.push(S)}static parse(l,T){if(l.length-1<4)return T.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return T.error("Expected an even number of arguments.");const y=T.parse(l[1],1,ge);if(!y)return null;const x=[];let S=null;T.expectedType&&T.expectedType.kind!=="value"&&(S=T.expectedType);for(let A=1;A<l.length;A+=2){const k=A===1?-1/0:l[A],B=l[A+1],U=A,q=A+1;if(typeof k!="number")return T.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',U);if(x.length&&x[x.length-1][0]>=k)return T.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',U);const K=T.parse(B,q,S);if(!K)return null;S=S||K.type,x.push([k,K])}return new Wt(S,y,x)}evaluate(l){const T=this.labels,y=this.outputs;if(T.length===1)return y[0].evaluate(l);const x=this.input.evaluate(l);if(x<=T[0])return y[0].evaluate(l);const S=T.length;return x>=T[S-1]?y[S-1].evaluate(l):y[gt(T,x)].evaluate(l)}eachChild(l){l(this.input);for(const T of this.outputs)l(T)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function re(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Qe=we;function we(u,l,T,y){this.cx=3*u,this.bx=3*(T-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(y-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=l,this.p2x=T,this.p2y=y}we.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,l){if(l===void 0&&(l=1e-6),u<0)return 0;if(u>1)return 1;for(var T=u,y=0;y<8;y++){var x=this.sampleCurveX(T)-u;if(Math.abs(x)<l)return T;var S=this.sampleCurveDerivativeX(T);if(Math.abs(S)<1e-6)break;T-=x/S}var A=0,k=1;for(T=u,y=0;y<20&&(x=this.sampleCurveX(T),!(Math.abs(x-u)<l));y++)u>x?A=T:k=T,T=.5*(k-A)+A;return T},solve:function(u,l){return this.sampleCurveY(this.solveCurveX(u,l))}};var _e=re(Qe);function or(u,l,T){return u+T*(l-u)}function vn(u,l,T){return u.map((y,x)=>or(y,l[x],T))}const dr={number:or,color:function(u,l,T,y="rgb"){switch(y){case"rgb":{const[x,S,A,k]=vn(u.rgb,l.rgb,T);return new Ur(x,S,A,k,!1)}case"hcl":{const[x,S,A,k]=u.hcl,[B,U,q,K]=l.hcl;let nt,lt;if(isNaN(x)||isNaN(B))isNaN(x)?isNaN(B)?nt=NaN:(nt=B,A!==1&&A!==0||(lt=U)):(nt=x,q!==1&&q!==0||(lt=S));else{let Dt=B-x;B>x&&Dt>180?Dt-=360:B<x&&x-B>180&&(Dt+=360),nt=x+T*Dt}const[ht,ft,vt,wt]=function([Dt,St,Nt,ne]){return Dt=isNaN(Dt)?0:Dt*De,Ze([Nt,Math.cos(Dt)*St,Math.sin(Dt)*St,ne])}([nt,lt??or(S,U,T),or(A,q,T),or(k,K,T)]);return new Ur(ht,ft,vt,wt,!1)}case"lab":{const[x,S,A,k]=Ze(vn(u.lab,l.lab,T));return new Ur(x,S,A,k,!1)}}},array:vn,padding:function(u,l,T){return new Hn(vn(u.values,l.values,T))},variableAnchorOffsetCollection:function(u,l,T){const y=u.values,x=l.values;if(y.length!==x.length)throw new _n(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${l.toString()}`);const S=[];for(let A=0;A<y.length;A+=2){if(y[A]!==x[A])throw new _n(`Cannot interpolate values containing mismatched anchors. from[${A}]: ${y[A]}, to[${A}]: ${x[A]}`);S.push(y[A]);const[k,B]=y[A+1],[U,q]=x[A+1];S.push([or(k,U,T),or(B,q,T)])}return new Jr(S)}};class tn{constructor(l,T,y,x,S){this.type=l,this.operator=T,this.interpolation=y,this.input=x,this.labels=[],this.outputs=[];for(const[A,k]of S)this.labels.push(A),this.outputs.push(k)}static interpolationFactor(l,T,y,x){let S=0;if(l.name==="exponential")S=ce(T,l.base,y,x);else if(l.name==="linear")S=ce(T,1,y,x);else if(l.name==="cubic-bezier"){const A=l.controlPoints;S=new _e(A[0],A[1],A[2],A[3]).solve(ce(T,1,y,x))}return S}static parse(l,T){let[y,x,S,...A]=l;if(!Array.isArray(x)||x.length===0)return T.error("Expected an interpolation type expression.",1);if(x[0]==="linear")x={name:"linear"};else if(x[0]==="exponential"){const U=x[1];if(typeof U!="number")return T.error("Exponential interpolation requires a numeric base.",1,1);x={name:"exponential",base:U}}else{if(x[0]!=="cubic-bezier")return T.error(`Unknown interpolation type ${String(x[0])}`,1,0);{const U=x.slice(1);if(U.length!==4||U.some(q=>typeof q!="number"||q<0||q>1))return T.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);x={name:"cubic-bezier",controlPoints:U}}}if(l.length-1<4)return T.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return T.error("Expected an even number of arguments.");if(S=T.parse(S,2,ge),!S)return null;const k=[];let B=null;y==="interpolate-hcl"||y==="interpolate-lab"?B=Bn:T.expectedType&&T.expectedType.kind!=="value"&&(B=T.expectedType);for(let U=0;U<A.length;U+=2){const q=A[U],K=A[U+1],nt=U+3,lt=U+4;if(typeof q!="number")return T.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',nt);if(k.length&&k[k.length-1][0]>=q)return T.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',nt);const ht=T.parse(K,lt,B);if(!ht)return null;B=B||ht.type,k.push([q,ht])}return Mt(B,ge)||Mt(B,Bn)||Mt(B,yn)||Mt(B,ot)||Mt(B,st(ge))?new tn(B,y,x,S,k):T.error(`Type ${ut(B)} is not interpolatable.`)}evaluate(l){const T=this.labels,y=this.outputs;if(T.length===1)return y[0].evaluate(l);const x=this.input.evaluate(l);if(x<=T[0])return y[0].evaluate(l);const S=T.length;if(x>=T[S-1])return y[S-1].evaluate(l);const A=gt(T,x),k=tn.interpolationFactor(this.interpolation,x,T[A],T[A+1]),B=y[A].evaluate(l),U=y[A+1].evaluate(l);switch(this.operator){case"interpolate":return dr[this.type.kind](B,U,k);case"interpolate-hcl":return dr.color(B,U,k,"hcl");case"interpolate-lab":return dr.color(B,U,k,"lab")}}eachChild(l){l(this.input);for(const T of this.outputs)l(T)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function ce(u,l,T,y){const x=y-T,S=u-T;return x===0?0:l===1?S/x:(Math.pow(l,S)-1)/(Math.pow(l,x)-1)}class ir{constructor(l,T){this.type=l,this.args=T}static parse(l,T){if(l.length<2)return T.error("Expectected at least one argument.");let y=null;const x=T.expectedType;x&&x.kind!=="value"&&(y=x);const S=[];for(const k of l.slice(1)){const B=T.parse(k,1+S.length,y,void 0,{typeAnnotation:"omit"});if(!B)return null;y=y||B.type,S.push(B)}if(!y)throw new Error("No output type");const A=x&&S.some(k=>Ht(x,k.type));return new ir(A?Tr:y,S)}evaluate(l){let T,y=null,x=0;for(const S of this.args)if(x++,y=S.evaluate(l),y&&y instanceof an&&!y.available&&(T||(T=y.name),y=null,x===this.args.length&&(y=T)),y!==null)break;return y}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}function ln(u,l){return u==="=="||u==="!="?l.kind==="boolean"||l.kind==="string"||l.kind==="number"||l.kind==="null"||l.kind==="value":l.kind==="string"||l.kind==="number"||l.kind==="value"}function hi(u,l,T,y){return y.compare(l,T)===0}function Sn(u,l,T){const y=u!=="=="&&u!=="!=";return class Uj{constructor(S,A,k){this.type=vr,this.lhs=S,this.rhs=A,this.collator=k,this.hasUntypedArgument=S.type.kind==="value"||A.type.kind==="value"}static parse(S,A){if(S.length!==3&&S.length!==4)return A.error("Expected two or three arguments.");const k=S[0];let B=A.parse(S[1],1,Tr);if(!B)return null;if(!ln(k,B.type))return A.concat(1).error(`"${k}" comparisons are not supported for type '${ut(B.type)}'.`);let U=A.parse(S[2],2,Tr);if(!U)return null;if(!ln(k,U.type))return A.concat(2).error(`"${k}" comparisons are not supported for type '${ut(U.type)}'.`);if(B.type.kind!==U.type.kind&&B.type.kind!=="value"&&U.type.kind!=="value")return A.error(`Cannot compare types '${ut(B.type)}' and '${ut(U.type)}'.`);y&&(B.type.kind==="value"&&U.type.kind!=="value"?B=new Ui(U.type,[B]):B.type.kind!=="value"&&U.type.kind==="value"&&(U=new Ui(B.type,[U])));let q=null;if(S.length===4){if(B.type.kind!=="string"&&U.type.kind!=="string"&&B.type.kind!=="value"&&U.type.kind!=="value")return A.error("Cannot use collator to compare non-string types.");if(q=A.parse(S[3],3,ni),!q)return null}return new Uj(B,U,q)}evaluate(S){const A=this.lhs.evaluate(S),k=this.rhs.evaluate(S);if(y&&this.hasUntypedArgument){const B=sn(A),U=sn(k);if(B.kind!==U.kind||B.kind!=="string"&&B.kind!=="number")throw new _n(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${B.kind}, ${U.kind}) instead.`)}if(this.collator&&!y&&this.hasUntypedArgument){const B=sn(A),U=sn(k);if(B.kind!=="string"||U.kind!=="string")return l(S,A,k)}return this.collator?T(S,A,k,this.collator.evaluate(S)):l(S,A,k)}eachChild(S){S(this.lhs),S(this.rhs),this.collator&&S(this.collator)}outputDefined(){return!0}}}const t0=Sn("==",function(u,l,T){return l===T},hi),Ql=Sn("!=",function(u,l,T){return l!==T},function(u,l,T,y){return!hi(0,l,T,y)}),bn=Sn("<",function(u,l,T){return l<T},function(u,l,T,y){return y.compare(l,T)<0}),ml=Sn(">",function(u,l,T){return l>T},function(u,l,T,y){return y.compare(l,T)>0}),fu=Sn("<=",function(u,l,T){return l<=T},function(u,l,T,y){return y.compare(l,T)<=0}),qo=Sn(">=",function(u,l,T){return l>=T},function(u,l,T,y){return y.compare(l,T)>=0});class c3{constructor(l,T,y){this.type=ni,this.locale=y,this.caseSensitive=l,this.diacriticSensitive=T}static parse(l,T){if(l.length!==2)return T.error("Expected one argument.");const y=l[1];if(typeof y!="object"||Array.isArray(y))return T.error("Collator options argument must be an object.");const x=T.parse(y["case-sensitive"]!==void 0&&y["case-sensitive"],1,vr);if(!x)return null;const S=T.parse(y["diacritic-sensitive"]!==void 0&&y["diacritic-sensitive"],1,vr);if(!S)return null;let A=null;return y.locale&&(A=T.parse(y.locale,1,Sr),!A)?null:new c3(x,S,A)}evaluate(l){return new Ei(this.caseSensitive.evaluate(l),this.diacriticSensitive.evaluate(l),this.locale?this.locale.evaluate(l):null)}eachChild(l){l(this.caseSensitive),l(this.diacriticSensitive),this.locale&&l(this.locale)}outputDefined(){return!1}}class _4{constructor(l,T,y,x,S){this.type=Sr,this.number=l,this.locale=T,this.currency=y,this.minFractionDigits=x,this.maxFractionDigits=S}static parse(l,T){if(l.length!==3)return T.error("Expected two arguments.");const y=T.parse(l[1],1,ge);if(!y)return null;const x=l[2];if(typeof x!="object"||Array.isArray(x))return T.error("NumberFormat options argument must be an object.");let S=null;if(x.locale&&(S=T.parse(x.locale,1,Sr),!S))return null;let A=null;if(x.currency&&(A=T.parse(x.currency,1,Sr),!A))return null;let k=null;if(x["min-fraction-digits"]&&(k=T.parse(x["min-fraction-digits"],1,ge),!k))return null;let B=null;return x["max-fraction-digits"]&&(B=T.parse(x["max-fraction-digits"],1,ge),!B)?null:new _4(y,S,A,k,B)}evaluate(l){return new Intl.NumberFormat(this.locale?this.locale.evaluate(l):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(l):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(l):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(l):void 0}).format(this.number.evaluate(l))}eachChild(l){l(this.number),this.locale&&l(this.locale),this.currency&&l(this.currency),this.minFractionDigits&&l(this.minFractionDigits),this.maxFractionDigits&&l(this.maxFractionDigits)}outputDefined(){return!1}}class u3{constructor(l){this.type=h1,this.sections=l}static parse(l,T){if(l.length<2)return T.error("Expected at least one argument.");const y=l[1];if(!Array.isArray(y)&&typeof y=="object")return T.error("First argument must be an image or text section.");const x=[];let S=!1;for(let A=1;A<=l.length-1;++A){const k=l[A];if(S&&typeof k=="object"&&!Array.isArray(k)){S=!1;let B=null;if(k["font-scale"]&&(B=T.parse(k["font-scale"],1,ge),!B))return null;let U=null;if(k["text-font"]&&(U=T.parse(k["text-font"],1,st(Sr)),!U))return null;let q=null;if(k["text-color"]&&(q=T.parse(k["text-color"],1,Bn),!q))return null;const K=x[x.length-1];K.scale=B,K.font=U,K.textColor=q}else{const B=T.parse(l[A],1,Tr);if(!B)return null;const U=B.type.kind;if(U!=="string"&&U!=="value"&&U!=="null"&&U!=="resolvedImage")return T.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");S=!0,x.push({content:B,scale:null,font:null,textColor:null})}}return new u3(x)}evaluate(l){return new Fr(this.sections.map(T=>{const y=T.content.evaluate(l);return sn(y)===yt?new U1("",y,null,null,null):new U1(Hi(y),null,T.scale?T.scale.evaluate(l):null,T.font?T.font.evaluate(l).join(","):null,T.textColor?T.textColor.evaluate(l):null)}))}eachChild(l){for(const T of this.sections)l(T.content),T.scale&&l(T.scale),T.font&&l(T.font),T.textColor&&l(T.textColor)}outputDefined(){return!1}}class h3{constructor(l){this.type=yt,this.input=l}static parse(l,T){if(l.length!==2)return T.error("Expected two arguments.");const y=T.parse(l[1],1,Sr);return y?new h3(y):T.error("No image name provided.")}evaluate(l){const T=this.input.evaluate(l),y=an.fromString(T);return y&&l.availableImages&&(y.available=l.availableImages.indexOf(T)>-1),y}eachChild(l){l(this.input)}outputDefined(){return!1}}class Ya{constructor(l){this.type=ge,this.input=l}static parse(l,T){if(l.length!==2)return T.error(`Expected 1 argument, but found ${l.length-1} instead.`);const y=T.parse(l[1],1);return y?y.type.kind!=="array"&&y.type.kind!=="string"&&y.type.kind!=="value"?T.error(`Expected argument of type string or array, but found ${ut(y.type)} instead.`):new Ya(y):null}evaluate(l){const T=this.input.evaluate(l);if(typeof T=="string"||Array.isArray(T))return T.length;throw new _n(`Expected value to be of type string or array, but found ${ut(sn(T))} instead.`)}eachChild(l){l(this.input)}outputDefined(){return!1}}const d1=8192;function en(u,l){const T=(180+u[0])/360,y=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,x=Math.pow(2,l.z);return[Math.round(T*x*d1),Math.round(y*x*d1)]}function e0(u,l){const T=Math.pow(2,l.z);return[(x=(u[0]/d1+l.x)/T,360*x-180),(y=(u[1]/d1+l.y)/T,360/Math.PI*Math.atan(Math.exp((180-360*y)*Math.PI/180))-90)];var y,x}function d3(u,l){u[0]=Math.min(u[0],l[0]),u[1]=Math.min(u[1],l[1]),u[2]=Math.max(u[2],l[0]),u[3]=Math.max(u[3],l[1])}function Ja(u,l){return!(u[0]<=l[0]||u[2]>=l[2]||u[1]<=l[1]||u[3]>=l[3])}function gl(u,l,T){const y=u[0]-l[0],x=u[1]-l[1],S=u[0]-T[0],A=u[1]-T[1];return y*A-S*x==0&&y*S<=0&&x*A<=0}function p3(u,l,T,y){return(x=[y[0]-T[0],y[1]-T[1]])[0]*(S=[l[0]-u[0],l[1]-u[1]])[1]-x[1]*S[0]!=0&&!(!uo(u,l,T,y)||!uo(T,y,u,l));var x,S}function Qu(u,l,T){for(const y of T)for(let x=0;x<y.length-1;++x)if(p3(u,l,y[x],y[x+1]))return!0;return!1}function ts(u,l,T=!1){let y=!1;for(const k of l)for(let B=0;B<k.length-1;B++){if(gl(u,k[B],k[B+1]))return T;(S=k[B])[1]>(x=u)[1]!=(A=k[B+1])[1]>x[1]&&x[0]<(A[0]-S[0])*(x[1]-S[1])/(A[1]-S[1])+S[0]&&(y=!y)}var x,S,A;return y}function v4(u,l){for(const T of l)if(ts(u,T))return!0;return!1}function b4(u,l){for(const T of u)if(!ts(T,l))return!1;for(let T=0;T<u.length-1;++T)if(Qu(u[T],u[T+1],l))return!1;return!0}function yl(u,l){for(const T of l)if(b4(u,T))return!0;return!1}function uo(u,l,T,y){const x=y[0]-T[0],S=y[1]-T[1],A=(u[0]-T[0])*S-x*(u[1]-T[1]),k=(l[0]-T[0])*S-x*(l[1]-T[1]);return A>0&&k<0||A<0&&k>0}function L4(u,l,T){const y=[];for(let x=0;x<u.length;x++){const S=[];for(let A=0;A<u[x].length;A++){const k=en(u[x][A],T);d3(l,k),S.push(k)}y.push(S)}return y}function r0(u,l,T){const y=[];for(let x=0;x<u.length;x++){const S=L4(u[x],l,T);y.push(S)}return y}function _l(u,l,T,y){if(u[0]<T[0]||u[0]>T[2]){const x=.5*y;let S=u[0]-T[0]>x?-y:T[0]-u[0]>x?y:0;S===0&&(S=u[0]-T[2]>x?-y:T[2]-u[0]>x?y:0),u[0]+=S}d3(l,u)}function n0(u,l,T,y){const x=Math.pow(2,y.z)*d1,S=[y.x*d1,y.y*d1],A=[];for(const k of u)for(const B of k){const U=[B.x+S[0],B.y+S[1]];_l(U,l,T,x),A.push(U)}return A}function T3(u,l,T,y){const x=Math.pow(2,y.z)*d1,S=[y.x*d1,y.y*d1],A=[];for(const B of u){const U=[];for(const q of B){const K=[q.x+S[0],q.y+S[1]];d3(l,K),U.push(K)}A.push(U)}if(l[2]-l[0]<=x/2){(k=l)[0]=k[1]=1/0,k[2]=k[3]=-1/0;for(const B of A)for(const U of B)_l(U,l,T,x)}var k;return A}class C2{constructor(l,T){this.type=vr,this.geojson=l,this.geometries=T}static parse(l,T){if(l.length!==2)return T.error(`'within' expression requires exactly one argument, but found ${l.length-1} instead.`);if(Mi(l[1])){const y=l[1];if(y.type==="FeatureCollection"){const x=[];for(const S of y.features){const{type:A,coordinates:k}=S.geometry;A==="Polygon"&&x.push(k),A==="MultiPolygon"&&x.push(...k)}if(x.length)return new C2(y,{type:"MultiPolygon",coordinates:x})}else if(y.type==="Feature"){const x=y.geometry.type;if(x==="Polygon"||x==="MultiPolygon")return new C2(y,y.geometry)}else if(y.type==="Polygon"||y.type==="MultiPolygon")return new C2(y,y)}return T.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(l){if(l.geometry()!=null&&l.canonicalID()!=null){if(l.geometryType()==="Point")return function(T,y){const x=[1/0,1/0,-1/0,-1/0],S=[1/0,1/0,-1/0,-1/0],A=T.canonicalID();if(y.type==="Polygon"){const k=L4(y.coordinates,S,A),B=n0(T.geometry(),x,S,A);if(!Ja(x,S))return!1;for(const U of B)if(!ts(U,k))return!1}if(y.type==="MultiPolygon"){const k=r0(y.coordinates,S,A),B=n0(T.geometry(),x,S,A);if(!Ja(x,S))return!1;for(const U of B)if(!v4(U,k))return!1}return!0}(l,this.geometries);if(l.geometryType()==="LineString")return function(T,y){const x=[1/0,1/0,-1/0,-1/0],S=[1/0,1/0,-1/0,-1/0],A=T.canonicalID();if(y.type==="Polygon"){const k=L4(y.coordinates,S,A),B=T3(T.geometry(),x,S,A);if(!Ja(x,S))return!1;for(const U of B)if(!b4(U,k))return!1}if(y.type==="MultiPolygon"){const k=r0(y.coordinates,S,A),B=T3(T.geometry(),x,S,A);if(!Ja(x,S))return!1;for(const U of B)if(!yl(U,k))return!1}return!0}(l,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let i0=class{constructor(u=[],l=mu){if(this.data=u,this.length=this.data.length,this.compare=l,this.length>0)for(let T=(this.length>>1)-1;T>=0;T--)this._down(T)}push(u){this.data.push(u),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const u=this.data[0],l=this.data.pop();return this.length--,this.length>0&&(this.data[0]=l,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:l,compare:T}=this,y=l[u];for(;u>0;){const x=u-1>>1,S=l[x];if(T(y,S)>=0)break;l[u]=S,u=x}l[u]=y}_down(u){const{data:l,compare:T}=this,y=this.length>>1,x=l[u];for(;u<y;){let S=1+(u<<1),A=l[S];const k=S+1;if(k<this.length&&T(l[k],A)<0&&(S=k,A=l[k]),T(A,x)>=0)break;l[u]=A,u=S}l[u]=x}};function mu(u,l){return u<l?-1:u>l?1:0}function sa(u,l,T,y,x){o0(u,l,T,y||u.length-1,x||gu)}function o0(u,l,T,y,x){for(;y>T;){if(y-T>600){var S=y-T+1,A=l-T+1,k=Math.log(S),B=.5*Math.exp(2*k/3),U=.5*Math.sqrt(k*B*(S-B)/S)*(A-S/2<0?-1:1);o0(u,l,Math.max(T,Math.floor(l-A*B/S+U)),Math.min(y,Math.floor(l+(S-A)*B/S+U)),x)}var q=u[l],K=T,nt=y;for(f3(u,T,l),x(u[y],q)>0&&f3(u,T,y);K<nt;){for(f3(u,K,nt),K++,nt--;x(u[K],q)<0;)K++;for(;x(u[nt],q)>0;)nt--}x(u[T],q)===0?f3(u,T,nt):f3(u,++nt,y),nt<=l&&(T=nt+1),l<=nt&&(y=nt-1)}}function f3(u,l,T){var y=u[l];u[l]=u[T],u[T]=y}function gu(u,l){return u<l?-1:u>l?1:0}function es(u,l){if(u.length<=1)return[u];const T=[];let y,x;for(const S of u){const A=a0(S);A!==0&&(S.area=Math.abs(A),x===void 0&&(x=A<0),x===A<0?(y&&T.push(y),y=[S]):y.push(S))}if(y&&T.push(y),l>1)for(let S=0;S<T.length;S++)T[S].length<=l||(sa(T[S],l,1,T[S].length-1,Q3),T[S]=T[S].slice(0,l));return T}function Q3(u,l){return l.area-u.area}function a0(u){let l=0;for(let T,y,x=0,S=u.length,A=S-1;x<S;A=x++)T=u[x],y=u[A],l+=(y.x-T.x)*(T.y+y.y);return l}const x4=1/298.257223563,w4=x4*(2-x4),rs=Math.PI/180;class s0{constructor(l){const T=6378.137*rs*1e3,y=Math.cos(l*rs),x=1/(1-w4*(1-y*y)),S=Math.sqrt(x);this.kx=T*S*y,this.ky=T*S*x*(1-w4)}distance(l,T){const y=this.wrap(l[0]-T[0])*this.kx,x=(l[1]-T[1])*this.ky;return Math.sqrt(y*y+x*x)}pointOnLine(l,T){let y,x,S,A,k=1/0;for(let B=0;B<l.length-1;B++){let U=l[B][0],q=l[B][1],K=this.wrap(l[B+1][0]-U)*this.kx,nt=(l[B+1][1]-q)*this.ky,lt=0;K===0&&nt===0||(lt=(this.wrap(T[0]-U)*this.kx*K+(T[1]-q)*this.ky*nt)/(K*K+nt*nt),lt>1?(U=l[B+1][0],q=l[B+1][1]):lt>0&&(U+=K/this.kx*lt,q+=nt/this.ky*lt)),K=this.wrap(T[0]-U)*this.kx,nt=(T[1]-q)*this.ky;const ht=K*K+nt*nt;ht<k&&(k=ht,y=U,x=q,S=B,A=lt)}return{point:[y,x],index:S,t:Math.max(0,Math.min(1,A))}}wrap(l){for(;l<-180;)l+=360;for(;l>180;)l-=360;return l}}function vl(u,l){return l[0]-u[0]}function ns(u){return u[1]-u[0]+1}function Xo(u,l){return u[1]>=u[0]&&u[1]<l}function l0(u,l){if(u[0]>u[1])return[null,null];const T=ns(u);if(l){if(T===2)return[u,null];const x=Math.floor(T/2);return[[u[0],u[0]+x],[u[0]+x,u[1]]]}if(T===1)return[u,null];const y=Math.floor(T/2)-1;return[[u[0],u[0]+y],[u[0]+y+1,u[1]]]}function E4(u,l){if(!Xo(l,u.length))return[1/0,1/0,-1/0,-1/0];const T=[1/0,1/0,-1/0,-1/0];for(let y=l[0];y<=l[1];++y)d3(T,u[y]);return T}function m3(u){const l=[1/0,1/0,-1/0,-1/0];for(const T of u)for(const y of T)d3(l,y);return l}function fn(u){return u[0]!==-1/0&&u[1]!==-1/0&&u[2]!==1/0&&u[3]!==1/0}function ho(u,l,T){if(!fn(u)||!fn(l))return NaN;let y=0,x=0;return u[2]<l[0]&&(y=l[0]-u[2]),u[0]>l[2]&&(y=u[0]-l[2]),u[1]>l[3]&&(x=u[1]-l[3]),u[3]<l[1]&&(x=l[1]-u[3]),T.distance([0,0],[y,x])}function Er(u,l,T){const y=T.pointOnLine(l,u);return T.distance(u,y.point)}function A2(u,l,T,y,x){const S=Math.min(Er(u,[T,y],x),Er(l,[T,y],x)),A=Math.min(Er(T,[u,l],x),Er(y,[u,l],x));return Math.min(S,A)}function cn(u,l,T,y,x){if(!Xo(l,u.length)||!Xo(y,T.length))return 1/0;let S=1/0;for(let A=l[0];A<l[1];++A){const k=u[A],B=u[A+1];for(let U=y[0];U<y[1];++U){const q=T[U],K=T[U+1];if(p3(k,B,q,K))return 0;S=Math.min(S,A2(k,B,q,K,x))}}return S}function Cn(u,l,T,y,x){if(!Xo(l,u.length)||!Xo(y,T.length))return NaN;let S=1/0;for(let A=l[0];A<=l[1];++A)for(let k=y[0];k<=y[1];++k)if(S=Math.min(S,x.distance(u[A],T[k])),S===0)return S;return S}function la(u,l,T){if(ts(u,l,!0))return 0;let y=1/0;for(const x of l){const S=x[0],A=x[x.length-1];if(S!==A&&(y=Math.min(y,Er(u,[A,S],T)),y===0))return y;const k=T.pointOnLine(x,u);if(y=Math.min(y,T.distance(u,k.point)),y===0)return y}return y}function is(u,l,T,y){if(!Xo(l,u.length))return NaN;for(let S=l[0];S<=l[1];++S)if(ts(u[S],T,!0))return 0;let x=1/0;for(let S=l[0];S<l[1];++S){const A=u[S],k=u[S+1];for(const B of T)for(let U=0,q=B.length,K=q-1;U<q;K=U++){const nt=B[K],lt=B[U];if(p3(A,k,nt,lt))return 0;x=Math.min(x,A2(A,k,nt,lt,y))}}return x}function M4(u,l){for(const T of u)for(const y of T)if(ts(y,l,!0))return!0;return!1}function bl(u,l,T,y=1/0){const x=m3(u),S=m3(l);if(y!==1/0&&ho(x,S,T)>=y)return y;if(Ja(x,S)){if(M4(u,l))return 0}else if(M4(l,u))return 0;let A=1/0;for(const k of u)for(let B=0,U=k.length,q=U-1;B<U;q=B++){const K=k[q],nt=k[B];for(const lt of l)for(let ht=0,ft=lt.length,vt=ft-1;ht<ft;vt=ht++){const wt=lt[vt],Dt=lt[ht];if(p3(K,nt,wt,Dt))return 0;A=Math.min(A,A2(K,nt,wt,Dt,T))}}return A}function Ll(u,l,T,y,x,S){if(!S)return;const A=ho(E4(y,S),x,T);A<l&&u.push([A,S,[0,0]])}function H4(u,l,T,y,x,S,A){if(!S||!A)return;const k=ho(E4(y,S),E4(x,A),T);k<l&&u.push([k,S,A])}function g3(u,l,T,y,x=1/0){let S=Math.min(y.distance(u[0],T[0][0]),x);if(S===0)return S;const A=new i0([[0,[0,u.length-1],[0,0]]],vl),k=m3(T);for(;A.length>0;){const B=A.pop();if(B[0]>=S)continue;const U=B[1],q=l?50:100;if(ns(U)<=q){if(!Xo(U,u.length))return NaN;if(l){const K=is(u,U,T,y);if(isNaN(K)||K===0)return K;S=Math.min(S,K)}else for(let K=U[0];K<=U[1];++K){const nt=la(u[K],T,y);if(S=Math.min(S,nt),S===0)return 0}}else{const K=l0(U,l);Ll(A,S,y,u,k,K[0]),Ll(A,S,y,u,k,K[1])}}return S}function os(u,l,T,y,x,S=1/0){let A=Math.min(S,x.distance(u[0],T[0]));if(A===0)return A;const k=new i0([[0,[0,u.length-1],[0,T.length-1]]],vl);for(;k.length>0;){const B=k.pop();if(B[0]>=A)continue;const U=B[1],q=B[2],K=l?50:100,nt=y?50:100;if(ns(U)<=K&&ns(q)<=nt){if(!Xo(U,u.length)&&Xo(q,T.length))return NaN;let lt;if(l&&y)lt=cn(u,U,T,q,x),A=Math.min(A,lt);else if(l&&!y){const ht=u.slice(U[0],U[1]+1);for(let ft=q[0];ft<=q[1];++ft)if(lt=Er(T[ft],ht,x),A=Math.min(A,lt),A===0)return A}else if(!l&&y){const ht=T.slice(q[0],q[1]+1);for(let ft=U[0];ft<=U[1];++ft)if(lt=Er(u[ft],ht,x),A=Math.min(A,lt),A===0)return A}else lt=Cn(u,U,T,q,x),A=Math.min(A,lt)}else{const lt=l0(U,l),ht=l0(q,y);H4(k,A,x,u,T,lt[0],ht[0]),H4(k,A,x,u,T,lt[0],ht[1]),H4(k,A,x,u,T,lt[1],ht[0]),H4(k,A,x,u,T,lt[1],ht[1])}}return A}function ca(u){return u.type==="MultiPolygon"?u.coordinates.map(l=>({type:"Polygon",coordinates:l})):u.type==="MultiLineString"?u.coordinates.map(l=>({type:"LineString",coordinates:l})):u.type==="MultiPoint"?u.coordinates.map(l=>({type:"Point",coordinates:l})):[u]}class A1{constructor(l,T){this.type=ge,this.geojson=l,this.geometries=T}static parse(l,T){if(l.length!==2)return T.error(`'distance' expression requires exactly one argument, but found ${l.length-1} instead.`);if(Mi(l[1])){const y=l[1];if(y.type==="FeatureCollection")return new A1(y,y.features.map(x=>ca(x.geometry)).flat());if(y.type==="Feature")return new A1(y,ca(y.geometry));if("type"in y&&"coordinates"in y)return new A1(y,ca(y))}return T.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(l){if(l.geometry()!=null&&l.canonicalID()!=null){if(l.geometryType()==="Point")return function(T,y){const x=T.geometry(),S=x.flat().map(B=>e0([B.x,B.y],T.canonical));if(x.length===0)return NaN;const A=new s0(S[0][1]);let k=1/0;for(const B of y){switch(B.type){case"Point":k=Math.min(k,os(S,!1,[B.coordinates],!1,A,k));break;case"LineString":k=Math.min(k,os(S,!1,B.coordinates,!0,A,k));break;case"Polygon":k=Math.min(k,g3(S,!1,B.coordinates,A,k))}if(k===0)return k}return k}(l,this.geometries);if(l.geometryType()==="LineString")return function(T,y){const x=T.geometry(),S=x.flat().map(B=>e0([B.x,B.y],T.canonical));if(x.length===0)return NaN;const A=new s0(S[0][1]);let k=1/0;for(const B of y){switch(B.type){case"Point":k=Math.min(k,os(S,!0,[B.coordinates],!1,A,k));break;case"LineString":k=Math.min(k,os(S,!0,B.coordinates,!0,A,k));break;case"Polygon":k=Math.min(k,g3(S,!0,B.coordinates,A,k))}if(k===0)return k}return k}(l,this.geometries);if(l.geometryType()==="Polygon")return function(T,y){const x=T.geometry();if(x.length===0||x[0].length===0)return NaN;const S=es(x,0).map(B=>B.map(U=>U.map(q=>e0([q.x,q.y],T.canonical)))),A=new s0(S[0][0][0][1]);let k=1/0;for(const B of y)for(const U of S){switch(B.type){case"Point":k=Math.min(k,g3([B.coordinates],!1,U,A,k));break;case"LineString":k=Math.min(k,g3(B.coordinates,!0,U,A,k));break;case"Polygon":k=Math.min(k,bl(U,B.coordinates,A,k))}if(k===0)return k}return k}(l,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const ua={"==":t0,"!=":Ql,">":ml,"<":bn,">=":qo,"<=":fu,array:Ui,at:P,boolean:Ui,case:it,coalesce:ir,collator:c3,format:u3,image:h3,in:Z,"index-of":F,interpolate:tn,"interpolate-hcl":tn,"interpolate-lab":tn,length:Ya,let:S2,literal:Z1,match:X,number:Ui,"number-format":_4,object:Ui,slice:pt,step:Wt,string:Ui,"to-boolean":$i,"to-color":$i,"to-number":$i,"to-string":$i,var:W1,within:C2,distance:A1};class ii{constructor(l,T,y,x){this.name=l,this.type=T,this._evaluate=y,this.args=x}evaluate(l){return this._evaluate(l,this.args)}eachChild(l){this.args.forEach(l)}outputDefined(){return!1}static parse(l,T){const y=l[0],x=ii.definitions[y];if(!x)return T.error(`Unknown expression "${y}". If you wanted a literal array, use ["literal", [...]].`,0);const S=Array.isArray(x)?x[0]:x.type,A=Array.isArray(x)?[[x[1],x[2]]]:x.overloads,k=A.filter(([U])=>!Array.isArray(U)||U.length===l.length-1);let B=null;for(const[U,q]of k){B=new Wr(T.registry,da,T.path,null,T.scope);const K=[];let nt=!1;for(let lt=1;lt<l.length;lt++){const ht=l[lt],ft=Array.isArray(U)?U[lt-1]:U.type,vt=B.parse(ht,1+K.length,ft);if(!vt){nt=!0;break}K.push(vt)}if(!nt)if(Array.isArray(U)&&U.length!==K.length)B.error(`Expected ${U.length} arguments, but found ${K.length} instead.`);else{for(let lt=0;lt<K.length;lt++){const ht=Array.isArray(U)?U[lt]:U.type,ft=K[lt];B.concat(lt+1).checkSubtype(ht,ft.type)}if(B.errors.length===0)return new ii(y,S,q,K)}}if(k.length===1)T.errors.push(...B.errors);else{const U=(k.length?k:A).map(([K])=>{return nt=K,Array.isArray(nt)?`(${nt.map(ut).join(", ")})`:`(${ut(nt.type)}...)`;var nt}).join(" | "),q=[];for(let K=1;K<l.length;K++){const nt=T.parse(l[K],1+q.length);if(!nt)return null;q.push(ut(nt.type))}T.error(`Expected arguments of type ${U}, but found (${q.join(", ")}) instead.`)}return null}static register(l,T){ii.definitions=T;for(const y in T)l[y]=ii}}function xl(u,[l,T,y,x]){l=l.evaluate(u),T=T.evaluate(u),y=y.evaluate(u);const S=x?x.evaluate(u):1,A=M2(l,T,y,S);if(A)throw new _n(A);return new Ur(l/255,T/255,y/255,S,!1)}function O2(u,l){return u in l}function S4(u,l){const T=l[u];return T===void 0?null:T}function ha(u){return{type:u}}function da(u){if(u instanceof W1)return da(u.boundExpression);if(u instanceof ii&&u.name==="error"||u instanceof c3||u instanceof C2||u instanceof A1)return!1;const l=u instanceof $i||u instanceof Ui;let T=!0;return u.eachChild(y=>{T=l?T&&da(y):T&&y instanceof Z1}),!!T&&as(u)&&y3(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function as(u){if(u instanceof ii&&(u.name==="get"&&u.args.length===1||u.name==="feature-state"||u.name==="has"&&u.args.length===1||u.name==="properties"||u.name==="geometry-type"||u.name==="id"||/^filter-/.test(u.name))||u instanceof C2||u instanceof A1)return!1;let l=!0;return u.eachChild(T=>{l&&!as(T)&&(l=!1)}),l}function ss(u){if(u instanceof ii&&u.name==="feature-state")return!1;let l=!0;return u.eachChild(T=>{l&&!ss(T)&&(l=!1)}),l}function y3(u,l){if(u instanceof ii&&l.indexOf(u.name)>=0)return!1;let T=!0;return u.eachChild(y=>{T&&!y3(y,l)&&(T=!1)}),T}function C4(u){return{result:"success",value:u}}function po(u){return{result:"error",value:u}}function Oo(u){return u["property-type"]==="data-driven"||u["property-type"]==="cross-faded-data-driven"}function wl(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function Bt(u){return!!u.expression&&u.expression.interpolated}function Zt(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":u===null?"null":typeof u}function He(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function ur(u){return u}function dn(u,l){const T=l.type==="color",y=u.stops&&typeof u.stops[0][0]=="object",x=y||!(y||u.property!==void 0),S=u.type||(Bt(l)?"exponential":"interval");if(T||l.type==="padding"){const q=T?Ur.parse:Hn.parse;(u=En({},u)).stops&&(u.stops=u.stops.map(K=>[K[0],q(K[1])])),u.default=q(u.default?u.default:l.default)}if(u.colorSpace&&(A=u.colorSpace)!=="rgb"&&A!=="hcl"&&A!=="lab")throw new Error(`Unknown color space: "${u.colorSpace}"`);var A;let k,B,U;if(S==="exponential")k=O1;else if(S==="interval")k=oi;else if(S==="categorical"){k=Wn,B=Object.create(null);for(const q of u.stops)B[q[0]]=q[1];U=typeof u.stops[0][0]}else{if(S!=="identity")throw new Error(`Unknown function type "${S}"`);k=Kn}if(y){const q={},K=[];for(let ht=0;ht<u.stops.length;ht++){const ft=u.stops[ht],vt=ft[0].zoom;q[vt]===void 0&&(q[vt]={zoom:vt,type:u.type,property:u.property,default:u.default,stops:[]},K.push(vt)),q[vt].stops.push([ft[0].value,ft[1]])}const nt=[];for(const ht of K)nt.push([q[ht].zoom,dn(q[ht],l)]);const lt={name:"linear"};return{kind:"composite",interpolationType:lt,interpolationFactor:tn.interpolationFactor.bind(void 0,lt),zoomStops:nt.map(ht=>ht[0]),evaluate:({zoom:ht},ft)=>O1({stops:nt,base:u.base},l,ht).evaluate(ht,ft)}}if(x){const q=S==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:q,interpolationFactor:tn.interpolationFactor.bind(void 0,q),zoomStops:u.stops.map(K=>K[0]),evaluate:({zoom:K})=>k(u,l,K,B,U)}}return{kind:"source",evaluate(q,K){const nt=K&&K.properties?K.properties[u.property]:void 0;return nt===void 0?Nr(u.default,l.default):k(u,l,nt,B,U)}}}function Nr(u,l,T){return u!==void 0?u:l!==void 0?l:T!==void 0?T:void 0}function Wn(u,l,T,y,x){return Nr(typeof T===x?y[T]:void 0,u.default,l.default)}function oi(u,l,T){if(Zt(T)!=="number")return Nr(u.default,l.default);const y=u.stops.length;if(y===1||T<=u.stops[0][0])return u.stops[0][1];if(T>=u.stops[y-1][0])return u.stops[y-1][1];const x=gt(u.stops.map(S=>S[0]),T);return u.stops[x][1]}function O1(u,l,T){const y=u.base!==void 0?u.base:1;if(Zt(T)!=="number")return Nr(u.default,l.default);const x=u.stops.length;if(x===1||T<=u.stops[0][0])return u.stops[0][1];if(T>=u.stops[x-1][0])return u.stops[x-1][1];const S=gt(u.stops.map(q=>q[0]),T),A=function(q,K,nt,lt){const ht=lt-nt,ft=q-nt;return ht===0?0:K===1?ft/ht:(Math.pow(K,ft)-1)/(Math.pow(K,ht)-1)}(T,y,u.stops[S][0],u.stops[S+1][0]),k=u.stops[S][1],B=u.stops[S+1][1],U=dr[l.type]||ur;return typeof k.evaluate=="function"?{evaluate(...q){const K=k.evaluate.apply(void 0,q),nt=B.evaluate.apply(void 0,q);if(K!==void 0&&nt!==void 0)return U(K,nt,A,u.colorSpace)}}:U(k,B,A,u.colorSpace)}function Kn(u,l,T){switch(l.type){case"color":T=Ur.parse(T);break;case"formatted":T=Fr.fromString(T.toString());break;case"resolvedImage":T=an.fromString(T.toString());break;case"padding":T=Hn.parse(T);break;default:Zt(T)===l.type||l.type==="enum"&&l.values[T]||(T=void 0)}return Nr(T,u.default,l.default)}ii.register(ua,{error:[{kind:"error"},[Sr],(u,[l])=>{throw new _n(l.evaluate(u))}],typeof:[Sr,[Tr],(u,[l])=>ut(sn(l.evaluate(u)))],"to-rgba":[st(ge,4),[Bn],(u,[l])=>{const[T,y,x,S]=l.evaluate(u).rgb;return[255*T,255*y,255*x,S]}],rgb:[Bn,[ge,ge,ge],xl],rgba:[Bn,[ge,ge,ge,ge],xl],has:{type:vr,overloads:[[[Sr],(u,[l])=>O2(l.evaluate(u),u.properties())],[[Sr,yi],(u,[l,T])=>O2(l.evaluate(u),T.evaluate(u))]]},get:{type:Tr,overloads:[[[Sr],(u,[l])=>S4(l.evaluate(u),u.properties())],[[Sr,yi],(u,[l,T])=>S4(l.evaluate(u),T.evaluate(u))]]},"feature-state":[Tr,[Sr],(u,[l])=>S4(l.evaluate(u),u.featureState||{})],properties:[yi,[],u=>u.properties()],"geometry-type":[Sr,[],u=>u.geometryType()],id:[Tr,[],u=>u.id()],zoom:[ge,[],u=>u.globals.zoom],"heatmap-density":[ge,[],u=>u.globals.heatmapDensity||0],"line-progress":[ge,[],u=>u.globals.lineProgress||0],accumulated:[Tr,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[ge,ha(ge),(u,l)=>{let T=0;for(const y of l)T+=y.evaluate(u);return T}],"*":[ge,ha(ge),(u,l)=>{let T=1;for(const y of l)T*=y.evaluate(u);return T}],"-":{type:ge,overloads:[[[ge,ge],(u,[l,T])=>l.evaluate(u)-T.evaluate(u)],[[ge],(u,[l])=>-l.evaluate(u)]]},"/":[ge,[ge,ge],(u,[l,T])=>l.evaluate(u)/T.evaluate(u)],"%":[ge,[ge,ge],(u,[l,T])=>l.evaluate(u)%T.evaluate(u)],ln2:[ge,[],()=>Math.LN2],pi:[ge,[],()=>Math.PI],e:[ge,[],()=>Math.E],"^":[ge,[ge,ge],(u,[l,T])=>Math.pow(l.evaluate(u),T.evaluate(u))],sqrt:[ge,[ge],(u,[l])=>Math.sqrt(l.evaluate(u))],log10:[ge,[ge],(u,[l])=>Math.log(l.evaluate(u))/Math.LN10],ln:[ge,[ge],(u,[l])=>Math.log(l.evaluate(u))],log2:[ge,[ge],(u,[l])=>Math.log(l.evaluate(u))/Math.LN2],sin:[ge,[ge],(u,[l])=>Math.sin(l.evaluate(u))],cos:[ge,[ge],(u,[l])=>Math.cos(l.evaluate(u))],tan:[ge,[ge],(u,[l])=>Math.tan(l.evaluate(u))],asin:[ge,[ge],(u,[l])=>Math.asin(l.evaluate(u))],acos:[ge,[ge],(u,[l])=>Math.acos(l.evaluate(u))],atan:[ge,[ge],(u,[l])=>Math.atan(l.evaluate(u))],min:[ge,ha(ge),(u,l)=>Math.min(...l.map(T=>T.evaluate(u)))],max:[ge,ha(ge),(u,l)=>Math.max(...l.map(T=>T.evaluate(u)))],abs:[ge,[ge],(u,[l])=>Math.abs(l.evaluate(u))],round:[ge,[ge],(u,[l])=>{const T=l.evaluate(u);return T<0?-Math.round(-T):Math.round(T)}],floor:[ge,[ge],(u,[l])=>Math.floor(l.evaluate(u))],ceil:[ge,[ge],(u,[l])=>Math.ceil(l.evaluate(u))],"filter-==":[vr,[Sr,Tr],(u,[l,T])=>u.properties()[l.value]===T.value],"filter-id-==":[vr,[Tr],(u,[l])=>u.id()===l.value],"filter-type-==":[vr,[Sr],(u,[l])=>u.geometryType()===l.value],"filter-<":[vr,[Sr,Tr],(u,[l,T])=>{const y=u.properties()[l.value],x=T.value;return typeof y==typeof x&&y<x}],"filter-id-<":[vr,[Tr],(u,[l])=>{const T=u.id(),y=l.value;return typeof T==typeof y&&T<y}],"filter->":[vr,[Sr,Tr],(u,[l,T])=>{const y=u.properties()[l.value],x=T.value;return typeof y==typeof x&&y>x}],"filter-id->":[vr,[Tr],(u,[l])=>{const T=u.id(),y=l.value;return typeof T==typeof y&&T>y}],"filter-<=":[vr,[Sr,Tr],(u,[l,T])=>{const y=u.properties()[l.value],x=T.value;return typeof y==typeof x&&y<=x}],"filter-id-<=":[vr,[Tr],(u,[l])=>{const T=u.id(),y=l.value;return typeof T==typeof y&&T<=y}],"filter->=":[vr,[Sr,Tr],(u,[l,T])=>{const y=u.properties()[l.value],x=T.value;return typeof y==typeof x&&y>=x}],"filter-id->=":[vr,[Tr],(u,[l])=>{const T=u.id(),y=l.value;return typeof T==typeof y&&T>=y}],"filter-has":[vr,[Tr],(u,[l])=>l.value in u.properties()],"filter-has-id":[vr,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[vr,[st(Sr)],(u,[l])=>l.value.indexOf(u.geometryType())>=0],"filter-id-in":[vr,[st(Tr)],(u,[l])=>l.value.indexOf(u.id())>=0],"filter-in-small":[vr,[Sr,st(Tr)],(u,[l,T])=>T.value.indexOf(u.properties()[l.value])>=0],"filter-in-large":[vr,[Sr,st(Tr)],(u,[l,T])=>function(y,x,S,A){for(;S<=A;){const k=S+A>>1;if(x[k]===y)return!0;x[k]>y?A=k-1:S=k+1}return!1}(u.properties()[l.value],T.value,0,T.value.length-1)],all:{type:vr,overloads:[[[vr,vr],(u,[l,T])=>l.evaluate(u)&&T.evaluate(u)],[ha(vr),(u,l)=>{for(const T of l)if(!T.evaluate(u))return!1;return!0}]]},any:{type:vr,overloads:[[[vr,vr],(u,[l,T])=>l.evaluate(u)||T.evaluate(u)],[ha(vr),(u,l)=>{for(const T of l)if(T.evaluate(u))return!0;return!1}]]},"!":[vr,[vr],(u,[l])=>!l.evaluate(u)],"is-supported-script":[vr,[Sr],(u,[l])=>{const T=u.globals&&u.globals.isSupportedScript;return!T||T(l.evaluate(u))}],upcase:[Sr,[Sr],(u,[l])=>l.evaluate(u).toUpperCase()],downcase:[Sr,[Sr],(u,[l])=>l.evaluate(u).toLowerCase()],concat:[Sr,ha(Tr),(u,l)=>l.map(T=>Hi(T.evaluate(u))).join("")],"resolved-locale":[Sr,[ni],(u,[l])=>l.evaluate(u).resolvedLocale()]});class ai{constructor(l,T){var y;this.expression=l,this._warningHistory={},this._evaluator=new H2,this._defaultValue=T?(y=T).type==="color"&&He(y.default)?new Ur(0,0,0,0):y.type==="color"?Ur.parse(y.default)||null:y.type==="padding"?Hn.parse(y.default)||null:y.type==="variableAnchorOffsetCollection"?Jr.parse(y.default)||null:y.default===void 0?null:y.default:null,this._enumValues=T&&T.type==="enum"?T.values:null}evaluateWithoutErrorHandling(l,T,y,x,S,A){return this._evaluator.globals=l,this._evaluator.feature=T,this._evaluator.featureState=y,this._evaluator.canonical=x,this._evaluator.availableImages=S||null,this._evaluator.formattedSection=A,this.expression.evaluate(this._evaluator)}evaluate(l,T,y,x,S,A){this._evaluator.globals=l,this._evaluator.feature=T||null,this._evaluator.featureState=y||null,this._evaluator.canonical=x,this._evaluator.availableImages=S||null,this._evaluator.formattedSection=A||null;try{const k=this.expression.evaluate(this._evaluator);if(k==null||typeof k=="number"&&k!=k)return this._defaultValue;if(this._enumValues&&!(k in this._enumValues))throw new _n(`Expected value to be one of ${Object.keys(this._enumValues).map(B=>JSON.stringify(B)).join(", ")}, but found ${JSON.stringify(k)} instead.`);return k}catch(k){return this._warningHistory[k.message]||(this._warningHistory[k.message]=!0,typeof console<"u"&&console.warn(k.message)),this._defaultValue}}}function k1(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in ua}function q1(u,l){const T=new Wr(ua,da,[],l?function(x){const S={color:Bn,string:Sr,number:ge,enum:Sr,boolean:vr,formatted:h1,padding:yn,resolvedImage:yt,variableAnchorOffsetCollection:ot};return x.type==="array"?st(S[x.value]||Tr,x.length):S[x.type]}(l):void 0),y=T.parse(u,void 0,void 0,void 0,l&&l.type==="string"?{typeAnnotation:"coerce"}:void 0);return y?C4(new ai(y,l)):po(T.errors)}class Ii{constructor(l,T){this.kind=l,this._styleExpression=T,this.isStateDependent=l!=="constant"&&!ss(T.expression)}evaluateWithoutErrorHandling(l,T,y,x,S,A){return this._styleExpression.evaluateWithoutErrorHandling(l,T,y,x,S,A)}evaluate(l,T,y,x,S,A){return this._styleExpression.evaluate(l,T,y,x,S,A)}}class To{constructor(l,T,y,x){this.kind=l,this.zoomStops=y,this._styleExpression=T,this.isStateDependent=l!=="camera"&&!ss(T.expression),this.interpolationType=x}evaluateWithoutErrorHandling(l,T,y,x,S,A){return this._styleExpression.evaluateWithoutErrorHandling(l,T,y,x,S,A)}evaluate(l,T,y,x,S,A){return this._styleExpression.evaluate(l,T,y,x,S,A)}interpolationFactor(l,T,y){return this.interpolationType?tn.interpolationFactor(this.interpolationType,l,T,y):0}}function ko(u,l){const T=q1(u,l);if(T.result==="error")return T;const y=T.value.expression,x=as(y);if(!x&&!Oo(l))return po([new Nn("","data expressions not supported")]);const S=y3(y,["zoom"]);if(!S&&!wl(l))return po([new Nn("","zoom expressions not supported")]);const A=si(y);return A||S?A instanceof Nn?po([A]):A instanceof tn&&!Bt(l)?po([new Nn("",'"interpolate" expressions cannot be used with this property')]):C4(A?new To(x?"camera":"composite",T.value,A.labels,A instanceof tn?A.interpolation:void 0):new Ii(x?"constant":"source",T.value)):po([new Nn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Vo{constructor(l,T){this._parameters=l,this._specification=T,En(this,dn(this._parameters,this._specification))}static deserialize(l){return new Vo(l._parameters,l._specification)}static serialize(l){return{_parameters:l._parameters,_specification:l._specification}}}function si(u){let l=null;if(u instanceof S2)l=si(u.result);else if(u instanceof ir){for(const T of u.args)if(l=si(T),l)break}else(u instanceof Wt||u instanceof tn)&&u.input instanceof ii&&u.input.name==="zoom"&&(l=u);return l instanceof Nn||u.eachChild(T=>{const y=si(T);y instanceof Nn?l=y:!l&&y?l=new Nn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):l&&y&&l!==y&&(l=new Nn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),l}function fo(u){if(u===!0||u===!1)return!0;if(!Array.isArray(u)||u.length===0)return!1;switch(u[0]){case"has":return u.length>=2&&u[1]!=="$id"&&u[1]!=="$type";case"in":return u.length>=3&&(typeof u[1]!="string"||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return u.length!==3||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const l of u.slice(1))if(!fo(l)&&typeof l!="boolean")return!1;return!0;default:return!0}}const c0={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function u0(u){if(u==null)return{filter:()=>!0,needGeometry:!1};fo(u)||(u=Xr(u));const l=q1(u,c0);if(l.result==="error")throw new Error(l.value.map(T=>`${T.key}: ${T.message}`).join(", "));return{filter:(T,y,x)=>l.value.evaluate(T,y,{},x),needGeometry:rn(u)}}function yu(u,l){return u<l?-1:u>l?1:0}function rn(u){if(!Array.isArray(u))return!1;if(u[0]==="within"||u[0]==="distance")return!0;for(let l=1;l<u.length;l++)if(rn(u[l]))return!0;return!1}function Xr(u){if(!u)return!0;const l=u[0];return u.length<=1?l!=="any":l==="=="?k2(u[1],u[2],"=="):l==="!="?n1(k2(u[1],u[2],"==")):l==="<"||l===">"||l==="<="||l===">="?k2(u[1],u[2],l):l==="any"?(T=u.slice(1),["any"].concat(T.map(Xr))):l==="all"?["all"].concat(u.slice(1).map(Xr)):l==="none"?["all"].concat(u.slice(1).map(Xr).map(n1)):l==="in"?Ko(u[1],u.slice(2)):l==="!in"?n1(Ko(u[1],u.slice(2))):l==="has"?ls(u[1]):l!=="!has"||n1(ls(u[1]));var T}function k2(u,l,T){switch(u){case"$type":return[`filter-type-${T}`,l];case"$id":return[`filter-id-${T}`,l];default:return[`filter-${T}`,u,l]}}function Ko(u,l){if(l.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",l]];case"$id":return["filter-id-in",["literal",l]];default:return l.length>200&&!l.some(T=>typeof T!=typeof l[0])?["filter-in-large",u,["literal",l.sort(yu)]]:["filter-in-small",u,["literal",l]]}}function ls(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function n1(u){return["!",u]}function i1(u){const l=typeof u;if(l==="number"||l==="boolean"||l==="string"||u==null)return JSON.stringify(u);if(Array.isArray(u)){let x="[";for(const S of u)x+=`${i1(S)},`;return`${x}]`}const T=Object.keys(u).sort();let y="{";for(let x=0;x<T.length;x++)y+=`${JSON.stringify(T[x])}:${i1(u[T[x]])},`;return`${y}}`}function V2(u){let l="";for(const T of Dr)l+=`/${i1(u[T])}`;return l}function P2(u){const l=u.value;return l?[new pe(u.key,l,"constants have been deprecated as of v8")]:[]}function Ln(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function p1(u){if(Array.isArray(u))return u.map(p1);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){const l={};for(const T in u)l[T]=p1(u[T]);return l}return Ln(u)}function vi(u){const l=u.key,T=u.value,y=u.valueSpec||{},x=u.objectElementValidators||{},S=u.style,A=u.styleSpec,k=u.validateSpec;let B=[];const U=Zt(T);if(U!=="object")return[new pe(l,T,`object expected, ${U} found`)];for(const q in T){const K=q.split(".")[0],nt=y[K]||y["*"];let lt;if(x[K])lt=x[K];else if(y[K])lt=k;else if(x["*"])lt=x["*"];else{if(!y["*"]){B.push(new pe(l,T[q],`unknown property "${q}"`));continue}lt=k}B=B.concat(lt({key:(l&&`${l}.`)+q,value:T[q],valueSpec:nt,style:S,styleSpec:A,object:T,objectKey:q,validateSpec:k},T))}for(const q in y)x[q]||y[q].required&&y[q].default===void 0&&T[q]===void 0&&B.push(new pe(l,T,`missing required property "${q}"`));return B}function _3(u){const l=u.value,T=u.valueSpec,y=u.style,x=u.styleSpec,S=u.key,A=u.arrayElementValidator||u.validateSpec;if(Zt(l)!=="array")return[new pe(S,l,`array expected, ${Zt(l)} found`)];if(T.length&&l.length!==T.length)return[new pe(S,l,`array length ${T.length} expected, length ${l.length} found`)];if(T["min-length"]&&l.length<T["min-length"])return[new pe(S,l,`array length at least ${T["min-length"]} expected, length ${l.length} found`)];let k={type:T.value,values:T.values};x.$version<7&&(k.function=T.function),Zt(T.value)==="object"&&(k=T.value);let B=[];for(let U=0;U<l.length;U++)B=B.concat(A({array:l,arrayIndex:U,value:l[U],valueSpec:k,validateSpec:u.validateSpec,style:y,styleSpec:x,key:`${S}[${U}]`}));return B}function cs(u){const l=u.key,T=u.value,y=u.valueSpec;let x=Zt(T);return x==="number"&&T!=T&&(x="NaN"),x!=="number"?[new pe(l,T,`number expected, ${x} found`)]:"minimum"in y&&T<y.minimum?[new pe(l,T,`${T} is less than the minimum value ${y.minimum}`)]:"maximum"in y&&T>y.maximum?[new pe(l,T,`${T} is greater than the maximum value ${y.maximum}`)]:[]}function us(u){const l=u.valueSpec,T=Ln(u.value.type);let y,x,S,A={};const k=T!=="categorical"&&u.value.property===void 0,B=!k,U=Zt(u.value.stops)==="array"&&Zt(u.value.stops[0])==="array"&&Zt(u.value.stops[0][0])==="object",q=vi({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(lt){if(T==="identity")return[new pe(lt.key,lt.value,'identity function may not have a "stops" property')];let ht=[];const ft=lt.value;return ht=ht.concat(_3({key:lt.key,value:ft,valueSpec:lt.valueSpec,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec,arrayElementValidator:K})),Zt(ft)==="array"&&ft.length===0&&ht.push(new pe(lt.key,ft,"array must have at least one stop")),ht},default:function(lt){return lt.validateSpec({key:lt.key,value:lt.value,valueSpec:l,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec})}}});return T==="identity"&&k&&q.push(new pe(u.key,u.value,'missing required property "property"')),T==="identity"||u.value.stops||q.push(new pe(u.key,u.value,'missing required property "stops"')),T==="exponential"&&u.valueSpec.expression&&!Bt(u.valueSpec)&&q.push(new pe(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(B&&!Oo(u.valueSpec)?q.push(new pe(u.key,u.value,"property functions not supported")):k&&!wl(u.valueSpec)&&q.push(new pe(u.key,u.value,"zoom functions not supported"))),T!=="categorical"&&!U||u.value.property!==void 0||q.push(new pe(u.key,u.value,'"property" property is required')),q;function K(lt){let ht=[];const ft=lt.value,vt=lt.key;if(Zt(ft)!=="array")return[new pe(vt,ft,`array expected, ${Zt(ft)} found`)];if(ft.length!==2)return[new pe(vt,ft,`array length 2 expected, length ${ft.length} found`)];if(U){if(Zt(ft[0])!=="object")return[new pe(vt,ft,`object expected, ${Zt(ft[0])} found`)];if(ft[0].zoom===void 0)return[new pe(vt,ft,"object stop key must have zoom")];if(ft[0].value===void 0)return[new pe(vt,ft,"object stop key must have value")];if(S&&S>Ln(ft[0].zoom))return[new pe(vt,ft[0].zoom,"stop zoom values must appear in ascending order")];Ln(ft[0].zoom)!==S&&(S=Ln(ft[0].zoom),x=void 0,A={}),ht=ht.concat(vi({key:`${vt}[0]`,value:ft[0],valueSpec:{zoom:{}},validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec,objectElementValidators:{zoom:cs,value:nt}}))}else ht=ht.concat(nt({key:`${vt}[0]`,value:ft[0],valueSpec:{},validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec},ft));return k1(p1(ft[1]))?ht.concat([new pe(`${vt}[1]`,ft[1],"expressions are not allowed in function stops.")]):ht.concat(lt.validateSpec({key:`${vt}[1]`,value:ft[1],valueSpec:l,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec}))}function nt(lt,ht){const ft=Zt(lt.value),vt=Ln(lt.value),wt=lt.value!==null?lt.value:ht;if(y){if(ft!==y)return[new pe(lt.key,wt,`${ft} stop domain type must match previous stop domain type ${y}`)]}else y=ft;if(ft!=="number"&&ft!=="string"&&ft!=="boolean")return[new pe(lt.key,wt,"stop domain value must be a number, string, or boolean")];if(ft!=="number"&&T!=="categorical"){let Dt=`number expected, ${ft} found`;return Oo(l)&&T===void 0&&(Dt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new pe(lt.key,wt,Dt)]}return T!=="categorical"||ft!=="number"||isFinite(vt)&&Math.floor(vt)===vt?T!=="categorical"&&ft==="number"&&x!==void 0&&vt<x?[new pe(lt.key,wt,"stop domain values must appear in ascending order")]:(x=vt,T==="categorical"&&vt in A?[new pe(lt.key,wt,"stop domain values must be unique")]:(A[vt]=!0,[])):[new pe(lt.key,wt,`integer expected, found ${vt}`)]}}function X1(u){const l=(u.expressionContext==="property"?ko:q1)(p1(u.value),u.valueSpec);if(l.result==="error")return l.value.map(y=>new pe(`${u.key}${y.key}`,u.value,y.message));const T=l.value.expression||l.value._styleExpression.expression;if(u.expressionContext==="property"&&u.propertyKey==="text-font"&&!T.outputDefined())return[new pe(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if(u.expressionContext==="property"&&u.propertyType==="layout"&&!ss(T))return[new pe(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if(u.expressionContext==="filter"&&!ss(T))return[new pe(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&u.expressionContext.indexOf("cluster")===0){if(!y3(T,["zoom","feature-state"]))return[new pe(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(u.expressionContext==="cluster-initial"&&!as(T))return[new pe(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Yo(u){const l=u.key,T=u.value,y=u.valueSpec,x=[];return Array.isArray(y.values)?y.values.indexOf(Ln(T))===-1&&x.push(new pe(l,T,`expected one of [${y.values.join(", ")}], ${JSON.stringify(T)} found`)):Object.keys(y.values).indexOf(Ln(T))===-1&&x.push(new pe(l,T,`expected one of [${Object.keys(y.values).join(", ")}], ${JSON.stringify(T)} found`)),x}function v3(u){return fo(p1(u.value))?X1(En({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):hs(u)}function hs(u){const l=u.value,T=u.key;if(Zt(l)!=="array")return[new pe(T,l,`array expected, ${Zt(l)} found`)];const y=u.styleSpec;let x,S=[];if(l.length<1)return[new pe(T,l,"filter array must have at least 1 element")];switch(S=S.concat(Yo({key:`${T}[0]`,value:l[0],valueSpec:y.filter_operator,style:u.style,styleSpec:u.styleSpec})),Ln(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&Ln(l[1])==="$type"&&S.push(new pe(T,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&S.push(new pe(T,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(x=Zt(l[1]),x!=="string"&&S.push(new pe(`${T}[1]`,l[1],`string expected, ${x} found`)));for(let A=2;A<l.length;A++)x=Zt(l[A]),Ln(l[1])==="$type"?S=S.concat(Yo({key:`${T}[${A}]`,value:l[A],valueSpec:y.geometry_type,style:u.style,styleSpec:u.styleSpec})):x!=="string"&&x!=="number"&&x!=="boolean"&&S.push(new pe(`${T}[${A}]`,l[A],`string, number, or boolean expected, ${x} found`));break;case"any":case"all":case"none":for(let A=1;A<l.length;A++)S=S.concat(hs({key:`${T}[${A}]`,value:l[A],style:u.style,styleSpec:u.styleSpec}));break;case"has":case"!has":x=Zt(l[1]),l.length!==2?S.push(new pe(T,l,`filter array for "${l[0]}" operator must have 2 elements`)):x!=="string"&&S.push(new pe(`${T}[1]`,l[1],`string expected, ${x} found`))}return S}function ds(u,l){const T=u.key,y=u.validateSpec,x=u.style,S=u.styleSpec,A=u.value,k=u.objectKey,B=S[`${l}_${u.layerType}`];if(!B)return[];const U=k.match(/^(.*)-transition$/);if(l==="paint"&&U&&B[U[1]]&&B[U[1]].transition)return y({key:T,value:A,valueSpec:S.transition,style:x,styleSpec:S});const q=u.valueSpec||B[k];if(!q)return[new pe(T,A,`unknown property "${k}"`)];let K;if(Zt(A)==="string"&&Oo(q)&&!q.tokens&&(K=/^{([^}]+)}$/.exec(A)))return[new pe(T,A,`"${k}" does not support interpolation syntax
|
package/package.json
CHANGED
|
@@ -222,7 +222,7 @@ let FlatmapQueries = function () {
|
|
|
222
222
|
this.origins = []
|
|
223
223
|
this.components = []
|
|
224
224
|
if (!keastIds || keastIds.length == 0) return
|
|
225
|
-
|
|
225
|
+
|
|
226
226
|
let prom1 = this.queryForConnectivity(keastIds, signal) // This on returns a promise so dont need 'await'
|
|
227
227
|
let prom2 = await this.pubmedQueryOnIds(eventData)
|
|
228
228
|
let results = await Promise.all([prom1, prom2])
|
|
@@ -281,10 +281,10 @@ let FlatmapQueries = function () {
|
|
|
281
281
|
if (node.length === 1) { // If the node is in the form [id]
|
|
282
282
|
console.error("Server returns a single node", node)
|
|
283
283
|
return node[0]
|
|
284
|
-
} else {
|
|
284
|
+
} else {
|
|
285
285
|
if (node.length === 2 && node[1].length === 0) { // If the node is in the form [id, []]
|
|
286
286
|
return node[0]
|
|
287
|
-
} else {
|
|
287
|
+
} else {
|
|
288
288
|
return false // If the node is in the form [id, [id1, id2]]
|
|
289
289
|
}
|
|
290
290
|
}
|
|
@@ -294,7 +294,7 @@ let FlatmapQueries = function () {
|
|
|
294
294
|
|
|
295
295
|
// Check if the node is a single node or a node with multiple children
|
|
296
296
|
let nodeIsSingle = this.findIfNodeIsSingle(node)
|
|
297
|
-
|
|
297
|
+
|
|
298
298
|
// Case where node is in the form [id]
|
|
299
299
|
if (nodeIsSingle) {
|
|
300
300
|
return lookUp[nodeIsSingle]
|
|
@@ -390,6 +390,31 @@ let FlatmapQueries = function () {
|
|
|
390
390
|
return pubmedId.split(':')[1]
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
+
this.extractTermFromURLString = function (urlStr) {
|
|
394
|
+
if (!urlStr) return;
|
|
395
|
+
|
|
396
|
+
const str = decodeURIComponent(urlStr);
|
|
397
|
+
|
|
398
|
+
let term = '';
|
|
399
|
+
const names = [
|
|
400
|
+
'doi.org/',
|
|
401
|
+
'nih.gov/pubmed/',
|
|
402
|
+
'pubmed.ncbi.nlm.nih.gov/'
|
|
403
|
+
];
|
|
404
|
+
names.forEach((name) => {
|
|
405
|
+
const lastIndex = str.lastIndexOf(name);
|
|
406
|
+
if (lastIndex !== -1) {
|
|
407
|
+
term = str.slice(lastIndex + name.length);
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
if (term.endsWith('/')) {
|
|
412
|
+
term = term.slice(0, -1);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
return term;
|
|
416
|
+
}
|
|
417
|
+
|
|
393
418
|
this.buildPubmedSqlStatement = function (keastIds) {
|
|
394
419
|
let sql = 'select distinct publication from publications where entity in ('
|
|
395
420
|
if (keastIds.length === 1) {
|
|
@@ -430,11 +455,7 @@ let FlatmapQueries = function () {
|
|
|
430
455
|
this.flatmapQuery(sql).then((data) => {
|
|
431
456
|
// Create pubmed url on paths if we have them
|
|
432
457
|
if (data.values.length > 0) {
|
|
433
|
-
this.urls =
|
|
434
|
-
this.pubmedSearchUrl(
|
|
435
|
-
data.values.map((id) => this.stripPMIDPrefix(id[0]))
|
|
436
|
-
),
|
|
437
|
-
]
|
|
458
|
+
this.urls = this.getURLsForPubMed(data);
|
|
438
459
|
resolve(true)
|
|
439
460
|
} else {
|
|
440
461
|
// Create pubmed url on models
|
|
@@ -451,11 +472,7 @@ let FlatmapQueries = function () {
|
|
|
451
472
|
this.buildPubmedSqlStatementForModels(source)
|
|
452
473
|
).then((data) => {
|
|
453
474
|
if (Array.isArray(data.values) && data.values.length > 0) {
|
|
454
|
-
this.urls =
|
|
455
|
-
this.pubmedSearchUrl(
|
|
456
|
-
data.values.map((id) => this.stripPMIDPrefix(id[0]))
|
|
457
|
-
),
|
|
458
|
-
]
|
|
475
|
+
this.urls = this.getURLsForPubMed(data);
|
|
459
476
|
return true
|
|
460
477
|
} else {
|
|
461
478
|
this.urls = [] // Clears the pubmed search button
|
|
@@ -464,6 +481,19 @@ let FlatmapQueries = function () {
|
|
|
464
481
|
})
|
|
465
482
|
}
|
|
466
483
|
|
|
484
|
+
this.getURLsForPubMed = function (data) {
|
|
485
|
+
const ids = data.values.map((id) => this.extractTermFromURLString(id[0]));
|
|
486
|
+
const transformedIDs = this.transformPubMedSearchTerms(ids);
|
|
487
|
+
return [
|
|
488
|
+
this.pubmedSearchUrl(transformedIDs)
|
|
489
|
+
];
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
this.transformPubMedSearchTerms = function (ids) {
|
|
493
|
+
// to search multiple terms on PubMed
|
|
494
|
+
return ids.join(' OR ');
|
|
495
|
+
};
|
|
496
|
+
|
|
467
497
|
this.pubmedSearchUrl = function (ids) {
|
|
468
498
|
let url = 'https://pubmed.ncbi.nlm.nih.gov/?'
|
|
469
499
|
let params = new URLSearchParams()
|