@object-ui/console 3.1.2 → 3.1.3

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.
Files changed (63) hide show
  1. package/dist/assets/{AdvancedChartImpl-D711bBuO.js → AdvancedChartImpl-BvIFxlPf.js} +2 -2
  2. package/dist/assets/{AppManagementPage-CaWUYaXX.js → AppManagementPage-6bzxYNlP.js} +1 -1
  3. package/dist/assets/{AuditLogPage-CB1qkThp.js → AuditLogPage-qCzdxaNq.js} +1 -1
  4. package/dist/assets/{AuthPageLayout-9l5xWV_-.js → AuthPageLayout-DkrxSZOE.js} +1 -1
  5. package/dist/assets/{ChartImpl-B9B4Fnbe.js → ChartImpl-DYQ9eXJz.js} +1 -1
  6. package/dist/assets/CreateAppPage-DNKskVHK.js +1 -0
  7. package/dist/assets/{DashboardDesignPage-DGz-5xrK.js → DashboardDesignPage-T9tEAHAx.js} +1 -1
  8. package/dist/assets/{DashboardView-v834XbaQ.js → DashboardView-jCJCERzJ.js} +1 -1
  9. package/dist/assets/{EditAppPage-DocDqKMS.js → EditAppPage-UGT9V29B.js} +1 -1
  10. package/dist/assets/{ForgotPasswordPage-8ypvh4-X.js → ForgotPasswordPage-Ca0lLZwY.js} +1 -1
  11. package/dist/assets/{KanbanEnhanced-Cw4oddBv.js → KanbanEnhanced-CyIdmKhW.js} +1 -1
  12. package/dist/assets/{KanbanImpl-D6ggfmB0.js → KanbanImpl-PGPpv-gu.js} +1 -1
  13. package/dist/assets/{LoginPage-XakThPoT.js → LoginPage-BR2RpoGG.js} +1 -1
  14. package/dist/assets/{MarkdownImpl-C0wRapHT.js → MarkdownImpl-eDhoPCJp.js} +1 -1
  15. package/dist/assets/{OrgManagementPage-Df5167oO.js → OrgManagementPage-DjT2mZ2x.js} +1 -1
  16. package/dist/assets/{PageDesignPage-BzM4EsXt.js → PageDesignPage-DTEQcEuR.js} +1 -1
  17. package/dist/assets/{PageView-CpIQvLmr.js → PageView-CFJhE0CN.js} +2 -2
  18. package/dist/assets/{PermissionManagementPage-CZH3URJU.js → PermissionManagementPage-C_FPnvGW.js} +1 -1
  19. package/dist/assets/{ProfilePage-BvIbbebc.js → ProfilePage-CQkgvEEi.js} +1 -1
  20. package/dist/assets/RecordDetailView-ClpxNRz2.js +1 -0
  21. package/dist/assets/{RegisterPage-CIeFN9rY.js → RegisterPage-6IYU4bdp.js} +1 -1
  22. package/dist/assets/{ReportView-DYhXezmy.js → ReportView-DecAJ58u.js} +1 -1
  23. package/dist/assets/{RoleManagementPage-D0X7HlqJ.js → RoleManagementPage-v0ia3MGn.js} +1 -1
  24. package/dist/assets/{SearchResultsPage-CoMB32KW.js → SearchResultsPage-CaSb54ho.js} +1 -1
  25. package/dist/assets/{SystemHubPage-Cvl3VKcV.js → SystemHubPage-PNaxZEht.js} +1 -1
  26. package/dist/assets/{UserManagementPage-5k8BQxT1.js → UserManagementPage-KAZy5fgy.js} +1 -1
  27. package/dist/assets/data-adapter-DCM4pdG4.js +1 -0
  28. package/dist/assets/{framework-52FGgFF6.js → framework-jBjO8CT3.js} +2 -2
  29. package/dist/assets/{index-D5i0wk-G.js → index-BwkHrw9s.js} +1 -1
  30. package/dist/assets/index-DXak0mZe.css +1 -0
  31. package/dist/assets/{index-fjkakZm9.js → index-tta28Q_N.js} +3 -3
  32. package/dist/assets/infrastructure-CWeiQ12V.js +1 -0
  33. package/dist/assets/{maplibre-gl-DVmJFhI2.js → maplibre-gl-CENyyZ0G.js} +1 -1
  34. package/dist/assets/plugins-core-BV7ym-7D.js +8 -0
  35. package/dist/assets/plugins-views-gxDbTdkX.js +62 -0
  36. package/dist/assets/{ui-components-CxztIKgM.css → ui-components-BCiSmwiC.css} +1 -1
  37. package/dist/assets/ui-components-BRpbeVr1.js +36 -0
  38. package/dist/assets/ui-layout-VeUu0ZVf.js +1 -0
  39. package/dist/assets/vendor-charts-DthMRf4E.js +60 -0
  40. package/dist/assets/{vendor-dndkit-CX1oDZqy.js → vendor-dndkit-_-PfuStg.js} +1 -1
  41. package/dist/assets/vendor-i18n-B3GHNV0X.js +9 -0
  42. package/dist/assets/{vendor-icons-ndICq8DC.js → vendor-icons-CnLeuN7Z.js} +3419 -3414
  43. package/dist/assets/vendor-objectstack-BkRCrdfn.js +34 -0
  44. package/dist/assets/vendor-radix-BPVlBHPl.js +56 -0
  45. package/dist/assets/{vendor-react-9M-xu2bR.js → vendor-react-Dvo_9NuO.js} +6 -6
  46. package/dist/assets/{vendor-ui-utils-3tkeUVaX.js → vendor-ui-utils-CU11aiRA.js} +1 -1
  47. package/dist/assets/vendor-zod-CZmssJWz.js +39 -0
  48. package/dist/index.html +23 -23
  49. package/package.json +40 -40
  50. package/dist/assets/CreateAppPage-DLRU3TEg.js +0 -1
  51. package/dist/assets/RecordDetailView-BNnPf0DG.js +0 -1
  52. package/dist/assets/data-adapter-Bif-TtZA.js +0 -1
  53. package/dist/assets/index-h9Jznm67.css +0 -1
  54. package/dist/assets/infrastructure-Dn7jNPwf.js +0 -1
  55. package/dist/assets/plugins-core-CP8uPw4p.js +0 -8
  56. package/dist/assets/plugins-views-DZCu8Ex3.js +0 -62
  57. package/dist/assets/ui-components-BE4yvyhE.js +0 -36
  58. package/dist/assets/ui-layout-CYnH69Z2.js +0 -1
  59. package/dist/assets/vendor-charts-BLNOCZWl.js +0 -65
  60. package/dist/assets/vendor-i18n-E3-WitRV.js +0 -9
  61. package/dist/assets/vendor-objectstack-CatrkstC.js +0 -34
  62. package/dist/assets/vendor-radix-C6qchjxv.js +0 -56
  63. package/dist/assets/vendor-zod-C5j6C2CQ.js +0 -39
@@ -1,4 +1,4 @@
1
- import{g as Rg}from"./vendor-react-9M-xu2bR.js";function Fg(Do,bu){for(var on=0;on<bu.length;on++){const Qi=bu[on];if(typeof Qi!="string"&&!Array.isArray(Qi)){for(const ln in Qi)if(ln!=="default"&&!(ln in Do)){const zo=Object.getOwnPropertyDescriptor(Qi,ln);zo&&Object.defineProperty(Do,ln,zo.get?zo:{enumerable:!0,get:()=>Qi[ln]})}}}return Object.freeze(Object.defineProperty(Do,Symbol.toStringTag,{value:"Module"}))}var vu={exports:{}};/**
1
+ import{g as Rg}from"./vendor-react-Dvo_9NuO.js";function Fg(Do,bu){for(var on=0;on<bu.length;on++){const Qi=bu[on];if(typeof Qi!="string"&&!Array.isArray(Qi)){for(const ln in Qi)if(ln!=="default"&&!(ln in Do)){const zo=Object.getOwnPropertyDescriptor(Qi,ln);zo&&Object.defineProperty(Do,ln,zo.get?zo:{enumerable:!0,get:()=>Qi[ln]})}}}return Object.freeze(Object.defineProperty(Do,Symbol.toStringTag,{value:"Module"}))}var vu={exports:{}};/**
2
2
  * MapLibre GL JS
3
3
  * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.19.0/LICENSE.txt
4
4
  */var Lg=vu.exports,of;function Bg(){return of||(of=1,(function(Do,bu){(function(on,Qi){Do.exports=Qi()})(Lg,(function(){var on={},Qi={};function ln(R,c,Ie){if(Qi[R]=Ie,R==="index"){var xr="var sharedModule = {}; ("+Qi.shared+")(sharedModule); ("+Qi.worker+")(sharedModule);",Ii={};return Qi.shared(Ii),Qi.index(on,Ii),typeof window<"u"&&on.setWorkerUrl(window.URL.createObjectURL(new Blob([xr],{type:"text/javascript"}))),on}}ln("shared",["exports"],(function(R){function c(r,e,i,s){return new(i||(i=Promise))((function(o,u){function h(y){try{g(s.next(y))}catch(v){u(v)}}function f(y){try{g(s.throw(y))}catch(v){u(v)}}function g(y){var v;y.done?o(y.value):(v=y.value,v instanceof i?v:new i((function(b){b(v)}))).then(h,f)}g((s=s.apply(r,e||[])).next())}))}function Ie(r,e){this.x=r,this.y=e}function xr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ii,cn;typeof SuppressedError=="function"&&SuppressedError,Ie.prototype={clone(){return new Ie(this.x,this.y)},add(r){return this.clone()._add(r)},sub(r){return this.clone()._sub(r)},multByPoint(r){return this.clone()._multByPoint(r)},divByPoint(r){return this.clone()._divByPoint(r)},mult(r){return this.clone()._mult(r)},div(r){return this.clone()._div(r)},rotate(r){return this.clone()._rotate(r)},rotateAround(r,e){return this.clone()._rotateAround(r,e)},matMult(r){return this.clone()._matMult(r)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(r){return this.x===r.x&&this.y===r.y},dist(r){return Math.sqrt(this.distSqr(r))},distSqr(r){const e=r.x-this.x,i=r.y-this.y;return e*e+i*i},angle(){return Math.atan2(this.y,this.x)},angleTo(r){return Math.atan2(this.y-r.y,this.x-r.x)},angleWith(r){return this.angleWithSep(r.x,r.y)},angleWithSep(r,e){return Math.atan2(this.x*e-this.y*r,this.x*r+this.y*e)},_matMult(r){const e=r[2]*this.x+r[3]*this.y;return this.x=r[0]*this.x+r[1]*this.y,this.y=e,this},_add(r){return this.x+=r.x,this.y+=r.y,this},_sub(r){return this.x-=r.x,this.y-=r.y,this},_mult(r){return this.x*=r,this.y*=r,this},_div(r){return this.x/=r,this.y/=r,this},_multByPoint(r){return this.x*=r.x,this.y*=r.y,this},_divByPoint(r){return this.x/=r.x,this.y/=r.y,this},_unit(){return this._div(this.mag()),this},_perp(){const r=this.y;return this.y=this.x,this.x=-r,this},_rotate(r){const e=Math.cos(r),i=Math.sin(r),s=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=s,this},_rotateAround(r,e){const i=Math.cos(r),s=Math.sin(r),o=e.y+s*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-s*(this.y-e.y),this.y=o,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:Ie},Ie.convert=function(r){if(r instanceof Ie)return r;if(Array.isArray(r))return new Ie(+r[0],+r[1]);if(r.x!==void 0&&r.y!==void 0)return new Ie(+r.x,+r.y);throw new Error("Expected [x, y] or {x, y} point format")};var ws=(function(){if(cn)return Ii;function r(e,i,s,o){this.cx=3*e,this.bx=3*(s-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(o-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=i,this.p2x=s,this.p2y=o}return cn=1,Ii=r,r.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,i){if(i===void 0&&(i=1e-6),e<0)return 0;if(e>1)return 1;for(var s=e,o=0;o<8;o++){var u=this.sampleCurveX(s)-e;if(Math.abs(u)<i)return s;var h=this.sampleCurveDerivativeX(s);if(Math.abs(h)<1e-6)break;s-=u/h}var f=0,g=1;for(s=e,o=0;o<20&&(u=this.sampleCurveX(s),!(Math.abs(u-e)<i));o++)e>u?f=s:g=s,s=.5*(g-f)+f;return s},solve:function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))}},Ii})(),Yt=xr(ws);let Ur,Je;function pe(){return Ur==null&&(Ur=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Ur}function jn(){if(Je==null&&(Je=!1,pe())){const e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let s=0;s<25;s++){const o=4*s;e.fillStyle=`rgb(${o},${o+1},${o+2})`,e.fillRect(s%5,Math.floor(s/5),1,1)}const i=e.getImageData(0,0,5,5).data;for(let s=0;s<100;s++)if(s%4!=3&&i[s]!==s){Je=!0;break}}}return Je||!1}var St=1e-6,ft=typeof Float32Array<"u"?Float32Array:Array;function un(){var r=new ft(9);return ft!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function Nn(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function Ts(){var r=new ft(3);return ft!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function Ei(r){var e=r[0],i=r[1],s=r[2];return Math.sqrt(e*e+i*i+s*s)}function Ss(r,e,i){var s=new ft(3);return s[0]=r,s[1]=e,s[2]=i,s}function lr(r,e,i){return r[0]=e[0]+i[0],r[1]=e[1]+i[1],r[2]=e[2]+i[2],r}function Gr(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r}function hn(r,e,i){var s=e[0],o=e[1],u=e[2],h=i[0],f=i[1],g=i[2];return r[0]=o*g-u*f,r[1]=u*h-s*g,r[2]=s*f-o*h,r}var qr,cr=Ei;function Zr(r,e,i){var s=e[0],o=e[1],u=e[2],h=e[3];return r[0]=i[0]*s+i[4]*o+i[8]*u+i[12]*h,r[1]=i[1]*s+i[5]*o+i[9]*u+i[13]*h,r[2]=i[2]*s+i[6]*o+i[10]*u+i[14]*h,r[3]=i[3]*s+i[7]*o+i[11]*u+i[15]*h,r}function Ps(){var r=new ft(4);return ft!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r[3]=1,r}function Un(r,e,i,s){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",u=Math.PI/360;e*=u,s*=u,i*=u;var h=Math.sin(e),f=Math.cos(e),g=Math.sin(i),y=Math.cos(i),v=Math.sin(s),b=Math.cos(s);switch(o){case"xyz":r[0]=h*y*b+f*g*v,r[1]=f*g*b-h*y*v,r[2]=f*y*v+h*g*b,r[3]=f*y*b-h*g*v;break;case"xzy":r[0]=h*y*b-f*g*v,r[1]=f*g*b-h*y*v,r[2]=f*y*v+h*g*b,r[3]=f*y*b+h*g*v;break;case"yxz":r[0]=h*y*b+f*g*v,r[1]=f*g*b-h*y*v,r[2]=f*y*v-h*g*b,r[3]=f*y*b+h*g*v;break;case"yzx":r[0]=h*y*b+f*g*v,r[1]=f*g*b+h*y*v,r[2]=f*y*v-h*g*b,r[3]=f*y*b-h*g*v;break;case"zxy":r[0]=h*y*b-f*g*v,r[1]=f*g*b+h*y*v,r[2]=f*y*v+h*g*b,r[3]=f*y*b-h*g*v;break;case"zyx":r[0]=h*y*b-f*g*v,r[1]=f*g*b+h*y*v,r[2]=f*y*v-h*g*b,r[3]=f*y*b+h*g*v;break;default:throw new Error("Unknown angle order "+o)}return r}function vr(){var r=new ft(2);return ft!=Float32Array&&(r[0]=0,r[1]=0),r}function Lt(r,e){var i=new ft(2);return i[0]=r,i[1]=e,i}Ts(),qr=new ft(4),ft!=Float32Array&&(qr[0]=0,qr[1]=0,qr[2]=0,qr[3]=0),Ts(),Ss(1,0,0),Ss(0,1,0),Ps(),Ps(),un(),vr();const it=8192;function dn(r,e,i){return e*(it/(r.tileSize*Math.pow(2,i-r.tileID.overscaledZ)))}function ur(r,e){return(r%e+e)%e}function Ms(r,e,i){return r*(1-i)+e*i}function Gn(r){if(r<=0)return 0;if(r>=1)return 1;const e=r*r,i=e*r;return 4*(r<.5?i:3*(r-e)+i-.75)}function $r(r,e,i,s){const o=new Yt(r,e,i,s);return u=>o.solve(u)}const br=$r(.25,.1,.25,1);function Gi(r,e,i){return Math.min(i,Math.max(e,r))}function ii(r,e,i){const s=i-e,o=((r-e)%s+s)%s+e;return o===e?i:o}function vi(r,...e){for(const i of e)for(const s in i)r[s]=i[s];return r}let qn=1;function pn(r,e,i){const s={};for(const o in r)s[o]=e.call(this,r[o],o,r);return s}function fn(r,e,i){const s={};for(const o in r)e.call(this,r[o],o,r)&&(s[o]=r[o]);return s}function ri(r){return Array.isArray(r)?r.map(ri):typeof r=="object"&&r?pn(r,ri):r}const Ta={};function ni(r){Ta[r]||(typeof console<"u"&&console.warn(r),Ta[r]=!0)}function Ci(r,e,i){return(i.y-r.y)*(e.x-r.x)>(e.y-r.y)*(i.x-r.x)}function hr(r){return typeof WorkerGlobalScope<"u"&&r!==void 0&&r instanceof WorkerGlobalScope}let mt=null;function mn(r){return typeof ImageBitmap<"u"&&r instanceof ImageBitmap}const Zn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function gn(r,e,i,s,o){return c(this,void 0,void 0,(function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const u=new VideoFrame(r,{timestamp:0});try{const h=u?.format;if(!h||!h.startsWith("BGR")&&!h.startsWith("RGB"))throw new Error(`Unrecognized format ${h}`);const f=h.startsWith("BGR"),g=new Uint8ClampedArray(s*o*4);if(yield u.copyTo(g,(function(y,v,b,S,P){const E=4*Math.max(-v,0),A=(Math.max(0,b)-b)*S*4+E,k=4*S,O=Math.max(0,v),G=Math.max(0,b);return{rect:{x:O,y:G,width:Math.min(y.width,v+S)-O,height:Math.min(y.height,b+P)-G},layout:[{offset:A,stride:k}]}})(r,e,i,s,o)),f)for(let y=0;y<g.length;y+=4){const v=g[y];g[y]=g[y+2],g[y+2]=v}return g}finally{u.close()}}))}let Wr,dr;function Hr(r,e,i,s){return r.addEventListener(e,i,s),{unsubscribe:()=>{r.removeEventListener(e,i,s)}}}function _n(r){return r*Math.PI/180}function wr(r){return r/Math.PI*180}const Tr={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},Xr={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},$n="AbortError";class Is extends Error{constructor(e=$n){super(e instanceof Error?e.message:e),this.name=$n,e instanceof Error&&e.stack&&(this.stack=e.stack)}}function Wn(r){return r.name===$n}const ie={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function C(r){return ie.REGISTERED_PROTOCOLS[r.substring(0,r.indexOf("://"))]}const z="global-dispatcher";class L extends Error{constructor(e,i,s,o){super(`AJAXError: ${i} (${e}): ${s}`),this.status=e,this.statusText=i,this.url=s,this.body=o}}const $=()=>hr(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,J=function(r,e){if(/:\/\//.test(r.url)&&!/^https?:|^file:/.test(r.url)){const s=C(r.url);if(s)return s(r,e);if(hr(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:r,targetMapId:z},e)}if(!(/^file:/.test(i=r.url)||/^file:/.test($())&&!/^\w+:/.test(i))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return(function(s,o){return c(this,void 0,void 0,(function*(){const u=new Request(s.url,{method:s.method||"GET",body:s.body,credentials:s.credentials,headers:s.headers,cache:s.cache,referrer:$(),signal:o.signal});let h,f;s.type!=="json"||u.headers.has("Accept")||u.headers.set("Accept","application/json");try{h=yield fetch(u)}catch(y){throw Wn(y)?y:new L(0,y.message,s.url,new Blob)}if(!h.ok){const y=yield h.blob();throw new L(h.status,h.statusText,s.url,y)}f=s.type==="arrayBuffer"||s.type==="image"?h.arrayBuffer():s.type==="json"?h.json():h.text();const g=yield f;return o.signal.throwIfAborted(),{data:g,cacheControl:h.headers.get("Cache-Control"),expires:h.headers.get("Expires")}}))})(r,e);if(hr(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:r,mustQueue:!0,targetMapId:z},e)}var i;return(function(s,o){return new Promise(((u,h)=>{var f;const g=new XMLHttpRequest;g.open(s.method||"GET",s.url,!0),s.type!=="arrayBuffer"&&s.type!=="image"||(g.responseType="arraybuffer");for(const y in s.headers)g.setRequestHeader(y,s.headers[y]);s.type==="json"&&(g.responseType="text",!((f=s.headers)===null||f===void 0)&&f.Accept||g.setRequestHeader("Accept","application/json")),g.withCredentials=s.credentials==="include",g.onerror=()=>{h(new Error(g.statusText))},g.onload=()=>{if(!o.signal.aborted)if((g.status>=200&&g.status<300||g.status===0)&&g.response!==null){let y=g.response;if(s.type==="json")try{y=JSON.parse(g.response)}catch(v){return void h(v)}u({data:y,cacheControl:g.getResponseHeader("Cache-Control"),expires:g.getResponseHeader("Expires")})}else{const y=new Blob([g.response],{type:g.getResponseHeader("Content-Type")});h(new L(g.status,g.statusText,s.url,y))}},o.signal.addEventListener("abort",(()=>{g.abort(),h(new Is(o.signal.reason))})),g.send(s.body)}))})(r,e)};function se(r){if(!r||r.indexOf("://")<=0||r.indexOf("data:image/")===0||r.indexOf("blob:")===0)return!0;const e=new URL(r),i=window.location;return e.protocol===i.protocol&&e.host===i.host}function oe(r,e,i){i[r]&&i[r].indexOf(e)!==-1||(i[r]=i[r]||[],i[r].push(e))}function re(r,e,i){if(i&&i[r]){const s=i[r].indexOf(e);s!==-1&&i[r].splice(s,1)}}class ne{constructor(e,i={}){vi(this,i),this.type=e}}class ve extends ne{constructor(e,i={}){super("error",vi({error:e},i))}}class fe{on(e,i){return this._listeners=this._listeners||{},oe(e,i,this._listeners),{unsubscribe:()=>{this.off(e,i)}}}off(e,i){return re(e,i,this._listeners),re(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},oe(e,i,this._oneTimeListeners),this):new Promise((s=>this.once(e,s)))}fire(e,i){typeof e=="string"&&(e=new ne(e,i||{}));const s=e.type;if(this.listens(s)){e.target=this;const o=this._listeners&&this._listeners[s]?this._listeners[s].slice():[];for(const f of o)f.call(this,e);const u=this._oneTimeListeners&&this._oneTimeListeners[s]?this._oneTimeListeners[s].slice():[];for(const f of u)re(s,f,this._oneTimeListeners),f.call(this,e);const h=this._eventedParent;h&&(vi(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),h.fire(e))}else e instanceof ve&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,i){return this._eventedParent=e,this._eventedParentData=i,this}}var K={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};const Re=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ne(r,e){const i={};for(const s in r)s!=="ref"&&(i[s]=r[s]);return Re.forEach((s=>{s in e&&(i[s]=e[s])})),i}function Be(r,e){if(Array.isArray(r)){if(!Array.isArray(e)||r.length!==e.length)return!1;for(let i=0;i<r.length;i++)if(!Be(r[i],e[i]))return!1;return!0}if(typeof r=="object"&&r!==null&&e!==null){if(typeof e!="object"||Object.keys(r).length!==Object.keys(e).length)return!1;for(const i in r)if(!Be(r[i],e[i]))return!1;return!0}return r===e}function je(r,e){r.push(e)}function Ve(r,e,i){je(i,{command:"addSource",args:[r,e[r]]})}function $e(r,e,i){je(e,{command:"removeSource",args:[r]}),i[r]=!0}function At(r,e,i,s){$e(r,i,s),Ve(r,e,i)}function ut(r,e,i){let s;for(s in r[i])if(Object.prototype.hasOwnProperty.call(r[i],s)&&s!=="data"&&!Be(r[i][s],e[i][s]))return!1;for(s in e[i])if(Object.prototype.hasOwnProperty.call(e[i],s)&&s!=="data"&&!Be(r[i][s],e[i][s]))return!1;return!0}function Dt(r,e,i,s,o,u){r=r||{},e=e||{};for(const h in r)Object.prototype.hasOwnProperty.call(r,h)&&(Be(r[h],e[h])||i.push({command:u,args:[s,h,e[h],o]}));for(const h in e)Object.prototype.hasOwnProperty.call(e,h)&&!Object.prototype.hasOwnProperty.call(r,h)&&(Be(r[h],e[h])||i.push({command:u,args:[s,h,e[h],o]}))}function Kt(r){return r.id}function Pt(r,e){return r[e.id]=e,r}class we{constructor(e,i,s,o){this.message=(e?`${e}: `:"")+s,o&&(this.identifier=o),i!=null&&i.__line__&&(this.line=i.__line__)}}function tt(r,...e){for(const i of e)for(const s in i)r[s]=i[s];return r}class gt extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}class yn{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[s,o]of i)this.bindings[s]=o}concat(e){return new yn(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}const Sr={kind:"null"},Te={kind:"number"},Ue={kind:"string"},Ge={kind:"boolean"},qi={kind:"color"},Hn={kind:"projectionDefinition"},xn={kind:"object"},We={kind:"value"},Xn={kind:"collator"},Yn={kind:"formatted"},Sa={kind:"padding"},Es={kind:"colorArray"},Cs={kind:"numberArray"},Kn={kind:"resolvedImage"},As={kind:"variableAnchorOffsetCollection"};function bi(r,e){return{kind:"array",itemType:r,N:e}}function dt(r){if(r.kind==="array"){const e=dt(r.itemType);return typeof r.N=="number"?`array<${e}, ${r.N}>`:r.itemType.kind==="value"?"array":`array<${e}>`}return r.kind}const vn=[Sr,Te,Ue,Ge,qi,Hn,Yn,xn,bi(We),Sa,Cs,Es,Kn,As];function Yr(r,e){if(e.kind==="error")return null;if(r.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!Yr(r.itemType,e.itemType))&&(typeof r.N!="number"||r.N===e.N))return null}else{if(r.kind===e.kind)return null;if(r.kind==="value"){for(const i of vn)if(!Yr(i,e))return null}}return`Expected ${dt(r)} but found ${dt(e)} instead.`}function Pa(r,e){return e.some((i=>i.kind===r.kind))}function Pr(r,e){return e.some((i=>i==="null"?r===null:i==="array"?Array.isArray(r):i==="object"?r&&!Array.isArray(r)&&typeof r=="object":i===typeof r))}function Kr(r,e){return r.kind==="array"&&e.kind==="array"?r.itemType.kind===e.itemType.kind&&typeof r.N=="number":r.kind===e.kind}const Ds=.96422,Gl=.82521,bn=4/29,Jr=6/29,Ut=3*Jr*Jr,wu=Jr*Jr*Jr,ql=Math.PI/180,zs=180/Math.PI;function ko(r){return(r%=360)<0&&(r+=360),r}function Zl([r,e,i,s]){let o,u;const h=Ma((.2225045*(r=Ro(r))+.7168786*(e=Ro(e))+.0606169*(i=Ro(i)))/1);r===e&&e===i?o=u=h:(o=Ma((.4360747*r+.3850649*e+.1430804*i)/Ds),u=Ma((.0139322*r+.0971045*e+.7141733*i)/Gl));const f=116*h-16;return[f<0?0:f,500*(o-h),200*(h-u),s]}function Ro(r){return r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function Ma(r){return r>wu?Math.pow(r,1/3):r/Ut+bn}function $l([r,e,i,s]){let o=(r+16)/116,u=isNaN(e)?o:o+e/500,h=isNaN(i)?o:o-i/200;return o=1*Fo(o),u=Ds*Fo(u),h=Gl*Fo(h),[Ia(3.1338561*u-1.6168667*o-.4906146*h),Ia(-.9787684*u+1.9161415*o+.033454*h),Ia(.0719453*u-.2289914*o+1.4052427*h),s]}function Ia(r){return(r=r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055)<0?0:r>1?1:r}function Fo(r){return r>Jr?r*r*r:Ut*(r-bn)}const Tu=Object.hasOwn||function(r,e){return Object.prototype.hasOwnProperty.call(r,e)};function ks(r,e){return Tu(r,e)?r[e]:void 0}function Ea(r){return parseInt(r.padEnd(2,r),16)/255}function Wl(r,e){return Jn(e?r/100:r,0,1)}function Jn(r,e,i){return Math.min(Math.max(e,r),i)}function Hl(r){return!r.some(Number.isNaN)}const Xl={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function Zi(r,e,i){return r+i*(e-r)}function Qn(r,e,i){return r.map(((s,o)=>Zi(s,e[o],i)))}class Ye{constructor(e,i,s,o=1,u=!0){this.r=e,this.g=i,this.b=s,this.a=o,u||(this.r*=o,this.g*=o,this.b*=o,o||this.overwriteGetter("rgb",[e,i,s,o]))}static parse(e){if(e instanceof Ye)return e;if(typeof e!="string")return;const i=(function(s){if((s=s.toLowerCase().trim())==="transparent")return[0,0,0,0];const o=ks(Xl,s);if(o){const[h,f,g]=o;return[h/255,f/255,g/255,1]}if(s.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(s)){const h=s.length<6?1:2;let f=1;return[Ea(s.slice(f,f+=h)),Ea(s.slice(f,f+=h)),Ea(s.slice(f,f+=h)),Ea(s.slice(f,f+h)||"ff")]}if(s.startsWith("rgb")){const h=s.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(h){const[f,g,y,v,b,S,P,E,A,k,O,G]=h,B=[v||" ",P||" ",k].join("");if(B===" "||B===" /"||B===",,"||B===",,,"){const V=[y,S,A].join(""),H=V==="%%%"?100:V===""?255:0;if(H){const ee=[Jn(+g/H,0,1),Jn(+b/H,0,1),Jn(+E/H,0,1),O?Wl(+O,G):1];if(Hl(ee))return ee}}return}}const u=s.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(u){const[h,f,g,y,v,b,S,P,E]=u,A=[g||" ",v||" ",S].join("");if(A===" "||A===" /"||A===",,"||A===",,,"){const k=[+f,Jn(+y,0,100),Jn(+b,0,100),P?Wl(+P,E):1];if(Hl(k))return(function([O,G,B,V]){function H(ee){const ae=(ee+O/30)%12,ge=G*Math.min(B,1-B);return B-ge*Math.max(-1,Math.min(ae-3,9-ae,1))}return O=ko(O),G/=100,B/=100,[H(0),H(8),H(4),V]})(k)}}})(e);return i?new Ye(...i,!1):void 0}get rgb(){const{r:e,g:i,b:s,a:o}=this,u=o||1/0;return this.overwriteGetter("rgb",[e/u,i/u,s/u,o])}get hcl(){return this.overwriteGetter("hcl",(function(e){const[i,s,o,u]=Zl(e),h=Math.sqrt(s*s+o*o);return[Math.round(1e4*h)?ko(Math.atan2(o,s)*zs):NaN,h,i,u]})(this.rgb))}get lab(){return this.overwriteGetter("lab",Zl(this.rgb))}overwriteGetter(e,i){return Object.defineProperty(this,e,{value:i}),i}toString(){const[e,i,s,o]=this.rgb;return`rgba(${[e,i,s].map((u=>Math.round(255*u))).join(",")},${o})`}static interpolate(e,i,s,o="rgb"){switch(o){case"rgb":{const[u,h,f,g]=Qn(e.rgb,i.rgb,s);return new Ye(u,h,f,g,!1)}case"hcl":{const[u,h,f,g]=e.hcl,[y,v,b,S]=i.hcl;let P,E;if(isNaN(u)||isNaN(y))isNaN(u)?isNaN(y)?P=NaN:(P=y,f!==1&&f!==0||(E=v)):(P=u,b!==1&&b!==0||(E=h));else{let B=y-u;y>u&&B>180?B-=360:y<u&&u-y>180&&(B+=360),P=u+s*B}const[A,k,O,G]=(function([B,V,H,ee]){return B=isNaN(B)?0:B*ql,$l([H,Math.cos(B)*V,Math.sin(B)*V,ee])})([P,E??Zi(h,v,s),Zi(f,b,s),Zi(g,S,s)]);return new Ye(A,k,O,G,!1)}case"lab":{const[u,h,f,g]=$l(Qn(e.lab,i.lab,s));return new Ye(u,h,f,g,!1)}}}}Ye.black=new Ye(0,0,0,1),Ye.white=new Ye(1,1,1,1),Ye.transparent=new Ye(0,0,0,0),Ye.red=new Ye(1,0,0,1);class wn{constructor(e,i,s){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,i){return this.collator.compare(e,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const Su=["bottom","center","top"];class Lo{constructor(e,i,s,o,u,h){this.text=e,this.image=i,this.scale=s,this.fontStack=o,this.textColor=u,this.verticalAlign=h}}class Ai{constructor(e){this.sections=e}static fromString(e){return new Ai([new Lo(e,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some((e=>e.text.length!==0||e.image&&e.image.name.length!==0))}static factory(e){return e instanceof Ai?e:Ai.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map((e=>e.text)).join("")}}class si{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof si)return e;if(typeof e=="number")return new si([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const i of e)if(typeof i!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new si(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,i,s){return new si(Qn(e.values,i.values,s))}}class ai{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof ai)return e;if(typeof e=="number")return new ai([e]);if(Array.isArray(e)){for(const i of e)if(typeof i!="number")return;return new ai(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,i,s){return new ai(Qn(e.values,i.values,s))}}class pt{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof pt)return e;if(typeof e=="string"){const s=Ye.parse(e);return s?new pt([s]):void 0}if(!Array.isArray(e))return;const i=[];for(const s of e){if(typeof s!="string")return;const o=Ye.parse(s);if(!o)return;i.push(o)}return new pt(i)}toString(){return JSON.stringify(this.values)}static interpolate(e,i,s,o="rgb"){const u=[];if(e.values.length!=i.values.length)throw new Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${i.values.length}), cannot interpolate.`);for(let h=0;h<e.values.length;h++)u.push(Ye.interpolate(e.values[h],i.values[h],s,o));return new pt(u)}}class Le extends Error{constructor(e){super(e),this.name="RuntimeError"}toJSON(){return this.message}}const es=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Bt{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Bt)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let i=0;i<e.length;i+=2){const s=e[i],o=e[i+1];if(typeof s!="string"||!es.has(s)||!Array.isArray(o)||o.length!==2||typeof o[0]!="number"||typeof o[1]!="number")return}return new Bt(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,i,s){const o=e.values,u=i.values;if(o.length!==u.length)throw new Le(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${i.toString()}`);const h=[];for(let f=0;f<o.length;f+=2){if(o[f]!==u[f])throw new Le(`Cannot interpolate values containing mismatched anchors. from[${f}]: ${o[f]}, to[${f}]: ${u[f]}`);h.push(o[f]);const[g,y]=o[f+1],[v,b]=u[f+1];h.push([Zi(g,v,s),Zi(y,b,s)])}return new Bt(h)}}class Di{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Di({name:e,available:!1}):null}}class wi{constructor(e,i,s){this.from=e,this.to=i,this.transition=s}static interpolate(e,i,s){return new wi(e,i,s)}static parse(e){return e instanceof wi?e:Array.isArray(e)&&e.length===3&&typeof e[0]=="string"&&typeof e[1]=="string"&&typeof e[2]=="number"?new wi(e[0],e[1],e[2]):typeof e=="object"&&typeof e.from=="string"&&typeof e.to=="string"&&typeof e.transition=="number"?new wi(e.from,e.to,e.transition):typeof e=="string"?new wi(e,e,1):void 0}}function Ca(r,e,i,s){return typeof r=="number"&&r>=0&&r<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:`Invalid rgba value [${[r,e,i,s].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof s=="number"?[r,e,i,s]:[r,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Mr(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof wi||r instanceof Ye||r instanceof wn||r instanceof Ai||r instanceof si||r instanceof ai||r instanceof pt||r instanceof Bt||r instanceof Di)return!0;if(Array.isArray(r)){for(const e of r)if(!Mr(e))return!1;return!0}if(typeof r=="object"){for(const e in r)if(!Mr(r[e]))return!1;return!0}return!1}function bt(r){if(r===null)return Sr;if(typeof r=="string")return Ue;if(typeof r=="boolean")return Ge;if(typeof r=="number")return Te;if(r instanceof Ye)return qi;if(r instanceof wi)return Hn;if(r instanceof wn)return Xn;if(r instanceof Ai)return Yn;if(r instanceof si)return Sa;if(r instanceof ai)return Cs;if(r instanceof pt)return Es;if(r instanceof Bt)return As;if(r instanceof Di)return Kn;if(Array.isArray(r)){const e=r.length;let i;for(const s of r){const o=bt(s);if(i){if(i===o)continue;i=We;break}i=o}return bi(i||We,e)}return xn}function ts(r){const e=typeof r;return r===null?"":e==="string"||e==="number"||e==="boolean"?String(r):r instanceof Ye||r instanceof wi||r instanceof Ai||r instanceof si||r instanceof ai||r instanceof pt||r instanceof Bt||r instanceof Di?r.toString():JSON.stringify(r)}class Ir{constructor(e,i){this.type=e,this.value=i}static parse(e,i){if(e.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!Mr(e[1]))return i.error("invalid value");const s=e[1];let o=bt(s);const u=i.expectedType;return o.kind!=="array"||o.N!==0||!u||u.kind!=="array"||typeof u.N=="number"&&u.N!==0||(o=u),new Ir(o,s)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const Tn={string:Ue,number:Te,boolean:Ge,object:xn};class er{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");let s,o=1;const u=e[0];if(u==="array"){let f,g;if(e.length>2){const y=e[1];if(typeof y!="string"||!(y in Tn)||y==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);f=Tn[y],o++}else f=We;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return i.error('The length argument to "array" must be a positive integer literal',2);g=e[2],o++}s=bi(f,g)}else{if(!Tn[u])throw new Error(`Types doesn't contain name = ${u}`);s=Tn[u]}const h=[];for(;o<e.length;o++){const f=i.parse(e[o],o,We);if(!f)return null;h.push(f)}return new er(s,h)}evaluate(e){for(let i=0;i<this.args.length;i++){const s=this.args[i].evaluate(e);if(!Yr(this.type,bt(s)))return s;if(i===this.args.length-1)throw new Le(`Expected value to be of type ${dt(this.type)}, but found ${dt(bt(s))} instead.`)}throw new Error}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}const Rs={"to-boolean":Ge,"to-color":qi,"to-number":Te,"to-string":Ue};class zi{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const s=e[0];if(!Rs[s])throw new Error(`Can't parse ${s} as it is not part of the known types`);if((s==="to-boolean"||s==="to-string")&&e.length!==2)return i.error("Expected one argument.");const o=Rs[s],u=[];for(let h=1;h<e.length;h++){const f=i.parse(e[h],h,We);if(!f)return null;u.push(f)}return new zi(o,u)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let i,s;for(const o of this.args){if(i=o.evaluate(e),s=null,i instanceof Ye)return i;if(typeof i=="string"){const u=e.parseColor(i);if(u)return u}else if(Array.isArray(i)&&(s=i.length<3||i.length>4?`Invalid rgba value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Ca(i[0],i[1],i[2],i[3]),!s))return new Ye(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Le(s||`Could not parse color from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"padding":{let i;for(const s of this.args){i=s.evaluate(e);const o=si.parse(i);if(o)return o}throw new Le(`Could not parse padding from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"numberArray":{let i;for(const s of this.args){i=s.evaluate(e);const o=ai.parse(i);if(o)return o}throw new Le(`Could not parse numberArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"colorArray":{let i;for(const s of this.args){i=s.evaluate(e);const o=pt.parse(i);if(o)return o}throw new Le(`Could not parse colorArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"variableAnchorOffsetCollection":{let i;for(const s of this.args){i=s.evaluate(e);const o=Bt.parse(i);if(o)return o}throw new Le(`Could not parse variableAnchorOffsetCollection from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"number":{let i=null;for(const s of this.args){if(i=s.evaluate(e),i===null)return 0;const o=Number(i);if(!isNaN(o))return o}throw new Le(`Could not convert ${JSON.stringify(i)} to number.`)}case"formatted":return Ai.fromString(ts(this.args[0].evaluate(e)));case"resolvedImage":return Di.fromString(ts(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return ts(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}const Yl=["Unknown","Point","LineString","Polygon"];class Bo{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Yl[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let i=this._parseColorCache.get(e);return i||(i=Ye.parse(e),this._parseColorCache.set(e,i)),i}}class Fs{constructor(e,i,s=[],o,u=new yn,h=[]){this.registry=e,this.path=s,this.key=s.map((f=>`[${f}]`)).join(""),this.scope=u,this.errors=h,this.expectedType=o,this._isConstant=i}parse(e,i,s,o,u={}){return i?this.concat(i,s,o)._parse(e,u):this._parse(e,u)}_parse(e,i){function s(o,u,h){return h==="assert"?new er(u,[o]):h==="coerce"?new zi(u,[o]):o}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const o=e[0];if(typeof o!="string")return this.error(`Expression name must be a string, but found ${typeof o} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const u=this.registry[o];if(u){let h=u.parse(e,this);if(!h)return null;if(this.expectedType){const f=this.expectedType,g=h.type;if(f.kind!=="string"&&f.kind!=="number"&&f.kind!=="boolean"&&f.kind!=="object"&&f.kind!=="array"||g.kind!=="value"){if(f.kind==="projectionDefinition"&&["string","array"].includes(g.kind)||["color","formatted","resolvedImage"].includes(f.kind)&&["value","string"].includes(g.kind)||["padding","numberArray"].includes(f.kind)&&["value","number","array"].includes(g.kind)||f.kind==="colorArray"&&["value","string","array"].includes(g.kind)||f.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(g.kind))h=s(h,f,i.typeAnnotation||"coerce");else if(this.checkSubtype(f,g))return null}else h=s(h,f,i.typeAnnotation||"assert")}if(!(h instanceof Ir)&&h.type.kind!=="resolvedImage"&&this._isConstant(h)){const f=new Bo;try{h=new Ir(h.type,h.evaluate(f))}catch(g){return this.error(g.message),null}}return h}return this.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,i,s){const o=typeof e=="number"?this.path.concat(e):this.path,u=s?this.scope.concat(s):this.scope;return new Fs(this.registry,this._isConstant,o,i||null,u,this.errors)}error(e,...i){const s=`${this.key}${i.map((o=>`[${o}]`)).join("")}`;this.errors.push(new gt(s,e))}checkSubtype(e,i){const s=Yr(e,i);return s&&this.error(s),s}}class Sn{constructor(e,i){this.type=i.type,this.bindings=[].concat(e),this.result=i}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const i of this.bindings)e(i[1]);e(this.result)}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const s=[];for(let u=1;u<e.length-1;u+=2){const h=e[u];if(typeof h!="string")return i.error(`Expected string, but found ${typeof h} instead.`,u);if(/[^a-zA-Z0-9_]/.test(h))return i.error("Variable names must contain only alphanumeric characters or '_'.",u);const f=i.parse(e[u+1],u+1);if(!f)return null;s.push([h,f])}const o=i.parse(e[e.length-1],e.length-1,i.expectedType,s);return o?new Sn(s,o):null}outputDefined(){return this.result.outputDefined()}}class ot{constructor(e,i){this.type=i.type,this.name=e,this.boundExpression=i}static parse(e,i){if(e.length!==2||typeof e[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const s=e[1];return i.scope.has(s)?new ot(s,i.scope.get(s)):i.error(`Unknown variable "${s}". Make sure "${s}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}}class Ls{constructor(e,i,s){this.type=e,this.index=i,this.input=s}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,Te),o=i.parse(e[2],2,bi(i.expectedType||We));return s&&o?new Ls(o.type.itemType,s,o):null}evaluate(e){const i=this.index.evaluate(e),s=this.input.evaluate(e);if(i<0)throw new Le(`Array index out of bounds: ${i} < 0.`);if(i>=s.length)throw new Le(`Array index out of bounds: ${i} > ${s.length-1}.`);if(i!==Math.floor(i))throw new Le(`Array index must be an integer, but found ${i} instead.`);return s[i]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class Ke{constructor(e,i){this.type=Ge,this.needle=e,this.haystack=i}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,We),o=i.parse(e[2],2,We);return s&&o?Pa(s.type,[Ge,Ue,Te,Sr,We])?new Ke(s,o):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${dt(s.type)} instead`):null}evaluate(e){const i=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!s)return!1;if(!Pr(i,["boolean","string","number","null"]))throw new Le(`Expected first argument to be of type boolean, string, number or null, but found ${dt(bt(i))} instead.`);if(!Pr(s,["string","array"]))throw new Le(`Expected second argument to be of type array or string, but found ${dt(bt(s))} instead.`);return s.indexOf(i)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class Ze{constructor(e,i,s){this.type=Te,this.needle=e,this.haystack=i,this.fromIndex=s}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,We),o=i.parse(e[2],2,We);if(!s||!o)return null;if(!Pa(s.type,[Ge,Ue,Te,Sr,We]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${dt(s.type)} instead`);if(e.length===4){const u=i.parse(e[3],3,Te);return u?new Ze(s,o,u):null}return new Ze(s,o)}evaluate(e){const i=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!Pr(i,["boolean","string","number","null"]))throw new Le(`Expected first argument to be of type boolean, string, number or null, but found ${dt(bt(i))} instead.`);let o;if(this.fromIndex&&(o=this.fromIndex.evaluate(e)),Pr(s,["string"])){const u=s.indexOf(i,o);return u===-1?-1:[...s.slice(0,u)].length}if(Pr(s,["array"]))return s.indexOf(i,o);throw new Le(`Expected second argument to be of type array or string, but found ${dt(bt(s))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class Bs{constructor(e,i,s,o,u,h){this.inputType=e,this.type=i,this.input=s,this.cases=o,this.outputs=u,this.otherwise=h}static parse(e,i){if(e.length<5)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return i.error("Expected an even number of arguments.");let s,o;i.expectedType&&i.expectedType.kind!=="value"&&(o=i.expectedType);const u={},h=[];for(let y=2;y<e.length-1;y+=2){let v=e[y];const b=e[y+1];Array.isArray(v)||(v=[v]);const S=i.concat(y);if(v.length===0)return S.error("Expected at least one branch label.");for(const E of v){if(typeof E!="number"&&typeof E!="string")return S.error("Branch labels must be numbers or strings.");if(typeof E=="number"&&Math.abs(E)>Number.MAX_SAFE_INTEGER)return S.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof E=="number"&&Math.floor(E)!==E)return S.error("Numeric branch labels must be integer values.");if(s){if(S.checkSubtype(s,bt(E)))return null}else s=bt(E);if(u[String(E)]!==void 0)return S.error("Branch labels must be unique.");u[String(E)]=h.length}const P=i.parse(b,y,o);if(!P)return null;o=o||P.type,h.push(P)}const f=i.parse(e[1],1,We);if(!f)return null;const g=i.parse(e[e.length-1],e.length-1,o);return g?f.type.kind!=="value"&&i.concat(1).checkSubtype(s,f.type)?null:new Bs(s,o,f,u,h,g):null}evaluate(e){const i=this.input.evaluate(e);return(bt(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))&&this.otherwise.outputDefined()}}class Qe{constructor(e,i,s){this.type=e,this.branches=i,this.otherwise=s}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return i.error("Expected an odd number of arguments.");let s;i.expectedType&&i.expectedType.kind!=="value"&&(s=i.expectedType);const o=[];for(let h=1;h<e.length-1;h+=2){const f=i.parse(e[h],h,Ge);if(!f)return null;const g=i.parse(e[h+1],h+1,s);if(!g)return null;o.push([f,g]),s=s||g.type}const u=i.parse(e[e.length-1],e.length-1,s);if(!u)return null;if(!s)throw new Error("Can't infer output type");return new Qe(s,o,u)}evaluate(e){for(const[i,s]of this.branches)if(i.evaluate(e))return s.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[i,s]of this.branches)e(i),e(s);e(this.otherwise)}outputDefined(){return this.branches.every((([e,i])=>i.outputDefined()))&&this.otherwise.outputDefined()}}class is{constructor(e,i,s,o){this.type=e,this.input=i,this.beginIndex=s,this.endIndex=o}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);const s=i.parse(e[1],1,We),o=i.parse(e[2],2,Te);if(!s||!o)return null;if(!Pa(s.type,[bi(We),Ue,We]))return i.error(`Expected first argument to be of type array or string, but found ${dt(s.type)} instead`);if(e.length===4){const u=i.parse(e[3],3,Te);return u?new is(s.type,s,o,u):null}return new is(s.type,s,o)}evaluate(e){const i=this.input.evaluate(e),s=this.beginIndex.evaluate(e);let o;if(this.endIndex&&(o=this.endIndex.evaluate(e)),Pr(i,["string"]))return[...i].slice(s,o).join("");if(Pr(i,["array"]))return i.slice(s,o);throw new Le(`Expected first argument to be of type array or string, but found ${dt(bt(i))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function $i(r,e){const i=r.length-1;let s,o,u=0,h=i,f=0;for(;u<=h;)if(f=Math.floor((u+h)/2),s=r[f],o=r[f+1],s<=e){if(f===i||e<o)return f;u=f+1}else{if(!(s>e))throw new Le("Input is not a number.");h=f-1}return 0}class Pn{constructor(e,i,s){this.type=e,this.input=i,this.labels=[],this.outputs=[];for(const[o,u]of s)this.labels.push(o),this.outputs.push(u)}static parse(e,i){if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");const s=i.parse(e[1],1,Te);if(!s)return null;const o=[];let u=null;i.expectedType&&i.expectedType.kind!=="value"&&(u=i.expectedType);for(let h=1;h<e.length;h+=2){const f=h===1?-1/0:e[h],g=e[h+1],y=h,v=h+1;if(typeof f!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',y);if(o.length&&o[o.length-1][0]>=f)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',y);const b=i.parse(g,v,u);if(!b)return null;u=u||b.type,o.push([f,b])}return new Pn(u,s,o)}evaluate(e){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(e);const o=this.input.evaluate(e);if(o<=i[0])return s[0].evaluate(e);const u=i.length;return o>=i[u-1]?s[u-1].evaluate(e):s[$i(i,o)].evaluate(e)}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}}function Aa(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Da,za,Kl=(function(){if(za)return Da;function r(e,i,s,o){this.cx=3*e,this.bx=3*(s-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(o-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=i,this.p2x=s,this.p2y=o}return za=1,Da=r,r.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,i){if(i===void 0&&(i=1e-6),e<0)return 0;if(e>1)return 1;for(var s=e,o=0;o<8;o++){var u=this.sampleCurveX(s)-e;if(Math.abs(u)<i)return s;var h=this.sampleCurveDerivativeX(s);if(Math.abs(h)<1e-6)break;s-=u/h}var f=0,g=1;for(s=e,o=0;o<20&&(u=this.sampleCurveX(s),!(Math.abs(u-e)<i));o++)e>u?f=s:g=s,s=.5*(g-f)+f;return s},solve:function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))}},Da})(),Pu=Aa(Kl);class di{constructor(e,i,s,o,u){this.type=e,this.operator=i,this.interpolation=s,this.input=o,this.labels=[],this.outputs=[];for(const[h,f]of u)this.labels.push(h),this.outputs.push(f)}static interpolationFactor(e,i,s,o){let u=0;if(e.name==="exponential")u=ka(i,e.base,s,o);else if(e.name==="linear")u=ka(i,1,s,o);else if(e.name==="cubic-bezier"){const h=e.controlPoints;u=new Pu(h[0],h[1],h[2],h[3]).solve(ka(i,1,s,o))}return u}static parse(e,i){let[s,o,u,...h]=e;if(!Array.isArray(o)||o.length===0)return i.error("Expected an interpolation type expression.",1);if(o[0]==="linear")o={name:"linear"};else if(o[0]==="exponential"){const y=o[1];if(typeof y!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);o={name:"exponential",base:y}}else{if(o[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(o[0])}`,1,0);{const y=o.slice(1);if(y.length!==4||y.some((v=>typeof v!="number"||v<0||v>1)))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);o={name:"cubic-bezier",controlPoints:y}}}if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(u=i.parse(u,2,Te),!u)return null;const f=[];let g=null;s!=="interpolate-hcl"&&s!=="interpolate-lab"||i.expectedType==Es?i.expectedType&&i.expectedType.kind!=="value"&&(g=i.expectedType):g=qi;for(let y=0;y<h.length;y+=2){const v=h[y],b=h[y+1],S=y+3,P=y+4;if(typeof v!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',S);if(f.length&&f[f.length-1][0]>=v)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',S);const E=i.parse(b,P,g);if(!E)return null;g=g||E.type,f.push([v,E])}return Kr(g,Te)||Kr(g,Hn)||Kr(g,qi)||Kr(g,Sa)||Kr(g,Cs)||Kr(g,Es)||Kr(g,As)||Kr(g,bi(Te))?new di(g,s,o,u,f):i.error(`Type ${dt(g)} is not interpolatable.`)}evaluate(e){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(e);const o=this.input.evaluate(e);if(o<=i[0])return s[0].evaluate(e);const u=i.length;if(o>=i[u-1])return s[u-1].evaluate(e);const h=$i(i,o),f=di.interpolationFactor(this.interpolation,o,i[h],i[h+1]),g=s[h].evaluate(e),y=s[h+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Zi(g,y,f);case"color":return Ye.interpolate(g,y,f);case"padding":return si.interpolate(g,y,f);case"colorArray":return pt.interpolate(g,y,f);case"numberArray":return ai.interpolate(g,y,f);case"variableAnchorOffsetCollection":return Bt.interpolate(g,y,f);case"array":return Qn(g,y,f);case"projectionDefinition":return wi.interpolate(g,y,f)}case"interpolate-hcl":switch(this.type.kind){case"color":return Ye.interpolate(g,y,f,"hcl");case"colorArray":return pt.interpolate(g,y,f,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Ye.interpolate(g,y,f,"lab");case"colorArray":return pt.interpolate(g,y,f,"lab")}}}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}}function ka(r,e,i,s){const o=s-i,u=r-i;return o===0?0:e===1?u/o:(Math.pow(e,u)-1)/(Math.pow(e,o)-1)}const Jt={color:Ye.interpolate,number:Zi,padding:si.interpolate,numberArray:ai.interpolate,colorArray:pt.interpolate,variableAnchorOffsetCollection:Bt.interpolate,array:Qn};class Gt{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");let s=null;const o=i.expectedType;o&&o.kind!=="value"&&(s=o);const u=[];for(const f of e.slice(1)){const g=i.parse(f,1+u.length,s,void 0,{typeAnnotation:"omit"});if(!g)return null;s=s||g.type,u.push(g)}if(!s)throw new Error("No output type");const h=o&&u.some((f=>Yr(o,f.type)));return new Gt(h?We:s,u)}evaluate(e){let i,s=null,o=0;for(const u of this.args)if(o++,s=u.evaluate(e),s&&s instanceof Di&&!s.available&&(i||(i=s.name),s=null,o===this.args.length&&(s=i)),s!==null)break;return s}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}function Os(r,e){return r==="=="||r==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function Oo(r,e,i,s){return s.compare(e,i)===0}function Er(r,e,i){const s=r!=="=="&&r!=="!=";return class lf{constructor(u,h,f){this.type=Ge,this.lhs=u,this.rhs=h,this.collator=f,this.hasUntypedArgument=u.type.kind==="value"||h.type.kind==="value"}static parse(u,h){if(u.length!==3&&u.length!==4)return h.error("Expected two or three arguments.");const f=u[0];let g=h.parse(u[1],1,We);if(!g)return null;if(!Os(f,g.type))return h.concat(1).error(`"${f}" comparisons are not supported for type '${dt(g.type)}'.`);let y=h.parse(u[2],2,We);if(!y)return null;if(!Os(f,y.type))return h.concat(2).error(`"${f}" comparisons are not supported for type '${dt(y.type)}'.`);if(g.type.kind!==y.type.kind&&g.type.kind!=="value"&&y.type.kind!=="value")return h.error(`Cannot compare types '${dt(g.type)}' and '${dt(y.type)}'.`);s&&(g.type.kind==="value"&&y.type.kind!=="value"?g=new er(y.type,[g]):g.type.kind!=="value"&&y.type.kind==="value"&&(y=new er(g.type,[y])));let v=null;if(u.length===4){if(g.type.kind!=="string"&&y.type.kind!=="string"&&g.type.kind!=="value"&&y.type.kind!=="value")return h.error("Cannot use collator to compare non-string types.");if(v=h.parse(u[3],3,Xn),!v)return null}return new lf(g,y,v)}evaluate(u){const h=this.lhs.evaluate(u),f=this.rhs.evaluate(u);if(s&&this.hasUntypedArgument){const g=bt(h),y=bt(f);if(g.kind!==y.kind||g.kind!=="string"&&g.kind!=="number")throw new Le(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${g.kind}, ${y.kind}) instead.`)}if(this.collator&&!s&&this.hasUntypedArgument){const g=bt(h),y=bt(f);if(g.kind!=="string"||y.kind!=="string")return e(u,h,f)}return this.collator?i(u,h,f,this.collator.evaluate(u)):e(u,h,f)}eachChild(u){u(this.lhs),u(this.rhs),this.collator&&u(this.collator)}outputDefined(){return!0}}}const Zt=Er("==",(function(r,e,i){return e===i}),Oo),Jl=Er("!=",(function(r,e,i){return e!==i}),(function(r,e,i,s){return!Oo(0,e,i,s)})),Vo=Er("<",(function(r,e,i){return e<i}),(function(r,e,i,s){return s.compare(e,i)<0})),Ql=Er(">",(function(r,e,i){return e>i}),(function(r,e,i,s){return s.compare(e,i)>0})),Mu=Er("<=",(function(r,e,i){return e<=i}),(function(r,e,i,s){return s.compare(e,i)<=0})),rs=Er(">=",(function(r,e,i){return e>=i}),(function(r,e,i,s){return s.compare(e,i)>=0}));class Mn{constructor(e,i,s){this.type=Xn,this.locale=s,this.caseSensitive=e,this.diacriticSensitive=i}static parse(e,i){if(e.length!==2)return i.error("Expected one argument.");const s=e[1];if(typeof s!="object"||Array.isArray(s))return i.error("Collator options argument must be an object.");const o=i.parse(s["case-sensitive"]!==void 0&&s["case-sensitive"],1,Ge);if(!o)return null;const u=i.parse(s["diacritic-sensitive"]!==void 0&&s["diacritic-sensitive"],1,Ge);if(!u)return null;let h=null;return s.locale&&(h=i.parse(s.locale,1,Ue),!h)?null:new Mn(o,u,h)}evaluate(e){return new wn(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}class Vs{constructor(e,i,s,o,u){this.type=Ue,this.number=e,this.locale=i,this.currency=s,this.minFractionDigits=o,this.maxFractionDigits=u}static parse(e,i){if(e.length!==3)return i.error("Expected two arguments.");const s=i.parse(e[1],1,Te);if(!s)return null;const o=e[2];if(typeof o!="object"||Array.isArray(o))return i.error("NumberFormat options argument must be an object.");let u=null;if(o.locale&&(u=i.parse(o.locale,1,Ue),!u))return null;let h=null;if(o.currency&&(h=i.parse(o.currency,1,Ue),!h))return null;let f=null;if(o["min-fraction-digits"]&&(f=i.parse(o["min-fraction-digits"],1,Te),!f))return null;let g=null;return o["max-fraction-digits"]&&(g=i.parse(o["max-fraction-digits"],1,Te),!g)?null:new Vs(s,u,h,f,g)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class Ra{constructor(e){this.type=Yn,this.sections=e}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const s=e[1];if(!Array.isArray(s)&&typeof s=="object")return i.error("First argument must be an image or text section.");const o=[];let u=!1;for(let h=1;h<=e.length-1;++h){const f=e[h];if(u&&typeof f=="object"&&!Array.isArray(f)){u=!1;let g=null;if(f["font-scale"]&&(g=i.parse(f["font-scale"],1,Te),!g))return null;let y=null;if(f["text-font"]&&(y=i.parse(f["text-font"],1,bi(Ue)),!y))return null;let v=null;if(f["text-color"]&&(v=i.parse(f["text-color"],1,qi),!v))return null;let b=null;if(f["vertical-align"]){if(typeof f["vertical-align"]=="string"&&!Su.includes(f["vertical-align"]))return i.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${f["vertical-align"]}' instead.`);if(b=i.parse(f["vertical-align"],1,Ue),!b)return null}const S=o[o.length-1];S.scale=g,S.font=y,S.textColor=v,S.verticalAlign=b}else{const g=i.parse(e[h],1,We);if(!g)return null;const y=g.type.kind;if(y!=="string"&&y!=="value"&&y!=="null"&&y!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");u=!0,o.push({content:g,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Ra(o)}evaluate(e){return new Ai(this.sections.map((i=>{const s=i.content.evaluate(e);return bt(s)===Kn?new Lo("",s,null,null,null,i.verticalAlign?i.verticalAlign.evaluate(e):null):new Lo(ts(s),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null,i.verticalAlign?i.verticalAlign.evaluate(e):null)})))}eachChild(e){for(const i of this.sections)e(i.content),i.scale&&e(i.scale),i.font&&e(i.font),i.textColor&&e(i.textColor),i.verticalAlign&&e(i.verticalAlign)}outputDefined(){return!1}}class Fa{constructor(e){this.type=Kn,this.input=e}static parse(e,i){if(e.length!==2)return i.error("Expected two arguments.");const s=i.parse(e[1],1,Ue);return s?new Fa(s):i.error("No image name provided.")}evaluate(e){const i=this.input.evaluate(e),s=Di.fromString(i);return s&&e.availableImages&&(s.available=e.availableImages.indexOf(i)>-1),s}eachChild(e){e(this.input)}outputDefined(){return!1}}class ns{constructor(e){this.type=Te,this.input=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const s=i.parse(e[1],1);return s?s.type.kind!=="array"&&s.type.kind!=="string"&&s.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${dt(s.type)} instead.`):new ns(s):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string")return[...i].length;if(Array.isArray(i))return i.length;throw new Le(`Expected value to be of type string or array, but found ${dt(bt(i))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}const ki=8192;function tr(r,e){const i=(180+r[0])/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r[1]*Math.PI/360)))/360,o=Math.pow(2,e.z);return[Math.round(i*o*ki),Math.round(s*o*ki)]}function La(r,e){const i=Math.pow(2,e.z);return[(o=(r[0]/ki+e.x)/i,360*o-180),(s=(r[1]/ki+e.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*s)*Math.PI/180))-90)];var s,o}function Qr(r,e){r[0]=Math.min(r[0],e[0]),r[1]=Math.min(r[1],e[1]),r[2]=Math.max(r[2],e[0]),r[3]=Math.max(r[3],e[1])}function js(r,e){return!(r[0]<=e[0]||r[2]>=e[2]||r[1]<=e[1]||r[3]>=e[3])}function jo(r,e,i){const s=r[0]-e[0],o=r[1]-e[1],u=r[0]-i[0],h=r[1]-i[1];return s*h-u*o==0&&s*u<=0&&o*h<=0}function Ba(r,e,i,s){return(o=[s[0]-i[0],s[1]-i[1]])[0]*(u=[e[0]-r[0],e[1]-r[1]])[1]-o[1]*u[0]!=0&&!(!No(r,e,i,s)||!No(i,s,r,e));var o,u}function Iu(r,e,i){for(const s of i)for(let o=0;o<s.length-1;++o)if(Ba(r,e,s[o],s[o+1]))return!0;return!1}function ss(r,e,i=!1){let s=!1;for(const f of e)for(let g=0;g<f.length-1;g++){if(jo(r,f[g],f[g+1]))return i;(u=f[g])[1]>(o=r)[1]!=(h=f[g+1])[1]>o[1]&&o[0]<(h[0]-u[0])*(o[1]-u[1])/(h[1]-u[1])+u[0]&&(s=!s)}var o,u,h;return s}function Eu(r,e){for(const i of e)if(ss(r,i))return!0;return!1}function Ns(r,e){for(const i of r)if(!ss(i,e))return!1;for(let i=0;i<r.length-1;++i)if(Iu(r[i],r[i+1],e))return!1;return!0}function Cu(r,e){for(const i of e)if(Ns(r,i))return!0;return!1}function No(r,e,i,s){const o=s[0]-i[0],u=s[1]-i[1],h=(r[0]-i[0])*u-o*(r[1]-i[1]),f=(e[0]-i[0])*u-o*(e[1]-i[1]);return h>0&&f<0||h<0&&f>0}function Oa(r,e,i){const s=[];for(let o=0;o<r.length;o++){const u=[];for(let h=0;h<r[o].length;h++){const f=tr(r[o][h],i);Qr(e,f),u.push(f)}s.push(u)}return s}function ec(r,e,i){const s=[];for(let o=0;o<r.length;o++){const u=Oa(r[o],e,i);s.push(u)}return s}function Uo(r,e,i,s){if(r[0]<i[0]||r[0]>i[2]){const o=.5*s;let u=r[0]-i[0]>o?-s:i[0]-r[0]>o?s:0;u===0&&(u=r[0]-i[2]>o?-s:i[2]-r[0]>o?s:0),r[0]+=u}Qr(e,r)}function tc(r,e,i,s){const o=Math.pow(2,s.z)*ki,u=[s.x*ki,s.y*ki],h=[];for(const f of r)for(const g of f){const y=[g.x+u[0],g.y+u[1]];Uo(y,e,i,o),h.push(y)}return h}function ic(r,e,i,s){const o=Math.pow(2,s.z)*ki,u=[s.x*ki,s.y*ki],h=[];for(const g of r){const y=[];for(const v of g){const b=[v.x+u[0],v.y+u[1]];Qr(e,b),y.push(b)}h.push(y)}if(e[2]-e[0]<=o/2){(f=e)[0]=f[1]=1/0,f[2]=f[3]=-1/0;for(const g of h)for(const y of g)Uo(y,e,i,o)}var f;return h}class In{constructor(e,i){this.type=Ge,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(Mr(e[1])){const s=e[1];if(s.type==="FeatureCollection"){const o=[];for(const u of s.features){const{type:h,coordinates:f}=u.geometry;h==="Polygon"&&o.push(f),h==="MultiPolygon"&&o.push(...f)}if(o.length)return new In(s,{type:"MultiPolygon",coordinates:o})}else if(s.type==="Feature"){const o=s.geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new In(s,s.geometry)}else if(s.type==="Polygon"||s.type==="MultiPolygon")return new In(s,s)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return(function(i,s){const o=[1/0,1/0,-1/0,-1/0],u=[1/0,1/0,-1/0,-1/0],h=i.canonicalID();if(s.type==="Polygon"){const f=Oa(s.coordinates,u,h),g=tc(i.geometry(),o,u,h);if(!js(o,u))return!1;for(const y of g)if(!ss(y,f))return!1}if(s.type==="MultiPolygon"){const f=ec(s.coordinates,u,h),g=tc(i.geometry(),o,u,h);if(!js(o,u))return!1;for(const y of g)if(!Eu(y,f))return!1}return!0})(e,this.geometries);if(e.geometryType()==="LineString")return(function(i,s){const o=[1/0,1/0,-1/0,-1/0],u=[1/0,1/0,-1/0,-1/0],h=i.canonicalID();if(s.type==="Polygon"){const f=Oa(s.coordinates,u,h),g=ic(i.geometry(),o,u,h);if(!js(o,u))return!1;for(const y of g)if(!Ns(y,f))return!1}if(s.type==="MultiPolygon"){const f=ec(s.coordinates,u,h),g=ic(i.geometry(),o,u,h);if(!js(o,u))return!1;for(const y of g)if(!Cu(y,f))return!1}return!0})(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let rc=class{constructor(r=[],e=(i,s)=>i<s?-1:i>s?1:0){if(this.data=r,this.length=this.data.length,this.compare=e,this.length>0)for(let i=(this.length>>1)-1;i>=0;i--)this._down(i)}push(r){this.data.push(r),this._up(this.length++)}pop(){if(this.length===0)return;const r=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),r}peek(){return this.data[0]}_up(r){const{data:e,compare:i}=this,s=e[r];for(;r>0;){const o=r-1>>1,u=e[o];if(i(s,u)>=0)break;e[r]=u,r=o}e[r]=s}_down(r){const{data:e,compare:i}=this,s=this.length>>1,o=e[r];for(;r<s;){let u=1+(r<<1);const h=u+1;if(h<this.length&&i(e[h],e[u])<0&&(u=h),i(e[u],o)>=0)break;e[r]=e[u],r=u}e[r]=o}};function nc(r,e,i=0,s=r.length-1,o=sc){for(;s>i;){if(s-i>600){const g=s-i+1,y=e-i+1,v=Math.log(g),b=.5*Math.exp(2*v/3),S=.5*Math.sqrt(v*b*(g-b)/g)*(y-g/2<0?-1:1);nc(r,e,Math.max(i,Math.floor(e-y*b/g+S)),Math.min(s,Math.floor(e+(g-y)*b/g+S)),o)}const u=r[e];let h=i,f=s;for(as(r,i,e),o(r[s],u)>0&&as(r,i,s);h<f;){for(as(r,h,f),h++,f--;o(r[h],u)<0;)h++;for(;o(r[f],u)>0;)f--}o(r[i],u)===0?as(r,i,f):(f++,as(r,f,s)),f<=e&&(i=f+1),e<=f&&(s=f-1)}}function as(r,e,i){const s=r[e];r[e]=r[i],r[i]=s}function sc(r,e){return r<e?-1:r>e?1:0}function Us(r,e){if(r.length<=1)return[r];const i=[];let s,o;for(const u of r){const h=Du(u);h!==0&&(u.area=Math.abs(h),o===void 0&&(o=h<0),o===h<0?(s&&i.push(s),s=[u]):s.push(u))}if(s&&i.push(s),e>1)for(let u=0;u<i.length;u++)i[u].length<=e||(nc(i[u],e,1,i[u].length-1,Au),i[u]=i[u].slice(0,e));return i}function Au(r,e){return e.area-r.area}function Du(r){let e=0;for(let i,s,o=0,u=r.length,h=u-1;o<u;h=o++)i=r[o],s=r[h],e+=(s.x-i.x)*(i.y+s.y);return e}const ac=1/298.257223563,oc=ac*(2-ac),Gs=Math.PI/180;class Go{constructor(e){const i=6378.137*Gs*1e3,s=Math.cos(e*Gs),o=1/(1-oc*(1-s*s)),u=Math.sqrt(o);this.kx=i*u*s,this.ky=i*u*o*(1-oc)}distance(e,i){const s=this.wrap(e[0]-i[0])*this.kx,o=(e[1]-i[1])*this.ky;return Math.sqrt(s*s+o*o)}pointOnLine(e,i){let s,o,u,h,f=1/0;for(let g=0;g<e.length-1;g++){let y=e[g][0],v=e[g][1],b=this.wrap(e[g+1][0]-y)*this.kx,S=(e[g+1][1]-v)*this.ky,P=0;b===0&&S===0||(P=(this.wrap(i[0]-y)*this.kx*b+(i[1]-v)*this.ky*S)/(b*b+S*S),P>1?(y=e[g+1][0],v=e[g+1][1]):P>0&&(y+=b/this.kx*P,v+=S/this.ky*P)),b=this.wrap(i[0]-y)*this.kx,S=(i[1]-v)*this.ky;const E=b*b+S*S;E<f&&(f=E,s=y,o=v,u=g,h=P)}return{point:[s,o],index:u,t:Math.max(0,Math.min(1,h))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}}function lc(r,e){return e[0]-r[0]}function Va(r){return r[1]-r[0]+1}function Cr(r,e){return r[1]>=r[0]&&r[1]<e}function qs(r,e){if(r[0]>r[1])return[null,null];const i=Va(r);if(e){if(i===2)return[r,null];const o=Math.floor(i/2);return[[r[0],r[0]+o],[r[0]+o,r[1]]]}if(i===1)return[r,null];const s=Math.floor(i/2)-1;return[[r[0],r[0]+s],[r[0]+s+1,r[1]]]}function ja(r,e){if(!Cr(e,r.length))return[1/0,1/0,-1/0,-1/0];const i=[1/0,1/0,-1/0,-1/0];for(let s=e[0];s<=e[1];++s)Qr(i,r[s]);return i}function qo(r){const e=[1/0,1/0,-1/0,-1/0];for(const i of r)for(const s of i)Qr(e,s);return e}function cc(r){return r[0]!==-1/0&&r[1]!==-1/0&&r[2]!==1/0&&r[3]!==1/0}function Na(r,e,i){if(!cc(r)||!cc(e))return NaN;let s=0,o=0;return r[2]<e[0]&&(s=e[0]-r[2]),r[0]>e[2]&&(s=r[0]-e[2]),r[1]>e[3]&&(o=r[1]-e[3]),r[3]<e[1]&&(o=e[1]-r[3]),i.distance([0,0],[s,o])}function en(r,e,i){const s=i.pointOnLine(e,r);return i.distance(r,s.point)}function Zo(r,e,i,s,o){const u=Math.min(en(r,[i,s],o),en(e,[i,s],o)),h=Math.min(en(i,[r,e],o),en(s,[r,e],o));return Math.min(u,h)}function zu(r,e,i,s,o){if(!Cr(e,r.length)||!Cr(s,i.length))return 1/0;let u=1/0;for(let h=e[0];h<e[1];++h){const f=r[h],g=r[h+1];for(let y=s[0];y<s[1];++y){const v=i[y],b=i[y+1];if(Ba(f,g,v,b))return 0;u=Math.min(u,Zo(f,g,v,b,o))}}return u}function ku(r,e,i,s,o){if(!Cr(e,r.length)||!Cr(s,i.length))return NaN;let u=1/0;for(let h=e[0];h<=e[1];++h)for(let f=s[0];f<=s[1];++f)if(u=Math.min(u,o.distance(r[h],i[f])),u===0)return u;return u}function uc(r,e,i){if(ss(r,e,!0))return 0;let s=1/0;for(const o of e){const u=o[0],h=o[o.length-1];if(u!==h&&(s=Math.min(s,en(r,[h,u],i)),s===0))return s;const f=i.pointOnLine(o,r);if(s=Math.min(s,i.distance(r,f.point)),s===0)return s}return s}function Ru(r,e,i,s){if(!Cr(e,r.length))return NaN;for(let u=e[0];u<=e[1];++u)if(ss(r[u],i,!0))return 0;let o=1/0;for(let u=e[0];u<e[1];++u){const h=r[u],f=r[u+1];for(const g of i)for(let y=0,v=g.length,b=v-1;y<v;b=y++){const S=g[b],P=g[y];if(Ba(h,f,S,P))return 0;o=Math.min(o,Zo(h,f,S,P,s))}}return o}function hc(r,e){for(const i of r)for(const s of i)if(ss(s,e,!0))return!0;return!1}function Fu(r,e,i,s=1/0){const o=qo(r),u=qo(e);if(s!==1/0&&Na(o,u,i)>=s)return s;if(js(o,u)){if(hc(r,e))return 0}else if(hc(e,r))return 0;let h=1/0;for(const f of r)for(let g=0,y=f.length,v=y-1;g<y;v=g++){const b=f[v],S=f[g];for(const P of e)for(let E=0,A=P.length,k=A-1;E<A;k=E++){const O=P[k],G=P[E];if(Ba(b,S,O,G))return 0;h=Math.min(h,Zo(b,S,O,G,i))}}return h}function dc(r,e,i,s,o,u){if(!u)return;const h=Na(ja(s,u),o,i);h<e&&r.push([h,u,[0,0]])}function et(r,e,i,s,o,u,h){if(!u||!h)return;const f=Na(ja(s,u),ja(o,h),i);f<e&&r.push([f,u,h])}function Ua(r,e,i,s,o=1/0){let u=Math.min(s.distance(r[0],i[0][0]),o);if(u===0)return u;const h=new rc([[0,[0,r.length-1],[0,0]]],lc),f=qo(i);for(;h.length>0;){const g=h.pop();if(g[0]>=u)continue;const y=g[1],v=e?50:100;if(Va(y)<=v){if(!Cr(y,r.length))return NaN;if(e){const b=Ru(r,y,i,s);if(isNaN(b)||b===0)return b;u=Math.min(u,b)}else for(let b=y[0];b<=y[1];++b){const S=uc(r[b],i,s);if(u=Math.min(u,S),u===0)return 0}}else{const b=qs(y,e);dc(h,u,s,r,f,b[0]),dc(h,u,s,r,f,b[1])}}return u}function Ga(r,e,i,s,o,u=1/0){let h=Math.min(u,o.distance(r[0],i[0]));if(h===0)return h;const f=new rc([[0,[0,r.length-1],[0,i.length-1]]],lc);for(;f.length>0;){const g=f.pop();if(g[0]>=h)continue;const y=g[1],v=g[2],b=e?50:100,S=s?50:100;if(Va(y)<=b&&Va(v)<=S){if(!Cr(y,r.length)&&Cr(v,i.length))return NaN;let P;if(e&&s)P=zu(r,y,i,v,o),h=Math.min(h,P);else if(e&&!s){const E=r.slice(y[0],y[1]+1);for(let A=v[0];A<=v[1];++A)if(P=en(i[A],E,o),h=Math.min(h,P),h===0)return h}else if(!e&&s){const E=i.slice(v[0],v[1]+1);for(let A=y[0];A<=y[1];++A)if(P=en(r[A],E,o),h=Math.min(h,P),h===0)return h}else P=ku(r,y,i,v,o),h=Math.min(h,P)}else{const P=qs(y,e),E=qs(v,s);et(f,h,o,r,i,P[0],E[0]),et(f,h,o,r,i,P[0],E[1]),et(f,h,o,r,i,P[1],E[0]),et(f,h,o,r,i,P[1],E[1])}}return h}function $o(r){return r.type==="MultiPolygon"?r.coordinates.map((e=>({type:"Polygon",coordinates:e}))):r.type==="MultiLineString"?r.coordinates.map((e=>({type:"LineString",coordinates:e}))):r.type==="MultiPoint"?r.coordinates.map((e=>({type:"Point",coordinates:e}))):[r]}class En{constructor(e,i){this.type=Te,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(Mr(e[1])){const s=e[1];if(s.type==="FeatureCollection")return new En(s,s.features.map((o=>$o(o.geometry))).flat());if(s.type==="Feature")return new En(s,$o(s.geometry));if("type"in s&&"coordinates"in s)return new En(s,$o(s))}return i.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return(function(i,s){const o=i.geometry(),u=o.flat().map((g=>La([g.x,g.y],i.canonical)));if(o.length===0)return NaN;const h=new Go(u[0][1]);let f=1/0;for(const g of s){switch(g.type){case"Point":f=Math.min(f,Ga(u,!1,[g.coordinates],!1,h,f));break;case"LineString":f=Math.min(f,Ga(u,!1,g.coordinates,!0,h,f));break;case"Polygon":f=Math.min(f,Ua(u,!1,g.coordinates,h,f))}if(f===0)return f}return f})(e,this.geometries);if(e.geometryType()==="LineString")return(function(i,s){const o=i.geometry(),u=o.flat().map((g=>La([g.x,g.y],i.canonical)));if(o.length===0)return NaN;const h=new Go(u[0][1]);let f=1/0;for(const g of s){switch(g.type){case"Point":f=Math.min(f,Ga(u,!0,[g.coordinates],!1,h,f));break;case"LineString":f=Math.min(f,Ga(u,!0,g.coordinates,!0,h,f));break;case"Polygon":f=Math.min(f,Ua(u,!0,g.coordinates,h,f))}if(f===0)return f}return f})(e,this.geometries);if(e.geometryType()==="Polygon")return(function(i,s){const o=i.geometry();if(o.length===0||o[0].length===0)return NaN;const u=Us(o,0).map((g=>g.map((y=>y.map((v=>La([v.x,v.y],i.canonical))))))),h=new Go(u[0][0][0][1]);let f=1/0;for(const g of s)for(const y of u){switch(g.type){case"Point":f=Math.min(f,Ua([g.coordinates],!1,y,h,f));break;case"LineString":f=Math.min(f,Ua(g.coordinates,!0,y,h,f));break;case"Polygon":f=Math.min(f,Fu(y,g.coordinates,h,f))}if(f===0)return f}return f})(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Zs{constructor(e){this.type=We,this.key=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const s=e[1];return s==null?i.error("Global state property must be defined."):typeof s!="string"?i.error(`Global state property must be string, but found ${typeof e[1]} instead.`):new Zs(s)}evaluate(e){var i;const s=(i=e.globals)===null||i===void 0?void 0:i.globalState;return s&&Object.keys(s).length!==0?ks(s,this.key):null}eachChild(){}outputDefined(){return!1}}const os={"==":Zt,"!=":Jl,">":Ql,"<":Vo,">=":rs,"<=":Mu,array:er,at:Ls,boolean:er,case:Qe,coalesce:Gt,collator:Mn,format:Ra,image:Fa,in:Ke,"index-of":Ze,interpolate:di,"interpolate-hcl":di,"interpolate-lab":di,length:ns,let:Sn,literal:Ir,match:Bs,number:er,"number-format":Vs,object:er,slice:is,step:Pn,string:er,"to-boolean":zi,"to-color":zi,"to-number":zi,"to-string":zi,var:ot,within:In,distance:En,"global-state":Zs};class Wi{constructor(e,i,s,o){this.name=e,this.type=i,this._evaluate=s,this.args=o}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,i){const s=e[0],o=Wi.definitions[s];if(!o)return i.error(`Unknown expression "${s}". If you wanted a literal array, use ["literal", [...]].`,0);const u=Array.isArray(o)?o[0]:o.type,h=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,f=h.filter((([y])=>!Array.isArray(y)||y.length===e.length-1));let g=null;for(const[y,v]of f){g=new Fs(i.registry,qa,i.path,null,i.scope);const b=[];let S=!1;for(let P=1;P<e.length;P++){const E=e[P],A=Array.isArray(y)?y[P-1]:y.type,k=g.parse(E,1+b.length,A);if(!k){S=!0;break}b.push(k)}if(!S)if(Array.isArray(y)&&y.length!==b.length)g.error(`Expected ${y.length} arguments, but found ${b.length} instead.`);else{for(let P=0;P<b.length;P++){const E=Array.isArray(y)?y[P]:y.type,A=b[P];g.concat(P+1).checkSubtype(E,A.type)}if(g.errors.length===0)return new Wi(s,u,v,b)}}if(f.length===1)i.errors.push(...g.errors);else{const y=(f.length?f:h).map((([b])=>{return S=b,Array.isArray(S)?`(${S.map(dt).join(", ")})`:`(${dt(S.type)}...)`;var S})).join(" | "),v=[];for(let b=1;b<e.length;b++){const S=i.parse(e[b],1+v.length);if(!S)return null;v.push(dt(S.type))}i.error(`Expected arguments of type ${y}, but found (${v.join(", ")}) instead.`)}return null}static register(e,i){Wi.definitions=i;for(const s in i)e[s]=Wi}}function pc(r,[e,i,s,o]){e=e.evaluate(r),i=i.evaluate(r),s=s.evaluate(r);const u=o?o.evaluate(r):1,h=Ca(e,i,s,u);if(h)throw new Le(h);return new Ye(e/255,i/255,s/255,u,!1)}function fc(r,e){return r in e}function Wo(r,e){const i=e[r];return i===void 0?null:i}function Cn(r){return{type:r}}function qa(r){if(r instanceof ot)return qa(r.boundExpression);if(r instanceof Wi&&r.name==="error"||r instanceof Mn||r instanceof In||r instanceof En||r instanceof Zs)return!1;const e=r instanceof zi||r instanceof er;let i=!0;return r.eachChild((s=>{i=e?i&&qa(s):i&&s instanceof Ir})),!!i&&Za(r)&&$a(r,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function Za(r){if(r instanceof Wi&&(r.name==="get"&&r.args.length===1||r.name==="feature-state"||r.name==="has"&&r.args.length===1||r.name==="properties"||r.name==="geometry-type"||r.name==="id"||/^filter-/.test(r.name))||r instanceof In||r instanceof En)return!1;let e=!0;return r.eachChild((i=>{e&&!Za(i)&&(e=!1)})),e}function $s(r){if(r instanceof Wi&&r.name==="feature-state")return!1;let e=!0;return r.eachChild((i=>{e&&!$s(i)&&(e=!1)})),e}function $a(r,e){if(r instanceof Wi&&e.indexOf(r.name)>=0)return!1;let i=!0;return r.eachChild((s=>{i&&!$a(s,e)&&(i=!1)})),i}function mc(r){return{result:"success",value:r}}function ls(r){return{result:"error",value:r}}function cs(r){return r["property-type"]==="data-driven"||r["property-type"]==="cross-faded-data-driven"}function gc(r){return!!r.expression&&r.expression.parameters.indexOf("zoom")>-1}function Ho(r){return!!r.expression&&r.expression.interpolated}function Xe(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":r===null?"null":typeof r}function Wa(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&bt(r)===xn}function Lu(r){return r}function _c(r,e){const i=r.stops&&typeof r.stops[0][0]=="object",s=i||!(i||r.property!==void 0),o=r.type||(Ho(e)?"exponential":"interval"),u=(function(v){switch(v.type){case"color":return Ye.parse;case"padding":return si.parse;case"numberArray":return ai.parse;case"colorArray":return pt.parse;default:return null}})(e);if(u&&((r=tt({},r)).stops&&(r.stops=r.stops.map((v=>[v[0],u(v[1])]))),r.default=u(r.default?r.default:e.default)),r.colorSpace&&(h=r.colorSpace)!=="rgb"&&h!=="hcl"&&h!=="lab")throw new Error(`Unknown color space: "${r.colorSpace}"`);var h;const f=(function(v){switch(v){case"exponential":return yc;case"interval":return Ou;case"categorical":return Bu;case"identity":return Vu;default:throw new Error(`Unknown function type "${v}"`)}})(o);let g,y;if(o==="categorical"){g=Object.create(null);for(const v of r.stops)g[v[0]]=v[1];y=typeof r.stops[0][0]}if(i){const v={},b=[];for(let E=0;E<r.stops.length;E++){const A=r.stops[E],k=A[0].zoom;v[k]===void 0&&(v[k]={zoom:k,type:r.type,property:r.property,default:r.default,stops:[]},b.push(k)),v[k].stops.push([A[0].value,A[1]])}const S=[];for(const E of b)S.push([v[E].zoom,_c(v[E],e)]);const P={name:"linear"};return{kind:"composite",interpolationType:P,interpolationFactor:di.interpolationFactor.bind(void 0,P),zoomStops:S.map((E=>E[0])),evaluate:({zoom:E},A)=>yc({stops:S,base:r.base},e,E).evaluate(E,A)}}if(s){const v=o==="exponential"?{name:"exponential",base:r.base!==void 0?r.base:1}:null;return{kind:"camera",interpolationType:v,interpolationFactor:di.interpolationFactor.bind(void 0,v),zoomStops:r.stops.map((b=>b[0])),evaluate:({zoom:b})=>f(r,e,b,g,y)}}return{kind:"source",evaluate(v,b){const S=b&&b.properties?b.properties[r.property]:void 0;return S===void 0?Ws(r.default,e.default):f(r,e,S,g,y)}}}function Ws(r,e,i){return r!==void 0?r:e!==void 0?e:i!==void 0?i:void 0}function Bu(r,e,i,s,o){return Ws(typeof i===o?s[i]:void 0,r.default,e.default)}function Ou(r,e,i){if(Xe(i)!=="number")return Ws(r.default,e.default);const s=r.stops.length;if(s===1||i<=r.stops[0][0])return r.stops[0][1];if(i>=r.stops[s-1][0])return r.stops[s-1][1];const o=$i(r.stops.map((u=>u[0])),i);return r.stops[o][1]}function yc(r,e,i){const s=r.base!==void 0?r.base:1;if(Xe(i)!=="number")return Ws(r.default,e.default);const o=r.stops.length;if(o===1||i<=r.stops[0][0])return r.stops[0][1];if(i>=r.stops[o-1][0])return r.stops[o-1][1];const u=$i(r.stops.map((v=>v[0])),i),h=(function(v,b,S,P){const E=P-S,A=v-S;return E===0?0:b===1?A/E:(Math.pow(b,A)-1)/(Math.pow(b,E)-1)})(i,s,r.stops[u][0],r.stops[u+1][0]),f=r.stops[u][1],g=r.stops[u+1][1],y=Jt[e.type]||Lu;return typeof f.evaluate=="function"?{evaluate(...v){const b=f.evaluate.apply(void 0,v),S=g.evaluate.apply(void 0,v);if(b!==void 0&&S!==void 0)return y(b,S,h,r.colorSpace)}}:y(f,g,h,r.colorSpace)}function Vu(r,e,i){switch(e.type){case"color":i=Ye.parse(i);break;case"formatted":i=Ai.fromString(i.toString());break;case"resolvedImage":i=Di.fromString(i.toString());break;case"padding":i=si.parse(i);break;case"colorArray":i=pt.parse(i);break;case"numberArray":i=ai.parse(i);break;default:Xe(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0)}return Ws(i,r.default,e.default)}Wi.register(os,{error:[{kind:"error"},[Ue],(r,[e])=>{throw new Le(e.evaluate(r))}],typeof:[Ue,[We],(r,[e])=>dt(bt(e.evaluate(r)))],"to-rgba":[bi(Te,4),[qi],(r,[e])=>{const[i,s,o,u]=e.evaluate(r).rgb;return[255*i,255*s,255*o,u]}],rgb:[qi,[Te,Te,Te],pc],rgba:[qi,[Te,Te,Te,Te],pc],has:{type:Ge,overloads:[[[Ue],(r,[e])=>fc(e.evaluate(r),r.properties())],[[Ue,xn],(r,[e,i])=>fc(e.evaluate(r),i.evaluate(r))]]},get:{type:We,overloads:[[[Ue],(r,[e])=>Wo(e.evaluate(r),r.properties())],[[Ue,xn],(r,[e,i])=>Wo(e.evaluate(r),i.evaluate(r))]]},"feature-state":[We,[Ue],(r,[e])=>Wo(e.evaluate(r),r.featureState||{})],properties:[xn,[],r=>r.properties()],"geometry-type":[Ue,[],r=>r.geometryType()],id:[We,[],r=>r.id()],zoom:[Te,[],r=>r.globals.zoom],"heatmap-density":[Te,[],r=>r.globals.heatmapDensity||0],elevation:[Te,[],r=>r.globals.elevation||0],"line-progress":[Te,[],r=>r.globals.lineProgress||0],accumulated:[We,[],r=>r.globals.accumulated===void 0?null:r.globals.accumulated],"+":[Te,Cn(Te),(r,e)=>{let i=0;for(const s of e)i+=s.evaluate(r);return i}],"*":[Te,Cn(Te),(r,e)=>{let i=1;for(const s of e)i*=s.evaluate(r);return i}],"-":{type:Te,overloads:[[[Te,Te],(r,[e,i])=>e.evaluate(r)-i.evaluate(r)],[[Te],(r,[e])=>-e.evaluate(r)]]},"/":[Te,[Te,Te],(r,[e,i])=>e.evaluate(r)/i.evaluate(r)],"%":[Te,[Te,Te],(r,[e,i])=>e.evaluate(r)%i.evaluate(r)],ln2:[Te,[],()=>Math.LN2],pi:[Te,[],()=>Math.PI],e:[Te,[],()=>Math.E],"^":[Te,[Te,Te],(r,[e,i])=>Math.pow(e.evaluate(r),i.evaluate(r))],sqrt:[Te,[Te],(r,[e])=>Math.sqrt(e.evaluate(r))],log10:[Te,[Te],(r,[e])=>Math.log(e.evaluate(r))/Math.LN10],ln:[Te,[Te],(r,[e])=>Math.log(e.evaluate(r))],log2:[Te,[Te],(r,[e])=>Math.log(e.evaluate(r))/Math.LN2],sin:[Te,[Te],(r,[e])=>Math.sin(e.evaluate(r))],cos:[Te,[Te],(r,[e])=>Math.cos(e.evaluate(r))],tan:[Te,[Te],(r,[e])=>Math.tan(e.evaluate(r))],asin:[Te,[Te],(r,[e])=>Math.asin(e.evaluate(r))],acos:[Te,[Te],(r,[e])=>Math.acos(e.evaluate(r))],atan:[Te,[Te],(r,[e])=>Math.atan(e.evaluate(r))],min:[Te,Cn(Te),(r,e)=>Math.min(...e.map((i=>i.evaluate(r))))],max:[Te,Cn(Te),(r,e)=>Math.max(...e.map((i=>i.evaluate(r))))],abs:[Te,[Te],(r,[e])=>Math.abs(e.evaluate(r))],round:[Te,[Te],(r,[e])=>{const i=e.evaluate(r);return i<0?-Math.round(-i):Math.round(i)}],floor:[Te,[Te],(r,[e])=>Math.floor(e.evaluate(r))],ceil:[Te,[Te],(r,[e])=>Math.ceil(e.evaluate(r))],"filter-==":[Ge,[Ue,We],(r,[e,i])=>r.properties()[e.value]===i.value],"filter-id-==":[Ge,[We],(r,[e])=>r.id()===e.value],"filter-type-==":[Ge,[Ue],(r,[e])=>r.geometryType()===e.value],"filter-<":[Ge,[Ue,We],(r,[e,i])=>{const s=r.properties()[e.value],o=i.value;return typeof s==typeof o&&s<o}],"filter-id-<":[Ge,[We],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i<s}],"filter->":[Ge,[Ue,We],(r,[e,i])=>{const s=r.properties()[e.value],o=i.value;return typeof s==typeof o&&s>o}],"filter-id->":[Ge,[We],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i>s}],"filter-<=":[Ge,[Ue,We],(r,[e,i])=>{const s=r.properties()[e.value],o=i.value;return typeof s==typeof o&&s<=o}],"filter-id-<=":[Ge,[We],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i<=s}],"filter->=":[Ge,[Ue,We],(r,[e,i])=>{const s=r.properties()[e.value],o=i.value;return typeof s==typeof o&&s>=o}],"filter-id->=":[Ge,[We],(r,[e])=>{const i=r.id(),s=e.value;return typeof i==typeof s&&i>=s}],"filter-has":[Ge,[We],(r,[e])=>e.value in r.properties()],"filter-has-id":[Ge,[],r=>r.id()!==null&&r.id()!==void 0],"filter-type-in":[Ge,[bi(Ue)],(r,[e])=>e.value.indexOf(r.geometryType())>=0],"filter-id-in":[Ge,[bi(We)],(r,[e])=>e.value.indexOf(r.id())>=0],"filter-in-small":[Ge,[Ue,bi(We)],(r,[e,i])=>i.value.indexOf(r.properties()[e.value])>=0],"filter-in-large":[Ge,[Ue,bi(We)],(r,[e,i])=>(function(s,o,u,h){for(;u<=h;){const f=u+h>>1;if(o[f]===s)return!0;o[f]>s?h=f-1:u=f+1}return!1})(r.properties()[e.value],i.value,0,i.value.length-1)],all:{type:Ge,overloads:[[[Ge,Ge],(r,[e,i])=>e.evaluate(r)&&i.evaluate(r)],[Cn(Ge),(r,e)=>{for(const i of e)if(!i.evaluate(r))return!1;return!0}]]},any:{type:Ge,overloads:[[[Ge,Ge],(r,[e,i])=>e.evaluate(r)||i.evaluate(r)],[Cn(Ge),(r,e)=>{for(const i of e)if(i.evaluate(r))return!0;return!1}]]},"!":[Ge,[Ge],(r,[e])=>!e.evaluate(r)],"is-supported-script":[Ge,[Ue],(r,[e])=>{const i=r.globals&&r.globals.isSupportedScript;return!i||i(e.evaluate(r))}],upcase:[Ue,[Ue],(r,[e])=>e.evaluate(r).toUpperCase()],downcase:[Ue,[Ue],(r,[e])=>e.evaluate(r).toLowerCase()],concat:[Ue,Cn(We),(r,e)=>e.map((i=>ts(i.evaluate(r)))).join("")],"resolved-locale":[Ue,[Xn],(r,[e])=>e.evaluate(r).resolvedLocale()]});class Xo{constructor(e,i,s){this.expression=e,this._warningHistory={},this._evaluator=new Bo,this._defaultValue=i?(function(o){if(o.type==="color"&&Wa(o.default))return new Ye(0,0,0,0);switch(o.type){case"color":return Ye.parse(o.default)||null;case"padding":return si.parse(o.default)||null;case"numberArray":return ai.parse(o.default)||null;case"colorArray":return pt.parse(o.default)||null;case"variableAnchorOffsetCollection":return Bt.parse(o.default)||null;case"projectionDefinition":return wi.parse(o.default)||null;default:return o.default===void 0?null:o.default}})(i):null,this._enumValues=i&&i.type==="enum"?i.values:null,this._globalState=s}evaluateWithoutErrorHandling(e,i,s,o,u,h){return this._globalState&&(e=Ar(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=i,this._evaluator.featureState=s,this._evaluator.canonical=o,this._evaluator.availableImages=u||null,this._evaluator.formattedSection=h,this.expression.evaluate(this._evaluator)}evaluate(e,i,s,o,u,h){this._globalState&&(e=Ar(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=i||null,this._evaluator.featureState=s||null,this._evaluator.canonical=o,this._evaluator.availableImages=u||null,this._evaluator.formattedSection=h||null;try{const f=this.expression.evaluate(this._evaluator);if(f==null||typeof f=="number"&&f!=f)return this._defaultValue;if(this._enumValues&&!(f in this._enumValues))throw new Le(`Expected value to be one of ${Object.keys(this._enumValues).map((g=>JSON.stringify(g))).join(", ")}, but found ${JSON.stringify(f)} instead.`);return f}catch(f){return this._warningHistory[f.message]||(this._warningHistory[f.message]=!0,typeof console<"u"&&console.warn(f.message)),this._defaultValue}}}function Ha(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in os}function An(r,e,i){const s=new Fs(os,qa,[],e?(function(u){const h={color:qi,string:Ue,number:Te,enum:Ue,boolean:Ge,formatted:Yn,padding:Sa,numberArray:Cs,colorArray:Es,projectionDefinition:Hn,resolvedImage:Kn,variableAnchorOffsetCollection:As};return u.type==="array"?bi(h[u.value]||We,u.length):h[u.type]})(e):void 0),o=s.parse(r,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?mc(new Xo(o,e,i)):ls(s.errors)}class Xa{constructor(e,i,s){this.kind=e,this._styleExpression=i,this.isStateDependent=e!=="constant"&&!$s(i.expression),this.globalStateRefs=Xs(i.expression),this._globalState=s}evaluateWithoutErrorHandling(e,i,s,o,u,h){return this._globalState&&(e=Ar(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,i,s,o,u,h)}evaluate(e,i,s,o,u,h){return this._globalState&&(e=Ar(e,this._globalState)),this._styleExpression.evaluate(e,i,s,o,u,h)}}class Yo{constructor(e,i,s,o,u){this.kind=e,this.zoomStops=s,this._styleExpression=i,this.isStateDependent=e!=="camera"&&!$s(i.expression),this.globalStateRefs=Xs(i.expression),this.interpolationType=o,this._globalState=u}evaluateWithoutErrorHandling(e,i,s,o,u,h){return this._globalState&&(e=Ar(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,i,s,o,u,h)}evaluate(e,i,s,o,u,h){return this._globalState&&(e=Ar(e,this._globalState)),this._styleExpression.evaluate(e,i,s,o,u,h)}interpolationFactor(e,i,s){return this.interpolationType?di.interpolationFactor(this.interpolationType,e,i,s):0}}function xc(r,e,i){const s=An(r,e,i);if(s.result==="error")return s;const o=s.value.expression,u=Za(o);if(!u&&!cs(e))return ls([new gt("","data expressions not supported")]);const h=$a(o,["zoom"]);if(!h&&!gc(e))return ls([new gt("","zoom expressions not supported")]);const f=Ya(o);return f||h?f instanceof gt?ls([f]):f instanceof di&&!Ho(e)?ls([new gt("",'"interpolate" expressions cannot be used with this property')]):mc(f?new Yo(u?"camera":"composite",s.value,f.labels,f instanceof di?f.interpolation:void 0,i):new Xa(u?"constant":"source",s.value,i)):ls([new gt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Hs{constructor(e,i){this._parameters=e,this._specification=i,tt(this,_c(this._parameters,this._specification))}static deserialize(e){return new Hs(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Ya(r){let e=null;if(r instanceof Sn)e=Ya(r.result);else if(r instanceof Gt){for(const i of r.args)if(e=Ya(i),e)break}else(r instanceof Pn||r instanceof di)&&r.input instanceof Wi&&r.input.name==="zoom"&&(e=r);return e instanceof gt||r.eachChild((i=>{const s=Ya(i);s instanceof gt?e=s:!e&&s?e=new gt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&s&&e!==s&&(e=new gt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function Xs(r,e=new Set){return r instanceof Zs&&e.add(r.key),r.eachChild((i=>{Xs(i,e)})),e}function Ar(r,e){const{zoom:i,heatmapDensity:s,elevation:o,lineProgress:u,isSupportedScript:h,accumulated:f}=r??{};return{zoom:i,heatmapDensity:s,elevation:o,lineProgress:u,isSupportedScript:h,accumulated:f,globalState:e}}function Ka(r){if(r===!0||r===!1)return!0;if(!Array.isArray(r)||r.length===0)return!1;switch(r[0]){case"has":return r.length>=2&&r[1]!=="$id"&&r[1]!=="$type";case"in":return r.length>=3&&(typeof r[1]!="string"||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return r.length!==3||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(const e of r.slice(1))if(!Ka(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}const ju={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ys(r,e){if(r==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Ka(r)||(r=Ja(r));const i=An(r,ju,e);if(i.result==="error")throw new Error(i.value.map((s=>`${s.key}: ${s.message}`)).join(", "));return{filter:(s,o,u)=>i.value.evaluate(s,o,{},u),needGeometry:vc(r),getGlobalStateRefs:()=>Xs(i.value.expression)}}function Nu(r,e){return r<e?-1:r>e?1:0}function vc(r){if(!Array.isArray(r))return!1;if(r[0]==="within"||r[0]==="distance")return!0;for(let e=1;e<r.length;e++)if(vc(r[e]))return!0;return!1}function Ja(r){if(!r)return!0;const e=r[0];return r.length<=1?e!=="any":e==="=="?Qa(r[1],r[2],"=="):e==="!="?eo(Qa(r[1],r[2],"==")):e==="<"||e===">"||e==="<="||e===">="?Qa(r[1],r[2],e):e==="any"?(i=r.slice(1),["any"].concat(i.map(Ja))):e==="all"?["all"].concat(r.slice(1).map(Ja)):e==="none"?["all"].concat(r.slice(1).map(Ja).map(eo)):e==="in"?Ko(r[1],r.slice(2)):e==="!in"?eo(Ko(r[1],r.slice(2))):e==="has"?bc(r[1]):e!=="!has"||eo(bc(r[1]));var i}function Qa(r,e,i){switch(r){case"$type":return[`filter-type-${i}`,e];case"$id":return[`filter-id-${i}`,e];default:return[`filter-${i}`,r,e]}}function Ko(r,e){if(e.length===0)return!1;switch(r){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((i=>typeof i!=typeof e[0]))?["filter-in-large",r,["literal",e.sort(Nu)]]:["filter-in-small",r,["literal",e]]}}function bc(r){switch(r){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",r]}}function eo(r){return["!",r]}function to(r){const e=typeof r;if(e==="number"||e==="boolean"||e==="string"||r==null)return JSON.stringify(r);if(Array.isArray(r)){let o="[";for(const u of r)o+=`${to(u)},`;return`${o}]`}const i=Object.keys(r).sort();let s="{";for(let o=0;o<i.length;o++)s+=`${JSON.stringify(i[o])}:${to(r[i[o]])},`;return`${s}}`}function wc(r){let e="";for(const i of Re)e+=`/${to(r[i])}`;return e}function Jo(r){const e=r.value;return e?[new we(r.key,e,"constants have been deprecated as of v8")]:[]}function zt(r){return r instanceof Number||r instanceof String||r instanceof Boolean?r.valueOf():r}function Dn(r){if(Array.isArray(r))return r.map(Dn);if(r instanceof Object&&!(r instanceof Number||r instanceof String||r instanceof Boolean)){const e={};for(const i in r)e[i]=Dn(r[i]);return e}return zt(r)}function Ri(r){const e=r.key,i=r.value,s=r.valueSpec||{},o=r.objectElementValidators||{},u=r.style,h=r.styleSpec,f=r.validateSpec;let g=[];const y=Xe(i);if(y!=="object")return[new we(e,i,`object expected, ${y} found`)];for(const v in i){const b=v.split(".")[0],S=ks(s,b)||s["*"];let P;if(ks(o,b))P=o[b];else if(ks(s,b)){if(i[v]===void 0)continue;P=f}else if(o["*"])P=o["*"];else{if(!s["*"]){g.push(new we(e,i[v],`unknown property "${v}"`));continue}P=f}g=g.concat(P({key:(e&&`${e}.`)+v,value:i[v],valueSpec:S,style:u,styleSpec:h,object:i,objectKey:v,validateSpec:f},i))}for(const v in s)o[v]||s[v].required&&s[v].default===void 0&&i[v]===void 0&&g.push(new we(e,i,`missing required property "${v}"`));return g}function Qo(r){const e=r.value,i=r.valueSpec,s=r.style,o=r.styleSpec,u=r.key,h=r.arrayElementValidator||r.validateSpec;if(Xe(e)!=="array")return[new we(u,e,`array expected, ${Xe(e)} found`)];if(i.length&&e.length!==i.length)return[new we(u,e,`array length ${i.length} expected, length ${e.length} found`)];let f={type:i.value,values:i.values};o.$version<7&&(f.function=i.function),Xe(i.value)==="object"&&(f=i.value);let g=[];for(let y=0;y<e.length;y++)g=g.concat(h({array:e,arrayIndex:y,value:e[y],valueSpec:f,validateSpec:r.validateSpec,style:s,styleSpec:o,key:`${u}[${y}]`}));return g}function Ks(r){const e=r.key,i=r.value,s=r.valueSpec;let o=Xe(i);return o==="number"&&i!=i&&(o="NaN"),o!=="number"?[new we(e,i,`number expected, ${o} found`)]:"minimum"in s&&i<s.minimum?[new we(e,i,`${i} is less than the minimum value ${s.minimum}`)]:"maximum"in s&&i>s.maximum?[new we(e,i,`${i} is greater than the maximum value ${s.maximum}`)]:[]}function el(r){const e=r.valueSpec,i=zt(r.value.type);let s,o,u,h={};const f=i!=="categorical"&&r.value.property===void 0,g=!f,y=Xe(r.value.stops)==="array"&&Xe(r.value.stops[0])==="array"&&Xe(r.value.stops[0][0])==="object",v=Ri({key:r.key,value:r.value,valueSpec:r.styleSpec.function,validateSpec:r.validateSpec,style:r.style,styleSpec:r.styleSpec,objectElementValidators:{stops:function(P){if(i==="identity")return[new we(P.key,P.value,'identity function may not have a "stops" property')];let E=[];const A=P.value;return E=E.concat(Qo({key:P.key,value:A,valueSpec:P.valueSpec,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec,arrayElementValidator:b})),Xe(A)==="array"&&A.length===0&&E.push(new we(P.key,A,"array must have at least one stop")),E},default:function(P){return P.validateSpec({key:P.key,value:P.value,valueSpec:e,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec})}}});return i==="identity"&&f&&v.push(new we(r.key,r.value,'missing required property "property"')),i==="identity"||r.value.stops||v.push(new we(r.key,r.value,'missing required property "stops"')),i==="exponential"&&r.valueSpec.expression&&!Ho(r.valueSpec)&&v.push(new we(r.key,r.value,"exponential functions not supported")),r.styleSpec.$version>=8&&(g&&!cs(r.valueSpec)?v.push(new we(r.key,r.value,"property functions not supported")):f&&!gc(r.valueSpec)&&v.push(new we(r.key,r.value,"zoom functions not supported"))),i!=="categorical"&&!y||r.value.property!==void 0||v.push(new we(r.key,r.value,'"property" property is required')),v;function b(P){let E=[];const A=P.value,k=P.key;if(Xe(A)!=="array")return[new we(k,A,`array expected, ${Xe(A)} found`)];if(A.length!==2)return[new we(k,A,`array length 2 expected, length ${A.length} found`)];if(y){if(Xe(A[0])!=="object")return[new we(k,A,`object expected, ${Xe(A[0])} found`)];if(A[0].zoom===void 0)return[new we(k,A,"object stop key must have zoom")];if(A[0].value===void 0)return[new we(k,A,"object stop key must have value")];if(u&&u>zt(A[0].zoom))return[new we(k,A[0].zoom,"stop zoom values must appear in ascending order")];zt(A[0].zoom)!==u&&(u=zt(A[0].zoom),o=void 0,h={}),E=E.concat(Ri({key:`${k}[0]`,value:A[0],valueSpec:{zoom:{}},validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec,objectElementValidators:{zoom:Ks,value:S}}))}else E=E.concat(S({key:`${k}[0]`,value:A[0],validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec},A));return Ha(Dn(A[1]))?E.concat([new we(`${k}[1]`,A[1],"expressions are not allowed in function stops.")]):E.concat(P.validateSpec({key:`${k}[1]`,value:A[1],valueSpec:e,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec}))}function S(P,E){const A=Xe(P.value),k=zt(P.value),O=P.value!==null?P.value:E;if(s){if(A!==s)return[new we(P.key,O,`${A} stop domain type must match previous stop domain type ${s}`)]}else s=A;if(A!=="number"&&A!=="string"&&A!=="boolean")return[new we(P.key,O,"stop domain value must be a number, string, or boolean")];if(A!=="number"&&i!=="categorical"){let G=`number expected, ${A} found`;return cs(e)&&i===void 0&&(G+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new we(P.key,O,G)]}return i!=="categorical"||A!=="number"||isFinite(k)&&Math.floor(k)===k?i!=="categorical"&&A==="number"&&o!==void 0&&k<o?[new we(P.key,O,"stop domain values must appear in ascending order")]:(o=k,i==="categorical"&&k in h?[new we(P.key,O,"stop domain values must be unique")]:(h[k]=!0,[])):[new we(P.key,O,`integer expected, found ${k}`)]}}function tn(r){const e=(r.expressionContext==="property"?xc:An)(Dn(r.value),r.valueSpec);if(e.result==="error")return e.value.map((s=>new we(`${r.key}${s.key}`,r.value,s.message)));const i=e.value.expression||e.value._styleExpression.expression;if(r.expressionContext==="property"&&r.propertyKey==="text-font"&&!i.outputDefined())return[new we(r.key,r.value,`Invalid data expression for "${r.propertyKey}". Output values must be contained as literals within the expression.`)];if(r.expressionContext==="property"&&r.propertyType==="layout"&&!$s(i))return[new we(r.key,r.value,'"feature-state" data expressions are not supported with layout properties.')];if(r.expressionContext==="filter"&&!$s(i))return[new we(r.key,r.value,'"feature-state" data expressions are not supported with filters.')];if(r.expressionContext&&r.expressionContext.indexOf("cluster")===0){if(!$a(i,["zoom","feature-state"]))return[new we(r.key,r.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(r.expressionContext==="cluster-initial"&&!Za(i))return[new we(r.key,r.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Js(r){const e=r.key,i=r.value,s=Xe(i);return s!=="string"?[new we(e,i,`color expected, ${s} found`)]:Ye.parse(String(i))?[]:[new we(e,i,`color expected, "${i}" found`)]}function zn(r){const e=r.key,i=r.value,s=r.valueSpec,o=[];return Array.isArray(s.values)?s.values.indexOf(zt(i))===-1&&o.push(new we(e,i,`expected one of [${s.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(s.values).indexOf(zt(i))===-1&&o.push(new we(e,i,`expected one of [${Object.keys(s.values).join(", ")}], ${JSON.stringify(i)} found`)),o}function Qs(r){return Ka(Dn(r.value))?tn(tt({},r,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ea(r)}function ea(r){const e=r.value,i=r.key;if(Xe(e)!=="array")return[new we(i,e,`array expected, ${Xe(e)} found`)];const s=r.styleSpec;let o,u=[];if(e.length<1)return[new we(i,e,"filter array must have at least 1 element")];switch(u=u.concat(zn({key:`${i}[0]`,value:e[0],valueSpec:s.filter_operator,style:r.style,styleSpec:r.styleSpec})),zt(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&zt(e[1])==="$type"&&u.push(new we(i,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&u.push(new we(i,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(o=Xe(e[1]),o!=="string"&&u.push(new we(`${i}[1]`,e[1],`string expected, ${o} found`)));for(let h=2;h<e.length;h++)o=Xe(e[h]),zt(e[1])==="$type"?u=u.concat(zn({key:`${i}[${h}]`,value:e[h],valueSpec:s.geometry_type,style:r.style,styleSpec:r.styleSpec})):o!=="string"&&o!=="number"&&o!=="boolean"&&u.push(new we(`${i}[${h}]`,e[h],`string, number, or boolean expected, ${o} found`));break;case"any":case"all":case"none":for(let h=1;h<e.length;h++)u=u.concat(ea({key:`${i}[${h}]`,value:e[h],style:r.style,styleSpec:r.styleSpec}));break;case"has":case"!has":o=Xe(e[1]),e.length!==2?u.push(new we(i,e,`filter array for "${e[0]}" operator must have 2 elements`)):o!=="string"&&u.push(new we(`${i}[1]`,e[1],`string expected, ${o} found`))}return u}function Tc(r,e){const i=r.key,s=r.validateSpec,o=r.style,u=r.styleSpec,h=r.value,f=r.objectKey,g=u[`${e}_${r.layerType}`];if(!g)return[];const y=f.match(/^(.*)-transition$/);if(e==="paint"&&y&&g[y[1]]&&g[y[1]].transition)return s({key:i,value:h,valueSpec:u.transition,style:o,styleSpec:u});const v=r.valueSpec||g[f];if(!v)return[new we(i,h,`unknown property "${f}"`)];let b;if(Xe(h)==="string"&&cs(v)&&!v.tokens&&(b=/^{([^}]+)}$/.exec(h)))return[new we(i,h,`"${f}" does not support interpolation syntax