@deck.gl/carto 9.3.0 → 9.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cartoPropertiesTile-worker.js +1 -1
- package/dist/cartoRasterTile-worker.js +1 -1
- package/dist/cartoSpatialTile-worker.js +1 -1
- package/dist/cartoVectorTile-worker.js +1 -1
- package/dist/index.cjs +4 -4
- package/dist/layers/schema/carto-properties-tile-loader.js +1 -1
- package/dist/layers/schema/carto-raster-tile-loader.js +1 -1
- package/dist/layers/schema/carto-spatial-tile-loader.js +1 -1
- package/dist/layers/schema/carto-vector-tile-loader.js +1 -1
- package/dist.min.js +2 -2
- package/package.json +5 -5
|
@@ -5562,7 +5562,7 @@
|
|
|
5562
5562
|
};
|
|
5563
5563
|
|
|
5564
5564
|
// src/layers/schema/carto-properties-tile-loader.ts
|
|
5565
|
-
var VERSION = true ? "9.3.
|
|
5565
|
+
var VERSION = true ? "9.3.2" : "latest";
|
|
5566
5566
|
var id = "cartoPropertiesTile";
|
|
5567
5567
|
var DEFAULT_OPTIONS = {
|
|
5568
5568
|
cartoPropertiesTile: {
|
|
@@ -5548,7 +5548,7 @@
|
|
|
5548
5548
|
};
|
|
5549
5549
|
|
|
5550
5550
|
// src/layers/schema/carto-raster-tile-loader.ts
|
|
5551
|
-
var VERSION = true ? "9.3.
|
|
5551
|
+
var VERSION = true ? "9.3.2" : "latest";
|
|
5552
5552
|
var id = "cartoRasterTile";
|
|
5553
5553
|
var DEFAULT_OPTIONS = {
|
|
5554
5554
|
cartoRasterTile: {
|
|
@@ -5620,7 +5620,7 @@
|
|
|
5620
5620
|
}
|
|
5621
5621
|
|
|
5622
5622
|
// src/layers/schema/carto-spatial-tile-loader.ts
|
|
5623
|
-
var VERSION = true ? "9.3.
|
|
5623
|
+
var VERSION = true ? "9.3.2" : "latest";
|
|
5624
5624
|
var id = "cartoSpatialTile";
|
|
5625
5625
|
var DEFAULT_OPTIONS = {
|
|
5626
5626
|
cartoSpatialTile: {
|
|
@@ -6167,7 +6167,7 @@
|
|
|
6167
6167
|
};
|
|
6168
6168
|
|
|
6169
6169
|
// src/layers/schema/carto-vector-tile-loader.ts
|
|
6170
|
-
var VERSION = true ? "9.3.
|
|
6170
|
+
var VERSION = true ? "9.3.2" : "latest";
|
|
6171
6171
|
var id = "cartoVectorTile";
|
|
6172
6172
|
var DEFAULT_OPTIONS = {
|
|
6173
6173
|
cartoVectorTile: {
|
package/dist/index.cjs
CHANGED
|
@@ -689,7 +689,7 @@ function binaryToSpatialjson(binary) {
|
|
|
689
689
|
}
|
|
690
690
|
|
|
691
691
|
// dist/layers/schema/carto-spatial-tile-loader.js
|
|
692
|
-
var VERSION = true ? "9.3.
|
|
692
|
+
var VERSION = true ? "9.3.2" : "latest";
|
|
693
693
|
var id = "cartoSpatialTile";
|
|
694
694
|
var DEFAULT_OPTIONS = {
|
|
695
695
|
cartoSpatialTile: {
|
|
@@ -2052,7 +2052,7 @@ var TileReader3 = class {
|
|
|
2052
2052
|
};
|
|
2053
2053
|
|
|
2054
2054
|
// dist/layers/schema/carto-raster-tile-loader.js
|
|
2055
|
-
var VERSION2 = true ? "9.3.
|
|
2055
|
+
var VERSION2 = true ? "9.3.2" : "latest";
|
|
2056
2056
|
var id2 = "cartoRasterTile";
|
|
2057
2057
|
var DEFAULT_OPTIONS2 = {
|
|
2058
2058
|
cartoRasterTile: {
|
|
@@ -2165,7 +2165,7 @@ var TileReader4 = class {
|
|
|
2165
2165
|
};
|
|
2166
2166
|
|
|
2167
2167
|
// dist/layers/schema/carto-properties-tile-loader.js
|
|
2168
|
-
var VERSION3 = true ? "9.3.
|
|
2168
|
+
var VERSION3 = true ? "9.3.2" : "latest";
|
|
2169
2169
|
var id3 = "cartoPropertiesTile";
|
|
2170
2170
|
var DEFAULT_OPTIONS3 = {
|
|
2171
2171
|
cartoPropertiesTile: {
|
|
@@ -2194,7 +2194,7 @@ var carto_properties_tile_loader_default = CartoPropertiesTileLoader;
|
|
|
2194
2194
|
|
|
2195
2195
|
// dist/layers/schema/carto-vector-tile-loader.js
|
|
2196
2196
|
var import_earcut = __toESM(require("earcut"), 1);
|
|
2197
|
-
var VERSION4 = true ? "9.3.
|
|
2197
|
+
var VERSION4 = true ? "9.3.2" : "latest";
|
|
2198
2198
|
var id4 = "cartoVectorTile";
|
|
2199
2199
|
var DEFAULT_OPTIONS4 = {
|
|
2200
2200
|
cartoVectorTile: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { TileReader } from "./carto-properties-tile.js";
|
|
5
5
|
import { parsePbf } from "./tile-loader-utils.js";
|
|
6
6
|
import { getWorkerUrl } from "../../utils.js";
|
|
7
|
-
const VERSION = typeof "9.3.
|
|
7
|
+
const VERSION = typeof "9.3.2" !== 'undefined' ? "9.3.2" : 'latest';
|
|
8
8
|
const id = 'cartoPropertiesTile';
|
|
9
9
|
const DEFAULT_OPTIONS = {
|
|
10
10
|
cartoPropertiesTile: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { TileReader } from "./carto-raster-tile.js";
|
|
5
5
|
import { parsePbf } from "./tile-loader-utils.js";
|
|
6
6
|
import { getWorkerUrl } from "../../utils.js";
|
|
7
|
-
const VERSION = typeof "9.3.
|
|
7
|
+
const VERSION = typeof "9.3.2" !== 'undefined' ? "9.3.2" : 'latest';
|
|
8
8
|
const id = 'cartoRasterTile';
|
|
9
9
|
const DEFAULT_OPTIONS = {
|
|
10
10
|
cartoRasterTile: {
|
|
@@ -5,7 +5,7 @@ import { TileReader } from "./carto-spatial-tile.js";
|
|
|
5
5
|
import { parsePbf } from "./tile-loader-utils.js";
|
|
6
6
|
import { getWorkerUrl } from "../../utils.js";
|
|
7
7
|
import { binaryToSpatialjson } from "./spatialjson-utils.js";
|
|
8
|
-
const VERSION = typeof "9.3.
|
|
8
|
+
const VERSION = typeof "9.3.2" !== 'undefined' ? "9.3.2" : 'latest';
|
|
9
9
|
const id = 'cartoSpatialTile';
|
|
10
10
|
const DEFAULT_OPTIONS = {
|
|
11
11
|
cartoSpatialTile: {
|
|
@@ -5,7 +5,7 @@ import earcut from 'earcut';
|
|
|
5
5
|
import { TileReader } from "./carto-tile.js";
|
|
6
6
|
import { parsePbf } from "./tile-loader-utils.js";
|
|
7
7
|
import { getWorkerUrl } from "../../utils.js";
|
|
8
|
-
const VERSION = typeof "9.3.
|
|
8
|
+
const VERSION = typeof "9.3.2" !== 'undefined' ? "9.3.2" : 'latest';
|
|
9
9
|
const id = 'cartoVectorTile';
|
|
10
10
|
const DEFAULT_OPTIONS = {
|
|
11
11
|
cartoVectorTile: {
|
package/dist.min.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
else if (typeof define === 'function' && define.amd) define([], factory);
|
|
5
5
|
else if (typeof exports === 'object') exports['deck'] = factory();
|
|
6
6
|
else root['deck'] = factory();})(globalThis, function () {
|
|
7
|
-
"use strict";var __exports__=(()=>{var ig=Object.create;var Gi=Object.defineProperty;var og=Object.getOwnPropertyDescriptor;var ag=Object.getOwnPropertyNames;var sg=Object.getPrototypeOf,fg=Object.prototype.hasOwnProperty;var X=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ga=(e,t)=>{for(var r in t)Gi(e,r,{get:t[r],enumerable:!0})},qi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ag(t))!fg.call(e,i)&&i!==r&&Gi(e,i,{get:()=>t[i],enumerable:!(n=og(t,i))||n.enumerable});return e},Je=(e,t,r)=>(qi(e,t,"default"),r&&qi(r,t,"default")),G=(e,t,r)=>(r=e!=null?ig(sg(e)):{},qi(t||!e||!e.__esModule?Gi(r,"default",{value:e,enumerable:!0}):r,e)),lg=e=>qi(Gi({},"__esModule",{value:!0}),e);var kt=X((__,pl)=>{pl.exports=globalThis.deck});var pt=X((E_,gl)=>{gl.exports=globalThis.deck});var pn=X((S_,ml)=>{ml.exports=globalThis.loaders});var Se=X((k_,vl)=>{vl.exports=globalThis.deck});var Kt=X((_3,Gl)=>{Gl.exports=globalThis.h3||{}});var mt=X(pe=>{"use strict";var am=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function sm(e,t){return Object.prototype.hasOwnProperty.call(e,t)}pe.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)sm(r,n)&&(e[n]=r[n])}}return e};pe.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var fm={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},lm={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};pe.setTyped=function(e){e?(pe.Buf8=Uint8Array,pe.Buf16=Uint16Array,pe.Buf32=Int32Array,pe.assign(pe,fm)):(pe.Buf8=Array,pe.Buf16=Array,pe.Buf32=Array,pe.assign(pe,lm))};pe.setTyped(am)});var kc=X(Br=>{"use strict";var cm=mt(),um=4,fc=0,lc=1,dm=2;function Ir(e){for(var t=e.length;--t>=0;)e[t]=0}var hm=0,gc=1,pm=2,gm=3,mm=258,is=29,Sn=256,vn=Sn+1+is,Mr=30,os=19,mc=2*vn+1,Xt=15,Qa=16,bm=7,as=256,bc=16,yc=17,xc=18,rs=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Qi=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ym=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],vc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],xm=512,bt=new Array((vn+2)*2);Ir(bt);var xn=new Array(Mr*2);Ir(xn);var wn=new Array(xm);Ir(wn);var _n=new Array(mm-gm+1);Ir(_n);var ss=new Array(is);Ir(ss);var Ji=new Array(Mr);Ir(Ji);function Ja(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var wc,_c,Ec;function es(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Sc(e){return e<256?wn[e]:wn[256+(e>>>7)]}function En(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function be(e,t,r){e.bi_valid>Qa-r?(e.bi_buf|=t<<e.bi_valid&65535,En(e,e.bi_buf),e.bi_buf=t>>Qa-e.bi_valid,e.bi_valid+=r-Qa):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function rt(e,t,r){be(e,r[t*2],r[t*2+1])}function Tc(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function vm(e){e.bi_valid===16?(En(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function wm(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,f,c,u,d,h,g,x=0;for(d=0;d<=Xt;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,f=e.heap_max+1;f<mc;f++)c=e.heap[f],d=r[r[c*2+1]*2+1]+1,d>l&&(d=l,x++),r[c*2+1]=d,!(c>n)&&(e.bl_count[d]++,h=0,c>=s&&(h=a[c-s]),g=r[c*2],e.opt_len+=g*(d+h),o&&(e.static_len+=g*(i[c*2+1]+h)));if(x!==0){do{for(d=l-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,x-=2}while(x>0);for(d=l;d!==0;d--)for(c=e.bl_count[d];c!==0;)u=e.heap[--f],!(u>n)&&(r[u*2+1]!==d&&(e.opt_len+=(d-r[u*2+1])*r[u*2],r[u*2+1]=d),c--)}}function Cc(e,t,r){var n=new Array(Xt+1),i=0,o,a;for(o=1;o<=Xt;o++)n[o]=i=i+r[o-1]<<1;for(a=0;a<=t;a++){var s=e[a*2+1];s!==0&&(e[a*2]=Tc(n[s]++,s))}}function _m(){var e,t,r,n,i,o=new Array(Xt+1);for(r=0,n=0;n<is-1;n++)for(ss[n]=r,e=0;e<1<<rs[n];e++)_n[r++]=n;for(_n[r-1]=n,i=0,n=0;n<16;n++)for(Ji[n]=i,e=0;e<1<<Qi[n];e++)wn[i++]=n;for(i>>=7;n<Mr;n++)for(Ji[n]=i<<7,e=0;e<1<<Qi[n]-7;e++)wn[256+i++]=n;for(t=0;t<=Xt;t++)o[t]=0;for(e=0;e<=143;)bt[e*2+1]=8,e++,o[8]++;for(;e<=255;)bt[e*2+1]=9,e++,o[9]++;for(;e<=279;)bt[e*2+1]=7,e++,o[7]++;for(;e<=287;)bt[e*2+1]=8,e++,o[8]++;for(Cc(bt,vn+1,o),e=0;e<Mr;e++)xn[e*2+1]=5,xn[e*2]=Tc(e,5);wc=new Ja(bt,rs,Sn+1,vn,Xt),_c=new Ja(xn,Qi,0,Mr,Xt),Ec=new Ja(new Array(0),ym,0,os,bm)}function Ac(e){var t;for(t=0;t<vn;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Mr;t++)e.dyn_dtree[t*2]=0;for(t=0;t<os;t++)e.bl_tree[t*2]=0;e.dyn_ltree[as*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Pc(e){e.bi_valid>8?En(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Em(e,t,r,n){Pc(e),n&&(En(e,r),En(e,~r)),cm.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function cc(e,t,r,n){var i=t*2,o=r*2;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function ts(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&cc(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!cc(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function uc(e,t,r){var n,i,o=0,a,s;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,n===0?rt(e,i,t):(a=_n[i],rt(e,a+Sn+1,t),s=rs[a],s!==0&&(i-=ss[a],be(e,i,s)),n--,a=Sc(n),rt(e,a,r),s=Qi[a],s!==0&&(n-=Ji[a],be(e,n,s)));while(o<e.last_lit);rt(e,as,t)}function ns(e,t){var r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,l=-1,f;for(e.heap_len=0,e.heap_max=mc,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)f=e.heap[++e.heap_len]=l<2?++l:0,r[f*2]=1,e.depth[f]=0,e.opt_len--,i&&(e.static_len-=n[f*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)ts(e,r,a);f=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ts(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,r[f*2]=r[a*2]+r[s*2],e.depth[f]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,r[a*2+1]=r[s*2+1]=f,e.heap[1]=f++,ts(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],wm(e,t),Cc(r,l,e.bl_count)}function dc(e,t,r){var n,i=-1,o,a=t[0*2+1],s=0,l=7,f=4;for(a===0&&(l=138,f=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)&&(s<f?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[bc*2]++):s<=10?e.bl_tree[yc*2]++:e.bl_tree[xc*2]++,s=0,i=o,a===0?(l=138,f=3):o===a?(l=6,f=3):(l=7,f=4))}function hc(e,t,r){var n,i=-1,o,a=t[0*2+1],s=0,l=7,f=4;for(a===0&&(l=138,f=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)){if(s<f)do rt(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(rt(e,o,e.bl_tree),s--),rt(e,bc,e.bl_tree),be(e,s-3,2)):s<=10?(rt(e,yc,e.bl_tree),be(e,s-3,3)):(rt(e,xc,e.bl_tree),be(e,s-11,7));s=0,i=o,a===0?(l=138,f=3):o===a?(l=6,f=3):(l=7,f=4)}}function Sm(e){var t;for(dc(e,e.dyn_ltree,e.l_desc.max_code),dc(e,e.dyn_dtree,e.d_desc.max_code),ns(e,e.bl_desc),t=os-1;t>=3&&e.bl_tree[vc[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Tm(e,t,r,n){var i;for(be(e,t-257,5),be(e,r-1,5),be(e,n-4,4),i=0;i<n;i++)be(e,e.bl_tree[vc[i]*2+1],3);hc(e,e.dyn_ltree,t-1),hc(e,e.dyn_dtree,r-1)}function Cm(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return fc;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return lc;for(r=32;r<Sn;r++)if(e.dyn_ltree[r*2]!==0)return lc;return fc}var pc=!1;function Am(e){pc||(_m(),pc=!0),e.l_desc=new es(e.dyn_ltree,wc),e.d_desc=new es(e.dyn_dtree,_c),e.bl_desc=new es(e.bl_tree,Ec),e.bi_buf=0,e.bi_valid=0,Ac(e)}function Fc(e,t,r,n){be(e,(hm<<1)+(n?1:0),3),Em(e,t,r,!0)}function Pm(e){be(e,gc<<1,3),rt(e,as,bt),vm(e)}function Fm(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===dm&&(e.strm.data_type=Cm(e)),ns(e,e.l_desc),ns(e,e.d_desc),a=Sm(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&t!==-1?Fc(e,t,r,n):e.strategy===um||o===i?(be(e,(gc<<1)+(n?1:0),3),uc(e,bt,xn)):(be(e,(pm<<1)+(n?1:0),3),Tm(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),uc(e,e.dyn_ltree,e.dyn_dtree)),Ac(e),n&&Pc(e)}function km(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(_n[r]+Sn+1)*2]++,e.dyn_dtree[Sc(t)*2]++),e.last_lit===e.lit_bufsize-1}Br._tr_init=Am;Br._tr_stored_block=Fc;Br._tr_flush_block=Fm;Br._tr_tally=km;Br._tr_align=Pm});var fs=X((o5,Lc)=>{"use strict";function Lm(e,t,r,n){for(var i=e&65535|0,o=e>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do i=i+t[n++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}Lc.exports=Lm});var ls=X((a5,Mc)=>{"use strict";function Mm(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var Im=Mm();function Bm(e,t,r,n){var i=Im,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}Mc.exports=Bm});var eo=X((s5,Ic)=>{"use strict";Ic.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var Gc=X(ot=>{"use strict";var ge=mt(),Le=kc(),Dc=fs(),Bt=ls(),Om=eo(),tr=0,Rm=1,Dm=3,zt=4,Bc=5,it=0,Oc=1,Me=-2,Nm=-3,cs=-5,zm=-1,Um=1,to=2,qm=3,Gm=4,Vm=0,$m=2,oo=8,Hm=9,Zm=15,jm=8,Wm=29,Ym=256,ds=Ym+1+Wm,Km=30,Xm=19,Qm=2*ds+1,Jm=15,$=3,Dt=258,qe=Dt+$+1,e1=32,ao=42,hs=69,ro=73,no=91,io=103,Qt=113,Cn=666,se=1,An=2,Jt=3,Dr=4,t1=3;function Nt(e,t){return e.msg=Om[t],t}function Rc(e){return(e<<1)-(e>4?9:0)}function Rt(e){for(var t=e.length;--t>=0;)e[t]=0}function Ot(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(ge.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function le(e,t){Le._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ot(e.strm)}function j(e,t){e.pending_buf[e.pending++]=t}function Tn(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function r1(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,ge.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=Dc(e.adler,t,i,r):e.state.wrap===2&&(e.adler=Bt(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Nc(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-qe?e.strstart-(e.w_size-qe):0,f=e.window,c=e.w_mask,u=e.prev,d=e.strstart+Dt,h=f[n+a-1],g=f[n+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(f[i+a]!==g||f[i+a-1]!==h||f[i]!==f[n]||f[++i]!==f[n+1])){n+=2,i++;do;while(f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&n<d);if(o=Dt-(d-n),n=d-Dt,o>a){if(e.match_start=t,a=o,o>=s)break;h=f[n+a-1],g=f[n+a]}}while((t=u[t&c])>l&&--r!==0);return a<=e.lookahead?a:e.lookahead}function er(e){var t=e.w_size,r,n,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-qe)){ge.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);o+=t}if(e.strm.avail_in===0)break;if(n=r1(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=$)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+$-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<$)););}while(e.lookahead<qe&&e.strm.avail_in!==0)}function n1(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(er(e),e.lookahead===0&&t===tr)return se;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,le(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-qe&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===zt?(le(e,!0),e.strm.avail_out===0?Jt:Dr):(e.strstart>e.block_start&&(le(e,!1),e.strm.avail_out===0),se)}function us(e,t){for(var r,n;;){if(e.lookahead<qe){if(er(e),e.lookahead<qe&&t===tr)return se;if(e.lookahead===0)break}if(r=0,e.lookahead>=$&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-qe&&(e.match_length=Nc(e,r)),e.match_length>=$)if(n=Le._tr_tally(e,e.strstart-e.match_start,e.match_length-$),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=$){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Le._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=e.strstart<$-1?e.strstart:$-1,t===zt?(le(e,!0),e.strm.avail_out===0?Jt:Dr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:An}function Or(e,t){for(var r,n,i;;){if(e.lookahead<qe){if(er(e),e.lookahead<qe&&t===tr)return se;if(e.lookahead===0)break}if(r=0,e.lookahead>=$&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=$-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-qe&&(e.match_length=Nc(e,r),e.match_length<=5&&(e.strategy===Um||e.match_length===$&&e.strstart-e.match_start>4096)&&(e.match_length=$-1)),e.prev_length>=$&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-$,n=Le._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-$),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=$-1,e.strstart++,n&&(le(e,!1),e.strm.avail_out===0))return se}else if(e.match_available){if(n=Le._tr_tally(e,0,e.window[e.strstart-1]),n&&le(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return se}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Le._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<$-1?e.strstart:$-1,t===zt?(le(e,!0),e.strm.avail_out===0?Jt:Dr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:An}function i1(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=Dt){if(er(e),e.lookahead<=Dt&&t===tr)return se;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=$&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+Dt;do;while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<o);e.match_length=Dt-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=$?(r=Le._tr_tally(e,1,e.match_length-$),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Le._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===zt?(le(e,!0),e.strm.avail_out===0?Jt:Dr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:An}function o1(e,t){for(var r;;){if(e.lookahead===0&&(er(e),e.lookahead===0)){if(t===tr)return se;break}if(e.match_length=0,r=Le._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===zt?(le(e,!0),e.strm.avail_out===0?Jt:Dr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:An}function nt(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var Rr;Rr=[new nt(0,0,0,0,n1),new nt(4,4,8,4,us),new nt(4,5,16,8,us),new nt(4,6,32,32,us),new nt(4,4,16,16,Or),new nt(8,16,32,32,Or),new nt(8,16,128,128,Or),new nt(8,32,128,256,Or),new nt(32,128,258,1024,Or),new nt(32,258,258,4096,Or)];function a1(e){e.window_size=2*e.w_size,Rt(e.head),e.max_lazy_match=Rr[e.level].max_lazy,e.good_match=Rr[e.level].good_length,e.nice_match=Rr[e.level].nice_length,e.max_chain_length=Rr[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=$-1,e.match_available=0,e.ins_h=0}function s1(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=oo,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ge.Buf16(Qm*2),this.dyn_dtree=new ge.Buf16((2*Km+1)*2),this.bl_tree=new ge.Buf16((2*Xm+1)*2),Rt(this.dyn_ltree),Rt(this.dyn_dtree),Rt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ge.Buf16(Jm+1),this.heap=new ge.Buf16(2*ds+1),Rt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ge.Buf16(2*ds+1),Rt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function zc(e){var t;return!e||!e.state?Nt(e,Me):(e.total_in=e.total_out=0,e.data_type=$m,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ao:Qt,e.adler=t.wrap===2?0:1,t.last_flush=tr,Le._tr_init(t),it)}function Uc(e){var t=zc(e);return t===it&&a1(e.state),t}function f1(e,t){return!e||!e.state||e.state.wrap!==2?Me:(e.state.gzhead=t,it)}function qc(e,t,r,n,i,o){if(!e)return Me;var a=1;if(t===zm&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>Hm||r!==oo||n<8||n>15||t<0||t>9||o<0||o>Gm)return Nt(e,Me);n===8&&(n=9);var s=new s1;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+$-1)/$),s.window=new ge.Buf8(s.w_size*2),s.head=new ge.Buf16(s.hash_size),s.prev=new ge.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new ge.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=t,s.strategy=o,s.method=r,Uc(e)}function l1(e,t){return qc(e,t,oo,Zm,jm,Vm)}function c1(e,t){var r,n,i,o;if(!e||!e.state||t>Bc||t<0)return e?Nt(e,Me):Me;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Cn&&t!==zt)return Nt(e,e.avail_out===0?cs:Me);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===ao)if(n.wrap===2)e.adler=0,j(n,31),j(n,139),j(n,8),n.gzhead?(j(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),j(n,n.gzhead.time&255),j(n,n.gzhead.time>>8&255),j(n,n.gzhead.time>>16&255),j(n,n.gzhead.time>>24&255),j(n,n.level===9?2:n.strategy>=to||n.level<2?4:0),j(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(j(n,n.gzhead.extra.length&255),j(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Bt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=hs):(j(n,0),j(n,0),j(n,0),j(n,0),j(n,0),j(n,n.level===9?2:n.strategy>=to||n.level<2?4:0),j(n,t1),n.status=Qt);else{var a=oo+(n.w_bits-8<<4)<<8,s=-1;n.strategy>=to||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,a|=s<<6,n.strstart!==0&&(a|=e1),a+=31-a%31,n.status=Qt,Tn(n,a),n.strstart!==0&&(Tn(n,e.adler>>>16),Tn(n,e.adler&65535)),e.adler=1}if(n.status===hs)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),Ot(e),i=n.pending,n.pending===n.pending_buf_size));)j(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=ro)}else n.status=ro;if(n.status===ro)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),Ot(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,j(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=no)}else n.status=no;if(n.status===no)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),Ot(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,j(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=io)}else n.status=io;if(n.status===io&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Ot(e),n.pending+2<=n.pending_buf_size&&(j(n,e.adler&255),j(n,e.adler>>8&255),e.adler=0,n.status=Qt)):n.status=Qt),n.pending!==0){if(Ot(e),e.avail_out===0)return n.last_flush=-1,it}else if(e.avail_in===0&&Rc(t)<=Rc(r)&&t!==zt)return Nt(e,cs);if(n.status===Cn&&e.avail_in!==0)return Nt(e,cs);if(e.avail_in!==0||n.lookahead!==0||t!==tr&&n.status!==Cn){var l=n.strategy===to?o1(n,t):n.strategy===qm?i1(n,t):Rr[n.level].func(n,t);if((l===Jt||l===Dr)&&(n.status=Cn),l===se||l===Jt)return e.avail_out===0&&(n.last_flush=-1),it;if(l===An&&(t===Rm?Le._tr_align(n):t!==Bc&&(Le._tr_stored_block(n,0,0,!1),t===Dm&&(Rt(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Ot(e),e.avail_out===0))return n.last_flush=-1,it}return t!==zt?it:n.wrap<=0?Oc:(n.wrap===2?(j(n,e.adler&255),j(n,e.adler>>8&255),j(n,e.adler>>16&255),j(n,e.adler>>24&255),j(n,e.total_in&255),j(n,e.total_in>>8&255),j(n,e.total_in>>16&255),j(n,e.total_in>>24&255)):(Tn(n,e.adler>>>16),Tn(n,e.adler&65535)),Ot(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?it:Oc)}function u1(e){var t;return!e||!e.state?Me:(t=e.state.status,t!==ao&&t!==hs&&t!==ro&&t!==no&&t!==io&&t!==Qt&&t!==Cn?Nt(e,Me):(e.state=null,t===Qt?Nt(e,Nm):it))}function d1(e,t){var r=t.length,n,i,o,a,s,l,f,c;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==ao||n.lookahead))return Me;for(a===1&&(e.adler=Dc(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(Rt(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new ge.Buf8(n.w_size),ge.arraySet(c,t,r-n.w_size,n.w_size,0),t=c,r=n.w_size),s=e.avail_in,l=e.next_in,f=e.input,e.avail_in=r,e.next_in=0,e.input=t,er(n);n.lookahead>=$;){i=n.strstart,o=n.lookahead-($-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+$-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++;while(--o);n.strstart=i,n.lookahead=$-1,er(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=$-1,n.match_available=0,e.next_in=l,e.input=f,e.avail_in=s,n.wrap=a,it}ot.deflateInit=l1;ot.deflateInit2=qc;ot.deflateReset=Uc;ot.deflateResetKeep=zc;ot.deflateSetHeader=f1;ot.deflate=c1;ot.deflateEnd=u1;ot.deflateSetDictionary=d1;ot.deflateInfo="pako deflate (from Nodeca project)"});var ps=X(Nr=>{"use strict";var so=mt(),Vc=!0,$c=!0;try{String.fromCharCode.apply(null,[0])}catch{Vc=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{$c=!1}var Pn=new so.Buf8(256);for(yt=0;yt<256;yt++)Pn[yt]=yt>=252?6:yt>=248?5:yt>=240?4:yt>=224?3:yt>=192?2:1;var yt;Pn[254]=Pn[254]=1;Nr.string2buf=function(e){var t,r,n,i,o,a=e.length,s=0;for(i=0;i<a;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new so.Buf8(s),o=0,i=0;o<s;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t};function Hc(e,t){if(t<65534&&(e.subarray&&$c||!e.subarray&&Vc))return String.fromCharCode.apply(null,so.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}Nr.buf2binstring=function(e){return Hc(e,e.length)};Nr.binstring2buf=function(e){for(var t=new so.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};Nr.buf2string=function(e,t){var r,n,i,o,a=t||e.length,s=new Array(a*2);for(n=0,r=0;r<a;){if(i=e[r++],i<128){s[n++]=i;continue}if(o=Pn[i],o>4){s[n++]=65533,r+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&r<a;)i=i<<6|e[r++]&63,o--;if(o>1){s[n++]=65533;continue}i<65536?s[n++]=i:(i-=65536,s[n++]=55296|i>>10&1023,s[n++]=56320|i&1023)}return Hc(s,n)};Nr.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Pn[e[r]]>t?r:t}});var gs=X((c5,Zc)=>{"use strict";function h1(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Zc.exports=h1});var Kc=X(Ln=>{"use strict";var Fn=Gc(),kn=mt(),bs=ps(),ys=eo(),p1=gs(),Yc=Object.prototype.toString,g1=0,ms=4,zr=0,jc=1,Wc=2,m1=-1,b1=0,y1=8;function rr(e){if(!(this instanceof rr))return new rr(e);this.options=kn.assign({level:m1,method:y1,chunkSize:16384,windowBits:15,memLevel:8,strategy:b1,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p1,this.strm.avail_out=0;var r=Fn.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==zr)throw new Error(ys[r]);if(t.header&&Fn.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=bs.string2buf(t.dictionary):Yc.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Fn.deflateSetDictionary(this.strm,n),r!==zr)throw new Error(ys[r]);this._dict_set=!0}}rr.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?ms:g1,typeof e=="string"?r.input=bs.string2buf(e):Yc.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new kn.Buf8(n),r.next_out=0,r.avail_out=n),i=Fn.deflate(r,o),i!==jc&&i!==zr)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===ms||o===Wc))&&(this.options.to==="string"?this.onData(bs.buf2binstring(kn.shrinkBuf(r.output,r.next_out))):this.onData(kn.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==jc);return o===ms?(i=Fn.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===zr):(o===Wc&&(this.onEnd(zr),r.avail_out=0),!0)};rr.prototype.onData=function(e){this.chunks.push(e)};rr.prototype.onEnd=function(e){e===zr&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=kn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function xs(e,t){var r=new rr(t);if(r.push(e,!0),r.err)throw r.msg||ys[r.err];return r.result}function x1(e,t){return t=t||{},t.raw=!0,xs(e,t)}function v1(e,t){return t=t||{},t.gzip=!0,xs(e,t)}Ln.Deflate=rr;Ln.deflate=xs;Ln.deflateRaw=x1;Ln.gzip=v1});var Qc=X((d5,Xc)=>{"use strict";var fo=30,w1=12;Xc.exports=function(t,r){var n,i,o,a,s,l,f,c,u,d,h,g,x,T,_,w,k,M,I,R,N,p,m,b,y;n=t.state,i=t.next_in,b=t.input,o=i+(t.avail_in-5),a=t.next_out,y=t.output,s=a-(r-t.avail_out),l=a+(t.avail_out-257),f=n.dmax,c=n.wsize,u=n.whave,d=n.wnext,h=n.window,g=n.hold,x=n.bits,T=n.lencode,_=n.distcode,w=(1<<n.lenbits)-1,k=(1<<n.distbits)-1;e:do{x<15&&(g+=b[i++]<<x,x+=8,g+=b[i++]<<x,x+=8),M=T[g&w];t:for(;;){if(I=M>>>24,g>>>=I,x-=I,I=M>>>16&255,I===0)y[a++]=M&65535;else if(I&16){R=M&65535,I&=15,I&&(x<I&&(g+=b[i++]<<x,x+=8),R+=g&(1<<I)-1,g>>>=I,x-=I),x<15&&(g+=b[i++]<<x,x+=8,g+=b[i++]<<x,x+=8),M=_[g&k];r:for(;;){if(I=M>>>24,g>>>=I,x-=I,I=M>>>16&255,I&16){if(N=M&65535,I&=15,x<I&&(g+=b[i++]<<x,x+=8,x<I&&(g+=b[i++]<<x,x+=8)),N+=g&(1<<I)-1,N>f){t.msg="invalid distance too far back",n.mode=fo;break e}if(g>>>=I,x-=I,I=a-s,N>I){if(I=N-I,I>u&&n.sane){t.msg="invalid distance too far back",n.mode=fo;break e}if(p=0,m=h,d===0){if(p+=c-I,I<R){R-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}}else if(d<I){if(p+=c+d-I,I-=d,I<R){R-=I;do y[a++]=h[p++];while(--I);if(p=0,d<R){I=d,R-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}}}else if(p+=d-I,I<R){R-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}for(;R>2;)y[a++]=m[p++],y[a++]=m[p++],y[a++]=m[p++],R-=3;R&&(y[a++]=m[p++],R>1&&(y[a++]=m[p++]))}else{p=a-N;do y[a++]=y[p++],y[a++]=y[p++],y[a++]=y[p++],R-=3;while(R>2);R&&(y[a++]=y[p++],R>1&&(y[a++]=y[p++]))}}else if(I&64){t.msg="invalid distance code",n.mode=fo;break e}else{M=_[(M&65535)+(g&(1<<I)-1)];continue r}break}}else if(I&64)if(I&32){n.mode=w1;break e}else{t.msg="invalid literal/length code",n.mode=fo;break e}else{M=T[(M&65535)+(g&(1<<I)-1)];continue t}break}}while(i<o&&a<l);R=x>>3,i-=R,x-=R<<3,g&=(1<<x)-1,t.next_in=i,t.next_out=a,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=a<l?257+(l-a):257-(a-l),n.hold=g,n.bits=x}});var ou=X((h5,iu)=>{"use strict";var Jc=mt(),Ur=15,eu=852,tu=592,ru=0,vs=1,nu=2,_1=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],E1=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],S1=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],T1=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];iu.exports=function(t,r,n,i,o,a,s,l){var f=l.bits,c=0,u=0,d=0,h=0,g=0,x=0,T=0,_=0,w=0,k=0,M,I,R,N,p,m=null,b=0,y,v=new Jc.Buf16(Ur+1),S=new Jc.Buf16(Ur+1),P=null,E=0,C,F,A;for(c=0;c<=Ur;c++)v[c]=0;for(u=0;u<i;u++)v[r[n+u]]++;for(g=f,h=Ur;h>=1&&v[h]===0;h--);if(g>h&&(g=h),h===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,l.bits=1,0;for(d=1;d<h&&v[d]===0;d++);for(g<d&&(g=d),_=1,c=1;c<=Ur;c++)if(_<<=1,_-=v[c],_<0)return-1;if(_>0&&(t===ru||h!==1))return-1;for(S[1]=0,c=1;c<Ur;c++)S[c+1]=S[c]+v[c];for(u=0;u<i;u++)r[n+u]!==0&&(s[S[r[n+u]]++]=u);if(t===ru?(m=P=s,y=19):t===vs?(m=_1,b-=257,P=E1,E-=257,y=256):(m=S1,P=T1,y=-1),k=0,u=0,c=d,p=a,x=g,T=0,R=-1,w=1<<g,N=w-1,t===vs&&w>eu||t===nu&&w>tu)return 1;for(;;){C=c-T,s[u]<y?(F=0,A=s[u]):s[u]>y?(F=P[E+s[u]],A=m[b+s[u]]):(F=32+64,A=0),M=1<<c-T,I=1<<x,d=I;do I-=M,o[p+(k>>T)+I]=C<<24|F<<16|A|0;while(I!==0);for(M=1<<c-1;k&M;)M>>=1;if(M!==0?(k&=M-1,k+=M):k=0,u++,--v[c]===0){if(c===h)break;c=r[n+s[u]]}if(c>g&&(k&N)!==R){for(T===0&&(T=g),p+=d,x=c-T,_=1<<x;x+T<h&&(_-=v[x+T],!(_<=0));)x++,_<<=1;if(w+=1<<x,t===vs&&w>eu||t===nu&&w>tu)return 1;R=k&N,o[R]=g<<24|x<<16|p-a|0}}return k!==0&&(o[p+k]=c-T<<24|64<<16|0),l.bits=g,0}});var Uu=X(Ge=>{"use strict";var Te=mt(),Cs=fs(),at=ls(),C1=Qc(),Mn=ou(),A1=0,Lu=1,Mu=2,au=4,P1=5,lo=6,nr=0,F1=1,k1=2,Ie=-2,Iu=-3,As=-4,L1=-5,su=8,Bu=1,fu=2,lu=3,cu=4,uu=5,du=6,hu=7,pu=8,gu=9,mu=10,ho=11,xt=12,ws=13,bu=14,_s=15,yu=16,xu=17,vu=18,wu=19,co=20,uo=21,_u=22,Eu=23,Su=24,Tu=25,Cu=26,Es=27,Au=28,Pu=29,Q=30,Ps=31,M1=32,I1=852,B1=592,O1=15,R1=O1;function Fu(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function D1(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Te.Buf16(320),this.work=new Te.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ou(e){var t;return!e||!e.state?Ie:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Bu,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Te.Buf32(I1),t.distcode=t.distdyn=new Te.Buf32(B1),t.sane=1,t.back=-1,nr)}function Ru(e){var t;return!e||!e.state?Ie:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Ou(e))}function Du(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Ie:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Ru(e))}function Nu(e,t){var r,n;return e?(n=new D1,e.state=n,n.window=null,r=Du(e,t),r!==nr&&(e.state=null),r):Ie}function N1(e){return Nu(e,R1)}var ku=!0,Ss,Ts;function z1(e){if(ku){var t;for(Ss=new Te.Buf32(512),Ts=new Te.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Mn(Lu,e.lens,0,288,Ss,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Mn(Mu,e.lens,0,32,Ts,0,e.work,{bits:5}),ku=!1}e.lencode=Ss,e.lenbits=9,e.distcode=Ts,e.distbits=5}function zu(e,t,r,n){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Te.Buf8(o.wsize)),n>=o.wsize?(Te.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),Te.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(Te.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function U1(e,t){var r,n,i,o,a,s,l,f,c,u,d,h,g,x,T=0,_,w,k,M,I,R,N,p,m=new Te.Buf8(4),b,y,v=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ie;r=e.state,r.mode===xt&&(r.mode=ws),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,f=r.hold,c=r.bits,u=s,d=l,p=nr;e:for(;;)switch(r.mode){case Bu:if(r.wrap===0){r.mode=ws;break}for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.wrap&2&&f===35615){r.check=0,m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0),f=0,c=0,r.mode=fu;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((f&255)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=Q;break}if((f&15)!==su){e.msg="unknown compression method",r.mode=Q;break}if(f>>>=4,c-=4,N=(f&15)+8,r.wbits===0)r.wbits=N;else if(N>r.wbits){e.msg="invalid window size",r.mode=Q;break}r.dmax=1<<N,e.adler=r.check=1,r.mode=f&512?mu:xt,f=0,c=0;break;case fu:for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.flags=f,(r.flags&255)!==su){e.msg="unknown compression method",r.mode=Q;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Q;break}r.head&&(r.head.text=f>>8&1),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0,r.mode=lu;case lu:for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.head&&(r.head.time=f),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,m[2]=f>>>16&255,m[3]=f>>>24&255,r.check=at(r.check,m,4,0)),f=0,c=0,r.mode=cu;case cu:for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.head&&(r.head.xflags=f&255,r.head.os=f>>8),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0,r.mode=uu;case uu:if(r.flags&1024){for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.length=f,r.head&&(r.head.extra_len=f),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0}else r.head&&(r.head.extra=null);r.mode=du;case du:if(r.flags&1024&&(h=r.length,h>s&&(h=s),h&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Te.arraySet(r.head.extra,n,o,h,N)),r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,r.length-=h),r.length))break e;r.length=0,r.mode=hu;case hu:if(r.flags&2048){if(s===0)break e;h=0;do N=n[o+h++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N));while(N&&h<s);if(r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,N)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=pu;case pu:if(r.flags&4096){if(s===0)break e;h=0;do N=n[o+h++],r.head&&N&&r.length<65536&&(r.head.comment+=String.fromCharCode(N));while(N&&h<s);if(r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,N)break e}else r.head&&(r.head.comment=null);r.mode=gu;case gu:if(r.flags&512){for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Q;break}f=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=xt;break;case mu:for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}e.adler=r.check=Fu(f),f=0,c=0,r.mode=ho;case ho:if(r.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,k1;e.adler=r.check=1,r.mode=xt;case xt:if(t===P1||t===lo)break e;case ws:if(r.last){f>>>=c&7,c-=c&7,r.mode=Es;break}for(;c<3;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}switch(r.last=f&1,f>>>=1,c-=1,f&3){case 0:r.mode=bu;break;case 1:if(z1(r),r.mode=co,t===lo){f>>>=2,c-=2;break e}break;case 2:r.mode=xu;break;case 3:e.msg="invalid block type",r.mode=Q}f>>>=2,c-=2;break;case bu:for(f>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if((f&65535)!==(f>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Q;break}if(r.length=f&65535,f=0,c=0,r.mode=_s,t===lo)break e;case _s:r.mode=yu;case yu:if(h=r.length,h){if(h>s&&(h=s),h>l&&(h=l),h===0)break e;Te.arraySet(i,n,o,h,a),s-=h,o+=h,l-=h,a+=h,r.length-=h;break}r.mode=xt;break;case xu:for(;c<14;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.nlen=(f&31)+257,f>>>=5,c-=5,r.ndist=(f&31)+1,f>>>=5,c-=5,r.ncode=(f&15)+4,f>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Q;break}r.have=0,r.mode=vu;case vu:for(;r.have<r.ncode;){for(;c<3;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.lens[v[r.have++]]=f&7,f>>>=3,c-=3}for(;r.have<19;)r.lens[v[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,b={bits:r.lenbits},p=Mn(A1,r.lens,0,19,r.lencode,0,r.work,b),r.lenbits=b.bits,p){e.msg="invalid code lengths set",r.mode=Q;break}r.have=0,r.mode=wu;case wu:for(;r.have<r.nlen+r.ndist;){for(;T=r.lencode[f&(1<<r.lenbits)-1],_=T>>>24,w=T>>>16&255,k=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(k<16)f>>>=_,c-=_,r.lens[r.have++]=k;else{if(k===16){for(y=_+2;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f>>>=_,c-=_,r.have===0){e.msg="invalid bit length repeat",r.mode=Q;break}N=r.lens[r.have-1],h=3+(f&3),f>>>=2,c-=2}else if(k===17){for(y=_+3;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=_,c-=_,N=0,h=3+(f&7),f>>>=3,c-=3}else{for(y=_+7;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=_,c-=_,N=0,h=11+(f&127),f>>>=7,c-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Q;break}for(;h--;)r.lens[r.have++]=N}}if(r.mode===Q)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Q;break}if(r.lenbits=9,b={bits:r.lenbits},p=Mn(Lu,r.lens,0,r.nlen,r.lencode,0,r.work,b),r.lenbits=b.bits,p){e.msg="invalid literal/lengths set",r.mode=Q;break}if(r.distbits=6,r.distcode=r.distdyn,b={bits:r.distbits},p=Mn(Mu,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,b),r.distbits=b.bits,p){e.msg="invalid distances set",r.mode=Q;break}if(r.mode=co,t===lo)break e;case co:r.mode=uo;case uo:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,C1(e,d),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,f=r.hold,c=r.bits,r.mode===xt&&(r.back=-1);break}for(r.back=0;T=r.lencode[f&(1<<r.lenbits)-1],_=T>>>24,w=T>>>16&255,k=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(w&&!(w&240)){for(M=_,I=w,R=k;T=r.lencode[R+((f&(1<<M+I)-1)>>M)],_=T>>>24,w=T>>>16&255,k=T&65535,!(M+_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=M,c-=M,r.back+=M}if(f>>>=_,c-=_,r.back+=_,r.length=k,w===0){r.mode=Cu;break}if(w&32){r.back=-1,r.mode=xt;break}if(w&64){e.msg="invalid literal/length code",r.mode=Q;break}r.extra=w&15,r.mode=_u;case _u:if(r.extra){for(y=r.extra;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.length+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=Eu;case Eu:for(;T=r.distcode[f&(1<<r.distbits)-1],_=T>>>24,w=T>>>16&255,k=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(!(w&240)){for(M=_,I=w,R=k;T=r.distcode[R+((f&(1<<M+I)-1)>>M)],_=T>>>24,w=T>>>16&255,k=T&65535,!(M+_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=M,c-=M,r.back+=M}if(f>>>=_,c-=_,r.back+=_,w&64){e.msg="invalid distance code",r.mode=Q;break}r.offset=k,r.extra=w&15,r.mode=Su;case Su:if(r.extra){for(y=r.extra;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.offset+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Q;break}r.mode=Tu;case Tu:if(l===0)break e;if(h=d-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Q;break}h>r.wnext?(h-=r.wnext,g=r.wsize-h):g=r.wnext-h,h>r.length&&(h=r.length),x=r.window}else x=i,g=a-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do i[a++]=x[g++];while(--h);r.length===0&&(r.mode=uo);break;case Cu:if(l===0)break e;i[a++]=r.length,l--,r.mode=uo;break;case Es:if(r.wrap){for(;c<32;){if(s===0)break e;s--,f|=n[o++]<<c,c+=8}if(d-=l,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?at(r.check,i,d,a-d):Cs(r.check,i,d,a-d)),d=l,(r.flags?f:Fu(f))!==r.check){e.msg="incorrect data check",r.mode=Q;break}f=0,c=0}r.mode=Au;case Au:if(r.wrap&&r.flags){for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Q;break}f=0,c=0}r.mode=Pu;case Pu:p=F1;break e;case Q:p=Iu;break e;case Ps:return As;case M1:default:return Ie}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,(r.wsize||d!==e.avail_out&&r.mode<Q&&(r.mode<Es||t!==au))&&zu(e,e.output,e.next_out,d-e.avail_out)?(r.mode=Ps,As):(u-=e.avail_in,d-=e.avail_out,e.total_in+=u,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?at(r.check,i,d,e.next_out-d):Cs(r.check,i,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===xt?128:0)+(r.mode===co||r.mode===_s?256:0),(u===0&&d===0||t===au)&&p===nr&&(p=L1),p)}function q1(e){if(!e||!e.state)return Ie;var t=e.state;return t.window&&(t.window=null),e.state=null,nr}function G1(e,t){var r;return!e||!e.state||(r=e.state,!(r.wrap&2))?Ie:(r.head=t,t.done=!1,nr)}function V1(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==ho)?Ie:n.mode===ho&&(i=1,i=Cs(i,t,r,0),i!==n.check)?Iu:(o=zu(e,t,r,r),o?(n.mode=Ps,As):(n.havedict=1,nr))}Ge.inflateReset=Ru;Ge.inflateReset2=Du;Ge.inflateResetKeep=Ou;Ge.inflateInit=N1;Ge.inflateInit2=Nu;Ge.inflate=U1;Ge.inflateEnd=q1;Ge.inflateGetHeader=G1;Ge.inflateSetDictionary=V1;Ge.inflateInfo="pako inflate (from Nodeca project)"});var Fs=X((g5,qu)=>{"use strict";qu.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var Vu=X((m5,Gu)=>{"use strict";function $1(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Gu.exports=$1});var Hu=X(Bn=>{"use strict";var qr=Uu(),In=mt(),po=ps(),oe=Fs(),ks=eo(),H1=gs(),Z1=Vu(),$u=Object.prototype.toString;function ir(e){if(!(this instanceof ir))return new ir(e);this.options=In.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H1,this.strm.avail_out=0;var r=qr.inflateInit2(this.strm,t.windowBits);if(r!==oe.Z_OK)throw new Error(ks[r]);if(this.header=new Z1,qr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=po.string2buf(t.dictionary):$u.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=qr.inflateSetDictionary(this.strm,t.dictionary),r!==oe.Z_OK)))throw new Error(ks[r])}ir.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,s,l,f,c=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?oe.Z_FINISH:oe.Z_NO_FLUSH,typeof e=="string"?r.input=po.binstring2buf(e):$u.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new In.Buf8(n),r.next_out=0,r.avail_out=n),o=qr.inflate(r,oe.Z_NO_FLUSH),o===oe.Z_NEED_DICT&&i&&(o=qr.inflateSetDictionary(this.strm,i)),o===oe.Z_BUF_ERROR&&c===!0&&(o=oe.Z_OK,c=!1),o!==oe.Z_STREAM_END&&o!==oe.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===oe.Z_STREAM_END||r.avail_in===0&&(a===oe.Z_FINISH||a===oe.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=po.utf8border(r.output,r.next_out),l=r.next_out-s,f=po.buf2string(r.output,s),r.next_out=l,r.avail_out=n-l,l&&In.arraySet(r.output,r.output,s,l,0),this.onData(f)):this.onData(In.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(c=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==oe.Z_STREAM_END);return o===oe.Z_STREAM_END&&(a=oe.Z_FINISH),a===oe.Z_FINISH?(o=qr.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===oe.Z_OK):(a===oe.Z_SYNC_FLUSH&&(this.onEnd(oe.Z_OK),r.avail_out=0),!0)};ir.prototype.onData=function(e){this.chunks.push(e)};ir.prototype.onEnd=function(e){e===oe.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=In.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ls(e,t){var r=new ir(t);if(r.push(e,!0),r.err)throw r.msg||ks[r.err];return r.result}function j1(e,t){return t=t||{},t.raw=!0,Ls(e,t)}Bn.Inflate=ir;Bn.inflate=Ls;Bn.inflateRaw=j1;Bn.ungzip=Ls});var Wu=X((y5,ju)=>{"use strict";var W1=mt().assign,Y1=Kc(),K1=Hu(),X1=Fs(),Zu={};W1(Zu,Y1,K1,X1);ju.exports=Zu});var Yu=X(()=>{});var Ku=X(Ms=>{Ms.read=function(e,t,r,n,i){var o,a,s=i*8-n-1,l=(1<<s)-1,f=l>>1,c=-7,u=r?i-1:0,d=r?-1:1,h=e[t+u];for(u+=d,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=o*256+e[t+u],u+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=a*256+e[t+u],u+=d,c-=8);if(o===0)o=1-f;else{if(o===l)return a?NaN:(h?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-f}return(h?-1:1)*a*Math.pow(2,o-n)};Ms.write=function(e,t,r,n,i,o){var a,s,l,f=o*8-i-1,c=(1<<f)-1,u=c>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,g=n?1:-1,x=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+u>=1?t+=d/l:t+=d*Math.pow(2,1-u),t*l>=2&&(a++,l/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(t*l-1)*Math.pow(2,i),a=a+u):(s=t*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=s&255,h+=g,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;e[r+h]=a&255,h+=g,a/=256,f-=8);e[r+h-g]|=x*128}});var rd=X((R5,td)=>{"use strict";td.exports=W;var mo=Ku();function W(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}W.Varint=0;W.Fixed64=1;W.Bytes=2;W.Fixed32=5;var Is=(1<<16)*(1<<16),Xu=1/Is,Q1=12,ed=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");W.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,o=this.pos;this.type=n&7,e(i,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=bo(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Ju(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=bo(this.buf,this.pos)+bo(this.buf,this.pos+4)*Is;return this.pos+=8,e},readSFixed64:function(){var e=bo(this.buf,this.pos)+Ju(this.buf,this.pos+4)*Is;return this.pos+=8,e},readFloat:function(){var e=mo.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=mo.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t=this.buf,r,n;return n=t[this.pos++],r=n&127,n<128||(n=t[this.pos++],r|=(n&127)<<7,n<128)||(n=t[this.pos++],r|=(n&127)<<14,n<128)||(n=t[this.pos++],r|=(n&127)<<21,n<128)?r:(n=t[this.pos],r|=(n&15)<<28,J1(r,e,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=Q1&&ed?hb(this.buf,t,e):db(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==W.Bytes)return e.push(this.readVarint(t));var r=wt(this);for(e=e||[];this.pos<r;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==W.Bytes)return e.push(this.readSVarint());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==W.Bytes)return e.push(this.readBoolean());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==W.Bytes)return e.push(this.readFloat());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==W.Bytes)return e.push(this.readDouble());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==W.Bytes)return e.push(this.readFixed32());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==W.Bytes)return e.push(this.readSFixed32());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==W.Bytes)return e.push(this.readFixed64());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==W.Bytes)return e.push(this.readSFixed64());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=e&7;if(t===W.Varint)for(;this.buf[this.pos++]>127;);else if(t===W.Bytes)this.pos=this.readVarint()+this.pos;else if(t===W.Fixed32)this.pos+=4;else if(t===W.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Hr(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Hr(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Hr(this.buf,e&-1,this.pos),Hr(this.buf,Math.floor(e*Xu),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Hr(this.buf,e&-1,this.pos),Hr(this.buf,Math.floor(e*Xu),this.pos+4),this.pos+=8},writeVarint:function(e){if(e=+e||0,e>268435455||e<0){eb(e,this);return}this.realloc(4),this.buf[this.pos++]=e&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127)))},writeSVarint:function(e){this.writeVarint(e<0?-e*2-1:e*2)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(e.length*4),this.pos++;var t=this.pos;this.pos=pb(this.buf,e,this.pos);var r=this.pos-t;r>=128&&Qu(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),mo.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),mo.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r<t;r++)this.buf[this.pos++]=e[r]},writeRawMessage:function(e,t){this.pos++;var r=this.pos;e(t,this);var n=this.pos-r;n>=128&&Qu(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,W.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,nb,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,ib,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,sb,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,ob,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,ab,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,fb,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,lb,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,cb,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,ub,t)},writeBytesField:function(e,t){this.writeTag(e,W.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,W.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,W.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,W.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,W.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,W.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,W.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,W.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,W.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,W.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};function J1(e,t,r){var n=r.buf,i,o;if(o=n[r.pos++],i=(o&112)>>4,o<128||(o=n[r.pos++],i|=(o&127)<<3,o<128)||(o=n[r.pos++],i|=(o&127)<<10,o<128)||(o=n[r.pos++],i|=(o&127)<<17,o<128)||(o=n[r.pos++],i|=(o&127)<<24,o<128)||(o=n[r.pos++],i|=(o&1)<<31,o<128))return $r(e,i,t);throw new Error("Expected varint not more than 10 bytes")}function wt(e){return e.type===W.Bytes?e.readVarint()+e.pos:e.pos+1}function $r(e,t,r){return r?t*4294967296+(e>>>0):(t>>>0)*4294967296+(e>>>0)}function eb(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(r=~(-e%4294967296),n=~(-e/4294967296),r^4294967295?r=r+1|0:(r=0,n=n+1|0)),e>=18446744073709552e3||e<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),tb(r,n,t),rb(n,t)}function tb(e,t,r){r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos]=e&127}function rb(e,t){var r=(e&7)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127)))))}function Qu(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function nb(e,t){for(var r=0;r<e.length;r++)t.writeVarint(e[r])}function ib(e,t){for(var r=0;r<e.length;r++)t.writeSVarint(e[r])}function ob(e,t){for(var r=0;r<e.length;r++)t.writeFloat(e[r])}function ab(e,t){for(var r=0;r<e.length;r++)t.writeDouble(e[r])}function sb(e,t){for(var r=0;r<e.length;r++)t.writeBoolean(e[r])}function fb(e,t){for(var r=0;r<e.length;r++)t.writeFixed32(e[r])}function lb(e,t){for(var r=0;r<e.length;r++)t.writeSFixed32(e[r])}function cb(e,t){for(var r=0;r<e.length;r++)t.writeFixed64(e[r])}function ub(e,t){for(var r=0;r<e.length;r++)t.writeSFixed64(e[r])}function bo(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216}function Hr(e,t,r){e[r]=t,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function Ju(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function db(e,t,r){for(var n="",i=t;i<r;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s>r)break;var l,f,c;s===1?o<128&&(a=o):s===2?(l=e[i+1],(l&192)===128&&(a=(o&31)<<6|l&63,a<=127&&(a=null))):s===3?(l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(a=(o&15)<<12|(l&63)<<6|f&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):s===4&&(l=e[i+1],f=e[i+2],c=e[i+3],(l&192)===128&&(f&192)===128&&(c&192)===128&&(a=(o&15)<<18|(l&63)<<12|(f&63)<<6|c&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,s=1):a>65535&&(a-=65536,n+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),n+=String.fromCharCode(a),i+=s}return n}function hb(e,t,r){return ed.decode(e.subarray(t,r))}function pb(e,t,r){for(var n=0,i,o;n<t.length;n++){if(i=t.charCodeAt(n),i>55295&&i<57344)if(o)if(i<56320){e[r++]=239,e[r++]=191,e[r++]=189,o=i;continue}else i=o-55296<<10|i-56320|65536,o=null;else{i>56319||n+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):o=i;continue}else o&&(e[r++]=239,e[r++]=191,e[r++]=189,o=null);i<128?e[r++]=i:(i<2048?e[r++]=i>>6|192:(i<65536?e[r++]=i>>12|224:(e[r++]=i>>18|240,e[r++]=i>>12&63|128),e[r++]=i>>6&63|128),e[r++]=i&63|128)}return r}});var Zd=X((K7,qs)=>{"use strict";qs.exports=Oo;qs.exports.default=Oo;function Oo(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,o=Vd(e,0,i,r,!0),a=[];if(!o||o.next===o.prev)return a;var s,l,f,c,u,d,h;if(n&&(o=Yb(e,t,o,r)),e.length>80*r){s=f=e[0],l=c=e[1];for(var g=r;g<i;g+=r)u=e[g],d=e[g+1],u<s&&(s=u),d<l&&(l=d),u>f&&(f=u),d>c&&(c=d);h=Math.max(f-s,c-l),h=h!==0?32767/h:0}return fi(o,a,r,s,l,h,0),a}function Vd(e,t,r,n,i){var o,a;if(i===Us(e,t,r,n)>0)for(o=t;o<r;o+=n)a=Gd(o,e[o],e[o+1],a);else for(o=r-n;o>=t;o-=n)a=Gd(o,e[o],e[o+1],a);return a&&Ro(a,a.next)&&(ci(a),a=a.next),a}function ur(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Ro(r,r.next)||ee(r.prev,r,r.next)===0)){if(ci(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function fi(e,t,r,n,i,o,a){if(e){!a&&o&&ey(e,n,i,o);for(var s=e,l,f;e.prev!==e.next;){if(l=e.prev,f=e.next,o?Zb(e,n,i,o):Hb(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(f.i/r|0),ci(e),e=f.next,s=f.next;continue}if(e=f,e===s){a?a===1?(e=jb(ur(e),t,r),fi(e,t,r,n,i,o,2)):a===2&&Wb(e,t,r,n,i,o):fi(ur(e),t,r,n,i,o,1);break}}}}function Hb(e){var t=e.prev,r=e,n=e.next;if(ee(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,a=n.x,s=t.y,l=r.y,f=n.y,c=i<o?i<a?i:a:o<a?o:a,u=s<l?s<f?s:f:l<f?l:f,d=i>o?i>a?i:a:o>a?o:a,h=s>l?s>f?s:f:l>f?l:f,g=n.next;g!==t;){if(g.x>=c&&g.x<=d&&g.y>=u&&g.y<=h&&Wr(i,s,o,l,a,f,g.x,g.y)&&ee(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function Zb(e,t,r,n){var i=e.prev,o=e,a=e.next;if(ee(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,f=a.x,c=i.y,u=o.y,d=a.y,h=s<l?s<f?s:f:l<f?l:f,g=c<u?c<d?c:d:u<d?u:d,x=s>l?s>f?s:f:l>f?l:f,T=c>u?c>d?c:d:u>d?u:d,_=Ns(h,g,t,r,n),w=Ns(x,T,t,r,n),k=e.prevZ,M=e.nextZ;k&&k.z>=_&&M&&M.z<=w;){if(k.x>=h&&k.x<=x&&k.y>=g&&k.y<=T&&k!==i&&k!==a&&Wr(s,c,l,u,f,d,k.x,k.y)&&ee(k.prev,k,k.next)>=0||(k=k.prevZ,M.x>=h&&M.x<=x&&M.y>=g&&M.y<=T&&M!==i&&M!==a&&Wr(s,c,l,u,f,d,M.x,M.y)&&ee(M.prev,M,M.next)>=0))return!1;M=M.nextZ}for(;k&&k.z>=_;){if(k.x>=h&&k.x<=x&&k.y>=g&&k.y<=T&&k!==i&&k!==a&&Wr(s,c,l,u,f,d,k.x,k.y)&&ee(k.prev,k,k.next)>=0)return!1;k=k.prevZ}for(;M&&M.z<=w;){if(M.x>=h&&M.x<=x&&M.y>=g&&M.y<=T&&M!==i&&M!==a&&Wr(s,c,l,u,f,d,M.x,M.y)&&ee(M.prev,M,M.next)>=0)return!1;M=M.nextZ}return!0}function jb(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!Ro(i,o)&&$d(i,n,n.next,o)&&li(i,o)&&li(o,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),ci(n),ci(n.next),n=e=o),n=n.next}while(n!==e);return ur(n)}function Wb(e,t,r,n,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&ny(a,s)){var l=Hd(a,s);a=ur(a,a.next),l=ur(l,l.next),fi(a,t,r,n,i,o,0),fi(l,t,r,n,i,o,0);return}s=s.next}a=a.next}while(a!==e)}function Yb(e,t,r,n){var i=[],o,a,s,l,f;for(o=0,a=t.length;o<a;o++)s=t[o]*n,l=o<a-1?t[o+1]*n:e.length,f=Vd(e,s,l,n,!1),f===f.next&&(f.steiner=!0),i.push(ry(f));for(i.sort(Kb),o=0;o<i.length;o++)r=Xb(i[o],r);return r}function Kb(e,t){return e.x-t.x}function Xb(e,t){var r=Qb(e,t);if(!r)return t;var n=Hd(r,e);return ur(n,n.next),ur(r,r.next)}function Qb(e,t){var r=t,n=e.x,i=e.y,o=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>o&&(o=s,a=r.x<r.next.x?r:r.next,s===n))return a}r=r.next}while(r!==t);if(!a)return null;var l=a,f=a.x,c=a.y,u=1/0,d;r=a;do n>=r.x&&r.x>=f&&n!==r.x&&Wr(i<c?n:o,i,f,c,i<c?o:n,i,r.x,r.y)&&(d=Math.abs(i-r.y)/(n-r.x),li(r,e)&&(d<u||d===u&&(r.x>a.x||r.x===a.x&&Jb(a,r)))&&(a=r,u=d)),r=r.next;while(r!==l);return a}function Jb(e,t){return ee(e.prev,e,t.prev)<0&&ee(t.next,e,e.next)<0}function ey(e,t,r,n){var i=e;do i.z===0&&(i.z=Ns(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,ty(i)}function ty(e){var t,r,n,i,o,a,s,l,f=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t<f&&(s++,n=n.nextZ,!!n);t++);for(l=f;s>0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,f*=2}while(a>1);return e}function Ns(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function ry(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function Wr(e,t,r,n,i,o,a,s){return(i-a)*(t-s)>=(e-a)*(o-s)&&(e-a)*(n-s)>=(r-a)*(t-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function ny(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!iy(e,t)&&(li(e,t)&&li(t,e)&&oy(e,t)&&(ee(e.prev,e,t.prev)||ee(e,t.prev,t))||Ro(e,t)&&ee(e.prev,e,e.next)>0&&ee(t.prev,t,t.next)>0)}function ee(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Ro(e,t){return e.x===t.x&&e.y===t.y}function $d(e,t,r,n){var i=Bo(ee(e,t,r)),o=Bo(ee(e,t,n)),a=Bo(ee(r,n,e)),s=Bo(ee(r,n,t));return!!(i!==o&&a!==s||i===0&&Io(e,r,t)||o===0&&Io(e,n,t)||a===0&&Io(r,e,n)||s===0&&Io(r,t,n))}function Io(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Bo(e){return e>0?1:e<0?-1:0}function iy(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&$d(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function li(e,t){return ee(e.prev,e,e.next)<0?ee(e,t,e.next)>=0&&ee(e,e.prev,t)>=0:ee(e,t,e.prev)<0||ee(e,e.next,t)<0}function oy(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function Hd(e,t){var r=new zs(e.i,e.x,e.y),n=new zs(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function Gd(e,t,r,n){var i=new zs(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ci(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function zs(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Oo.deviation=function(e,t,r,n){var i=t&&t.length,o=i?t[0]*r:e.length,a=Math.abs(Us(e,0,o,r));if(i)for(var s=0,l=t.length;s<l;s++){var f=t[s]*r,c=s<l-1?t[s+1]*r:e.length;a-=Math.abs(Us(e,f,c,r))}var u=0;for(s=0;s<n.length;s+=3){var d=n[s]*r,h=n[s+1]*r,g=n[s+2]*r;u+=Math.abs((e[d]-e[g])*(e[h+1]-e[d+1])-(e[d]-e[h])*(e[g+1]-e[d+1]))}return a===0&&u===0?0:Math.abs((u-a)/a)};function Us(e,t,r,n){for(var i=0,o=t,a=r-n;o<r;o+=n)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}Oo.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)r.vertices.push(e[i][o][a]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var Jd=X((t4,Qd)=>{Qd.exports=globalThis.deck});var Pr={};Ga(Pr,{carto:()=>v_});var za={};Ga(za,{BASEMAP:()=>Xp,CARTO_LAYERS:()=>x_,CARTO_SOURCES:()=>kp,CartoAPIError:()=>Cr,ClusterTileLayer:()=>jn,H3TileLayer:()=>lr,HeatmapTileLayer:()=>ei,LayerFactory:()=>dl,PointLabelLayer:()=>ni,QuadbinTileLayer:()=>cr,RasterTileLayer:()=>si,SOURCE_DEFAULTS:()=>Bi,VectorTileLayer:()=>Kr,_GOOGLE_BASEMAPS:()=>Ra,_QuadbinLayer:()=>Eo,_RasterLayer:()=>Lo,_STYLE_LAYER_GROUPS:()=>sl,_SpatialIndexTileLayer:()=>Zr,_applyLayerGroupFilters:()=>Da,_fetchStyle:()=>Na,_getStyleUrl:()=>Xe,boundaryQuerySource:()=>Kf,boundaryTableSource:()=>Xf,colorBins:()=>ll,colorCategories:()=>cl,colorContinuous:()=>ul,fetchBasemapProps:()=>rg,fetchMap:()=>eg,h3QuerySource:()=>Sa,h3TableSource:()=>Ta,h3TilesetSource:()=>el,quadbinQuerySource:()=>Aa,quadbinTableSource:()=>Pa,quadbinTilesetSource:()=>tl,query:()=>Lp,rasterSource:()=>Fa,vectorQuerySource:()=>ka,vectorTableSource:()=>La,vectorTilesetSource:()=>Ma});var dd=G(kt(),1),hd=G(pt(),1),pd=G(pn(),1);function bl(e,t,r){switch(e.type){case"Point":return ug(e,t,r);case"LineString":return cg(e,t,r);case"Polygon":return yl(e,t,r);default:let n=e;throw new Error(`Unsupported geometry type: ${n?.type}`)}}function yl(e,t=-1/0,r=1/0){let{positions:n}=e,i=e.polygonIndices.value.filter(l=>l>=t&&l<=r),o=e.primitivePolygonIndices.value.filter(l=>l>=t&&l<=r);if(!(i.length>2)){let l=[];for(let f=0;f<o.length-1;f++){let c=o[f],u=o[f+1],d=Vi(n,c,u);l.push(d)}return{type:"Polygon",coordinates:l}}let s=[];for(let l=0;l<i.length-1;l++){let f=i[l],c=i[l+1],u=yl(e,f,c).coordinates;s.push(u)}return{type:"MultiPolygon",coordinates:s}}function cg(e,t=-1/0,r=1/0){let{positions:n}=e,i=e.pathIndices.value.filter(s=>s>=t&&s<=r);if(!(i.length>2))return{type:"LineString",coordinates:Vi(n,i[0],i[1])};let a=[];for(let s=0;s<i.length-1;s++){let l=Vi(n,i[s],i[s+1]);a.push(l)}return{type:"MultiLineString",coordinates:a}}function ug(e,t,r){let{positions:n}=e,i=Vi(n,t,r);return i.length>1?{type:"MultiPoint",coordinates:i}:{type:"Point",coordinates:i[0]}}function Vi(e,t,r){t=t||0,r=r||e.value.length/e.size;let n=[];for(let i=t;i<r;i++){let o=Array();for(let a=i*e.size;a<(i+1)*e.size;a++)o.push(Number(e.value[a]));n.push(o)}return n}function Hi(e,t){let r=t?.globalFeatureId;return r!==void 0?dg(e,r):hg(e,t?.type)}function dg(e,t){let r=xl(e);for(let n of r){let i=0,o=n.featureIds.value[0];for(let a=0;a<n.featureIds.value.length;a++){let s=n.featureIds.value[a];if(s!==o){if(t===n.globalFeatureIds.value[i])return $i(n,i,a);i=a,o=s}}if(t===n.globalFeatureIds.value[i])return $i(n,i,n.featureIds.value.length)}throw new Error(`featureId:${t} not found`)}function hg(e,t){let r=xl(e,t);return pg(r)}function xl(e,t){let r=[];return e.points&&(e.points.type="Point",r.push(e.points)),e.lines&&(e.lines.type="LineString",r.push(e.lines)),e.polygons&&(e.polygons.type="Polygon",r.push(e.polygons)),r}function pg(e){let t=[];for(let r of e){if(r.featureIds.value.length===0)continue;let n=0,i=r.featureIds.value[0];for(let o=0;o<r.featureIds.value.length;o++){let a=r.featureIds.value[o];a!==i&&(t.push($i(r,n,o)),n=o,i=a)}t.push($i(r,n,r.featureIds.value.length))}return t}function $i(e,t,r){let n=bl(e,t,r),i=mg(e,t,r),o=gg(e,t,r);return{type:"Feature",geometry:n,properties:i,...o}}function gg(e,t=0,r){return e.fields&&e.fields[e.featureIds.value[t]]}function mg(e,t=0,r){let n=Object.assign({},e.properties[e.featureIds.value[t]]);for(let i in e.numericProps)n[i]=e.numericProps[i].value[t];return n}var Vn=G(Se(),1);var Wt=Math.PI,wg=Wt/4,O_=Wt/180,wl=180/Wt,_l=512;function Fe(e){let[t,r]=e,n=t/_l*(2*Wt)-Wt,i=2*(Math.atan(Math.exp(r/_l*(2*Wt)-Wt))-wg);return[n*wl,i*wl]}var V_=Math.PI/180;var Bg=Math.PI/180,Og=180/Math.PI;function kl(e){var t=Tl(e[0]+1,e[2]),r=Tl(e[0],e[2]),n=Cl(e[1]+1,e[2]),i=Cl(e[1],e[2]);return[r,n,t,i]}function Rg(e){var t=kl(e),r={type:"Polygon",coordinates:[[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]]]};return r}function Tl(e,t){return e/Math.pow(2,t)*360-180}function Cl(e,t){var r=Math.PI-2*Math.PI*e/Math.pow(2,t);return Og*Math.atan(.5*(Math.exp(r)-Math.exp(-r)))}function $a(e,t,r){var n=Rl(e,t,r);return n[0]=Math.floor(n[0]),n[1]=Math.floor(n[1]),n}function Ll(e){return[[e[0]*2,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2+1,e[2]+1],[e[0]*2,e[1]*2+1,e[2]+1]]}function Ml(e){return e[0]%2===0&&e[1]%2===0?[e[0]/2,e[1]/2,e[2]-1]:e[0]%2===0&&!e[1]%2===0?[e[0]/2,(e[1]-1)/2,e[2]-1]:!e[0]%2===0&&e[1]%2===0?[(e[0]-1)/2,e[1]/2,e[2]-1]:[(e[0]-1)/2,(e[1]-1)/2,e[2]-1]}function Il(e){return Ll(Ml(e))}function Dg(e,t){for(var r=Il(e),n=0;n<r.length;n++)if(!Bl(t,r[n]))return!1;return!0}function Bl(e,t){for(var r=0;r<e.length;r++)if(Ol(e[r],t))return!0;return!1}function Ol(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Ng(e){for(var t="",r=e[2];r>0;r--){var n=0,i=1<<r-1;e[0]&i&&n++,e[1]&i&&(n+=2),t+=n.toString()}return t}function zg(e){for(var t=0,r=0,n=e.length,i=n;i>0;i--){var o=1<<i-1;switch(e[n-i]){case"0":break;case"1":t|=o;break;case"2":r|=o;break;case"3":t|=o,r|=o;break}}return[t,r,n]}function Ug(e){var t=$a(e[0],e[1],32),r=$a(e[2],e[3],32),n=[t[0],t[1],r[0],r[1]],i=qg(n);if(i===0)return[0,0,0];var o=n[0]>>>32-i,a=n[1]>>>32-i;return[o,a,i]}function qg(e){for(var t=28,r=0;r<t;r++){var n=1<<32-(r+1);if((e[0]&n)!=(e[2]&n)||(e[1]&n)!=(e[3]&n))return r}return t}function Rl(e,t,r){var n=Math.sin(t*Bg),i=Math.pow(2,r),o=i*(e/360+.5),a=i*(.5-.25*Math.log((1+n)/(1-n))/Math.PI);return[o,a,r]}var Zi={tileToGeoJSON:Rg,tileToBBOX:kl,getChildren:Ll,getParent:Ml,getSiblings:Il,hasTile:Bl,hasSiblings:Dg,tilesEqual:Ol,tileToQuadkey:Ng,quadkeyToTile:zg,pointToTile:$a,bboxToTile:Ug,pointToTileFraction:Rl},Gg=Vg;function Vg(e,t){var r,n,i=e.coordinates,o=t.max_zoom,a={},s=[];if(e.type==="Point")return[Zi.pointToTile(i[0],i[1],o)];if(e.type==="MultiPoint")for(r=0;r<i.length;r++)n=Zi.pointToTile(i[r][0],i[r][1],o),a[Ue(n[0],n[1],n[2])]=!0;else if(e.type==="LineString")Ha(a,i,o);else if(e.type==="MultiLineString")for(r=0;r<i.length;r++)Ha(a,i[r],o);else if(e.type==="Polygon")Al(a,s,i,o);else if(e.type==="MultiPolygon")for(r=0;r<i.length;r++)Al(a,s,i[r],o);else throw new Error("Geometry type not implemented");if(t.min_zoom!==o){var l=s.length;for(Pl(a,s),r=0;r<l;r++){var f=s[r];a[Ue(f[0],f[1],f[2])]=!0}return $g(a,s,t)}return Pl(a,s),s}function $g(e,t,r){for(var n=[],i=r.max_zoom;i>r.min_zoom;i--){for(var o={},a=[],s=0;s<t.length;s++){var l=t[s];if(l[0]%2===0&&l[1]%2===0){var f=Ue(l[0]+1,l[1],i),c=Ue(l[0],l[1]+1,i),u=Ue(l[0]+1,l[1]+1,i);if(e[f]&&e[c]&&e[u]){e[Ue(l[0],l[1],l[2])]=!1,e[f]=!1,e[c]=!1,e[u]=!1;var d=[l[0]/2,l[1]/2,i-1];i-1===r.min_zoom?n.push(d):(o[Ue(l[0]/2,l[1]/2,i-1)]=!0,a.push(d))}}}for(s=0;s<t.length;s++)l=t[s],e[Ue(l[0],l[1],l[2])]&&n.push(l);e=o,t=a}return n}function Al(e,t,r,n){for(var i=[],o=0;o<r.length;o++){var a=[];Ha(e,r[o],n,a);for(var s=0,l=a.length,f=l-1;s<l;f=s++){var c=(s+1)%l,u=a[s][1];(u>a[f][1]||u>a[c][1])&&(u<a[f][1]||u<a[c][1])&&u!==a[c][1]&&i.push(a[s])}}for(i.sort(Hg),o=0;o<i.length;o+=2){u=i[o][1];for(var d=i[o][0]+1;d<i[o+1][0];d++){var h=Ue(d,u,n);e[h]||t.push([d,u,n])}}}function Hg(e,t){return e[1]-t[1]||e[0]-t[0]}function Ha(e,t,r,n){for(var i,o,a=0;a<t.length-1;a++){var s=Zi.pointToTileFraction(t[a][0],t[a][1],r),l=Zi.pointToTileFraction(t[a+1][0],t[a+1][1],r),f=s[0],c=s[1],u=l[0],d=l[1],h=u-f,g=d-c;if(!(g===0&&h===0)){var x=h>0?1:-1,T=g>0?1:-1,_=Math.floor(f),w=Math.floor(c),k=h===0?1/0:Math.abs(((h>0?1:0)+_-f)/h),M=g===0?1/0:Math.abs(((g>0?1:0)+w-c)/g),I=Math.abs(x/h),R=Math.abs(T/g);for((_!==i||w!==o)&&(e[Ue(_,w,r)]=!0,n&&w!==o&&n.push([_,w]),i=_,o=w);k<1||M<1;)k<M?(k+=I,_+=x):(M+=R,w+=T),e[Ue(_,w,r)]=!0,n&&w!==o&&n.push([_,w]),i=_,o=w}}n&&w===n[0][1]&&n.pop()}function Pl(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.push(Zg(+r[n]))}function Ue(e,t,r){var n=2*(1<<r);return(n*t+e)*32+r}function Zg(e){var t=e%32,r=2*(1<<t),n=(e-t)/32,i=n%r,o=(n-i)/r%r;return[i,o,t]}var Dl=[0x5555555555555555n,0x3333333333333333n,0x0f0f0f0f0f0f0f0fn,0x00ff00ff00ff00ffn,0x0000ffff0000ffffn,0x00000000ffffffffn],Nl=[0n,1n,2n,4n,8n,16n],Fl=512;function jg(e){let{x:t,y:r,z:n}=Yt(e),i=Fl/(1<<n);return[t*i,Fl-r*i,i]}function Wg(e,t){let[r,n,i]=jg(e);return[[r,n],[r+t*i,n-t*i]]}function Yg(e,t=1){let[r,n]=Wg(e,t),[i,o]=Fe(r),[a,s]=Fe(n);return[a,o,a,s,i,s,i,o,a,o]}function zl(e){return BigInt(`0x${e}`)}function gn(e){return e.toString(16)}function mn(e){if(e.z<0||e.z>26)throw new Error("Wrong zoom");let t=BigInt(e.z),r=BigInt(e.x)<<32n-t,n=BigInt(e.y)<<32n-t;for(let o=0;o<5;o++){let a=Nl[5-o],s=Dl[4-o];r=(r|r<<a)&s,n=(n|n<<a)&s}return 0x4000000000000000n|1n<<59n|t<<52n|(r|n<<1n)>>12n|0xfffffffffffffn>>t*2n}function Yt(e){let t=e>>59n&7n,r=e>>57n&3n,n=e>>52n&0x1fn,i=(e&0xfffffffffffffn)<<12n;if(t!==1n&&r!==0n)throw new Error("Wrong mode");let o=i,a=i>>1n;for(let s=0;s<6;s++){let l=Nl[s],f=Dl[s];o=(o|o>>l)&f,a=(a|a>>l)&f}return o=o>>32n-n,a=a>>32n-n,{z:Number(n),x:Number(o),y:Number(a)}}function gt(e){return e>>52n&0x1fn}function ji(e){let t=gt(e)-1n;return e&~(0x1fn<<52n)|t<<52n|0xfffffffffffffn>>t*2n}function Ul(e,t){let r=Number(t);return Gg(e,{min_zoom:r,max_zoom:r}).map(([n,i,o])=>mn({x:n,y:i,z:o}))}function ql(e){let t=Yg(e);return{type:"Polygon",coordinates:[[[t[0],t[1]],[t[2],t[3]],[t[4],t[5]],[t[6],t[7]],[t[0],t[1]]]]}}var Yi=G(Kt(),1),Hl=G(Se(),1);var Vl=G(Se(),1);function ke(e,t){Vl.log.assert(e,t)}function $l(e,t){let{properties:r,numericProps:n}=e;return new Proxy(r[t]||{},{get(i,o){return o in n?n[o].value[t]:i[o]},has(i,o){return o in n||o in i},ownKeys(i){return[...Object.keys(n),...Reflect.ownKeys(i)]},getOwnPropertyDescriptor(i,o){return{enumerable:!0,configurable:!0}}})}function Lt(e,t){return`https://unpkg.com/@deck.gl/carto@${t}/dist/${e}-worker.js`}var bn=new Uint16Array,Za={positions:{value:new Float32Array,size:2},properties:[],numericProps:{},featureIds:{value:bn,size:1},globalFeatureIds:{value:bn,size:1}};function Wi(){return{shape:"binary-feature-collection",points:{type:"Point",...Za},lines:{type:"LineString",pathIndices:{value:bn,size:1},...Za},polygons:{type:"Polygon",polygonIndices:{value:bn,size:1},primitivePolygonIndices:{value:bn,size:1},...Za}}}function yn(e,t,r,n,i,o=2){return{type:"Point",positions:{value:new Float32Array(e),size:o},featureIds:{value:new Uint16Array(t),size:1},globalFeatureIds:{value:new Uint32Array(r),size:1},numericProps:n,properties:i}}function ja(e,t){let r={};return t&&Object.keys(t).forEach(n=>{r[n]={value:new Float32Array(e),size:1}}),r}function Wa(e,t,r,n){Object.keys(e).forEach(i=>{t[i].value[n]=e[i].value[r]})}function Zl(e,t,r,n=[],i,o,a="quadbin"){if(!e.content)return!1;e.userData||(e.userData={});let s=t.get(r)?.[0];if(s){if(n.every(f=>f.name in s))return!1;t.clear()}let l={};for(let f of e.content){let c=f.id,u=typeof i=="function"?i(f,{}):i;for(let T=0;T<r-1;T++)if(a==="h3"){let _=(0,Yi.getResolution)(c);c=(0,Yi.cellToParent)(c,Math.max(0,_-1))}else c=ji(c);let d=String(c);if(!(d in l)){l[d]={id:c,count:0,position:[0,0]};for(let{name:T,aggregation:_}of n)_==="any"?l[d][T]=f.properties[T]:l[d][T]=0}let h=l[d].count;l[d].count+=typeof o=="function"?o(f,{}):o;let g=l[d].count,x=g-h;l[d].position[0]=(h*l[d].position[0]+x*u[0])/g,l[d].position[1]=(h*l[d].position[1]+x*u[1])/g;for(let{name:T,aggregation:_}of n){let w=l[d][T],k=f.properties[T];_==="average"?l[d][T]=(h*w+x*k)/g:_==="count"||_==="sum"?l[d][T]=w+k:_==="max"?l[d][T]=Math.max(w,k):_==="min"&&(l[d][T]=Math.min(w,k))}}return t.set(r,Object.values(l)),!0}function jl(e){let t=[],r=["any","average","count","min","max","sum"];for(let n of Object.keys(e.content[0].properties)){let i=n.split("_").pop().toLowerCase();r.includes(i)||(Hl.log.warn(`No valid aggregation present in ${n} property`)(),i="any"),t.push({name:n,aggregation:i})}return t}function Wl(e,t){let r={};for(let{name:n,aggregation:i}of t)if(r[n]={min:1/0,max:-1/0},i!=="any")for(let o of e)r[n].min=Math.min(r[n].min,o[n]),r[n].max=Math.max(r[n].max,o[n]);return r}function Yl(e){let t=new Float32Array(e.length*2),r=new Uint16Array(e.length);for(let n=0;n<e.length;n++)t.set(e[n].position,2*n),r[n]=n;return{...Wi(),points:yn(t,r,r,{},e)}}var Kl=G(pt(),1);var et=class extends Kl._Tileset2D{getTileIndices(t){return super.getTileIndices(t).map(mn).map(r=>({q:r,i:gn(r)}))}getTileId({q:t,i:r}){return r||gn(t)}getTileMetadata({q:t}){return super.getTileMetadata(Yt(t))}getTileZoom({q:t}){return Number(gt(t))}getParentIndex({q:t}){return{q:ji(t)}}};var Ql=G(pt(),1),ie=G(Kt(),1),Xl=85.051128;function Jl({west:e,north:t,east:r,south:n},i,o=1){let l=[[t,r],[n,r],[n,e],[t,e]].map(u=>(0,ie.latLngToCell)(u[0],u[1],i)).map(u=>Math.max(...(0,ie.originToDirectedEdges)(u).map(d=>(0,ie.edgeLength)(d,ie.UNITS.rads)))*180/Math.PI),f=Math.max(...l)*o,c=Math.min(180,f/Math.cos((t+n)/2*Math.PI/180));return{north:Math.min(t+f,Xl),east:r+c,south:Math.max(n-f,-Xl),west:e-c}}function ec({west:e,north:t,east:r,south:n},i){let o=Math.abs(r-e);if(o>180){let s=Math.ceil(o/180),l=[];for(let f=0;f<s;f++){let c=e+f*180,u=Math.min(c+179.9999999,r);l=l.concat(ec({west:c,north:t,east:u,south:n},i))}return[...new Set(l)]}return(0,ie.polygonToCells)([[t,r],[n,r],[n,e],[t,e],[t,r]],i)}function Kg(e){let t=(0,ie.cellToBoundary)(e),r=t.map(f=>f[0]),n=t.map(f=>f[1]),i=Math.min(...n),o=Math.min(...r),a=Math.max(...n),s=Math.max(...r);return Jl({west:i,south:o,east:a,north:s},(0,ie.getResolution)(e),.12)}var Xg=2;function Fr(e,t){let r=Math.log2(t/512),n=2/3*(e.zoom-r),i=Math.log(1/Math.cos(Math.PI*e.latitude/180));return Math.max(0,Math.floor(n+i-Xg))}var Mt=class extends Ql._Tileset2D{getTileIndices({viewport:t,minZoom:r,maxZoom:n}){if(t.latitude===void 0)return[];let[i,o,a,s]=t.getBounds(),{tileSize:l}=this.opts,f=Fr(t,l),c;if(typeof r=="number"&&Number.isFinite(r)&&f<r)return[];if(typeof n=="number"&&Number.isFinite(n)&&f>n){f=n;let u=(0,ie.latLngToCell)(t.latitude,t.longitude,n);c=(0,ie.gridDisk)(u,1)}else{let u=Jl({west:i,north:s,east:a,south:o},f);c=ec(u,f)}return c.map(u=>({i:u}))}getTileId({i:t}){return t}getTileMetadata({i:t}){return{bbox:Kg(t)}}getTileZoom({i:t}){return(0,ie.getResolution)(t)}getParentIndex(t){let r=(0,ie.getResolution)(t.i);return{i:(0,ie.cellToParent)(t.i,r-1)}}};var tc=512;function Ya(e){let{x:t,y:r,z:n}=Yt(e),i=tc/(1<<n);return[t*i,tc-r*i,i]}function Qg(e,t){let[r,n,i]=Ya(e);return[[r,n],[r+t*i,n-t*i]]}function Ki(e,t=1){let[r,n]=Qg(e,t),[i,o]=Fe(r),[a,s]=Fe(n);return[a,o,a,s,i,s,i,o,a,o]}var xo=G(Kt(),1);var tt={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},Jg=tt.self||tt.window||tt.global||{},em=tt.window||tt.self||tt.global||{},tm=tt.global||tt.self||tt.window||{},rm=tt.document||{};var kr=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var rc=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),nm=rc&&parseFloat(rc[1])||0;var nc=e=>typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer;function Ka(e){globalThis.loaders||={},globalThis.loaders.modules||={},Object.assign(globalThis.loaders.modules,e)}function ic(...e){return im(e)}function im(e){let t=e.map(o=>o instanceof ArrayBuffer?new Uint8Array(o):o),r=t.reduce((o,a)=>o+a.byteLength,0),n=new Uint8Array(r),i=0;for(let o of t)n.set(o,i),i+=o.byteLength;return n.buffer}async function Xa(e){let t=[];for await(let r of e)t.push(om(r));return ic(...t)}function om(e){if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:r,byteLength:n}=e;return oc(t,r,n)}return oc(e)}function oc(e,t=0,r=e.byteLength-t){let n=new Uint8Array(e,t,r),i=new Uint8Array(n.length);return i.set(n),i.buffer}function ac(e){return e&&typeof e=="object"&&e.isBuffer}function It(e){if(ac(e))return e;if(e instanceof ArrayBuffer)return e;if(nc(e))return sc(e);if(ArrayBuffer.isView(e)){let t=e.buffer;return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?t:t.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(typeof e=="string"){let t=e;return new TextEncoder().encode(t).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function sc(e,t=0,r=e.byteLength-t){let n=new Uint8Array(e,t,r),i=new Uint8Array(n.length);return i.set(n),i.buffer}function Lr(e){return t=>new Promise((r,n)=>e(t,(i,o)=>i?n(i):r(o)))}var Xi=class{constructor(t){this.compressBatches=this.compressBatches.bind(this),this.decompressBatches=this.decompressBatches.bind(this)}async preload(t={}){Ka(t)}async compress(t){return await this.preload(),this.compressSync(t)}async decompress(t,r){return await this.preload(),this.decompressSync(t,r)}compressSync(t){throw new Error(`${this.name}: sync compression not supported`)}decompressSync(t,r){throw new Error(`${this.name}: sync decompression not supported`)}async*compressBatches(t){let r=await this.concatenate(t);yield this.compress(r)}async*decompressBatches(t){let r=await this.concatenate(t);yield this.decompress(r)}concatenate(t){return Xa(t)}improveError(t){return t.message.includes(this.name)||(t.message=`${this.name} ${t.message}`),t}};var or=G(Wu(),1),vt=G(Yu(),1),go=class extends Xi{name="deflate";extensions=[];contentEncodings=["deflate"];isSupported=!0;options;_chunks=[];constructor(t={}){super(t),this.options=t}async compress(t){if(!kr&&this.options.deflate?.useZlib){let r=this.options.deflate?.gzip?await Lr(vt.default.gzip)(t):await Lr(vt.default.deflate)(t);return It(r)}return this.compressSync(t)}async decompress(t){if(!kr&&this.options.deflate?.useZlib){let r=this.options.deflate?.gzip?await Lr(vt.default.gunzip)(t):await Lr(vt.default.inflate)(t);return It(r)}return this.decompressSync(t)}compressSync(t){if(!kr&&this.options.deflate?.useZlib){let o=this.options.deflate?.gzip?vt.default.gzipSync(t):vt.default.deflateSync(t);return It(o)}let r=this.options?.deflate||{},n=new Uint8Array(t),i=this.options?.raw?or.default.deflateRaw:or.default.deflate;return It(i(n,r).buffer)}decompressSync(t){if(!kr&&this.options.deflate?.useZlib){let o=this.options.deflate?.gzip?vt.default.gunzipSync(t):vt.default.inflateSync(t);return It(o)}let r=this.options?.deflate||{},n=new Uint8Array(t),i=this.options?.raw?or.default.inflateRaw:or.default.inflate;return It(i(n,r).buffer)}async*compressBatches(t){let r=this.options?.deflate||{},n=new or.default.Deflate(r);yield*this.transformBatches(n,t)}async*decompressBatches(t){let r=this.options?.deflate||{},n=new or.default.Inflate(r);yield*this.transformBatches(n,t)}async*transformBatches(t,r){t.onData=this._onData.bind(this),t.onEnd=this._onEnd.bind(this);for await(let a of r){let s=new Uint8Array(a);if(!t.push(s,!1))throw new Error(`${this._getError()}write`);yield*this._getChunks()}let n=new Uint8Array(0),i=t.push(n,!0);yield*this._getChunks()}_onData(t){this._chunks.push(t)}_onEnd(t){if(t!==0)throw new Error(this._getError(t)+this._chunks.length)}_getChunks(){let t=this._chunks;return this._chunks=[],t}_getError(t=0){let r={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};return`${this.name}: ${r[t]}`}};var On=class extends go{name="gzip";extensions=["gz","gzip"];contentEncodings=["gzip","x-gzip"];isSupported=!0;constructor(t){super({...t,deflate:{...t?.gzip,gzip:!0}})}};function ar(e,t,r,n){let i=t.type===2?t.readVarint()+t.pos:t.pos+1,o=t.buf.buffer.slice(t.pos,i);if(n?.compression==="gzip"){let s=new On().decompressSync(o);r.value=new e(s)}else r.value=new e(o);return t.pos=i,r.value}var Rn=class{static read(t,r){return t.readFields(Rn._readField,{key:"",value:null},r)}static _readField(t,r,n){t===1?r.key=n.readString():t===2&&(r.value=n.readString())}},Ve=class{static read(t,r){return t.readFields(Ve._readField,{},r)}static _readField(t,r,n){if(t===1){let{key:i,value:o}=Rn.read(n,n.readVarint()+n.pos);r[i]=o}}},sr=class{static read(t,r){let{value:n,size:i}=t.readFields(sr._readField,{value:[],size:0},r);return{value:n,size:i}}static _readField(t,r,n){t===1?ar(Float64Array,n,r):t===2&&(r.size=n.readVarint(!0))}},ye=class{static read(t,r){let{value:n,size:i}=t.readFields(ye._readField,{value:[],size:0},r);return{value:new Uint32Array(n),size:i}}static _readField(t,r,n){t===1?n.readPackedVarint(r.value):t===2&&(r.size=n.readVarint(!0))}},fr=class{static read(t,r){return t.readFields(fr._readField,{id:0},r)}static _readField(t,r,n){t===1&&(r.id=n.readVarint())}},Dn=class{static read(t,r){return t.readFields(Dn._readField,{value:[]},r)}static _readField(t,r,n){t===1&&ar(Float64Array,n,r)}},$e=class{static read(t,r){return t.readFields($e._readField,{key:"",value:null},r)}static _readField(t,r,n){t===1?r.key=n.readString():t===2&&(r.value=Dn.read(n,n.readVarint()+n.pos))}},Nn=class{static read(t,r){return t.readFields(Nn._readField,{positions:null,globalFeatureIds:null,featureIds:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=sr.read(n,n.readVarint()+n.pos);else if(t===2)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.properties.push(Ve.read(n,n.readVarint()+n.pos));else if(t===5){let i=$e.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===6&&r.fields.push(fr.read(n,n.readVarint()+n.pos))}},zn=class{static read(t,r){return t.readFields(zn._readField,{positions:null,pathIndices:null,globalFeatureIds:null,featureIds:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=sr.read(n,n.readVarint()+n.pos);else if(t===2)r.pathIndices=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===5)r.properties.push(Ve.read(n,n.readVarint()+n.pos));else if(t===6){let i=$e.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===7&&r.fields.push(fr.read(n,n.readVarint()+n.pos))}},Un=class{static read(t,r){return t.readFields(Un._readField,{positions:null,polygonIndices:null,globalFeatureIds:null,featureIds:null,primitivePolygonIndices:null,triangles:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=sr.read(n,n.readVarint()+n.pos);else if(t===2)r.polygonIndices=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===5)r.primitivePolygonIndices=ye.read(n,n.readVarint()+n.pos);else if(t===6)r.triangles=ye.read(n,n.readVarint()+n.pos);else if(t===7)r.properties.push(Ve.read(n,n.readVarint()+n.pos));else if(t===8){let i=$e.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===9&&r.fields.push(fr.read(n,n.readVarint()+n.pos))}},Gr=class{static read(t,r){return t.readFields(Gr._readField,{points:null,lines:null,polygons:null},r)}static _readField(t,r,n){t===1?r.points=Nn.read(n,n.readVarint()+n.pos):t===2?r.lines=zn.read(n,n.readVarint()+n.pos):t===3&&(r.polygons=Un.read(n,n.readVarint()+n.pos))}};var qn=class{static read(t,r){return t.readFields(qn._readField,{value:[]},r)}static _readField(t,r,n){t===1&&ar(BigUint64Array,n,r)}},Gn=class{static read(t,r){return t.readFields(Gn._readField,{indices:null,properties:[],numericProps:{}},r)}static _readField(t,r,n){if(t===1)r.indices=qn.read(n,n.readVarint()+n.pos);else if(t===2)r.properties.push(Ve.read(n,n.readVarint()+n.pos));else if(t===3){let i=$e.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}}},Vr=class{static read(t,r){return t.readFields(Vr._readField,{scheme:0,cells:null},r)}static _readField(t,r,n){t===1?r.scheme=n.readVarint():t===2&&(r.cells=Gn.read(n,n.readVarint()+n.pos))}};var nd=G(rd(),1);function Ut(e,t){let r=new nd.default(e);return t.read(r)}function id(e){let{cells:t,scheme:r}=e,n=t.indices.value.length,i=[];for(let o=0;o<n;o++){let a=r==="h3"?gn(t.indices.value[o]):t.indices.value[o],s={...t.properties[o]};for(let l of Object.keys(t.numericProps))s[l]=t.numericProps[l].value[o];i.push({id:a,properties:s})}return i}var ad="9.3.0",sd="cartoSpatialTile",gb={cartoSpatialTile:{scheme:"quadbin",workerUrl:Lt(sd,ad)}},mb={name:"CARTO Spatial Tile",version:ad,id:sd,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-spatial-tile"],category:"geometry",parse:async(e,t)=>od(e,t),parseSync:od,worker:!0,options:gb};function od(e,t){if(!e)return null;let r=Ut(e,Vr),{cells:n}=r,i=t?.cartoSpatialTile?.scheme;return id({cells:n,scheme:i})}var yo=mb;var fd=G(Se(),1),ld=G(Se(),1);function He(e,t,r=0){if(!e)return t;if(!t)return e;if(r>10)return t;let n={...e};for(let i in t){let o=t[i];o===e||o===t||(typeof o=="object"&&o!==null?n[i]=He(e[i],o,r+1):n[i]=o)}return n}function cd(e,t){let r={};for(let{geoid:n,...i}of t.properties)n in r?fd.log.warn("Duplicate geoid key in boundary mapping, using first occurance")():r[n]=i;for(let n of["points","lines","polygons"]){let i=e[n];if(i.positions.value.length===0)continue;i.properties=i.properties.map(({geoid:f})=>r[f]);let{positions:o,globalFeatureIds:a}=i,s=null;n==="lines"&&(s=i.pathIndices.value),n==="polygons"&&(s=i.polygonIndices.value);let l=o.value.length/o.size;for(let f in t.numericProps){let c=t.numericProps[f].value,u=c.constructor,d=new u(l);if(i.numericProps[f]={value:d,size:1},s)for(let h=0;h<s.length-1;h++){let g=s[h],x=s[h+1],T=a.value[g];d.fill(c[T],g,x)}else for(let h=0;h<l;h++){let g=a.value[h];d[h]=c[g]}}}return e}var Ce={type:"object",value:null,validate:(e,t)=>t.optional&&e===null||typeof e=="object"&&Array.isArray(e.tiles)&&e.tiles.every(r=>typeof r=="string"),equal:(e,t)=>(0,ld._deepEqual)(e,t,2),async:!0};(0,pd.registerLoaders)([yo]);function ud(e){if(e===Mt)return"h3";if(e===et)return"quadbin";throw new Error("Invalid tileset class")}var gd={data:Ce,clusterLevel:{type:"number",value:5,min:1},getPosition:{type:"accessor",value:({id:e})=>{if(typeof e=="string"){let[t,r]=(0,xo.cellToLatLng)(e);return[r,t]}return Ki(e,.5).slice(2,4)}},getWeight:{type:"accessor",value:1},refinementStrategy:"no-overlap",tileSize:512},$n=class extends hd.TileLayer{initializeState(){super.initializeState(),this.state.aggregationCache=new WeakMap,this.state.scheme=ud(this.props.TilesetClass)}updateState(t){let{props:r}=t,n=ud(r.TilesetClass);this.state.scheme!==n&&(this.setState({scheme:n,tileset:null}),this.state.aggregationCache=new WeakMap),super.updateState(t)}renderLayers(){let t=this.state.tileset?.tiles.filter(h=>h.isLoaded&&h.content&&this.state.tileset.isTileVisible(h));if(!t?.length||!this.state.tileset)return null;t.sort((h,g)=>g.zoom-h.zoom);let{getPosition:r,getWeight:n}=this.props,{aggregationCache:i,scheme:o}=this.state,a=o==="h3",s=jl(t[0]),l=[],f=!1,c=this._getAggregationLevels(t);for(let h of t){let g=i.get(h.content);g||(g=new Map,i.set(h.content,g));let x=Zl(h,g,c,s,r,n,a?"h3":"quadbin");f||(f=x),l.push(...g.get(c))}l.sort((h,g)=>Number(g.count-h.count));let u=l?.map(h=>h.id);if(f||(f=!(0,Vn._deepEqual)(u,this.state.clusterIds,1)),this.setState({clusterIds:u}),f){let h=Wl(l,s),g=Yl(l);g.points.attributes={stats:h},this.setState({data:g})}let d={...this.props,id:"clusters",data:this.state.data,dataComparator:(h,g)=>{let x=h?.points?.properties?.map(_=>_.id),T=g?.points?.properties?.map(_=>_.id);return(0,Vn._deepEqual)(x,T,1)}};return new dd.GeoJsonLayer(this.getSubLayerProps(d))}getPickingInfo(t){let r=t.info;if(r.index!==-1){let{data:n}=t.sourceLayer.props;r.object=Hi(n,{globalFeatureId:r.index})}return r}_updateAutoHighlight(t){for(let r of this.getSubLayers())r.updateAutoHighlight(t)}filterSubLayer(){return!0}_getAggregationLevels(t){let r=this.state.scheme==="h3",n=t[0],i,o;r?(i=(0,xo.getResolution)(n.id),o=Fr(this.context.viewport,this.state.tileset.opts.tileSize)):(i=n.zoom,o=this.context.viewport.zoom);let a=Math.round(o-i);return Math.round(this.props.clusterLevel)-a}};$n.layerName="ClusterGeoJsonLayer";$n.defaultProps=gd;var Hn=class extends Vn.CompositeLayer{getLoadOptions(){let t=this.props.data,r=t&&"scheme"in t?t.scheme:"quadbin";return He(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},cartoSpatialTile:{scheme:r}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r,maxresolution:n}=t,o=t&&"scheme"in t&&t.scheme==="h3"?Mt:et;return[new $n(this.props,{id:`cluster-geojson-layer-${this.props.id}`,data:r,TilesetClass:o,maxZoom:n,loadOptions:this.getLoadOptions()})]}};Hn.layerName="ClusterTileLayer";Hn.defaultProps=gd;var jn=Hn;var yd=G(Se(),1),Bs=G(pt(),1);var md=G(pn(),1);var bd=G(pt(),1);(0,md.registerLoaders)([yo]);function bb(e){return e!=null&&e!==""}var yb={tileSize:512},Wn=class extends bd.TileLayer{_updateAutoHighlight(t){let{hoveredFeatureId:r}=this.state,n=t.object,i=null;if(n&&(i=n.id),r!==i){let{highlightColor:o}=this.props;typeof o=="function"&&(o=o(t)),this.setState({highlightColor:o,hoveredFeatureId:i})}}getSubLayerPropsByTile(t){return{highlightedObjectIndex:this.getHighlightedObjectIndex(t),highlightColor:this.state.highlightColor}}getHighlightedObjectIndex(t){let{hoveredFeatureId:r}=this.state,n=t.content;return!bb(r)||!Array.isArray(n)||!this._featureInTile(t,r)?-1:n.findIndex(o=>o.id===r)}_featureInTile(t,r){let n=this.state.tileset,i=n.getTileZoom(t.index),o=t.index.q?"q":"i",a={[o]:r},s=n.getTileZoom(a);for(;!(s<=i);)a=n.getParentIndex(a),s=n.getTileZoom(a);return a[o]===t.index[o]}};Wn.layerName="SpatialIndexTileLayer";Wn.defaultProps=yb;var Zr=Wn;var xb=e=>{let{data:t}=e,{index:r}=e.tile;return!t||!t.length?null:new Bs.H3HexagonLayer(e,{getHexagon:n=>n.id,centerHexagon:r,highPrecision:!0})},vb={data:Ce,tileSize:512},Yn=class extends yd.CompositeLayer{initializeState(){Bs.H3HexagonLayer._checkH3Lib()}getLoadOptions(){let t=this.props.data;return He(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},cartoSpatialTile:{scheme:"h3"}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r}=t,{minresolution:n,maxresolution:i}=t;this.props.minZoom&&(n=Math.max(n,Fr({zoom:this.props.minZoom,latitude:0},this.props.tileSize))),this.props.maxZoom&&(i=Math.min(i,Fr({zoom:this.props.maxZoom,latitude:0},this.props.tileSize)));let o=this.getSubLayerClass("spatial-index-tile",Zr);return new o(this.props,{id:`h3-tile-layer-${this.props.id}`,data:r,TilesetClass:Mt,renderSubLayers:xb,minZoom:n,maxZoom:i,loadOptions:this.getLoadOptions()})}};Yn.layerName="H3TileLayer";Yn.defaultProps=vb;var lr=Yn;var To=G(Kt(),1),Co=G(Se(),1),_d=G(kt(),1);var wb=`layout(std140) uniform heatmapUniforms {
|
|
7
|
+
"use strict";var __exports__=(()=>{var ig=Object.create;var Gi=Object.defineProperty;var og=Object.getOwnPropertyDescriptor;var ag=Object.getOwnPropertyNames;var sg=Object.getPrototypeOf,fg=Object.prototype.hasOwnProperty;var X=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ga=(e,t)=>{for(var r in t)Gi(e,r,{get:t[r],enumerable:!0})},qi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ag(t))!fg.call(e,i)&&i!==r&&Gi(e,i,{get:()=>t[i],enumerable:!(n=og(t,i))||n.enumerable});return e},Je=(e,t,r)=>(qi(e,t,"default"),r&&qi(r,t,"default")),G=(e,t,r)=>(r=e!=null?ig(sg(e)):{},qi(t||!e||!e.__esModule?Gi(r,"default",{value:e,enumerable:!0}):r,e)),lg=e=>qi(Gi({},"__esModule",{value:!0}),e);var kt=X((__,pl)=>{pl.exports=globalThis.deck});var pt=X((E_,gl)=>{gl.exports=globalThis.deck});var pn=X((S_,ml)=>{ml.exports=globalThis.loaders});var Se=X((k_,vl)=>{vl.exports=globalThis.deck});var Kt=X((_3,Gl)=>{Gl.exports=globalThis.h3||{}});var mt=X(pe=>{"use strict";var am=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function sm(e,t){return Object.prototype.hasOwnProperty.call(e,t)}pe.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)sm(r,n)&&(e[n]=r[n])}}return e};pe.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var fm={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},lm={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};pe.setTyped=function(e){e?(pe.Buf8=Uint8Array,pe.Buf16=Uint16Array,pe.Buf32=Int32Array,pe.assign(pe,fm)):(pe.Buf8=Array,pe.Buf16=Array,pe.Buf32=Array,pe.assign(pe,lm))};pe.setTyped(am)});var kc=X(Br=>{"use strict";var cm=mt(),um=4,fc=0,lc=1,dm=2;function Ir(e){for(var t=e.length;--t>=0;)e[t]=0}var hm=0,gc=1,pm=2,gm=3,mm=258,is=29,Sn=256,vn=Sn+1+is,Mr=30,os=19,mc=2*vn+1,Xt=15,Qa=16,bm=7,as=256,bc=16,yc=17,xc=18,rs=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Qi=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ym=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],vc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],xm=512,bt=new Array((vn+2)*2);Ir(bt);var xn=new Array(Mr*2);Ir(xn);var wn=new Array(xm);Ir(wn);var _n=new Array(mm-gm+1);Ir(_n);var ss=new Array(is);Ir(ss);var Ji=new Array(Mr);Ir(Ji);function Ja(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var wc,_c,Ec;function es(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Sc(e){return e<256?wn[e]:wn[256+(e>>>7)]}function En(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function be(e,t,r){e.bi_valid>Qa-r?(e.bi_buf|=t<<e.bi_valid&65535,En(e,e.bi_buf),e.bi_buf=t>>Qa-e.bi_valid,e.bi_valid+=r-Qa):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function rt(e,t,r){be(e,r[t*2],r[t*2+1])}function Tc(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function vm(e){e.bi_valid===16?(En(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function wm(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,f,c,u,d,h,g,x=0;for(d=0;d<=Xt;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,f=e.heap_max+1;f<mc;f++)c=e.heap[f],d=r[r[c*2+1]*2+1]+1,d>l&&(d=l,x++),r[c*2+1]=d,!(c>n)&&(e.bl_count[d]++,h=0,c>=s&&(h=a[c-s]),g=r[c*2],e.opt_len+=g*(d+h),o&&(e.static_len+=g*(i[c*2+1]+h)));if(x!==0){do{for(d=l-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,x-=2}while(x>0);for(d=l;d!==0;d--)for(c=e.bl_count[d];c!==0;)u=e.heap[--f],!(u>n)&&(r[u*2+1]!==d&&(e.opt_len+=(d-r[u*2+1])*r[u*2],r[u*2+1]=d),c--)}}function Cc(e,t,r){var n=new Array(Xt+1),i=0,o,a;for(o=1;o<=Xt;o++)n[o]=i=i+r[o-1]<<1;for(a=0;a<=t;a++){var s=e[a*2+1];s!==0&&(e[a*2]=Tc(n[s]++,s))}}function _m(){var e,t,r,n,i,o=new Array(Xt+1);for(r=0,n=0;n<is-1;n++)for(ss[n]=r,e=0;e<1<<rs[n];e++)_n[r++]=n;for(_n[r-1]=n,i=0,n=0;n<16;n++)for(Ji[n]=i,e=0;e<1<<Qi[n];e++)wn[i++]=n;for(i>>=7;n<Mr;n++)for(Ji[n]=i<<7,e=0;e<1<<Qi[n]-7;e++)wn[256+i++]=n;for(t=0;t<=Xt;t++)o[t]=0;for(e=0;e<=143;)bt[e*2+1]=8,e++,o[8]++;for(;e<=255;)bt[e*2+1]=9,e++,o[9]++;for(;e<=279;)bt[e*2+1]=7,e++,o[7]++;for(;e<=287;)bt[e*2+1]=8,e++,o[8]++;for(Cc(bt,vn+1,o),e=0;e<Mr;e++)xn[e*2+1]=5,xn[e*2]=Tc(e,5);wc=new Ja(bt,rs,Sn+1,vn,Xt),_c=new Ja(xn,Qi,0,Mr,Xt),Ec=new Ja(new Array(0),ym,0,os,bm)}function Ac(e){var t;for(t=0;t<vn;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Mr;t++)e.dyn_dtree[t*2]=0;for(t=0;t<os;t++)e.bl_tree[t*2]=0;e.dyn_ltree[as*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Pc(e){e.bi_valid>8?En(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Em(e,t,r,n){Pc(e),n&&(En(e,r),En(e,~r)),cm.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function cc(e,t,r,n){var i=t*2,o=r*2;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function ts(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&cc(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!cc(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function uc(e,t,r){var n,i,o=0,a,s;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,n===0?rt(e,i,t):(a=_n[i],rt(e,a+Sn+1,t),s=rs[a],s!==0&&(i-=ss[a],be(e,i,s)),n--,a=Sc(n),rt(e,a,r),s=Qi[a],s!==0&&(n-=Ji[a],be(e,n,s)));while(o<e.last_lit);rt(e,as,t)}function ns(e,t){var r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,l=-1,f;for(e.heap_len=0,e.heap_max=mc,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)f=e.heap[++e.heap_len]=l<2?++l:0,r[f*2]=1,e.depth[f]=0,e.opt_len--,i&&(e.static_len-=n[f*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)ts(e,r,a);f=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ts(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,r[f*2]=r[a*2]+r[s*2],e.depth[f]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,r[a*2+1]=r[s*2+1]=f,e.heap[1]=f++,ts(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],wm(e,t),Cc(r,l,e.bl_count)}function dc(e,t,r){var n,i=-1,o,a=t[0*2+1],s=0,l=7,f=4;for(a===0&&(l=138,f=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)&&(s<f?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[bc*2]++):s<=10?e.bl_tree[yc*2]++:e.bl_tree[xc*2]++,s=0,i=o,a===0?(l=138,f=3):o===a?(l=6,f=3):(l=7,f=4))}function hc(e,t,r){var n,i=-1,o,a=t[0*2+1],s=0,l=7,f=4;for(a===0&&(l=138,f=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)){if(s<f)do rt(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(rt(e,o,e.bl_tree),s--),rt(e,bc,e.bl_tree),be(e,s-3,2)):s<=10?(rt(e,yc,e.bl_tree),be(e,s-3,3)):(rt(e,xc,e.bl_tree),be(e,s-11,7));s=0,i=o,a===0?(l=138,f=3):o===a?(l=6,f=3):(l=7,f=4)}}function Sm(e){var t;for(dc(e,e.dyn_ltree,e.l_desc.max_code),dc(e,e.dyn_dtree,e.d_desc.max_code),ns(e,e.bl_desc),t=os-1;t>=3&&e.bl_tree[vc[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Tm(e,t,r,n){var i;for(be(e,t-257,5),be(e,r-1,5),be(e,n-4,4),i=0;i<n;i++)be(e,e.bl_tree[vc[i]*2+1],3);hc(e,e.dyn_ltree,t-1),hc(e,e.dyn_dtree,r-1)}function Cm(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return fc;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return lc;for(r=32;r<Sn;r++)if(e.dyn_ltree[r*2]!==0)return lc;return fc}var pc=!1;function Am(e){pc||(_m(),pc=!0),e.l_desc=new es(e.dyn_ltree,wc),e.d_desc=new es(e.dyn_dtree,_c),e.bl_desc=new es(e.bl_tree,Ec),e.bi_buf=0,e.bi_valid=0,Ac(e)}function Fc(e,t,r,n){be(e,(hm<<1)+(n?1:0),3),Em(e,t,r,!0)}function Pm(e){be(e,gc<<1,3),rt(e,as,bt),vm(e)}function Fm(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===dm&&(e.strm.data_type=Cm(e)),ns(e,e.l_desc),ns(e,e.d_desc),a=Sm(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&t!==-1?Fc(e,t,r,n):e.strategy===um||o===i?(be(e,(gc<<1)+(n?1:0),3),uc(e,bt,xn)):(be(e,(pm<<1)+(n?1:0),3),Tm(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),uc(e,e.dyn_ltree,e.dyn_dtree)),Ac(e),n&&Pc(e)}function km(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(_n[r]+Sn+1)*2]++,e.dyn_dtree[Sc(t)*2]++),e.last_lit===e.lit_bufsize-1}Br._tr_init=Am;Br._tr_stored_block=Fc;Br._tr_flush_block=Fm;Br._tr_tally=km;Br._tr_align=Pm});var fs=X((o5,Lc)=>{"use strict";function Lm(e,t,r,n){for(var i=e&65535|0,o=e>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do i=i+t[n++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}Lc.exports=Lm});var ls=X((a5,Mc)=>{"use strict";function Mm(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var Im=Mm();function Bm(e,t,r,n){var i=Im,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}Mc.exports=Bm});var eo=X((s5,Ic)=>{"use strict";Ic.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var Gc=X(ot=>{"use strict";var ge=mt(),Le=kc(),Dc=fs(),Bt=ls(),Om=eo(),tr=0,Rm=1,Dm=3,zt=4,Bc=5,it=0,Oc=1,Me=-2,Nm=-3,cs=-5,zm=-1,Um=1,to=2,qm=3,Gm=4,Vm=0,$m=2,oo=8,Hm=9,Zm=15,jm=8,Wm=29,Ym=256,ds=Ym+1+Wm,Km=30,Xm=19,Qm=2*ds+1,Jm=15,$=3,Dt=258,qe=Dt+$+1,e1=32,ao=42,hs=69,ro=73,no=91,io=103,Qt=113,Cn=666,se=1,An=2,Jt=3,Dr=4,t1=3;function Nt(e,t){return e.msg=Om[t],t}function Rc(e){return(e<<1)-(e>4?9:0)}function Rt(e){for(var t=e.length;--t>=0;)e[t]=0}function Ot(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(ge.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function le(e,t){Le._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ot(e.strm)}function j(e,t){e.pending_buf[e.pending++]=t}function Tn(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function r1(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,ge.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=Dc(e.adler,t,i,r):e.state.wrap===2&&(e.adler=Bt(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Nc(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-qe?e.strstart-(e.w_size-qe):0,f=e.window,c=e.w_mask,u=e.prev,d=e.strstart+Dt,h=f[n+a-1],g=f[n+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(f[i+a]!==g||f[i+a-1]!==h||f[i]!==f[n]||f[++i]!==f[n+1])){n+=2,i++;do;while(f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&n<d);if(o=Dt-(d-n),n=d-Dt,o>a){if(e.match_start=t,a=o,o>=s)break;h=f[n+a-1],g=f[n+a]}}while((t=u[t&c])>l&&--r!==0);return a<=e.lookahead?a:e.lookahead}function er(e){var t=e.w_size,r,n,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-qe)){ge.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);o+=t}if(e.strm.avail_in===0)break;if(n=r1(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=$)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+$-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<$)););}while(e.lookahead<qe&&e.strm.avail_in!==0)}function n1(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(er(e),e.lookahead===0&&t===tr)return se;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,le(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-qe&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===zt?(le(e,!0),e.strm.avail_out===0?Jt:Dr):(e.strstart>e.block_start&&(le(e,!1),e.strm.avail_out===0),se)}function us(e,t){for(var r,n;;){if(e.lookahead<qe){if(er(e),e.lookahead<qe&&t===tr)return se;if(e.lookahead===0)break}if(r=0,e.lookahead>=$&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-qe&&(e.match_length=Nc(e,r)),e.match_length>=$)if(n=Le._tr_tally(e,e.strstart-e.match_start,e.match_length-$),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=$){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Le._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=e.strstart<$-1?e.strstart:$-1,t===zt?(le(e,!0),e.strm.avail_out===0?Jt:Dr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:An}function Or(e,t){for(var r,n,i;;){if(e.lookahead<qe){if(er(e),e.lookahead<qe&&t===tr)return se;if(e.lookahead===0)break}if(r=0,e.lookahead>=$&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=$-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-qe&&(e.match_length=Nc(e,r),e.match_length<=5&&(e.strategy===Um||e.match_length===$&&e.strstart-e.match_start>4096)&&(e.match_length=$-1)),e.prev_length>=$&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-$,n=Le._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-$),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=$-1,e.strstart++,n&&(le(e,!1),e.strm.avail_out===0))return se}else if(e.match_available){if(n=Le._tr_tally(e,0,e.window[e.strstart-1]),n&&le(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return se}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Le._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<$-1?e.strstart:$-1,t===zt?(le(e,!0),e.strm.avail_out===0?Jt:Dr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:An}function i1(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=Dt){if(er(e),e.lookahead<=Dt&&t===tr)return se;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=$&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+Dt;do;while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<o);e.match_length=Dt-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=$?(r=Le._tr_tally(e,1,e.match_length-$),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Le._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===zt?(le(e,!0),e.strm.avail_out===0?Jt:Dr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:An}function o1(e,t){for(var r;;){if(e.lookahead===0&&(er(e),e.lookahead===0)){if(t===tr)return se;break}if(e.match_length=0,r=Le._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===zt?(le(e,!0),e.strm.avail_out===0?Jt:Dr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:An}function nt(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var Rr;Rr=[new nt(0,0,0,0,n1),new nt(4,4,8,4,us),new nt(4,5,16,8,us),new nt(4,6,32,32,us),new nt(4,4,16,16,Or),new nt(8,16,32,32,Or),new nt(8,16,128,128,Or),new nt(8,32,128,256,Or),new nt(32,128,258,1024,Or),new nt(32,258,258,4096,Or)];function a1(e){e.window_size=2*e.w_size,Rt(e.head),e.max_lazy_match=Rr[e.level].max_lazy,e.good_match=Rr[e.level].good_length,e.nice_match=Rr[e.level].nice_length,e.max_chain_length=Rr[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=$-1,e.match_available=0,e.ins_h=0}function s1(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=oo,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ge.Buf16(Qm*2),this.dyn_dtree=new ge.Buf16((2*Km+1)*2),this.bl_tree=new ge.Buf16((2*Xm+1)*2),Rt(this.dyn_ltree),Rt(this.dyn_dtree),Rt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ge.Buf16(Jm+1),this.heap=new ge.Buf16(2*ds+1),Rt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ge.Buf16(2*ds+1),Rt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function zc(e){var t;return!e||!e.state?Nt(e,Me):(e.total_in=e.total_out=0,e.data_type=$m,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ao:Qt,e.adler=t.wrap===2?0:1,t.last_flush=tr,Le._tr_init(t),it)}function Uc(e){var t=zc(e);return t===it&&a1(e.state),t}function f1(e,t){return!e||!e.state||e.state.wrap!==2?Me:(e.state.gzhead=t,it)}function qc(e,t,r,n,i,o){if(!e)return Me;var a=1;if(t===zm&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>Hm||r!==oo||n<8||n>15||t<0||t>9||o<0||o>Gm)return Nt(e,Me);n===8&&(n=9);var s=new s1;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+$-1)/$),s.window=new ge.Buf8(s.w_size*2),s.head=new ge.Buf16(s.hash_size),s.prev=new ge.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new ge.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=t,s.strategy=o,s.method=r,Uc(e)}function l1(e,t){return qc(e,t,oo,Zm,jm,Vm)}function c1(e,t){var r,n,i,o;if(!e||!e.state||t>Bc||t<0)return e?Nt(e,Me):Me;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Cn&&t!==zt)return Nt(e,e.avail_out===0?cs:Me);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===ao)if(n.wrap===2)e.adler=0,j(n,31),j(n,139),j(n,8),n.gzhead?(j(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),j(n,n.gzhead.time&255),j(n,n.gzhead.time>>8&255),j(n,n.gzhead.time>>16&255),j(n,n.gzhead.time>>24&255),j(n,n.level===9?2:n.strategy>=to||n.level<2?4:0),j(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(j(n,n.gzhead.extra.length&255),j(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Bt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=hs):(j(n,0),j(n,0),j(n,0),j(n,0),j(n,0),j(n,n.level===9?2:n.strategy>=to||n.level<2?4:0),j(n,t1),n.status=Qt);else{var a=oo+(n.w_bits-8<<4)<<8,s=-1;n.strategy>=to||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,a|=s<<6,n.strstart!==0&&(a|=e1),a+=31-a%31,n.status=Qt,Tn(n,a),n.strstart!==0&&(Tn(n,e.adler>>>16),Tn(n,e.adler&65535)),e.adler=1}if(n.status===hs)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),Ot(e),i=n.pending,n.pending===n.pending_buf_size));)j(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=ro)}else n.status=ro;if(n.status===ro)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),Ot(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,j(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=no)}else n.status=no;if(n.status===no)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),Ot(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,j(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Bt(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=io)}else n.status=io;if(n.status===io&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Ot(e),n.pending+2<=n.pending_buf_size&&(j(n,e.adler&255),j(n,e.adler>>8&255),e.adler=0,n.status=Qt)):n.status=Qt),n.pending!==0){if(Ot(e),e.avail_out===0)return n.last_flush=-1,it}else if(e.avail_in===0&&Rc(t)<=Rc(r)&&t!==zt)return Nt(e,cs);if(n.status===Cn&&e.avail_in!==0)return Nt(e,cs);if(e.avail_in!==0||n.lookahead!==0||t!==tr&&n.status!==Cn){var l=n.strategy===to?o1(n,t):n.strategy===qm?i1(n,t):Rr[n.level].func(n,t);if((l===Jt||l===Dr)&&(n.status=Cn),l===se||l===Jt)return e.avail_out===0&&(n.last_flush=-1),it;if(l===An&&(t===Rm?Le._tr_align(n):t!==Bc&&(Le._tr_stored_block(n,0,0,!1),t===Dm&&(Rt(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Ot(e),e.avail_out===0))return n.last_flush=-1,it}return t!==zt?it:n.wrap<=0?Oc:(n.wrap===2?(j(n,e.adler&255),j(n,e.adler>>8&255),j(n,e.adler>>16&255),j(n,e.adler>>24&255),j(n,e.total_in&255),j(n,e.total_in>>8&255),j(n,e.total_in>>16&255),j(n,e.total_in>>24&255)):(Tn(n,e.adler>>>16),Tn(n,e.adler&65535)),Ot(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?it:Oc)}function u1(e){var t;return!e||!e.state?Me:(t=e.state.status,t!==ao&&t!==hs&&t!==ro&&t!==no&&t!==io&&t!==Qt&&t!==Cn?Nt(e,Me):(e.state=null,t===Qt?Nt(e,Nm):it))}function d1(e,t){var r=t.length,n,i,o,a,s,l,f,c;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==ao||n.lookahead))return Me;for(a===1&&(e.adler=Dc(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(Rt(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new ge.Buf8(n.w_size),ge.arraySet(c,t,r-n.w_size,n.w_size,0),t=c,r=n.w_size),s=e.avail_in,l=e.next_in,f=e.input,e.avail_in=r,e.next_in=0,e.input=t,er(n);n.lookahead>=$;){i=n.strstart,o=n.lookahead-($-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+$-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++;while(--o);n.strstart=i,n.lookahead=$-1,er(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=$-1,n.match_available=0,e.next_in=l,e.input=f,e.avail_in=s,n.wrap=a,it}ot.deflateInit=l1;ot.deflateInit2=qc;ot.deflateReset=Uc;ot.deflateResetKeep=zc;ot.deflateSetHeader=f1;ot.deflate=c1;ot.deflateEnd=u1;ot.deflateSetDictionary=d1;ot.deflateInfo="pako deflate (from Nodeca project)"});var ps=X(Nr=>{"use strict";var so=mt(),Vc=!0,$c=!0;try{String.fromCharCode.apply(null,[0])}catch{Vc=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{$c=!1}var Pn=new so.Buf8(256);for(yt=0;yt<256;yt++)Pn[yt]=yt>=252?6:yt>=248?5:yt>=240?4:yt>=224?3:yt>=192?2:1;var yt;Pn[254]=Pn[254]=1;Nr.string2buf=function(e){var t,r,n,i,o,a=e.length,s=0;for(i=0;i<a;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new so.Buf8(s),o=0,i=0;o<s;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t};function Hc(e,t){if(t<65534&&(e.subarray&&$c||!e.subarray&&Vc))return String.fromCharCode.apply(null,so.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}Nr.buf2binstring=function(e){return Hc(e,e.length)};Nr.binstring2buf=function(e){for(var t=new so.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};Nr.buf2string=function(e,t){var r,n,i,o,a=t||e.length,s=new Array(a*2);for(n=0,r=0;r<a;){if(i=e[r++],i<128){s[n++]=i;continue}if(o=Pn[i],o>4){s[n++]=65533,r+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&r<a;)i=i<<6|e[r++]&63,o--;if(o>1){s[n++]=65533;continue}i<65536?s[n++]=i:(i-=65536,s[n++]=55296|i>>10&1023,s[n++]=56320|i&1023)}return Hc(s,n)};Nr.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Pn[e[r]]>t?r:t}});var gs=X((c5,Zc)=>{"use strict";function h1(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Zc.exports=h1});var Kc=X(Ln=>{"use strict";var Fn=Gc(),kn=mt(),bs=ps(),ys=eo(),p1=gs(),Yc=Object.prototype.toString,g1=0,ms=4,zr=0,jc=1,Wc=2,m1=-1,b1=0,y1=8;function rr(e){if(!(this instanceof rr))return new rr(e);this.options=kn.assign({level:m1,method:y1,chunkSize:16384,windowBits:15,memLevel:8,strategy:b1,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p1,this.strm.avail_out=0;var r=Fn.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==zr)throw new Error(ys[r]);if(t.header&&Fn.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=bs.string2buf(t.dictionary):Yc.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Fn.deflateSetDictionary(this.strm,n),r!==zr)throw new Error(ys[r]);this._dict_set=!0}}rr.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?ms:g1,typeof e=="string"?r.input=bs.string2buf(e):Yc.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new kn.Buf8(n),r.next_out=0,r.avail_out=n),i=Fn.deflate(r,o),i!==jc&&i!==zr)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===ms||o===Wc))&&(this.options.to==="string"?this.onData(bs.buf2binstring(kn.shrinkBuf(r.output,r.next_out))):this.onData(kn.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==jc);return o===ms?(i=Fn.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===zr):(o===Wc&&(this.onEnd(zr),r.avail_out=0),!0)};rr.prototype.onData=function(e){this.chunks.push(e)};rr.prototype.onEnd=function(e){e===zr&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=kn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function xs(e,t){var r=new rr(t);if(r.push(e,!0),r.err)throw r.msg||ys[r.err];return r.result}function x1(e,t){return t=t||{},t.raw=!0,xs(e,t)}function v1(e,t){return t=t||{},t.gzip=!0,xs(e,t)}Ln.Deflate=rr;Ln.deflate=xs;Ln.deflateRaw=x1;Ln.gzip=v1});var Qc=X((d5,Xc)=>{"use strict";var fo=30,w1=12;Xc.exports=function(t,r){var n,i,o,a,s,l,f,c,u,d,h,g,x,T,_,w,k,M,I,R,N,p,m,b,y;n=t.state,i=t.next_in,b=t.input,o=i+(t.avail_in-5),a=t.next_out,y=t.output,s=a-(r-t.avail_out),l=a+(t.avail_out-257),f=n.dmax,c=n.wsize,u=n.whave,d=n.wnext,h=n.window,g=n.hold,x=n.bits,T=n.lencode,_=n.distcode,w=(1<<n.lenbits)-1,k=(1<<n.distbits)-1;e:do{x<15&&(g+=b[i++]<<x,x+=8,g+=b[i++]<<x,x+=8),M=T[g&w];t:for(;;){if(I=M>>>24,g>>>=I,x-=I,I=M>>>16&255,I===0)y[a++]=M&65535;else if(I&16){R=M&65535,I&=15,I&&(x<I&&(g+=b[i++]<<x,x+=8),R+=g&(1<<I)-1,g>>>=I,x-=I),x<15&&(g+=b[i++]<<x,x+=8,g+=b[i++]<<x,x+=8),M=_[g&k];r:for(;;){if(I=M>>>24,g>>>=I,x-=I,I=M>>>16&255,I&16){if(N=M&65535,I&=15,x<I&&(g+=b[i++]<<x,x+=8,x<I&&(g+=b[i++]<<x,x+=8)),N+=g&(1<<I)-1,N>f){t.msg="invalid distance too far back",n.mode=fo;break e}if(g>>>=I,x-=I,I=a-s,N>I){if(I=N-I,I>u&&n.sane){t.msg="invalid distance too far back",n.mode=fo;break e}if(p=0,m=h,d===0){if(p+=c-I,I<R){R-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}}else if(d<I){if(p+=c+d-I,I-=d,I<R){R-=I;do y[a++]=h[p++];while(--I);if(p=0,d<R){I=d,R-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}}}else if(p+=d-I,I<R){R-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}for(;R>2;)y[a++]=m[p++],y[a++]=m[p++],y[a++]=m[p++],R-=3;R&&(y[a++]=m[p++],R>1&&(y[a++]=m[p++]))}else{p=a-N;do y[a++]=y[p++],y[a++]=y[p++],y[a++]=y[p++],R-=3;while(R>2);R&&(y[a++]=y[p++],R>1&&(y[a++]=y[p++]))}}else if(I&64){t.msg="invalid distance code",n.mode=fo;break e}else{M=_[(M&65535)+(g&(1<<I)-1)];continue r}break}}else if(I&64)if(I&32){n.mode=w1;break e}else{t.msg="invalid literal/length code",n.mode=fo;break e}else{M=T[(M&65535)+(g&(1<<I)-1)];continue t}break}}while(i<o&&a<l);R=x>>3,i-=R,x-=R<<3,g&=(1<<x)-1,t.next_in=i,t.next_out=a,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=a<l?257+(l-a):257-(a-l),n.hold=g,n.bits=x}});var ou=X((h5,iu)=>{"use strict";var Jc=mt(),Ur=15,eu=852,tu=592,ru=0,vs=1,nu=2,_1=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],E1=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],S1=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],T1=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];iu.exports=function(t,r,n,i,o,a,s,l){var f=l.bits,c=0,u=0,d=0,h=0,g=0,x=0,T=0,_=0,w=0,k=0,M,I,R,N,p,m=null,b=0,y,v=new Jc.Buf16(Ur+1),S=new Jc.Buf16(Ur+1),P=null,E=0,C,F,A;for(c=0;c<=Ur;c++)v[c]=0;for(u=0;u<i;u++)v[r[n+u]]++;for(g=f,h=Ur;h>=1&&v[h]===0;h--);if(g>h&&(g=h),h===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,l.bits=1,0;for(d=1;d<h&&v[d]===0;d++);for(g<d&&(g=d),_=1,c=1;c<=Ur;c++)if(_<<=1,_-=v[c],_<0)return-1;if(_>0&&(t===ru||h!==1))return-1;for(S[1]=0,c=1;c<Ur;c++)S[c+1]=S[c]+v[c];for(u=0;u<i;u++)r[n+u]!==0&&(s[S[r[n+u]]++]=u);if(t===ru?(m=P=s,y=19):t===vs?(m=_1,b-=257,P=E1,E-=257,y=256):(m=S1,P=T1,y=-1),k=0,u=0,c=d,p=a,x=g,T=0,R=-1,w=1<<g,N=w-1,t===vs&&w>eu||t===nu&&w>tu)return 1;for(;;){C=c-T,s[u]<y?(F=0,A=s[u]):s[u]>y?(F=P[E+s[u]],A=m[b+s[u]]):(F=32+64,A=0),M=1<<c-T,I=1<<x,d=I;do I-=M,o[p+(k>>T)+I]=C<<24|F<<16|A|0;while(I!==0);for(M=1<<c-1;k&M;)M>>=1;if(M!==0?(k&=M-1,k+=M):k=0,u++,--v[c]===0){if(c===h)break;c=r[n+s[u]]}if(c>g&&(k&N)!==R){for(T===0&&(T=g),p+=d,x=c-T,_=1<<x;x+T<h&&(_-=v[x+T],!(_<=0));)x++,_<<=1;if(w+=1<<x,t===vs&&w>eu||t===nu&&w>tu)return 1;R=k&N,o[R]=g<<24|x<<16|p-a|0}}return k!==0&&(o[p+k]=c-T<<24|64<<16|0),l.bits=g,0}});var Uu=X(Ge=>{"use strict";var Te=mt(),Cs=fs(),at=ls(),C1=Qc(),Mn=ou(),A1=0,Lu=1,Mu=2,au=4,P1=5,lo=6,nr=0,F1=1,k1=2,Ie=-2,Iu=-3,As=-4,L1=-5,su=8,Bu=1,fu=2,lu=3,cu=4,uu=5,du=6,hu=7,pu=8,gu=9,mu=10,ho=11,xt=12,ws=13,bu=14,_s=15,yu=16,xu=17,vu=18,wu=19,co=20,uo=21,_u=22,Eu=23,Su=24,Tu=25,Cu=26,Es=27,Au=28,Pu=29,Q=30,Ps=31,M1=32,I1=852,B1=592,O1=15,R1=O1;function Fu(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function D1(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Te.Buf16(320),this.work=new Te.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ou(e){var t;return!e||!e.state?Ie:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Bu,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Te.Buf32(I1),t.distcode=t.distdyn=new Te.Buf32(B1),t.sane=1,t.back=-1,nr)}function Ru(e){var t;return!e||!e.state?Ie:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Ou(e))}function Du(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Ie:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Ru(e))}function Nu(e,t){var r,n;return e?(n=new D1,e.state=n,n.window=null,r=Du(e,t),r!==nr&&(e.state=null),r):Ie}function N1(e){return Nu(e,R1)}var ku=!0,Ss,Ts;function z1(e){if(ku){var t;for(Ss=new Te.Buf32(512),Ts=new Te.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Mn(Lu,e.lens,0,288,Ss,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Mn(Mu,e.lens,0,32,Ts,0,e.work,{bits:5}),ku=!1}e.lencode=Ss,e.lenbits=9,e.distcode=Ts,e.distbits=5}function zu(e,t,r,n){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Te.Buf8(o.wsize)),n>=o.wsize?(Te.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),Te.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(Te.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function U1(e,t){var r,n,i,o,a,s,l,f,c,u,d,h,g,x,T=0,_,w,k,M,I,R,N,p,m=new Te.Buf8(4),b,y,v=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ie;r=e.state,r.mode===xt&&(r.mode=ws),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,f=r.hold,c=r.bits,u=s,d=l,p=nr;e:for(;;)switch(r.mode){case Bu:if(r.wrap===0){r.mode=ws;break}for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.wrap&2&&f===35615){r.check=0,m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0),f=0,c=0,r.mode=fu;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((f&255)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=Q;break}if((f&15)!==su){e.msg="unknown compression method",r.mode=Q;break}if(f>>>=4,c-=4,N=(f&15)+8,r.wbits===0)r.wbits=N;else if(N>r.wbits){e.msg="invalid window size",r.mode=Q;break}r.dmax=1<<N,e.adler=r.check=1,r.mode=f&512?mu:xt,f=0,c=0;break;case fu:for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.flags=f,(r.flags&255)!==su){e.msg="unknown compression method",r.mode=Q;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Q;break}r.head&&(r.head.text=f>>8&1),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0,r.mode=lu;case lu:for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.head&&(r.head.time=f),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,m[2]=f>>>16&255,m[3]=f>>>24&255,r.check=at(r.check,m,4,0)),f=0,c=0,r.mode=cu;case cu:for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.head&&(r.head.xflags=f&255,r.head.os=f>>8),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0,r.mode=uu;case uu:if(r.flags&1024){for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.length=f,r.head&&(r.head.extra_len=f),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0}else r.head&&(r.head.extra=null);r.mode=du;case du:if(r.flags&1024&&(h=r.length,h>s&&(h=s),h&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Te.arraySet(r.head.extra,n,o,h,N)),r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,r.length-=h),r.length))break e;r.length=0,r.mode=hu;case hu:if(r.flags&2048){if(s===0)break e;h=0;do N=n[o+h++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N));while(N&&h<s);if(r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,N)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=pu;case pu:if(r.flags&4096){if(s===0)break e;h=0;do N=n[o+h++],r.head&&N&&r.length<65536&&(r.head.comment+=String.fromCharCode(N));while(N&&h<s);if(r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,N)break e}else r.head&&(r.head.comment=null);r.mode=gu;case gu:if(r.flags&512){for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Q;break}f=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=xt;break;case mu:for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}e.adler=r.check=Fu(f),f=0,c=0,r.mode=ho;case ho:if(r.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,k1;e.adler=r.check=1,r.mode=xt;case xt:if(t===P1||t===lo)break e;case ws:if(r.last){f>>>=c&7,c-=c&7,r.mode=Es;break}for(;c<3;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}switch(r.last=f&1,f>>>=1,c-=1,f&3){case 0:r.mode=bu;break;case 1:if(z1(r),r.mode=co,t===lo){f>>>=2,c-=2;break e}break;case 2:r.mode=xu;break;case 3:e.msg="invalid block type",r.mode=Q}f>>>=2,c-=2;break;case bu:for(f>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if((f&65535)!==(f>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Q;break}if(r.length=f&65535,f=0,c=0,r.mode=_s,t===lo)break e;case _s:r.mode=yu;case yu:if(h=r.length,h){if(h>s&&(h=s),h>l&&(h=l),h===0)break e;Te.arraySet(i,n,o,h,a),s-=h,o+=h,l-=h,a+=h,r.length-=h;break}r.mode=xt;break;case xu:for(;c<14;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.nlen=(f&31)+257,f>>>=5,c-=5,r.ndist=(f&31)+1,f>>>=5,c-=5,r.ncode=(f&15)+4,f>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Q;break}r.have=0,r.mode=vu;case vu:for(;r.have<r.ncode;){for(;c<3;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.lens[v[r.have++]]=f&7,f>>>=3,c-=3}for(;r.have<19;)r.lens[v[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,b={bits:r.lenbits},p=Mn(A1,r.lens,0,19,r.lencode,0,r.work,b),r.lenbits=b.bits,p){e.msg="invalid code lengths set",r.mode=Q;break}r.have=0,r.mode=wu;case wu:for(;r.have<r.nlen+r.ndist;){for(;T=r.lencode[f&(1<<r.lenbits)-1],_=T>>>24,w=T>>>16&255,k=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(k<16)f>>>=_,c-=_,r.lens[r.have++]=k;else{if(k===16){for(y=_+2;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f>>>=_,c-=_,r.have===0){e.msg="invalid bit length repeat",r.mode=Q;break}N=r.lens[r.have-1],h=3+(f&3),f>>>=2,c-=2}else if(k===17){for(y=_+3;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=_,c-=_,N=0,h=3+(f&7),f>>>=3,c-=3}else{for(y=_+7;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=_,c-=_,N=0,h=11+(f&127),f>>>=7,c-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Q;break}for(;h--;)r.lens[r.have++]=N}}if(r.mode===Q)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Q;break}if(r.lenbits=9,b={bits:r.lenbits},p=Mn(Lu,r.lens,0,r.nlen,r.lencode,0,r.work,b),r.lenbits=b.bits,p){e.msg="invalid literal/lengths set",r.mode=Q;break}if(r.distbits=6,r.distcode=r.distdyn,b={bits:r.distbits},p=Mn(Mu,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,b),r.distbits=b.bits,p){e.msg="invalid distances set",r.mode=Q;break}if(r.mode=co,t===lo)break e;case co:r.mode=uo;case uo:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,C1(e,d),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,f=r.hold,c=r.bits,r.mode===xt&&(r.back=-1);break}for(r.back=0;T=r.lencode[f&(1<<r.lenbits)-1],_=T>>>24,w=T>>>16&255,k=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(w&&!(w&240)){for(M=_,I=w,R=k;T=r.lencode[R+((f&(1<<M+I)-1)>>M)],_=T>>>24,w=T>>>16&255,k=T&65535,!(M+_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=M,c-=M,r.back+=M}if(f>>>=_,c-=_,r.back+=_,r.length=k,w===0){r.mode=Cu;break}if(w&32){r.back=-1,r.mode=xt;break}if(w&64){e.msg="invalid literal/length code",r.mode=Q;break}r.extra=w&15,r.mode=_u;case _u:if(r.extra){for(y=r.extra;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.length+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=Eu;case Eu:for(;T=r.distcode[f&(1<<r.distbits)-1],_=T>>>24,w=T>>>16&255,k=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(!(w&240)){for(M=_,I=w,R=k;T=r.distcode[R+((f&(1<<M+I)-1)>>M)],_=T>>>24,w=T>>>16&255,k=T&65535,!(M+_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=M,c-=M,r.back+=M}if(f>>>=_,c-=_,r.back+=_,w&64){e.msg="invalid distance code",r.mode=Q;break}r.offset=k,r.extra=w&15,r.mode=Su;case Su:if(r.extra){for(y=r.extra;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.offset+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Q;break}r.mode=Tu;case Tu:if(l===0)break e;if(h=d-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Q;break}h>r.wnext?(h-=r.wnext,g=r.wsize-h):g=r.wnext-h,h>r.length&&(h=r.length),x=r.window}else x=i,g=a-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do i[a++]=x[g++];while(--h);r.length===0&&(r.mode=uo);break;case Cu:if(l===0)break e;i[a++]=r.length,l--,r.mode=uo;break;case Es:if(r.wrap){for(;c<32;){if(s===0)break e;s--,f|=n[o++]<<c,c+=8}if(d-=l,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?at(r.check,i,d,a-d):Cs(r.check,i,d,a-d)),d=l,(r.flags?f:Fu(f))!==r.check){e.msg="incorrect data check",r.mode=Q;break}f=0,c=0}r.mode=Au;case Au:if(r.wrap&&r.flags){for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Q;break}f=0,c=0}r.mode=Pu;case Pu:p=F1;break e;case Q:p=Iu;break e;case Ps:return As;case M1:default:return Ie}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,(r.wsize||d!==e.avail_out&&r.mode<Q&&(r.mode<Es||t!==au))&&zu(e,e.output,e.next_out,d-e.avail_out)?(r.mode=Ps,As):(u-=e.avail_in,d-=e.avail_out,e.total_in+=u,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?at(r.check,i,d,e.next_out-d):Cs(r.check,i,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===xt?128:0)+(r.mode===co||r.mode===_s?256:0),(u===0&&d===0||t===au)&&p===nr&&(p=L1),p)}function q1(e){if(!e||!e.state)return Ie;var t=e.state;return t.window&&(t.window=null),e.state=null,nr}function G1(e,t){var r;return!e||!e.state||(r=e.state,!(r.wrap&2))?Ie:(r.head=t,t.done=!1,nr)}function V1(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==ho)?Ie:n.mode===ho&&(i=1,i=Cs(i,t,r,0),i!==n.check)?Iu:(o=zu(e,t,r,r),o?(n.mode=Ps,As):(n.havedict=1,nr))}Ge.inflateReset=Ru;Ge.inflateReset2=Du;Ge.inflateResetKeep=Ou;Ge.inflateInit=N1;Ge.inflateInit2=Nu;Ge.inflate=U1;Ge.inflateEnd=q1;Ge.inflateGetHeader=G1;Ge.inflateSetDictionary=V1;Ge.inflateInfo="pako inflate (from Nodeca project)"});var Fs=X((g5,qu)=>{"use strict";qu.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var Vu=X((m5,Gu)=>{"use strict";function $1(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Gu.exports=$1});var Hu=X(Bn=>{"use strict";var qr=Uu(),In=mt(),po=ps(),oe=Fs(),ks=eo(),H1=gs(),Z1=Vu(),$u=Object.prototype.toString;function ir(e){if(!(this instanceof ir))return new ir(e);this.options=In.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H1,this.strm.avail_out=0;var r=qr.inflateInit2(this.strm,t.windowBits);if(r!==oe.Z_OK)throw new Error(ks[r]);if(this.header=new Z1,qr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=po.string2buf(t.dictionary):$u.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=qr.inflateSetDictionary(this.strm,t.dictionary),r!==oe.Z_OK)))throw new Error(ks[r])}ir.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,s,l,f,c=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?oe.Z_FINISH:oe.Z_NO_FLUSH,typeof e=="string"?r.input=po.binstring2buf(e):$u.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new In.Buf8(n),r.next_out=0,r.avail_out=n),o=qr.inflate(r,oe.Z_NO_FLUSH),o===oe.Z_NEED_DICT&&i&&(o=qr.inflateSetDictionary(this.strm,i)),o===oe.Z_BUF_ERROR&&c===!0&&(o=oe.Z_OK,c=!1),o!==oe.Z_STREAM_END&&o!==oe.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===oe.Z_STREAM_END||r.avail_in===0&&(a===oe.Z_FINISH||a===oe.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=po.utf8border(r.output,r.next_out),l=r.next_out-s,f=po.buf2string(r.output,s),r.next_out=l,r.avail_out=n-l,l&&In.arraySet(r.output,r.output,s,l,0),this.onData(f)):this.onData(In.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(c=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==oe.Z_STREAM_END);return o===oe.Z_STREAM_END&&(a=oe.Z_FINISH),a===oe.Z_FINISH?(o=qr.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===oe.Z_OK):(a===oe.Z_SYNC_FLUSH&&(this.onEnd(oe.Z_OK),r.avail_out=0),!0)};ir.prototype.onData=function(e){this.chunks.push(e)};ir.prototype.onEnd=function(e){e===oe.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=In.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ls(e,t){var r=new ir(t);if(r.push(e,!0),r.err)throw r.msg||ks[r.err];return r.result}function j1(e,t){return t=t||{},t.raw=!0,Ls(e,t)}Bn.Inflate=ir;Bn.inflate=Ls;Bn.inflateRaw=j1;Bn.ungzip=Ls});var Wu=X((y5,ju)=>{"use strict";var W1=mt().assign,Y1=Kc(),K1=Hu(),X1=Fs(),Zu={};W1(Zu,Y1,K1,X1);ju.exports=Zu});var Yu=X(()=>{});var Ku=X(Ms=>{Ms.read=function(e,t,r,n,i){var o,a,s=i*8-n-1,l=(1<<s)-1,f=l>>1,c=-7,u=r?i-1:0,d=r?-1:1,h=e[t+u];for(u+=d,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=o*256+e[t+u],u+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=a*256+e[t+u],u+=d,c-=8);if(o===0)o=1-f;else{if(o===l)return a?NaN:(h?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-f}return(h?-1:1)*a*Math.pow(2,o-n)};Ms.write=function(e,t,r,n,i,o){var a,s,l,f=o*8-i-1,c=(1<<f)-1,u=c>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,g=n?1:-1,x=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+u>=1?t+=d/l:t+=d*Math.pow(2,1-u),t*l>=2&&(a++,l/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(t*l-1)*Math.pow(2,i),a=a+u):(s=t*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=s&255,h+=g,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;e[r+h]=a&255,h+=g,a/=256,f-=8);e[r+h-g]|=x*128}});var rd=X((R5,td)=>{"use strict";td.exports=W;var mo=Ku();function W(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}W.Varint=0;W.Fixed64=1;W.Bytes=2;W.Fixed32=5;var Is=(1<<16)*(1<<16),Xu=1/Is,Q1=12,ed=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");W.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,o=this.pos;this.type=n&7,e(i,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=bo(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Ju(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=bo(this.buf,this.pos)+bo(this.buf,this.pos+4)*Is;return this.pos+=8,e},readSFixed64:function(){var e=bo(this.buf,this.pos)+Ju(this.buf,this.pos+4)*Is;return this.pos+=8,e},readFloat:function(){var e=mo.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=mo.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t=this.buf,r,n;return n=t[this.pos++],r=n&127,n<128||(n=t[this.pos++],r|=(n&127)<<7,n<128)||(n=t[this.pos++],r|=(n&127)<<14,n<128)||(n=t[this.pos++],r|=(n&127)<<21,n<128)?r:(n=t[this.pos],r|=(n&15)<<28,J1(r,e,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=Q1&&ed?hb(this.buf,t,e):db(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==W.Bytes)return e.push(this.readVarint(t));var r=wt(this);for(e=e||[];this.pos<r;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==W.Bytes)return e.push(this.readSVarint());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==W.Bytes)return e.push(this.readBoolean());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==W.Bytes)return e.push(this.readFloat());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==W.Bytes)return e.push(this.readDouble());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==W.Bytes)return e.push(this.readFixed32());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==W.Bytes)return e.push(this.readSFixed32());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==W.Bytes)return e.push(this.readFixed64());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==W.Bytes)return e.push(this.readSFixed64());var t=wt(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=e&7;if(t===W.Varint)for(;this.buf[this.pos++]>127;);else if(t===W.Bytes)this.pos=this.readVarint()+this.pos;else if(t===W.Fixed32)this.pos+=4;else if(t===W.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Hr(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Hr(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Hr(this.buf,e&-1,this.pos),Hr(this.buf,Math.floor(e*Xu),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Hr(this.buf,e&-1,this.pos),Hr(this.buf,Math.floor(e*Xu),this.pos+4),this.pos+=8},writeVarint:function(e){if(e=+e||0,e>268435455||e<0){eb(e,this);return}this.realloc(4),this.buf[this.pos++]=e&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127)))},writeSVarint:function(e){this.writeVarint(e<0?-e*2-1:e*2)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(e.length*4),this.pos++;var t=this.pos;this.pos=pb(this.buf,e,this.pos);var r=this.pos-t;r>=128&&Qu(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),mo.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),mo.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r<t;r++)this.buf[this.pos++]=e[r]},writeRawMessage:function(e,t){this.pos++;var r=this.pos;e(t,this);var n=this.pos-r;n>=128&&Qu(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,W.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,nb,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,ib,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,sb,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,ob,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,ab,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,fb,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,lb,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,cb,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,ub,t)},writeBytesField:function(e,t){this.writeTag(e,W.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,W.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,W.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,W.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,W.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,W.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,W.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,W.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,W.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,W.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};function J1(e,t,r){var n=r.buf,i,o;if(o=n[r.pos++],i=(o&112)>>4,o<128||(o=n[r.pos++],i|=(o&127)<<3,o<128)||(o=n[r.pos++],i|=(o&127)<<10,o<128)||(o=n[r.pos++],i|=(o&127)<<17,o<128)||(o=n[r.pos++],i|=(o&127)<<24,o<128)||(o=n[r.pos++],i|=(o&1)<<31,o<128))return $r(e,i,t);throw new Error("Expected varint not more than 10 bytes")}function wt(e){return e.type===W.Bytes?e.readVarint()+e.pos:e.pos+1}function $r(e,t,r){return r?t*4294967296+(e>>>0):(t>>>0)*4294967296+(e>>>0)}function eb(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(r=~(-e%4294967296),n=~(-e/4294967296),r^4294967295?r=r+1|0:(r=0,n=n+1|0)),e>=18446744073709552e3||e<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),tb(r,n,t),rb(n,t)}function tb(e,t,r){r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos]=e&127}function rb(e,t){var r=(e&7)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127)))))}function Qu(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function nb(e,t){for(var r=0;r<e.length;r++)t.writeVarint(e[r])}function ib(e,t){for(var r=0;r<e.length;r++)t.writeSVarint(e[r])}function ob(e,t){for(var r=0;r<e.length;r++)t.writeFloat(e[r])}function ab(e,t){for(var r=0;r<e.length;r++)t.writeDouble(e[r])}function sb(e,t){for(var r=0;r<e.length;r++)t.writeBoolean(e[r])}function fb(e,t){for(var r=0;r<e.length;r++)t.writeFixed32(e[r])}function lb(e,t){for(var r=0;r<e.length;r++)t.writeSFixed32(e[r])}function cb(e,t){for(var r=0;r<e.length;r++)t.writeFixed64(e[r])}function ub(e,t){for(var r=0;r<e.length;r++)t.writeSFixed64(e[r])}function bo(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216}function Hr(e,t,r){e[r]=t,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function Ju(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function db(e,t,r){for(var n="",i=t;i<r;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s>r)break;var l,f,c;s===1?o<128&&(a=o):s===2?(l=e[i+1],(l&192)===128&&(a=(o&31)<<6|l&63,a<=127&&(a=null))):s===3?(l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(a=(o&15)<<12|(l&63)<<6|f&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):s===4&&(l=e[i+1],f=e[i+2],c=e[i+3],(l&192)===128&&(f&192)===128&&(c&192)===128&&(a=(o&15)<<18|(l&63)<<12|(f&63)<<6|c&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,s=1):a>65535&&(a-=65536,n+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),n+=String.fromCharCode(a),i+=s}return n}function hb(e,t,r){return ed.decode(e.subarray(t,r))}function pb(e,t,r){for(var n=0,i,o;n<t.length;n++){if(i=t.charCodeAt(n),i>55295&&i<57344)if(o)if(i<56320){e[r++]=239,e[r++]=191,e[r++]=189,o=i;continue}else i=o-55296<<10|i-56320|65536,o=null;else{i>56319||n+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):o=i;continue}else o&&(e[r++]=239,e[r++]=191,e[r++]=189,o=null);i<128?e[r++]=i:(i<2048?e[r++]=i>>6|192:(i<65536?e[r++]=i>>12|224:(e[r++]=i>>18|240,e[r++]=i>>12&63|128),e[r++]=i>>6&63|128),e[r++]=i&63|128)}return r}});var Zd=X((K7,qs)=>{"use strict";qs.exports=Oo;qs.exports.default=Oo;function Oo(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,o=Vd(e,0,i,r,!0),a=[];if(!o||o.next===o.prev)return a;var s,l,f,c,u,d,h;if(n&&(o=Yb(e,t,o,r)),e.length>80*r){s=f=e[0],l=c=e[1];for(var g=r;g<i;g+=r)u=e[g],d=e[g+1],u<s&&(s=u),d<l&&(l=d),u>f&&(f=u),d>c&&(c=d);h=Math.max(f-s,c-l),h=h!==0?32767/h:0}return fi(o,a,r,s,l,h,0),a}function Vd(e,t,r,n,i){var o,a;if(i===Us(e,t,r,n)>0)for(o=t;o<r;o+=n)a=Gd(o,e[o],e[o+1],a);else for(o=r-n;o>=t;o-=n)a=Gd(o,e[o],e[o+1],a);return a&&Ro(a,a.next)&&(ci(a),a=a.next),a}function ur(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Ro(r,r.next)||ee(r.prev,r,r.next)===0)){if(ci(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function fi(e,t,r,n,i,o,a){if(e){!a&&o&&ey(e,n,i,o);for(var s=e,l,f;e.prev!==e.next;){if(l=e.prev,f=e.next,o?Zb(e,n,i,o):Hb(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(f.i/r|0),ci(e),e=f.next,s=f.next;continue}if(e=f,e===s){a?a===1?(e=jb(ur(e),t,r),fi(e,t,r,n,i,o,2)):a===2&&Wb(e,t,r,n,i,o):fi(ur(e),t,r,n,i,o,1);break}}}}function Hb(e){var t=e.prev,r=e,n=e.next;if(ee(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,a=n.x,s=t.y,l=r.y,f=n.y,c=i<o?i<a?i:a:o<a?o:a,u=s<l?s<f?s:f:l<f?l:f,d=i>o?i>a?i:a:o>a?o:a,h=s>l?s>f?s:f:l>f?l:f,g=n.next;g!==t;){if(g.x>=c&&g.x<=d&&g.y>=u&&g.y<=h&&Wr(i,s,o,l,a,f,g.x,g.y)&&ee(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function Zb(e,t,r,n){var i=e.prev,o=e,a=e.next;if(ee(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,f=a.x,c=i.y,u=o.y,d=a.y,h=s<l?s<f?s:f:l<f?l:f,g=c<u?c<d?c:d:u<d?u:d,x=s>l?s>f?s:f:l>f?l:f,T=c>u?c>d?c:d:u>d?u:d,_=Ns(h,g,t,r,n),w=Ns(x,T,t,r,n),k=e.prevZ,M=e.nextZ;k&&k.z>=_&&M&&M.z<=w;){if(k.x>=h&&k.x<=x&&k.y>=g&&k.y<=T&&k!==i&&k!==a&&Wr(s,c,l,u,f,d,k.x,k.y)&&ee(k.prev,k,k.next)>=0||(k=k.prevZ,M.x>=h&&M.x<=x&&M.y>=g&&M.y<=T&&M!==i&&M!==a&&Wr(s,c,l,u,f,d,M.x,M.y)&&ee(M.prev,M,M.next)>=0))return!1;M=M.nextZ}for(;k&&k.z>=_;){if(k.x>=h&&k.x<=x&&k.y>=g&&k.y<=T&&k!==i&&k!==a&&Wr(s,c,l,u,f,d,k.x,k.y)&&ee(k.prev,k,k.next)>=0)return!1;k=k.prevZ}for(;M&&M.z<=w;){if(M.x>=h&&M.x<=x&&M.y>=g&&M.y<=T&&M!==i&&M!==a&&Wr(s,c,l,u,f,d,M.x,M.y)&&ee(M.prev,M,M.next)>=0)return!1;M=M.nextZ}return!0}function jb(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!Ro(i,o)&&$d(i,n,n.next,o)&&li(i,o)&&li(o,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),ci(n),ci(n.next),n=e=o),n=n.next}while(n!==e);return ur(n)}function Wb(e,t,r,n,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&ny(a,s)){var l=Hd(a,s);a=ur(a,a.next),l=ur(l,l.next),fi(a,t,r,n,i,o,0),fi(l,t,r,n,i,o,0);return}s=s.next}a=a.next}while(a!==e)}function Yb(e,t,r,n){var i=[],o,a,s,l,f;for(o=0,a=t.length;o<a;o++)s=t[o]*n,l=o<a-1?t[o+1]*n:e.length,f=Vd(e,s,l,n,!1),f===f.next&&(f.steiner=!0),i.push(ry(f));for(i.sort(Kb),o=0;o<i.length;o++)r=Xb(i[o],r);return r}function Kb(e,t){return e.x-t.x}function Xb(e,t){var r=Qb(e,t);if(!r)return t;var n=Hd(r,e);return ur(n,n.next),ur(r,r.next)}function Qb(e,t){var r=t,n=e.x,i=e.y,o=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>o&&(o=s,a=r.x<r.next.x?r:r.next,s===n))return a}r=r.next}while(r!==t);if(!a)return null;var l=a,f=a.x,c=a.y,u=1/0,d;r=a;do n>=r.x&&r.x>=f&&n!==r.x&&Wr(i<c?n:o,i,f,c,i<c?o:n,i,r.x,r.y)&&(d=Math.abs(i-r.y)/(n-r.x),li(r,e)&&(d<u||d===u&&(r.x>a.x||r.x===a.x&&Jb(a,r)))&&(a=r,u=d)),r=r.next;while(r!==l);return a}function Jb(e,t){return ee(e.prev,e,t.prev)<0&&ee(t.next,e,e.next)<0}function ey(e,t,r,n){var i=e;do i.z===0&&(i.z=Ns(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,ty(i)}function ty(e){var t,r,n,i,o,a,s,l,f=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t<f&&(s++,n=n.nextZ,!!n);t++);for(l=f;s>0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,f*=2}while(a>1);return e}function Ns(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function ry(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function Wr(e,t,r,n,i,o,a,s){return(i-a)*(t-s)>=(e-a)*(o-s)&&(e-a)*(n-s)>=(r-a)*(t-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function ny(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!iy(e,t)&&(li(e,t)&&li(t,e)&&oy(e,t)&&(ee(e.prev,e,t.prev)||ee(e,t.prev,t))||Ro(e,t)&&ee(e.prev,e,e.next)>0&&ee(t.prev,t,t.next)>0)}function ee(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Ro(e,t){return e.x===t.x&&e.y===t.y}function $d(e,t,r,n){var i=Bo(ee(e,t,r)),o=Bo(ee(e,t,n)),a=Bo(ee(r,n,e)),s=Bo(ee(r,n,t));return!!(i!==o&&a!==s||i===0&&Io(e,r,t)||o===0&&Io(e,n,t)||a===0&&Io(r,e,n)||s===0&&Io(r,t,n))}function Io(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Bo(e){return e>0?1:e<0?-1:0}function iy(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&$d(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function li(e,t){return ee(e.prev,e,e.next)<0?ee(e,t,e.next)>=0&&ee(e,e.prev,t)>=0:ee(e,t,e.prev)<0||ee(e,e.next,t)<0}function oy(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function Hd(e,t){var r=new zs(e.i,e.x,e.y),n=new zs(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function Gd(e,t,r,n){var i=new zs(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ci(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function zs(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Oo.deviation=function(e,t,r,n){var i=t&&t.length,o=i?t[0]*r:e.length,a=Math.abs(Us(e,0,o,r));if(i)for(var s=0,l=t.length;s<l;s++){var f=t[s]*r,c=s<l-1?t[s+1]*r:e.length;a-=Math.abs(Us(e,f,c,r))}var u=0;for(s=0;s<n.length;s+=3){var d=n[s]*r,h=n[s+1]*r,g=n[s+2]*r;u+=Math.abs((e[d]-e[g])*(e[h+1]-e[d+1])-(e[d]-e[h])*(e[g+1]-e[d+1]))}return a===0&&u===0?0:Math.abs((u-a)/a)};function Us(e,t,r,n){for(var i=0,o=t,a=r-n;o<r;o+=n)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}Oo.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)r.vertices.push(e[i][o][a]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var Jd=X((t4,Qd)=>{Qd.exports=globalThis.deck});var Pr={};Ga(Pr,{carto:()=>v_});var za={};Ga(za,{BASEMAP:()=>Xp,CARTO_LAYERS:()=>x_,CARTO_SOURCES:()=>kp,CartoAPIError:()=>Cr,ClusterTileLayer:()=>jn,H3TileLayer:()=>lr,HeatmapTileLayer:()=>ei,LayerFactory:()=>dl,PointLabelLayer:()=>ni,QuadbinTileLayer:()=>cr,RasterTileLayer:()=>si,SOURCE_DEFAULTS:()=>Bi,VectorTileLayer:()=>Kr,_GOOGLE_BASEMAPS:()=>Ra,_QuadbinLayer:()=>Eo,_RasterLayer:()=>Lo,_STYLE_LAYER_GROUPS:()=>sl,_SpatialIndexTileLayer:()=>Zr,_applyLayerGroupFilters:()=>Da,_fetchStyle:()=>Na,_getStyleUrl:()=>Xe,boundaryQuerySource:()=>Kf,boundaryTableSource:()=>Xf,colorBins:()=>ll,colorCategories:()=>cl,colorContinuous:()=>ul,fetchBasemapProps:()=>rg,fetchMap:()=>eg,h3QuerySource:()=>Sa,h3TableSource:()=>Ta,h3TilesetSource:()=>el,quadbinQuerySource:()=>Aa,quadbinTableSource:()=>Pa,quadbinTilesetSource:()=>tl,query:()=>Lp,rasterSource:()=>Fa,vectorQuerySource:()=>ka,vectorTableSource:()=>La,vectorTilesetSource:()=>Ma});var dd=G(kt(),1),hd=G(pt(),1),pd=G(pn(),1);function bl(e,t,r){switch(e.type){case"Point":return ug(e,t,r);case"LineString":return cg(e,t,r);case"Polygon":return yl(e,t,r);default:let n=e;throw new Error(`Unsupported geometry type: ${n?.type}`)}}function yl(e,t=-1/0,r=1/0){let{positions:n}=e,i=e.polygonIndices.value.filter(l=>l>=t&&l<=r),o=e.primitivePolygonIndices.value.filter(l=>l>=t&&l<=r);if(!(i.length>2)){let l=[];for(let f=0;f<o.length-1;f++){let c=o[f],u=o[f+1],d=Vi(n,c,u);l.push(d)}return{type:"Polygon",coordinates:l}}let s=[];for(let l=0;l<i.length-1;l++){let f=i[l],c=i[l+1],u=yl(e,f,c).coordinates;s.push(u)}return{type:"MultiPolygon",coordinates:s}}function cg(e,t=-1/0,r=1/0){let{positions:n}=e,i=e.pathIndices.value.filter(s=>s>=t&&s<=r);if(!(i.length>2))return{type:"LineString",coordinates:Vi(n,i[0],i[1])};let a=[];for(let s=0;s<i.length-1;s++){let l=Vi(n,i[s],i[s+1]);a.push(l)}return{type:"MultiLineString",coordinates:a}}function ug(e,t,r){let{positions:n}=e,i=Vi(n,t,r);return i.length>1?{type:"MultiPoint",coordinates:i}:{type:"Point",coordinates:i[0]}}function Vi(e,t,r){t=t||0,r=r||e.value.length/e.size;let n=[];for(let i=t;i<r;i++){let o=Array();for(let a=i*e.size;a<(i+1)*e.size;a++)o.push(Number(e.value[a]));n.push(o)}return n}function Hi(e,t){let r=t?.globalFeatureId;return r!==void 0?dg(e,r):hg(e,t?.type)}function dg(e,t){let r=xl(e);for(let n of r){let i=0,o=n.featureIds.value[0];for(let a=0;a<n.featureIds.value.length;a++){let s=n.featureIds.value[a];if(s!==o){if(t===n.globalFeatureIds.value[i])return $i(n,i,a);i=a,o=s}}if(t===n.globalFeatureIds.value[i])return $i(n,i,n.featureIds.value.length)}throw new Error(`featureId:${t} not found`)}function hg(e,t){let r=xl(e,t);return pg(r)}function xl(e,t){let r=[];return e.points&&(e.points.type="Point",r.push(e.points)),e.lines&&(e.lines.type="LineString",r.push(e.lines)),e.polygons&&(e.polygons.type="Polygon",r.push(e.polygons)),r}function pg(e){let t=[];for(let r of e){if(r.featureIds.value.length===0)continue;let n=0,i=r.featureIds.value[0];for(let o=0;o<r.featureIds.value.length;o++){let a=r.featureIds.value[o];a!==i&&(t.push($i(r,n,o)),n=o,i=a)}t.push($i(r,n,r.featureIds.value.length))}return t}function $i(e,t,r){let n=bl(e,t,r),i=mg(e,t,r),o=gg(e,t,r);return{type:"Feature",geometry:n,properties:i,...o}}function gg(e,t=0,r){return e.fields&&e.fields[e.featureIds.value[t]]}function mg(e,t=0,r){let n=Object.assign({},e.properties[e.featureIds.value[t]]);for(let i in e.numericProps)n[i]=e.numericProps[i].value[t];return n}var Vn=G(Se(),1);var Wt=Math.PI,wg=Wt/4,O_=Wt/180,wl=180/Wt,_l=512;function Fe(e){let[t,r]=e,n=t/_l*(2*Wt)-Wt,i=2*(Math.atan(Math.exp(r/_l*(2*Wt)-Wt))-wg);return[n*wl,i*wl]}var V_=Math.PI/180;var Bg=Math.PI/180,Og=180/Math.PI;function kl(e){var t=Tl(e[0]+1,e[2]),r=Tl(e[0],e[2]),n=Cl(e[1]+1,e[2]),i=Cl(e[1],e[2]);return[r,n,t,i]}function Rg(e){var t=kl(e),r={type:"Polygon",coordinates:[[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]]]};return r}function Tl(e,t){return e/Math.pow(2,t)*360-180}function Cl(e,t){var r=Math.PI-2*Math.PI*e/Math.pow(2,t);return Og*Math.atan(.5*(Math.exp(r)-Math.exp(-r)))}function $a(e,t,r){var n=Rl(e,t,r);return n[0]=Math.floor(n[0]),n[1]=Math.floor(n[1]),n}function Ll(e){return[[e[0]*2,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2+1,e[2]+1],[e[0]*2,e[1]*2+1,e[2]+1]]}function Ml(e){return e[0]%2===0&&e[1]%2===0?[e[0]/2,e[1]/2,e[2]-1]:e[0]%2===0&&!e[1]%2===0?[e[0]/2,(e[1]-1)/2,e[2]-1]:!e[0]%2===0&&e[1]%2===0?[(e[0]-1)/2,e[1]/2,e[2]-1]:[(e[0]-1)/2,(e[1]-1)/2,e[2]-1]}function Il(e){return Ll(Ml(e))}function Dg(e,t){for(var r=Il(e),n=0;n<r.length;n++)if(!Bl(t,r[n]))return!1;return!0}function Bl(e,t){for(var r=0;r<e.length;r++)if(Ol(e[r],t))return!0;return!1}function Ol(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Ng(e){for(var t="",r=e[2];r>0;r--){var n=0,i=1<<r-1;e[0]&i&&n++,e[1]&i&&(n+=2),t+=n.toString()}return t}function zg(e){for(var t=0,r=0,n=e.length,i=n;i>0;i--){var o=1<<i-1;switch(e[n-i]){case"0":break;case"1":t|=o;break;case"2":r|=o;break;case"3":t|=o,r|=o;break}}return[t,r,n]}function Ug(e){var t=$a(e[0],e[1],32),r=$a(e[2],e[3],32),n=[t[0],t[1],r[0],r[1]],i=qg(n);if(i===0)return[0,0,0];var o=n[0]>>>32-i,a=n[1]>>>32-i;return[o,a,i]}function qg(e){for(var t=28,r=0;r<t;r++){var n=1<<32-(r+1);if((e[0]&n)!=(e[2]&n)||(e[1]&n)!=(e[3]&n))return r}return t}function Rl(e,t,r){var n=Math.sin(t*Bg),i=Math.pow(2,r),o=i*(e/360+.5),a=i*(.5-.25*Math.log((1+n)/(1-n))/Math.PI);return[o,a,r]}var Zi={tileToGeoJSON:Rg,tileToBBOX:kl,getChildren:Ll,getParent:Ml,getSiblings:Il,hasTile:Bl,hasSiblings:Dg,tilesEqual:Ol,tileToQuadkey:Ng,quadkeyToTile:zg,pointToTile:$a,bboxToTile:Ug,pointToTileFraction:Rl},Gg=Vg;function Vg(e,t){var r,n,i=e.coordinates,o=t.max_zoom,a={},s=[];if(e.type==="Point")return[Zi.pointToTile(i[0],i[1],o)];if(e.type==="MultiPoint")for(r=0;r<i.length;r++)n=Zi.pointToTile(i[r][0],i[r][1],o),a[Ue(n[0],n[1],n[2])]=!0;else if(e.type==="LineString")Ha(a,i,o);else if(e.type==="MultiLineString")for(r=0;r<i.length;r++)Ha(a,i[r],o);else if(e.type==="Polygon")Al(a,s,i,o);else if(e.type==="MultiPolygon")for(r=0;r<i.length;r++)Al(a,s,i[r],o);else throw new Error("Geometry type not implemented");if(t.min_zoom!==o){var l=s.length;for(Pl(a,s),r=0;r<l;r++){var f=s[r];a[Ue(f[0],f[1],f[2])]=!0}return $g(a,s,t)}return Pl(a,s),s}function $g(e,t,r){for(var n=[],i=r.max_zoom;i>r.min_zoom;i--){for(var o={},a=[],s=0;s<t.length;s++){var l=t[s];if(l[0]%2===0&&l[1]%2===0){var f=Ue(l[0]+1,l[1],i),c=Ue(l[0],l[1]+1,i),u=Ue(l[0]+1,l[1]+1,i);if(e[f]&&e[c]&&e[u]){e[Ue(l[0],l[1],l[2])]=!1,e[f]=!1,e[c]=!1,e[u]=!1;var d=[l[0]/2,l[1]/2,i-1];i-1===r.min_zoom?n.push(d):(o[Ue(l[0]/2,l[1]/2,i-1)]=!0,a.push(d))}}}for(s=0;s<t.length;s++)l=t[s],e[Ue(l[0],l[1],l[2])]&&n.push(l);e=o,t=a}return n}function Al(e,t,r,n){for(var i=[],o=0;o<r.length;o++){var a=[];Ha(e,r[o],n,a);for(var s=0,l=a.length,f=l-1;s<l;f=s++){var c=(s+1)%l,u=a[s][1];(u>a[f][1]||u>a[c][1])&&(u<a[f][1]||u<a[c][1])&&u!==a[c][1]&&i.push(a[s])}}for(i.sort(Hg),o=0;o<i.length;o+=2){u=i[o][1];for(var d=i[o][0]+1;d<i[o+1][0];d++){var h=Ue(d,u,n);e[h]||t.push([d,u,n])}}}function Hg(e,t){return e[1]-t[1]||e[0]-t[0]}function Ha(e,t,r,n){for(var i,o,a=0;a<t.length-1;a++){var s=Zi.pointToTileFraction(t[a][0],t[a][1],r),l=Zi.pointToTileFraction(t[a+1][0],t[a+1][1],r),f=s[0],c=s[1],u=l[0],d=l[1],h=u-f,g=d-c;if(!(g===0&&h===0)){var x=h>0?1:-1,T=g>0?1:-1,_=Math.floor(f),w=Math.floor(c),k=h===0?1/0:Math.abs(((h>0?1:0)+_-f)/h),M=g===0?1/0:Math.abs(((g>0?1:0)+w-c)/g),I=Math.abs(x/h),R=Math.abs(T/g);for((_!==i||w!==o)&&(e[Ue(_,w,r)]=!0,n&&w!==o&&n.push([_,w]),i=_,o=w);k<1||M<1;)k<M?(k+=I,_+=x):(M+=R,w+=T),e[Ue(_,w,r)]=!0,n&&w!==o&&n.push([_,w]),i=_,o=w}}n&&w===n[0][1]&&n.pop()}function Pl(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.push(Zg(+r[n]))}function Ue(e,t,r){var n=2*(1<<r);return(n*t+e)*32+r}function Zg(e){var t=e%32,r=2*(1<<t),n=(e-t)/32,i=n%r,o=(n-i)/r%r;return[i,o,t]}var Dl=[0x5555555555555555n,0x3333333333333333n,0x0f0f0f0f0f0f0f0fn,0x00ff00ff00ff00ffn,0x0000ffff0000ffffn,0x00000000ffffffffn],Nl=[0n,1n,2n,4n,8n,16n],Fl=512;function jg(e){let{x:t,y:r,z:n}=Yt(e),i=Fl/(1<<n);return[t*i,Fl-r*i,i]}function Wg(e,t){let[r,n,i]=jg(e);return[[r,n],[r+t*i,n-t*i]]}function Yg(e,t=1){let[r,n]=Wg(e,t),[i,o]=Fe(r),[a,s]=Fe(n);return[a,o,a,s,i,s,i,o,a,o]}function zl(e){return BigInt(`0x${e}`)}function gn(e){return e.toString(16)}function mn(e){if(e.z<0||e.z>26)throw new Error("Wrong zoom");let t=BigInt(e.z),r=BigInt(e.x)<<32n-t,n=BigInt(e.y)<<32n-t;for(let o=0;o<5;o++){let a=Nl[5-o],s=Dl[4-o];r=(r|r<<a)&s,n=(n|n<<a)&s}return 0x4000000000000000n|1n<<59n|t<<52n|(r|n<<1n)>>12n|0xfffffffffffffn>>t*2n}function Yt(e){let t=e>>59n&7n,r=e>>57n&3n,n=e>>52n&0x1fn,i=(e&0xfffffffffffffn)<<12n;if(t!==1n&&r!==0n)throw new Error("Wrong mode");let o=i,a=i>>1n;for(let s=0;s<6;s++){let l=Nl[s],f=Dl[s];o=(o|o>>l)&f,a=(a|a>>l)&f}return o=o>>32n-n,a=a>>32n-n,{z:Number(n),x:Number(o),y:Number(a)}}function gt(e){return e>>52n&0x1fn}function ji(e){let t=gt(e)-1n;return e&~(0x1fn<<52n)|t<<52n|0xfffffffffffffn>>t*2n}function Ul(e,t){let r=Number(t);return Gg(e,{min_zoom:r,max_zoom:r}).map(([n,i,o])=>mn({x:n,y:i,z:o}))}function ql(e){let t=Yg(e);return{type:"Polygon",coordinates:[[[t[0],t[1]],[t[2],t[3]],[t[4],t[5]],[t[6],t[7]],[t[0],t[1]]]]}}var Yi=G(Kt(),1),Hl=G(Se(),1);var Vl=G(Se(),1);function ke(e,t){Vl.log.assert(e,t)}function $l(e,t){let{properties:r,numericProps:n}=e;return new Proxy(r[t]||{},{get(i,o){return o in n?n[o].value[t]:i[o]},has(i,o){return o in n||o in i},ownKeys(i){return[...Object.keys(n),...Reflect.ownKeys(i)]},getOwnPropertyDescriptor(i,o){return{enumerable:!0,configurable:!0}}})}function Lt(e,t){return`https://unpkg.com/@deck.gl/carto@${t}/dist/${e}-worker.js`}var bn=new Uint16Array,Za={positions:{value:new Float32Array,size:2},properties:[],numericProps:{},featureIds:{value:bn,size:1},globalFeatureIds:{value:bn,size:1}};function Wi(){return{shape:"binary-feature-collection",points:{type:"Point",...Za},lines:{type:"LineString",pathIndices:{value:bn,size:1},...Za},polygons:{type:"Polygon",polygonIndices:{value:bn,size:1},primitivePolygonIndices:{value:bn,size:1},...Za}}}function yn(e,t,r,n,i,o=2){return{type:"Point",positions:{value:new Float32Array(e),size:o},featureIds:{value:new Uint16Array(t),size:1},globalFeatureIds:{value:new Uint32Array(r),size:1},numericProps:n,properties:i}}function ja(e,t){let r={};return t&&Object.keys(t).forEach(n=>{r[n]={value:new Float32Array(e),size:1}}),r}function Wa(e,t,r,n){Object.keys(e).forEach(i=>{t[i].value[n]=e[i].value[r]})}function Zl(e,t,r,n=[],i,o,a="quadbin"){if(!e.content)return!1;e.userData||(e.userData={});let s=t.get(r)?.[0];if(s){if(n.every(f=>f.name in s))return!1;t.clear()}let l={};for(let f of e.content){let c=f.id,u=typeof i=="function"?i(f,{}):i;for(let T=0;T<r-1;T++)if(a==="h3"){let _=(0,Yi.getResolution)(c);c=(0,Yi.cellToParent)(c,Math.max(0,_-1))}else c=ji(c);let d=String(c);if(!(d in l)){l[d]={id:c,count:0,position:[0,0]};for(let{name:T,aggregation:_}of n)_==="any"?l[d][T]=f.properties[T]:l[d][T]=0}let h=l[d].count;l[d].count+=typeof o=="function"?o(f,{}):o;let g=l[d].count,x=g-h;l[d].position[0]=(h*l[d].position[0]+x*u[0])/g,l[d].position[1]=(h*l[d].position[1]+x*u[1])/g;for(let{name:T,aggregation:_}of n){let w=l[d][T],k=f.properties[T];_==="average"?l[d][T]=(h*w+x*k)/g:_==="count"||_==="sum"?l[d][T]=w+k:_==="max"?l[d][T]=Math.max(w,k):_==="min"&&(l[d][T]=Math.min(w,k))}}return t.set(r,Object.values(l)),!0}function jl(e){let t=[],r=["any","average","count","min","max","sum"];for(let n of Object.keys(e.content[0].properties)){let i=n.split("_").pop().toLowerCase();r.includes(i)||(Hl.log.warn(`No valid aggregation present in ${n} property`)(),i="any"),t.push({name:n,aggregation:i})}return t}function Wl(e,t){let r={};for(let{name:n,aggregation:i}of t)if(r[n]={min:1/0,max:-1/0},i!=="any")for(let o of e)r[n].min=Math.min(r[n].min,o[n]),r[n].max=Math.max(r[n].max,o[n]);return r}function Yl(e){let t=new Float32Array(e.length*2),r=new Uint16Array(e.length);for(let n=0;n<e.length;n++)t.set(e[n].position,2*n),r[n]=n;return{...Wi(),points:yn(t,r,r,{},e)}}var Kl=G(pt(),1);var et=class extends Kl._Tileset2D{getTileIndices(t){return super.getTileIndices(t).map(mn).map(r=>({q:r,i:gn(r)}))}getTileId({q:t,i:r}){return r||gn(t)}getTileMetadata({q:t}){return super.getTileMetadata(Yt(t))}getTileZoom({q:t}){return Number(gt(t))}getParentIndex({q:t}){return{q:ji(t)}}};var Ql=G(pt(),1),ie=G(Kt(),1),Xl=85.051128;function Jl({west:e,north:t,east:r,south:n},i,o=1){let l=[[t,r],[n,r],[n,e],[t,e]].map(u=>(0,ie.latLngToCell)(u[0],u[1],i)).map(u=>Math.max(...(0,ie.originToDirectedEdges)(u).map(d=>(0,ie.edgeLength)(d,ie.UNITS.rads)))*180/Math.PI),f=Math.max(...l)*o,c=Math.min(180,f/Math.cos((t+n)/2*Math.PI/180));return{north:Math.min(t+f,Xl),east:r+c,south:Math.max(n-f,-Xl),west:e-c}}function ec({west:e,north:t,east:r,south:n},i){let o=Math.abs(r-e);if(o>180){let s=Math.ceil(o/180),l=[];for(let f=0;f<s;f++){let c=e+f*180,u=Math.min(c+179.9999999,r);l=l.concat(ec({west:c,north:t,east:u,south:n},i))}return[...new Set(l)]}return(0,ie.polygonToCells)([[t,r],[n,r],[n,e],[t,e],[t,r]],i)}function Kg(e){let t=(0,ie.cellToBoundary)(e),r=t.map(f=>f[0]),n=t.map(f=>f[1]),i=Math.min(...n),o=Math.min(...r),a=Math.max(...n),s=Math.max(...r);return Jl({west:i,south:o,east:a,north:s},(0,ie.getResolution)(e),.12)}var Xg=2;function Fr(e,t){let r=Math.log2(t/512),n=2/3*(e.zoom-r),i=Math.log(1/Math.cos(Math.PI*e.latitude/180));return Math.max(0,Math.floor(n+i-Xg))}var Mt=class extends Ql._Tileset2D{getTileIndices({viewport:t,minZoom:r,maxZoom:n}){if(t.latitude===void 0)return[];let[i,o,a,s]=t.getBounds(),{tileSize:l}=this.opts,f=Fr(t,l),c;if(typeof r=="number"&&Number.isFinite(r)&&f<r)return[];if(typeof n=="number"&&Number.isFinite(n)&&f>n){f=n;let u=(0,ie.latLngToCell)(t.latitude,t.longitude,n);c=(0,ie.gridDisk)(u,1)}else{let u=Jl({west:i,north:s,east:a,south:o},f);c=ec(u,f)}return c.map(u=>({i:u}))}getTileId({i:t}){return t}getTileMetadata({i:t}){return{bbox:Kg(t)}}getTileZoom({i:t}){return(0,ie.getResolution)(t)}getParentIndex(t){let r=(0,ie.getResolution)(t.i);return{i:(0,ie.cellToParent)(t.i,r-1)}}};var tc=512;function Ya(e){let{x:t,y:r,z:n}=Yt(e),i=tc/(1<<n);return[t*i,tc-r*i,i]}function Qg(e,t){let[r,n,i]=Ya(e);return[[r,n],[r+t*i,n-t*i]]}function Ki(e,t=1){let[r,n]=Qg(e,t),[i,o]=Fe(r),[a,s]=Fe(n);return[a,o,a,s,i,s,i,o,a,o]}var xo=G(Kt(),1);var tt={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},Jg=tt.self||tt.window||tt.global||{},em=tt.window||tt.self||tt.global||{},tm=tt.global||tt.self||tt.window||{},rm=tt.document||{};var kr=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var rc=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),nm=rc&&parseFloat(rc[1])||0;var nc=e=>typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer;function Ka(e){globalThis.loaders||={},globalThis.loaders.modules||={},Object.assign(globalThis.loaders.modules,e)}function ic(...e){return im(e)}function im(e){let t=e.map(o=>o instanceof ArrayBuffer?new Uint8Array(o):o),r=t.reduce((o,a)=>o+a.byteLength,0),n=new Uint8Array(r),i=0;for(let o of t)n.set(o,i),i+=o.byteLength;return n.buffer}async function Xa(e){let t=[];for await(let r of e)t.push(om(r));return ic(...t)}function om(e){if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e)){let{buffer:t,byteOffset:r,byteLength:n}=e;return oc(t,r,n)}return oc(e)}function oc(e,t=0,r=e.byteLength-t){let n=new Uint8Array(e,t,r),i=new Uint8Array(n.length);return i.set(n),i.buffer}function ac(e){return e&&typeof e=="object"&&e.isBuffer}function It(e){if(ac(e))return e;if(e instanceof ArrayBuffer)return e;if(nc(e))return sc(e);if(ArrayBuffer.isView(e)){let t=e.buffer;return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?t:t.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(typeof e=="string"){let t=e;return new TextEncoder().encode(t).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function sc(e,t=0,r=e.byteLength-t){let n=new Uint8Array(e,t,r),i=new Uint8Array(n.length);return i.set(n),i.buffer}function Lr(e){return t=>new Promise((r,n)=>e(t,(i,o)=>i?n(i):r(o)))}var Xi=class{constructor(t){this.compressBatches=this.compressBatches.bind(this),this.decompressBatches=this.decompressBatches.bind(this)}async preload(t={}){Ka(t)}async compress(t){return await this.preload(),this.compressSync(t)}async decompress(t,r){return await this.preload(),this.decompressSync(t,r)}compressSync(t){throw new Error(`${this.name}: sync compression not supported`)}decompressSync(t,r){throw new Error(`${this.name}: sync decompression not supported`)}async*compressBatches(t){let r=await this.concatenate(t);yield this.compress(r)}async*decompressBatches(t){let r=await this.concatenate(t);yield this.decompress(r)}concatenate(t){return Xa(t)}improveError(t){return t.message.includes(this.name)||(t.message=`${this.name} ${t.message}`),t}};var or=G(Wu(),1),vt=G(Yu(),1),go=class extends Xi{name="deflate";extensions=[];contentEncodings=["deflate"];isSupported=!0;options;_chunks=[];constructor(t={}){super(t),this.options=t}async compress(t){if(!kr&&this.options.deflate?.useZlib){let r=this.options.deflate?.gzip?await Lr(vt.default.gzip)(t):await Lr(vt.default.deflate)(t);return It(r)}return this.compressSync(t)}async decompress(t){if(!kr&&this.options.deflate?.useZlib){let r=this.options.deflate?.gzip?await Lr(vt.default.gunzip)(t):await Lr(vt.default.inflate)(t);return It(r)}return this.decompressSync(t)}compressSync(t){if(!kr&&this.options.deflate?.useZlib){let o=this.options.deflate?.gzip?vt.default.gzipSync(t):vt.default.deflateSync(t);return It(o)}let r=this.options?.deflate||{},n=new Uint8Array(t),i=this.options?.raw?or.default.deflateRaw:or.default.deflate;return It(i(n,r).buffer)}decompressSync(t){if(!kr&&this.options.deflate?.useZlib){let o=this.options.deflate?.gzip?vt.default.gunzipSync(t):vt.default.inflateSync(t);return It(o)}let r=this.options?.deflate||{},n=new Uint8Array(t),i=this.options?.raw?or.default.inflateRaw:or.default.inflate;return It(i(n,r).buffer)}async*compressBatches(t){let r=this.options?.deflate||{},n=new or.default.Deflate(r);yield*this.transformBatches(n,t)}async*decompressBatches(t){let r=this.options?.deflate||{},n=new or.default.Inflate(r);yield*this.transformBatches(n,t)}async*transformBatches(t,r){t.onData=this._onData.bind(this),t.onEnd=this._onEnd.bind(this);for await(let a of r){let s=new Uint8Array(a);if(!t.push(s,!1))throw new Error(`${this._getError()}write`);yield*this._getChunks()}let n=new Uint8Array(0),i=t.push(n,!0);yield*this._getChunks()}_onData(t){this._chunks.push(t)}_onEnd(t){if(t!==0)throw new Error(this._getError(t)+this._chunks.length)}_getChunks(){let t=this._chunks;return this._chunks=[],t}_getError(t=0){let r={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};return`${this.name}: ${r[t]}`}};var On=class extends go{name="gzip";extensions=["gz","gzip"];contentEncodings=["gzip","x-gzip"];isSupported=!0;constructor(t){super({...t,deflate:{...t?.gzip,gzip:!0}})}};function ar(e,t,r,n){let i=t.type===2?t.readVarint()+t.pos:t.pos+1,o=t.buf.buffer.slice(t.pos,i);if(n?.compression==="gzip"){let s=new On().decompressSync(o);r.value=new e(s)}else r.value=new e(o);return t.pos=i,r.value}var Rn=class{static read(t,r){return t.readFields(Rn._readField,{key:"",value:null},r)}static _readField(t,r,n){t===1?r.key=n.readString():t===2&&(r.value=n.readString())}},Ve=class{static read(t,r){return t.readFields(Ve._readField,{},r)}static _readField(t,r,n){if(t===1){let{key:i,value:o}=Rn.read(n,n.readVarint()+n.pos);r[i]=o}}},sr=class{static read(t,r){let{value:n,size:i}=t.readFields(sr._readField,{value:[],size:0},r);return{value:n,size:i}}static _readField(t,r,n){t===1?ar(Float64Array,n,r):t===2&&(r.size=n.readVarint(!0))}},ye=class{static read(t,r){let{value:n,size:i}=t.readFields(ye._readField,{value:[],size:0},r);return{value:new Uint32Array(n),size:i}}static _readField(t,r,n){t===1?n.readPackedVarint(r.value):t===2&&(r.size=n.readVarint(!0))}},fr=class{static read(t,r){return t.readFields(fr._readField,{id:0},r)}static _readField(t,r,n){t===1&&(r.id=n.readVarint())}},Dn=class{static read(t,r){return t.readFields(Dn._readField,{value:[]},r)}static _readField(t,r,n){t===1&&ar(Float64Array,n,r)}},$e=class{static read(t,r){return t.readFields($e._readField,{key:"",value:null},r)}static _readField(t,r,n){t===1?r.key=n.readString():t===2&&(r.value=Dn.read(n,n.readVarint()+n.pos))}},Nn=class{static read(t,r){return t.readFields(Nn._readField,{positions:null,globalFeatureIds:null,featureIds:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=sr.read(n,n.readVarint()+n.pos);else if(t===2)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.properties.push(Ve.read(n,n.readVarint()+n.pos));else if(t===5){let i=$e.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===6&&r.fields.push(fr.read(n,n.readVarint()+n.pos))}},zn=class{static read(t,r){return t.readFields(zn._readField,{positions:null,pathIndices:null,globalFeatureIds:null,featureIds:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=sr.read(n,n.readVarint()+n.pos);else if(t===2)r.pathIndices=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===5)r.properties.push(Ve.read(n,n.readVarint()+n.pos));else if(t===6){let i=$e.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===7&&r.fields.push(fr.read(n,n.readVarint()+n.pos))}},Un=class{static read(t,r){return t.readFields(Un._readField,{positions:null,polygonIndices:null,globalFeatureIds:null,featureIds:null,primitivePolygonIndices:null,triangles:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=sr.read(n,n.readVarint()+n.pos);else if(t===2)r.polygonIndices=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===5)r.primitivePolygonIndices=ye.read(n,n.readVarint()+n.pos);else if(t===6)r.triangles=ye.read(n,n.readVarint()+n.pos);else if(t===7)r.properties.push(Ve.read(n,n.readVarint()+n.pos));else if(t===8){let i=$e.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===9&&r.fields.push(fr.read(n,n.readVarint()+n.pos))}},Gr=class{static read(t,r){return t.readFields(Gr._readField,{points:null,lines:null,polygons:null},r)}static _readField(t,r,n){t===1?r.points=Nn.read(n,n.readVarint()+n.pos):t===2?r.lines=zn.read(n,n.readVarint()+n.pos):t===3&&(r.polygons=Un.read(n,n.readVarint()+n.pos))}};var qn=class{static read(t,r){return t.readFields(qn._readField,{value:[]},r)}static _readField(t,r,n){t===1&&ar(BigUint64Array,n,r)}},Gn=class{static read(t,r){return t.readFields(Gn._readField,{indices:null,properties:[],numericProps:{}},r)}static _readField(t,r,n){if(t===1)r.indices=qn.read(n,n.readVarint()+n.pos);else if(t===2)r.properties.push(Ve.read(n,n.readVarint()+n.pos));else if(t===3){let i=$e.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}}},Vr=class{static read(t,r){return t.readFields(Vr._readField,{scheme:0,cells:null},r)}static _readField(t,r,n){t===1?r.scheme=n.readVarint():t===2&&(r.cells=Gn.read(n,n.readVarint()+n.pos))}};var nd=G(rd(),1);function Ut(e,t){let r=new nd.default(e);return t.read(r)}function id(e){let{cells:t,scheme:r}=e,n=t.indices.value.length,i=[];for(let o=0;o<n;o++){let a=r==="h3"?gn(t.indices.value[o]):t.indices.value[o],s={...t.properties[o]};for(let l of Object.keys(t.numericProps))s[l]=t.numericProps[l].value[o];i.push({id:a,properties:s})}return i}var ad="9.3.2",sd="cartoSpatialTile",gb={cartoSpatialTile:{scheme:"quadbin",workerUrl:Lt(sd,ad)}},mb={name:"CARTO Spatial Tile",version:ad,id:sd,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-spatial-tile"],category:"geometry",parse:async(e,t)=>od(e,t),parseSync:od,worker:!0,options:gb};function od(e,t){if(!e)return null;let r=Ut(e,Vr),{cells:n}=r,i=t?.cartoSpatialTile?.scheme;return id({cells:n,scheme:i})}var yo=mb;var fd=G(Se(),1),ld=G(Se(),1);function He(e,t,r=0){if(!e)return t;if(!t)return e;if(r>10)return t;let n={...e};for(let i in t){let o=t[i];o===e||o===t||(typeof o=="object"&&o!==null?n[i]=He(e[i],o,r+1):n[i]=o)}return n}function cd(e,t){let r={};for(let{geoid:n,...i}of t.properties)n in r?fd.log.warn("Duplicate geoid key in boundary mapping, using first occurance")():r[n]=i;for(let n of["points","lines","polygons"]){let i=e[n];if(i.positions.value.length===0)continue;i.properties=i.properties.map(({geoid:f})=>r[f]);let{positions:o,globalFeatureIds:a}=i,s=null;n==="lines"&&(s=i.pathIndices.value),n==="polygons"&&(s=i.polygonIndices.value);let l=o.value.length/o.size;for(let f in t.numericProps){let c=t.numericProps[f].value,u=c.constructor,d=new u(l);if(i.numericProps[f]={value:d,size:1},s)for(let h=0;h<s.length-1;h++){let g=s[h],x=s[h+1],T=a.value[g];d.fill(c[T],g,x)}else for(let h=0;h<l;h++){let g=a.value[h];d[h]=c[g]}}}return e}var Ce={type:"object",value:null,validate:(e,t)=>t.optional&&e===null||typeof e=="object"&&Array.isArray(e.tiles)&&e.tiles.every(r=>typeof r=="string"),equal:(e,t)=>(0,ld._deepEqual)(e,t,2),async:!0};(0,pd.registerLoaders)([yo]);function ud(e){if(e===Mt)return"h3";if(e===et)return"quadbin";throw new Error("Invalid tileset class")}var gd={data:Ce,clusterLevel:{type:"number",value:5,min:1},getPosition:{type:"accessor",value:({id:e})=>{if(typeof e=="string"){let[t,r]=(0,xo.cellToLatLng)(e);return[r,t]}return Ki(e,.5).slice(2,4)}},getWeight:{type:"accessor",value:1},refinementStrategy:"no-overlap",tileSize:512},$n=class extends hd.TileLayer{initializeState(){super.initializeState(),this.state.aggregationCache=new WeakMap,this.state.scheme=ud(this.props.TilesetClass)}updateState(t){let{props:r}=t,n=ud(r.TilesetClass);this.state.scheme!==n&&(this.setState({scheme:n,tileset:null}),this.state.aggregationCache=new WeakMap),super.updateState(t)}renderLayers(){let t=this.state.tileset?.tiles.filter(h=>h.isLoaded&&h.content&&this.state.tileset.isTileVisible(h));if(!t?.length||!this.state.tileset)return null;t.sort((h,g)=>g.zoom-h.zoom);let{getPosition:r,getWeight:n}=this.props,{aggregationCache:i,scheme:o}=this.state,a=o==="h3",s=jl(t[0]),l=[],f=!1,c=this._getAggregationLevels(t);for(let h of t){let g=i.get(h.content);g||(g=new Map,i.set(h.content,g));let x=Zl(h,g,c,s,r,n,a?"h3":"quadbin");f||(f=x),l.push(...g.get(c))}l.sort((h,g)=>Number(g.count-h.count));let u=l?.map(h=>h.id);if(f||(f=!(0,Vn._deepEqual)(u,this.state.clusterIds,1)),this.setState({clusterIds:u}),f){let h=Wl(l,s),g=Yl(l);g.points.attributes={stats:h},this.setState({data:g})}let d={...this.props,id:"clusters",data:this.state.data,dataComparator:(h,g)=>{let x=h?.points?.properties?.map(_=>_.id),T=g?.points?.properties?.map(_=>_.id);return(0,Vn._deepEqual)(x,T,1)}};return new dd.GeoJsonLayer(this.getSubLayerProps(d))}getPickingInfo(t){let r=t.info;if(r.index!==-1){let{data:n}=t.sourceLayer.props;r.object=Hi(n,{globalFeatureId:r.index})}return r}_updateAutoHighlight(t){for(let r of this.getSubLayers())r.updateAutoHighlight(t)}filterSubLayer(){return!0}_getAggregationLevels(t){let r=this.state.scheme==="h3",n=t[0],i,o;r?(i=(0,xo.getResolution)(n.id),o=Fr(this.context.viewport,this.state.tileset.opts.tileSize)):(i=n.zoom,o=this.context.viewport.zoom);let a=Math.round(o-i);return Math.round(this.props.clusterLevel)-a}};$n.layerName="ClusterGeoJsonLayer";$n.defaultProps=gd;var Hn=class extends Vn.CompositeLayer{getLoadOptions(){let t=this.props.data,r=t&&"scheme"in t?t.scheme:"quadbin";return He(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},cartoSpatialTile:{scheme:r}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r,maxresolution:n}=t,o=t&&"scheme"in t&&t.scheme==="h3"?Mt:et;return[new $n(this.props,{id:`cluster-geojson-layer-${this.props.id}`,data:r,TilesetClass:o,maxZoom:n,loadOptions:this.getLoadOptions()})]}};Hn.layerName="ClusterTileLayer";Hn.defaultProps=gd;var jn=Hn;var yd=G(Se(),1),Bs=G(pt(),1);var md=G(pn(),1);var bd=G(pt(),1);(0,md.registerLoaders)([yo]);function bb(e){return e!=null&&e!==""}var yb={tileSize:512},Wn=class extends bd.TileLayer{_updateAutoHighlight(t){let{hoveredFeatureId:r}=this.state,n=t.object,i=null;if(n&&(i=n.id),r!==i){let{highlightColor:o}=this.props;typeof o=="function"&&(o=o(t)),this.setState({highlightColor:o,hoveredFeatureId:i})}}getSubLayerPropsByTile(t){return{highlightedObjectIndex:this.getHighlightedObjectIndex(t),highlightColor:this.state.highlightColor}}getHighlightedObjectIndex(t){let{hoveredFeatureId:r}=this.state,n=t.content;return!bb(r)||!Array.isArray(n)||!this._featureInTile(t,r)?-1:n.findIndex(o=>o.id===r)}_featureInTile(t,r){let n=this.state.tileset,i=n.getTileZoom(t.index),o=t.index.q?"q":"i",a={[o]:r},s=n.getTileZoom(a);for(;!(s<=i);)a=n.getParentIndex(a),s=n.getTileZoom(a);return a[o]===t.index[o]}};Wn.layerName="SpatialIndexTileLayer";Wn.defaultProps=yb;var Zr=Wn;var xb=e=>{let{data:t}=e,{index:r}=e.tile;return!t||!t.length?null:new Bs.H3HexagonLayer(e,{getHexagon:n=>n.id,centerHexagon:r,highPrecision:!0})},vb={data:Ce,tileSize:512},Yn=class extends yd.CompositeLayer{initializeState(){Bs.H3HexagonLayer._checkH3Lib()}getLoadOptions(){let t=this.props.data;return He(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},cartoSpatialTile:{scheme:"h3"}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r}=t,{minresolution:n,maxresolution:i}=t;this.props.minZoom&&(n=Math.max(n,Fr({zoom:this.props.minZoom,latitude:0},this.props.tileSize))),this.props.maxZoom&&(i=Math.min(i,Fr({zoom:this.props.maxZoom,latitude:0},this.props.tileSize)));let o=this.getSubLayerClass("spatial-index-tile",Zr);return new o(this.props,{id:`h3-tile-layer-${this.props.id}`,data:r,TilesetClass:Mt,renderSubLayers:xb,minZoom:n,maxZoom:i,loadOptions:this.getLoadOptions()})}};Yn.layerName="H3TileLayer";Yn.defaultProps=vb;var lr=Yn;var To=G(Kt(),1),Co=G(Se(),1),_d=G(kt(),1);var wb=`layout(std140) uniform heatmapUniforms {
|
|
8
8
|
vec2 colorDomain;
|
|
9
9
|
vec2 delta;
|
|
10
10
|
float intensity;
|
|
@@ -166,7 +166,7 @@ vColor = vec4(color.rgb, color.a * layer.opacity);
|
|
|
166
166
|
}
|
|
167
167
|
DECKGL_FILTER_COLOR(vColor, geometry);
|
|
168
168
|
}
|
|
169
|
-
`;var Rb={...Ds.ColumnLayer.defaultProps,extruded:!1,diskResolution:4,vertices:[[-.5,-.5],[.5,-.5],[.5,.5],[-.5,.5]]},ko=class extends _o(Ds.ColumnLayer){getShaders(){let t=super.getShaders(),r=this.props.data,n=r.data.blockSize??Math.sqrt(r.length);return{...t,defines:{...t.defines,BLOCK_WIDTH:n},vs:Fd}}initializeState(){this.getAttributeManager().addInstanced({instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getLineColor",defaultValue:[255,255,255,255]}})}};ko.layerName="RasterColumnLayer";function Db(e,t){return e.data===t.data&&e.length===t.length}var ii=class extends kd.CompositeLayer{renderLayers(){let{data:t,getElevation:r,getFillColor:n,getLineColor:i,getLineWidth:o,tileIndex:a,updateTriggers:s}=this.props;if(!t||!a||t.length===0)return null;let l=t.blockSize??0,[f,c,u]=Ya(a),d=[f,c],h=u/l,g=this.getSubLayerClass("column",ko),{highlightedObjectIndex:x,highlightColor:T}=this.state;return new g(this.props,this.getSubLayerProps({id:"cell",updateTriggers:s,getElevation:this.getSubLayerAccessor(r),getFillColor:this.getSubLayerAccessor(n),getLineColor:this.getSubLayerAccessor(i),getLineWidth:this.getSubLayerAccessor(o)}),{data:{data:t,length:l*l},dataComparator:Db,offset:d,lineWidthScale:h,highlightedObjectIndex:x,highlightColor:T})}getSubLayerAccessor(t){return typeof t!="function"?super.getSubLayerAccessor(t):(r,n)=>{let{data:i,index:o}=n,a=i.data,s=$l(a.cells,o);return t({properties:s},n)}}getPickingInfo(t){let r=super.getPickingInfo(t);return r.index!==-1&&(r.object=this.getSubLayerAccessor(n=>n)(void 0,{data:this.props,index:r.index})),r}_updateAutoHighlight(t){let{highlightedObjectIndex:r}=this.state,n=-1;if(t.index!==-1&&(n=t.index),r!==n){let{highlightColor:i}=this.props;typeof i=="function"&&(i=i(t)),this.setState({highlightColor:i,highlightedObjectIndex:n})}}};ii.layerName="RasterLayer";ii.defaultProps=Rb;var Lo=ii;var Rd=G(pt(),1);var Dd=G(pn(),1);var Nb={uint8:Uint8Array,uint16:Uint16Array,uint32:Uint32Array,uint64:BigUint64Array,int8:Int8Array,int16:Int16Array,int32:Int32Array,int64:BigInt64Array,float32:Float32Array,float64:Float64Array},oi=class{static read(t,r){return t.readFields(oi._readField,{name:"",type:"",data:null},r)}static _readField(t,r,n){if(t===1)r.name=n.readString();else if(t===2)r.type=n.readString();else if(t===3){let i=Nb[r.type];if(!i)throw Error(`Invalid data type: ${r.type}`);r.data={};let{compression:o}=qt;ar(i,n,r.data,{compression:o})}}},qt=class{static read(t,r){return t.readFields(qt._readField,{blockSize:0,bands:[]},r)}static _readField(t,r,n){t===1?r.blockSize=n.readVarint():t===2&&r.bands.push(oi.read(n,n.readVarint()+n.pos))}};var Md="9.3.0",Id="cartoRasterTile",zb={cartoRasterTile:{metadata:null,workerUrl:Lt(Id,Md)}},Ub={name:"CARTO Raster Tile",version:Md,id:Id,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-raster-tile"],category:"geometry",parse:async(e,t)=>Ld(e,t),parseSync:Ld,worker:!0,options:zb};function Ld(e,t){let r=t?.cartoRasterTile?.metadata;if(!e||!r)return null;qt.compression=r.compression;let n=Ut(e,qt),{bands:i,blockSize:o}=n,a={};for(let s=0;s<i.length;s++){let{name:l,data:f}=i[s];a[l]=f}return{blockSize:o,cells:{numericProps:a,properties:[]}}}var Bd=Ub;(0,Dd.registerLoaders)([Bd]);var qb=e=>{let t=e.tile?.index?.q;return t?new Lo(e,{tileIndex:t}):null},Gb={data:Ce,refinementStrategy:"no-overlap",tileSize:512},Mo=class extends Kn(Rd.TileLayer,xd){filterSubLayer(t){let{tile:r}=t.layer.props;return r?super.filterSubLayer(t):!0}};Mo.layerName="PostProcessTileLayer";var ai=class extends Od.CompositeLayer{getLoadOptions(){let t=this.props.data;return He(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r,minzoom:n,maxzoom:i,raster_metadata:o}=t,a=this.getSubLayerClass("tile",Mo),s=this.getLoadOptions();return new a(this.props,{id:`raster-tile-layer-${this.props.id}`,data:r,TilesetClass:et,renderSubLayers:qb,minZoom:n,maxZoom:i,loadOptions:{...s,cartoRasterTile:{...s?.cartoRasterTile,metadata:o}}})}};ai.layerName="RasterTileLayer";ai.defaultProps=Gb;var si=ai;var nh=G(pn(),1);var jr=class{static read(t,r){return t.readFields(jr._readField,{properties:[],numericProps:{}},r)}static _readField(t,r,n){if(t===1)r.properties.push(Ve.read(n,n.readVarint()+n.pos));else if(t===2){let i=$e.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}}};var zd="9.3.0",Ud="cartoPropertiesTile",Vb={cartoPropertiesTile:{workerUrl:Lt(Ud,zd)}},$b={name:"CARTO Properties Tile",version:zd,id:Ud,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-properties-tile"],category:"geometry",worker:!0,parse:async(e,t)=>Nd(e,t),parseSync:Nd,options:Vb};function Nd(e,t){return e?Ut(e,jr):null}var qd=$b;var Wd=G(Zd(),1);var Yd="9.3.0",Kd="cartoVectorTile",ay={cartoVectorTile:{workerUrl:Lt(Kd,Yd)}},sy={name:"CARTO Vector Tile",version:Yd,id:Kd,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-vector-tile"],category:"geometry",parse:async(e,t)=>jd(e,t),parseSync:jd,worker:!0,options:ay};function fy(e,t,{startPosition:r,endPosition:n,indices:i}){let o=e.positions.size,a=r*o,s=n*o,l=e.positions.value.subarray(a,s),f=i.slice(1).map(u=>u-r),c=(0,Wd.default)(l,f,o);for(let u=0,d=c.length;u<d;++u)t.push(r+c[u])}function ly(e){let{polygonIndices:t,primitivePolygonIndices:r}=e,n=[],i=0;for(let o=0;o<t.value.length-1;o++){let a=t.value[o],s=t.value[o+1],l=r.value.indexOf(s),f=r.value.subarray(i,l);i=l,fy(e,n,{startPosition:a,endPosition:s,indices:f})}e.triangles={value:new Uint32Array(n),size:1}}function jd(e,t){if(!e)return null;let r=Ut(e,Gr);return r.polygons&&!r.polygons.triangles&&ly(r.polygons),r}var Xd=sy;var Do=G(Jd(),1),Yr=G(pt(),1),ih=G(kt(),1);function eh(e,t){let r=t?t in e.numericProps:!1,n=new Map;for(let c=0;c<e.pathIndices.value.length-1;c++){let u=e.pathIndices.value[c],d=e.featureIds.value[u],h;t===void 0?h=d:r?h=e.numericProps[t].value[u]:e.properties[d]&&t in e.properties[d]?h=e.properties[d][t]:h=void 0;let g=gy(e,c);(!n.has(h)||g>n.get(h).length)&&n.set(h,{index:c,length:g})}let i=[],o=[],a=[],s=[],l=ja(n.size,e.numericProps),f=0;for(let[c,{index:u}]of n){let d=my(e,u);i.push(...d);let h=e.pathIndices.value[u],g=e.featureIds.value[h];a.push(f),o.push(e.properties[g]),s.push(e.globalFeatureIds.value[h]),Wa(e.numericProps,l,h,f),f++}return yn(i,a,s,l,o)}function th(e,t,r){let{west:n,south:i,east:o,north:a}=t,l=(o-n)*(a-i)*1e-4,f=[],c=[],u=[],d=[],h=ja(e.polygonIndices.value.length-1,e.numericProps),g=0,x=0,{extruded:T}=r;for(let _=0;_<e.polygonIndices.value.length-1;_++){let w=e.polygonIndices.value[_],k=e.polygonIndices.value[_+1];if(cy(e,_)<l)continue;let M=hy(e,_),I=-1,R=[0,0],N=!1;for(;x<e.triangles.value.length;){let m=e.triangles.value[x];if(m>=k)break;if(N){x+=3;continue}let b=e.triangles.value[x+1],y=e.triangles.value[x+2],v=e.positions.value.subarray(m*e.positions.size,m*e.positions.size+e.positions.size),S=e.positions.value.subarray(b*e.positions.size,b*e.positions.size+e.positions.size),P=e.positions.value.subarray(y*e.positions.size,y*e.positions.size+e.positions.size);if(dy(M,v,S,P))N=!0;else{let E=rh(v,S,P);E>I&&(I=E,R=[(v[0]+S[0]+P[0])/3,(v[1]+S[1]+P[1])/3])}x+=3}let p=N?M:R;if(uy(p,t)){f.push(...p);let m=e.featureIds.value[w];if(T){let b=r.getElevation(void 0,{data:e,index:m});f.push(b*r.elevationScale)}c.push(e.properties[m]),u.push(g),d.push(e.globalFeatureIds.value[w]),Wa(e.numericProps,h,w,g),g++}}return e.numericProps&&Object.keys(h).forEach(_=>{h[_].value=h[_].value.slice(0,g)}),yn(f,u,d,h,c,T?3:2)}function cy(e,t){let{positions:{value:r,size:n},polygonIndices:{value:i},triangles:{value:o}}=e,a=i[t],s=i[t+1],l=0,f=0;for(;f<o.length&&!(o[f]>=a);)f+=3;for(;f<o.length;){let c=o[f];if(c>=s)break;let u=o[f+1],d=o[f+2],h=r.subarray(c*n,c*n+n),g=r.subarray(u*n,u*n+n),x=r.subarray(d*n,d*n+n);l+=rh(h,g,x),f+=3}return l}function uy([e,t],{west:r,east:n,south:i,north:o}){return e>=r&&e<n&&t>=i&&t<o}function dy(e,t,r,n){let i=Math.abs((r[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(r[1]-t[1]))/2,o=Math.abs((t[0]-e[0])*(r[1]-e[1])-(r[0]-e[0])*(t[1]-e[1]))/2,a=Math.abs((r[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(r[1]-e[1]))/2,s=Math.abs((n[0]-e[0])*(t[1]-e[1])-(t[0]-e[0])*(n[1]-e[1]))/2;return Math.abs(i-(o+a+s))<1e-10}function rh([e,t],[r,n],[i,o]){return Math.abs((e*(n-o)+r*(o-t)+i*(t-n))/2)}function hy(e,t){let{positions:{value:r,size:n}}=e,i=n*e.polygonIndices.value[t],o=n*e.polygonIndices.value[t+1],a=1/0,s=1/0,l=-1/0,f=-1/0;for(let c=i;c<o;c+=n){let[u,d]=r.subarray(c,c+2);a=Math.min(a,u),s=Math.min(s,d),l=Math.max(l,u),f=Math.max(f,d)}return[(a+l)/2,(s+f)/2]}function py(e,t){let{positions:{value:r}}=e,[n,i,o,a]=r.subarray(t,t+4);return Math.sqrt(Math.pow(o-n,2)+Math.pow(a-i,2))}function gy(e,t){let{positions:{size:r}}=e,n=r*e.pathIndices.value[t],i=r*e.pathIndices.value[t+1],o=0;for(let a=n;a<i;a+=r)o+=py(e,a);return o}function my(e,t){let{positions:{value:r},pathIndices:{value:n}}=e,i=n[t]*2,a=(n[t+1]*2-i)/2;if(a===2){let[l,f,c,u]=r.subarray(i,i+4);return[(l+c)/2,(f+u)/2]}let s=i+Math.floor(a/2)*2;return[r[s],r[s+1]]}(0,nh.registerLoaders)([qd,Xd]);var by={west:0,east:1,south:0,north:1},yy={...Yr.MVTLayer.defaultProps,autoLabels:!1,data:Ce,dataComparator:Ce.equal,tileSize:512},ui=class extends Yr.MVTLayer{constructor(...t){super(...t)}initializeState(){super.initializeState(),this.setState({binary:!0})}updateState(t){let{props:r}=t;if(r.data){super.updateState(t);let i=new URL(r.data.tiles[0]).searchParams.get("formatTiles")==="mvt";this.setState({mvt:i})}}getLoadOptions(){let t=this.props.data;return He(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},gis:{format:"binary"}})}async getTileData(t){let r=this.props.data,{tiles:n,properties_tiles:i}=r,o=(0,Yr._getURLFromTemplate)(n,t);if(!o)return Promise.reject("Invalid URL");let a=this.getLoadOptions(),{fetch:s}=this.props,{signal:l}=t,f=s(o,{propName:"data",layer:this,loadOptions:a,signal:l});if(!i)return await f;let c=(0,Yr._getURLFromTemplate)(i,t);if(!c)return Promise.reject("Invalid properties URL");let u=s(c,{propName:"data",layer:this,loadOptions:a,signal:l}),[d,h]=await Promise.all([f,u]);return d?h?cd(d,h):d:null}renderSubLayers(t){if(t.data===null)return null;let r=t.tile.bbox,n=[],i={"points-text":{type:ni,...t?._subLayerProps?.["points-text"],extensions:[new Do.CollisionFilterExtension,...t.extensions||[],...t?._subLayerProps?.["points-text"]?.extensions||[]]}};if(this.state.mvt){let o={...t,_subLayerProps:{...t._subLayerProps,...i}};n.push(super.renderSubLayers(o))}else{let{west:o,south:a,east:s,north:l}=r,f=[new Do.ClipExtension,...t.extensions||[]],c={clipBounds:[o,a,s,l]},u=h=>({[h]:{...c,...t?._subLayerProps?.[h],extensions:[...f,...t?._subLayerProps?.[h]?.extensions||[]]}}),d={...t,data:{...t.data,tileBbox:r},autoHighlight:!1,_subLayerProps:{...t._subLayerProps,...i,...u("polygons-fill"),...u("polygons-stroke"),...u("linestrings")}};n.push(new ih.GeoJsonLayer(d))}if(n[0]&&t.autoLabels){let o=Wi();t.data.lines&&t.data.lines.positions.value.length>0&&(o.points=eh(t.data.lines,typeof t.autoLabels=="object"?t.autoLabels.uniqueIdProperty:void 0)),t.data.polygons&&t.data.polygons.positions.value.length>0&&(o.points=th(t.data.polygons,this.state.mvt?by:r,t)),n.push(n[0].clone({id:`${t.id}-labels`,data:o,pickable:!1,autoHighlight:!1}))}return n}renderLayers(){let t=super.renderLayers();if(!this.props.autoLabels)return t;let r=(t||[]).flat().filter(Boolean);return r.sort((n,i)=>{let o=n.id.includes("labels"),a=i.id.includes("labels");return o&&!a?1:!o&&a?-1:0}),r.map(n=>n.id.includes("labels")?n.clone({highlightedObjectIndex:-1}):n)}_isWGS84(){return this.state.mvt?super._isWGS84():!0}};ui.layerName="VectorTileLayer";ui.defaultProps=yy;var Kr=ui;var Df=G(Kt(),1);var mp=G(Kt(),1);var Gs=class{add(t,r,n){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(i){this[i]=this[i]||[],r&&this[i][n?"unshift":"push"](r)},this)}run(t,r){this[t]=this[t]||[],this[t].forEach(function(n){n.call(r&&r.context?r.context:r,r)})}},Vs=class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(r=>{if(typeof r!="object"||!r.name||!r.init)throw new Error("Invalid JSEP plugin format");this.registered[r.name]||(r.init(this.jsep),this.registered[r.name]=r)})}},L=class{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+L.version}static addUnaryOp(t){return L.max_unop_len=Math.max(t.length,L.max_unop_len),L.unary_ops[t]=1,L}static addBinaryOp(t,r,n){return L.max_binop_len=Math.max(t.length,L.max_binop_len),L.binary_ops[t]=r,n?L.right_associative.add(t):L.right_associative.delete(t),L}static addIdentifierChar(t){return L.additional_identifier_chars.add(t),L}static addLiteral(t,r){return L.literals[t]=r,L}static removeUnaryOp(t){return delete L.unary_ops[t],t.length===L.max_unop_len&&(L.max_unop_len=L.getMaxKeyLen(L.unary_ops)),L}static removeAllUnaryOps(){return L.unary_ops={},L.max_unop_len=0,L}static removeIdentifierChar(t){return L.additional_identifier_chars.delete(t),L}static removeBinaryOp(t){return delete L.binary_ops[t],t.length===L.max_binop_len&&(L.max_binop_len=L.getMaxKeyLen(L.binary_ops)),L.right_associative.delete(t),L}static removeAllBinaryOps(){return L.binary_ops={},L.max_binop_len=0,L}static removeLiteral(t){return delete L.literals[t],L}static removeAllLiterals(){return L.literals={},L}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new L(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(r=>r.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return L.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!L.binary_ops[String.fromCharCode(t)]||L.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return L.isIdentifierStart(t)||L.isDecimalDigit(t)}throwError(t){let r=new Error(t+" at character "+this.index);throw r.index=this.index,r.description=t,r}runHook(t,r){if(L.hooks[t]){let n={context:this,node:r};return L.hooks.run(t,n),n.node}return r}searchHook(t){if(L.hooks[t]){let r={context:this};return L.hooks[t].find(function(n){return n.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let t=this.code;for(;t===L.SPACE_CODE||t===L.TAB_CODE||t===L.LF_CODE||t===L.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let t=this.gobbleExpressions(),r=t.length===1?t[0]:{type:L.COMPOUND,body:t};return this.runHook("after-all",r)}gobbleExpressions(t){let r=[],n,i;for(;this.index<this.expr.length;)if(n=this.code,n===L.SEMCOL_CODE||n===L.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())r.push(i);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){let t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,L.max_binop_len),r=t.length;for(;r>0;){if(L.binary_ops.hasOwnProperty(t)&&(!L.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!L.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=r,t;t=t.substr(0,--r)}return!1}gobbleBinaryExpression(){let t,r,n,i,o,a,s,l,f;if(a=this.gobbleToken(),!a||(r=this.gobbleBinaryOp(),!r))return a;for(o={value:r,prec:L.binaryPrecedence(r),right_a:L.right_associative.has(r)},s=this.gobbleToken(),s||this.throwError("Expected expression after "+r),i=[a,o,s];r=this.gobbleBinaryOp();){if(n=L.binaryPrecedence(r),n===0){this.index-=r.length;break}o={value:r,prec:n,right_a:L.right_associative.has(r)},f=r;let c=u=>o.right_a&&u.right_a?n>u.prec:n<=u.prec;for(;i.length>2&&c(i[i.length-2]);)s=i.pop(),r=i.pop().value,a=i.pop(),t={type:L.BINARY_EXP,operator:r,left:a,right:s},i.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+f),i.push(o,t)}for(l=i.length-1,t=i[l];l>1;)t={type:L.BINARY_EXP,operator:i[l-1].value,left:i[l-2],right:t},l-=2;return t}gobbleToken(){let t,r,n,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(t=this.code,L.isDecimalDigit(t)||t===L.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===L.SQUOTE_CODE||t===L.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===L.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,L.max_unop_len),n=r.length;n>0;){if(L.unary_ops.hasOwnProperty(r)&&(!L.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!L.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=n;let o=this.gobbleToken();return o||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:L.UNARY_EXP,operator:r,argument:o,prefix:!0})}r=r.substr(0,--n)}L.isIdentifierStart(t)?(i=this.gobbleIdentifier(),L.literals.hasOwnProperty(i.name)?i={type:L.LITERAL,value:L.literals[i.name],raw:i.name}:i.name===L.this_str&&(i={type:L.THIS_EXP})):t===L.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let r=this.code;for(;r===L.PERIOD_CODE||r===L.OBRACK_CODE||r===L.OPAREN_CODE||r===L.QUMARK_CODE;){let n;if(r===L.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==L.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===L.OBRACK_CODE?(t={type:L.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==L.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===L.OPAREN_CODE?t={type:L.CALL_EXP,arguments:this.gobbleArguments(L.CPAREN_CODE),callee:t}:(r===L.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),t={type:L.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),n&&(t.optional=!0),this.gobbleSpaces(),r=this.code}return t}gobbleNumericLiteral(){let t="",r,n;for(;L.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===L.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);L.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(t+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(t+=this.expr.charAt(this.index++));L.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);L.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return n=this.code,L.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(n===L.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===L.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:L.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="",r=this.index,n=this.expr.charAt(this.index++),i=!1;for(;this.index<this.expr.length;){let o=this.expr.charAt(this.index++);if(o===n){i=!0;break}else if(o==="\\")switch(o=this.expr.charAt(this.index++),o){case"n":t+=`
|
|
169
|
+
`;var Rb={...Ds.ColumnLayer.defaultProps,extruded:!1,diskResolution:4,vertices:[[-.5,-.5],[.5,-.5],[.5,.5],[-.5,.5]]},ko=class extends _o(Ds.ColumnLayer){getShaders(){let t=super.getShaders(),r=this.props.data,n=r.data.blockSize??Math.sqrt(r.length);return{...t,defines:{...t.defines,BLOCK_WIDTH:n},vs:Fd}}initializeState(){this.getAttributeManager().addInstanced({instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getLineColor",defaultValue:[255,255,255,255]}})}};ko.layerName="RasterColumnLayer";function Db(e,t){return e.data===t.data&&e.length===t.length}var ii=class extends kd.CompositeLayer{renderLayers(){let{data:t,getElevation:r,getFillColor:n,getLineColor:i,getLineWidth:o,tileIndex:a,updateTriggers:s}=this.props;if(!t||!a||t.length===0)return null;let l=t.blockSize??0,[f,c,u]=Ya(a),d=[f,c],h=u/l,g=this.getSubLayerClass("column",ko),{highlightedObjectIndex:x,highlightColor:T}=this.state;return new g(this.props,this.getSubLayerProps({id:"cell",updateTriggers:s,getElevation:this.getSubLayerAccessor(r),getFillColor:this.getSubLayerAccessor(n),getLineColor:this.getSubLayerAccessor(i),getLineWidth:this.getSubLayerAccessor(o)}),{data:{data:t,length:l*l},dataComparator:Db,offset:d,lineWidthScale:h,highlightedObjectIndex:x,highlightColor:T})}getSubLayerAccessor(t){return typeof t!="function"?super.getSubLayerAccessor(t):(r,n)=>{let{data:i,index:o}=n,a=i.data,s=$l(a.cells,o);return t({properties:s},n)}}getPickingInfo(t){let r=super.getPickingInfo(t);return r.index!==-1&&(r.object=this.getSubLayerAccessor(n=>n)(void 0,{data:this.props,index:r.index})),r}_updateAutoHighlight(t){let{highlightedObjectIndex:r}=this.state,n=-1;if(t.index!==-1&&(n=t.index),r!==n){let{highlightColor:i}=this.props;typeof i=="function"&&(i=i(t)),this.setState({highlightColor:i,highlightedObjectIndex:n})}}};ii.layerName="RasterLayer";ii.defaultProps=Rb;var Lo=ii;var Rd=G(pt(),1);var Dd=G(pn(),1);var Nb={uint8:Uint8Array,uint16:Uint16Array,uint32:Uint32Array,uint64:BigUint64Array,int8:Int8Array,int16:Int16Array,int32:Int32Array,int64:BigInt64Array,float32:Float32Array,float64:Float64Array},oi=class{static read(t,r){return t.readFields(oi._readField,{name:"",type:"",data:null},r)}static _readField(t,r,n){if(t===1)r.name=n.readString();else if(t===2)r.type=n.readString();else if(t===3){let i=Nb[r.type];if(!i)throw Error(`Invalid data type: ${r.type}`);r.data={};let{compression:o}=qt;ar(i,n,r.data,{compression:o})}}},qt=class{static read(t,r){return t.readFields(qt._readField,{blockSize:0,bands:[]},r)}static _readField(t,r,n){t===1?r.blockSize=n.readVarint():t===2&&r.bands.push(oi.read(n,n.readVarint()+n.pos))}};var Md="9.3.2",Id="cartoRasterTile",zb={cartoRasterTile:{metadata:null,workerUrl:Lt(Id,Md)}},Ub={name:"CARTO Raster Tile",version:Md,id:Id,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-raster-tile"],category:"geometry",parse:async(e,t)=>Ld(e,t),parseSync:Ld,worker:!0,options:zb};function Ld(e,t){let r=t?.cartoRasterTile?.metadata;if(!e||!r)return null;qt.compression=r.compression;let n=Ut(e,qt),{bands:i,blockSize:o}=n,a={};for(let s=0;s<i.length;s++){let{name:l,data:f}=i[s];a[l]=f}return{blockSize:o,cells:{numericProps:a,properties:[]}}}var Bd=Ub;(0,Dd.registerLoaders)([Bd]);var qb=e=>{let t=e.tile?.index?.q;return t?new Lo(e,{tileIndex:t}):null},Gb={data:Ce,refinementStrategy:"no-overlap",tileSize:512},Mo=class extends Kn(Rd.TileLayer,xd){filterSubLayer(t){let{tile:r}=t.layer.props;return r?super.filterSubLayer(t):!0}};Mo.layerName="PostProcessTileLayer";var ai=class extends Od.CompositeLayer{getLoadOptions(){let t=this.props.data;return He(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r,minzoom:n,maxzoom:i,raster_metadata:o}=t,a=this.getSubLayerClass("tile",Mo),s=this.getLoadOptions();return new a(this.props,{id:`raster-tile-layer-${this.props.id}`,data:r,TilesetClass:et,renderSubLayers:qb,minZoom:n,maxZoom:i,loadOptions:{...s,cartoRasterTile:{...s?.cartoRasterTile,metadata:o}}})}};ai.layerName="RasterTileLayer";ai.defaultProps=Gb;var si=ai;var nh=G(pn(),1);var jr=class{static read(t,r){return t.readFields(jr._readField,{properties:[],numericProps:{}},r)}static _readField(t,r,n){if(t===1)r.properties.push(Ve.read(n,n.readVarint()+n.pos));else if(t===2){let i=$e.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}}};var zd="9.3.2",Ud="cartoPropertiesTile",Vb={cartoPropertiesTile:{workerUrl:Lt(Ud,zd)}},$b={name:"CARTO Properties Tile",version:zd,id:Ud,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-properties-tile"],category:"geometry",worker:!0,parse:async(e,t)=>Nd(e,t),parseSync:Nd,options:Vb};function Nd(e,t){return e?Ut(e,jr):null}var qd=$b;var Wd=G(Zd(),1);var Yd="9.3.2",Kd="cartoVectorTile",ay={cartoVectorTile:{workerUrl:Lt(Kd,Yd)}},sy={name:"CARTO Vector Tile",version:Yd,id:Kd,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-vector-tile"],category:"geometry",parse:async(e,t)=>jd(e,t),parseSync:jd,worker:!0,options:ay};function fy(e,t,{startPosition:r,endPosition:n,indices:i}){let o=e.positions.size,a=r*o,s=n*o,l=e.positions.value.subarray(a,s),f=i.slice(1).map(u=>u-r),c=(0,Wd.default)(l,f,o);for(let u=0,d=c.length;u<d;++u)t.push(r+c[u])}function ly(e){let{polygonIndices:t,primitivePolygonIndices:r}=e,n=[],i=0;for(let o=0;o<t.value.length-1;o++){let a=t.value[o],s=t.value[o+1],l=r.value.indexOf(s),f=r.value.subarray(i,l);i=l,fy(e,n,{startPosition:a,endPosition:s,indices:f})}e.triangles={value:new Uint32Array(n),size:1}}function jd(e,t){if(!e)return null;let r=Ut(e,Gr);return r.polygons&&!r.polygons.triangles&&ly(r.polygons),r}var Xd=sy;var Do=G(Jd(),1),Yr=G(pt(),1),ih=G(kt(),1);function eh(e,t){let r=t?t in e.numericProps:!1,n=new Map;for(let c=0;c<e.pathIndices.value.length-1;c++){let u=e.pathIndices.value[c],d=e.featureIds.value[u],h;t===void 0?h=d:r?h=e.numericProps[t].value[u]:e.properties[d]&&t in e.properties[d]?h=e.properties[d][t]:h=void 0;let g=gy(e,c);(!n.has(h)||g>n.get(h).length)&&n.set(h,{index:c,length:g})}let i=[],o=[],a=[],s=[],l=ja(n.size,e.numericProps),f=0;for(let[c,{index:u}]of n){let d=my(e,u);i.push(...d);let h=e.pathIndices.value[u],g=e.featureIds.value[h];a.push(f),o.push(e.properties[g]),s.push(e.globalFeatureIds.value[h]),Wa(e.numericProps,l,h,f),f++}return yn(i,a,s,l,o)}function th(e,t,r){let{west:n,south:i,east:o,north:a}=t,l=(o-n)*(a-i)*1e-4,f=[],c=[],u=[],d=[],h=ja(e.polygonIndices.value.length-1,e.numericProps),g=0,x=0,{extruded:T}=r;for(let _=0;_<e.polygonIndices.value.length-1;_++){let w=e.polygonIndices.value[_],k=e.polygonIndices.value[_+1];if(cy(e,_)<l)continue;let M=hy(e,_),I=-1,R=[0,0],N=!1;for(;x<e.triangles.value.length;){let m=e.triangles.value[x];if(m>=k)break;if(N){x+=3;continue}let b=e.triangles.value[x+1],y=e.triangles.value[x+2],v=e.positions.value.subarray(m*e.positions.size,m*e.positions.size+e.positions.size),S=e.positions.value.subarray(b*e.positions.size,b*e.positions.size+e.positions.size),P=e.positions.value.subarray(y*e.positions.size,y*e.positions.size+e.positions.size);if(dy(M,v,S,P))N=!0;else{let E=rh(v,S,P);E>I&&(I=E,R=[(v[0]+S[0]+P[0])/3,(v[1]+S[1]+P[1])/3])}x+=3}let p=N?M:R;if(uy(p,t)){f.push(...p);let m=e.featureIds.value[w];if(T){let b=r.getElevation(void 0,{data:e,index:m});f.push(b*r.elevationScale)}c.push(e.properties[m]),u.push(g),d.push(e.globalFeatureIds.value[w]),Wa(e.numericProps,h,w,g),g++}}return e.numericProps&&Object.keys(h).forEach(_=>{h[_].value=h[_].value.slice(0,g)}),yn(f,u,d,h,c,T?3:2)}function cy(e,t){let{positions:{value:r,size:n},polygonIndices:{value:i},triangles:{value:o}}=e,a=i[t],s=i[t+1],l=0,f=0;for(;f<o.length&&!(o[f]>=a);)f+=3;for(;f<o.length;){let c=o[f];if(c>=s)break;let u=o[f+1],d=o[f+2],h=r.subarray(c*n,c*n+n),g=r.subarray(u*n,u*n+n),x=r.subarray(d*n,d*n+n);l+=rh(h,g,x),f+=3}return l}function uy([e,t],{west:r,east:n,south:i,north:o}){return e>=r&&e<n&&t>=i&&t<o}function dy(e,t,r,n){let i=Math.abs((r[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(r[1]-t[1]))/2,o=Math.abs((t[0]-e[0])*(r[1]-e[1])-(r[0]-e[0])*(t[1]-e[1]))/2,a=Math.abs((r[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(r[1]-e[1]))/2,s=Math.abs((n[0]-e[0])*(t[1]-e[1])-(t[0]-e[0])*(n[1]-e[1]))/2;return Math.abs(i-(o+a+s))<1e-10}function rh([e,t],[r,n],[i,o]){return Math.abs((e*(n-o)+r*(o-t)+i*(t-n))/2)}function hy(e,t){let{positions:{value:r,size:n}}=e,i=n*e.polygonIndices.value[t],o=n*e.polygonIndices.value[t+1],a=1/0,s=1/0,l=-1/0,f=-1/0;for(let c=i;c<o;c+=n){let[u,d]=r.subarray(c,c+2);a=Math.min(a,u),s=Math.min(s,d),l=Math.max(l,u),f=Math.max(f,d)}return[(a+l)/2,(s+f)/2]}function py(e,t){let{positions:{value:r}}=e,[n,i,o,a]=r.subarray(t,t+4);return Math.sqrt(Math.pow(o-n,2)+Math.pow(a-i,2))}function gy(e,t){let{positions:{size:r}}=e,n=r*e.pathIndices.value[t],i=r*e.pathIndices.value[t+1],o=0;for(let a=n;a<i;a+=r)o+=py(e,a);return o}function my(e,t){let{positions:{value:r},pathIndices:{value:n}}=e,i=n[t]*2,a=(n[t+1]*2-i)/2;if(a===2){let[l,f,c,u]=r.subarray(i,i+4);return[(l+c)/2,(f+u)/2]}let s=i+Math.floor(a/2)*2;return[r[s],r[s+1]]}(0,nh.registerLoaders)([qd,Xd]);var by={west:0,east:1,south:0,north:1},yy={...Yr.MVTLayer.defaultProps,autoLabels:!1,data:Ce,dataComparator:Ce.equal,tileSize:512},ui=class extends Yr.MVTLayer{constructor(...t){super(...t)}initializeState(){super.initializeState(),this.setState({binary:!0})}updateState(t){let{props:r}=t;if(r.data){super.updateState(t);let i=new URL(r.data.tiles[0]).searchParams.get("formatTiles")==="mvt";this.setState({mvt:i})}}getLoadOptions(){let t=this.props.data;return He(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},gis:{format:"binary"}})}async getTileData(t){let r=this.props.data,{tiles:n,properties_tiles:i}=r,o=(0,Yr._getURLFromTemplate)(n,t);if(!o)return Promise.reject("Invalid URL");let a=this.getLoadOptions(),{fetch:s}=this.props,{signal:l}=t,f=s(o,{propName:"data",layer:this,loadOptions:a,signal:l});if(!i)return await f;let c=(0,Yr._getURLFromTemplate)(i,t);if(!c)return Promise.reject("Invalid properties URL");let u=s(c,{propName:"data",layer:this,loadOptions:a,signal:l}),[d,h]=await Promise.all([f,u]);return d?h?cd(d,h):d:null}renderSubLayers(t){if(t.data===null)return null;let r=t.tile.bbox,n=[],i={"points-text":{type:ni,...t?._subLayerProps?.["points-text"],extensions:[new Do.CollisionFilterExtension,...t.extensions||[],...t?._subLayerProps?.["points-text"]?.extensions||[]]}};if(this.state.mvt){let o={...t,_subLayerProps:{...t._subLayerProps,...i}};n.push(super.renderSubLayers(o))}else{let{west:o,south:a,east:s,north:l}=r,f=[new Do.ClipExtension,...t.extensions||[]],c={clipBounds:[o,a,s,l]},u=h=>({[h]:{...c,...t?._subLayerProps?.[h],extensions:[...f,...t?._subLayerProps?.[h]?.extensions||[]]}}),d={...t,data:{...t.data,tileBbox:r},autoHighlight:!1,_subLayerProps:{...t._subLayerProps,...i,...u("polygons-fill"),...u("polygons-stroke"),...u("linestrings")}};n.push(new ih.GeoJsonLayer(d))}if(n[0]&&t.autoLabels){let o=Wi();t.data.lines&&t.data.lines.positions.value.length>0&&(o.points=eh(t.data.lines,typeof t.autoLabels=="object"?t.autoLabels.uniqueIdProperty:void 0)),t.data.polygons&&t.data.polygons.positions.value.length>0&&(o.points=th(t.data.polygons,this.state.mvt?by:r,t)),n.push(n[0].clone({id:`${t.id}-labels`,data:o,pickable:!1,autoHighlight:!1}))}return n}renderLayers(){let t=super.renderLayers();if(!this.props.autoLabels)return t;let r=(t||[]).flat().filter(Boolean);return r.sort((n,i)=>{let o=n.id.includes("labels"),a=i.id.includes("labels");return o&&!a?1:!o&&a?-1:0}),r.map(n=>n.id.includes("labels")?n.clone({highlightedObjectIndex:-1}):n)}_isWGS84(){return this.state.mvt?super._isWGS84():!0}};ui.layerName="VectorTileLayer";ui.defaultProps=yy;var Kr=ui;var Df=G(Kt(),1);var mp=G(Kt(),1);var Gs=class{add(t,r,n){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(i){this[i]=this[i]||[],r&&this[i][n?"unshift":"push"](r)},this)}run(t,r){this[t]=this[t]||[],this[t].forEach(function(n){n.call(r&&r.context?r.context:r,r)})}},Vs=class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(r=>{if(typeof r!="object"||!r.name||!r.init)throw new Error("Invalid JSEP plugin format");this.registered[r.name]||(r.init(this.jsep),this.registered[r.name]=r)})}},L=class{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+L.version}static addUnaryOp(t){return L.max_unop_len=Math.max(t.length,L.max_unop_len),L.unary_ops[t]=1,L}static addBinaryOp(t,r,n){return L.max_binop_len=Math.max(t.length,L.max_binop_len),L.binary_ops[t]=r,n?L.right_associative.add(t):L.right_associative.delete(t),L}static addIdentifierChar(t){return L.additional_identifier_chars.add(t),L}static addLiteral(t,r){return L.literals[t]=r,L}static removeUnaryOp(t){return delete L.unary_ops[t],t.length===L.max_unop_len&&(L.max_unop_len=L.getMaxKeyLen(L.unary_ops)),L}static removeAllUnaryOps(){return L.unary_ops={},L.max_unop_len=0,L}static removeIdentifierChar(t){return L.additional_identifier_chars.delete(t),L}static removeBinaryOp(t){return delete L.binary_ops[t],t.length===L.max_binop_len&&(L.max_binop_len=L.getMaxKeyLen(L.binary_ops)),L.right_associative.delete(t),L}static removeAllBinaryOps(){return L.binary_ops={},L.max_binop_len=0,L}static removeLiteral(t){return delete L.literals[t],L}static removeAllLiterals(){return L.literals={},L}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new L(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(r=>r.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return L.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!L.binary_ops[String.fromCharCode(t)]||L.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return L.isIdentifierStart(t)||L.isDecimalDigit(t)}throwError(t){let r=new Error(t+" at character "+this.index);throw r.index=this.index,r.description=t,r}runHook(t,r){if(L.hooks[t]){let n={context:this,node:r};return L.hooks.run(t,n),n.node}return r}searchHook(t){if(L.hooks[t]){let r={context:this};return L.hooks[t].find(function(n){return n.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let t=this.code;for(;t===L.SPACE_CODE||t===L.TAB_CODE||t===L.LF_CODE||t===L.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let t=this.gobbleExpressions(),r=t.length===1?t[0]:{type:L.COMPOUND,body:t};return this.runHook("after-all",r)}gobbleExpressions(t){let r=[],n,i;for(;this.index<this.expr.length;)if(n=this.code,n===L.SEMCOL_CODE||n===L.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())r.push(i);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){let t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,L.max_binop_len),r=t.length;for(;r>0;){if(L.binary_ops.hasOwnProperty(t)&&(!L.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!L.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=r,t;t=t.substr(0,--r)}return!1}gobbleBinaryExpression(){let t,r,n,i,o,a,s,l,f;if(a=this.gobbleToken(),!a||(r=this.gobbleBinaryOp(),!r))return a;for(o={value:r,prec:L.binaryPrecedence(r),right_a:L.right_associative.has(r)},s=this.gobbleToken(),s||this.throwError("Expected expression after "+r),i=[a,o,s];r=this.gobbleBinaryOp();){if(n=L.binaryPrecedence(r),n===0){this.index-=r.length;break}o={value:r,prec:n,right_a:L.right_associative.has(r)},f=r;let c=u=>o.right_a&&u.right_a?n>u.prec:n<=u.prec;for(;i.length>2&&c(i[i.length-2]);)s=i.pop(),r=i.pop().value,a=i.pop(),t={type:L.BINARY_EXP,operator:r,left:a,right:s},i.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+f),i.push(o,t)}for(l=i.length-1,t=i[l];l>1;)t={type:L.BINARY_EXP,operator:i[l-1].value,left:i[l-2],right:t},l-=2;return t}gobbleToken(){let t,r,n,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(t=this.code,L.isDecimalDigit(t)||t===L.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===L.SQUOTE_CODE||t===L.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===L.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,L.max_unop_len),n=r.length;n>0;){if(L.unary_ops.hasOwnProperty(r)&&(!L.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!L.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=n;let o=this.gobbleToken();return o||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:L.UNARY_EXP,operator:r,argument:o,prefix:!0})}r=r.substr(0,--n)}L.isIdentifierStart(t)?(i=this.gobbleIdentifier(),L.literals.hasOwnProperty(i.name)?i={type:L.LITERAL,value:L.literals[i.name],raw:i.name}:i.name===L.this_str&&(i={type:L.THIS_EXP})):t===L.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let r=this.code;for(;r===L.PERIOD_CODE||r===L.OBRACK_CODE||r===L.OPAREN_CODE||r===L.QUMARK_CODE;){let n;if(r===L.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==L.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===L.OBRACK_CODE?(t={type:L.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==L.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===L.OPAREN_CODE?t={type:L.CALL_EXP,arguments:this.gobbleArguments(L.CPAREN_CODE),callee:t}:(r===L.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),t={type:L.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),n&&(t.optional=!0),this.gobbleSpaces(),r=this.code}return t}gobbleNumericLiteral(){let t="",r,n;for(;L.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===L.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);L.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(t+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(t+=this.expr.charAt(this.index++));L.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);L.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return n=this.code,L.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(n===L.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===L.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:L.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="",r=this.index,n=this.expr.charAt(this.index++),i=!1;for(;this.index<this.expr.length;){let o=this.expr.charAt(this.index++);if(o===n){i=!0;break}else if(o==="\\")switch(o=this.expr.charAt(this.index++),o){case"n":t+=`
|
|
170
170
|
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=o}else t+=o}return i||this.throwError('Unclosed quote after "'+t+'"'),{type:L.LITERAL,value:t,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let t=this.code,r=this.index;for(L.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,L.isIdentifierPart(t));)this.index++;return{type:L.IDENTIFIER,name:this.expr.slice(r,this.index)}}gobbleArguments(t){let r=[],n=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===t){n=!0,this.index++,t===L.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(o===L.COMMA_CODE){if(this.index++,i++,i!==r.length){if(t===L.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===L.CBRACK_CODE)for(let a=r.length;a<i;a++)r.push(null)}}else if(r.length!==i&&i!==0)this.throwError("Expected comma");else{let a=this.gobbleExpression();(!a||a.type===L.COMPOUND)&&this.throwError("Expected comma"),r.push(a)}}return n||this.throwError("Expected "+String.fromCharCode(t)),r}gobbleGroup(){this.index++;let t=this.gobbleExpressions(L.CPAREN_CODE);if(this.code===L.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:L.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:L.ARRAY_EXP,elements:this.gobbleArguments(L.CBRACK_CODE)}}},xy=new Gs;Object.assign(L,{hooks:xy,plugins:new Vs(L),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});L.max_unop_len=L.getMaxKeyLen(L.unary_ops);L.max_binop_len=L.getMaxKeyLen(L.binary_ops);var Xr=e=>new L(e).parse(),vy=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(L).filter(e=>!vy.includes(e)&&Xr[e]===void 0).forEach(e=>{Xr[e]=L[e]});Xr.Jsep=L;var wy="ConditionalExpression",_y={name:"ternary",init(e){e.hooks.add("after-expression",function(r){if(r.node&&this.code===e.QUMARK_CODE){this.index++;let n=r.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),r.node={type:wy,test:n,consequent:i,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){let a=n;for(;a.right.operator&&e.binary_ops[a.right.operator]<=.9;)a=a.right;r.node.test=a.right,a.right=r.node,r.node=n}}else this.throwError("Expected :")}})}};Xr.plugins.register(_y);function st(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function $s(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function No(e){let t,r,n;e.length!==2?(t=st,r=(s,l)=>st(e(s),l),n=(s,l)=>e(s)-l):(t=e===st||e===$s?e:Ey,r=e,n=e);function i(s,l,f=0,c=s.length){if(f<c){if(t(l,l)!==0)return c;do{let u=f+c>>>1;r(s[u],l)<0?f=u+1:c=u}while(f<c)}return f}function o(s,l,f=0,c=s.length){if(f<c){if(t(l,l)!==0)return c;do{let u=f+c>>>1;r(s[u],l)<=0?f=u+1:c=u}while(f<c)}return f}function a(s,l,f=0,c=s.length){let u=i(s,l,f,c-1);return u>f&&n(s[u-1],l)>-n(s[u],l)?u-1:u}return{left:i,center:a,right:o}}function Ey(){return 0}function di(e){return e===null?NaN:+e}var oh=No(st),ah=oh.right,Sy=oh.left,Ty=No(di).center,_t=ah;var Qr=class extends Map{constructor(t,r=Py){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,i]of t)this.set(n,i)}get(t){return super.get(sh(this,t))}has(t){return super.has(sh(this,t))}set(t,r){return super.set(Cy(this,t),r)}delete(t){return super.delete(Ay(this,t))}};function sh({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function Cy({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Ay({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Py(e){return e!==null&&typeof e=="object"?e.valueOf():e}var Fy=Math.sqrt(50),ky=Math.sqrt(10),Ly=Math.sqrt(2);function zo(e,t,r){let n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),a=o>=Fy?10:o>=ky?5:o>=Ly?2:1,s,l,f;return i<0?(f=Math.pow(10,-i)/a,s=Math.round(e*f),l=Math.round(t*f),s/f<e&&++s,l/f>t&&--l,f=-f):(f=Math.pow(10,i)*a,s=Math.round(e/f),l=Math.round(t/f),s*f<e&&++s,l*f>t&&--l),l<s&&.5<=r&&r<2?zo(e,t,r*2):[s,l,f]}function dr(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];let n=t<e,[i,o,a]=n?zo(t,e,r):zo(e,t,r);if(!(o>=i))return[];let s=o-i+1,l=new Array(s);if(n)if(a<0)for(let f=0;f<s;++f)l[f]=(o-f)/-a;else for(let f=0;f<s;++f)l[f]=(o-f)*a;else if(a<0)for(let f=0;f<s;++f)l[f]=(i+f)/-a;else for(let f=0;f<s;++f)l[f]=(i+f)*a;return l}function hi(e,t,r){return t=+t,e=+e,r=+r,zo(e,t,r)[2]}function Hs(e,t,r){t=+t,e=+e,r=+r;let n=t<e,i=n?hi(t,e,r):hi(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Zs(e,t,r=di){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function Uo(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}function ue(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var js=Symbol("implicit");function hr(){var e=new Qr,t=[],r=[],n=js;function i(o){let a=e.get(o);if(a===void 0){if(n!==js)return n;e.set(o,a=t.push(o)-1)}return r[a%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Qr;for(let a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return hr(t,r).unknown(n)},ue.apply(i,arguments),i}function qo(){var e=hr().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,o,a,s=!1,l=0,f=0,c=.5;delete e.unknown;function u(){var d=t().length,h=i<n,g=h?i:n,x=h?n:i;o=(x-g)/Math.max(1,d-l+f*2),s&&(o=Math.floor(o)),g+=(x-g-o*(d-l))*c,a=o*(1-l),s&&(g=Math.round(g),a=Math.round(a));var T=Uo(d).map(function(_){return g+o*_});return r(h?T.reverse():T)}return e.domain=function(d){return arguments.length?(t(d),u()):t()},e.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,u()):[n,i]},e.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,s=!0,u()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(d){return arguments.length?(s=!!d,u()):s},e.padding=function(d){return arguments.length?(l=Math.min(1,f=+d),u()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),u()):l},e.paddingOuter=function(d){return arguments.length?(f=+d,u()):f},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),u()):c},e.copy=function(){return qo(t(),[n,i]).round(s).paddingInner(l).paddingOuter(f).align(c)},ue.apply(u(),arguments)}function fh(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return fh(t())},e}function Ws(){return fh(qo.apply(null,arguments).paddingInner(1))}function Go(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ys(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function mi(){}var pi=.7,Ho=1/pi,Jr="\\s*([+-]?\\d+)\\s*",gi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",My=/^#([0-9a-f]{3,8})$/,Iy=new RegExp(`^rgb\\(${Jr},${Jr},${Jr}\\)$`),By=new RegExp(`^rgb\\(${ft},${ft},${ft}\\)$`),Oy=new RegExp(`^rgba\\(${Jr},${Jr},${Jr},${gi}\\)$`),Ry=new RegExp(`^rgba\\(${ft},${ft},${ft},${gi}\\)$`),Dy=new RegExp(`^hsl\\(${gi},${ft},${ft}\\)$`),Ny=new RegExp(`^hsla\\(${gi},${ft},${ft},${gi}\\)$`),lh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Go(mi,Gt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ch,formatHex:ch,formatHex8:zy,formatHsl:Uy,formatRgb:uh,toString:uh});function ch(){return this.rgb().formatHex()}function zy(){return this.rgb().formatHex8()}function Uy(){return bh(this).formatHsl()}function uh(){return this.rgb().formatRgb()}function Gt(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=My.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?dh(t):r===3?new xe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Vo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Vo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Iy.exec(e))?new xe(t[1],t[2],t[3],1):(t=By.exec(e))?new xe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Oy.exec(e))?Vo(t[1],t[2],t[3],t[4]):(t=Ry.exec(e))?Vo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Dy.exec(e))?gh(t[1],t[2]/100,t[3]/100,1):(t=Ny.exec(e))?gh(t[1],t[2]/100,t[3]/100,t[4]):lh.hasOwnProperty(e)?dh(lh[e]):e==="transparent"?new xe(NaN,NaN,NaN,0):null}function dh(e){return new xe(e>>16&255,e>>8&255,e&255,1)}function Vo(e,t,r,n){return n<=0&&(e=t=r=NaN),new xe(e,t,r,n)}function qy(e){return e instanceof mi||(e=Gt(e)),e?(e=e.rgb(),new xe(e.r,e.g,e.b,e.opacity)):new xe}function en(e,t,r,n){return arguments.length===1?qy(e):new xe(e,t,r,n??1)}function xe(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Go(xe,en,Ys(mi,{brighter(e){return e=e==null?Ho:Math.pow(Ho,e),new xe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pi:Math.pow(pi,e),new xe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xe(gr(this.r),gr(this.g),gr(this.b),Zo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:hh,formatHex:hh,formatHex8:Gy,formatRgb:ph,toString:ph}));function hh(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}`}function Gy(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}${pr((isNaN(this.opacity)?1:this.opacity)*255)}`}function ph(){let e=Zo(this.opacity);return`${e===1?"rgb(":"rgba("}${gr(this.r)}, ${gr(this.g)}, ${gr(this.b)}${e===1?")":`, ${e})`}`}function Zo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function gr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function pr(e){return e=gr(e),(e<16?"0":"")+e.toString(16)}function gh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ze(e,t,r,n)}function bh(e){if(e instanceof Ze)return new Ze(e.h,e.s,e.l,e.opacity);if(e instanceof mi||(e=Gt(e)),!e)return new Ze;if(e instanceof Ze)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ze(a,s,l,e.opacity)}function yh(e,t,r,n){return arguments.length===1?bh(e):new Ze(e,t,r,n??1)}function Ze(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Go(Ze,yh,Ys(mi,{brighter(e){return e=e==null?Ho:Math.pow(Ho,e),new Ze(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pi:Math.pow(pi,e),new Ze(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new xe(Ks(e>=240?e-240:e+120,i,n),Ks(e,i,n),Ks(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Ze(mh(this.h),$o(this.s),$o(this.l),Zo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Zo(this.opacity);return`${e===1?"hsl(":"hsla("}${mh(this.h)}, ${$o(this.s)*100}%, ${$o(this.l)*100}%${e===1?")":`, ${e})`}`}}));function mh(e){return e=(e||0)%360,e<0?e+360:e}function $o(e){return Math.max(0,Math.min(1,e||0))}function Ks(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function Xs(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function xh(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return Xs((r-n/t)*t,a,i,o,s)}}function vh(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return Xs((r-n/t)*t,i,o,a,s)}}var bi=e=>()=>e;function Vy(e,t){return function(r){return e+r*t}}function $y(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function wh(e){return(e=+e)==1?jo:function(t,r){return r-t?$y(t,r,e):bi(isNaN(t)?r:t)}}function jo(e,t){var r=t-e;return r?Vy(e,r):bi(isNaN(e)?t:e)}var Qs=function e(t){var r=wh(t);function n(i,o){var a=r((i=en(i)).r,(o=en(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),f=jo(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=f(c),i+""}}return n.gamma=e,n}(1);function _h(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=en(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var f9=_h(xh),l9=_h(vh);function Eh(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function Sh(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Th(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),a;for(a=0;a<n;++a)i[a]=mr(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<n;++a)o[a]=i[a](s);return o}}function Ch(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Vt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Ah(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=mr(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var ef=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Js=new RegExp(ef.source,"g");function Hy(e){return function(){return e}}function Zy(e){return function(t){return e(t)+""}}function Ph(e,t){var r=ef.lastIndex=Js.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=ef.exec(e))&&(i=Js.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Vt(n,i)})),r=Js.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?Zy(l[0].x):Hy(t):(t=l.length,function(f){for(var c=0,u;c<t;++c)s[(u=l[c]).i]=u.x(f);return s.join("")})}function mr(e,t){var r=typeof t,n;return t==null||r==="boolean"?bi(t):(r==="number"?Vt:r==="string"?(n=Gt(t))?(t=n,Qs):Ph:t instanceof Gt?Qs:t instanceof Date?Ch:Sh(t)?Eh:Array.isArray(t)?Th:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Ah:Vt)(e,t)}function tf(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function rf(e){return function(){return e}}function nf(e){return+e}var Fh=[0,1];function je(e){return e}function of(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:rf(isNaN(t)?NaN:.5)}function jy(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Wy(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=of(i,n),o=r(a,o)):(n=of(n,i),o=r(o,a)),function(s){return o(n(s))}}function Yy(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=of(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(s){var l=_t(e,s,1,n)-1;return o[l](i[l](s))}}function tn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function yi(){var e=Fh,t=Fh,r=mr,n,i,o,a=je,s,l,f;function c(){var d=Math.min(e.length,t.length);return a!==je&&(a=jy(e[0],e[d-1])),s=d>2?Yy:Wy,l=f=null,u}function u(d){return d==null||isNaN(d=+d)?o:(l||(l=s(e.map(n),t,r)))(n(a(d)))}return u.invert=function(d){return a(i((f||(f=s(t,e.map(n),Vt)))(d)))},u.domain=function(d){return arguments.length?(e=Array.from(d,nf),c()):e.slice()},u.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},u.rangeRound=function(d){return t=Array.from(d),r=tf,c()},u.clamp=function(d){return arguments.length?(a=d?!0:je,c()):a!==je},u.interpolate=function(d){return arguments.length?(r=d,c()):r},u.unknown=function(d){return arguments.length?(o=d,u):o},function(d,h){return n=d,i=h,c()}}function af(){return yi()(je,je)}function kh(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function br(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function lt(e){return e=br(Math.abs(e)),e?e[1]:NaN}function Lh(e,t){return function(r,n){for(var i=r.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function Mh(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Ky=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ct(e){if(!(t=Ky.exec(e)))throw new Error("invalid format: "+e);var t;return new Wo({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ct.prototype=Wo.prototype;function Wo(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Wo.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Ih(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var sf;function Bh(e,t){var r=br(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(sf=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+br(e,Math.max(0,t+o-1))[0]}function ff(e,t){var r=br(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var lf={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:kh,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ff(e*100,t),r:ff,s:Bh,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function cf(e){return e}var Oh=Array.prototype.map,Rh=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Dh(e){var t=e.grouping===void 0||e.thousands===void 0?cf:Lh(Oh.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?cf:Mh(Oh.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function f(u){u=ct(u);var d=u.fill,h=u.align,g=u.sign,x=u.symbol,T=u.zero,_=u.width,w=u.comma,k=u.precision,M=u.trim,I=u.type;I==="n"?(w=!0,I="g"):lf[I]||(k===void 0&&(k=12),M=!0,I="g"),(T||d==="0"&&h==="=")&&(T=!0,d="0",h="=");var R=x==="$"?r:x==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",N=x==="$"?n:/[%p]/.test(I)?a:"",p=lf[I],m=/[defgprs%]/.test(I);k=k===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function b(y){var v=R,S=N,P,E,C;if(I==="c")S=p(y)+S,y="";else{y=+y;var F=y<0||1/y<0;if(y=isNaN(y)?l:p(Math.abs(y),k),M&&(y=Ih(y)),F&&+y==0&&g!=="+"&&(F=!1),v=(F?g==="("?g:s:g==="-"||g==="("?"":g)+v,S=(I==="s"?Rh[8+sf/3]:"")+S+(F&&g==="("?")":""),m){for(P=-1,E=y.length;++P<E;)if(C=y.charCodeAt(P),48>C||C>57){S=(C===46?i+y.slice(P+1):y.slice(P))+S,y=y.slice(0,P);break}}}w&&!T&&(y=t(y,1/0));var A=v.length+y.length+S.length,B=A<_?new Array(_-A+1).join(d):"";switch(w&&T&&(y=t(B+y,B.length?_-S.length:1/0),B=""),h){case"<":y=v+y+S+B;break;case"=":y=v+B+y+S;break;case"^":y=B.slice(0,A=B.length>>1)+v+y+S+B.slice(A);break;default:y=B+v+y+S;break}return o(y)}return b.toString=function(){return u+""},b}function c(u,d){var h=f((u=ct(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(lt(d)/3)))*3,x=Math.pow(10,-g),T=Rh[8+g/3];return function(_){return h(x*_)+T}}return{format:f,formatPrefix:c}}var Yo,Et,Ko;uf({thousands:",",grouping:[3],currency:["$",""]});function uf(e){return Yo=Dh(e),Et=Yo.format,Ko=Yo.formatPrefix,Yo}function df(e){return Math.max(0,-lt(Math.abs(e)))}function hf(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(lt(t)/3)))*3-lt(Math.abs(e)))}function pf(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,lt(t)-lt(e))+1}function gf(e,t,r,n){var i=Hs(e,t,r),o;switch(n=ct(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=hf(i,a))&&(n.precision=o),Ko(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=pf(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=df(i))&&(n.precision=o-(n.type==="%")*2);break}}return Et(n)}function xi(e){var t=e.domain;return e.ticks=function(r){var n=t();return dr(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return gf(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,a=n[i],s=n[o],l,f,c=10;for(s<a&&(f=a,a=s,s=f,f=i,i=o,o=f);c-- >0;){if(f=hi(a,s,r),f===l)return n[i]=a,n[o]=s,t(n);if(f>0)a=Math.floor(a/f)*f,s=Math.ceil(s/f)*f;else if(f<0)a=Math.ceil(a*f)/f,s=Math.floor(s*f)/f;else break;l=f}return e},e}function yr(){var e=af();return e.copy=function(){return tn(e,yr())},ue.apply(e,arguments),xi(e)}function mf(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],a;return o<i&&(a=r,r=n,n=a,a=i,i=o,o=a),e[r]=t.floor(i),e[n]=t.ceil(o),e}function Nh(e){return Math.log(e)}function zh(e){return Math.exp(e)}function Xy(e){return-Math.log(-e)}function Qy(e){return-Math.exp(-e)}function Jy(e){return isFinite(e)?+("1e"+e):e<0?0:e}function ex(e){return e===10?Jy:e===Math.E?Math.exp:t=>Math.pow(e,t)}function tx(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Uh(e){return(t,r)=>-e(-t,r)}function rx(e){let t=e(Nh,zh),r=t.domain,n=10,i,o;function a(){return i=tx(n),o=ex(n),r()[0]<0?(i=Uh(i),o=Uh(o),e(Xy,Qy)):e(Nh,zh),t}return t.base=function(s){return arguments.length?(n=+s,a()):n},t.domain=function(s){return arguments.length?(r(s),a()):r()},t.ticks=s=>{let l=r(),f=l[0],c=l[l.length-1],u=c<f;u&&([f,c]=[c,f]);let d=i(f),h=i(c),g,x,T=s==null?10:+s,_=[];if(!(n%1)&&h-d<T){if(d=Math.floor(d),h=Math.ceil(h),f>0){for(;d<=h;++d)for(g=1;g<n;++g)if(x=d<0?g/o(-d):g*o(d),!(x<f)){if(x>c)break;_.push(x)}}else for(;d<=h;++d)for(g=n-1;g>=1;--g)if(x=d>0?g/o(-d):g*o(d),!(x<f)){if(x>c)break;_.push(x)}_.length*2<T&&(_=dr(f,c,T))}else _=dr(d,h,Math.min(h-d,T)).map(o);return u?_.reverse():_},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=ct(l)).precision==null&&(l.trim=!0),l=Et(l)),s===1/0)return l;let f=Math.max(1,n*s/t.ticks().length);return c=>{let u=c/o(Math.round(i(c)));return u*n<n-.5&&(u*=n),u<=f?l(c):""}},t.nice=()=>r(mf(r(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function vi(){let e=rx(yi()).domain([1,10]);return e.copy=()=>tn(e,vi()).base(e.base()),ue.apply(e,arguments),e}function qh(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function nx(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ix(e){return e<0?-e*e:e*e}function ox(e){var t=e(je,je),r=1;function n(){return r===1?e(je,je):r===.5?e(nx,ix):e(qh(r),qh(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},xi(t)}function Xo(){var e=ox(yi());return e.copy=function(){return tn(e,Xo()).exponent(e.exponent())},ue.apply(e,arguments),e}function bf(){return Xo.apply(null,arguments).exponent(.5)}function wi(){var e=[],t=[],r=[],n;function i(){var a=0,s=Math.max(1,t.length);for(r=new Array(s-1);++a<s;)r[a-1]=Zs(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?n:t[_t(r,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(st),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(n=a,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return wi().domain(e).range(t).unknown(n)},ue.apply(o,arguments)}function _i(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[_t(n,l,0,r)]:o}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var f=i.indexOf(l);return f<0?[NaN,NaN]:f<1?[e,n[0]]:f>=r?[n[r-1],t]:[n[f-1],n[f]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return n.slice()},a.copy=function(){return _i().domain([e,t]).range(i).unknown(o)},ue.apply(xi(a),arguments)}function xr(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[_t(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return xr().domain(e).range(t).unknown(r)},ue.apply(i,arguments)}var X8={},ax=Object.create,qf=Object.defineProperty,sx=Object.getOwnPropertyDescriptor,O0=Object.getOwnPropertyNames,fx=Object.getPrototypeOf,lx=Object.prototype.hasOwnProperty,cx=(e,t,r)=>t in e?qf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ux=(e,t)=>function(){return t||(0,e[O0(e)[0]])((t={exports:{}}).exports,t),t.exports},dx=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of O0(t))!lx.call(e,i)&&i!==r&&qf(e,i,{get:()=>t[i],enumerable:!(n=sx(t,i))||n.enumerable});return e},hx=(e,t,r)=>(r=e!=null?ax(fx(e)):{},dx(t||!e||!e.__esModule?qf(r,"default",{value:e,enumerable:!0}):r,e)),D=(e,t,r)=>cx(e,typeof t!="symbol"?t+"":t,r),px=ux({"node_modules/thenby/thenBy.module.js"(e,t){"use strict";t.exports=function(){function r(a){return a}function n(a){return typeof a=="string"?a.toLowerCase():a}function i(a,s){if(s=typeof s=="object"?s:{direction:s},typeof a!="function"){var l=a;a=function(h){return h[l]?h[l]:""}}if(a.length===1){var f=a,c=s.ignoreCase?n:r,u=s.cmp||function(h,g){return h<g?-1:h>g?1:0};a=function(h,g){return u(c(f(h)),c(f(g)))}}let d={"-1":"",desc:""};return s.direction in d?function(h,g){return-a(h,g)}:a}function o(a,s){var l=typeof this=="function"&&!this.firstBy?this:!1,f=i(a,s),c=l?function(u,d){return l(u,d)||f(u,d)}:f;return c.thenBy=o,c}return o.firstBy=o,o}()}}),gx="deck-gl-carto";function Di(){return gx}var Gf=(e=>(e.IN="in",e.BETWEEN="between",e.CLOSED_OPEN="closed_open",e.TIME="time",e.STRING_SEARCH="stringSearch",e))(Gf||{}),R0=(e=>(e.V1="v1",e.V2="v2",e.V3="v3",e))(R0||{}),Vf="https://gcp-us-east1.api.carto.com",D0={mapId:"tag-mapId"};var N0=(e=>(e.H3="h3",e.QUADBIN="quadbin",e))(N0||{});var mx=Object.freeze({h3:["h3","hex","h3id","hex_id","h3hex"],quadbin:["quadbin"]}),De={Count:"count",Avg:"avg",Min:"min",Max:"max",Sum:"sum",Custom:"custom"};function z0(e){return e.map(t=>t[0]===void 0||t[0]===null?[Number.MIN_SAFE_INTEGER,t[1]]:t[1]===void 0||t[1]===null?[t[0],Number.MAX_SAFE_INTEGER]:t)}var bx={in:yx,between:U0,time:xx,closed_open:vx,stringSearch:wx};function yx(e,t){return e.includes(t)}function U0(e,t){let r=n=>{let[i,o]=n;return t>=i&&t<=o};return z0(e).some(r)}function xx(e,t){let r=new Date(t).getTime();if(isFinite(r))return U0(e,r);throw new Error("Column used to filter by time isn't well formatted.")}function vx(e,t){let r=n=>{let[i,o]=n;return t>=i&&t<o};return z0(e).some(r)}function wx(e,t,r={}){let n=Gh(t,r),i=r.useRegExp?e:e.map(a=>{let s=Sx(Gh(a,r));return r.mustStart&&(s=`^${s}`),r.mustEnd&&(s=`${s}$`),s}),o=new RegExp(i.join("|"),r.caseSensitive?"g":"gi");return!!n.match(o)}var _x=/[.*+?^${}()|[\]\\]/g,Ex=/\p{Diacritic}/gu;function Sx(e){return e.replace(_x,"\\$&")}function Gh(e,t){let r=String(e);return t.keepSpecialCharacters||(r=r.normalize("NFD").replace(Ex,"")),r}var Tx={and:"every",or:"some"};function Cx(e,t,r,n){let i=Tx[n];return e[i](o=>{let a=t[o],s=Object.keys(a);return!r||r[o]===null||r[o]===void 0?!1:s.every(l=>{let f=bx[l];if(!f)throw new Error(`"${l}" filter is not implemented.`);return f(a[l].values,r[o],a[l].params)})})}function Ax({filters:e={},type:t="boolean",filtersLogicalOperator:r="and"}){let n=Object.keys(e);return n.length?i=>{let o=i.properties||i,a=Cx(n,e,o,r);return t==="number"?Number(a):a}:()=>t==="number"?1:!0}function Px(e,t,r){return Object.keys(t).length?e.filter(Ax({filters:t,filtersLogicalOperator:r})):e}var Y=11102230246251565e-32,de=134217729,Fx=(3+8*Y)*Y;function yf(e,t,r,n,i){let o,a,s,l,f=t[0],c=n[0],u=0,d=0;c>f==c>-f?(o=f,f=t[++u]):(o=c,c=n[++d]);let h=0;if(u<e&&d<r)for(c>f==c>-f?(a=f+o,s=o-(a-f),f=t[++u]):(a=c+o,s=o-(a-c),c=n[++d]),o=a,s!==0&&(i[h++]=s);u<e&&d<r;)c>f==c>-f?(a=o+f,l=a-o,s=o-(a-l)+(f-l),f=t[++u]):(a=o+c,l=a-o,s=o-(a-l)+(c-l),c=n[++d]),o=a,s!==0&&(i[h++]=s);for(;u<e;)a=o+f,l=a-o,s=o-(a-l)+(f-l),f=t[++u],o=a,s!==0&&(i[h++]=s);for(;d<r;)a=o+c,l=a-o,s=o-(a-l)+(c-l),c=n[++d],o=a,s!==0&&(i[h++]=s);return(o!==0||h===0)&&(i[h++]=o),h}function kx(e,t){let r=t[0];for(let n=1;n<e;n++)r+=t[n];return r}function O(e){return new Float64Array(e)}var Lx=(3+16*Y)*Y,Mx=(2+12*Y)*Y,Ix=(9+64*Y)*Y*Y,rn=O(4),Vh=O(8),$h=O(12),Hh=O(16),me=O(4);function Bx(e,t,r,n,i,o,a){let s,l,f,c,u,d,h,g,x,T,_,w,k,M,I,R,N,p,m=e-i,b=r-i,y=t-o,v=n-o;M=m*v,d=de*m,h=d-(d-m),g=m-h,d=de*v,x=d-(d-v),T=v-x,I=g*T-(M-h*x-g*x-h*T),R=y*b,d=de*y,h=d-(d-y),g=y-h,d=de*b,x=d-(d-b),T=b-x,N=g*T-(R-h*x-g*x-h*T),_=I-N,u=I-_,rn[0]=I-(_+u)+(u-N),w=M+_,u=w-M,k=M-(w-u)+(_-u),_=k-R,u=k-_,rn[1]=k-(_+u)+(u-R),p=w+_,u=p-w,rn[2]=w-(p-u)+(_-u),rn[3]=p;let S=kx(4,rn),P=Mx*a;if(S>=P||-S>=P||(u=e-m,s=e-(m+u)+(u-i),u=r-b,f=r-(b+u)+(u-i),u=t-y,l=t-(y+u)+(u-o),u=n-v,c=n-(v+u)+(u-o),s===0&&l===0&&f===0&&c===0)||(P=Ix*a+Fx*Math.abs(S),S+=m*c+v*s-(y*f+b*l),S>=P||-S>=P))return S;M=s*v,d=de*s,h=d-(d-s),g=s-h,d=de*v,x=d-(d-v),T=v-x,I=g*T-(M-h*x-g*x-h*T),R=l*b,d=de*l,h=d-(d-l),g=l-h,d=de*b,x=d-(d-b),T=b-x,N=g*T-(R-h*x-g*x-h*T),_=I-N,u=I-_,me[0]=I-(_+u)+(u-N),w=M+_,u=w-M,k=M-(w-u)+(_-u),_=k-R,u=k-_,me[1]=k-(_+u)+(u-R),p=w+_,u=p-w,me[2]=w-(p-u)+(_-u),me[3]=p;let E=yf(4,rn,4,me,Vh);M=m*c,d=de*m,h=d-(d-m),g=m-h,d=de*c,x=d-(d-c),T=c-x,I=g*T-(M-h*x-g*x-h*T),R=y*f,d=de*y,h=d-(d-y),g=y-h,d=de*f,x=d-(d-f),T=f-x,N=g*T-(R-h*x-g*x-h*T),_=I-N,u=I-_,me[0]=I-(_+u)+(u-N),w=M+_,u=w-M,k=M-(w-u)+(_-u),_=k-R,u=k-_,me[1]=k-(_+u)+(u-R),p=w+_,u=p-w,me[2]=w-(p-u)+(_-u),me[3]=p;let C=yf(E,Vh,4,me,$h);M=s*c,d=de*s,h=d-(d-s),g=s-h,d=de*c,x=d-(d-c),T=c-x,I=g*T-(M-h*x-g*x-h*T),R=l*f,d=de*l,h=d-(d-l),g=l-h,d=de*f,x=d-(d-f),T=f-x,N=g*T-(R-h*x-g*x-h*T),_=I-N,u=I-_,me[0]=I-(_+u)+(u-N),w=M+_,u=w-M,k=M-(w-u)+(_-u),_=k-R,u=k-_,me[1]=k-(_+u)+(u-R),p=w+_,u=p-w,me[2]=w-(p-u)+(_-u),me[3]=p;let F=yf(C,$h,4,me,Hh);return Hh[F-1]}function Ox(e,t,r,n,i,o){let a=(t-o)*(r-i),s=(e-i)*(n-o),l=a-s,f=Math.abs(a+s);return Math.abs(l)>=Lx*f?l:-Bx(e,t,r,n,i,o,f)}var uS=(7+56*Y)*Y,dS=(3+28*Y)*Y,hS=(26+288*Y)*Y*Y,pS=O(4),gS=O(4),mS=O(4),bS=O(4),yS=O(4),xS=O(4),vS=O(4),wS=O(4),_S=O(4),ES=O(8),SS=O(8),TS=O(8),CS=O(4),AS=O(8),PS=O(8),FS=O(8),kS=O(12),LS=O(192),MS=O(192),IS=(10+96*Y)*Y,BS=(4+48*Y)*Y,OS=(44+576*Y)*Y*Y,RS=O(4),DS=O(4),NS=O(4),zS=O(4),US=O(4),qS=O(4),GS=O(4),VS=O(4),$S=O(8),HS=O(8),ZS=O(8),jS=O(8),WS=O(8),YS=O(8),KS=O(8),XS=O(8),QS=O(8),JS=O(4),eT=O(4),tT=O(4),rT=O(8),nT=O(16),iT=O(16),oT=O(16),aT=O(32),sT=O(32),fT=O(48),lT=O(64),cT=O(1152),uT=O(1152),dT=(16+224*Y)*Y,hT=(5+72*Y)*Y,pT=(71+1408*Y)*Y*Y,gT=O(4),mT=O(4),bT=O(4),yT=O(4),xT=O(4),vT=O(4),wT=O(4),_T=O(4),ET=O(4),ST=O(4),TT=O(24),CT=O(24),AT=O(24),PT=O(24),FT=O(24),kT=O(24),LT=O(24),MT=O(24),IT=O(24),BT=O(24),OT=O(1152),RT=O(1152),DT=O(1152),NT=O(1152),zT=O(1152),UT=O(2304),qT=O(2304),GT=O(3456),VT=O(5760),$T=O(8),HT=O(8),ZT=O(8),jT=O(16),WT=O(24),YT=O(48),KT=O(48),XT=O(96),QT=O(192),JT=O(384),eC=O(384),tC=O(384),rC=O(768),nC=O(96),iC=O(96),oC=O(96),aC=O(1152);function Rx(e,t){var r,n,i=0,o,a,s,l,f,c,u,d=e[0],h=e[1],g=t.length;for(r=0;r<g;r++){n=0;var x=t[r],T=x.length-1;if(c=x[0],c[0]!==x[T][0]&&c[1]!==x[T][1])throw new Error("First and last coordinates in a ring must be the same");for(a=c[0]-d,s=c[1]-h,n;n<T;n++){if(u=x[n+1],l=u[0]-d,f=u[1]-h,s===0&&f===0){if(l<=0&&a>=0||a<=0&&l>=0)return 0}else if(f>=0&&s<=0||f<=0&&s>=0){if(o=Ox(a,l,s,f,0,0),o===0)return 0;(o>0&&f>0&&s<=0||o<0&&f<=0&&s>0)&&i++}c=u,s=f,a=l}}return i%2!==0}var Ae=63710088e-1,sC={centimeters:Ae*100,centimetres:Ae*100,degrees:360/(2*Math.PI),feet:Ae*3.28084,inches:Ae*39.37,kilometers:Ae/1e3,kilometres:Ae/1e3,meters:Ae,metres:Ae,miles:Ae/1609.344,millimeters:Ae*1e3,millimetres:Ae*1e3,nauticalmiles:Ae/1852,radians:1,yards:Ae*1.0936};function _e(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function Dx(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Zh(e[0])||!Zh(e[1]))throw new Error("coordinates must contain numbers");return _e({type:"Point",coordinates:e},t,r)}function $f(e,t,r={}){for(let i of e){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let o=0;o<i[i.length-1].length;o++)if(i[i.length-1][o]!==i[0][o])throw new Error("First and last Position are not equivalent.")}return _e({type:"Polygon",coordinates:e},t,r)}function q0(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return _e({type:"LineString",coordinates:e},t,r)}function Mi(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function G0(e,t,r={}){return _e({type:"MultiLineString",coordinates:e},t,r)}function V0(e,t,r={}){return _e({type:"MultiPolygon",coordinates:e},t,r)}function Zh(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function $0(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if(e.type==="Feature"&&e.geometry!==null&&e.geometry.type==="Point")return[...e.geometry.coordinates];if(e.type==="Point")return[...e.coordinates]}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return[...e];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function ki(e){if(Array.isArray(e))return e;if(e.type==="Feature"){if(e.geometry!==null)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Pt(e){return e.type==="Feature"?e.geometry:e}function Nx(e,t){return e.type==="FeatureCollection"?"FeatureCollection":e.type==="GeometryCollection"?"GeometryCollection":e.type==="Feature"&&e.geometry!==null?e.geometry.type:e.type}function Ne(e,t,r={}){if(!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");let n=$0(e),i=Pt(t),o=i.type,a=t.bbox,s=i.coordinates;if(a&&zx(n,a)===!1)return!1;o==="Polygon"&&(s=[s]);let l=!1;for(var f=0;f<s.length;++f){let c=Rx(n,s[f]);if(c===0)return!r.ignoreBoundary;c&&(l=!0)}return l}function zx(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}var H0=class{constructor(e=[],t=Ux){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;let e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,o=t[i];if(r(n,o)>=0)break;t[e]=o,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;e<n;){let o=(e<<1)+1,a=t[o],s=o+1;if(s<this.length&&r(t[s],a)<0&&(o=s,a=t[s]),r(a,i)>=0)break;t[e]=a,e=o}t[e]=i}};function Ux(e,t){return e<t?-1:e>t?1:0}function Z0(e,t){return e.p.x>t.p.x?1:e.p.x<t.p.x?-1:e.p.y!==t.p.y?e.p.y>t.p.y?1:-1:1}function qx(e,t){return e.rightSweepEvent.p.x>t.rightSweepEvent.p.x?1:e.rightSweepEvent.p.x<t.rightSweepEvent.p.x?-1:e.rightSweepEvent.p.y!==t.rightSweepEvent.p.y?e.rightSweepEvent.p.y<t.rightSweepEvent.p.y?1:-1:1}var jh=class{constructor(e,t,r,n){this.p={x:e[0],y:e[1]},this.featureId=t,this.ringId=r,this.eventId=n,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(e){return this.p.x===e.p.x&&this.p.y===e.p.y}};function Gx(e,t){if(e.type==="FeatureCollection"){let r=e.features;for(let n=0;n<r.length;n++)Wh(r[n],t)}else Wh(e,t)}var Qo=0,Jo=0,ea=0;function Wh(e,t){let r=e.type==="Feature"?e.geometry:e,n=r.coordinates;(r.type==="Polygon"||r.type==="MultiLineString")&&(n=[n]),r.type==="LineString"&&(n=[[n]]);for(let i=0;i<n.length;i++)for(let o=0;o<n[i].length;o++){let a=n[i][o][0],s=null;Jo=Jo+1;for(let l=0;l<n[i][o].length-1;l++){s=n[i][o][l+1];let f=new jh(a,Qo,Jo,ea),c=new jh(s,Qo,Jo,ea+1);f.otherEvent=c,c.otherEvent=f,Z0(f,c)>0?(c.isLeftEndpoint=!0,f.isLeftEndpoint=!1):(f.isLeftEndpoint=!0,c.isLeftEndpoint=!1),t.push(f),t.push(c),a=s,ea=ea+1}}Qo=Qo+1}var Vx=class{constructor(e){this.leftSweepEvent=e,this.rightSweepEvent=e.otherEvent}};function $x(e,t){if(e===null||t===null||e.leftSweepEvent.ringId===t.leftSweepEvent.ringId&&(e.rightSweepEvent.isSamePoint(t.leftSweepEvent)||e.rightSweepEvent.isSamePoint(t.leftSweepEvent)||e.rightSweepEvent.isSamePoint(t.rightSweepEvent)||e.leftSweepEvent.isSamePoint(t.leftSweepEvent)||e.leftSweepEvent.isSamePoint(t.rightSweepEvent)))return!1;let r=e.leftSweepEvent.p.x,n=e.leftSweepEvent.p.y,i=e.rightSweepEvent.p.x,o=e.rightSweepEvent.p.y,a=t.leftSweepEvent.p.x,s=t.leftSweepEvent.p.y,l=t.rightSweepEvent.p.x,f=t.rightSweepEvent.p.y,c=(f-s)*(i-r)-(l-a)*(o-n),u=(l-a)*(n-s)-(f-s)*(r-a),d=(i-r)*(n-s)-(o-n)*(r-a);if(c===0)return u===0&&d===0,!1;let h=u/c,g=d/c;if(h>=0&&h<=1&&g>=0&&g<=1){let x=r+h*(i-r),T=n+h*(o-n);return[x,T]}return!1}function Hx(e,t){t=t||!1;let r=[],n=new H0([],qx);for(;e.length;){let i=e.pop();if(i.isLeftEndpoint){let o=new Vx(i);for(let a=0;a<n.data.length;a++){let s=n.data[a];if(t&&s.leftSweepEvent.featureId===i.featureId)continue;let l=$x(o,s);l!==!1&&r.push(l)}n.push(o)}else i.isLeftEndpoint===!1&&n.pop()}return r}function Zx(e,t){let r=new H0([],Z0);return Gx(e,r),Hx(r,t)}var jx=Zx,Wx=jx;function Hf(e,t,r={}){let{removeDuplicates:n=!0,ignoreSelfIntersections:i=!0}=r,o=[];e.type==="FeatureCollection"?o=o.concat(e.features):e.type==="Feature"?o.push(e):(e.type==="LineString"||e.type==="Polygon"||e.type==="MultiLineString"||e.type==="MultiPolygon")&&o.push(_e(e)),t.type==="FeatureCollection"?o=o.concat(t.features):t.type==="Feature"?o.push(t):(t.type==="LineString"||t.type==="Polygon"||t.type==="MultiLineString"||t.type==="MultiPolygon")&&o.push(_e(t));let a=Wx(Mi(o),i),s=[];if(n){let l={};a.forEach(f=>{let c=f.join(",");l[c]||(l[c]=!0,s.push(f))})}else s=a;return Mi(s.map(l=>Dx(l)))}function j0(e,t,r){if(e!==null)for(var n,i,o,a,s,l,f,c=0,u=0,d,h=e.type,g=h==="FeatureCollection",x=h==="Feature",T=g?e.features.length:1,_=0;_<T;_++){f=g?e.features[_].geometry:x?e.geometry:e,d=f?f.type==="GeometryCollection":!1,s=d?f.geometries.length:1;for(var w=0;w<s;w++){var k=0,M=0;if(a=d?f.geometries[w]:f,a!==null){l=a.coordinates;var I=a.type;switch(c=r&&(I==="Polygon"||I==="MultiPolygon")?1:0,I){case null:break;case"Point":if(t(l,u,_,k,M)===!1)return!1;u++,k++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(t(l[n],u,_,k,M)===!1)return!1;u++,I==="MultiPoint"&&k++}I==="LineString"&&k++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-c;i++){if(t(l[n][i],u,_,k,M)===!1)return!1;u++}I==="MultiLineString"&&k++,I==="Polygon"&&M++}I==="Polygon"&&k++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(M=0,i=0;i<l[n].length;i++){for(o=0;o<l[n][i].length-c;o++){if(t(l[n][i][o],u,_,k,M)===!1)return!1;u++}M++}k++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(j0(a.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function W0(e,t){var r,n,i,o,a,s,l,f,c,u,d=0,h=e.type==="FeatureCollection",g=e.type==="Feature",x=h?e.features.length:1;for(r=0;r<x;r++){for(s=h?e.features[r].geometry:g?e.geometry:e,f=h?e.features[r].properties:g?e.properties:{},c=h?e.features[r].bbox:g?e.bbox:void 0,u=h?e.features[r].id:g?e.id:void 0,l=s?s.type==="GeometryCollection":!1,a=l?s.geometries.length:1,i=0;i<a;i++){if(o=l?s.geometries[i]:s,o===null){if(t(null,d,f,c,u)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,d,f,c,u)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<o.geometries.length;n++)if(t(o.geometries[n],d,f,c,u)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}d++}}function la(e,t){W0(e,function(r,n,i,o,a){var s=r===null?null:r.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return t(_e(r,i,{bbox:o,id:a}),n,0)===!1?!1:void 0}var l;switch(s){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var f=0;f<r.coordinates.length;f++){var c=r.coordinates[f],u={type:l,coordinates:c};if(t(_e(u,i),n,f)===!1)return!1}})}function Pf(e,t={}){let r=Pt(e);switch(!t.properties&&e.type==="Feature"&&(t.properties=e.properties),r.type){case"Polygon":return Yx(r,t);case"MultiPolygon":return Kx(r,t);default:throw new Error("invalid poly")}}function Yx(e,t={}){let n=Pt(e).coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{};return Y0(n,i)}function Kx(e,t={}){let n=Pt(e).coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{},o=[];return n.forEach(a=>{o.push(Y0(a,i))}),Mi(o)}function Y0(e,t){return e.length>1?G0(e,t):q0(e[0],t)}function Xx(e,t,{ignoreSelfIntersections:r=!0}={ignoreSelfIntersections:!0}){let n=!0;return la(e,i=>{la(t,o=>{if(n===!1)return!1;n=Qx(i.geometry,o.geometry,r)})}),n}function Qx(e,t,r){switch(e.type){case"Point":switch(t.type){case"Point":return!rv(e.coordinates,t.coordinates);case"LineString":return!Yh(t,e);case"Polygon":return!Ne(e,t)}break;case"LineString":switch(t.type){case"Point":return!Yh(e,t);case"LineString":return!Jx(e,t,r);case"Polygon":return!Kh(t,e,r)}break;case"Polygon":switch(t.type){case"Point":return!Ne(t,e);case"LineString":return!Kh(e,t,r);case"Polygon":return!ev(t,e,r)}}return!1}function Yh(e,t){for(let r=0;r<e.coordinates.length-1;r++)if(tv(e.coordinates[r],e.coordinates[r+1],t.coordinates))return!0;return!1}function Jx(e,t,r){return Hf(e,t,{ignoreSelfIntersections:r}).features.length>0}function Kh(e,t,r){for(let i of t.coordinates)if(Ne(i,e))return!0;return Hf(t,Pf(e),{ignoreSelfIntersections:r}).features.length>0}function ev(e,t,r){for(let i of e.coordinates[0])if(Ne(i,t))return!0;for(let i of t.coordinates[0])if(Ne(i,e))return!0;return Hf(Pf(e),Pf(t),{ignoreSelfIntersections:r}).features.length>0}function tv(e,t,r){let n=r[0]-e[0],i=r[1]-e[1],o=t[0]-e[0],a=t[1]-e[1];return n*a-i*o!==0?!1:Math.abs(o)>=Math.abs(a)?o>0?e[0]<=r[0]&&r[0]<=t[0]:t[0]<=r[0]&&r[0]<=e[0]:a>0?e[1]<=r[1]&&r[1]<=t[1]:t[1]<=r[1]&&r[1]<=e[1]}function rv(e,t){return e[0]===t[0]&&e[1]===t[1]}function nv(e,t,{ignoreSelfIntersections:r=!0}={}){let n=!1;return la(e,i=>{la(t,o=>{if(n===!0)return!0;n=!Xx(i.geometry,o.geometry,{ignoreSelfIntersections:r})})}),n}var K0=nv;function iv({geojson:e,spatialFilter:t,uniqueIdProperty:r}){let n=0,i=new Map;if(!t)return[];for(let o of e.features){let a=r?o.properties[r]:++n;!i.has(a)&&K0(t,o)&&i.set(a,o.properties)}return Array.from(i.values())}var fC=1/Math.PI*180,lC=1/180*Math.PI,ov={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...ov}};var cC=globalThis.mathgl.config;function av(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ff(e,t,r){return av(e)?e.map((n,i)=>Ff(n,t[i],r)):r*t+(1-r)*e}function Xh(e,t){if(!e)throw new Error(t||"@math.gl/web-mercator: assertion failed.")}var Ke=Math.PI,X0=Ke/4,Qh=Ke/180,Jh=180/Ke,ca=512;function kf(e){let[t,r]=e;Xh(Number.isFinite(t)),Xh(Number.isFinite(r)&&r>=-90&&r<=90,"invalid latitude");let n=t*Qh,i=r*Qh,o=ca*(n+Ke)/(2*Ke),a=ca*(Ke+Math.log(Math.tan(X0+i*.5)))/(2*Ke);return[o,a]}function sv(e){let[t,r]=e,n=t/ca*(2*Ke)-Ke,i=2*(Math.atan(Math.exp(r/ca*(2*Ke)-Ke))-X0);return[n*Jh,i*Jh]}var uC=Math.PI/180,fv={Point:Q0,MultiPoint:cv,LineString:J0,MultiLineString:uv,Polygon:ep,MultiPolygon:dv};function lv(e,t){let[r,n,i,o]=t,a=kf([r,o]),s=kf([i,n]),l=[a,s];if(e.type==="GeometryCollection")throw new Error("Unsupported geometry type GeometryCollection");let f=fv[e.type],c=f(e.coordinates,l);return{...e,coordinates:c}}function Q0([e,t],[r,n]){let i=Ff(r[0],n[0],e),o=Ff(r[1],n[1],t);return sv([i,o])}function Zf(e,t){return e.map(r=>Q0(r,t))}function cv(e,t){return Zf(e,t)}function J0(e,t){return Zf(e,t)}function uv(e,t){return e.map(r=>J0(r,t))}function ep(e,t){return e.map(r=>Zf(r,t))}function dv(e,t){return e.map(r=>ep(r,t))}function hv(e,t={}){let r=Number(e[0]),n=Number(e[1]),i=Number(e[2]),o=Number(e[3]);if(e.length===6)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");let a=[r,n];return $f([[a,[i,n],[i,o],[r,o],a]],t.properties,{bbox:e,id:t.id})}var pv=hv;function ua(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return j0(e,n=>{r[0]>n[0]&&(r[0]=n[0]),r[1]>n[1]&&(r[1]=n[1]),r[2]<n[0]&&(r[2]=n[0]),r[3]<n[1]&&(r[3]=n[1])}),r}function da(e,t,r={}){let n=$0(e),i=ki(t);for(let o=0;o<i.length-1;o++){let a=!1;if(r.ignoreEndVertices&&(o===0&&(a="start"),o===i.length-2&&(a="end"),o===0&&o+1===i.length-1&&(a="both")),gv(i[o],i[o+1],n,a,typeof r.epsilon>"u"?null:r.epsilon))return!0}return!1}function gv(e,t,r,n,i){let o=r[0],a=r[1],s=e[0],l=e[1],f=t[0],c=t[1],u=r[0]-s,d=r[1]-l,h=f-s,g=c-l,x=u*g-d*h;if(i!==null){if(Math.abs(x)>i)return!1}else if(x!==0)return!1;if(Math.abs(h)===Math.abs(g)&&Math.abs(h)===0)return n?!1:r[0]===e[0]&&r[1]===e[1];if(n){if(n==="start")return Math.abs(h)>=Math.abs(g)?h>0?s<o&&o<=f:f<=o&&o<s:g>0?l<a&&a<=c:c<=a&&a<l;if(n==="end")return Math.abs(h)>=Math.abs(g)?h>0?s<=o&&o<f:f<o&&o<=s:g>0?l<=a&&a<c:c<a&&a<=l;if(n==="both")return Math.abs(h)>=Math.abs(g)?h>0?s<o&&o<f:f<o&&o<s:g>0?l<a&&a<c:c<a&&a<l}else return Math.abs(h)>=Math.abs(g)?h>0?s<=o&&o<=f:f<=o&&o<=s:g>0?l<=a&&a<=c:c<=a&&a<=l;return!1}function mv(e,t){var r=Pt(e),n=Pt(t),i=r.type,o=n.type;switch(i){case"Point":switch(o){case"MultiPoint":return bv(r,n);case"LineString":return da(r,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return Ne(r,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+o+" geometry not supported")}case"MultiPoint":switch(o){case"MultiPoint":return yv(r,n);case"LineString":return xv(r,n);case"Polygon":case"MultiPolygon":return vv(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"LineString":return wv(r,n);case"Polygon":case"MultiPolygon":return _v(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Polygon":case"MultiPolygon":return Ev(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function bv(e,t){var r,n=!1;for(r=0;r<t.coordinates.length;r++)if(rp(t.coordinates[r],e.coordinates)){n=!0;break}return n}function yv(e,t){for(var r=0;r<e.coordinates.length;r++){for(var n=!1,i=0;i<t.coordinates.length;i++)rp(e.coordinates[r],t.coordinates[i])&&(n=!0);if(!n)return!1}return!0}function xv(e,t){for(var r=!1,n=0;n<e.coordinates.length;n++){if(!da(e.coordinates[n],t))return!1;r||(r=da(e.coordinates[n],t,{ignoreEndVertices:!0}))}return r}function vv(e,t){for(var r=!0,n=!1,i=!1,o=0;o<e.coordinates.length;o++){if(i=Ne(e.coordinates[o],t),!i){r=!1;break}n||(i=Ne(e.coordinates[o],t,{ignoreBoundary:!0}))}return r&&i}function wv(e,t){for(var r=0;r<e.coordinates.length;r++)if(!da(e.coordinates[r],t))return!1;return!0}function _v(e,t){var r=ua(t),n=ua(e);if(!tp(r,n))return!1;for(var i=!1,o=0;o<e.coordinates.length;o++){if(!Ne(e.coordinates[o],t))return!1;if(i||(i=Ne(e.coordinates[o],t,{ignoreBoundary:!0})),!i&&o<e.coordinates.length-1){var a=Sv(e.coordinates[o],e.coordinates[o+1]);i=Ne(a,t,{ignoreBoundary:!0})}}return i}function Ev(e,t){var r=ua(e),n=ua(t);if(!tp(n,r))return!1;for(var i=0;i<e.coordinates[0].length;i++)if(!Ne(e.coordinates[0][i],t))return!1;return!0}function tp(e,t){return!(e[0]>t[0]||e[2]<t[2]||e[1]>t[1]||e[3]<t[3])}function rp(e,t){return e[0]===t[0]&&e[1]===t[1]}function Sv(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}var np=mv,Tv=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,xf=Math.ceil,Oe=Math.floor,ve="[BigNumber Error] ",e0=ve+"Number primitive has more than 15 significant digits: ",We=1e14,q=14,vf=9007199254740991,wf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],$t=1e7,fe=1e9;function ip(e){var t,r,n,i=w.prototype={constructor:w,toString:null,valueOf:null},o=new w(1),a=20,s=4,l=-7,f=21,c=-1e7,u=1e7,d=!1,h=1,g=0,x={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},T="0123456789abcdefghijklmnopqrstuvwxyz",_=!0;function w(p,m){var b,y,v,S,P,E,C,F,A=this;if(!(A instanceof w))return new w(p,m);if(m==null){if(p&&p._isBigNumber===!0){A.s=p.s,!p.c||p.e>u?A.c=A.e=null:p.e<c?A.c=[A.e=0]:(A.e=p.e,A.c=p.c.slice());return}if((E=typeof p=="number")&&p*0==0){if(A.s=1/p<0?(p=-p,-1):1,p===~~p){for(S=0,P=p;P>=10;P/=10,S++);S>u?A.c=A.e=null:(A.e=S,A.c=[p]);return}F=String(p)}else{if(!Tv.test(F=String(p)))return n(A,F,E);A.s=F.charCodeAt(0)==45?(F=F.slice(1),-1):1}(S=F.indexOf("."))>-1&&(F=F.replace(".","")),(P=F.search(/e/i))>0?(S<0&&(S=P),S+=+F.slice(P+1),F=F.substring(0,P)):S<0&&(S=F.length)}else{if(te(m,2,T.length,"Base"),m==10&&_)return A=new w(p),R(A,a+A.e+1,s);if(F=String(p),E=typeof p=="number"){if(p*0!=0)return n(A,F,E,m);if(A.s=1/p<0?(F=F.slice(1),-1):1,w.DEBUG&&F.replace(/^0\.0*|\./,"").length>15)throw Error(e0+p)}else A.s=F.charCodeAt(0)===45?(F=F.slice(1),-1):1;for(b=T.slice(0,m),S=P=0,C=F.length;P<C;P++)if(b.indexOf(y=F.charAt(P))<0){if(y=="."){if(P>S){S=C;continue}}else if(!v&&(F==F.toUpperCase()&&(F=F.toLowerCase())||F==F.toLowerCase()&&(F=F.toUpperCase()))){v=!0,P=-1,S=0;continue}return n(A,String(p),E,m)}E=!1,F=r(F,m,10,A.s),(S=F.indexOf("."))>-1?F=F.replace(".",""):S=F.length}for(P=0;F.charCodeAt(P)===48;P++);for(C=F.length;F.charCodeAt(--C)===48;);if(F=F.slice(P,++C)){if(C-=P,E&&w.DEBUG&&C>15&&(p>vf||p!==Oe(p)))throw Error(e0+A.s*p);if((S=S-P-1)>u)A.c=A.e=null;else if(S<c)A.c=[A.e=0];else{if(A.e=S,A.c=[],P=(S+1)%q,S<0&&(P+=q),P<C){for(P&&A.c.push(+F.slice(0,P)),C-=q;P<C;)A.c.push(+F.slice(P,P+=q));P=q-(F=F.slice(P)).length}else P-=C;for(;P--;F+="0");A.c.push(+F)}}else A.c=[A.e=0]}w.clone=ip,w.ROUND_UP=0,w.ROUND_DOWN=1,w.ROUND_CEIL=2,w.ROUND_FLOOR=3,w.ROUND_HALF_UP=4,w.ROUND_HALF_DOWN=5,w.ROUND_HALF_EVEN=6,w.ROUND_HALF_CEIL=7,w.ROUND_HALF_FLOOR=8,w.EUCLID=9,w.config=w.set=function(p){var m,b;if(p!=null)if(typeof p=="object"){if(p.hasOwnProperty(m="DECIMAL_PLACES")&&(b=p[m],te(b,0,fe,m),a=b),p.hasOwnProperty(m="ROUNDING_MODE")&&(b=p[m],te(b,0,8,m),s=b),p.hasOwnProperty(m="EXPONENTIAL_AT")&&(b=p[m],b&&b.pop?(te(b[0],-fe,0,m),te(b[1],0,fe,m),l=b[0],f=b[1]):(te(b,-fe,fe,m),l=-(f=b<0?-b:b))),p.hasOwnProperty(m="RANGE"))if(b=p[m],b&&b.pop)te(b[0],-fe,-1,m),te(b[1],1,fe,m),c=b[0],u=b[1];else if(te(b,-fe,fe,m),b)c=-(u=b<0?-b:b);else throw Error(ve+m+" cannot be zero: "+b);if(p.hasOwnProperty(m="CRYPTO"))if(b=p[m],b===!!b)if(b)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))d=b;else throw d=!b,Error(ve+"crypto unavailable");else d=b;else throw Error(ve+m+" not true or false: "+b);if(p.hasOwnProperty(m="MODULO_MODE")&&(b=p[m],te(b,0,9,m),h=b),p.hasOwnProperty(m="POW_PRECISION")&&(b=p[m],te(b,0,fe,m),g=b),p.hasOwnProperty(m="FORMAT"))if(b=p[m],typeof b=="object")x=b;else throw Error(ve+m+" not an object: "+b);if(p.hasOwnProperty(m="ALPHABET"))if(b=p[m],typeof b=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(b))_=b.slice(0,10)=="0123456789",T=b;else throw Error(ve+m+" invalid: "+b)}else throw Error(ve+"Object expected: "+p);return{DECIMAL_PLACES:a,ROUNDING_MODE:s,EXPONENTIAL_AT:[l,f],RANGE:[c,u],CRYPTO:d,MODULO_MODE:h,POW_PRECISION:g,FORMAT:x,ALPHABET:T}},w.isBigNumber=function(p){if(!p||p._isBigNumber!==!0)return!1;if(!w.DEBUG)return!0;var m,b,y=p.c,v=p.e,S=p.s;e:if({}.toString.call(y)=="[object Array]"){if((S===1||S===-1)&&v>=-fe&&v<=fe&&v===Oe(v)){if(y[0]===0){if(v===0&&y.length===1)return!0;break e}if(m=(v+1)%q,m<1&&(m+=q),String(y[0]).length==m){for(m=0;m<y.length;m++)if(b=y[m],b<0||b>=We||b!==Oe(b))break e;if(b!==0)return!0}}}else if(y===null&&v===null&&(S===null||S===1||S===-1))return!0;throw Error(ve+"Invalid BigNumber: "+p)},w.maximum=w.max=function(){return M(arguments,-1)},w.minimum=w.min=function(){return M(arguments,1)},w.random=function(){var p=9007199254740992,m=Math.random()*p&2097151?function(){return Oe(Math.random()*p)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(b){var y,v,S,P,E,C=0,F=[],A=new w(o);if(b==null?b=a:te(b,0,fe),P=xf(b/q),d)if(crypto.getRandomValues){for(y=crypto.getRandomValues(new Uint32Array(P*=2));C<P;)E=y[C]*131072+(y[C+1]>>>11),E>=9e15?(v=crypto.getRandomValues(new Uint32Array(2)),y[C]=v[0],y[C+1]=v[1]):(F.push(E%1e14),C+=2);C=P/2}else if(crypto.randomBytes){for(y=crypto.randomBytes(P*=7);C<P;)E=(y[C]&31)*281474976710656+y[C+1]*1099511627776+y[C+2]*4294967296+y[C+3]*16777216+(y[C+4]<<16)+(y[C+5]<<8)+y[C+6],E>=9e15?crypto.randomBytes(7).copy(y,C):(F.push(E%1e14),C+=7);C=P/7}else throw d=!1,Error(ve+"crypto unavailable");if(!d)for(;C<P;)E=m(),E<9e15&&(F[C++]=E%1e14);for(P=F[--C],b%=q,P&&b&&(E=wf[q-b],F[C]=Oe(P/E)*E);F[C]===0;F.pop(),C--);if(C<0)F=[S=0];else{for(S=-1;F[0]===0;F.splice(0,1),S-=q);for(C=1,E=F[0];E>=10;E/=10,C++);C<q&&(S-=q-C)}return A.e=S,A.c=F,A}}(),w.sum=function(){for(var p=1,m=arguments,b=new w(m[0]);p<m.length;)b=b.plus(m[p++]);return b},r=function(){var p="0123456789";function m(b,y,v,S){for(var P,E=[0],C,F=0,A=b.length;F<A;){for(C=E.length;C--;E[C]*=y);for(E[0]+=S.indexOf(b.charAt(F++)),P=0;P<E.length;P++)E[P]>v-1&&(E[P+1]==null&&(E[P+1]=0),E[P+1]+=E[P]/v|0,E[P]%=v)}return E.reverse()}return function(b,y,v,S,P){var E,C,F,A,B,z,U,Z,re=b.indexOf("."),ae=a,H=s;for(re>=0&&(A=g,g=0,b=b.replace(".",""),Z=new w(y),z=Z.pow(b.length-re),g=A,Z.c=m(St(Be(z.c),z.e,"0"),10,v,p),Z.e=Z.c.length),U=m(b,y,v,P?(E=T,p):(E=p,T)),F=A=U.length;U[--A]==0;U.pop());if(!U[0])return E.charAt(0);if(re<0?--F:(z.c=U,z.e=F,z.s=S,z=t(z,Z,ae,H,v),U=z.c,B=z.r,F=z.e),C=F+ae+1,re=U[C],A=v/2,B=B||C<0||U[C+1]!=null,B=H<4?(re!=null||B)&&(H==0||H==(z.s<0?3:2)):re>A||re==A&&(H==4||B||H==6&&U[C-1]&1||H==(z.s<0?8:7)),C<1||!U[0])b=B?St(E.charAt(1),-ae,E.charAt(0)):E.charAt(0);else{if(U.length=C,B)for(--v;++U[--C]>v;)U[C]=0,C||(++F,U=[1].concat(U));for(A=U.length;!U[--A];);for(re=0,b="";re<=A;b+=E.charAt(U[re++]));b=St(b,F,E.charAt(0))}return b}}(),t=function(){function p(y,v,S){var P,E,C,F,A=0,B=y.length,z=v%$t,U=v/$t|0;for(y=y.slice();B--;)C=y[B]%$t,F=y[B]/$t|0,P=U*C+F*z,E=z*C+P%$t*$t+A,A=(E/S|0)+(P/$t|0)+U*F,y[B]=E%S;return A&&(y=[A].concat(y)),y}function m(y,v,S,P){var E,C;if(S!=P)C=S>P?1:-1;else for(E=C=0;E<S;E++)if(y[E]!=v[E]){C=y[E]>v[E]?1:-1;break}return C}function b(y,v,S,P){for(var E=0;S--;)y[S]-=E,E=y[S]<v[S]?1:0,y[S]=E*P+y[S]-v[S];for(;!y[0]&&y.length>1;y.splice(0,1));}return function(y,v,S,P,E){var C,F,A,B,z,U,Z,re,ae,H,K,ce,Ui,Ua,qa,Qe,hn,Pe=y.s==v.s?1:-1,he=y.c,ne=v.c;if(!he||!he[0]||!ne||!ne[0])return new w(!y.s||!v.s||(he?ne&&he[0]==ne[0]:!ne)?NaN:he&&he[0]==0||!ne?Pe*0:Pe/0);for(re=new w(Pe),ae=re.c=[],F=y.e-v.e,Pe=S+F+1,E||(E=We,F=Re(y.e/q)-Re(v.e/q),Pe=Pe/q|0),A=0;ne[A]==(he[A]||0);A++);if(ne[A]>(he[A]||0)&&F--,Pe<0)ae.push(1),B=!0;else{for(Ua=he.length,Qe=ne.length,A=0,Pe+=2,z=Oe(E/(ne[0]+1)),z>1&&(ne=p(ne,z,E),he=p(he,z,E),Qe=ne.length,Ua=he.length),Ui=Qe,H=he.slice(0,Qe),K=H.length;K<Qe;H[K++]=0);hn=ne.slice(),hn=[0].concat(hn),qa=ne[0],ne[1]>=E/2&&qa++;do{if(z=0,C=m(ne,H,Qe,K),C<0){if(ce=H[0],Qe!=K&&(ce=ce*E+(H[1]||0)),z=Oe(ce/qa),z>1)for(z>=E&&(z=E-1),U=p(ne,z,E),Z=U.length,K=H.length;m(U,H,Z,K)==1;)z--,b(U,Qe<Z?hn:ne,Z,E),Z=U.length,C=1;else z==0&&(C=z=1),U=ne.slice(),Z=U.length;if(Z<K&&(U=[0].concat(U)),b(H,U,K,E),K=H.length,C==-1)for(;m(ne,H,Qe,K)<1;)z++,b(H,Qe<K?hn:ne,K,E),K=H.length}else C===0&&(z++,H=[0]);ae[A++]=z,H[0]?H[K++]=he[Ui]||0:(H=[he[Ui]],K=1)}while((Ui++<Ua||H[0]!=null)&&Pe--);B=H[0]!=null,ae[0]||ae.splice(0,1)}if(E==We){for(A=1,Pe=ae[0];Pe>=10;Pe/=10,A++);R(re,S+(re.e=A+F*q-1)+1,P,B)}else re.e=F,re.r=+B;return re}}();function k(p,m,b,y){var v,S,P,E,C;if(b==null?b=s:te(b,0,8),!p.c)return p.toString();if(v=p.c[0],P=p.e,m==null)C=Be(p.c),C=y==1||y==2&&(P<=l||P>=f)?ra(C,P):St(C,P,"0");else if(p=R(new w(p),m,b),S=p.e,C=Be(p.c),E=C.length,y==1||y==2&&(m<=S||S<=l)){for(;E<m;C+="0",E++);C=ra(C,S)}else if(m-=P,C=St(C,S,"0"),S+1>E){if(--m>0)for(C+=".";m--;C+="0");}else if(m+=S-E,m>0)for(S+1==E&&(C+=".");m--;C+="0");return p.s<0&&v?"-"+C:C}function M(p,m){for(var b,y,v=1,S=new w(p[0]);v<p.length;v++)y=new w(p[v]),(!y.s||(b=vr(S,y))===m||b===0&&S.s===m)&&(S=y);return S}function I(p,m,b){for(var y=1,v=m.length;!m[--v];m.pop());for(v=m[0];v>=10;v/=10,y++);return(b=y+b*q-1)>u?p.c=p.e=null:b<c?p.c=[p.e=0]:(p.e=b,p.c=m),p}n=function(){var p=/^(-?)0([xbo])(?=\w[\w.]*$)/i,m=/^([^.]+)\.$/,b=/^\.([^.]+)$/,y=/^-?(Infinity|NaN)$/,v=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(S,P,E,C){var F,A=E?P:P.replace(v,"");if(y.test(A))S.s=isNaN(A)?null:A<0?-1:1;else{if(!E&&(A=A.replace(p,function(B,z,U){return F=(U=U.toLowerCase())=="x"?16:U=="b"?2:8,!C||C==F?z:B}),C&&(F=C,A=A.replace(m,"$1").replace(b,"0.$1")),P!=A))return new w(A,F);if(w.DEBUG)throw Error(ve+"Not a"+(C?" base "+C:"")+" number: "+P);S.s=null}S.c=S.e=null}}();function R(p,m,b,y){var v,S,P,E,C,F,A,B=p.c,z=wf;if(B){e:{for(v=1,E=B[0];E>=10;E/=10,v++);if(S=m-v,S<0)S+=q,P=m,C=B[F=0],A=Oe(C/z[v-P-1]%10);else if(F=xf((S+1)/q),F>=B.length)if(y){for(;B.length<=F;B.push(0));C=A=0,v=1,S%=q,P=S-q+1}else break e;else{for(C=E=B[F],v=1;E>=10;E/=10,v++);S%=q,P=S-q+v,A=P<0?0:Oe(C/z[v-P-1]%10)}if(y=y||m<0||B[F+1]!=null||(P<0?C:C%z[v-P-1]),y=b<4?(A||y)&&(b==0||b==(p.s<0?3:2)):A>5||A==5&&(b==4||y||b==6&&(S>0?P>0?C/z[v-P]:0:B[F-1])%10&1||b==(p.s<0?8:7)),m<1||!B[0])return B.length=0,y?(m-=p.e+1,B[0]=z[(q-m%q)%q],p.e=-m||0):B[0]=p.e=0,p;if(S==0?(B.length=F,E=1,F--):(B.length=F+1,E=z[q-S],B[F]=P>0?Oe(C/z[v-P]%z[P])*E:0),y)for(;;)if(F==0){for(S=1,P=B[0];P>=10;P/=10,S++);for(P=B[0]+=E,E=1;P>=10;P/=10,E++);S!=E&&(p.e++,B[0]==We&&(B[0]=1));break}else{if(B[F]+=E,B[F]!=We)break;B[F--]=0,E=1}for(S=B.length;B[--S]===0;B.pop());}p.e>u?p.c=p.e=null:p.e<c&&(p.c=[p.e=0])}return p}function N(p){var m,b=p.e;return b===null?p.toString():(m=Be(p.c),m=b<=l||b>=f?ra(m,b):St(m,b,"0"),p.s<0?"-"+m:m)}return i.absoluteValue=i.abs=function(){var p=new w(this);return p.s<0&&(p.s=1),p},i.comparedTo=function(p,m){return vr(this,new w(p,m))},i.decimalPlaces=i.dp=function(p,m){var b,y,v,S=this;if(p!=null)return te(p,0,fe),m==null?m=s:te(m,0,8),R(new w(S),p+S.e+1,m);if(!(b=S.c))return null;if(y=((v=b.length-1)-Re(this.e/q))*q,v=b[v])for(;v%10==0;v/=10,y--);return y<0&&(y=0),y},i.dividedBy=i.div=function(p,m){return t(this,new w(p,m),a,s)},i.dividedToIntegerBy=i.idiv=function(p,m){return t(this,new w(p,m),0,1)},i.exponentiatedBy=i.pow=function(p,m){var b,y,v,S,P,E,C,F,A,B=this;if(p=new w(p),p.c&&!p.isInteger())throw Error(ve+"Exponent not an integer: "+N(p));if(m!=null&&(m=new w(m)),E=p.e>14,!B.c||!B.c[0]||B.c[0]==1&&!B.e&&B.c.length==1||!p.c||!p.c[0])return A=new w(Math.pow(+N(B),E?p.s*(2-ta(p)):+N(p))),m?A.mod(m):A;if(C=p.s<0,m){if(m.c?!m.c[0]:!m.s)return new w(NaN);y=!C&&B.isInteger()&&m.isInteger(),y&&(B=B.mod(m))}else{if(p.e>9&&(B.e>0||B.e<-1||(B.e==0?B.c[0]>1||E&&B.c[1]>=24e7:B.c[0]<8e13||E&&B.c[0]<=9999975e7)))return S=B.s<0&&ta(p)?-0:0,B.e>-1&&(S=1/S),new w(C?1/S:S);g&&(S=xf(g/q+2))}for(E?(b=new w(.5),C&&(p.s=1),F=ta(p)):(v=Math.abs(+N(p)),F=v%2),A=new w(o);;){if(F){if(A=A.times(B),!A.c)break;S?A.c.length>S&&(A.c.length=S):y&&(A=A.mod(m))}if(v){if(v=Oe(v/2),v===0)break;F=v%2}else if(p=p.times(b),R(p,p.e+1,1),p.e>14)F=ta(p);else{if(v=+N(p),v===0)break;F=v%2}B=B.times(B),S?B.c&&B.c.length>S&&(B.c.length=S):y&&(B=B.mod(m))}return y?A:(C&&(A=o.div(A)),m?A.mod(m):S?R(A,g,s,P):A)},i.integerValue=function(p){var m=new w(this);return p==null?p=s:te(p,0,8),R(m,m.e+1,p)},i.isEqualTo=i.eq=function(p,m){return vr(this,new w(p,m))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(p,m){return vr(this,new w(p,m))>0},i.isGreaterThanOrEqualTo=i.gte=function(p,m){return(m=vr(this,new w(p,m)))===1||m===0},i.isInteger=function(){return!!this.c&&Re(this.e/q)>this.c.length-2},i.isLessThan=i.lt=function(p,m){return vr(this,new w(p,m))<0},i.isLessThanOrEqualTo=i.lte=function(p,m){return(m=vr(this,new w(p,m)))===-1||m===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(p,m){var b,y,v,S,P=this,E=P.s;if(p=new w(p,m),m=p.s,!E||!m)return new w(NaN);if(E!=m)return p.s=-m,P.plus(p);var C=P.e/q,F=p.e/q,A=P.c,B=p.c;if(!C||!F){if(!A||!B)return A?(p.s=-m,p):new w(B?P:NaN);if(!A[0]||!B[0])return B[0]?(p.s=-m,p):new w(A[0]?P:s==3?-0:0)}if(C=Re(C),F=Re(F),A=A.slice(),E=C-F){for((S=E<0)?(E=-E,v=A):(F=C,v=B),v.reverse(),m=E;m--;v.push(0));v.reverse()}else for(y=(S=(E=A.length)<(m=B.length))?E:m,E=m=0;m<y;m++)if(A[m]!=B[m]){S=A[m]<B[m];break}if(S&&(v=A,A=B,B=v,p.s=-p.s),m=(y=B.length)-(b=A.length),m>0)for(;m--;A[b++]=0);for(m=We-1;y>E;){if(A[--y]<B[y]){for(b=y;b&&!A[--b];A[b]=m);--A[b],A[y]+=We}A[y]-=B[y]}for(;A[0]==0;A.splice(0,1),--F);return A[0]?I(p,A,F):(p.s=s==3?-1:1,p.c=[p.e=0],p)},i.modulo=i.mod=function(p,m){var b,y,v=this;return p=new w(p,m),!v.c||!p.s||p.c&&!p.c[0]?new w(NaN):!p.c||v.c&&!v.c[0]?new w(v):(h==9?(y=p.s,p.s=1,b=t(v,p,0,3),p.s=y,b.s*=y):b=t(v,p,0,h),p=v.minus(b.times(p)),!p.c[0]&&h==1&&(p.s=v.s),p)},i.multipliedBy=i.times=function(p,m){var b,y,v,S,P,E,C,F,A,B,z,U,Z,re,ae,H=this,K=H.c,ce=(p=new w(p,m)).c;if(!K||!ce||!K[0]||!ce[0])return!H.s||!p.s||K&&!K[0]&&!ce||ce&&!ce[0]&&!K?p.c=p.e=p.s=null:(p.s*=H.s,!K||!ce?p.c=p.e=null:(p.c=[0],p.e=0)),p;for(y=Re(H.e/q)+Re(p.e/q),p.s*=H.s,C=K.length,B=ce.length,C<B&&(Z=K,K=ce,ce=Z,v=C,C=B,B=v),v=C+B,Z=[];v--;Z.push(0));for(re=We,ae=$t,v=B;--v>=0;){for(b=0,z=ce[v]%ae,U=ce[v]/ae|0,P=C,S=v+P;S>v;)F=K[--P]%ae,A=K[P]/ae|0,E=U*F+A*z,F=z*F+E%ae*ae+Z[S]+b,b=(F/re|0)+(E/ae|0)+U*A,Z[S--]=F%re;Z[S]=b}return b?++y:Z.splice(0,1),I(p,Z,y)},i.negated=function(){var p=new w(this);return p.s=-p.s||null,p},i.plus=function(p,m){var b,y=this,v=y.s;if(p=new w(p,m),m=p.s,!v||!m)return new w(NaN);if(v!=m)return p.s=-m,y.minus(p);var S=y.e/q,P=p.e/q,E=y.c,C=p.c;if(!S||!P){if(!E||!C)return new w(v/0);if(!E[0]||!C[0])return C[0]?p:new w(E[0]?y:v*0)}if(S=Re(S),P=Re(P),E=E.slice(),v=S-P){for(v>0?(P=S,b=C):(v=-v,b=E),b.reverse();v--;b.push(0));b.reverse()}for(v=E.length,m=C.length,v-m<0&&(b=C,C=E,E=b,m=v),v=0;m;)v=(E[--m]=E[m]+C[m]+v)/We|0,E[m]=We===E[m]?0:E[m]%We;return v&&(E=[v].concat(E),++P),I(p,E,P)},i.precision=i.sd=function(p,m){var b,y,v,S=this;if(p!=null&&p!==!!p)return te(p,1,fe),m==null?m=s:te(m,0,8),R(new w(S),p,m);if(!(b=S.c))return null;if(v=b.length-1,y=v*q+1,v=b[v]){for(;v%10==0;v/=10,y--);for(v=b[0];v>=10;v/=10,y++);}return p&&S.e+1>y&&(y=S.e+1),y},i.shiftedBy=function(p){return te(p,-vf,vf),this.times("1e"+p)},i.squareRoot=i.sqrt=function(){var p,m,b,y,v,S=this,P=S.c,E=S.s,C=S.e,F=a+4,A=new w("0.5");if(E!==1||!P||!P[0])return new w(!E||E<0&&(!P||P[0])?NaN:P?S:1/0);if(E=Math.sqrt(+N(S)),E==0||E==1/0?(m=Be(P),(m.length+C)%2==0&&(m+="0"),E=Math.sqrt(+m),C=Re((C+1)/2)-(C<0||C%2),E==1/0?m="5e"+C:(m=E.toExponential(),m=m.slice(0,m.indexOf("e")+1)+C),b=new w(m)):b=new w(E+""),b.c[0]){for(C=b.e,E=C+F,E<3&&(E=0);;)if(v=b,b=A.times(v.plus(t(S,v,F,1))),Be(v.c).slice(0,E)===(m=Be(b.c)).slice(0,E))if(b.e<C&&--E,m=m.slice(E-3,E+1),m=="9999"||!y&&m=="4999"){if(!y&&(R(v,v.e+a+2,0),v.times(v).eq(S))){b=v;break}F+=4,E+=4,y=1}else{(!+m||!+m.slice(1)&&m.charAt(0)=="5")&&(R(b,b.e+a+2,1),p=!b.times(b).eq(S));break}}return R(b,b.e+a+1,s,p)},i.toExponential=function(p,m){return p!=null&&(te(p,0,fe),p++),k(this,p,m,1)},i.toFixed=function(p,m){return p!=null&&(te(p,0,fe),p=p+this.e+1),k(this,p,m)},i.toFormat=function(p,m,b){var y,v=this;if(b==null)p!=null&&m&&typeof m=="object"?(b=m,m=null):p&&typeof p=="object"?(b=p,p=m=null):b=x;else if(typeof b!="object")throw Error(ve+"Argument not an object: "+b);if(y=v.toFixed(p,m),v.c){var S,P=y.split("."),E=+b.groupSize,C=+b.secondaryGroupSize,F=b.groupSeparator||"",A=P[0],B=P[1],z=v.s<0,U=z?A.slice(1):A,Z=U.length;if(C&&(S=E,E=C,C=S,Z-=S),E>0&&Z>0){for(S=Z%E||E,A=U.substr(0,S);S<Z;S+=E)A+=F+U.substr(S,E);C>0&&(A+=F+U.slice(S)),z&&(A="-"+A)}y=B?A+(b.decimalSeparator||"")+((C=+b.fractionGroupSize)?B.replace(new RegExp("\\d{"+C+"}\\B","g"),"$&"+(b.fractionGroupSeparator||"")):B):A}return(b.prefix||"")+y+(b.suffix||"")},i.toFraction=function(p){var m,b,y,v,S,P,E,C,F,A,B,z,U=this,Z=U.c;if(p!=null&&(E=new w(p),!E.isInteger()&&(E.c||E.s!==1)||E.lt(o)))throw Error(ve+"Argument "+(E.isInteger()?"out of range: ":"not an integer: ")+N(E));if(!Z)return new w(U);for(m=new w(o),F=b=new w(o),y=C=new w(o),z=Be(Z),S=m.e=z.length-U.e-1,m.c[0]=wf[(P=S%q)<0?q+P:P],p=!p||E.comparedTo(m)>0?S>0?m:F:E,P=u,u=1/0,E=new w(z),C.c[0]=0;A=t(E,m,0,1),v=b.plus(A.times(y)),v.comparedTo(p)!=1;)b=y,y=v,F=C.plus(A.times(v=F)),C=v,m=E.minus(A.times(v=m)),E=v;return v=t(p.minus(b),y,0,1),C=C.plus(v.times(F)),b=b.plus(v.times(y)),C.s=F.s=U.s,S=S*2,B=t(F,y,S,s).minus(U).abs().comparedTo(t(C,b,S,s).minus(U).abs())<1?[F,y]:[C,b],u=P,B},i.toNumber=function(){return+N(this)},i.toPrecision=function(p,m){return p!=null&&te(p,1,fe),k(this,p,m,2)},i.toString=function(p){var m,b=this,y=b.s,v=b.e;return v===null?y?(m="Infinity",y<0&&(m="-"+m)):m="NaN":(p==null?m=v<=l||v>=f?ra(Be(b.c),v):St(Be(b.c),v,"0"):p===10&&_?(b=R(new w(b),a+v+1,s),m=St(Be(b.c),b.e,"0")):(te(p,2,T.length,"Base"),m=r(St(Be(b.c),v,"0"),10,p,y,!0)),y<0&&b.c[0]&&(m="-"+m)),m},i.valueOf=i.toJSON=function(){return N(this)},i._isBigNumber=!0,i[Symbol.toStringTag]="BigNumber",i[Symbol.for("nodejs.util.inspect.custom")]=i.valueOf,e!=null&&w.set(e),w}function Re(e){var t=e|0;return e>0||e===t?t:t-1}function Be(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=q-t.length;r--;t="0"+t);o+=t}for(i=o.length;o.charCodeAt(--i)===48;);return o.slice(0,i+1||1)}function vr(e,t){var r,n,i=e.c,o=t.c,a=e.s,s=t.s,l=e.e,f=t.e;if(!a||!s)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=l==f,!i||!o)return n?0:!i^r?1:-1;if(!n)return l>f^r?1:-1;for(s=(l=i.length)<(f=o.length)?l:f,a=0;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return l==f?0:l>f^r?1:-1}function te(e,t,r,n){if(e<t||e>r||e!==Oe(e))throw Error(ve+(n||"Argument")+(typeof e=="number"?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function ta(e){var t=e.c.length-1;return Re(e.e/q)==t&&e.c[t]%2!=0}function ra(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function St(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(n=e.length,++t>n){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var Cv=ip(),dt=Cv,Av=class{constructor(e){D(this,"key"),D(this,"left",null),D(this,"right",null),this.key=e}},Ei=class extends Av{constructor(e){super(e)}},Pv=class{constructor(){D(this,"size",0),D(this,"modificationCount",0),D(this,"splayCount",0)}splay(e){let t=this.root;if(t==null)return this.compare(e,e),-1;let r=null,n=null,i=null,o=null,a=t,s=this.compare,l;for(;;)if(l=s(a.key,e),l>0){let f=a.left;if(f==null||(l=s(f.key,e),l>0&&(a.left=f.right,f.right=a,a=f,f=a.left,f==null)))break;r==null?n=a:r.left=a,r=a,a=f}else if(l<0){let f=a.right;if(f==null||(l=s(f.key,e),l<0&&(a.right=f.left,f.left=a,a=f,f=a.right,f==null)))break;i==null?o=a:i.right=a,i=a,a=f}else break;return i!=null&&(i.right=a.left,a.left=o),r!=null&&(r.left=a.right,a.right=n),this.root!==a&&(this.root=a,this.splayCount++),l}splayMin(e){let t=e,r=t.left;for(;r!=null;){let n=r;t.left=n.right,n.right=t,t=n,r=t.left}return t}splayMax(e){let t=e,r=t.right;for(;r!=null;){let n=r;t.right=n.left,n.left=t,t=n,r=t.right}return t}_delete(e){if(this.root==null||this.splay(e)!=0)return null;let r=this.root,n=r,i=r.left;if(this.size--,i==null)this.root=r.right;else{let o=r.right;r=this.splayMax(i),r.right=o,this.root=r}return this.modificationCount++,n}addNewRoot(e,t){this.size++,this.modificationCount++;let r=this.root;if(r==null){this.root=e;return}t<0?(e.left=r,e.right=r.right,r.right=null):(e.right=r,e.left=r.left,r.left=null),this.root=e}_first(){let e=this.root;return e==null?null:(this.root=this.splayMin(e),this.root)}_last(){let e=this.root;return e==null?null:(this.root=this.splayMax(e),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(e){return this.validKey(e)&&this.splay(e)==0}defaultCompare(){return(e,t)=>e<t?-1:e>t?1:0}wrap(){return{getRoot:()=>this.root,setRoot:e=>{this.root=e},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:e=>{this.splayCount=e},splay:e=>this.splay(e),has:e=>this.has(e)}}},t0,r0,ha=class Ci extends Pv{constructor(t,r){super(),D(this,"root",null),D(this,"compare"),D(this,"validKey"),D(this,t0,"[object Set]"),this.compare=t??this.defaultCompare(),this.validKey=r??(n=>n!=null&&n!=null)}delete(t){return this.validKey(t)?this._delete(t)!=null:!1}deleteAll(t){for(let r of t)this.delete(r)}forEach(t){let r=this[Symbol.iterator](),n;for(;n=r.next(),!n.done;)t(n.value,n.value,this)}add(t){let r=this.splay(t);return r!=0&&this.addNewRoot(new Ei(t),r),this}addAndReturn(t){let r=this.splay(t);return r!=0&&this.addNewRoot(new Ei(t),r),this.root.key}addAll(t){for(let r of t)this.add(r)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(this.size==0)throw"Bad state: No element";return this._first().key}last(){if(this.size==0)throw"Bad state: No element";return this._last().key}lastBefore(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)<0)return this.root.key;let n=this.root.left;if(n==null)return null;let i=n.right;for(;i!=null;)n=i,i=n.right;return n.key}firstAfter(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)>0)return this.root.key;let n=this.root.right;if(n==null)return null;let i=n.left;for(;i!=null;)n=i,i=n.left;return n.key}retainAll(t){let r=new Ci(this.compare,this.validKey),n=this.modificationCount;for(let i of t){if(n!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(i)&&this.splay(i)==0&&r.add(this.root.key)}r.size!=this.size&&(this.root=r.root,this.size=r.size,this.modificationCount++)}lookup(t){return!this.validKey(t)||this.splay(t)!=0?null:this.root.key}intersection(t){let r=new Ci(this.compare,this.validKey);for(let n of this)t.has(n)&&r.add(n);return r}difference(t){let r=new Ci(this.compare,this.validKey);for(let n of this)t.has(n)||r.add(n);return r}union(t){let r=this.clone();return r.addAll(t),r}clone(){let t=new Ci(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(t){if(t==null)return null;function r(i,o){let a,s;do{if(a=i.left,s=i.right,a!=null){let l=new Ei(a.key);o.left=l,r(a,l)}if(s!=null){let l=new Ei(s.key);o.right=l,i=s,o=l}}while(s!=null)}let n=new Ei(t.key);return r(t,n),n}toSet(){return this.clone()}entries(){return new kv(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(r0=Symbol.iterator,t0=Symbol.toStringTag,r0)](){return new Fv(this.wrap())}},op=class{constructor(e){D(this,"tree"),D(this,"path",new Array),D(this,"modificationCount",null),D(this,"splayCount"),this.tree=e,this.splayCount=e.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let e=this.path[this.path.length-1];return this.getValue(e)}rebuildPath(e){this.path.splice(0,this.path.length),this.tree.splay(e),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(e){for(;e!=null;)this.path.push(e),e=e.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let r=this.tree.getRoot();for(;r!=null;)this.path.push(r),r=r.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let e=this.path[this.path.length-1],t=e.right;if(t!=null){for(;t!=null;)this.path.push(t),t=t.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===e;)e=this.path.pop();return this.path.length>0}},Fv=class extends op{getValue(e){return e.key}},kv=class extends op{getValue(e){return[e.key,e.key]}},ap=e=>()=>e,Lf=e=>{let t=e?(r,n)=>n.minus(r).abs().isLessThanOrEqualTo(e):ap(!1);return(r,n)=>t(r,n)?0:r.comparedTo(n)};function Lv(e){let t=e?(r,n,i,o,a)=>r.exponentiatedBy(2).isLessThanOrEqualTo(o.minus(n).exponentiatedBy(2).plus(a.minus(i).exponentiatedBy(2)).times(e)):ap(!1);return(r,n,i)=>{let o=r.x,a=r.y,s=i.x,l=i.y,f=a.minus(l).times(n.x.minus(s)).minus(o.minus(s).times(n.y.minus(l)));return t(f,o,a,s,l)?0:f.comparedTo(0)}}var Mv=e=>e,Iv=e=>{if(e){let t=new ha(Lf(e)),r=new ha(Lf(e)),n=(o,a)=>a.addAndReturn(o),i=o=>({x:n(o.x,t),y:n(o.y,r)});return i({x:new dt(0),y:new dt(0)}),i}return Mv},Mf=e=>({set:t=>{Ft=Mf(t)},reset:()=>Mf(e),compare:Lf(e),snap:Iv(e),orient:Lv(e)}),Ft=Mf(),Si=(e,t)=>e.ll.x.isLessThanOrEqualTo(t.x)&&t.x.isLessThanOrEqualTo(e.ur.x)&&e.ll.y.isLessThanOrEqualTo(t.y)&&t.y.isLessThanOrEqualTo(e.ur.y),If=(e,t)=>{if(t.ur.x.isLessThan(e.ll.x)||e.ur.x.isLessThan(t.ll.x)||t.ur.y.isLessThan(e.ll.y)||e.ur.y.isLessThan(t.ll.y))return null;let r=e.ll.x.isLessThan(t.ll.x)?t.ll.x:e.ll.x,n=e.ur.x.isLessThan(t.ur.x)?e.ur.x:t.ur.x,i=e.ll.y.isLessThan(t.ll.y)?t.ll.y:e.ll.y,o=e.ur.y.isLessThan(t.ur.y)?e.ur.y:t.ur.y;return{ll:{x:r,y:i},ur:{x:n,y:o}}},sa=(e,t)=>e.x.times(t.y).minus(e.y.times(t.x)),sp=(e,t)=>e.x.times(t.x).plus(e.y.times(t.y)),pa=e=>sp(e,e).sqrt(),Bv=(e,t,r)=>{let n={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:r.x.minus(e.x),y:r.y.minus(e.y)};return sa(i,n).div(pa(i)).div(pa(n))},Ov=(e,t,r)=>{let n={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:r.x.minus(e.x),y:r.y.minus(e.y)};return sp(i,n).div(pa(i)).div(pa(n))},n0=(e,t,r)=>t.y.isZero()?null:{x:e.x.plus(t.x.div(t.y).times(r.minus(e.y))),y:r},i0=(e,t,r)=>t.x.isZero()?null:{x:r,y:e.y.plus(t.y.div(t.x).times(r.minus(e.x)))},Rv=(e,t,r,n)=>{if(t.x.isZero())return i0(r,n,e.x);if(n.x.isZero())return i0(e,t,r.x);if(t.y.isZero())return n0(r,n,e.y);if(n.y.isZero())return n0(e,t,r.y);let i=sa(t,n);if(i.isZero())return null;let o={x:r.x.minus(e.x),y:r.y.minus(e.y)},a=sa(o,t).div(i),s=sa(o,n).div(i),l=e.x.plus(s.times(t.x)),f=r.x.plus(a.times(n.x)),c=e.y.plus(s.times(t.y)),u=r.y.plus(a.times(n.y)),d=l.plus(f).div(2),h=c.plus(u).div(2);return{x:d,y:h}},ut=class fp{constructor(t,r){D(this,"point"),D(this,"isLeft"),D(this,"segment"),D(this,"otherSE"),D(this,"consumedBy"),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=r}static compare(t,r){let n=fp.comparePoints(t.point,r.point);return n!==0?n:(t.point!==r.point&&t.link(r),t.isLeft!==r.isLeft?t.isLeft?1:-1:ga.compare(t.segment,r.segment))}static comparePoints(t,r){return t.x.isLessThan(r.x)?-1:t.x.isGreaterThan(r.x)?1:t.y.isLessThan(r.y)?-1:t.y.isGreaterThan(r.y)?1:0}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");let r=t.point.events;for(let n=0,i=r.length;n<i;n++){let o=r[n];this.point.events.push(o),o.point=this.point}this.checkForConsuming()}checkForConsuming(){let t=this.point.events.length;for(let r=0;r<t;r++){let n=this.point.events[r];if(n.segment.consumedBy===void 0)for(let i=r+1;i<t;i++){let o=this.point.events[i];o.consumedBy===void 0&&n.otherSE.point.events===o.otherSE.point.events&&n.segment.consume(o.segment)}}}getAvailableLinkedEvents(){let t=[];for(let r=0,n=this.point.events.length;r<n;r++){let i=this.point.events[r];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){let r=new Map,n=i=>{let o=i.otherSE;r.set(i,{sine:Bv(this.point,t.point,o.point),cosine:Ov(this.point,t.point,o.point)})};return(i,o)=>{r.has(i)||n(i),r.has(o)||n(o);let{sine:a,cosine:s}=r.get(i),{sine:l,cosine:f}=r.get(o);return a.isGreaterThanOrEqualTo(0)&&l.isGreaterThanOrEqualTo(0)?s.isLessThan(f)?1:s.isGreaterThan(f)?-1:0:a.isLessThan(0)&&l.isLessThan(0)?s.isLessThan(f)?-1:s.isGreaterThan(f)?1:0:l.isLessThan(a)?-1:l.isGreaterThan(a)?1:0}}},Dv=class Bf{constructor(t){D(this,"events"),D(this,"poly"),D(this,"_isExteriorRing"),D(this,"_enclosingRing"),this.events=t;for(let r=0,n=t.length;r<n;r++)t[r].segment.ringOut=this;this.poly=null}static factory(t){let r=[];for(let n=0,i=t.length;n<i;n++){let o=t[n];if(!o.isInResult()||o.ringOut)continue;let a=null,s=o.leftSE,l=o.rightSE,f=[s],c=s.point,u=[];for(;a=s,s=l,f.push(s),s.point!==c;)for(;;){let d=s.getAvailableLinkedEvents();if(d.length===0){let x=f[0].point,T=f[f.length-1].point;throw new Error(`Unable to complete output ring starting at [${x.x}, ${x.y}]. Last matching segment found ends at [${T.x}, ${T.y}].`)}if(d.length===1){l=d[0].otherSE;break}let h=null;for(let x=0,T=u.length;x<T;x++)if(u[x].point===s.point){h=x;break}if(h!==null){let x=u.splice(h)[0],T=f.splice(x.index);T.unshift(T[0].otherSE),r.push(new Bf(T.reverse()));continue}u.push({index:f.length,point:s.point});let g=s.getLeftmostComparator(a);l=d.sort(g)[0].otherSE;break}r.push(new Bf(f))}return r}getGeom(){let t=this.events[0].point,r=[t];for(let f=1,c=this.events.length-1;f<c;f++){let u=this.events[f].point,d=this.events[f+1].point;Ft.orient(u,t,d)!==0&&(r.push(u),t=u)}if(r.length===1)return null;let n=r[0],i=r[1];Ft.orient(n,t,i)===0&&r.shift(),r.push(r[0]);let o=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:r.length-1,s=this.isExteriorRing()?r.length:-1,l=[];for(let f=a;f!=s;f+=o)l.push([r[f].x.toNumber(),r[f].y.toNumber()]);return l}isExteriorRing(){if(this._isExteriorRing===void 0){let t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,o=this.events.length;i<o;i++){let a=this.events[i];ut.compare(t,a)>0&&(t=a)}let r=t.segment.prevInResult(),n=r?r.prevInResult():null;for(;;){if(!r)return null;if(!n)return r.ringOut;if(n.ringOut!==r.ringOut)return n.ringOut?.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut?.enclosingRing();r=n.prevInResult(),n=r?r.prevInResult():null}}},o0=class{constructor(e){D(this,"exteriorRing"),D(this,"interiorRings"),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){let e=this.exteriorRing.getGeom();if(e===null)return null;let t=[e];for(let r=0,n=this.interiorRings.length;r<n;r++){let i=this.interiorRings[r].getGeom();i!==null&&t.push(i)}return t}},Nv=class{constructor(e){D(this,"rings"),D(this,"polys"),this.rings=e,this.polys=this._composePolys(e)}getGeom(){let e=[];for(let t=0,r=this.polys.length;t<r;t++){let n=this.polys[t].getGeom();n!==null&&e.push(n)}return e}_composePolys(e){let t=[];for(let r=0,n=e.length;r<n;r++){let i=e[r];if(!i.poly)if(i.isExteriorRing())t.push(new o0(i));else{let o=i.enclosingRing();o?.poly||t.push(new o0(o)),o?.poly?.addInterior(i)}}return t}},zv=class{constructor(e,t=ga.compare){D(this,"queue"),D(this,"tree"),D(this,"segments"),this.queue=e,this.tree=new ha(t),this.segments=[]}process(e){let t=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.delete(e.otherSE):this.tree.delete(t),r;e.isLeft&&this.tree.add(t);let n=t,i=t;do n=this.tree.lastBefore(n);while(n!=null&&n.consumedBy!=null);do i=this.tree.firstAfter(i);while(i!=null&&i.consumedBy!=null);if(e.isLeft){let o=null;if(n){let s=n.getIntersection(t);if(s!==null&&(t.isAnEndpoint(s)||(o=s),!n.isAnEndpoint(s))){let l=this._splitSafely(n,s);for(let f=0,c=l.length;f<c;f++)r.push(l[f])}}let a=null;if(i){let s=i.getIntersection(t);if(s!==null&&(t.isAnEndpoint(s)||(a=s),!i.isAnEndpoint(s))){let l=this._splitSafely(i,s);for(let f=0,c=l.length;f<c;f++)r.push(l[f])}}if(o!==null||a!==null){let s=null;o===null?s=a:a===null?s=o:s=ut.comparePoints(o,a)<=0?o:a,this.queue.delete(t.rightSE),r.push(t.rightSE);let l=t.split(s);for(let f=0,c=l.length;f<c;f++)r.push(l[f])}r.length>0?(this.tree.delete(t),r.push(e)):(this.segments.push(t),t.prev=n)}else{if(n&&i){let o=n.getIntersection(i);if(o!==null){if(!n.isAnEndpoint(o)){let a=this._splitSafely(n,o);for(let s=0,l=a.length;s<l;s++)r.push(a[s])}if(!i.isAnEndpoint(o)){let a=this._splitSafely(i,o);for(let s=0,l=a.length;s<l;s++)r.push(a[s])}}}this.tree.delete(t)}return r}_splitSafely(e,t){this.tree.delete(e);let r=e.rightSE;this.queue.delete(r);let n=e.split(t);return n.push(r),e.consumedBy===void 0&&this.tree.add(e),n}},Uv=class{constructor(){D(this,"type"),D(this,"numMultiPolys")}run(e,t,r){Ai.type=e;let n=[new s0(t,!0)];for(let f=0,c=r.length;f<c;f++)n.push(new s0(r[f],!1));if(Ai.numMultiPolys=n.length,Ai.type==="difference"){let f=n[0],c=1;for(;c<n.length;)If(n[c].bbox,f.bbox)!==null?c++:n.splice(c,1)}if(Ai.type==="intersection")for(let f=0,c=n.length;f<c;f++){let u=n[f];for(let d=f+1,h=n.length;d<h;d++)if(If(u.bbox,n[d].bbox)===null)return[]}let i=new ha(ut.compare);for(let f=0,c=n.length;f<c;f++){let u=n[f].getSweepEvents();for(let d=0,h=u.length;d<h;d++)i.add(u[d])}let o=new zv(i),a=null;for(i.size!=0&&(a=i.first(),i.delete(a));a;){let f=o.process(a);for(let c=0,u=f.length;c<u;c++){let d=f[c];d.consumedBy===void 0&&i.add(d)}i.size!=0?(a=i.first(),i.delete(a)):a=null}Ft.reset();let s=Dv.factory(o.segments);return new Nv(s).getGeom()}},Ai=new Uv,Of=Ai,qv=0,ga=class fa{constructor(t,r,n,i){D(this,"id"),D(this,"leftSE"),D(this,"rightSE"),D(this,"rings"),D(this,"windings"),D(this,"ringOut"),D(this,"consumedBy"),D(this,"prev"),D(this,"_prevInResult"),D(this,"_beforeState"),D(this,"_afterState"),D(this,"_isInResult"),this.id=++qv,this.leftSE=t,t.segment=this,t.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=t,this.rings=n,this.windings=i}static compare(t,r){let n=t.leftSE.point.x,i=r.leftSE.point.x,o=t.rightSE.point.x,a=r.rightSE.point.x;if(a.isLessThan(n))return 1;if(o.isLessThan(i))return-1;let s=t.leftSE.point.y,l=r.leftSE.point.y,f=t.rightSE.point.y,c=r.rightSE.point.y;if(n.isLessThan(i)){if(l.isLessThan(s)&&l.isLessThan(f))return 1;if(l.isGreaterThan(s)&&l.isGreaterThan(f))return-1;let u=t.comparePoint(r.leftSE.point);if(u<0)return 1;if(u>0)return-1;let d=r.comparePoint(t.rightSE.point);return d!==0?d:-1}if(n.isGreaterThan(i)){if(s.isLessThan(l)&&s.isLessThan(c))return-1;if(s.isGreaterThan(l)&&s.isGreaterThan(c))return 1;let u=r.comparePoint(t.leftSE.point);if(u!==0)return u;let d=t.comparePoint(r.rightSE.point);return d<0?1:d>0?-1:1}if(s.isLessThan(l))return-1;if(s.isGreaterThan(l))return 1;if(o.isLessThan(a)){let u=r.comparePoint(t.rightSE.point);if(u!==0)return u}if(o.isGreaterThan(a)){let u=t.comparePoint(r.rightSE.point);if(u<0)return 1;if(u>0)return-1}if(!o.eq(a)){let u=f.minus(s),d=o.minus(n),h=c.minus(l),g=a.minus(i);if(u.isGreaterThan(d)&&h.isLessThan(g))return 1;if(u.isLessThan(d)&&h.isGreaterThan(g))return-1}return o.isGreaterThan(a)?1:o.isLessThan(a)||f.isLessThan(c)?-1:f.isGreaterThan(c)?1:t.id<r.id?-1:t.id>r.id?1:0}static fromRing(t,r,n){let i,o,a,s=ut.comparePoints(t,r);if(s<0)i=t,o=r,a=1;else if(s>0)i=r,o=t,a=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);let l=new ut(i,!0),f=new ut(o,!1);return new fa(l,f,[n],[a])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let t=this.leftSE.point.y,r=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(r)?t:r},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(r)?t:r}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}comparePoint(t){return Ft.orient(this.leftSE.point,t,this.rightSE.point)}getIntersection(t){let r=this.bbox(),n=t.bbox(),i=If(r,n);if(i===null)return null;let o=this.leftSE.point,a=this.rightSE.point,s=t.leftSE.point,l=t.rightSE.point,f=Si(r,s)&&this.comparePoint(s)===0,c=Si(n,o)&&t.comparePoint(o)===0,u=Si(r,l)&&this.comparePoint(l)===0,d=Si(n,a)&&t.comparePoint(a)===0;if(c&&f)return d&&!u?a:!d&&u?l:null;if(c)return u&&o.x.eq(l.x)&&o.y.eq(l.y)?null:o;if(f)return d&&a.x.eq(s.x)&&a.y.eq(s.y)?null:s;if(d&&u)return null;if(d)return a;if(u)return l;let h=Rv(o,this.vector(),s,t.vector());return h===null||!Si(i,h)?null:Ft.snap(h)}split(t){let r=[],n=t.events!==void 0,i=new ut(t,!0),o=new ut(t,!1),a=this.rightSE;this.replaceRightSE(o),r.push(o),r.push(i);let s=new fa(i,a,this.rings.slice(),this.windings.slice());return ut.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),ut.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),o.checkForConsuming()),r}swapEvents(){let t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let r=0,n=this.windings.length;r<n;r++)this.windings[r]*=-1}consume(t){let r=this,n=t;for(;r.consumedBy;)r=r.consumedBy;for(;n.consumedBy;)n=n.consumedBy;let i=fa.compare(r,n);if(i!==0){if(i>0){let o=r;r=n,n=o}if(r.prev===n){let o=r;r=n,n=o}for(let o=0,a=n.rings.length;o<a;o++){let s=n.rings[o],l=n.windings[o],f=r.rings.indexOf(s);f===-1?(r.rings.push(s),r.windings.push(l)):r.windings[f]+=l}n.rings=null,n.windings=null,n.consumedBy=r,n.leftSE.consumedBy=r.leftSE,n.rightSE.consumedBy=r.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{let t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};let r=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys;for(let s=0,l=this.rings.length;s<l;s++){let f=this.rings[s],c=this.windings[s],u=r.indexOf(f);u===-1?(r.push(f),n.push(c)):n[u]+=c}let o=[],a=[];for(let s=0,l=r.length;s<l;s++){if(n[s]===0)continue;let f=r[s],c=f.poly;if(a.indexOf(c)===-1)if(f.isExterior)o.push(c);else{a.indexOf(c)===-1&&a.push(c);let u=o.indexOf(f.poly);u!==-1&&o.splice(u,1)}}for(let s=0,l=o.length;s<l;s++){let f=o[s].multiPoly;i.indexOf(f)===-1&&i.push(f)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let t=this.beforeState().multiPolys,r=this.afterState().multiPolys;switch(Of.type){case"union":{let n=t.length===0,i=r.length===0;this._isInResult=n!==i;break}case"intersection":{let n,i;t.length<r.length?(n=t.length,i=r.length):(n=r.length,i=t.length),this._isInResult=i===Of.numMultiPolys&&n<i;break}case"xor":{let n=Math.abs(t.length-r.length);this._isInResult=n%2===1;break}case"difference":{let n=i=>i.length===1&&i[0].isSubject;this._isInResult=n(t)!==n(r);break}}return this._isInResult}},a0=class{constructor(e,t,r){if(D(this,"poly"),D(this,"isExterior"),D(this,"segments"),D(this,"bbox"),!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=r,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let n=Ft.snap({x:new dt(e[0][0]),y:new dt(e[0][1])});this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let i=n;for(let o=1,a=e.length;o<a;o++){if(typeof e[o][0]!="number"||typeof e[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let s=Ft.snap({x:new dt(e[o][0]),y:new dt(e[o][1])});s.x.eq(i.x)&&s.y.eq(i.y)||(this.segments.push(ga.fromRing(i,s,this)),s.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=s.x),s.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=s.y),s.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=s.x),s.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=s.y),i=s)}(!n.x.eq(i.x)||!n.y.eq(i.y))&&this.segments.push(ga.fromRing(i,n,this))}getSweepEvents(){let e=[];for(let t=0,r=this.segments.length;t<r;t++){let n=this.segments[t];e.push(n.leftSE),e.push(n.rightSE)}return e}},Gv=class{constructor(e,t){if(D(this,"multiPoly"),D(this,"exteriorRing"),D(this,"interiorRings"),D(this,"bbox"),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new a0(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let r=1,n=e.length;r<n;r++){let i=new a0(e[r],this,!1);i.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=i.bbox.ll.x),i.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=i.bbox.ll.y),i.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=i.bbox.ur.x),i.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=i.bbox.ur.y),this.interiorRings.push(i)}this.multiPoly=t}getSweepEvents(){let e=this.exteriorRing.getSweepEvents();for(let t=0,r=this.interiorRings.length;t<r;t++){let n=this.interiorRings[t].getSweepEvents();for(let i=0,o=n.length;i<o;i++)e.push(n[i])}return e}},s0=class{constructor(e,t){if(D(this,"isSubject"),D(this,"polys"),D(this,"bbox"),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof e[0][0][0]=="number"&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:new dt(Number.POSITIVE_INFINITY),y:new dt(Number.POSITIVE_INFINITY)},ur:{x:new dt(Number.NEGATIVE_INFINITY),y:new dt(Number.NEGATIVE_INFINITY)}};for(let r=0,n=e.length;r<n;r++){let i=new Gv(e[r],this);i.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=i.bbox.ll.x),i.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=i.bbox.ll.y),i.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=i.bbox.ur.x),i.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=i.bbox.ur.y),this.polys.push(i)}this.isSubject=t}getSweepEvents(){let e=[];for(let t=0,r=this.polys.length;t<r;t++){let n=this.polys[t].getSweepEvents();for(let i=0,o=n.length;i<o;i++)e.push(n[i])}return e}};var Vv=(e,...t)=>Of.run("intersection",e,t),dC=Ft.set;function $v(e,t={}){let r=[];if(W0(e,i=>{r.push(i.coordinates)}),r.length<2)throw new Error("Must specify at least 2 geometries");let n=Vv(r[0],...r.slice(1));return n.length===0?null:n.length===1?$f(n[0],t.properties):V0(n,t.properties)}var lp=$v,Hv={Point:cp,MultiPoint:jv,LineString:up,MultiLineString:Wv,Polygon:dp,MultiPolygon:Yv};function Zv(e,t){let[r,n,i,o]=t,a=Rf([r,o]),s=Rf([i,n]),l=[a,s];if(e.type==="GeometryCollection")throw new Error("Unsupported geometry type GeometryCollection");let f=Hv[e.type],c=f(e.coordinates,l);return{...e,coordinates:c}}function cp([e,t],[r,n]){let i=f0(r[0],n[0],e),o=f0(r[1],n[1],t);return[i,o]}function jf(e,t){return e.map(r=>cp(Rf(r),t))}function jv(e,t){return jf(e,t)}function up(e,t){return jf(e,t)}function Wv(e,t){return e.map(r=>up(r,t))}function dp(e,t){return e.map(r=>jf(r,t))}function Yv(e,t){return e.map(r=>dp(r,t))}function Rf(e){return kf(e)}function f0(e,t,r){return(r-e)/(t-e)}function Kv(e,t,r){var n=e.length,i=on(e[0],t),o=[],a,s,l;let f,c;for(r||(r=[]),a=1;a<n;a++){for(f=e[a-1],c=e[a],s=l=on(c,t);;)if(i|s){if(i&s)break;i?(f=Nf(f,c,i,t),i=on(f,t)):(c=Nf(f,c,s,t),s=on(c,t))}else{o.push(f),s!==l?(o.push(c),a<n-1&&(r.push(o),o=[])):a===n-1&&o.push(c);break}i=l}return o.length&&r.push(o),r}function Xv(e,t){var r,n,i,o,a,s,l;for(n=1;n<=8;n*=2){for(r=[],i=e[e.length-1],o=!(on(i,t)&n),a=0;a<e.length;a++)s=e[a],l=!(on(s,t)&n),l!==o&&r.push(Nf(i,s,n,t)),l&&r.push(s),i=s,o=l;if(e=r,!e.length)break}return r}function Nf(e,t,r,n){return r&8?[e[0]+(t[0]-e[0])*(n[3]-e[1])/(t[1]-e[1]),n[3]]:r&4?[e[0]+(t[0]-e[0])*(n[1]-e[1])/(t[1]-e[1]),n[1]]:r&2?[n[2],e[1]+(t[1]-e[1])*(n[2]-e[0])/(t[0]-e[0])]:r&1?[n[0],e[1]+(t[1]-e[1])*(n[0]-e[0])/(t[0]-e[0])]:null}function on(e,t){var r=0;return e[0]<t[0]?r|=1:e[0]>t[2]&&(r|=2),e[1]<t[1]?r|=4:e[1]>t[3]&&(r|=8),r}function Qv(e,t){let r=Pt(e),n=r.type,i=e.type==="Feature"?e.properties:{},o=r.coordinates;switch(n){case"LineString":case"MultiLineString":{let a=[];return n==="LineString"&&(o=[o]),o.forEach(s=>{Kv(s,t,a)}),a.length===1?q0(a[0],i):G0(a,i)}case"Polygon":return $f(l0(o,t),i);case"MultiPolygon":return V0(o.map(a=>l0(a,t)),i);default:throw new Error("geometry "+n+" not supported")}}function l0(e,t){let r=[];for(let n of e){let i=Xv(n,t);i.length>0&&((i[0][0]!==i[i.length-1][0]||i[0][1]!==i[i.length-1][1])&&i.push(i[0]),i.length>=4&&r.push(i))}return r}var c0=Qv;function Jv(e,t,r){let n=pv(e);if(!r||np(n,r))return!0;let i=lp(Mi([n,_e(r)]));return i?t==="mvt"?Zv(i.geometry,e):i.geometry:!1}function e2(e,t,r){return hp(e,t,r)}function hp(e,t,r){let n=ql(e);if(!r||np(n,r))return!0;let i=lp(Mi([_e(n),_e(r)]));if(!i)return!1;let o=Ul(i.geometry,t);return new Set(o)}var t2=[-180,-90,0,90],r2=[0,-90,180,90];function n2(e,t){if(!t)return!0;let r=_e(t),n=(0,Df.polygonToCells)(c0(r,t2).geometry.coordinates,e,!0),i=(0,Df.polygonToCells)(c0(r,r2).geometry.coordinates,e,!0);return new Set(n.concat(i))}var i2="__geomValue";function o2({tiles:e,tileFormat:t,spatialFilter:r,uniqueIdProperty:n,options:i}){let o=new Map;for(let a of e){if(a.isVisible===!1||!a.data)continue;let s=[a.bbox.west,a.bbox.south,a.bbox.east,a.bbox.north],l=Jv(s,t,r);if(l===!1)continue;let f=l===!0?void 0:l;Ef({map:o,spatialFilter:f,data:a.data.points,type:"Point",bbox:s,tileFormat:t,uniqueIdProperty:n,options:i}),Ef({map:o,spatialFilter:f,data:a.data.lines,type:"LineString",bbox:s,tileFormat:t,uniqueIdProperty:n,options:i}),Ef({map:o,spatialFilter:f,data:a.data.polygons,type:"Polygon",bbox:s,tileFormat:t,uniqueIdProperty:n,options:i})}return Array.from(o.values())}function pp({map:e,data:t,startIndex:r,endIndex:n,type:i,bbox:o,tileFormat:a,uniqueIdProperty:s,storeGeometry:l,spatialFilter:f}){let c=f2(t,r),u=c2(c,s,e);if(!u||e.has(u))return;let d=null;if(l||f){let{positions:g}=t,x=d2(r,n,g);d=u2(x,i)}if(d&&f&&!K0(d,f))return;let h=l2(c);l&&d&&(h[i2]=a==="mvt"?lv(d,o):d),e.set(u,h)}function a2({map:e,data:t,spatialFilter:r,type:n,bbox:i,tileFormat:o,uniqueIdProperty:a,options:s}){let l=gp(t,n),f=s?.storeGeometry||!1;for(let c=0;c<l.length-1;c++){let u=l[c],d=l[c+1];pp({map:e,data:t,startIndex:u,endIndex:d,type:n,bbox:i,tileFormat:o,uniqueIdProperty:a,storeGeometry:f,spatialFilter:r})}}function gp(e,t){let r;switch(t){case"Polygon":r=e.primitivePolygonIndices;break;case"LineString":r=e.pathIndices;break;case"Point":r=p2(e);break;default:throw new Error(`Unsupported geometry type: ${t}`)}return r.value}function s2(e,t){return e.featureIds.value[t]}function f2(e,t){let r=s2(e,t),{properties:n,numericProps:i,fields:o}=e,a={uniqueId:o?.[r]?.id,properties:n[r],numericProps:{}};for(let s in i)a.numericProps[s]=i[s].value[t];return a}function l2(e){let{properties:t,numericProps:r}=e;return Object.assign({},t,r)}function c2(e,t,r){if(t)return _f(e,t);if(e.uniqueId)return e.uniqueId;let n=r.size+1;return _f(e,"cartodb_id")||_f(e,"geoid")||n}function _f(e,t){let{properties:r,numericProps:n}=e;return n[t]||r[t]}function u2(e,t){switch(t){case"Polygon":return{type:"Polygon",coordinates:[e]};case"LineString":return{type:"LineString",coordinates:e};case"Point":return{type:"Point",coordinates:e[0]};default:throw new Error("Invalid geometry type")}}function d2(e,t,r){let n=[];for(let i=e;i<t;i++)n.push(Array.from(r.value.subarray(i*r.size,(i+1)*r.size)));return n}function Ef({map:e,spatialFilter:t,data:r,type:n,bbox:i,tileFormat:o,uniqueIdProperty:a,options:s}){r?.properties.length&&(t?a2({map:e,data:r,spatialFilter:t,type:n,bbox:i,tileFormat:o,uniqueIdProperty:a,options:s}):h2({map:e,data:r,type:n,bbox:i,tileFormat:o,uniqueIdProperty:a,options:s}))}function h2({map:e,data:t,type:r,bbox:n,tileFormat:i,uniqueIdProperty:o,options:a}){let s=gp(t,r),l=a?.storeGeometry||!1;for(let f=0;f<s.length-1;f++){let c=s[f],u=s[f+1];pp({map:e,data:t,startIndex:c,endIndex:u,type:r,bbox:n,tileFormat:i,uniqueIdProperty:o,storeGeometry:l})}}function p2(e){let t=e.featureIds.value,r=t[t.length-1],n=t.constructor,i={value:new n(t.length+1),size:1};return i.value.set(t),i.value.set([r+1],t.length),i}function g2({tiles:e,spatialFilter:t,spatialDataColumn:r,spatialDataType:n}){let i=new Map,o=y2(n),a=b2(e,o),s=r||o;if(!a)return[];let l;o==="h3"&&(l=n2(a,t));for(let f of e)if(!(f.isVisible===!1||!f.data)){if(o==="quadbin"){let c=m2(f,o);l=hp(c,a,t)}l&&f.data.forEach(c=>{(l===!0||l.has(c.id))&&i.set(c.id,{...c.properties,[s]:c.id})})}return Array.from(i.values())}function m2(e,t){return t==="quadbin"?e.index.q:e.id}function b2(e,t){let r=e.find(n=>n.data?.length)?.data;if(r){if(t==="quadbin")return Number(gt(r[0].id));if(t==="h3")return(0,mp.getResolution)(r[0].id)}}function y2(e){switch(e){case"h3":return"h3";case"quadbin":return"quadbin";default:throw new Error("Unexpected spatial data type")}}var x2="3.4",Tr="geom",bp=7e3,fn=.5,v2=1,Wf=4,Yf=6,yp="__aggregationValue",w2=`1 AS ${yp}`;function _2({tiles:e,...t}){let r={};for(let s of t.rasterMetadata.bands)r[s.name]={...s,nodata:Number(s.nodata)};if(e=e.filter(S2),e.length===0)return[];let n=gt(e[0].index.q),i=e[0].data.blockSize,o=n+BigInt(Math.log2(i)),a=new Map;for(let s of e){let l=s.index.q,f=e2(l,o,t.spatialFilter);if(f===!1)continue;let c=T2(l,o);for(let u=0;u<c.length;u++){if(f!==!0&&!f.has(c[u]))continue;let d={},h=!1;for(let g in s.data.cells.numericProps){let x=s.data.cells.numericProps[g].value[u],T=r[g];C2(x,T.nodata)&&(d[g]=s.data.cells.numericProps[g].value[u],h=!0)}h&&a.set(c[u],d)}}return Array.from(a.values())}function E2(e){return!!e.data?.cells}function S2(e){return!!(e.isVisible&&e.data?.cells?.numericProps)}function T2(e,t){let r=Yt(e),n=Number(t),i=2**(n-r.z),o=r.x*i,a=r.y*i,s=[];for(let l=0,f=i**2;l<f;l++){let c=o+l%i,u=a+Math.floor(l/i);s.push(mn({x:c,y:u,z:n}))}return s}function C2(e,t){return Number.isNaN(e)?!1:t!==e}var mC=new Set(Object.values(Gf));function At(e){return Array.isArray(e)?e.map(t=>At(t)):typeof e!="object"?e:Object.entries(e).reduce((t,[r,n])=>(t[r.toLowerCase()]=typeof n=="object"&&n?At(n):n,t),{})}function J(e,t){if(!e)throw new Error(t)}var xp=class Pi extends Error{constructor(t){super(`${Pi.NAME}: ${t}`),this.name=Pi.NAME}static is(t){return t instanceof Pi||t.message?.includes(Pi.NAME)}};D(xp,"NAME","InvalidColumnError");var zf=xp;function vp(e){for(let t in e)return!1;return!0}var A2=e=>e!==null&&typeof e=="object",wp=e=>A2(e)&&e.constructor==={}.constructor;function P2(e,...t){for(let r of t)for(let n in r)r[n]!==void 0&&(e[n]=r[n]);return e}function xa(e,t,r){let n=r.find(i=>i.name===t);return n&&n.type==="geometry"?"geo":e}function F2({tiles:e,spatialFilter:t,uniqueIdProperty:r,tileFormat:n,spatialDataColumn:i=Tr,spatialDataType:o,rasterMetadata:a,storeGeometry:s=!1}){return o==="geo"?o2({tiles:e,tileFormat:n,spatialFilter:t,uniqueIdProperty:r,options:{storeGeometry:s}}):e.some(E2)?(J(a,"Missing raster metadata"),_2({tiles:e,spatialFilter:t,spatialDataColumn:i,spatialDataType:o,rasterMetadata:a})):g2({tiles:e,spatialFilter:t,spatialDataColumn:i,spatialDataType:o})}var Cr=class extends Error{constructor(e,t,r,n){let i="Failed to connect";r&&(i="Server returned: ",r.status===400?i+="Bad request":r.status===401||r.status===403?i+="Unauthorized access":r.status===404?i+="Not found":i+="Error",i+=` (${r.status}):`),i+=` ${e.message||e}`;let o=`${t.requestType} API request failed`;o+=`
|
|
171
171
|
${i}`;for(let a of Object.keys(t))a!=="requestType"&&(o+=`
|
|
172
172
|
${k2(a)}: ${t[a]}`);o+=`
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "CARTO official integration with Deck.gl. Build geospatial applications using CARTO and Deck.gl.",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "9.3.
|
|
6
|
+
"version": "9.3.2",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@loaders.gl/mvt": "^4.4.1",
|
|
50
50
|
"@loaders.gl/schema": "^4.4.1",
|
|
51
51
|
"@loaders.gl/tiles": "^4.4.1",
|
|
52
|
-
"@luma.gl/core": "^9.3.
|
|
53
|
-
"@luma.gl/shadertools": "^9.3.
|
|
52
|
+
"@luma.gl/core": "^9.3.3",
|
|
53
|
+
"@luma.gl/shadertools": "^9.3.3",
|
|
54
54
|
"@math.gl/web-mercator": "^4.1.0",
|
|
55
55
|
"@types/d3-array": "^3.0.2",
|
|
56
56
|
"@types/d3-color": "^3.1.3",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@deck.gl/geo-layers": "~9.3.0",
|
|
74
74
|
"@deck.gl/layers": "~9.3.0",
|
|
75
75
|
"@loaders.gl/core": "^4.4.1",
|
|
76
|
-
"@luma.gl/core": "~9.3.
|
|
76
|
+
"@luma.gl/core": "~9.3.3"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "09af8de8d18a9cb9a31d064cae8f9e7239df7f53"
|
|
79
79
|
}
|