precision-dashwidgets 0.1.1 → 0.1.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.
@@ -1,29 +1,28 @@
1
- import { defineComponent as Lt, createElementBlock as Y, openBlock as z, createElementVNode as B, ref as S, watch as J, createBlock as Tn, createVNode as it, onMounted as Ue, onBeforeUnmount as xr, withDirectives as De, vShow as Rr, Fragment as _t, renderList as xt, toDisplayString as ot, vModelSelect as Nr, normalizeStyle as Sr, computed as Z, onUnmounted as Cr, resolveComponent as Ae, normalizeClass as Lr, createCommentVNode as kt, vModelText as kr, withCtx as Pt, createTextVNode as Ee, inject as Br, unref as Rt, watchEffect as Ur, renderSlot as In } from "vue";
1
+ import { defineComponent as Lt, createElementBlock as V, openBlock as z, createElementVNode as D, ref as S, watch as J, createBlock as En, createVNode as it, onMounted as Be, onBeforeUnmount as Mr, withDirectives as De, vShow as xr, Fragment as _t, renderList as xt, toDisplayString as ot, vModelSelect as Rr, normalizeStyle as Nr, computed as Z, onUnmounted as Sr, resolveComponent as be, normalizeClass as Cr, createCommentVNode as kt, vModelText as Lr, withCtx as Ot, createTextVNode as Ae, inject as kr, unref as Rt, watchEffect as Br, renderSlot as Tn } from "vue";
2
2
  import { ElTooltip as Dr } from "element-plus";
3
- import { fetchAuthSession as $r } from "@aws-amplify/auth";
4
- import { defineStore as Fr } from "pinia";
3
+ import { defineStore as Ur } from "pinia";
5
4
  /*! Element Plus Icons Vue v2.3.2 */
6
- var Pr = /* @__PURE__ */ Lt({
5
+ var $r = /* @__PURE__ */ Lt({
7
6
  name: "InfoFilled",
8
7
  __name: "info-filled",
9
8
  setup(t) {
10
- return (e, n) => (z(), Y("svg", {
9
+ return (e, n) => (z(), V("svg", {
11
10
  xmlns: "http://www.w3.org/2000/svg",
12
11
  viewBox: "0 0 1024 1024"
13
12
  }, [
14
- B("path", {
13
+ D("path", {
15
14
  fill: "currentColor",
16
15
  d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
17
16
  })
18
17
  ]));
19
18
  }
20
- }), Or = Pr;
21
- function G(t) {
19
+ }), Fr = $r;
20
+ function X(t) {
22
21
  return t != null && typeof t == "object" && t["@@functional/placeholder"] === !0;
23
22
  }
24
23
  function wt(t) {
25
24
  return function e(n) {
26
- return arguments.length === 0 || G(n) ? e : t.apply(this, arguments);
25
+ return arguments.length === 0 || X(n) ? e : t.apply(this, arguments);
27
26
  };
28
27
  }
29
28
  function vt(t) {
@@ -32,93 +31,84 @@ function vt(t) {
32
31
  case 0:
33
32
  return e;
34
33
  case 1:
35
- return G(n) ? e : wt(function(o) {
34
+ return X(n) ? e : wt(function(o) {
36
35
  return t(n, o);
37
36
  });
38
37
  default:
39
- return G(n) && G(r) ? e : G(n) ? wt(function(o) {
38
+ return X(n) && X(r) ? e : X(n) ? wt(function(o) {
40
39
  return t(o, r);
41
- }) : G(r) ? wt(function(o) {
40
+ }) : X(r) ? wt(function(o) {
42
41
  return t(n, o);
43
42
  }) : t(n, r);
44
43
  }
45
44
  };
46
45
  }
47
- function zr(t) {
46
+ function Or(t) {
48
47
  return function e(n, r, o) {
49
48
  switch (arguments.length) {
50
49
  case 0:
51
50
  return e;
52
51
  case 1:
53
- return G(n) ? e : vt(function(i, a) {
52
+ return X(n) ? e : vt(function(i, a) {
54
53
  return t(n, i, a);
55
54
  });
56
55
  case 2:
57
- return G(n) && G(r) ? e : G(n) ? vt(function(i, a) {
56
+ return X(n) && X(r) ? e : X(n) ? vt(function(i, a) {
58
57
  return t(i, r, a);
59
- }) : G(r) ? vt(function(i, a) {
58
+ }) : X(r) ? vt(function(i, a) {
60
59
  return t(n, i, a);
61
60
  }) : wt(function(i) {
62
61
  return t(n, r, i);
63
62
  });
64
63
  default:
65
- return G(n) && G(r) && G(o) ? e : G(n) && G(r) ? vt(function(i, a) {
64
+ return X(n) && X(r) && X(o) ? e : X(n) && X(r) ? vt(function(i, a) {
66
65
  return t(i, a, o);
67
- }) : G(n) && G(o) ? vt(function(i, a) {
66
+ }) : X(n) && X(o) ? vt(function(i, a) {
68
67
  return t(i, r, a);
69
- }) : G(r) && G(o) ? vt(function(i, a) {
68
+ }) : X(r) && X(o) ? vt(function(i, a) {
70
69
  return t(n, i, a);
71
- }) : G(n) ? wt(function(i) {
70
+ }) : X(n) ? wt(function(i) {
72
71
  return t(i, r, o);
73
- }) : G(r) ? wt(function(i) {
72
+ }) : X(r) ? wt(function(i) {
74
73
  return t(n, i, o);
75
- }) : G(o) ? wt(function(i) {
74
+ }) : X(o) ? wt(function(i) {
76
75
  return t(n, r, i);
77
76
  }) : t(n, r, o);
78
77
  }
79
78
  };
80
79
  }
81
- const qr = Number.isInteger || function(t) {
80
+ const Pr = Number.isInteger || function(t) {
82
81
  return t << 0 === t;
83
82
  };
84
- function Yr(t, e) {
83
+ function qr(t, e) {
85
84
  var n = t < 0 ? e.length + t : t;
86
85
  return e[n];
87
86
  }
88
- var Vr = /* @__PURE__ */ vt(function(t, e) {
87
+ var zr = /* @__PURE__ */ vt(function(t, e) {
89
88
  return e == null || e !== e ? t : e;
90
89
  });
91
- function jr(t, e) {
90
+ function Yr(t, e) {
92
91
  for (var n = e, r = 0; r < t.length; r += 1) {
93
92
  if (n == null)
94
93
  return;
95
94
  var o = t[r];
96
- qr(o) ? n = Yr(o, n) : n = n[o];
95
+ Pr(o) ? n = qr(o, n) : n = n[o];
97
96
  }
98
97
  return n;
99
98
  }
100
- var Gr = /* @__PURE__ */ zr(function(t, e, n) {
101
- return Vr(t, jr(e, n));
99
+ var Vr = /* @__PURE__ */ Or(function(t, e, n) {
100
+ return zr(t, Yr(e, n));
102
101
  });
103
- async function ae() {
104
- try {
105
- return $r().then(
106
- (t) => t?.tokens?.accessToken.toString()
107
- );
108
- } catch (t) {
109
- console.error(t);
110
- }
111
- }
112
- const Xr = Fr("duckdb", () => {
113
- const t = S(null), e = S(!1), n = S(!1), r = S(""), o = S(/* @__PURE__ */ new Map()), i = S(/* @__PURE__ */ new Map()), a = S(/* @__PURE__ */ new Map()), l = Z(() => e.value && !r.value), s = Z(() => (x) => o.value.get(x)), u = Z(() => (x) => {
114
- const E = o.value.get(x);
115
- return E && !E.isLoading && !E.error;
102
+ const jr = Ur("duckdb", () => {
103
+ const t = S(null), e = S(!1), n = S(!1), r = S(""), o = S(/* @__PURE__ */ new Map()), i = S(/* @__PURE__ */ new Map()), a = S(/* @__PURE__ */ new Map()), l = Z(() => e.value && !r.value), s = Z(() => (M) => o.value.get(M)), u = Z(() => (M) => {
104
+ const x = o.value.get(M);
105
+ return x && !x.isLoading && !x.error;
116
106
  }), f = Z(() => i.value.size), h = Z(() => i.value.size > 0), d = async () => {
117
107
  if (e.value || n.value)
118
108
  return t.value;
119
109
  n.value = !0, r.value = "";
120
110
  try {
121
- const x = await import("./duckdb-browser-Ca3YTI3y-4in0bpNm.mjs"), E = {
111
+ const M = await import("./duckdb-browser-Ca3YTI3y-4in0bpNm.mjs"), x = {
122
112
  mvp: {
123
113
  mainModule: "/static/duckdb/duckdb-mvp.wasm",
124
114
  mainWorker: "/static/duckdb/duckdb-browser-mvp.worker.js"
@@ -127,131 +117,131 @@ const Xr = Fr("duckdb", () => {
127
117
  mainModule: "/static/duckdb/duckdb-eh.wasm",
128
118
  mainWorker: "/static/duckdb/duckdb-browser-eh.worker.js"
129
119
  }
130
- }, M = await x.selectBundle(E), N = new Worker(M.mainWorker), C = new x.ConsoleLogger(x.LogLevel.WARNING);
131
- return t.value = new x.AsyncDuckDB(C, N), await t.value.instantiate(M.mainModule), e.value = !0, t.value;
132
- } catch (x) {
133
- throw console.error("Failed to initialize DuckDB:", x), r.value = `Failed to initialize DuckDB: ${x.message}`, x;
120
+ }, I = await M.selectBundle(x), N = new Worker(I.mainWorker), C = new M.ConsoleLogger(M.LogLevel.WARNING);
121
+ return t.value = new M.AsyncDuckDB(C, N), await t.value.instantiate(I.mainModule), e.value = !0, t.value;
122
+ } catch (M) {
123
+ throw console.error("Failed to initialize DuckDB:", M), r.value = `Failed to initialize DuckDB: ${M.message}`, M;
134
124
  } finally {
135
125
  n.value = !1;
136
126
  }
137
- }, p = async (x = null) => {
127
+ }, p = async (M = null) => {
138
128
  l.value || await d();
139
- const E = await t.value.connect(), M = x || `conn_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
140
- return i.value.set(M, {
141
- connection: E,
142
- viewerId: M,
129
+ const x = await t.value.connect(), I = M || `conn_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
130
+ return i.value.set(I, {
131
+ connection: x,
132
+ viewerId: I,
143
133
  createdAt: /* @__PURE__ */ new Date()
144
- }), { connection: E, connectionId: M };
145
- }, w = async (x) => {
146
- const E = i.value.get(x);
147
- E && (await E.connection.close(), i.value.delete(x), I(x), i.value.size === 0 && console.log("No active connections remaining. Keeping DuckDB instance for potential reuse."));
148
- }, I = (x) => {
149
- for (const [E, M] of a.value)
150
- M.delete(x), M.size === 0 && console.log(`File ${E} is no longer used by any viewers`);
151
- }, A = (x, E) => {
152
- a.value.has(x) || a.value.set(x, /* @__PURE__ */ new Set()), a.value.get(x).add(E);
153
- }, m = async (x) => {
154
- const E = o.value.get(x);
155
- if (E && E.tableName)
134
+ }), { connection: x, connectionId: I };
135
+ }, w = async (M) => {
136
+ const x = i.value.get(M);
137
+ x && (await x.connection.close(), i.value.delete(M), E(M), i.value.size === 0 && console.log("No active connections remaining. Keeping DuckDB instance for potential reuse."));
138
+ }, E = (M) => {
139
+ for (const [x, I] of a.value)
140
+ I.delete(M), I.size === 0 && console.log(`File ${x} is no longer used by any viewers`);
141
+ }, A = (M, x) => {
142
+ a.value.has(M) || a.value.set(M, /* @__PURE__ */ new Set()), a.value.get(M).add(x);
143
+ }, m = async (M) => {
144
+ const x = o.value.get(M);
145
+ if (x && x.tableName)
156
146
  try {
157
- const M = await t.value.connect();
158
- await M.query(`DROP TABLE IF EXISTS ${E.tableName};`), await M.close();
159
- } catch (M) {
160
- console.warn(`Failed to drop table ${E.tableName}:`, M);
147
+ const I = await t.value.connect();
148
+ await I.query(`DROP TABLE IF EXISTS ${x.tableName};`), await I.close();
149
+ } catch (I) {
150
+ console.warn(`Failed to drop table ${x.tableName}:`, I);
161
151
  }
162
- o.value.delete(x), a.value.delete(x);
163
- }, L = async (x, E, M = "my_data", N = {}, C = null, U = null) => {
164
- const P = U || x, j = o.value.get(P);
165
- if (j && !j.isLoading && !j.error)
166
- return C && A(P, C), j.tableName;
167
- l.value || await d(), o.value.set(P, {
168
- tableName: M,
169
- fileType: E,
170
- fileUrl: x,
152
+ o.value.delete(M), a.value.delete(M);
153
+ }, k = async (M, x, I = "my_data", N = {}, C = null, L = null) => {
154
+ const O = L || M, G = o.value.get(O);
155
+ if (G && !G.isLoading && !G.error)
156
+ return C && A(O, C), G.tableName;
157
+ l.value || await d(), o.value.set(O, {
158
+ tableName: I,
159
+ fileType: x,
160
+ fileUrl: M,
171
161
  // Store the current URL for reference
172
162
  isLoading: !0,
173
163
  error: null
174
164
  });
175
165
  try {
176
- const W = await fetch(x);
177
- if (!W.ok)
178
- throw new Error(`Failed to fetch file: ${W.status} ${W.statusText}`);
166
+ const q = await fetch(M);
167
+ if (!q.ok)
168
+ throw new Error(`Failed to fetch file: ${q.status} ${q.statusText}`);
179
169
  let _;
180
- if (E === "csv") {
181
- const g = await W.text(), v = await new Blob([g], { type: "text/csv" }).arrayBuffer();
182
- _ = new Uint8Array(v);
170
+ if (x === "csv") {
171
+ const g = await q.text(), y = await new Blob([g], { type: "text/csv" }).arrayBuffer();
172
+ _ = new Uint8Array(y);
183
173
  } else {
184
- const g = await W.arrayBuffer();
174
+ const g = await q.arrayBuffer();
185
175
  _ = new Uint8Array(g);
186
176
  }
187
- const y = `${U || M}.${E}`;
188
- await t.value.registerFileBuffer(y, _);
177
+ const v = `${L || I}.${x}`;
178
+ await t.value.registerFileBuffer(v, _);
189
179
  const c = await t.value.connect();
190
180
  try {
191
181
  let g;
192
- if (E === "csv") {
182
+ if (x === "csv") {
193
183
  const b = {
194
184
  header: !0,
195
185
  delimiter: ",",
196
186
  ...N
197
187
  };
198
188
  g = `
199
- CREATE OR REPLACE TABLE ${M} AS
200
- SELECT * FROM read_csv('${y}', header=${b.header}, delim='${b.delimiter}');
189
+ CREATE OR REPLACE TABLE ${I} AS
190
+ SELECT * FROM read_csv('${v}', header=${b.header}, delim='${b.delimiter}');
201
191
  `;
202
- } else if (E === "parquet")
192
+ } else if (x === "parquet")
203
193
  g = `
204
- CREATE OR REPLACE TABLE ${M} AS
205
- SELECT * FROM read_parquet('${y}');
194
+ CREATE OR REPLACE TABLE ${I} AS
195
+ SELECT * FROM read_parquet('${v}');
206
196
  `;
207
197
  else
208
- throw new Error(`Unsupported file type: ${E}`);
198
+ throw new Error(`Unsupported file type: ${x}`);
209
199
  await c.query(g);
210
- const v = (await c.query(`SELECT COUNT(*) as count FROM ${M};`)).toArray()[0].count;
211
- return o.value.set(P, {
212
- tableName: M,
213
- fileType: E,
214
- fileUrl: x,
200
+ const y = (await c.query(`SELECT COUNT(*) as count FROM ${I};`)).toArray()[0].count;
201
+ return o.value.set(O, {
202
+ tableName: I,
203
+ fileType: x,
204
+ fileUrl: M,
215
205
  // Store current URL for reference
216
206
  isLoading: !1,
217
207
  error: null,
218
- rowCount: v,
208
+ rowCount: y,
219
209
  loadedAt: /* @__PURE__ */ new Date()
220
- }), C && A(P, C), M;
210
+ }), C && A(O, C), I;
221
211
  } finally {
222
212
  await c.close();
223
213
  }
224
- } catch (W) {
225
- throw o.value.set(P, {
226
- tableName: M,
227
- fileType: E,
228
- fileUrl: x,
214
+ } catch (q) {
215
+ throw o.value.set(O, {
216
+ tableName: I,
217
+ fileType: x,
218
+ fileUrl: M,
229
219
  isLoading: !1,
230
- error: W.message
231
- }), W;
220
+ error: q.message
221
+ }), q;
232
222
  }
233
- }, D = async (x, E) => {
234
- const M = i.value.get(E);
235
- if (!M)
236
- throw new Error(`Connection not found: ${E}`);
237
- return (await M.connection.query(x)).toArray().map((N) => {
223
+ }, U = async (M, x) => {
224
+ const I = i.value.get(x);
225
+ if (!I)
226
+ throw new Error(`Connection not found: ${x}`);
227
+ return (await I.connection.query(M)).toArray().map((N) => {
238
228
  const C = {};
239
- for (const [U, P] of Object.entries(N))
240
- C[U] = P;
229
+ for (const [L, O] of Object.entries(N))
230
+ C[L] = O;
241
231
  return C;
242
232
  });
243
233
  }, H = async () => {
244
- for (const [x, E] of i.value)
234
+ for (const [M, x] of i.value)
245
235
  try {
246
- await E.connection.close(), console.log(`Closed connection: ${x}`);
247
- } catch (M) {
248
- console.warn(`Error closing connection ${x}:`, M);
236
+ await x.connection.close(), console.log(`Closed connection: ${M}`);
237
+ } catch (I) {
238
+ console.warn(`Error closing connection ${M}:`, I);
249
239
  }
250
240
  if (i.value.clear(), t.value) {
251
241
  try {
252
242
  await t.value.terminate();
253
- } catch (x) {
254
- console.warn("Error terminating DuckDB:", x);
243
+ } catch (M) {
244
+ console.warn("Error terminating DuckDB:", M);
255
245
  }
256
246
  t.value = null;
257
247
  }
@@ -276,40 +266,40 @@ const Xr = Fr("duckdb", () => {
276
266
  initDuckDB: d,
277
267
  createConnection: p,
278
268
  closeConnection: w,
279
- cleanupViewerFileUsage: I,
269
+ cleanupViewerFileUsage: E,
280
270
  trackFileUsage: A,
281
271
  unloadFile: m,
282
- loadFile: L,
283
- executeQuery: D,
284
- cleanup: async (x = !1) => {
285
- x || i.value.size === 0 ? await H() : console.log(`Skipping global cleanup. ${i.value.size} active connections remaining.`);
272
+ loadFile: k,
273
+ executeQuery: U,
274
+ cleanup: async (M = !1) => {
275
+ M || i.value.size === 0 ? await H() : console.log(`Skipping global cleanup. ${i.value.size} active connections remaining.`);
286
276
  },
287
277
  performGlobalCleanup: H,
288
278
  getConnectionInfo: () => {
289
- const x = [];
290
- for (const [E, M] of i.value)
291
- x.push({
292
- connectionId: E,
293
- viewerId: M.viewerId,
294
- createdAt: M.createdAt
279
+ const M = [];
280
+ for (const [x, I] of i.value)
281
+ M.push({
282
+ connectionId: x,
283
+ viewerId: I.viewerId,
284
+ createdAt: I.createdAt
295
285
  });
296
- return x;
286
+ return M;
297
287
  },
298
288
  getFileUsageInfo: () => {
299
- const x = [];
300
- for (const [E, M] of a.value) {
301
- const N = o.value.get(E);
302
- x.push({
303
- fileId: E,
289
+ const M = [];
290
+ for (const [x, I] of a.value) {
291
+ const N = o.value.get(x);
292
+ M.push({
293
+ fileId: x,
304
294
  tableName: N?.tableName,
305
295
  fileType: N?.fileType,
306
296
  fileUrl: N?.fileUrl,
307
297
  rowCount: N?.rowCount,
308
298
  loadedAt: N?.loadedAt,
309
- usedByViewers: Array.from(M)
299
+ usedByViewers: Array.from(I)
310
300
  });
311
301
  }
312
- return x;
302
+ return M;
313
303
  }
314
304
  };
315
305
  }), jt = (t, e) => {
@@ -317,25 +307,25 @@ const Xr = Fr("duckdb", () => {
317
307
  for (const [r, o] of e)
318
308
  n[r] = o;
319
309
  return n;
320
- }, Hr = { class: "dashboard-container" }, Wr = { class: "dashboard-header" }, Qr = { class: "dashboard-content" }, Kr = {
310
+ }, Gr = { class: "dashboard-container" }, Xr = { class: "dashboard-header" }, Wr = { class: "dashboard-content" }, Hr = {
321
311
  key: 0,
322
312
  class: "query-panel"
323
- }, Jr = { class: "query-examples" }, Zr = ["onClick"], to = {
313
+ }, Qr = { class: "query-examples" }, Kr = ["onClick"], Jr = {
324
314
  key: 1,
325
315
  class: "results-panel"
326
- }, eo = { class: "results-controls" }, no = { class: "left-controls" }, ro = { class: "right-controls" }, oo = {
316
+ }, Zr = { class: "results-controls" }, to = { class: "left-controls" }, eo = { class: "right-controls" }, no = {
327
317
  key: 0,
328
318
  class: "table-container"
329
- }, io = { class: "results-table" }, ao = {
319
+ }, ro = { class: "results-table" }, oo = {
330
320
  key: 0,
331
321
  class: "bottom-pagination"
332
- }, lo = {
322
+ }, io = {
333
323
  key: 1,
334
324
  class: "json-container"
335
- }, uo = {
325
+ }, ao = {
336
326
  key: 2,
337
327
  class: "error-panel"
338
- }, so = {
328
+ }, lo = {
339
329
  __name: "DataExplorer",
340
330
  props: {
341
331
  url: {
@@ -358,27 +348,27 @@ const Xr = Fr("duckdb", () => {
358
348
  }
359
349
  },
360
350
  setup(t) {
361
- const e = t, n = Xr(), r = S({
351
+ const e = t, n = jr(), r = S({
362
352
  header: !0,
363
353
  dynamicTyping: !0,
364
354
  delimiter: ","
365
355
  }), o = S(!1), i = S(!1), a = S(e.url), l = S("my_data"), s = S(""), u = S(null), f = S(""), h = S("table"), d = S(1), p = S(50), w = S(null);
366
356
  J(
367
357
  () => e.url,
368
- async (y) => {
369
- if (a.value = y, y)
358
+ async (v) => {
359
+ if (a.value = v, v)
370
360
  try {
371
- await E(), await N();
361
+ await x(), await N();
372
362
  } catch {
373
363
  console.error("file can not be loaded");
374
364
  }
375
365
  },
376
366
  { immediate: !0 }
377
367
  );
378
- const I = Z(() => n.isReady && w.value && !o.value), A = Z(() => o.value ? "Loading..." : n.isInitializing ? "Initializing..." : n.isReady ? I.value ? "Connected" : "Not Connected" : "Not Ready"), m = Z(() => !u.value || !Array.isArray(u.value) || u.value.length === 0 ? [] : Object.keys(u.value[0] || {})), L = Z(() => !u.value || !Array.isArray(u.value) ? 0 : Math.ceil(u.value.length / p.value)), D = Z(() => {
368
+ const E = Z(() => n.isReady && w.value && !o.value), A = Z(() => o.value ? "Loading..." : n.isInitializing ? "Initializing..." : n.isReady ? E.value ? "Connected" : "Not Connected" : "Not Ready"), m = Z(() => !u.value || !Array.isArray(u.value) || u.value.length === 0 ? [] : Object.keys(u.value[0] || {})), k = Z(() => !u.value || !Array.isArray(u.value) ? 0 : Math.ceil(u.value.length / p.value)), U = Z(() => {
379
369
  if (!u.value || !Array.isArray(u.value)) return [];
380
- const y = (d.value - 1) * p.value, c = y + p.value;
381
- return u.value.slice(y, c);
370
+ const v = (d.value - 1) * p.value, c = v + p.value;
371
+ return u.value.slice(v, c);
382
372
  }), H = Z(() => [
383
373
  { name: "Show All", query: "SELECT * FROM data LIMIT 100;" },
384
374
  { name: "Count Rows", query: "SELECT COUNT(*) as row_count FROM data;" },
@@ -401,30 +391,30 @@ const Xr = Fr("duckdb", () => {
401
391
  fileId: e.fileId,
402
392
  connectionId: w.value,
403
393
  tableName: l.value,
404
- isConnected: I.value,
394
+ isConnected: E.value,
405
395
  activeConnections: n.activeConnectionCount,
406
396
  hasActiveConnections: n.hasActiveConnections
407
397
  }));
408
- const x = async () => {
398
+ const M = async () => {
409
399
  try {
410
- const { connection: y, connectionId: c } = await n.createConnection(e.viewerId);
411
- w.value = c, a.value && (await E(), N());
412
- } catch (y) {
413
- console.error("Failed to initialize viewer:", y), f.value = `Failed to initialize: ${y.message}`;
400
+ const { connection: v, connectionId: c } = await n.createConnection(e.viewerId);
401
+ w.value = c, a.value && (await x(), N());
402
+ } catch (v) {
403
+ console.error("Failed to initialize viewer:", v), f.value = `Failed to initialize: ${v.message}`;
414
404
  }
415
- }, E = async () => {
405
+ }, x = async () => {
416
406
  if (!a.value) {
417
407
  f.value = "Please provide a valid S3 URL";
418
408
  return;
419
409
  }
420
- const y = e.fileId || a.value, c = n.getLoadedFile(y);
410
+ const v = e.fileId || a.value, c = n.getLoadedFile(v);
421
411
  if (c && !c.isLoading && !c.error) {
422
- l.value = c.tableName, P("SELECT * FROM data LIMIT 10;");
412
+ l.value = c.tableName, O("SELECT * FROM data LIMIT 10;");
423
413
  return;
424
414
  }
425
415
  o.value = !0, f.value = "";
426
416
  try {
427
- const g = e.fileId ? `file_${e.fileId}` : `data_${Date.now()}`, v = await n.loadFile(
417
+ const g = e.fileId ? `file_${e.fileId}` : `data_${Date.now()}`, y = await n.loadFile(
428
418
  a.value,
429
419
  e.fileType,
430
420
  g,
@@ -435,12 +425,12 @@ const Xr = Fr("duckdb", () => {
435
425
  e.fileId
436
426
  // Pass stable file ID
437
427
  );
438
- l.value = v, P("SELECT * FROM data LIMIT 10;");
428
+ l.value = y, O("SELECT * FROM data LIMIT 10;");
439
429
  } catch {
440
430
  } finally {
441
431
  o.value = !1;
442
432
  }
443
- }, M = (y) => !l.value || !y ? y : y.replace(/\bFROM\s+data\b/gi, `FROM ${l.value}`).replace(/\bJOIN\s+data\b/gi, `JOIN ${l.value}`).replace(/\bUPDATE\s+data\b/gi, `UPDATE ${l.value}`).replace(/\bINSERT\s+INTO\s+data\b/gi, `INSERT INTO ${l.value}`).replace(/\bINTO\s+data\b/gi, `INTO ${l.value}`).replace(/\btable_info\(\s*data\s*\)/gi, `table_info(${l.value})`).replace(/\bDESCRIBE\s+data\b/gi, `DESCRIBE ${l.value}`).replace(
433
+ }, I = (v) => !l.value || !v ? v : v.replace(/\bFROM\s+data\b/gi, `FROM ${l.value}`).replace(/\bJOIN\s+data\b/gi, `JOIN ${l.value}`).replace(/\bUPDATE\s+data\b/gi, `UPDATE ${l.value}`).replace(/\bINSERT\s+INTO\s+data\b/gi, `INSERT INTO ${l.value}`).replace(/\bINTO\s+data\b/gi, `INTO ${l.value}`).replace(/\btable_info\(\s*data\s*\)/gi, `table_info(${l.value})`).replace(/\bDESCRIBE\s+data\b/gi, `DESCRIBE ${l.value}`).replace(
444
434
  /\bPRAGMA\s+table_info\(\s*data\s*\)/gi,
445
435
  `PRAGMA table_info(${l.value})`
446
436
  ), N = async () => {
@@ -454,96 +444,96 @@ const Xr = Fr("duckdb", () => {
454
444
  }
455
445
  i.value = !0, f.value = "", d.value = 1;
456
446
  try {
457
- const y = M(s.value.trim());
447
+ const v = I(s.value.trim());
458
448
  u.value = await n.executeQuery(
459
- y,
449
+ v,
460
450
  w.value
461
451
  );
462
- } catch (y) {
463
- console.error("Query execution failed:", y), f.value = `Query execution failed: ${y.message}`, u.value = null;
452
+ } catch (v) {
453
+ console.error("Query execution failed:", v), f.value = `Query execution failed: ${v.message}`, u.value = null;
464
454
  } finally {
465
455
  i.value = !1;
466
456
  }
467
- }, C = (y) => {
468
- d.value = y;
469
- }, U = (y) => {
470
- p.value = y, d.value = 1;
471
- }, P = (y) => {
472
- s.value = y;
473
- }, j = (y) => y == null ? "NULL" : typeof y == "number" ? Number.isInteger(y) ? y.toString() : y.toFixed(4) : typeof y == "string" && y.length > 100 ? y.substring(0, 100) + "..." : y.toString(), W = () => {
457
+ }, C = (v) => {
458
+ d.value = v;
459
+ }, L = (v) => {
460
+ p.value = v, d.value = 1;
461
+ }, O = (v) => {
462
+ s.value = v;
463
+ }, G = (v) => v == null ? "NULL" : typeof v == "number" ? Number.isInteger(v) ? v.toString() : v.toFixed(4) : typeof v == "string" && v.length > 100 ? v.substring(0, 100) + "..." : v.toString(), q = () => {
474
464
  if (!u.value || u.value.length === 0) return;
475
- const y = Object.keys(u.value[0]), c = [
476
- y.join(","),
465
+ const v = Object.keys(u.value[0]), c = [
466
+ v.join(","),
477
467
  ...u.value.map(
478
- (T) => y.map((R) => {
479
- const k = T[R], q = k == null ? "" : k.toString();
480
- return q.includes(",") ? `"${q}"` : q;
468
+ (T) => v.map((R) => {
469
+ const B = T[R], Y = B == null ? "" : B.toString();
470
+ return Y.includes(",") ? `"${Y}"` : Y;
481
471
  }).join(",")
482
472
  )
483
473
  ].join(`
484
- `), g = new Blob([c], { type: "text/csv" }), v = URL.createObjectURL(g), b = document.createElement("a");
485
- b.href = v, b.download = "query-results.csv", b.click(), URL.revokeObjectURL(v);
474
+ `), g = new Blob([c], { type: "text/csv" }), y = URL.createObjectURL(g), b = document.createElement("a");
475
+ b.href = y, b.download = "query-results.csv", b.click(), URL.revokeObjectURL(y);
486
476
  }, _ = () => {
487
477
  f.value = "";
488
478
  };
489
- return Ue(async () => {
490
- await x();
491
- }), Cr(async () => {
479
+ return Be(async () => {
480
+ await M();
481
+ }), Sr(async () => {
492
482
  w.value && (n.activeConnectionCount, n.loadedFiles.size, await n.closeConnection(w.value), n.activeConnectionCount, n.loadedFiles.size);
493
- }), (y, c) => {
494
- const g = Ae("bf-button"), v = Ae("el-pagination");
495
- return z(), Y("div", Hr, [
496
- B("header", Wr, [
497
- c[3] || (c[3] = B("h1", null, "Data Explorer", -1)),
498
- B("div", {
499
- class: Lr(["status-indicator", { connected: I.value, loading: o.value }])
483
+ }), (v, c) => {
484
+ const g = be("bf-button"), y = be("el-pagination");
485
+ return z(), V("div", Gr, [
486
+ D("header", Xr, [
487
+ c[3] || (c[3] = D("h1", null, "Data Explorer", -1)),
488
+ D("div", {
489
+ class: Cr(["status-indicator", { connected: E.value, loading: o.value }])
500
490
  }, ot(A.value), 3)
501
491
  ]),
502
- B("div", Qr, [
503
- I.value ? (z(), Y("div", Kr, [
504
- c[5] || (c[5] = B("h3", null, "SQL Query", -1)),
505
- B("div", Jr, [
506
- c[4] || (c[4] = B("span", null, "Quick queries:", -1)),
507
- (z(!0), Y(_t, null, xt(H.value, (b) => (z(), Y("button", {
492
+ D("div", Wr, [
493
+ E.value ? (z(), V("div", Hr, [
494
+ c[5] || (c[5] = D("h3", null, "SQL Query", -1)),
495
+ D("div", Qr, [
496
+ c[4] || (c[4] = D("span", null, "Quick queries:", -1)),
497
+ (z(!0), V(_t, null, xt(H.value, (b) => (z(), V("button", {
508
498
  key: b.name,
509
- onClick: (T) => P(b.query),
499
+ onClick: (T) => O(b.query),
510
500
  class: "example-btn"
511
- }, ot(b.name), 9, Zr))), 128))
501
+ }, ot(b.name), 9, Kr))), 128))
512
502
  ]),
513
- De(B("textarea", {
503
+ De(D("textarea", {
514
504
  "onUpdate:modelValue": c[0] || (c[0] = (b) => s.value = b),
515
505
  placeholder: "SELECT * FROM data LIMIT 10;",
516
506
  class: "query-textarea",
517
507
  rows: "4"
518
508
  }, null, 512), [
519
- [kr, s.value]
509
+ [Lr, s.value]
520
510
  ]),
521
511
  it(g, {
522
512
  onClick: N,
523
513
  disabled: i.value || !s.value
524
514
  }, {
525
- default: Pt(() => [
526
- Ee(ot(i.value ? "Running..." : "Execute Query"), 1)
515
+ default: Ot(() => [
516
+ Ae(ot(i.value ? "Running..." : "Execute Query"), 1)
527
517
  ]),
528
518
  _: 1
529
519
  }, 8, ["disabled"])
530
520
  ])) : kt("", !0),
531
- u.value ? (z(), Y("div", to, [
532
- B("h3", null, "Results (" + ot(u.value.length) + " rows)", 1),
533
- B("div", eo, [
534
- B("div", no, [
521
+ u.value ? (z(), V("div", Jr, [
522
+ D("h3", null, "Results (" + ot(u.value.length) + " rows)", 1),
523
+ D("div", Zr, [
524
+ D("div", to, [
535
525
  it(g, {
536
526
  class: "secondary",
537
- onClick: W
527
+ onClick: q
538
528
  }, {
539
- default: Pt(() => [...c[6] || (c[6] = [
540
- Ee("Export to CSV", -1)
529
+ default: Ot(() => [...c[6] || (c[6] = [
530
+ Ae("Export to CSV", -1)
541
531
  ])]),
542
532
  _: 1
543
533
  })
544
534
  ]),
545
- B("div", ro, [
546
- h.value === "table" && L.value > 1 ? (z(), Tn(v, {
535
+ D("div", eo, [
536
+ h.value === "table" && k.value > 1 ? (z(), En(y, {
547
537
  key: 0,
548
538
  "current-page": d.value,
549
539
  "onUpdate:currentPage": c[1] || (c[1] = (b) => d.value = b),
@@ -555,22 +545,22 @@ const Xr = Fr("duckdb", () => {
555
545
  }, null, 8, ["current-page", "page-size", "total"])) : kt("", !0)
556
546
  ])
557
547
  ]),
558
- c[7] || (c[7] = B("div", { class: "pagination-wrapper" }, null, -1)),
559
- h.value === "table" ? (z(), Y("div", oo, [
560
- B("table", io, [
561
- B("thead", null, [
562
- B("tr", null, [
563
- (z(!0), Y(_t, null, xt(m.value, (b) => (z(), Y("th", { key: b }, ot(b), 1))), 128))
548
+ c[7] || (c[7] = D("div", { class: "pagination-wrapper" }, null, -1)),
549
+ h.value === "table" ? (z(), V("div", no, [
550
+ D("table", ro, [
551
+ D("thead", null, [
552
+ D("tr", null, [
553
+ (z(!0), V(_t, null, xt(m.value, (b) => (z(), V("th", { key: b }, ot(b), 1))), 128))
564
554
  ])
565
555
  ]),
566
- B("tbody", null, [
567
- (z(!0), Y(_t, null, xt(D.value, (b, T) => (z(), Y("tr", { key: T }, [
568
- (z(!0), Y(_t, null, xt(m.value, (R) => (z(), Y("td", { key: R }, ot(j(b[R])), 1))), 128))
556
+ D("tbody", null, [
557
+ (z(!0), V(_t, null, xt(U.value, (b, T) => (z(), V("tr", { key: T }, [
558
+ (z(!0), V(_t, null, xt(m.value, (R) => (z(), V("td", { key: R }, ot(G(b[R])), 1))), 128))
569
559
  ]))), 128))
570
560
  ])
571
561
  ]),
572
- L.value > 1 ? (z(), Y("div", ao, [
573
- it(v, {
562
+ k.value > 1 ? (z(), V("div", oo, [
563
+ it(y, {
574
564
  "current-page": d.value,
575
565
  "onUpdate:currentPage": c[2] || (c[2] = (b) => d.value = b),
576
566
  "page-size": p.value,
@@ -578,17 +568,17 @@ const Xr = Fr("duckdb", () => {
578
568
  layout: " prev, pager, next",
579
569
  "page-sizes": [25, 50, 100, 200, 500],
580
570
  onCurrentChange: C,
581
- onSizeChange: U
571
+ onSizeChange: L
582
572
  }, null, 8, ["current-page", "page-size", "total"])
583
573
  ])) : kt("", !0)
584
- ])) : (z(), Y("div", lo, [
585
- B("pre", null, ot(JSON.stringify(u.value.slice(0, 100), null, 2)), 1)
574
+ ])) : (z(), V("div", io, [
575
+ D("pre", null, ot(JSON.stringify(u.value.slice(0, 100), null, 2)), 1)
586
576
  ]))
587
577
  ])) : kt("", !0),
588
- f.value ? (z(), Y("div", uo, [
589
- c[8] || (c[8] = B("h3", null, "Error", -1)),
590
- B("p", null, ot(f.value), 1),
591
- B("button", {
578
+ f.value ? (z(), V("div", ao, [
579
+ c[8] || (c[8] = D("h3", null, "Error", -1)),
580
+ D("p", null, ot(f.value), 1),
581
+ D("button", {
592
582
  onClick: _,
593
583
  class: "clear-error-btn"
594
584
  }, "Clear")
@@ -597,7 +587,7 @@ const Xr = Fr("duckdb", () => {
597
587
  ]);
598
588
  };
599
589
  }
600
- }, co = /* @__PURE__ */ jt(so, [["__scopeId", "data-v-6635a757"]]), fo = { class: "app-container" }, ho = /* @__PURE__ */ Lt({
590
+ }, uo = /* @__PURE__ */ jt(lo, [["__scopeId", "data-v-6635a757"]]), so = { class: "app-container" }, co = /* @__PURE__ */ Lt({
601
591
  __name: "DataExplorerWrap",
602
592
  props: {
603
593
  pkg: {},
@@ -608,52 +598,56 @@ const Xr = Fr("duckdb", () => {
608
598
  },
609
599
  setup(t) {
610
600
  const e = t, n = S([]), r = S(""), o = S("parquet"), i = S("");
611
- Ue(async () => {
601
+ Be(async () => {
612
602
  if (e.srcUrl) {
613
603
  r.value = e.srcUrl, o.value = e.srcFileType ?? (e.srcUrl.toLowerCase().endsWith(".csv") ? "csv" : "parquet"), i.value = e.srcFileId ?? "url_" + btoa(e.srcUrl).replace(/=+$/, "").replace(/[+/]/g, "_");
614
604
  return;
615
605
  }
616
- const s = Gr("", ["content", "id"], e.pkg);
617
- if (!s || !e.apiUrl) {
606
+ const u = Vr("", ["content", "id"], e.pkg);
607
+ if (!u || !e.apiUrl) {
618
608
  console.error("[DuckDBViewerWrapper] Missing pkg.id or apiUrl, and no srcUrl provided.");
619
609
  return;
620
610
  }
621
611
  try {
622
- await a(s);
623
- const u = n.value?.[0]?.content?.id;
624
- if (!u) {
612
+ await l(u);
613
+ const f = n.value?.[0]?.content?.id;
614
+ if (!f) {
625
615
  console.error("[DuckDBViewerWrapper] No files found in /view response.");
626
616
  return;
627
617
  }
628
- i.value = u, r.value = await l(s, u);
629
- const f = e.pkg?.content?.packageType;
630
- o.value = f === "CSV" ? "csv" : "parquet";
631
- } catch (u) {
632
- console.error(u);
618
+ i.value = f, r.value = await s(u, f);
619
+ const h = e.pkg?.content?.packageType;
620
+ o.value = h === "CSV" ? "csv" : "parquet";
621
+ } catch (f) {
622
+ console.error(f);
633
623
  }
634
624
  });
635
- async function a(s) {
636
- const u = await ae(), f = `${e.apiUrl}/packages/${s}/view?api_key=${u}`, h = await fetch(f);
637
- if (!h.ok) throw new Error(`view failed: ${h.status}`);
638
- n.value = await h.json();
625
+ async function a() {
626
+ const { useGetToken: u } = await import("./useGetToken-BRN19kkn-Dzc3_tWy.mjs");
627
+ return u();
639
628
  }
640
- async function l(s, u) {
641
- const f = await ae(), h = `${e.apiUrl}/packages/${s}/files/${u}?api_key=${f}`, d = await fetch(h);
642
- if (!d.ok) throw new Error(`file url failed: ${d.status}`);
643
- return (await d.json()).url;
629
+ async function l(u) {
630
+ const f = await a(), h = `${e.apiUrl}/packages/${u}/view?api_key=${f}`, d = await fetch(h);
631
+ if (!d.ok) throw new Error(`view failed: ${d.status}`);
632
+ n.value = await d.json();
644
633
  }
645
- return (s, u) => (z(), Y("div", fo, [
646
- it(co, {
634
+ async function s(u, f) {
635
+ const h = await a(), d = `${e.apiUrl}/packages/${u}/files/${f}?api_key=${h}`, p = await fetch(d);
636
+ if (!p.ok) throw new Error(`file url failed: ${p.status}`);
637
+ return (await p.json()).url;
638
+ }
639
+ return (u, f) => (z(), V("div", so, [
640
+ it(uo, {
647
641
  url: r.value,
648
642
  "file-type": o.value,
649
643
  "file-id": i.value
650
644
  }, null, 8, ["url", "file-type", "file-id"])
651
645
  ]));
652
646
  }
653
- }), po = /* @__PURE__ */ jt(ho, [["__scopeId", "data-v-92b3e9f2"]]);
654
- var _o = { value: () => {
647
+ }), fo = /* @__PURE__ */ jt(co, [["__scopeId", "data-v-0974a90e"]]);
648
+ var ho = { value: () => {
655
649
  } };
656
- function $e() {
650
+ function Ue() {
657
651
  for (var t = 0, e = arguments.length, n = {}, r; t < e; ++t) {
658
652
  if (!(r = arguments[t] + "") || r in n || /[\s.]/.test(r)) throw new Error("illegal type: " + r);
659
653
  n[r] = [];
@@ -663,25 +657,25 @@ function $e() {
663
657
  function te(t) {
664
658
  this._ = t;
665
659
  }
666
- function mo(t, e) {
660
+ function po(t, e) {
667
661
  return t.trim().split(/^|\s+/).map(function(n) {
668
662
  var r = "", o = n.indexOf(".");
669
663
  if (o >= 0 && (r = n.slice(o + 1), n = n.slice(0, o)), n && !e.hasOwnProperty(n)) throw new Error("unknown type: " + n);
670
664
  return { type: n, name: r };
671
665
  });
672
666
  }
673
- te.prototype = $e.prototype = {
667
+ te.prototype = Ue.prototype = {
674
668
  constructor: te,
675
669
  on: function(t, e) {
676
- var n = this._, r = mo(t + "", n), o, i = -1, a = r.length;
670
+ var n = this._, r = po(t + "", n), o, i = -1, a = r.length;
677
671
  if (arguments.length < 2) {
678
- for (; ++i < a; ) if ((o = (t = r[i]).type) && (o = go(n[o], t.name))) return o;
672
+ for (; ++i < a; ) if ((o = (t = r[i]).type) && (o = _o(n[o], t.name))) return o;
679
673
  return;
680
674
  }
681
675
  if (e != null && typeof e != "function") throw new Error("invalid callback: " + e);
682
676
  for (; ++i < a; )
683
- if (o = (t = r[i]).type) n[o] = Ze(n[o], t.name, e);
684
- else if (e == null) for (o in n) n[o] = Ze(n[o], t.name, null);
677
+ if (o = (t = r[i]).type) n[o] = Je(n[o], t.name, e);
678
+ else if (e == null) for (o in n) n[o] = Je(n[o], t.name, null);
685
679
  return this;
686
680
  },
687
681
  copy: function() {
@@ -699,135 +693,135 @@ te.prototype = $e.prototype = {
699
693
  for (var r = this._[t], o = 0, i = r.length; o < i; ++o) r[o].value.apply(e, n);
700
694
  }
701
695
  };
702
- function go(t, e) {
696
+ function _o(t, e) {
703
697
  for (var n = 0, r = t.length, o; n < r; ++n)
704
698
  if ((o = t[n]).name === e)
705
699
  return o.value;
706
700
  }
707
- function Ze(t, e, n) {
701
+ function Je(t, e, n) {
708
702
  for (var r = 0, o = t.length; r < o; ++r)
709
703
  if (t[r].name === e) {
710
- t[r] = _o, t = t.slice(0, r).concat(t.slice(r + 1));
704
+ t[r] = ho, t = t.slice(0, r).concat(t.slice(r + 1));
711
705
  break;
712
706
  }
713
707
  return n != null && t.push({ name: e, value: n }), t;
714
708
  }
715
- var Te = "http://www.w3.org/1999/xhtml";
716
- const tn = {
709
+ var Ee = "http://www.w3.org/1999/xhtml";
710
+ const Ze = {
717
711
  svg: "http://www.w3.org/2000/svg",
718
- xhtml: Te,
712
+ xhtml: Ee,
719
713
  xlink: "http://www.w3.org/1999/xlink",
720
714
  xml: "http://www.w3.org/XML/1998/namespace",
721
715
  xmlns: "http://www.w3.org/2000/xmlns/"
722
716
  };
723
- function pe(t) {
717
+ function de(t) {
724
718
  var e = t += "", n = e.indexOf(":");
725
- return n >= 0 && (e = t.slice(0, n)) !== "xmlns" && (t = t.slice(n + 1)), tn.hasOwnProperty(e) ? { space: tn[e], local: t } : t;
719
+ return n >= 0 && (e = t.slice(0, n)) !== "xmlns" && (t = t.slice(n + 1)), Ze.hasOwnProperty(e) ? { space: Ze[e], local: t } : t;
726
720
  }
727
- function vo(t) {
721
+ function mo(t) {
728
722
  return function() {
729
723
  var e = this.ownerDocument, n = this.namespaceURI;
730
- return n === Te && e.documentElement.namespaceURI === Te ? e.createElement(t) : e.createElementNS(n, t);
724
+ return n === Ee && e.documentElement.namespaceURI === Ee ? e.createElement(t) : e.createElementNS(n, t);
731
725
  };
732
726
  }
733
- function yo(t) {
727
+ function go(t) {
734
728
  return function() {
735
729
  return this.ownerDocument.createElementNS(t.space, t.local);
736
730
  };
737
731
  }
738
- function Mn(t) {
739
- var e = pe(t);
740
- return (e.local ? yo : vo)(e);
732
+ function In(t) {
733
+ var e = de(t);
734
+ return (e.local ? go : mo)(e);
741
735
  }
742
- function wo() {
736
+ function vo() {
743
737
  }
744
- function Fe(t) {
745
- return t == null ? wo : function() {
738
+ function $e(t) {
739
+ return t == null ? vo : function() {
746
740
  return this.querySelector(t);
747
741
  };
748
742
  }
749
- function bo(t) {
750
- typeof t != "function" && (t = Fe(t));
743
+ function yo(t) {
744
+ typeof t != "function" && (t = $e(t));
751
745
  for (var e = this._groups, n = e.length, r = new Array(n), o = 0; o < n; ++o)
752
746
  for (var i = e[o], a = i.length, l = r[o] = new Array(a), s, u, f = 0; f < a; ++f)
753
747
  (s = i[f]) && (u = t.call(s, s.__data__, f, i)) && ("__data__" in s && (u.__data__ = s.__data__), l[f] = u);
754
748
  return new et(r, this._parents);
755
749
  }
756
- function Ao(t) {
750
+ function wo(t) {
757
751
  return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
758
752
  }
759
- function Eo() {
753
+ function bo() {
760
754
  return [];
761
755
  }
762
- function xn(t) {
763
- return t == null ? Eo : function() {
756
+ function Mn(t) {
757
+ return t == null ? bo : function() {
764
758
  return this.querySelectorAll(t);
765
759
  };
766
760
  }
767
- function To(t) {
761
+ function Ao(t) {
768
762
  return function() {
769
- return Ao(t.apply(this, arguments));
763
+ return wo(t.apply(this, arguments));
770
764
  };
771
765
  }
772
- function Io(t) {
773
- typeof t == "function" ? t = To(t) : t = xn(t);
766
+ function Eo(t) {
767
+ typeof t == "function" ? t = Ao(t) : t = Mn(t);
774
768
  for (var e = this._groups, n = e.length, r = [], o = [], i = 0; i < n; ++i)
775
769
  for (var a = e[i], l = a.length, s, u = 0; u < l; ++u)
776
770
  (s = a[u]) && (r.push(t.call(s, s.__data__, u, a)), o.push(s));
777
771
  return new et(r, o);
778
772
  }
779
- function Rn(t) {
773
+ function xn(t) {
780
774
  return function() {
781
775
  return this.matches(t);
782
776
  };
783
777
  }
784
- function Nn(t) {
778
+ function Rn(t) {
785
779
  return function(e) {
786
780
  return e.matches(t);
787
781
  };
788
782
  }
789
- var Mo = Array.prototype.find;
790
- function xo(t) {
783
+ var To = Array.prototype.find;
784
+ function Io(t) {
791
785
  return function() {
792
- return Mo.call(this.children, t);
786
+ return To.call(this.children, t);
793
787
  };
794
788
  }
795
- function Ro() {
789
+ function Mo() {
796
790
  return this.firstElementChild;
797
791
  }
798
- function No(t) {
799
- return this.select(t == null ? Ro : xo(typeof t == "function" ? t : Nn(t)));
792
+ function xo(t) {
793
+ return this.select(t == null ? Mo : Io(typeof t == "function" ? t : Rn(t)));
800
794
  }
801
- var So = Array.prototype.filter;
802
- function Co() {
795
+ var Ro = Array.prototype.filter;
796
+ function No() {
803
797
  return Array.from(this.children);
804
798
  }
805
- function Lo(t) {
799
+ function So(t) {
806
800
  return function() {
807
- return So.call(this.children, t);
801
+ return Ro.call(this.children, t);
808
802
  };
809
803
  }
810
- function ko(t) {
811
- return this.selectAll(t == null ? Co : Lo(typeof t == "function" ? t : Nn(t)));
804
+ function Co(t) {
805
+ return this.selectAll(t == null ? No : So(typeof t == "function" ? t : Rn(t)));
812
806
  }
813
- function Bo(t) {
814
- typeof t != "function" && (t = Rn(t));
807
+ function Lo(t) {
808
+ typeof t != "function" && (t = xn(t));
815
809
  for (var e = this._groups, n = e.length, r = new Array(n), o = 0; o < n; ++o)
816
810
  for (var i = e[o], a = i.length, l = r[o] = [], s, u = 0; u < a; ++u)
817
811
  (s = i[u]) && t.call(s, s.__data__, u, i) && l.push(s);
818
812
  return new et(r, this._parents);
819
813
  }
820
- function Sn(t) {
814
+ function Nn(t) {
821
815
  return new Array(t.length);
822
816
  }
823
- function Uo() {
824
- return new et(this._enter || this._groups.map(Sn), this._parents);
817
+ function ko() {
818
+ return new et(this._enter || this._groups.map(Nn), this._parents);
825
819
  }
826
- function le(t, e) {
820
+ function ae(t, e) {
827
821
  this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
828
822
  }
829
- le.prototype = {
830
- constructor: le,
823
+ ae.prototype = {
824
+ constructor: ae,
831
825
  appendChild: function(t) {
832
826
  return this._parent.insertBefore(t, this._next);
833
827
  },
@@ -841,55 +835,55 @@ le.prototype = {
841
835
  return this._parent.querySelectorAll(t);
842
836
  }
843
837
  };
844
- function Do(t) {
838
+ function Bo(t) {
845
839
  return function() {
846
840
  return t;
847
841
  };
848
842
  }
849
- function $o(t, e, n, r, o, i) {
843
+ function Do(t, e, n, r, o, i) {
850
844
  for (var a = 0, l, s = e.length, u = i.length; a < u; ++a)
851
- (l = e[a]) ? (l.__data__ = i[a], r[a] = l) : n[a] = new le(t, i[a]);
845
+ (l = e[a]) ? (l.__data__ = i[a], r[a] = l) : n[a] = new ae(t, i[a]);
852
846
  for (; a < s; ++a)
853
847
  (l = e[a]) && (o[a] = l);
854
848
  }
855
- function Fo(t, e, n, r, o, i, a) {
849
+ function Uo(t, e, n, r, o, i, a) {
856
850
  var l, s, u = /* @__PURE__ */ new Map(), f = e.length, h = i.length, d = new Array(f), p;
857
851
  for (l = 0; l < f; ++l)
858
852
  (s = e[l]) && (d[l] = p = a.call(s, s.__data__, l, e) + "", u.has(p) ? o[l] = s : u.set(p, s));
859
853
  for (l = 0; l < h; ++l)
860
- p = a.call(t, i[l], l, i) + "", (s = u.get(p)) ? (r[l] = s, s.__data__ = i[l], u.delete(p)) : n[l] = new le(t, i[l]);
854
+ p = a.call(t, i[l], l, i) + "", (s = u.get(p)) ? (r[l] = s, s.__data__ = i[l], u.delete(p)) : n[l] = new ae(t, i[l]);
861
855
  for (l = 0; l < f; ++l)
862
856
  (s = e[l]) && u.get(d[l]) === s && (o[l] = s);
863
857
  }
864
- function Po(t) {
858
+ function $o(t) {
865
859
  return t.__data__;
866
860
  }
867
- function Oo(t, e) {
868
- if (!arguments.length) return Array.from(this, Po);
869
- var n = e ? Fo : $o, r = this._parents, o = this._groups;
870
- typeof t != "function" && (t = Do(t));
861
+ function Fo(t, e) {
862
+ if (!arguments.length) return Array.from(this, $o);
863
+ var n = e ? Uo : Do, r = this._parents, o = this._groups;
864
+ typeof t != "function" && (t = Bo(t));
871
865
  for (var i = o.length, a = new Array(i), l = new Array(i), s = new Array(i), u = 0; u < i; ++u) {
872
- var f = r[u], h = o[u], d = h.length, p = zo(t.call(f, f && f.__data__, u, r)), w = p.length, I = l[u] = new Array(w), A = a[u] = new Array(w), m = s[u] = new Array(d);
873
- n(f, h, I, A, m, p, e);
874
- for (var L = 0, D = 0, H, x; L < w; ++L)
875
- if (H = I[L]) {
876
- for (L >= D && (D = L + 1); !(x = A[D]) && ++D < w; ) ;
877
- H._next = x || null;
866
+ var f = r[u], h = o[u], d = h.length, p = Oo(t.call(f, f && f.__data__, u, r)), w = p.length, E = l[u] = new Array(w), A = a[u] = new Array(w), m = s[u] = new Array(d);
867
+ n(f, h, E, A, m, p, e);
868
+ for (var k = 0, U = 0, H, M; k < w; ++k)
869
+ if (H = E[k]) {
870
+ for (k >= U && (U = k + 1); !(M = A[U]) && ++U < w; ) ;
871
+ H._next = M || null;
878
872
  }
879
873
  }
880
874
  return a = new et(a, r), a._enter = l, a._exit = s, a;
881
875
  }
882
- function zo(t) {
876
+ function Oo(t) {
883
877
  return typeof t == "object" && "length" in t ? t : Array.from(t);
884
878
  }
885
- function qo() {
886
- return new et(this._exit || this._groups.map(Sn), this._parents);
879
+ function Po() {
880
+ return new et(this._exit || this._groups.map(Nn), this._parents);
887
881
  }
888
- function Yo(t, e, n) {
882
+ function qo(t, e, n) {
889
883
  var r = this.enter(), o = this, i = this.exit();
890
884
  return typeof t == "function" ? (r = t(r), r && (r = r.selection())) : r = r.append(t + ""), e != null && (o = e(o), o && (o = o.selection())), n == null ? i.remove() : n(i), r && o ? r.merge(o).order() : o;
891
885
  }
892
- function Vo(t) {
886
+ function zo(t) {
893
887
  for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, o = n.length, i = r.length, a = Math.min(o, i), l = new Array(o), s = 0; s < a; ++s)
894
888
  for (var u = n[s], f = r[s], h = u.length, d = l[s] = new Array(h), p, w = 0; w < h; ++w)
895
889
  (p = u[w] || f[w]) && (d[w] = p);
@@ -897,14 +891,14 @@ function Vo(t) {
897
891
  l[s] = n[s];
898
892
  return new et(l, this._parents);
899
893
  }
900
- function jo() {
894
+ function Yo() {
901
895
  for (var t = this._groups, e = -1, n = t.length; ++e < n; )
902
896
  for (var r = t[e], o = r.length - 1, i = r[o], a; --o >= 0; )
903
897
  (a = r[o]) && (i && a.compareDocumentPosition(i) ^ 4 && i.parentNode.insertBefore(a, i), i = a);
904
898
  return this;
905
899
  }
906
- function Go(t) {
907
- t || (t = Xo);
900
+ function Vo(t) {
901
+ t || (t = jo);
908
902
  function e(h, d) {
909
903
  return h && d ? t(h.__data__, d.__data__) : !h - !d;
910
904
  }
@@ -915,17 +909,17 @@ function Go(t) {
915
909
  }
916
910
  return new et(o, this._parents).order();
917
911
  }
918
- function Xo(t, e) {
912
+ function jo(t, e) {
919
913
  return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
920
914
  }
921
- function Ho() {
915
+ function Go() {
922
916
  var t = arguments[0];
923
917
  return arguments[0] = this, t.apply(null, arguments), this;
924
918
  }
925
- function Wo() {
919
+ function Xo() {
926
920
  return Array.from(this);
927
921
  }
928
- function Qo() {
922
+ function Wo() {
929
923
  for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
930
924
  for (var r = t[e], o = 0, i = r.length; o < i; ++o) {
931
925
  var a = r[o];
@@ -933,114 +927,114 @@ function Qo() {
933
927
  }
934
928
  return null;
935
929
  }
936
- function Ko() {
930
+ function Ho() {
937
931
  let t = 0;
938
932
  for (const e of this) ++t;
939
933
  return t;
940
934
  }
941
- function Jo() {
935
+ function Qo() {
942
936
  return !this.node();
943
937
  }
944
- function Zo(t) {
938
+ function Ko(t) {
945
939
  for (var e = this._groups, n = 0, r = e.length; n < r; ++n)
946
940
  for (var o = e[n], i = 0, a = o.length, l; i < a; ++i)
947
941
  (l = o[i]) && t.call(l, l.__data__, i, o);
948
942
  return this;
949
943
  }
950
- function ti(t) {
944
+ function Jo(t) {
951
945
  return function() {
952
946
  this.removeAttribute(t);
953
947
  };
954
948
  }
955
- function ei(t) {
949
+ function Zo(t) {
956
950
  return function() {
957
951
  this.removeAttributeNS(t.space, t.local);
958
952
  };
959
953
  }
960
- function ni(t, e) {
954
+ function ti(t, e) {
961
955
  return function() {
962
956
  this.setAttribute(t, e);
963
957
  };
964
958
  }
965
- function ri(t, e) {
959
+ function ei(t, e) {
966
960
  return function() {
967
961
  this.setAttributeNS(t.space, t.local, e);
968
962
  };
969
963
  }
970
- function oi(t, e) {
964
+ function ni(t, e) {
971
965
  return function() {
972
966
  var n = e.apply(this, arguments);
973
967
  n == null ? this.removeAttribute(t) : this.setAttribute(t, n);
974
968
  };
975
969
  }
976
- function ii(t, e) {
970
+ function ri(t, e) {
977
971
  return function() {
978
972
  var n = e.apply(this, arguments);
979
973
  n == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, n);
980
974
  };
981
975
  }
982
- function ai(t, e) {
983
- var n = pe(t);
976
+ function oi(t, e) {
977
+ var n = de(t);
984
978
  if (arguments.length < 2) {
985
979
  var r = this.node();
986
980
  return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
987
981
  }
988
- return this.each((e == null ? n.local ? ei : ti : typeof e == "function" ? n.local ? ii : oi : n.local ? ri : ni)(n, e));
982
+ return this.each((e == null ? n.local ? Zo : Jo : typeof e == "function" ? n.local ? ri : ni : n.local ? ei : ti)(n, e));
989
983
  }
990
- function Cn(t) {
984
+ function Sn(t) {
991
985
  return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
992
986
  }
993
- function li(t) {
987
+ function ii(t) {
994
988
  return function() {
995
989
  this.style.removeProperty(t);
996
990
  };
997
991
  }
998
- function ui(t, e, n) {
992
+ function ai(t, e, n) {
999
993
  return function() {
1000
994
  this.style.setProperty(t, e, n);
1001
995
  };
1002
996
  }
1003
- function si(t, e, n) {
997
+ function li(t, e, n) {
1004
998
  return function() {
1005
999
  var r = e.apply(this, arguments);
1006
1000
  r == null ? this.style.removeProperty(t) : this.style.setProperty(t, r, n);
1007
1001
  };
1008
1002
  }
1009
- function ci(t, e, n) {
1010
- return arguments.length > 1 ? this.each((e == null ? li : typeof e == "function" ? si : ui)(t, e, n ?? "")) : St(this.node(), t);
1003
+ function ui(t, e, n) {
1004
+ return arguments.length > 1 ? this.each((e == null ? ii : typeof e == "function" ? li : ai)(t, e, n ?? "")) : St(this.node(), t);
1011
1005
  }
1012
1006
  function St(t, e) {
1013
- return t.style.getPropertyValue(e) || Cn(t).getComputedStyle(t, null).getPropertyValue(e);
1007
+ return t.style.getPropertyValue(e) || Sn(t).getComputedStyle(t, null).getPropertyValue(e);
1014
1008
  }
1015
- function fi(t) {
1009
+ function si(t) {
1016
1010
  return function() {
1017
1011
  delete this[t];
1018
1012
  };
1019
1013
  }
1020
- function hi(t, e) {
1014
+ function ci(t, e) {
1021
1015
  return function() {
1022
1016
  this[t] = e;
1023
1017
  };
1024
1018
  }
1025
- function di(t, e) {
1019
+ function fi(t, e) {
1026
1020
  return function() {
1027
1021
  var n = e.apply(this, arguments);
1028
1022
  n == null ? delete this[t] : this[t] = n;
1029
1023
  };
1030
1024
  }
1031
- function pi(t, e) {
1032
- return arguments.length > 1 ? this.each((e == null ? fi : typeof e == "function" ? di : hi)(t, e)) : this.node()[t];
1025
+ function hi(t, e) {
1026
+ return arguments.length > 1 ? this.each((e == null ? si : typeof e == "function" ? fi : ci)(t, e)) : this.node()[t];
1033
1027
  }
1034
- function Ln(t) {
1028
+ function Cn(t) {
1035
1029
  return t.trim().split(/^|\s+/);
1036
1030
  }
1037
- function Pe(t) {
1038
- return t.classList || new kn(t);
1031
+ function Fe(t) {
1032
+ return t.classList || new Ln(t);
1039
1033
  }
1040
- function kn(t) {
1041
- this._node = t, this._names = Ln(t.getAttribute("class") || "");
1034
+ function Ln(t) {
1035
+ this._node = t, this._names = Cn(t.getAttribute("class") || "");
1042
1036
  }
1043
- kn.prototype = {
1037
+ Ln.prototype = {
1044
1038
  add: function(t) {
1045
1039
  var e = this._names.indexOf(t);
1046
1040
  e < 0 && (this._names.push(t), this._node.setAttribute("class", this._names.join(" ")));
@@ -1053,129 +1047,129 @@ kn.prototype = {
1053
1047
  return this._names.indexOf(t) >= 0;
1054
1048
  }
1055
1049
  };
1056
- function Bn(t, e) {
1057
- for (var n = Pe(t), r = -1, o = e.length; ++r < o; ) n.add(e[r]);
1050
+ function kn(t, e) {
1051
+ for (var n = Fe(t), r = -1, o = e.length; ++r < o; ) n.add(e[r]);
1058
1052
  }
1059
- function Un(t, e) {
1060
- for (var n = Pe(t), r = -1, o = e.length; ++r < o; ) n.remove(e[r]);
1053
+ function Bn(t, e) {
1054
+ for (var n = Fe(t), r = -1, o = e.length; ++r < o; ) n.remove(e[r]);
1061
1055
  }
1062
- function _i(t) {
1056
+ function di(t) {
1063
1057
  return function() {
1064
- Bn(this, t);
1058
+ kn(this, t);
1065
1059
  };
1066
1060
  }
1067
- function mi(t) {
1061
+ function pi(t) {
1068
1062
  return function() {
1069
- Un(this, t);
1063
+ Bn(this, t);
1070
1064
  };
1071
1065
  }
1072
- function gi(t, e) {
1066
+ function _i(t, e) {
1073
1067
  return function() {
1074
- (e.apply(this, arguments) ? Bn : Un)(this, t);
1068
+ (e.apply(this, arguments) ? kn : Bn)(this, t);
1075
1069
  };
1076
1070
  }
1077
- function vi(t, e) {
1078
- var n = Ln(t + "");
1071
+ function mi(t, e) {
1072
+ var n = Cn(t + "");
1079
1073
  if (arguments.length < 2) {
1080
- for (var r = Pe(this.node()), o = -1, i = n.length; ++o < i; ) if (!r.contains(n[o])) return !1;
1074
+ for (var r = Fe(this.node()), o = -1, i = n.length; ++o < i; ) if (!r.contains(n[o])) return !1;
1081
1075
  return !0;
1082
1076
  }
1083
- return this.each((typeof e == "function" ? gi : e ? _i : mi)(n, e));
1077
+ return this.each((typeof e == "function" ? _i : e ? di : pi)(n, e));
1084
1078
  }
1085
- function yi() {
1079
+ function gi() {
1086
1080
  this.textContent = "";
1087
1081
  }
1088
- function wi(t) {
1082
+ function vi(t) {
1089
1083
  return function() {
1090
1084
  this.textContent = t;
1091
1085
  };
1092
1086
  }
1093
- function bi(t) {
1087
+ function yi(t) {
1094
1088
  return function() {
1095
1089
  var e = t.apply(this, arguments);
1096
1090
  this.textContent = e ?? "";
1097
1091
  };
1098
1092
  }
1099
- function Ai(t) {
1100
- return arguments.length ? this.each(t == null ? yi : (typeof t == "function" ? bi : wi)(t)) : this.node().textContent;
1093
+ function wi(t) {
1094
+ return arguments.length ? this.each(t == null ? gi : (typeof t == "function" ? yi : vi)(t)) : this.node().textContent;
1101
1095
  }
1102
- function Ei() {
1096
+ function bi() {
1103
1097
  this.innerHTML = "";
1104
1098
  }
1105
- function Ti(t) {
1099
+ function Ai(t) {
1106
1100
  return function() {
1107
1101
  this.innerHTML = t;
1108
1102
  };
1109
1103
  }
1110
- function Ii(t) {
1104
+ function Ei(t) {
1111
1105
  return function() {
1112
1106
  var e = t.apply(this, arguments);
1113
1107
  this.innerHTML = e ?? "";
1114
1108
  };
1115
1109
  }
1116
- function Mi(t) {
1117
- return arguments.length ? this.each(t == null ? Ei : (typeof t == "function" ? Ii : Ti)(t)) : this.node().innerHTML;
1110
+ function Ti(t) {
1111
+ return arguments.length ? this.each(t == null ? bi : (typeof t == "function" ? Ei : Ai)(t)) : this.node().innerHTML;
1118
1112
  }
1119
- function xi() {
1113
+ function Ii() {
1120
1114
  this.nextSibling && this.parentNode.appendChild(this);
1121
1115
  }
1122
- function Ri() {
1123
- return this.each(xi);
1116
+ function Mi() {
1117
+ return this.each(Ii);
1124
1118
  }
1125
- function Ni() {
1119
+ function xi() {
1126
1120
  this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
1127
1121
  }
1128
- function Si() {
1129
- return this.each(Ni);
1122
+ function Ri() {
1123
+ return this.each(xi);
1130
1124
  }
1131
- function Ci(t) {
1132
- var e = typeof t == "function" ? t : Mn(t);
1125
+ function Ni(t) {
1126
+ var e = typeof t == "function" ? t : In(t);
1133
1127
  return this.select(function() {
1134
1128
  return this.appendChild(e.apply(this, arguments));
1135
1129
  });
1136
1130
  }
1137
- function Li() {
1131
+ function Si() {
1138
1132
  return null;
1139
1133
  }
1140
- function ki(t, e) {
1141
- var n = typeof t == "function" ? t : Mn(t), r = e == null ? Li : typeof e == "function" ? e : Fe(e);
1134
+ function Ci(t, e) {
1135
+ var n = typeof t == "function" ? t : In(t), r = e == null ? Si : typeof e == "function" ? e : $e(e);
1142
1136
  return this.select(function() {
1143
1137
  return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
1144
1138
  });
1145
1139
  }
1146
- function Bi() {
1140
+ function Li() {
1147
1141
  var t = this.parentNode;
1148
1142
  t && t.removeChild(this);
1149
1143
  }
1150
- function Ui() {
1151
- return this.each(Bi);
1144
+ function ki() {
1145
+ return this.each(Li);
1152
1146
  }
1153
- function Di() {
1147
+ function Bi() {
1154
1148
  var t = this.cloneNode(!1), e = this.parentNode;
1155
1149
  return e ? e.insertBefore(t, this.nextSibling) : t;
1156
1150
  }
1157
- function $i() {
1151
+ function Di() {
1158
1152
  var t = this.cloneNode(!0), e = this.parentNode;
1159
1153
  return e ? e.insertBefore(t, this.nextSibling) : t;
1160
1154
  }
1161
- function Fi(t) {
1162
- return this.select(t ? $i : Di);
1155
+ function Ui(t) {
1156
+ return this.select(t ? Di : Bi);
1163
1157
  }
1164
- function Pi(t) {
1158
+ function $i(t) {
1165
1159
  return arguments.length ? this.property("__data__", t) : this.node().__data__;
1166
1160
  }
1167
- function Oi(t) {
1161
+ function Fi(t) {
1168
1162
  return function(e) {
1169
1163
  t.call(this, e, this.__data__);
1170
1164
  };
1171
1165
  }
1172
- function zi(t) {
1166
+ function Oi(t) {
1173
1167
  return t.trim().split(/^|\s+/).map(function(e) {
1174
1168
  var n = "", r = e.indexOf(".");
1175
1169
  return r >= 0 && (n = e.slice(r + 1), e = e.slice(0, r)), { type: e, name: n };
1176
1170
  });
1177
1171
  }
1178
- function qi(t) {
1172
+ function Pi(t) {
1179
1173
  return function() {
1180
1174
  var e = this.__on;
1181
1175
  if (e) {
@@ -1185,9 +1179,9 @@ function qi(t) {
1185
1179
  }
1186
1180
  };
1187
1181
  }
1188
- function Yi(t, e, n) {
1182
+ function qi(t, e, n) {
1189
1183
  return function() {
1190
- var r = this.__on, o, i = Oi(e);
1184
+ var r = this.__on, o, i = Fi(e);
1191
1185
  if (r) {
1192
1186
  for (var a = 0, l = r.length; a < l; ++a)
1193
1187
  if ((o = r[a]).type === t.type && o.name === t.name) {
@@ -1198,8 +1192,8 @@ function Yi(t, e, n) {
1198
1192
  this.addEventListener(t.type, i, n), o = { type: t.type, name: t.name, value: e, listener: i, options: n }, r ? r.push(o) : this.__on = [o];
1199
1193
  };
1200
1194
  }
1201
- function Vi(t, e, n) {
1202
- var r = zi(t + ""), o, i = r.length, a;
1195
+ function zi(t, e, n) {
1196
+ var r = Oi(t + ""), o, i = r.length, a;
1203
1197
  if (arguments.length < 2) {
1204
1198
  var l = this.node().__on;
1205
1199
  if (l) {
@@ -1210,89 +1204,89 @@ function Vi(t, e, n) {
1210
1204
  }
1211
1205
  return;
1212
1206
  }
1213
- for (l = e ? Yi : qi, o = 0; o < i; ++o) this.each(l(r[o], e, n));
1207
+ for (l = e ? qi : Pi, o = 0; o < i; ++o) this.each(l(r[o], e, n));
1214
1208
  return this;
1215
1209
  }
1216
1210
  function Dn(t, e, n) {
1217
- var r = Cn(t), o = r.CustomEvent;
1211
+ var r = Sn(t), o = r.CustomEvent;
1218
1212
  typeof o == "function" ? o = new o(e, n) : (o = r.document.createEvent("Event"), n ? (o.initEvent(e, n.bubbles, n.cancelable), o.detail = n.detail) : o.initEvent(e, !1, !1)), t.dispatchEvent(o);
1219
1213
  }
1220
- function ji(t, e) {
1214
+ function Yi(t, e) {
1221
1215
  return function() {
1222
1216
  return Dn(this, t, e);
1223
1217
  };
1224
1218
  }
1225
- function Gi(t, e) {
1219
+ function Vi(t, e) {
1226
1220
  return function() {
1227
1221
  return Dn(this, t, e.apply(this, arguments));
1228
1222
  };
1229
1223
  }
1230
- function Xi(t, e) {
1231
- return this.each((typeof e == "function" ? Gi : ji)(t, e));
1224
+ function ji(t, e) {
1225
+ return this.each((typeof e == "function" ? Vi : Yi)(t, e));
1232
1226
  }
1233
- function* Hi() {
1227
+ function* Gi() {
1234
1228
  for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
1235
1229
  for (var r = t[e], o = 0, i = r.length, a; o < i; ++o)
1236
1230
  (a = r[o]) && (yield a);
1237
1231
  }
1238
- var $n = [null];
1232
+ var Un = [null];
1239
1233
  function et(t, e) {
1240
1234
  this._groups = t, this._parents = e;
1241
1235
  }
1242
1236
  function Gt() {
1243
- return new et([[document.documentElement]], $n);
1237
+ return new et([[document.documentElement]], Un);
1244
1238
  }
1245
- function Wi() {
1239
+ function Xi() {
1246
1240
  return this;
1247
1241
  }
1248
1242
  et.prototype = Gt.prototype = {
1249
1243
  constructor: et,
1250
- select: bo,
1251
- selectAll: Io,
1252
- selectChild: No,
1253
- selectChildren: ko,
1254
- filter: Bo,
1255
- data: Oo,
1256
- enter: Uo,
1257
- exit: qo,
1258
- join: Yo,
1259
- merge: Vo,
1260
- selection: Wi,
1261
- order: jo,
1262
- sort: Go,
1263
- call: Ho,
1264
- nodes: Wo,
1265
- node: Qo,
1266
- size: Ko,
1267
- empty: Jo,
1268
- each: Zo,
1269
- attr: ai,
1270
- style: ci,
1271
- property: pi,
1272
- classed: vi,
1273
- text: Ai,
1274
- html: Mi,
1275
- raise: Ri,
1276
- lower: Si,
1277
- append: Ci,
1278
- insert: ki,
1279
- remove: Ui,
1280
- clone: Fi,
1281
- datum: Pi,
1282
- on: Vi,
1283
- dispatch: Xi,
1284
- [Symbol.iterator]: Hi
1244
+ select: yo,
1245
+ selectAll: Eo,
1246
+ selectChild: xo,
1247
+ selectChildren: Co,
1248
+ filter: Lo,
1249
+ data: Fo,
1250
+ enter: ko,
1251
+ exit: Po,
1252
+ join: qo,
1253
+ merge: zo,
1254
+ selection: Xi,
1255
+ order: Yo,
1256
+ sort: Vo,
1257
+ call: Go,
1258
+ nodes: Xo,
1259
+ node: Wo,
1260
+ size: Ho,
1261
+ empty: Qo,
1262
+ each: Ko,
1263
+ attr: oi,
1264
+ style: ui,
1265
+ property: hi,
1266
+ classed: mi,
1267
+ text: wi,
1268
+ html: Ti,
1269
+ raise: Mi,
1270
+ lower: Ri,
1271
+ append: Ni,
1272
+ insert: Ci,
1273
+ remove: ki,
1274
+ clone: Ui,
1275
+ datum: $i,
1276
+ on: zi,
1277
+ dispatch: ji,
1278
+ [Symbol.iterator]: Gi
1285
1279
  };
1286
1280
  function ct(t) {
1287
- return typeof t == "string" ? new et([[document.querySelector(t)]], [document.documentElement]) : new et([[t]], $n);
1281
+ return typeof t == "string" ? new et([[document.querySelector(t)]], [document.documentElement]) : new et([[t]], Un);
1288
1282
  }
1289
- function Qi(t) {
1283
+ function Wi(t) {
1290
1284
  let e;
1291
1285
  for (; e = t.sourceEvent; ) t = e;
1292
1286
  return t;
1293
1287
  }
1294
1288
  function dt(t, e) {
1295
- if (t = Qi(t), e === void 0 && (e = t.currentTarget), e) {
1289
+ if (t = Wi(t), e === void 0 && (e = t.currentTarget), e) {
1296
1290
  var n = e.ownerSVGElement || e;
1297
1291
  if (n.createSVGPoint) {
1298
1292
  var r = n.createSVGPoint();
@@ -1305,31 +1299,31 @@ function dt(t, e) {
1305
1299
  }
1306
1300
  return [t.pageX, t.pageY];
1307
1301
  }
1308
- const Ie = { capture: !0, passive: !1 };
1309
- function Me(t) {
1302
+ const Te = { capture: !0, passive: !1 };
1303
+ function Ie(t) {
1310
1304
  t.preventDefault(), t.stopImmediatePropagation();
1311
1305
  }
1312
- function Ki(t) {
1313
- var e = t.document.documentElement, n = ct(t).on("dragstart.drag", Me, Ie);
1314
- "onselectstart" in e ? n.on("selectstart.drag", Me, Ie) : (e.__noselect = e.style.MozUserSelect, e.style.MozUserSelect = "none");
1306
+ function Hi(t) {
1307
+ var e = t.document.documentElement, n = ct(t).on("dragstart.drag", Ie, Te);
1308
+ "onselectstart" in e ? n.on("selectstart.drag", Ie, Te) : (e.__noselect = e.style.MozUserSelect, e.style.MozUserSelect = "none");
1315
1309
  }
1316
- function Ji(t, e) {
1310
+ function Qi(t, e) {
1317
1311
  var n = t.document.documentElement, r = ct(t).on("dragstart.drag", null);
1318
- e && (r.on("click.drag", Me, Ie), setTimeout(function() {
1312
+ e && (r.on("click.drag", Ie, Te), setTimeout(function() {
1319
1313
  r.on("click.drag", null);
1320
1314
  }, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
1321
1315
  }
1322
1316
  function Oe(t, e, n) {
1323
1317
  t.prototype = e.prototype = n, n.constructor = t;
1324
1318
  }
1325
- function Fn(t, e) {
1319
+ function $n(t, e) {
1326
1320
  var n = Object.create(t.prototype);
1327
1321
  for (var r in e) n[r] = e[r];
1328
1322
  return n;
1329
1323
  }
1330
1324
  function Xt() {
1331
1325
  }
1332
- var Ot = 0.7, ue = 1 / Ot, Nt = "\\s*([+-]?\\d+)\\s*", zt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", at = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Zi = /^#([0-9a-f]{3,8})$/, ta = new RegExp(`^rgb\\(${Nt},${Nt},${Nt}\\)$`), ea = new RegExp(`^rgb\\(${at},${at},${at}\\)$`), na = new RegExp(`^rgba\\(${Nt},${Nt},${Nt},${zt}\\)$`), ra = new RegExp(`^rgba\\(${at},${at},${at},${zt}\\)$`), oa = new RegExp(`^hsl\\(${zt},${at},${at}\\)$`), ia = new RegExp(`^hsla\\(${zt},${at},${at},${zt}\\)$`), en = {
1326
+ var Pt = 0.7, le = 1 / Pt, Nt = "\\s*([+-]?\\d+)\\s*", qt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", at = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Ki = /^#([0-9a-f]{3,8})$/, Ji = new RegExp(`^rgb\\(${Nt},${Nt},${Nt}\\)$`), Zi = new RegExp(`^rgb\\(${at},${at},${at}\\)$`), ta = new RegExp(`^rgba\\(${Nt},${Nt},${Nt},${qt}\\)$`), ea = new RegExp(`^rgba\\(${at},${at},${at},${qt}\\)$`), na = new RegExp(`^hsl\\(${qt},${at},${at}\\)$`), ra = new RegExp(`^hsla\\(${qt},${at},${at},${qt}\\)$`), tn = {
1333
1327
  aliceblue: 15792383,
1334
1328
  antiquewhite: 16444375,
1335
1329
  aqua: 65535,
@@ -1479,86 +1473,86 @@ var Ot = 0.7, ue = 1 / Ot, Nt = "\\s*([+-]?\\d+)\\s*", zt = "\\s*([+-]?(?:\\d*\\
1479
1473
  yellow: 16776960,
1480
1474
  yellowgreen: 10145074
1481
1475
  };
1482
- Oe(Xt, qt, {
1476
+ Oe(Xt, zt, {
1483
1477
  copy(t) {
1484
1478
  return Object.assign(new this.constructor(), this, t);
1485
1479
  },
1486
1480
  displayable() {
1487
1481
  return this.rgb().displayable();
1488
1482
  },
1489
- hex: nn,
1483
+ hex: en,
1490
1484
  // Deprecated! Use color.formatHex.
1491
- formatHex: nn,
1492
- formatHex8: aa,
1493
- formatHsl: la,
1494
- formatRgb: rn,
1495
- toString: rn
1485
+ formatHex: en,
1486
+ formatHex8: oa,
1487
+ formatHsl: ia,
1488
+ formatRgb: nn,
1489
+ toString: nn
1496
1490
  });
1497
- function nn() {
1491
+ function en() {
1498
1492
  return this.rgb().formatHex();
1499
1493
  }
1500
- function aa() {
1494
+ function oa() {
1501
1495
  return this.rgb().formatHex8();
1502
1496
  }
1503
- function la() {
1504
- return Pn(this).formatHsl();
1497
+ function ia() {
1498
+ return Fn(this).formatHsl();
1505
1499
  }
1506
- function rn() {
1500
+ function nn() {
1507
1501
  return this.rgb().formatRgb();
1508
1502
  }
1509
- function qt(t) {
1503
+ function zt(t) {
1510
1504
  var e, n;
1511
- return t = (t + "").trim().toLowerCase(), (e = Zi.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? on(e) : n === 3 ? new tt(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? Wt(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? Wt(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = ta.exec(t)) ? new tt(e[1], e[2], e[3], 1) : (e = ea.exec(t)) ? new tt(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = na.exec(t)) ? Wt(e[1], e[2], e[3], e[4]) : (e = ra.exec(t)) ? Wt(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = oa.exec(t)) ? un(e[1], e[2] / 100, e[3] / 100, 1) : (e = ia.exec(t)) ? un(e[1], e[2] / 100, e[3] / 100, e[4]) : en.hasOwnProperty(t) ? on(en[t]) : t === "transparent" ? new tt(NaN, NaN, NaN, 0) : null;
1505
+ return t = (t + "").trim().toLowerCase(), (e = Ki.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? rn(e) : n === 3 ? new tt(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? Ht(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? Ht(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = Ji.exec(t)) ? new tt(e[1], e[2], e[3], 1) : (e = Zi.exec(t)) ? new tt(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = ta.exec(t)) ? Ht(e[1], e[2], e[3], e[4]) : (e = ea.exec(t)) ? Ht(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = na.exec(t)) ? ln(e[1], e[2] / 100, e[3] / 100, 1) : (e = ra.exec(t)) ? ln(e[1], e[2] / 100, e[3] / 100, e[4]) : tn.hasOwnProperty(t) ? rn(tn[t]) : t === "transparent" ? new tt(NaN, NaN, NaN, 0) : null;
1512
1506
  }
1513
- function on(t) {
1507
+ function rn(t) {
1514
1508
  return new tt(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
1515
1509
  }
1516
- function Wt(t, e, n, r) {
1510
+ function Ht(t, e, n, r) {
1517
1511
  return r <= 0 && (t = e = n = NaN), new tt(t, e, n, r);
1518
1512
  }
1519
- function ua(t) {
1520
- return t instanceof Xt || (t = qt(t)), t ? (t = t.rgb(), new tt(t.r, t.g, t.b, t.opacity)) : new tt();
1513
+ function aa(t) {
1514
+ return t instanceof Xt || (t = zt(t)), t ? (t = t.rgb(), new tt(t.r, t.g, t.b, t.opacity)) : new tt();
1521
1515
  }
1522
- function xe(t, e, n, r) {
1523
- return arguments.length === 1 ? ua(t) : new tt(t, e, n, r ?? 1);
1516
+ function Me(t, e, n, r) {
1517
+ return arguments.length === 1 ? aa(t) : new tt(t, e, n, r ?? 1);
1524
1518
  }
1525
1519
  function tt(t, e, n, r) {
1526
1520
  this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
1527
1521
  }
1528
- Oe(tt, xe, Fn(Xt, {
1522
+ Oe(tt, Me, $n(Xt, {
1529
1523
  brighter(t) {
1530
- return t = t == null ? ue : Math.pow(ue, t), new tt(this.r * t, this.g * t, this.b * t, this.opacity);
1524
+ return t = t == null ? le : Math.pow(le, t), new tt(this.r * t, this.g * t, this.b * t, this.opacity);
1531
1525
  },
1532
1526
  darker(t) {
1533
- return t = t == null ? Ot : Math.pow(Ot, t), new tt(this.r * t, this.g * t, this.b * t, this.opacity);
1527
+ return t = t == null ? Pt : Math.pow(Pt, t), new tt(this.r * t, this.g * t, this.b * t, this.opacity);
1534
1528
  },
1535
1529
  rgb() {
1536
1530
  return this;
1537
1531
  },
1538
1532
  clamp() {
1539
- return new tt(At(this.r), At(this.g), At(this.b), se(this.opacity));
1533
+ return new tt(At(this.r), At(this.g), At(this.b), ue(this.opacity));
1540
1534
  },
1541
1535
  displayable() {
1542
1536
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
1543
1537
  },
1544
- hex: an,
1538
+ hex: on,
1545
1539
  // Deprecated! Use color.formatHex.
1546
- formatHex: an,
1547
- formatHex8: sa,
1548
- formatRgb: ln,
1549
- toString: ln
1540
+ formatHex: on,
1541
+ formatHex8: la,
1542
+ formatRgb: an,
1543
+ toString: an
1550
1544
  }));
1551
- function an() {
1545
+ function on() {
1552
1546
  return `#${bt(this.r)}${bt(this.g)}${bt(this.b)}`;
1553
1547
  }
1554
- function sa() {
1548
+ function la() {
1555
1549
  return `#${bt(this.r)}${bt(this.g)}${bt(this.b)}${bt((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1556
1550
  }
1557
- function ln() {
1558
- const t = se(this.opacity);
1551
+ function an() {
1552
+ const t = ue(this.opacity);
1559
1553
  return `${t === 1 ? "rgb(" : "rgba("}${At(this.r)}, ${At(this.g)}, ${At(this.b)}${t === 1 ? ")" : `, ${t})`}`;
1560
1554
  }
1561
- function se(t) {
1555
+ function ue(t) {
1562
1556
  return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
1563
1557
  }
1564
1558
  function At(t) {
@@ -1567,83 +1561,83 @@ function At(t) {
1567
1561
  function bt(t) {
1568
1562
  return t = At(t), (t < 16 ? "0" : "") + t.toString(16);
1569
1563
  }
1570
- function un(t, e, n, r) {
1564
+ function ln(t, e, n, r) {
1571
1565
  return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new nt(t, e, n, r);
1572
1566
  }
1573
- function Pn(t) {
1567
+ function Fn(t) {
1574
1568
  if (t instanceof nt) return new nt(t.h, t.s, t.l, t.opacity);
1575
- if (t instanceof Xt || (t = qt(t)), !t) return new nt();
1569
+ if (t instanceof Xt || (t = zt(t)), !t) return new nt();
1576
1570
  if (t instanceof nt) return t;
1577
1571
  t = t.rgb();
1578
1572
  var e = t.r / 255, n = t.g / 255, r = t.b / 255, o = Math.min(e, n, r), i = Math.max(e, n, r), a = NaN, l = i - o, s = (i + o) / 2;
1579
1573
  return l ? (e === i ? a = (n - r) / l + (n < r) * 6 : n === i ? a = (r - e) / l + 2 : a = (e - n) / l + 4, l /= s < 0.5 ? i + o : 2 - i - o, a *= 60) : l = s > 0 && s < 1 ? 0 : a, new nt(a, l, s, t.opacity);
1580
1574
  }
1581
- function ca(t, e, n, r) {
1582
- return arguments.length === 1 ? Pn(t) : new nt(t, e, n, r ?? 1);
1575
+ function ua(t, e, n, r) {
1576
+ return arguments.length === 1 ? Fn(t) : new nt(t, e, n, r ?? 1);
1583
1577
  }
1584
1578
  function nt(t, e, n, r) {
1585
1579
  this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
1586
1580
  }
1587
- Oe(nt, ca, Fn(Xt, {
1581
+ Oe(nt, ua, $n(Xt, {
1588
1582
  brighter(t) {
1589
- return t = t == null ? ue : Math.pow(ue, t), new nt(this.h, this.s, this.l * t, this.opacity);
1583
+ return t = t == null ? le : Math.pow(le, t), new nt(this.h, this.s, this.l * t, this.opacity);
1590
1584
  },
1591
1585
  darker(t) {
1592
- return t = t == null ? Ot : Math.pow(Ot, t), new nt(this.h, this.s, this.l * t, this.opacity);
1586
+ return t = t == null ? Pt : Math.pow(Pt, t), new nt(this.h, this.s, this.l * t, this.opacity);
1593
1587
  },
1594
1588
  rgb() {
1595
1589
  var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * e, o = 2 * n - r;
1596
1590
  return new tt(
1597
- ye(t >= 240 ? t - 240 : t + 120, o, r),
1598
- ye(t, o, r),
1599
- ye(t < 120 ? t + 240 : t - 120, o, r),
1591
+ ve(t >= 240 ? t - 240 : t + 120, o, r),
1592
+ ve(t, o, r),
1593
+ ve(t < 120 ? t + 240 : t - 120, o, r),
1600
1594
  this.opacity
1601
1595
  );
1602
1596
  },
1603
1597
  clamp() {
1604
- return new nt(sn(this.h), Qt(this.s), Qt(this.l), se(this.opacity));
1598
+ return new nt(un(this.h), Qt(this.s), Qt(this.l), ue(this.opacity));
1605
1599
  },
1606
1600
  displayable() {
1607
1601
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
1608
1602
  },
1609
1603
  formatHsl() {
1610
- const t = se(this.opacity);
1611
- return `${t === 1 ? "hsl(" : "hsla("}${sn(this.h)}, ${Qt(this.s) * 100}%, ${Qt(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
1604
+ const t = ue(this.opacity);
1605
+ return `${t === 1 ? "hsl(" : "hsla("}${un(this.h)}, ${Qt(this.s) * 100}%, ${Qt(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
1612
1606
  }
1613
1607
  }));
1614
- function sn(t) {
1608
+ function un(t) {
1615
1609
  return t = (t || 0) % 360, t < 0 ? t + 360 : t;
1616
1610
  }
1617
1611
  function Qt(t) {
1618
1612
  return Math.max(0, Math.min(1, t || 0));
1619
1613
  }
1620
- function ye(t, e, n) {
1614
+ function ve(t, e, n) {
1621
1615
  return (t < 60 ? e + (n - e) * t / 60 : t < 180 ? n : t < 240 ? e + (n - e) * (240 - t) / 60 : e) * 255;
1622
1616
  }
1623
1617
  const On = (t) => () => t;
1624
- function fa(t, e) {
1618
+ function sa(t, e) {
1625
1619
  return function(n) {
1626
1620
  return t + n * e;
1627
1621
  };
1628
1622
  }
1629
- function ha(t, e, n) {
1623
+ function ca(t, e, n) {
1630
1624
  return t = Math.pow(t, n), e = Math.pow(e, n) - t, n = 1 / n, function(r) {
1631
1625
  return Math.pow(t + r * e, n);
1632
1626
  };
1633
1627
  }
1634
- function da(t) {
1635
- return (t = +t) == 1 ? zn : function(e, n) {
1636
- return n - e ? ha(e, n, t) : On(isNaN(e) ? n : e);
1628
+ function fa(t) {
1629
+ return (t = +t) == 1 ? Pn : function(e, n) {
1630
+ return n - e ? ca(e, n, t) : On(isNaN(e) ? n : e);
1637
1631
  };
1638
1632
  }
1639
- function zn(t, e) {
1633
+ function Pn(t, e) {
1640
1634
  var n = e - t;
1641
- return n ? fa(t, n) : On(isNaN(t) ? e : t);
1635
+ return n ? sa(t, n) : On(isNaN(t) ? e : t);
1642
1636
  }
1643
- const cn = (function t(e) {
1644
- var n = da(e);
1637
+ const sn = (function t(e) {
1638
+ var n = fa(e);
1645
1639
  function r(o, i) {
1646
- var a = n((o = xe(o)).r, (i = xe(i)).r), l = n(o.g, i.g), s = n(o.b, i.b), u = zn(o.opacity, i.opacity);
1640
+ var a = n((o = Me(o)).r, (i = Me(i)).r), l = n(o.g, i.g), s = n(o.b, i.b), u = Pn(o.opacity, i.opacity);
1647
1641
  return function(f) {
1648
1642
  return o.r = a(f), o.g = l(f), o.b = s(f), o.opacity = u(f), o + "";
1649
1643
  };
@@ -1655,27 +1649,27 @@ function pt(t, e) {
1655
1649
  return t * (1 - n) + e * n;
1656
1650
  };
1657
1651
  }
1658
- var Re = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, we = new RegExp(Re.source, "g");
1659
- function pa(t) {
1652
+ var xe = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, ye = new RegExp(xe.source, "g");
1653
+ function ha(t) {
1660
1654
  return function() {
1661
1655
  return t;
1662
1656
  };
1663
1657
  }
1664
- function _a(t) {
1658
+ function da(t) {
1665
1659
  return function(e) {
1666
1660
  return t(e) + "";
1667
1661
  };
1668
1662
  }
1669
- function ma(t, e) {
1670
- var n = Re.lastIndex = we.lastIndex = 0, r, o, i, a = -1, l = [], s = [];
1671
- for (t = t + "", e = e + ""; (r = Re.exec(t)) && (o = we.exec(e)); )
1672
- (i = o.index) > n && (i = e.slice(n, i), l[a] ? l[a] += i : l[++a] = i), (r = r[0]) === (o = o[0]) ? l[a] ? l[a] += o : l[++a] = o : (l[++a] = null, s.push({ i: a, x: pt(r, o) })), n = we.lastIndex;
1673
- return n < e.length && (i = e.slice(n), l[a] ? l[a] += i : l[++a] = i), l.length < 2 ? s[0] ? _a(s[0].x) : pa(e) : (e = s.length, function(u) {
1663
+ function pa(t, e) {
1664
+ var n = xe.lastIndex = ye.lastIndex = 0, r, o, i, a = -1, l = [], s = [];
1665
+ for (t = t + "", e = e + ""; (r = xe.exec(t)) && (o = ye.exec(e)); )
1666
+ (i = o.index) > n && (i = e.slice(n, i), l[a] ? l[a] += i : l[++a] = i), (r = r[0]) === (o = o[0]) ? l[a] ? l[a] += o : l[++a] = o : (l[++a] = null, s.push({ i: a, x: pt(r, o) })), n = ye.lastIndex;
1667
+ return n < e.length && (i = e.slice(n), l[a] ? l[a] += i : l[++a] = i), l.length < 2 ? s[0] ? da(s[0].x) : ha(e) : (e = s.length, function(u) {
1674
1668
  for (var f = 0, h; f < e; ++f) l[(h = s[f]).i] = h.x(u);
1675
1669
  return l.join("");
1676
1670
  });
1677
1671
  }
1678
- var fn = 180 / Math.PI, qn = {
1672
+ var cn = 180 / Math.PI, qn = {
1679
1673
  translateX: 0,
1680
1674
  translateY: 0,
1681
1675
  rotate: 0,
@@ -1683,33 +1677,33 @@ var fn = 180 / Math.PI, qn = {
1683
1677
  scaleX: 1,
1684
1678
  scaleY: 1
1685
1679
  };
1686
- function Yn(t, e, n, r, o, i) {
1680
+ function zn(t, e, n, r, o, i) {
1687
1681
  var a, l, s;
1688
1682
  return (a = Math.sqrt(t * t + e * e)) && (t /= a, e /= a), (s = t * n + e * r) && (n -= t * s, r -= e * s), (l = Math.sqrt(n * n + r * r)) && (n /= l, r /= l, s /= l), t * r < e * n && (t = -t, e = -e, s = -s, a = -a), {
1689
1683
  translateX: o,
1690
1684
  translateY: i,
1691
- rotate: Math.atan2(e, t) * fn,
1692
- skewX: Math.atan(s) * fn,
1685
+ rotate: Math.atan2(e, t) * cn,
1686
+ skewX: Math.atan(s) * cn,
1693
1687
  scaleX: a,
1694
1688
  scaleY: l
1695
1689
  };
1696
1690
  }
1697
1691
  var Kt;
1698
- function ga(t) {
1692
+ function _a(t) {
1699
1693
  const e = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(t + "");
1700
- return e.isIdentity ? qn : Yn(e.a, e.b, e.c, e.d, e.e, e.f);
1694
+ return e.isIdentity ? qn : zn(e.a, e.b, e.c, e.d, e.e, e.f);
1701
1695
  }
1702
- function va(t) {
1703
- return t == null || (Kt || (Kt = document.createElementNS("http://www.w3.org/2000/svg", "g")), Kt.setAttribute("transform", t), !(t = Kt.transform.baseVal.consolidate())) ? qn : (t = t.matrix, Yn(t.a, t.b, t.c, t.d, t.e, t.f));
1696
+ function ma(t) {
1697
+ return t == null || (Kt || (Kt = document.createElementNS("http://www.w3.org/2000/svg", "g")), Kt.setAttribute("transform", t), !(t = Kt.transform.baseVal.consolidate())) ? qn : (t = t.matrix, zn(t.a, t.b, t.c, t.d, t.e, t.f));
1704
1698
  }
1705
- function Vn(t, e, n, r) {
1699
+ function Yn(t, e, n, r) {
1706
1700
  function o(u) {
1707
1701
  return u.length ? u.pop() + " " : "";
1708
1702
  }
1709
1703
  function i(u, f, h, d, p, w) {
1710
1704
  if (u !== h || f !== d) {
1711
- var I = p.push("translate(", null, e, null, n);
1712
- w.push({ i: I - 4, x: pt(u, h) }, { i: I - 2, x: pt(f, d) });
1705
+ var E = p.push("translate(", null, e, null, n);
1706
+ w.push({ i: E - 4, x: pt(u, h) }, { i: E - 2, x: pt(f, d) });
1713
1707
  } else (h || d) && p.push("translate(" + h + e + d + n);
1714
1708
  }
1715
1709
  function a(u, f, h, d) {
@@ -1720,47 +1714,47 @@ function Vn(t, e, n, r) {
1720
1714
  }
1721
1715
  function s(u, f, h, d, p, w) {
1722
1716
  if (u !== h || f !== d) {
1723
- var I = p.push(o(p) + "scale(", null, ",", null, ")");
1724
- w.push({ i: I - 4, x: pt(u, h) }, { i: I - 2, x: pt(f, d) });
1717
+ var E = p.push(o(p) + "scale(", null, ",", null, ")");
1718
+ w.push({ i: E - 4, x: pt(u, h) }, { i: E - 2, x: pt(f, d) });
1725
1719
  } else (h !== 1 || d !== 1) && p.push(o(p) + "scale(" + h + "," + d + ")");
1726
1720
  }
1727
1721
  return function(u, f) {
1728
1722
  var h = [], d = [];
1729
1723
  return u = t(u), f = t(f), i(u.translateX, u.translateY, f.translateX, f.translateY, h, d), a(u.rotate, f.rotate, h, d), l(u.skewX, f.skewX, h, d), s(u.scaleX, u.scaleY, f.scaleX, f.scaleY, h, d), u = f = null, function(p) {
1730
- for (var w = -1, I = d.length, A; ++w < I; ) h[(A = d[w]).i] = A.x(p);
1724
+ for (var w = -1, E = d.length, A; ++w < E; ) h[(A = d[w]).i] = A.x(p);
1731
1725
  return h.join("");
1732
1726
  };
1733
1727
  };
1734
1728
  }
1735
- var ya = Vn(ga, "px, ", "px)", "deg)"), wa = Vn(va, ", ", ")", ")"), ba = 1e-12;
1736
- function hn(t) {
1729
+ var ga = Yn(_a, "px, ", "px)", "deg)"), va = Yn(ma, ", ", ")", ")"), ya = 1e-12;
1730
+ function fn(t) {
1737
1731
  return ((t = Math.exp(t)) + 1 / t) / 2;
1738
1732
  }
1739
- function Aa(t) {
1733
+ function wa(t) {
1740
1734
  return ((t = Math.exp(t)) - 1 / t) / 2;
1741
1735
  }
1742
- function Ea(t) {
1736
+ function ba(t) {
1743
1737
  return ((t = Math.exp(2 * t)) - 1) / (t + 1);
1744
1738
  }
1745
- const Ta = (function t(e, n, r) {
1739
+ const Aa = (function t(e, n, r) {
1746
1740
  function o(i, a) {
1747
- var l = i[0], s = i[1], u = i[2], f = a[0], h = a[1], d = a[2], p = f - l, w = h - s, I = p * p + w * w, A, m;
1748
- if (I < ba)
1749
- m = Math.log(d / u) / e, A = function(M) {
1741
+ var l = i[0], s = i[1], u = i[2], f = a[0], h = a[1], d = a[2], p = f - l, w = h - s, E = p * p + w * w, A, m;
1742
+ if (E < ya)
1743
+ m = Math.log(d / u) / e, A = function(I) {
1750
1744
  return [
1751
- l + M * p,
1752
- s + M * w,
1753
- u * Math.exp(e * M * m)
1745
+ l + I * p,
1746
+ s + I * w,
1747
+ u * Math.exp(e * I * m)
1754
1748
  ];
1755
1749
  };
1756
1750
  else {
1757
- var L = Math.sqrt(I), D = (d * d - u * u + r * I) / (2 * u * n * L), H = (d * d - u * u - r * I) / (2 * d * n * L), x = Math.log(Math.sqrt(D * D + 1) - D), E = Math.log(Math.sqrt(H * H + 1) - H);
1758
- m = (E - x) / e, A = function(M) {
1759
- var N = M * m, C = hn(x), U = u / (n * L) * (C * Ea(e * N + x) - Aa(x));
1751
+ var k = Math.sqrt(E), U = (d * d - u * u + r * E) / (2 * u * n * k), H = (d * d - u * u - r * E) / (2 * d * n * k), M = Math.log(Math.sqrt(U * U + 1) - U), x = Math.log(Math.sqrt(H * H + 1) - H);
1752
+ m = (x - M) / e, A = function(I) {
1753
+ var N = I * m, C = fn(M), L = u / (n * k) * (C * ba(e * N + M) - wa(M));
1760
1754
  return [
1761
- l + U * p,
1762
- s + U * w,
1763
- u * C / hn(e * N + x)
1755
+ l + L * p,
1756
+ s + L * w,
1757
+ u * C / fn(e * N + M)
1764
1758
  ];
1765
1759
  };
1766
1760
  }
@@ -1771,92 +1765,92 @@ const Ta = (function t(e, n, r) {
1771
1765
  return t(a, l, s);
1772
1766
  }, o;
1773
1767
  })(Math.SQRT2, 2, 4);
1774
- var Ct = 0, Dt = 0, Bt = 0, jn = 1e3, ce, $t, fe = 0, Tt = 0, _e = 0, Yt = typeof performance == "object" && performance.now ? performance : Date, Gn = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
1768
+ var Ct = 0, Ut = 0, Bt = 0, Vn = 1e3, se, $t, ce = 0, Tt = 0, pe = 0, Yt = typeof performance == "object" && performance.now ? performance : Date, jn = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
1775
1769
  setTimeout(t, 17);
1776
1770
  };
1777
- function ze() {
1778
- return Tt || (Gn(Ia), Tt = Yt.now() + _e);
1771
+ function Pe() {
1772
+ return Tt || (jn(Ea), Tt = Yt.now() + pe);
1779
1773
  }
1780
- function Ia() {
1774
+ function Ea() {
1781
1775
  Tt = 0;
1782
1776
  }
1783
- function he() {
1777
+ function fe() {
1784
1778
  this._call = this._time = this._next = null;
1785
1779
  }
1786
- he.prototype = Xn.prototype = {
1787
- constructor: he,
1780
+ fe.prototype = Gn.prototype = {
1781
+ constructor: fe,
1788
1782
  restart: function(t, e, n) {
1789
1783
  if (typeof t != "function") throw new TypeError("callback is not a function");
1790
- n = (n == null ? ze() : +n) + (e == null ? 0 : +e), !this._next && $t !== this && ($t ? $t._next = this : ce = this, $t = this), this._call = t, this._time = n, Ne();
1784
+ n = (n == null ? Pe() : +n) + (e == null ? 0 : +e), !this._next && $t !== this && ($t ? $t._next = this : se = this, $t = this), this._call = t, this._time = n, Re();
1791
1785
  },
1792
1786
  stop: function() {
1793
- this._call && (this._call = null, this._time = 1 / 0, Ne());
1787
+ this._call && (this._call = null, this._time = 1 / 0, Re());
1794
1788
  }
1795
1789
  };
1796
- function Xn(t, e, n) {
1797
- var r = new he();
1790
+ function Gn(t, e, n) {
1791
+ var r = new fe();
1798
1792
  return r.restart(t, e, n), r;
1799
1793
  }
1800
- function Ma() {
1801
- ze(), ++Ct;
1802
- for (var t = ce, e; t; )
1794
+ function Ta() {
1795
+ Pe(), ++Ct;
1796
+ for (var t = se, e; t; )
1803
1797
  (e = Tt - t._time) >= 0 && t._call.call(void 0, e), t = t._next;
1804
1798
  --Ct;
1805
1799
  }
1806
- function dn() {
1807
- Tt = (fe = Yt.now()) + _e, Ct = Dt = 0;
1800
+ function hn() {
1801
+ Tt = (ce = Yt.now()) + pe, Ct = Ut = 0;
1808
1802
  try {
1809
- Ma();
1803
+ Ta();
1810
1804
  } finally {
1811
- Ct = 0, Ra(), Tt = 0;
1805
+ Ct = 0, Ma(), Tt = 0;
1812
1806
  }
1813
1807
  }
1814
- function xa() {
1815
- var t = Yt.now(), e = t - fe;
1816
- e > jn && (_e -= e, fe = t);
1808
+ function Ia() {
1809
+ var t = Yt.now(), e = t - ce;
1810
+ e > Vn && (pe -= e, ce = t);
1817
1811
  }
1818
- function Ra() {
1819
- for (var t, e = ce, n, r = 1 / 0; e; )
1820
- e._call ? (r > e._time && (r = e._time), t = e, e = e._next) : (n = e._next, e._next = null, e = t ? t._next = n : ce = n);
1821
- $t = t, Ne(r);
1812
+ function Ma() {
1813
+ for (var t, e = se, n, r = 1 / 0; e; )
1814
+ e._call ? (r > e._time && (r = e._time), t = e, e = e._next) : (n = e._next, e._next = null, e = t ? t._next = n : se = n);
1815
+ $t = t, Re(r);
1822
1816
  }
1823
- function Ne(t) {
1817
+ function Re(t) {
1824
1818
  if (!Ct) {
1825
- Dt && (Dt = clearTimeout(Dt));
1819
+ Ut && (Ut = clearTimeout(Ut));
1826
1820
  var e = t - Tt;
1827
- e > 24 ? (t < 1 / 0 && (Dt = setTimeout(dn, t - Yt.now() - _e)), Bt && (Bt = clearInterval(Bt))) : (Bt || (fe = Yt.now(), Bt = setInterval(xa, jn)), Ct = 1, Gn(dn));
1821
+ e > 24 ? (t < 1 / 0 && (Ut = setTimeout(hn, t - Yt.now() - pe)), Bt && (Bt = clearInterval(Bt))) : (Bt || (ce = Yt.now(), Bt = setInterval(Ia, Vn)), Ct = 1, jn(hn));
1828
1822
  }
1829
1823
  }
1830
- function pn(t, e, n) {
1831
- var r = new he();
1824
+ function dn(t, e, n) {
1825
+ var r = new fe();
1832
1826
  return e = e == null ? 0 : +e, r.restart((o) => {
1833
1827
  r.stop(), t(o + e);
1834
1828
  }, e, n), r;
1835
1829
  }
1836
- var Na = $e("start", "end", "cancel", "interrupt"), Sa = [], Hn = 0, _n = 1, Se = 2, ee = 3, mn = 4, Ce = 5, ne = 6;
1837
- function me(t, e, n, r, o, i) {
1830
+ var xa = Ue("start", "end", "cancel", "interrupt"), Ra = [], Xn = 0, pn = 1, Ne = 2, ee = 3, _n = 4, Se = 5, ne = 6;
1831
+ function _e(t, e, n, r, o, i) {
1838
1832
  var a = t.__transition;
1839
1833
  if (!a) t.__transition = {};
1840
1834
  else if (n in a) return;
1841
- Ca(t, n, {
1835
+ Na(t, n, {
1842
1836
  name: e,
1843
1837
  index: r,
1844
1838
  // For context during callback.
1845
1839
  group: o,
1846
1840
  // For context during callback.
1847
- on: Na,
1848
- tween: Sa,
1841
+ on: xa,
1842
+ tween: Ra,
1849
1843
  time: i.time,
1850
1844
  delay: i.delay,
1851
1845
  duration: i.duration,
1852
1846
  ease: i.ease,
1853
1847
  timer: null,
1854
- state: Hn
1848
+ state: Xn
1855
1849
  });
1856
1850
  }
1857
1851
  function qe(t, e) {
1858
1852
  var n = rt(t, e);
1859
- if (n.state > Hn) throw new Error("too late; already scheduled");
1853
+ if (n.state > Xn) throw new Error("too late; already scheduled");
1860
1854
  return n;
1861
1855
  }
1862
1856
  function lt(t, e) {
@@ -1869,32 +1863,32 @@ function rt(t, e) {
1869
1863
  if (!n || !(n = n[e])) throw new Error("transition not found");
1870
1864
  return n;
1871
1865
  }
1872
- function Ca(t, e, n) {
1866
+ function Na(t, e, n) {
1873
1867
  var r = t.__transition, o;
1874
- r[e] = n, n.timer = Xn(i, 0, n.time);
1868
+ r[e] = n, n.timer = Gn(i, 0, n.time);
1875
1869
  function i(u) {
1876
- n.state = _n, n.timer.restart(a, n.delay, n.time), n.delay <= u && a(u - n.delay);
1870
+ n.state = pn, n.timer.restart(a, n.delay, n.time), n.delay <= u && a(u - n.delay);
1877
1871
  }
1878
1872
  function a(u) {
1879
1873
  var f, h, d, p;
1880
- if (n.state !== _n) return s();
1874
+ if (n.state !== pn) return s();
1881
1875
  for (f in r)
1882
1876
  if (p = r[f], p.name === n.name) {
1883
- if (p.state === ee) return pn(a);
1884
- p.state === mn ? (p.state = ne, p.timer.stop(), p.on.call("interrupt", t, t.__data__, p.index, p.group), delete r[f]) : +f < e && (p.state = ne, p.timer.stop(), p.on.call("cancel", t, t.__data__, p.index, p.group), delete r[f]);
1877
+ if (p.state === ee) return dn(a);
1878
+ p.state === _n ? (p.state = ne, p.timer.stop(), p.on.call("interrupt", t, t.__data__, p.index, p.group), delete r[f]) : +f < e && (p.state = ne, p.timer.stop(), p.on.call("cancel", t, t.__data__, p.index, p.group), delete r[f]);
1885
1879
  }
1886
- if (pn(function() {
1887
- n.state === ee && (n.state = mn, n.timer.restart(l, n.delay, n.time), l(u));
1888
- }), n.state = Se, n.on.call("start", t, t.__data__, n.index, n.group), n.state === Se) {
1880
+ if (dn(function() {
1881
+ n.state === ee && (n.state = _n, n.timer.restart(l, n.delay, n.time), l(u));
1882
+ }), n.state = Ne, n.on.call("start", t, t.__data__, n.index, n.group), n.state === Ne) {
1889
1883
  for (n.state = ee, o = new Array(d = n.tween.length), f = 0, h = -1; f < d; ++f)
1890
1884
  (p = n.tween[f].value.call(t, t.__data__, n.index, n.group)) && (o[++h] = p);
1891
1885
  o.length = h + 1;
1892
1886
  }
1893
1887
  }
1894
1888
  function l(u) {
1895
- for (var f = u < n.duration ? n.ease.call(null, u / n.duration) : (n.timer.restart(s), n.state = Ce, 1), h = -1, d = o.length; ++h < d; )
1889
+ for (var f = u < n.duration ? n.ease.call(null, u / n.duration) : (n.timer.restart(s), n.state = Se, 1), h = -1, d = o.length; ++h < d; )
1896
1890
  o[h].call(t, f);
1897
- n.state === Ce && (n.on.call("end", t, t.__data__, n.index, n.group), s());
1891
+ n.state === Se && (n.on.call("end", t, t.__data__, n.index, n.group), s());
1898
1892
  }
1899
1893
  function s() {
1900
1894
  n.state = ne, n.timer.stop(), delete r[e];
@@ -1911,17 +1905,17 @@ function re(t, e) {
1911
1905
  i = !1;
1912
1906
  continue;
1913
1907
  }
1914
- o = r.state > Se && r.state < Ce, r.state = ne, r.timer.stop(), r.on.call(o ? "interrupt" : "cancel", t, t.__data__, r.index, r.group), delete n[a];
1908
+ o = r.state > Ne && r.state < Se, r.state = ne, r.timer.stop(), r.on.call(o ? "interrupt" : "cancel", t, t.__data__, r.index, r.group), delete n[a];
1915
1909
  }
1916
1910
  i && delete t.__transition;
1917
1911
  }
1918
1912
  }
1919
- function La(t) {
1913
+ function Sa(t) {
1920
1914
  return this.each(function() {
1921
1915
  re(this, t);
1922
1916
  });
1923
1917
  }
1924
- function ka(t, e) {
1918
+ function Ca(t, e) {
1925
1919
  var n, r;
1926
1920
  return function() {
1927
1921
  var o = lt(this, t), i = o.tween;
@@ -1936,7 +1930,7 @@ function ka(t, e) {
1936
1930
  o.tween = r;
1937
1931
  };
1938
1932
  }
1939
- function Ba(t, e, n) {
1933
+ function La(t, e, n) {
1940
1934
  var r, o;
1941
1935
  if (typeof n != "function") throw new Error();
1942
1936
  return function() {
@@ -1953,7 +1947,7 @@ function Ba(t, e, n) {
1953
1947
  i.tween = o;
1954
1948
  };
1955
1949
  }
1956
- function Ua(t, e) {
1950
+ function ka(t, e) {
1957
1951
  var n = this._id;
1958
1952
  if (t += "", arguments.length < 2) {
1959
1953
  for (var r = rt(this.node(), n).tween, o = 0, i = r.length, a; o < i; ++o)
@@ -1961,9 +1955,9 @@ function Ua(t, e) {
1961
1955
  return a.value;
1962
1956
  return null;
1963
1957
  }
1964
- return this.each((e == null ? ka : Ba)(n, t, e));
1958
+ return this.each((e == null ? Ca : La)(n, t, e));
1965
1959
  }
1966
- function Ye(t, e, n) {
1960
+ function ze(t, e, n) {
1967
1961
  var r = t._id;
1968
1962
  return t.each(function() {
1969
1963
  var o = lt(this, r);
@@ -1974,141 +1968,141 @@ function Ye(t, e, n) {
1974
1968
  }
1975
1969
  function Wn(t, e) {
1976
1970
  var n;
1977
- return (typeof e == "number" ? pt : e instanceof qt ? cn : (n = qt(e)) ? (e = n, cn) : ma)(t, e);
1971
+ return (typeof e == "number" ? pt : e instanceof zt ? sn : (n = zt(e)) ? (e = n, sn) : pa)(t, e);
1978
1972
  }
1979
- function Da(t) {
1973
+ function Ba(t) {
1980
1974
  return function() {
1981
1975
  this.removeAttribute(t);
1982
1976
  };
1983
1977
  }
1984
- function $a(t) {
1978
+ function Da(t) {
1985
1979
  return function() {
1986
1980
  this.removeAttributeNS(t.space, t.local);
1987
1981
  };
1988
1982
  }
1989
- function Fa(t, e, n) {
1983
+ function Ua(t, e, n) {
1990
1984
  var r, o = n + "", i;
1991
1985
  return function() {
1992
1986
  var a = this.getAttribute(t);
1993
1987
  return a === o ? null : a === r ? i : i = e(r = a, n);
1994
1988
  };
1995
1989
  }
1996
- function Pa(t, e, n) {
1990
+ function $a(t, e, n) {
1997
1991
  var r, o = n + "", i;
1998
1992
  return function() {
1999
1993
  var a = this.getAttributeNS(t.space, t.local);
2000
1994
  return a === o ? null : a === r ? i : i = e(r = a, n);
2001
1995
  };
2002
1996
  }
2003
- function Oa(t, e, n) {
1997
+ function Fa(t, e, n) {
2004
1998
  var r, o, i;
2005
1999
  return function() {
2006
2000
  var a, l = n(this), s;
2007
2001
  return l == null ? void this.removeAttribute(t) : (a = this.getAttribute(t), s = l + "", a === s ? null : a === r && s === o ? i : (o = s, i = e(r = a, l)));
2008
2002
  };
2009
2003
  }
2010
- function za(t, e, n) {
2004
+ function Oa(t, e, n) {
2011
2005
  var r, o, i;
2012
2006
  return function() {
2013
2007
  var a, l = n(this), s;
2014
2008
  return l == null ? void this.removeAttributeNS(t.space, t.local) : (a = this.getAttributeNS(t.space, t.local), s = l + "", a === s ? null : a === r && s === o ? i : (o = s, i = e(r = a, l)));
2015
2009
  };
2016
2010
  }
2017
- function qa(t, e) {
2018
- var n = pe(t), r = n === "transform" ? wa : Wn;
2019
- return this.attrTween(t, typeof e == "function" ? (n.local ? za : Oa)(n, r, Ye(this, "attr." + t, e)) : e == null ? (n.local ? $a : Da)(n) : (n.local ? Pa : Fa)(n, r, e));
2011
+ function Pa(t, e) {
2012
+ var n = de(t), r = n === "transform" ? va : Wn;
2013
+ return this.attrTween(t, typeof e == "function" ? (n.local ? Oa : Fa)(n, r, ze(this, "attr." + t, e)) : e == null ? (n.local ? Da : Ba)(n) : (n.local ? $a : Ua)(n, r, e));
2020
2014
  }
2021
- function Ya(t, e) {
2015
+ function qa(t, e) {
2022
2016
  return function(n) {
2023
2017
  this.setAttribute(t, e.call(this, n));
2024
2018
  };
2025
2019
  }
2026
- function Va(t, e) {
2020
+ function za(t, e) {
2027
2021
  return function(n) {
2028
2022
  this.setAttributeNS(t.space, t.local, e.call(this, n));
2029
2023
  };
2030
2024
  }
2031
- function ja(t, e) {
2025
+ function Ya(t, e) {
2032
2026
  var n, r;
2033
2027
  function o() {
2034
2028
  var i = e.apply(this, arguments);
2035
- return i !== r && (n = (r = i) && Va(t, i)), n;
2029
+ return i !== r && (n = (r = i) && za(t, i)), n;
2036
2030
  }
2037
2031
  return o._value = e, o;
2038
2032
  }
2039
- function Ga(t, e) {
2033
+ function Va(t, e) {
2040
2034
  var n, r;
2041
2035
  function o() {
2042
2036
  var i = e.apply(this, arguments);
2043
- return i !== r && (n = (r = i) && Ya(t, i)), n;
2037
+ return i !== r && (n = (r = i) && qa(t, i)), n;
2044
2038
  }
2045
2039
  return o._value = e, o;
2046
2040
  }
2047
- function Xa(t, e) {
2041
+ function ja(t, e) {
2048
2042
  var n = "attr." + t;
2049
2043
  if (arguments.length < 2) return (n = this.tween(n)) && n._value;
2050
2044
  if (e == null) return this.tween(n, null);
2051
2045
  if (typeof e != "function") throw new Error();
2052
- var r = pe(t);
2053
- return this.tween(n, (r.local ? ja : Ga)(r, e));
2046
+ var r = de(t);
2047
+ return this.tween(n, (r.local ? Ya : Va)(r, e));
2054
2048
  }
2055
- function Ha(t, e) {
2049
+ function Ga(t, e) {
2056
2050
  return function() {
2057
2051
  qe(this, t).delay = +e.apply(this, arguments);
2058
2052
  };
2059
2053
  }
2060
- function Wa(t, e) {
2054
+ function Xa(t, e) {
2061
2055
  return e = +e, function() {
2062
2056
  qe(this, t).delay = e;
2063
2057
  };
2064
2058
  }
2065
- function Qa(t) {
2059
+ function Wa(t) {
2066
2060
  var e = this._id;
2067
- return arguments.length ? this.each((typeof t == "function" ? Ha : Wa)(e, t)) : rt(this.node(), e).delay;
2061
+ return arguments.length ? this.each((typeof t == "function" ? Ga : Xa)(e, t)) : rt(this.node(), e).delay;
2068
2062
  }
2069
- function Ka(t, e) {
2063
+ function Ha(t, e) {
2070
2064
  return function() {
2071
2065
  lt(this, t).duration = +e.apply(this, arguments);
2072
2066
  };
2073
2067
  }
2074
- function Ja(t, e) {
2068
+ function Qa(t, e) {
2075
2069
  return e = +e, function() {
2076
2070
  lt(this, t).duration = e;
2077
2071
  };
2078
2072
  }
2079
- function Za(t) {
2073
+ function Ka(t) {
2080
2074
  var e = this._id;
2081
- return arguments.length ? this.each((typeof t == "function" ? Ka : Ja)(e, t)) : rt(this.node(), e).duration;
2075
+ return arguments.length ? this.each((typeof t == "function" ? Ha : Qa)(e, t)) : rt(this.node(), e).duration;
2082
2076
  }
2083
- function tl(t, e) {
2077
+ function Ja(t, e) {
2084
2078
  if (typeof e != "function") throw new Error();
2085
2079
  return function() {
2086
2080
  lt(this, t).ease = e;
2087
2081
  };
2088
2082
  }
2089
- function el(t) {
2083
+ function Za(t) {
2090
2084
  var e = this._id;
2091
- return arguments.length ? this.each(tl(e, t)) : rt(this.node(), e).ease;
2085
+ return arguments.length ? this.each(Ja(e, t)) : rt(this.node(), e).ease;
2092
2086
  }
2093
- function nl(t, e) {
2087
+ function tl(t, e) {
2094
2088
  return function() {
2095
2089
  var n = e.apply(this, arguments);
2096
2090
  if (typeof n != "function") throw new Error();
2097
2091
  lt(this, t).ease = n;
2098
2092
  };
2099
2093
  }
2100
- function rl(t) {
2094
+ function el(t) {
2101
2095
  if (typeof t != "function") throw new Error();
2102
- return this.each(nl(this._id, t));
2096
+ return this.each(tl(this._id, t));
2103
2097
  }
2104
- function ol(t) {
2105
- typeof t != "function" && (t = Rn(t));
2098
+ function nl(t) {
2099
+ typeof t != "function" && (t = xn(t));
2106
2100
  for (var e = this._groups, n = e.length, r = new Array(n), o = 0; o < n; ++o)
2107
2101
  for (var i = e[o], a = i.length, l = r[o] = [], s, u = 0; u < a; ++u)
2108
2102
  (s = i[u]) && t.call(s, s.__data__, u, i) && l.push(s);
2109
2103
  return new ht(r, this._parents, this._name, this._id);
2110
2104
  }
2111
- function il(t) {
2105
+ function rl(t) {
2112
2106
  if (t._id !== this._id) throw new Error();
2113
2107
  for (var e = this._groups, n = t._groups, r = e.length, o = n.length, i = Math.min(r, o), a = new Array(r), l = 0; l < i; ++l)
2114
2108
  for (var s = e[l], u = n[l], f = s.length, h = a[l] = new Array(f), d, p = 0; p < f; ++p)
@@ -2117,154 +2111,154 @@ function il(t) {
2117
2111
  a[l] = e[l];
2118
2112
  return new ht(a, this._parents, this._name, this._id);
2119
2113
  }
2120
- function al(t) {
2114
+ function ol(t) {
2121
2115
  return (t + "").trim().split(/^|\s+/).every(function(e) {
2122
2116
  var n = e.indexOf(".");
2123
2117
  return n >= 0 && (e = e.slice(0, n)), !e || e === "start";
2124
2118
  });
2125
2119
  }
2126
- function ll(t, e, n) {
2127
- var r, o, i = al(e) ? qe : lt;
2120
+ function il(t, e, n) {
2121
+ var r, o, i = ol(e) ? qe : lt;
2128
2122
  return function() {
2129
2123
  var a = i(this, t), l = a.on;
2130
2124
  l !== r && (o = (r = l).copy()).on(e, n), a.on = o;
2131
2125
  };
2132
2126
  }
2133
- function ul(t, e) {
2127
+ function al(t, e) {
2134
2128
  var n = this._id;
2135
- return arguments.length < 2 ? rt(this.node(), n).on.on(t) : this.each(ll(n, t, e));
2129
+ return arguments.length < 2 ? rt(this.node(), n).on.on(t) : this.each(il(n, t, e));
2136
2130
  }
2137
- function sl(t) {
2131
+ function ll(t) {
2138
2132
  return function() {
2139
2133
  var e = this.parentNode;
2140
2134
  for (var n in this.__transition) if (+n !== t) return;
2141
2135
  e && e.removeChild(this);
2142
2136
  };
2143
2137
  }
2144
- function cl() {
2145
- return this.on("end.remove", sl(this._id));
2138
+ function ul() {
2139
+ return this.on("end.remove", ll(this._id));
2146
2140
  }
2147
- function fl(t) {
2141
+ function sl(t) {
2148
2142
  var e = this._name, n = this._id;
2149
- typeof t != "function" && (t = Fe(t));
2143
+ typeof t != "function" && (t = $e(t));
2150
2144
  for (var r = this._groups, o = r.length, i = new Array(o), a = 0; a < o; ++a)
2151
2145
  for (var l = r[a], s = l.length, u = i[a] = new Array(s), f, h, d = 0; d < s; ++d)
2152
- (f = l[d]) && (h = t.call(f, f.__data__, d, l)) && ("__data__" in f && (h.__data__ = f.__data__), u[d] = h, me(u[d], e, n, d, u, rt(f, n)));
2146
+ (f = l[d]) && (h = t.call(f, f.__data__, d, l)) && ("__data__" in f && (h.__data__ = f.__data__), u[d] = h, _e(u[d], e, n, d, u, rt(f, n)));
2153
2147
  return new ht(i, this._parents, e, n);
2154
2148
  }
2155
- function hl(t) {
2149
+ function cl(t) {
2156
2150
  var e = this._name, n = this._id;
2157
- typeof t != "function" && (t = xn(t));
2151
+ typeof t != "function" && (t = Mn(t));
2158
2152
  for (var r = this._groups, o = r.length, i = [], a = [], l = 0; l < o; ++l)
2159
2153
  for (var s = r[l], u = s.length, f, h = 0; h < u; ++h)
2160
2154
  if (f = s[h]) {
2161
- for (var d = t.call(f, f.__data__, h, s), p, w = rt(f, n), I = 0, A = d.length; I < A; ++I)
2162
- (p = d[I]) && me(p, e, n, I, d, w);
2155
+ for (var d = t.call(f, f.__data__, h, s), p, w = rt(f, n), E = 0, A = d.length; E < A; ++E)
2156
+ (p = d[E]) && _e(p, e, n, E, d, w);
2163
2157
  i.push(d), a.push(f);
2164
2158
  }
2165
2159
  return new ht(i, a, e, n);
2166
2160
  }
2167
- var dl = Gt.prototype.constructor;
2168
- function pl() {
2169
- return new dl(this._groups, this._parents);
2161
+ var fl = Gt.prototype.constructor;
2162
+ function hl() {
2163
+ return new fl(this._groups, this._parents);
2170
2164
  }
2171
- function _l(t, e) {
2165
+ function dl(t, e) {
2172
2166
  var n, r, o;
2173
2167
  return function() {
2174
2168
  var i = St(this, t), a = (this.style.removeProperty(t), St(this, t));
2175
2169
  return i === a ? null : i === n && a === r ? o : o = e(n = i, r = a);
2176
2170
  };
2177
2171
  }
2178
- function Qn(t) {
2172
+ function Hn(t) {
2179
2173
  return function() {
2180
2174
  this.style.removeProperty(t);
2181
2175
  };
2182
2176
  }
2183
- function ml(t, e, n) {
2177
+ function pl(t, e, n) {
2184
2178
  var r, o = n + "", i;
2185
2179
  return function() {
2186
2180
  var a = St(this, t);
2187
2181
  return a === o ? null : a === r ? i : i = e(r = a, n);
2188
2182
  };
2189
2183
  }
2190
- function gl(t, e, n) {
2184
+ function _l(t, e, n) {
2191
2185
  var r, o, i;
2192
2186
  return function() {
2193
2187
  var a = St(this, t), l = n(this), s = l + "";
2194
2188
  return l == null && (s = l = (this.style.removeProperty(t), St(this, t))), a === s ? null : a === r && s === o ? i : (o = s, i = e(r = a, l));
2195
2189
  };
2196
2190
  }
2197
- function vl(t, e) {
2191
+ function ml(t, e) {
2198
2192
  var n, r, o, i = "style." + e, a = "end." + i, l;
2199
2193
  return function() {
2200
- var s = lt(this, t), u = s.on, f = s.value[i] == null ? l || (l = Qn(e)) : void 0;
2194
+ var s = lt(this, t), u = s.on, f = s.value[i] == null ? l || (l = Hn(e)) : void 0;
2201
2195
  (u !== n || o !== f) && (r = (n = u).copy()).on(a, o = f), s.on = r;
2202
2196
  };
2203
2197
  }
2204
- function yl(t, e, n) {
2205
- var r = (t += "") == "transform" ? ya : Wn;
2206
- return e == null ? this.styleTween(t, _l(t, r)).on("end.style." + t, Qn(t)) : typeof e == "function" ? this.styleTween(t, gl(t, r, Ye(this, "style." + t, e))).each(vl(this._id, t)) : this.styleTween(t, ml(t, r, e), n).on("end.style." + t, null);
2198
+ function gl(t, e, n) {
2199
+ var r = (t += "") == "transform" ? ga : Wn;
2200
+ return e == null ? this.styleTween(t, dl(t, r)).on("end.style." + t, Hn(t)) : typeof e == "function" ? this.styleTween(t, _l(t, r, ze(this, "style." + t, e))).each(ml(this._id, t)) : this.styleTween(t, pl(t, r, e), n).on("end.style." + t, null);
2207
2201
  }
2208
- function wl(t, e, n) {
2202
+ function vl(t, e, n) {
2209
2203
  return function(r) {
2210
2204
  this.style.setProperty(t, e.call(this, r), n);
2211
2205
  };
2212
2206
  }
2213
- function bl(t, e, n) {
2207
+ function yl(t, e, n) {
2214
2208
  var r, o;
2215
2209
  function i() {
2216
2210
  var a = e.apply(this, arguments);
2217
- return a !== o && (r = (o = a) && wl(t, a, n)), r;
2211
+ return a !== o && (r = (o = a) && vl(t, a, n)), r;
2218
2212
  }
2219
2213
  return i._value = e, i;
2220
2214
  }
2221
- function Al(t, e, n) {
2215
+ function wl(t, e, n) {
2222
2216
  var r = "style." + (t += "");
2223
2217
  if (arguments.length < 2) return (r = this.tween(r)) && r._value;
2224
2218
  if (e == null) return this.tween(r, null);
2225
2219
  if (typeof e != "function") throw new Error();
2226
- return this.tween(r, bl(t, e, n ?? ""));
2220
+ return this.tween(r, yl(t, e, n ?? ""));
2227
2221
  }
2228
- function El(t) {
2222
+ function bl(t) {
2229
2223
  return function() {
2230
2224
  this.textContent = t;
2231
2225
  };
2232
2226
  }
2233
- function Tl(t) {
2227
+ function Al(t) {
2234
2228
  return function() {
2235
2229
  var e = t(this);
2236
2230
  this.textContent = e ?? "";
2237
2231
  };
2238
2232
  }
2239
- function Il(t) {
2240
- return this.tween("text", typeof t == "function" ? Tl(Ye(this, "text", t)) : El(t == null ? "" : t + ""));
2233
+ function El(t) {
2234
+ return this.tween("text", typeof t == "function" ? Al(ze(this, "text", t)) : bl(t == null ? "" : t + ""));
2241
2235
  }
2242
- function Ml(t) {
2236
+ function Tl(t) {
2243
2237
  return function(e) {
2244
2238
  this.textContent = t.call(this, e);
2245
2239
  };
2246
2240
  }
2247
- function xl(t) {
2241
+ function Il(t) {
2248
2242
  var e, n;
2249
2243
  function r() {
2250
2244
  var o = t.apply(this, arguments);
2251
- return o !== n && (e = (n = o) && Ml(o)), e;
2245
+ return o !== n && (e = (n = o) && Tl(o)), e;
2252
2246
  }
2253
2247
  return r._value = t, r;
2254
2248
  }
2255
- function Rl(t) {
2249
+ function Ml(t) {
2256
2250
  var e = "text";
2257
2251
  if (arguments.length < 1) return (e = this.tween(e)) && e._value;
2258
2252
  if (t == null) return this.tween(e, null);
2259
2253
  if (typeof t != "function") throw new Error();
2260
- return this.tween(e, xl(t));
2254
+ return this.tween(e, Il(t));
2261
2255
  }
2262
- function Nl() {
2263
- for (var t = this._name, e = this._id, n = Kn(), r = this._groups, o = r.length, i = 0; i < o; ++i)
2256
+ function xl() {
2257
+ for (var t = this._name, e = this._id, n = Qn(), r = this._groups, o = r.length, i = 0; i < o; ++i)
2264
2258
  for (var a = r[i], l = a.length, s, u = 0; u < l; ++u)
2265
2259
  if (s = a[u]) {
2266
2260
  var f = rt(s, e);
2267
- me(s, t, n, u, a, {
2261
+ _e(s, t, n, u, a, {
2268
2262
  time: f.time + f.delay + f.duration,
2269
2263
  delay: 0,
2270
2264
  duration: f.duration,
@@ -2273,7 +2267,7 @@ function Nl() {
2273
2267
  }
2274
2268
  return new ht(r, this._parents, t, n);
2275
2269
  }
2276
- function Sl() {
2270
+ function Rl() {
2277
2271
  var t, e, n = this, r = n._id, o = n.size();
2278
2272
  return new Promise(function(i, a) {
2279
2273
  var l = { value: a }, s = { value: function() {
@@ -2285,74 +2279,74 @@ function Sl() {
2285
2279
  }), o === 0 && i();
2286
2280
  });
2287
2281
  }
2288
- var Cl = 0;
2282
+ var Nl = 0;
2289
2283
  function ht(t, e, n, r) {
2290
2284
  this._groups = t, this._parents = e, this._name = n, this._id = r;
2291
2285
  }
2292
- function Kn() {
2293
- return ++Cl;
2286
+ function Qn() {
2287
+ return ++Nl;
2294
2288
  }
2295
2289
  var st = Gt.prototype;
2296
2290
  ht.prototype = {
2297
2291
  constructor: ht,
2298
- select: fl,
2299
- selectAll: hl,
2292
+ select: sl,
2293
+ selectAll: cl,
2300
2294
  selectChild: st.selectChild,
2301
2295
  selectChildren: st.selectChildren,
2302
- filter: ol,
2303
- merge: il,
2304
- selection: pl,
2305
- transition: Nl,
2296
+ filter: nl,
2297
+ merge: rl,
2298
+ selection: hl,
2299
+ transition: xl,
2306
2300
  call: st.call,
2307
2301
  nodes: st.nodes,
2308
2302
  node: st.node,
2309
2303
  size: st.size,
2310
2304
  empty: st.empty,
2311
2305
  each: st.each,
2312
- on: ul,
2313
- attr: qa,
2314
- attrTween: Xa,
2315
- style: yl,
2316
- styleTween: Al,
2317
- text: Il,
2318
- textTween: Rl,
2319
- remove: cl,
2320
- tween: Ua,
2321
- delay: Qa,
2322
- duration: Za,
2323
- ease: el,
2324
- easeVarying: rl,
2325
- end: Sl,
2306
+ on: al,
2307
+ attr: Pa,
2308
+ attrTween: ja,
2309
+ style: gl,
2310
+ styleTween: wl,
2311
+ text: El,
2312
+ textTween: Ml,
2313
+ remove: ul,
2314
+ tween: ka,
2315
+ delay: Wa,
2316
+ duration: Ka,
2317
+ ease: Za,
2318
+ easeVarying: el,
2319
+ end: Rl,
2326
2320
  [Symbol.iterator]: st[Symbol.iterator]
2327
2321
  };
2328
- function Ll(t) {
2322
+ function Sl(t) {
2329
2323
  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
2330
2324
  }
2331
- var kl = {
2325
+ var Cl = {
2332
2326
  time: null,
2333
2327
  // Set on use.
2334
2328
  delay: 0,
2335
2329
  duration: 250,
2336
- ease: Ll
2330
+ ease: Sl
2337
2331
  };
2338
- function Bl(t, e) {
2332
+ function Ll(t, e) {
2339
2333
  for (var n; !(n = t.__transition) || !(n = n[e]); )
2340
2334
  if (!(t = t.parentNode))
2341
2335
  throw new Error(`transition ${e} not found`);
2342
2336
  return n;
2343
2337
  }
2344
- function Ul(t) {
2338
+ function kl(t) {
2345
2339
  var e, n;
2346
- t instanceof ht ? (e = t._id, t = t._name) : (e = Kn(), (n = kl).time = ze(), t = t == null ? null : t + "");
2340
+ t instanceof ht ? (e = t._id, t = t._name) : (e = Qn(), (n = Cl).time = Pe(), t = t == null ? null : t + "");
2347
2341
  for (var r = this._groups, o = r.length, i = 0; i < o; ++i)
2348
2342
  for (var a = r[i], l = a.length, s, u = 0; u < l; ++u)
2349
- (s = a[u]) && me(s, t, e, u, a, n || Bl(s, e));
2343
+ (s = a[u]) && _e(s, t, e, u, a, n || Ll(s, e));
2350
2344
  return new ht(r, this._parents, t, e);
2351
2345
  }
2352
- Gt.prototype.interrupt = La;
2353
- Gt.prototype.transition = Ul;
2346
+ Gt.prototype.interrupt = Sa;
2347
+ Gt.prototype.transition = kl;
2354
2348
  const Jt = (t) => () => t;
2355
- function Dl(t, {
2349
+ function Bl(t, {
2356
2350
  sourceEvent: e,
2357
2351
  target: n,
2358
2352
  transform: r,
@@ -2405,198 +2399,198 @@ ft.prototype = {
2405
2399
  return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
2406
2400
  }
2407
2401
  };
2408
- var de = new ft(1, 0, 0);
2402
+ var he = new ft(1, 0, 0);
2409
2403
  ft.prototype;
2410
- function be(t) {
2404
+ function we(t) {
2411
2405
  t.stopImmediatePropagation();
2412
2406
  }
2413
- function Ut(t) {
2407
+ function Dt(t) {
2414
2408
  t.preventDefault(), t.stopImmediatePropagation();
2415
2409
  }
2416
- function $l(t) {
2410
+ function Dl(t) {
2417
2411
  return (!t.ctrlKey || t.type === "wheel") && !t.button;
2418
2412
  }
2419
- function Fl() {
2413
+ function Ul() {
2420
2414
  var t = this;
2421
2415
  return t instanceof SVGElement ? (t = t.ownerSVGElement || t, t.hasAttribute("viewBox") ? (t = t.viewBox.baseVal, [[t.x, t.y], [t.x + t.width, t.y + t.height]]) : [[0, 0], [t.width.baseVal.value, t.height.baseVal.value]]) : [[0, 0], [t.clientWidth, t.clientHeight]];
2422
2416
  }
2423
- function gn() {
2424
- return this.__zoom || de;
2417
+ function mn() {
2418
+ return this.__zoom || he;
2425
2419
  }
2426
- function Pl(t) {
2420
+ function $l(t) {
2427
2421
  return -t.deltaY * (t.deltaMode === 1 ? 0.05 : t.deltaMode ? 1 : 2e-3) * (t.ctrlKey ? 10 : 1);
2428
2422
  }
2429
- function Ol() {
2423
+ function Fl() {
2430
2424
  return navigator.maxTouchPoints || "ontouchstart" in this;
2431
2425
  }
2432
- function zl(t, e, n) {
2426
+ function Ol(t, e, n) {
2433
2427
  var r = t.invertX(e[0][0]) - n[0][0], o = t.invertX(e[1][0]) - n[1][0], i = t.invertY(e[0][1]) - n[0][1], a = t.invertY(e[1][1]) - n[1][1];
2434
2428
  return t.translate(
2435
2429
  o > r ? (r + o) / 2 : Math.min(0, r) || Math.max(0, o),
2436
2430
  a > i ? (i + a) / 2 : Math.min(0, i) || Math.max(0, a)
2437
2431
  );
2438
2432
  }
2439
- function ql() {
2440
- var t = $l, e = Fl, n = zl, r = Pl, o = Ol, i = [0, 1 / 0], a = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], l = 250, s = Ta, u = $e("start", "zoom", "end"), f, h, d, p = 500, w = 150, I = 0, A = 10;
2433
+ function Pl() {
2434
+ var t = Dl, e = Ul, n = Ol, r = $l, o = Fl, i = [0, 1 / 0], a = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], l = 250, s = Aa, u = Ue("start", "zoom", "end"), f, h, d, p = 500, w = 150, E = 0, A = 10;
2441
2435
  function m(_) {
2442
- _.property("__zoom", gn).on("wheel.zoom", N, { passive: !1 }).on("mousedown.zoom", C).on("dblclick.zoom", U).filter(o).on("touchstart.zoom", P).on("touchmove.zoom", j).on("touchend.zoom touchcancel.zoom", W).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2436
+ _.property("__zoom", mn).on("wheel.zoom", N, { passive: !1 }).on("mousedown.zoom", C).on("dblclick.zoom", L).filter(o).on("touchstart.zoom", O).on("touchmove.zoom", G).on("touchend.zoom touchcancel.zoom", q).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2443
2437
  }
2444
- m.transform = function(_, y, c, g) {
2445
- var v = _.selection ? _.selection() : _;
2446
- v.property("__zoom", gn), _ !== v ? x(_, y, c, g) : v.interrupt().each(function() {
2447
- E(this, arguments).event(g).start().zoom(null, typeof y == "function" ? y.apply(this, arguments) : y).end();
2438
+ m.transform = function(_, v, c, g) {
2439
+ var y = _.selection ? _.selection() : _;
2440
+ y.property("__zoom", mn), _ !== y ? M(_, v, c, g) : y.interrupt().each(function() {
2441
+ x(this, arguments).event(g).start().zoom(null, typeof v == "function" ? v.apply(this, arguments) : v).end();
2448
2442
  });
2449
- }, m.scaleBy = function(_, y, c, g) {
2443
+ }, m.scaleBy = function(_, v, c, g) {
2450
2444
  m.scaleTo(_, function() {
2451
- var v = this.__zoom.k, b = typeof y == "function" ? y.apply(this, arguments) : y;
2452
- return v * b;
2445
+ var y = this.__zoom.k, b = typeof v == "function" ? v.apply(this, arguments) : v;
2446
+ return y * b;
2453
2447
  }, c, g);
2454
- }, m.scaleTo = function(_, y, c, g) {
2448
+ }, m.scaleTo = function(_, v, c, g) {
2455
2449
  m.transform(_, function() {
2456
- var v = e.apply(this, arguments), b = this.__zoom, T = c == null ? H(v) : typeof c == "function" ? c.apply(this, arguments) : c, R = b.invert(T), k = typeof y == "function" ? y.apply(this, arguments) : y;
2457
- return n(D(L(b, k), T, R), v, a);
2450
+ var y = e.apply(this, arguments), b = this.__zoom, T = c == null ? H(y) : typeof c == "function" ? c.apply(this, arguments) : c, R = b.invert(T), B = typeof v == "function" ? v.apply(this, arguments) : v;
2451
+ return n(U(k(b, B), T, R), y, a);
2458
2452
  }, c, g);
2459
- }, m.translateBy = function(_, y, c, g) {
2453
+ }, m.translateBy = function(_, v, c, g) {
2460
2454
  m.transform(_, function() {
2461
2455
  return n(this.__zoom.translate(
2462
- typeof y == "function" ? y.apply(this, arguments) : y,
2456
+ typeof v == "function" ? v.apply(this, arguments) : v,
2463
2457
  typeof c == "function" ? c.apply(this, arguments) : c
2464
2458
  ), e.apply(this, arguments), a);
2465
2459
  }, null, g);
2466
- }, m.translateTo = function(_, y, c, g, v) {
2460
+ }, m.translateTo = function(_, v, c, g, y) {
2467
2461
  m.transform(_, function() {
2468
2462
  var b = e.apply(this, arguments), T = this.__zoom, R = g == null ? H(b) : typeof g == "function" ? g.apply(this, arguments) : g;
2469
- return n(de.translate(R[0], R[1]).scale(T.k).translate(
2470
- typeof y == "function" ? -y.apply(this, arguments) : -y,
2463
+ return n(he.translate(R[0], R[1]).scale(T.k).translate(
2464
+ typeof v == "function" ? -v.apply(this, arguments) : -v,
2471
2465
  typeof c == "function" ? -c.apply(this, arguments) : -c
2472
2466
  ), b, a);
2473
- }, g, v);
2467
+ }, g, y);
2474
2468
  };
2475
- function L(_, y) {
2476
- return y = Math.max(i[0], Math.min(i[1], y)), y === _.k ? _ : new ft(y, _.x, _.y);
2469
+ function k(_, v) {
2470
+ return v = Math.max(i[0], Math.min(i[1], v)), v === _.k ? _ : new ft(v, _.x, _.y);
2477
2471
  }
2478
- function D(_, y, c) {
2479
- var g = y[0] - c[0] * _.k, v = y[1] - c[1] * _.k;
2480
- return g === _.x && v === _.y ? _ : new ft(_.k, g, v);
2472
+ function U(_, v, c) {
2473
+ var g = v[0] - c[0] * _.k, y = v[1] - c[1] * _.k;
2474
+ return g === _.x && y === _.y ? _ : new ft(_.k, g, y);
2481
2475
  }
2482
2476
  function H(_) {
2483
2477
  return [(+_[0][0] + +_[1][0]) / 2, (+_[0][1] + +_[1][1]) / 2];
2484
2478
  }
2485
- function x(_, y, c, g) {
2479
+ function M(_, v, c, g) {
2486
2480
  _.on("start.zoom", function() {
2487
- E(this, arguments).event(g).start();
2481
+ x(this, arguments).event(g).start();
2488
2482
  }).on("interrupt.zoom end.zoom", function() {
2489
- E(this, arguments).event(g).end();
2483
+ x(this, arguments).event(g).end();
2490
2484
  }).tween("zoom", function() {
2491
- var v = this, b = arguments, T = E(v, b).event(g), R = e.apply(v, b), k = c == null ? H(R) : typeof c == "function" ? c.apply(v, b) : c, q = Math.max(R[1][0] - R[0][0], R[1][1] - R[0][1]), $ = v.__zoom, O = typeof y == "function" ? y.apply(v, b) : y, X = s($.invert(k).concat(q / $.k), O.invert(k).concat(q / O.k));
2485
+ var y = this, b = arguments, T = x(y, b).event(g), R = e.apply(y, b), B = c == null ? H(R) : typeof c == "function" ? c.apply(y, b) : c, Y = Math.max(R[1][0] - R[0][0], R[1][1] - R[0][1]), $ = y.__zoom, P = typeof v == "function" ? v.apply(y, b) : v, W = s($.invert(B).concat(Y / $.k), P.invert(B).concat(Y / P.k));
2492
2486
  return function(F) {
2493
- if (F === 1) F = O;
2487
+ if (F === 1) F = P;
2494
2488
  else {
2495
- var V = X(F), Q = q / V[2];
2496
- F = new ft(Q, k[0] - V[0] * Q, k[1] - V[1] * Q);
2489
+ var j = W(F), Q = Y / j[2];
2490
+ F = new ft(Q, B[0] - j[0] * Q, B[1] - j[1] * Q);
2497
2491
  }
2498
2492
  T.zoom(null, F);
2499
2493
  };
2500
2494
  });
2501
2495
  }
2502
- function E(_, y, c) {
2503
- return !c && _.__zooming || new M(_, y);
2496
+ function x(_, v, c) {
2497
+ return !c && _.__zooming || new I(_, v);
2504
2498
  }
2505
- function M(_, y) {
2506
- this.that = _, this.args = y, this.active = 0, this.sourceEvent = null, this.extent = e.apply(_, y), this.taps = 0;
2499
+ function I(_, v) {
2500
+ this.that = _, this.args = v, this.active = 0, this.sourceEvent = null, this.extent = e.apply(_, v), this.taps = 0;
2507
2501
  }
2508
- M.prototype = {
2502
+ I.prototype = {
2509
2503
  event: function(_) {
2510
2504
  return _ && (this.sourceEvent = _), this;
2511
2505
  },
2512
2506
  start: function() {
2513
2507
  return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
2514
2508
  },
2515
- zoom: function(_, y) {
2516
- return this.mouse && _ !== "mouse" && (this.mouse[1] = y.invert(this.mouse[0])), this.touch0 && _ !== "touch" && (this.touch0[1] = y.invert(this.touch0[0])), this.touch1 && _ !== "touch" && (this.touch1[1] = y.invert(this.touch1[0])), this.that.__zoom = y, this.emit("zoom"), this;
2509
+ zoom: function(_, v) {
2510
+ return this.mouse && _ !== "mouse" && (this.mouse[1] = v.invert(this.mouse[0])), this.touch0 && _ !== "touch" && (this.touch0[1] = v.invert(this.touch0[0])), this.touch1 && _ !== "touch" && (this.touch1[1] = v.invert(this.touch1[0])), this.that.__zoom = v, this.emit("zoom"), this;
2517
2511
  },
2518
2512
  end: function() {
2519
2513
  return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
2520
2514
  },
2521
2515
  emit: function(_) {
2522
- var y = ct(this.that).datum();
2516
+ var v = ct(this.that).datum();
2523
2517
  u.call(
2524
2518
  _,
2525
2519
  this.that,
2526
- new Dl(_, {
2520
+ new Bl(_, {
2527
2521
  sourceEvent: this.sourceEvent,
2528
2522
  target: m,
2529
2523
  transform: this.that.__zoom,
2530
2524
  dispatch: u
2531
2525
  }),
2532
- y
2526
+ v
2533
2527
  );
2534
2528
  }
2535
2529
  };
2536
- function N(_, ...y) {
2530
+ function N(_, ...v) {
2537
2531
  if (!t.apply(this, arguments)) return;
2538
- var c = E(this, y).event(_), g = this.__zoom, v = Math.max(i[0], Math.min(i[1], g.k * Math.pow(2, r.apply(this, arguments)))), b = dt(_);
2532
+ var c = x(this, v).event(_), g = this.__zoom, y = Math.max(i[0], Math.min(i[1], g.k * Math.pow(2, r.apply(this, arguments)))), b = dt(_);
2539
2533
  if (c.wheel)
2540
2534
  (c.mouse[0][0] !== b[0] || c.mouse[0][1] !== b[1]) && (c.mouse[1] = g.invert(c.mouse[0] = b)), clearTimeout(c.wheel);
2541
2535
  else {
2542
- if (g.k === v) return;
2536
+ if (g.k === y) return;
2543
2537
  c.mouse = [b, g.invert(b)], re(this), c.start();
2544
2538
  }
2545
- Ut(_), c.wheel = setTimeout(T, w), c.zoom("mouse", n(D(L(g, v), c.mouse[0], c.mouse[1]), c.extent, a));
2539
+ Dt(_), c.wheel = setTimeout(T, w), c.zoom("mouse", n(U(k(g, y), c.mouse[0], c.mouse[1]), c.extent, a));
2546
2540
  function T() {
2547
2541
  c.wheel = null, c.end();
2548
2542
  }
2549
2543
  }
2550
- function C(_, ...y) {
2544
+ function C(_, ...v) {
2551
2545
  if (d || !t.apply(this, arguments)) return;
2552
- var c = _.currentTarget, g = E(this, y, !0).event(_), v = ct(_.view).on("mousemove.zoom", k, !0).on("mouseup.zoom", q, !0), b = dt(_, c), T = _.clientX, R = _.clientY;
2553
- Ki(_.view), be(_), g.mouse = [b, this.__zoom.invert(b)], re(this), g.start();
2554
- function k($) {
2555
- if (Ut($), !g.moved) {
2556
- var O = $.clientX - T, X = $.clientY - R;
2557
- g.moved = O * O + X * X > I;
2546
+ var c = _.currentTarget, g = x(this, v, !0).event(_), y = ct(_.view).on("mousemove.zoom", B, !0).on("mouseup.zoom", Y, !0), b = dt(_, c), T = _.clientX, R = _.clientY;
2547
+ Hi(_.view), we(_), g.mouse = [b, this.__zoom.invert(b)], re(this), g.start();
2548
+ function B($) {
2549
+ if (Dt($), !g.moved) {
2550
+ var P = $.clientX - T, W = $.clientY - R;
2551
+ g.moved = P * P + W * W > E;
2558
2552
  }
2559
- g.event($).zoom("mouse", n(D(g.that.__zoom, g.mouse[0] = dt($, c), g.mouse[1]), g.extent, a));
2553
+ g.event($).zoom("mouse", n(U(g.that.__zoom, g.mouse[0] = dt($, c), g.mouse[1]), g.extent, a));
2560
2554
  }
2561
- function q($) {
2562
- v.on("mousemove.zoom mouseup.zoom", null), Ji($.view, g.moved), Ut($), g.event($).end();
2555
+ function Y($) {
2556
+ y.on("mousemove.zoom mouseup.zoom", null), Qi($.view, g.moved), Dt($), g.event($).end();
2563
2557
  }
2564
2558
  }
2565
- function U(_, ...y) {
2559
+ function L(_, ...v) {
2566
2560
  if (t.apply(this, arguments)) {
2567
- var c = this.__zoom, g = dt(_.changedTouches ? _.changedTouches[0] : _, this), v = c.invert(g), b = c.k * (_.shiftKey ? 0.5 : 2), T = n(D(L(c, b), g, v), e.apply(this, y), a);
2568
- Ut(_), l > 0 ? ct(this).transition().duration(l).call(x, T, g, _) : ct(this).call(m.transform, T, g, _);
2561
+ var c = this.__zoom, g = dt(_.changedTouches ? _.changedTouches[0] : _, this), y = c.invert(g), b = c.k * (_.shiftKey ? 0.5 : 2), T = n(U(k(c, b), g, y), e.apply(this, v), a);
2562
+ Dt(_), l > 0 ? ct(this).transition().duration(l).call(M, T, g, _) : ct(this).call(m.transform, T, g, _);
2569
2563
  }
2570
2564
  }
2571
- function P(_, ...y) {
2565
+ function O(_, ...v) {
2572
2566
  if (t.apply(this, arguments)) {
2573
- var c = _.touches, g = c.length, v = E(this, y, _.changedTouches.length === g).event(_), b, T, R, k;
2574
- for (be(_), T = 0; T < g; ++T)
2575
- R = c[T], k = dt(R, this), k = [k, this.__zoom.invert(k), R.identifier], v.touch0 ? !v.touch1 && v.touch0[2] !== k[2] && (v.touch1 = k, v.taps = 0) : (v.touch0 = k, b = !0, v.taps = 1 + !!f);
2576
- f && (f = clearTimeout(f)), b && (v.taps < 2 && (h = k[0], f = setTimeout(function() {
2567
+ var c = _.touches, g = c.length, y = x(this, v, _.changedTouches.length === g).event(_), b, T, R, B;
2568
+ for (we(_), T = 0; T < g; ++T)
2569
+ R = c[T], B = dt(R, this), B = [B, this.__zoom.invert(B), R.identifier], y.touch0 ? !y.touch1 && y.touch0[2] !== B[2] && (y.touch1 = B, y.taps = 0) : (y.touch0 = B, b = !0, y.taps = 1 + !!f);
2570
+ f && (f = clearTimeout(f)), b && (y.taps < 2 && (h = B[0], f = setTimeout(function() {
2577
2571
  f = null;
2578
- }, p)), re(this), v.start());
2572
+ }, p)), re(this), y.start());
2579
2573
  }
2580
2574
  }
2581
- function j(_, ...y) {
2575
+ function G(_, ...v) {
2582
2576
  if (this.__zooming) {
2583
- var c = E(this, y).event(_), g = _.changedTouches, v = g.length, b, T, R, k;
2584
- for (Ut(_), b = 0; b < v; ++b)
2577
+ var c = x(this, v).event(_), g = _.changedTouches, y = g.length, b, T, R, B;
2578
+ for (Dt(_), b = 0; b < y; ++b)
2585
2579
  T = g[b], R = dt(T, this), c.touch0 && c.touch0[2] === T.identifier ? c.touch0[0] = R : c.touch1 && c.touch1[2] === T.identifier && (c.touch1[0] = R);
2586
2580
  if (T = c.that.__zoom, c.touch1) {
2587
- var q = c.touch0[0], $ = c.touch0[1], O = c.touch1[0], X = c.touch1[1], F = (F = O[0] - q[0]) * F + (F = O[1] - q[1]) * F, V = (V = X[0] - $[0]) * V + (V = X[1] - $[1]) * V;
2588
- T = L(T, Math.sqrt(F / V)), R = [(q[0] + O[0]) / 2, (q[1] + O[1]) / 2], k = [($[0] + X[0]) / 2, ($[1] + X[1]) / 2];
2589
- } else if (c.touch0) R = c.touch0[0], k = c.touch0[1];
2581
+ var Y = c.touch0[0], $ = c.touch0[1], P = c.touch1[0], W = c.touch1[1], F = (F = P[0] - Y[0]) * F + (F = P[1] - Y[1]) * F, j = (j = W[0] - $[0]) * j + (j = W[1] - $[1]) * j;
2582
+ T = k(T, Math.sqrt(F / j)), R = [(Y[0] + P[0]) / 2, (Y[1] + P[1]) / 2], B = [($[0] + W[0]) / 2, ($[1] + W[1]) / 2];
2583
+ } else if (c.touch0) R = c.touch0[0], B = c.touch0[1];
2590
2584
  else return;
2591
- c.zoom("touch", n(D(T, R, k), c.extent, a));
2585
+ c.zoom("touch", n(U(T, R, B), c.extent, a));
2592
2586
  }
2593
2587
  }
2594
- function W(_, ...y) {
2588
+ function q(_, ...v) {
2595
2589
  if (this.__zooming) {
2596
- var c = E(this, y).event(_), g = _.changedTouches, v = g.length, b, T;
2597
- for (be(_), d && clearTimeout(d), d = setTimeout(function() {
2590
+ var c = x(this, v).event(_), g = _.changedTouches, y = g.length, b, T;
2591
+ for (we(_), d && clearTimeout(d), d = setTimeout(function() {
2598
2592
  d = null;
2599
- }, p), b = 0; b < v; ++b)
2593
+ }, p), b = 0; b < y; ++b)
2600
2594
  T = g[b], c.touch0 && c.touch0[2] === T.identifier ? delete c.touch0 : c.touch1 && c.touch1[2] === T.identifier && delete c.touch1;
2601
2595
  if (c.touch1 && !c.touch0 && (c.touch0 = c.touch1, delete c.touch1), c.touch0) c.touch0[1] = this.__zoom.invert(c.touch0[0]);
2602
2596
  else if (c.end(), c.taps === 2 && (T = dt(T, this), Math.hypot(h[0] - T[0], h[1] - T[1]) < A)) {
@@ -2627,12 +2621,12 @@ function ql() {
2627
2621
  var _ = u.on.apply(u, arguments);
2628
2622
  return _ === u ? m : _;
2629
2623
  }, m.clickDistance = function(_) {
2630
- return arguments.length ? (I = (_ = +_) * _, m) : Math.sqrt(I);
2624
+ return arguments.length ? (E = (_ = +_) * _, m) : Math.sqrt(E);
2631
2625
  }, m.tapDistance = function(_) {
2632
2626
  return arguments.length ? (A = +_, m) : A;
2633
2627
  }, m;
2634
2628
  }
2635
- const Yl = /* @__PURE__ */ Lt({
2629
+ const ql = /* @__PURE__ */ Lt({
2636
2630
  __name: "scatterplot",
2637
2631
  props: {
2638
2632
  pointCount: { type: Number, default: 5e3 },
@@ -2652,41 +2646,41 @@ const Yl = /* @__PURE__ */ Lt({
2652
2646
  emits: ["updateColorMap"],
2653
2647
  setup(t, { emit: e }) {
2654
2648
  const n = t, r = S(null), o = S(null), i = S(null), a = S(null);
2655
- let l = null, s = null, u = null, f = [], h = null, d = null, p = null, w = 0, I = 0, A = 1;
2649
+ let l = null, s = null, u = null, f = [], h = null, d = null, p = null, w = 0, E = 0, A = 1;
2656
2650
  function m(c) {
2657
2651
  if (!c || c.length < 7) return [1, 0, 0];
2658
- const g = parseInt(c.slice(1, 3), 16) / 255, v = parseInt(c.slice(3, 5), 16) / 255, b = parseInt(c.slice(5, 7), 16) / 255;
2659
- return [g, v, b].some(Number.isNaN) ? [1, 0, 0] : [g, v, b];
2652
+ const g = parseInt(c.slice(1, 3), 16) / 255, y = parseInt(c.slice(3, 5), 16) / 255, b = parseInt(c.slice(5, 7), 16) / 255;
2653
+ return [g, y, b].some(Number.isNaN) ? [1, 0, 0] : [g, y, b];
2660
2654
  }
2661
- const L = (c, g, v) => c + (g - c) * v;
2662
- function D(c, g) {
2663
- const v = c.parentElement;
2664
- v && (A = window.devicePixelRatio || 1, w = v.clientWidth || 800, I = v.clientHeight || 400, c.style.width = `${w}px`, c.style.height = `${I}px`, c.width = Math.round(w * A), c.height = Math.round(I * A), g.viewport(0, 0, c.width, c.height));
2655
+ const k = (c, g, y) => c + (g - c) * y;
2656
+ function U(c, g) {
2657
+ const y = c.parentElement;
2658
+ y && (A = window.devicePixelRatio || 1, w = y.clientWidth || 800, E = y.clientHeight || 400, c.style.width = `${w}px`, c.style.height = `${E}px`, c.width = Math.round(w * A), c.height = Math.round(E * A), g.viewport(0, 0, c.width, c.height));
2665
2659
  }
2666
- function H(c, g, v, b, T) {
2667
- if (!v) return { x: 0, y: 0 };
2668
- const R = c / b * 2, k = -(g / T * 2), q = n.metaData?.row_groups?.[0]?.columns?.[0]?.meta_data?.statistics, $ = 2 / Math.max(1e-9, (q?.max_value ?? 1) - (q?.min_value ?? -1)), O = v.x / b * 2 - 1, X = -v.y / T * 2 + 1, F = v.k * $, V = (R - O - 1) / F, Q = (k - X + 1) / F;
2669
- return { x: V, y: Q };
2660
+ function H(c, g, y, b, T) {
2661
+ if (!y) return { x: 0, y: 0 };
2662
+ const R = c / b * 2, B = -(g / T * 2), Y = n.metaData?.row_groups?.[0]?.columns?.[0]?.meta_data?.statistics, $ = 2 / Math.max(1e-9, (Y?.max_value ?? 1) - (Y?.min_value ?? -1)), P = y.x / b * 2 - 1, W = -y.y / T * 2 + 1, F = y.k * $, j = (R - P - 1) / F, Q = (B - W + 1) / F;
2663
+ return { x: j, y: Q };
2670
2664
  }
2671
- function x(c, g, v, b, T, R) {
2665
+ function M(c, g, y, b, T, R) {
2672
2666
  if (!c.length || !b) return null;
2673
- const k = H(g, v, b, T, R);
2674
- let q = 1 / 0, $ = null;
2675
- for (const O of c) {
2676
- const X = O.x - k.x, F = O.y - k.y, V = Math.hypot(X, F), Q = 3 / (b.k / 2);
2677
- V < q && V < Q && (q = V, $ = O);
2667
+ const B = H(g, y, b, T, R);
2668
+ let Y = 1 / 0, $ = null;
2669
+ for (const P of c) {
2670
+ const W = P.x - B.x, F = P.y - B.y, j = Math.hypot(W, F), Q = 3 / (b.k / 2);
2671
+ j < Y && j < Q && (Y = j, $ = P);
2678
2672
  }
2679
2673
  return $ && a.value && (a.value.innerHTML = `
2680
- Mouse: (${g.toFixed(2)}, ${v.toFixed(2)})<br/>
2681
- Data: (${k.x.toFixed(2)}, ${k.y.toFixed(2)})<br/>
2674
+ Mouse: (${g.toFixed(2)}, ${y.toFixed(2)})<br/>
2675
+ Data: (${B.x.toFixed(2)}, ${B.y.toFixed(2)})<br/>
2682
2676
  Scale: ${b.k.toFixed(2)}
2683
2677
  `), $;
2684
2678
  }
2685
- function E(c, g, v, b, T) {
2686
- const R = m(v), k = m(b), q = m(T), $ = ["#4269d0", "#efb118", "#ff725c", "#6cc5b0", "#3ca951", "#ff8ab7", "#a463f2", "#97bbf5", "#9c6b4e", "#9498a0"].map(m), O = /* @__PURE__ */ new Map(), X = [];
2679
+ function x(c, g, y, b, T) {
2680
+ const R = m(y), B = m(b), Y = m(T), $ = ["#4269d0", "#efb118", "#ff725c", "#6cc5b0", "#3ca951", "#ff8ab7", "#a463f2", "#97bbf5", "#9c6b4e", "#9498a0"].map(m), P = /* @__PURE__ */ new Map(), W = [];
2687
2681
  for (let F = 0; F < n.data.length; F++) {
2688
- const V = n.data[F], Q = V[0], gt = V[1], It = Math.round(Math.sqrt(Q * Q + gt * gt) * 10) / 10;
2689
- O.has(V[5]) || O.set(V[5], $[F % $.length]);
2682
+ const j = n.data[F], Q = j[0], gt = j[1], It = Math.round(Math.sqrt(Q * Q + gt * gt) * 10) / 10;
2683
+ P.has(j[5]) || P.set(j[5], $[F % $.length]);
2690
2684
  let ut;
2691
2685
  switch (g) {
2692
2686
  case "random":
@@ -2695,118 +2689,118 @@ const Yl = /* @__PURE__ */ Lt({
2695
2689
  case "gradient": {
2696
2690
  const Mt = (Q + 50) / 100;
2697
2691
  ut = [
2698
- L(R[0], k[0], Mt),
2699
- L(R[1], k[1], Mt),
2700
- L(R[2], k[2], Mt)
2692
+ k(R[0], B[0], Mt),
2693
+ k(R[1], B[1], Mt),
2694
+ k(R[2], B[2], Mt)
2701
2695
  ];
2702
2696
  break;
2703
2697
  }
2704
2698
  case "single":
2705
- ut = [...q];
2699
+ ut = [...Y];
2706
2700
  break;
2707
2701
  case "Type":
2708
- ut = [...O.get(V[5]) || [1, 1, 1]];
2702
+ ut = [...P.get(j[5]) || [1, 1, 1]];
2709
2703
  break;
2710
2704
  default:
2711
2705
  ut = [Math.random(), Math.random(), Math.random()];
2712
2706
  }
2713
- X.push({
2707
+ W.push({
2714
2708
  x: Q,
2715
2709
  y: gt,
2716
2710
  rawX: Q,
2717
2711
  rawY: gt,
2718
2712
  color: ut,
2719
2713
  id: F,
2720
- species: V[4],
2714
+ species: j[4],
2721
2715
  value: It,
2722
2716
  label: `Point ${F + 1}: (${parseFloat(Q).toFixed(2)}, ${parseFloat(gt).toFixed(2)})`,
2723
2717
  category: It < 25 ? "Near" : It < 50 ? "Medium" : "Far"
2724
2718
  });
2725
2719
  }
2726
- return X;
2720
+ return W;
2727
2721
  }
2728
- function M(c) {
2722
+ function I(c) {
2729
2723
  const g = {
2730
2724
  preserveDrawingBuffer: !0,
2731
2725
  antialias: !0,
2732
2726
  alpha: !0
2733
- }, v = c.getContext("webgl", g) || c.getContext("experimental-webgl", g);
2734
- return v ? (v.clearColor(0, 0, 0, 1), v.enable(v.BLEND), v.blendFunc(v.SRC_ALPHA, v.ONE_MINUS_SRC_ALPHA), v.disable(v.DEPTH_TEST), v) : (console.error("WebGL not supported"), null);
2727
+ }, y = c.getContext("webgl", g) || c.getContext("experimental-webgl", g);
2728
+ return y ? (y.clearColor(0, 0, 0, 1), y.enable(y.BLEND), y.blendFunc(y.SRC_ALPHA, y.ONE_MINUS_SRC_ALPHA), y.disable(y.DEPTH_TEST), y) : (console.error("WebGL not supported"), null);
2735
2729
  }
2736
- function N(c, g, v) {
2730
+ function N(c, g, y) {
2737
2731
  const b = c.createShader(c.VERTEX_SHADER);
2738
2732
  if (c.shaderSource(b, g), c.compileShader(b), !c.getShaderParameter(b, c.COMPILE_STATUS))
2739
2733
  return console.error("Vertex shader error:", c.getShaderInfoLog(b)), null;
2740
2734
  const T = c.createShader(c.FRAGMENT_SHADER);
2741
- if (c.shaderSource(T, v), c.compileShader(T), !c.getShaderParameter(T, c.COMPILE_STATUS))
2735
+ if (c.shaderSource(T, y), c.compileShader(T), !c.getShaderParameter(T, c.COMPILE_STATUS))
2742
2736
  return console.error("Fragment shader error:", c.getShaderInfoLog(T)), null;
2743
2737
  const R = c.createProgram();
2744
2738
  return c.attachShader(R, b), c.attachShader(R, T), c.linkProgram(R), c.getProgramParameter(R, c.LINK_STATUS) ? (c.validateProgram(R), c.getProgramParameter(R, c.VALIDATE_STATUS) ? R : (console.error("Program validate error:", c.getProgramInfoLog(R)), null)) : (console.error("Program link error:", c.getProgramInfoLog(R)), null);
2745
2739
  }
2746
- function C(c, g, v) {
2747
- if (!v.length) return null;
2740
+ function C(c, g, y) {
2741
+ if (!y.length) return null;
2748
2742
  const b = c.createBuffer();
2749
2743
  c.bindBuffer(c.ARRAY_BUFFER, b);
2750
- const T = new Float32Array(v.flatMap((F) => [F.x, F.y]));
2744
+ const T = new Float32Array(y.flatMap((F) => [F.x, F.y]));
2751
2745
  c.bufferData(c.ARRAY_BUFFER, T, c.STATIC_DRAW);
2752
2746
  const R = c.createBuffer();
2753
2747
  c.bindBuffer(c.ARRAY_BUFFER, R);
2754
- const k = new Float32Array(v.flatMap((F) => F.color));
2755
- c.bufferData(c.ARRAY_BUFFER, k, c.STATIC_DRAW);
2756
- const q = c.getAttribLocation(g, "a_position"), $ = c.getAttribLocation(g, "a_color"), O = c.getUniformLocation(g, "u_viewMatrix"), X = c.getUniformLocation(g, "u_pointSize");
2757
- return q === -1 || $ === -1 || !O || !X ? (console.error("Failed to lookup attrib/uniform locations"), null) : {
2748
+ const B = new Float32Array(y.flatMap((F) => F.color));
2749
+ c.bufferData(c.ARRAY_BUFFER, B, c.STATIC_DRAW);
2750
+ const Y = c.getAttribLocation(g, "a_position"), $ = c.getAttribLocation(g, "a_color"), P = c.getUniformLocation(g, "u_viewMatrix"), W = c.getUniformLocation(g, "u_pointSize");
2751
+ return Y === -1 || $ === -1 || !P || !W ? (console.error("Failed to lookup attrib/uniform locations"), null) : {
2758
2752
  program: g,
2759
2753
  positionBuffer: b,
2760
2754
  colorBuffer: R,
2761
- positionAttributeLocation: q,
2755
+ positionAttributeLocation: Y,
2762
2756
  colorAttributeLocation: $,
2763
- viewMatrixLocation: O,
2764
- pointSizeLocation: X,
2765
- count: v.length
2757
+ viewMatrixLocation: P,
2758
+ pointSizeLocation: W,
2759
+ count: y.length
2766
2760
  };
2767
2761
  }
2768
- function U(c, g, v, b, T = null) {
2769
- if (!c || !g || !v) return;
2762
+ function L(c, g, y, b, T = null) {
2763
+ if (!c || !g || !y) return;
2770
2764
  const {
2771
2765
  program: R,
2772
- positionBuffer: k,
2773
- colorBuffer: q,
2766
+ positionBuffer: B,
2767
+ colorBuffer: Y,
2774
2768
  positionAttributeLocation: $,
2775
- colorAttributeLocation: O,
2776
- viewMatrixLocation: X,
2769
+ colorAttributeLocation: P,
2770
+ viewMatrixLocation: W,
2777
2771
  pointSizeLocation: F,
2778
- count: V
2772
+ count: j
2779
2773
  } = g;
2780
- c.clearColor(0, 0, 0, 1), c.clear(c.COLOR_BUFFER_BIT), c.useProgram(R), c.enableVertexAttribArray($), c.bindBuffer(c.ARRAY_BUFFER, k), c.vertexAttribPointer($, 2, c.FLOAT, !1, 0, 0), c.enableVertexAttribArray(O), c.bindBuffer(c.ARRAY_BUFFER, q), c.vertexAttribPointer(O, 3, c.FLOAT, !1, 0, 0);
2781
- const Q = c.canvas.clientWidth, gt = c.canvas.clientHeight, It = n.metaData?.row_groups?.[0]?.columns?.[0]?.meta_data?.statistics, ut = n.metaData?.row_groups?.[0]?.columns?.[1]?.meta_data?.statistics, Mt = Number(It?.min_value ?? -1), Xe = Number(It?.max_value ?? 1), He = Number(ut?.min_value ?? -1), We = Number(ut?.max_value ?? 1), gr = (Mt + Xe) / 2, vr = (He + We) / 2, yr = Math.max(1e-9, Xe - Mt), wr = Math.max(1e-9, We - He), br = 2 / Math.max(yr, wr), Ar = v.x / Q * 2 - 1, Er = -v.y / gt * 2 + 1, Ht = v.k * br, Tr = Ar - Ht * gr, Ir = Er - Ht * vr, Mr = new Float32Array([
2782
- Ht,
2774
+ c.clearColor(0, 0, 0, 1), c.clear(c.COLOR_BUFFER_BIT), c.useProgram(R), c.enableVertexAttribArray($), c.bindBuffer(c.ARRAY_BUFFER, B), c.vertexAttribPointer($, 2, c.FLOAT, !1, 0, 0), c.enableVertexAttribArray(P), c.bindBuffer(c.ARRAY_BUFFER, Y), c.vertexAttribPointer(P, 3, c.FLOAT, !1, 0, 0);
2775
+ const Q = c.canvas.clientWidth, gt = c.canvas.clientHeight, It = n.metaData?.row_groups?.[0]?.columns?.[0]?.meta_data?.statistics, ut = n.metaData?.row_groups?.[0]?.columns?.[1]?.meta_data?.statistics, Mt = Number(It?.min_value ?? -1), Ge = Number(It?.max_value ?? 1), Xe = Number(ut?.min_value ?? -1), We = Number(ut?.max_value ?? 1), mr = (Mt + Ge) / 2, gr = (Xe + We) / 2, vr = Math.max(1e-9, Ge - Mt), yr = Math.max(1e-9, We - Xe), wr = 2 / Math.max(vr, yr), br = y.x / Q * 2 - 1, Ar = -y.y / gt * 2 + 1, Wt = y.k * wr, Er = br - Wt * mr, Tr = Ar - Wt * gr, Ir = new Float32Array([
2776
+ Wt,
2783
2777
  0,
2784
2778
  0,
2785
2779
  0,
2786
2780
  0,
2787
- Ht,
2781
+ Wt,
2788
2782
  0,
2789
2783
  0,
2790
2784
  0,
2791
2785
  0,
2792
2786
  1,
2793
2787
  0,
2788
+ Er,
2794
2789
  Tr,
2795
- Ir,
2796
2790
  0,
2797
2791
  1
2798
2792
  ]);
2799
- if (c.uniformMatrix4fv(X, !1, Mr), c.uniform1f(F, b * Math.sqrt(v.k) * A), c.enable(c.BLEND), c.blendFunc(c.SRC_ALPHA, c.ONE_MINUS_SRC_ALPHA), c.drawArrays(c.POINTS, 0, V), T) {
2793
+ if (c.uniformMatrix4fv(W, !1, Ir), c.uniform1f(F, b * Math.sqrt(y.k) * A), c.enable(c.BLEND), c.blendFunc(c.SRC_ALPHA, c.ONE_MINUS_SRC_ALPHA), c.drawArrays(c.POINTS, 0, j), T) {
2794
+ const He = c.createBuffer();
2795
+ c.bindBuffer(c.ARRAY_BUFFER, He), c.bufferData(c.ARRAY_BUFFER, new Float32Array([T.x, T.y]), c.STATIC_DRAW), c.vertexAttribPointer($, 2, c.FLOAT, !1, 0, 0);
2800
2796
  const Qe = c.createBuffer();
2801
- c.bindBuffer(c.ARRAY_BUFFER, Qe), c.bufferData(c.ARRAY_BUFFER, new Float32Array([T.x, T.y]), c.STATIC_DRAW), c.vertexAttribPointer($, 2, c.FLOAT, !1, 0, 0);
2797
+ c.bindBuffer(c.ARRAY_BUFFER, Qe), c.bufferData(c.ARRAY_BUFFER, new Float32Array([1, 1, 0.5]), c.STATIC_DRAW), c.vertexAttribPointer(P, 3, c.FLOAT, !1, 0, 0), c.uniform1f(F, b * Math.sqrt(y.k) * 2.5 * A), c.drawArrays(c.POINTS, 0, 1);
2802
2798
  const Ke = c.createBuffer();
2803
- c.bindBuffer(c.ARRAY_BUFFER, Ke), c.bufferData(c.ARRAY_BUFFER, new Float32Array([1, 1, 0.5]), c.STATIC_DRAW), c.vertexAttribPointer(O, 3, c.FLOAT, !1, 0, 0), c.uniform1f(F, b * Math.sqrt(v.k) * 2.5 * A), c.drawArrays(c.POINTS, 0, 1);
2804
- const Je = c.createBuffer();
2805
- c.bindBuffer(c.ARRAY_BUFFER, Je), c.bufferData(c.ARRAY_BUFFER, new Float32Array([1, 0.8, 0.2]), c.STATIC_DRAW), c.vertexAttribPointer(O, 3, c.FLOAT, !1, 0, 0), c.uniform1f(F, b * Math.sqrt(v.k) * 3 * A), c.drawArrays(c.POINTS, 0, 1), c.deleteBuffer(Qe), c.deleteBuffer(Ke), c.deleteBuffer(Je);
2799
+ c.bindBuffer(c.ARRAY_BUFFER, Ke), c.bufferData(c.ARRAY_BUFFER, new Float32Array([1, 0.8, 0.2]), c.STATIC_DRAW), c.vertexAttribPointer(P, 3, c.FLOAT, !1, 0, 0), c.uniform1f(F, b * Math.sqrt(y.k) * 3 * A), c.drawArrays(c.POINTS, 0, 1), c.deleteBuffer(He), c.deleteBuffer(Qe), c.deleteBuffer(Ke);
2806
2800
  }
2807
2801
  }
2808
- function P() {
2809
- !o.value || !r.value || (l = M(o.value), !l) || (D(o.value, l), s = N(l, `
2802
+ function O() {
2803
+ !o.value || !r.value || (l = I(o.value), !l) || (U(o.value, l), s = N(l, `
2810
2804
  attribute vec2 a_position;
2811
2805
  attribute vec3 a_color;
2812
2806
  uniform mat4 u_viewMatrix;
@@ -2829,19 +2823,19 @@ const Yl = /* @__PURE__ */ Lt({
2829
2823
  }
2830
2824
  gl_FragColor = vec4(v_color, alpha);
2831
2825
  }
2832
- `), !s) || (l.useProgram(s), f = E(n.pointCount, n.colorMode, n.startColor, n.endColor, n.singleColor), u = C(l, s, f), u && (h = de.translate(w / 2, I / 2).scale(1), d = ql().scaleExtent([0.1, 100]).on("zoom", (c) => {
2833
- if (h = c.transform, U(l, u, h, 2, p), a.value) {
2834
- const [g, v] = dt(c, o.value), b = H(g, v, h, w, I);
2826
+ `), !s) || (l.useProgram(s), f = x(n.pointCount, n.colorMode, n.startColor, n.endColor, n.singleColor), u = C(l, s, f), u && (h = he.translate(w / 2, E / 2).scale(1), d = Pl().scaleExtent([0.1, 100]).on("zoom", (c) => {
2827
+ if (h = c.transform, L(l, u, h, 2, p), a.value) {
2828
+ const [g, y] = dt(c, o.value), b = H(g, y, h, w, E);
2835
2829
  a.value.innerHTML = `Scale: ${h.k.toFixed(2)}<br/>Translation: (${h.x.toFixed(0)}, ${h.y.toFixed(0)})<br/>Data at cursor: (${b.x.toFixed(2)}, ${b.y.toFixed(2)})`;
2836
2830
  }
2837
- }), ct(o.value).call(d), requestAnimationFrame(() => U(l, u, h, 2, null)), j()));
2831
+ }), ct(o.value).call(d), requestAnimationFrame(() => L(l, u, h, 2, null)), G()));
2838
2832
  }
2839
- function j() {
2840
- !o.value || !i.value || (o.value.addEventListener("mousemove", W), o.value.addEventListener("mouseleave", _));
2833
+ function G() {
2834
+ !o.value || !i.value || (o.value.addEventListener("mousemove", q), o.value.addEventListener("mouseleave", _));
2841
2835
  }
2842
- function W(c) {
2836
+ function q(c) {
2843
2837
  if (!o.value) return;
2844
- const g = o.value.getBoundingClientRect(), v = c.clientX - g.left, b = c.clientY - g.top, T = x(f, v, b, h, w, I);
2838
+ const g = o.value.getBoundingClientRect(), y = c.clientX - g.left, b = c.clientY - g.top, T = M(f, y, b, h, w, E);
2845
2839
  if (T) {
2846
2840
  const R = i.value;
2847
2841
  R.style.left = `${c.clientX + 15}px`, R.style.top = `${c.clientY - 15}px`, R.style.opacity = "1", R.innerHTML = `
@@ -2849,20 +2843,20 @@ const Yl = /* @__PURE__ */ Lt({
2849
2843
  Species: ${T.species}<br/>
2850
2844
  Distance: ${T.value.toFixed(2)}<br/>
2851
2845
  Category: ${T.category}
2852
- `, p = T, U(l, u, h, 2, p);
2846
+ `, p = T, L(l, u, h, 2, p);
2853
2847
  } else
2854
- i.value && (i.value.style.opacity = "0"), p !== null && (p = null, U(l, u, h, 2, null));
2848
+ i.value && (i.value.style.opacity = "0"), p !== null && (p = null, L(l, u, h, 2, null));
2855
2849
  }
2856
2850
  function _() {
2857
- i.value && (i.value.style.opacity = "0"), p !== null && (p = null, U(l, u, h, 2, null));
2851
+ i.value && (i.value.style.opacity = "0"), p !== null && (p = null, L(l, u, h, 2, null));
2858
2852
  }
2859
- function y() {
2860
- !o.value || !l || (D(o.value, l), U(l, u, h, 2, p));
2853
+ function v() {
2854
+ !o.value || !l || (U(o.value, l), L(l, u, h, 2, p));
2861
2855
  }
2862
2856
  return J(() => n.forceRegenerate, () => {
2863
- !l || !s || (f = E(n.pointCount, n.colorMode, n.startColor, n.endColor, n.singleColor), u && (l.deleteBuffer(u.positionBuffer), l.deleteBuffer(u.colorBuffer)), u = C(l, s, f), h = de, o.value && d && ct(o.value).call(d.transform, h), U(l, u, h, 2, null));
2857
+ !l || !s || (f = x(n.pointCount, n.colorMode, n.startColor, n.endColor, n.singleColor), u && (l.deleteBuffer(u.positionBuffer), l.deleteBuffer(u.colorBuffer)), u = C(l, s, f), h = he, o.value && d && ct(o.value).call(d.transform, h), L(l, u, h, 2, null));
2864
2858
  }), J(() => n.data, () => {
2865
- P();
2859
+ O();
2866
2860
  }), J(() => n.colorMode, () => {
2867
2861
  if (!l || !u || !f.length) return;
2868
2862
  let c = 0;
@@ -2872,47 +2866,47 @@ const Yl = /* @__PURE__ */ Lt({
2872
2866
  c = T - 1;
2873
2867
  break;
2874
2868
  }
2875
- const v = new Float32Array(n.data.flatMap((T) => n.colorMap.get(T[c])));
2869
+ const y = new Float32Array(n.data.flatMap((T) => n.colorMap.get(T[c])));
2876
2870
  l.deleteBuffer(u.colorBuffer);
2877
2871
  const b = l.createBuffer();
2878
- l.bindBuffer(l.ARRAY_BUFFER, b), l.bufferData(l.ARRAY_BUFFER, v, l.STATIC_DRAW), u.colorBuffer = b, U(l, u, h, 2, p);
2872
+ l.bindBuffer(l.ARRAY_BUFFER, b), l.bufferData(l.ARRAY_BUFFER, y, l.STATIC_DRAW), u.colorBuffer = b, L(l, u, h, 2, p);
2879
2873
  }), J([() => n.startColor, () => n.endColor, () => n.singleColor], () => {
2880
2874
  if (["species", "sex"].includes(n.colorMode) || !l || !u) return;
2881
- f = E(n.pointCount, n.colorMode, n.startColor, n.endColor, n.singleColor), l.deleteBuffer(u.colorBuffer);
2875
+ f = x(n.pointCount, n.colorMode, n.startColor, n.endColor, n.singleColor), l.deleteBuffer(u.colorBuffer);
2882
2876
  const c = l.createBuffer();
2883
2877
  l.bindBuffer(l.ARRAY_BUFFER, c);
2884
- const g = new Float32Array(f.flatMap((v) => v.color));
2885
- l.bufferData(l.ARRAY_BUFFER, g, l.STATIC_DRAW), u.colorBuffer = c, U(l, u, h, 2, p);
2878
+ const g = new Float32Array(f.flatMap((y) => y.color));
2879
+ l.bufferData(l.ARRAY_BUFFER, g, l.STATIC_DRAW), u.colorBuffer = c, L(l, u, h, 2, p);
2886
2880
  }), J(() => n.pointCount, (c) => {
2887
- !l || !s || Math.abs(c - f.length) <= 10 || (f = E(c, n.colorMode, n.startColor, n.endColor, n.singleColor), u && (l.deleteBuffer(u.positionBuffer), l.deleteBuffer(u.colorBuffer)), u = C(l, s, f), U(l, u, h, 2, null));
2888
- }), Ue(() => {
2889
- window.addEventListener("resize", y);
2890
- }), xr(() => {
2891
- o.value && (o.value.removeEventListener("mousemove", W), o.value.removeEventListener("mouseleave", _)), window.removeEventListener("resize", y), l && u && (l.deleteBuffer(u.positionBuffer), l.deleteBuffer(u.colorBuffer), s && l.deleteProgram(s));
2892
- }), (c, g) => (z(), Y("div", {
2881
+ !l || !s || Math.abs(c - f.length) <= 10 || (f = x(c, n.colorMode, n.startColor, n.endColor, n.singleColor), u && (l.deleteBuffer(u.positionBuffer), l.deleteBuffer(u.colorBuffer)), u = C(l, s, f), L(l, u, h, 2, null));
2882
+ }), Be(() => {
2883
+ window.addEventListener("resize", v);
2884
+ }), Mr(() => {
2885
+ o.value && (o.value.removeEventListener("mousemove", q), o.value.removeEventListener("mouseleave", _)), window.removeEventListener("resize", v), l && u && (l.deleteBuffer(u.positionBuffer), l.deleteBuffer(u.colorBuffer), s && l.deleteProgram(s));
2886
+ }), (c, g) => (z(), V("div", {
2893
2887
  class: "scatterplot-container",
2894
2888
  ref_key: "containerRef",
2895
2889
  ref: r
2896
2890
  }, [
2897
- B("canvas", {
2891
+ D("canvas", {
2898
2892
  ref_key: "canvasRef",
2899
2893
  ref: o
2900
2894
  }, null, 512),
2901
- B("div", {
2895
+ D("div", {
2902
2896
  id: "tooltip",
2903
2897
  ref_key: "tooltipRef",
2904
2898
  ref: i
2905
2899
  }, null, 512),
2906
- De(B("div", {
2900
+ De(D("div", {
2907
2901
  id: "debug",
2908
2902
  ref_key: "debugRef",
2909
2903
  ref: a
2910
2904
  }, null, 512), [
2911
- [Rr, !1]
2905
+ [xr, !1]
2912
2906
  ])
2913
2907
  ], 512));
2914
2908
  }
2915
- }), Vl = /* @__PURE__ */ jt(Yl, [["__scopeId", "data-v-4779cd2a"]]), jl = { class: "control-panel" }, Gl = { class: "color-option" }, Xl = ["value"], Hl = { class: "color-option" }, Wl = { class: "legend" }, Ql = { class: "legend-label" }, Kl = /* @__PURE__ */ Lt({
2909
+ }), zl = /* @__PURE__ */ jt(ql, [["__scopeId", "data-v-4779cd2a"]]), Yl = { class: "control-panel" }, Vl = { class: "color-option" }, jl = ["value"], Gl = { class: "color-option" }, Xl = { class: "legend" }, Wl = { class: "legend-label" }, Hl = /* @__PURE__ */ Lt({
2916
2910
  __name: "control",
2917
2911
  props: {
2918
2912
  pointCount: {
@@ -2979,40 +2973,40 @@ const Yl = /* @__PURE__ */ Lt({
2979
2973
  f();
2980
2974
  }), J(o, (h) => {
2981
2975
  r("update:pointCount", h);
2982
- }), (h, d) => (z(), Y("div", jl, [
2983
- d[3] || (d[3] = B("h3", null, "Color Controls", -1)),
2984
- B("div", Gl, [
2985
- d[1] || (d[1] = B("label", { for: "colorMode" }, "Color Mode:", -1)),
2986
- De(B("select", {
2976
+ }), (h, d) => (z(), V("div", Yl, [
2977
+ d[3] || (d[3] = D("h3", null, "Color Controls", -1)),
2978
+ D("div", Vl, [
2979
+ d[1] || (d[1] = D("label", { for: "colorMode" }, "Color Mode:", -1)),
2980
+ De(D("select", {
2987
2981
  id: "colorMode",
2988
2982
  "onUpdate:modelValue": d[0] || (d[0] = (p) => i.value = p)
2989
2983
  }, [
2990
- (z(!0), Y(_t, null, xt(n.colorMapMap, ([p, w], I) => (z(), Y("option", {
2984
+ (z(!0), V(_t, null, xt(n.colorMapMap, ([p, w], E) => (z(), V("option", {
2991
2985
  key: p,
2992
2986
  value: p
2993
- }, ot(p), 9, Xl))), 128))
2987
+ }, ot(p), 9, jl))), 128))
2994
2988
  ], 512), [
2995
- [Nr, i.value]
2989
+ [Rr, i.value]
2996
2990
  ])
2997
2991
  ]),
2998
- B("div", Hl, [
2999
- B("div", Wl, [
3000
- d[2] || (d[2] = B("h4", null, " Legend", -1)),
3001
- (z(!0), Y(_t, null, xt(t.colorScheme, (p, w) => (z(), Y("div", {
2992
+ D("div", Gl, [
2993
+ D("div", Xl, [
2994
+ d[2] || (d[2] = D("h4", null, " Legend", -1)),
2995
+ (z(!0), V(_t, null, xt(t.colorScheme, (p, w) => (z(), V("div", {
3002
2996
  class: "legend-item",
3003
2997
  key: w
3004
2998
  }, [
3005
- B("div", {
2999
+ D("div", {
3006
3000
  class: "legend-color",
3007
- style: Sr({ backgroundColor: u(p[1]) })
3001
+ style: Nr({ backgroundColor: u(p[1]) })
3008
3002
  }, null, 4),
3009
- B("div", Ql, ot(p[0]), 1)
3003
+ D("div", Wl, ot(p[0]), 1)
3010
3004
  ]))), 128))
3011
3005
  ])
3012
3006
  ])
3013
3007
  ]));
3014
3008
  }
3015
- }), Jl = /* @__PURE__ */ jt(Kl, [["__scopeId", "data-v-0a5cce16"]]), vn = [
3009
+ }), Ql = /* @__PURE__ */ jt(Hl, [["__scopeId", "data-v-0a5cce16"]]), gn = [
3016
3010
  "BOOLEAN",
3017
3011
  "INT32",
3018
3012
  "INT64",
@@ -3035,11 +3029,11 @@ const Yl = /* @__PURE__ */ Lt({
3035
3029
  "DELTA_BYTE_ARRAY",
3036
3030
  "RLE_DICTIONARY",
3037
3031
  "BYTE_STREAM_SPLIT"
3038
- ], Zl = [
3032
+ ], Kl = [
3039
3033
  "REQUIRED",
3040
3034
  "OPTIONAL",
3041
3035
  "REPEATED"
3042
- ], tu = [
3036
+ ], Jl = [
3043
3037
  "UTF8",
3044
3038
  "MAP",
3045
3039
  "MAP_KEY_VALUE",
@@ -3062,7 +3056,7 @@ const Yl = /* @__PURE__ */ Lt({
3062
3056
  "JSON",
3063
3057
  "BSON",
3064
3058
  "INTERVAL"
3065
- ], eu = [
3059
+ ], Zl = [
3066
3060
  "UNCOMPRESSED",
3067
3061
  "SNAPPY",
3068
3062
  "GZIP",
@@ -3071,12 +3065,12 @@ const Yl = /* @__PURE__ */ Lt({
3071
3065
  "LZ4",
3072
3066
  "ZSTD",
3073
3067
  "LZ4_RAW"
3074
- ], Jn = [
3068
+ ], Kn = [
3075
3069
  "DATA_PAGE",
3076
3070
  "INDEX_PAGE",
3077
3071
  "DICTIONARY_PAGE",
3078
3072
  "DATA_PAGE_V2"
3079
- ], Zn = {
3073
+ ], Jn = {
3080
3074
  timestampFromMilliseconds(t) {
3081
3075
  return new Date(Number(t));
3082
3076
  },
@@ -3090,7 +3084,7 @@ const Yl = /* @__PURE__ */ Lt({
3090
3084
  return new Date(t * 864e5);
3091
3085
  }
3092
3086
  };
3093
- function yn(t, e, n, r) {
3087
+ function vn(t, e, n, r) {
3094
3088
  if (e && n.endsWith("_DICTIONARY")) {
3095
3089
  let o = t;
3096
3090
  t instanceof Uint8Array && !(e instanceof Uint8Array) && (o = new e.constructor(t.length));
@@ -3098,20 +3092,20 @@ function yn(t, e, n, r) {
3098
3092
  o[i] = e[t[i]];
3099
3093
  return o;
3100
3094
  } else
3101
- return tr(t, r);
3095
+ return Zn(t, r);
3102
3096
  }
3103
- function tr(t, e) {
3097
+ function Zn(t, e) {
3104
3098
  const { element: n, parsers: r, utf8: o = !0 } = e, { type: i, converted_type: a, logical_type: l } = n;
3105
3099
  if (a === "DECIMAL") {
3106
3100
  const s = 10 ** -(n.scale || 0), u = new Array(t.length);
3107
3101
  for (let f = 0; f < u.length; f++)
3108
- t[0] instanceof Uint8Array ? u[f] = er(t[f]) * s : u[f] = Number(t[f]) * s;
3102
+ t[0] instanceof Uint8Array ? u[f] = tr(t[f]) * s : u[f] = Number(t[f]) * s;
3109
3103
  return u;
3110
3104
  }
3111
3105
  if (!a && i === "INT96") {
3112
3106
  const s = new Array(t.length);
3113
3107
  for (let u = 0; u < s.length; u++)
3114
- s[u] = r.timestampFromNanoseconds(nu(t[u]));
3108
+ s[u] = r.timestampFromNanoseconds(tu(t[u]));
3115
3109
  return s;
3116
3110
  }
3117
3111
  if (a === "DATE") {
@@ -3161,7 +3155,7 @@ function tr(t, e) {
3161
3155
  return s;
3162
3156
  }
3163
3157
  if (l?.type === "FLOAT16")
3164
- return Array.from(t).map(nr);
3158
+ return Array.from(t).map(er);
3165
3159
  if (l?.type === "TIMESTAMP") {
3166
3160
  const { unit: s } = l;
3167
3161
  let u = r.timestampFromMilliseconds;
@@ -3173,34 +3167,34 @@ function tr(t, e) {
3173
3167
  }
3174
3168
  return t;
3175
3169
  }
3176
- function er(t) {
3170
+ function tr(t) {
3177
3171
  let e = 0;
3178
3172
  for (const r of t)
3179
3173
  e = e * 256 + r;
3180
3174
  const n = t.length * 8;
3181
3175
  return e >= 2 ** (n - 1) && (e -= 2 ** n), e;
3182
3176
  }
3183
- function nu(t) {
3177
+ function tu(t) {
3184
3178
  const e = (t >> 64n) - 2440588n, n = t & 0xffffffffffffffffn;
3185
3179
  return e * 86400000000000n + n;
3186
3180
  }
3187
- function nr(t) {
3181
+ function er(t) {
3188
3182
  if (!t) return;
3189
3183
  const e = t[1] << 8 | t[0], n = e >> 15 ? -1 : 1, r = e >> 10 & 31, o = e & 1023;
3190
3184
  return r === 0 ? n * 2 ** -14 * (o / 1024) : r === 31 ? o ? NaN : n * (1 / 0) : n * 2 ** (r - 15) * (1 + o / 1024);
3191
3185
  }
3192
- function rr(t, e, n) {
3186
+ function nr(t, e, n) {
3193
3187
  const r = t[e], o = [];
3194
3188
  let i = 1;
3195
3189
  if (r.num_children)
3196
3190
  for (; o.length < r.num_children; ) {
3197
- const a = t[e + i], l = rr(t, e + i, [...n, a.name]);
3191
+ const a = t[e + i], l = nr(t, e + i, [...n, a.name]);
3198
3192
  i += l.count, o.push(l);
3199
3193
  }
3200
3194
  return { count: i, element: r, children: o, path: n };
3201
3195
  }
3202
- function or(t, e) {
3203
- let n = rr(t, 0, []);
3196
+ function rr(t, e) {
3197
+ let n = nr(t, 0, []);
3204
3198
  const r = [n];
3205
3199
  for (const o of e) {
3206
3200
  const i = n.children.find((a) => a.element.name === o);
@@ -3209,29 +3203,29 @@ function or(t, e) {
3209
3203
  }
3210
3204
  return r;
3211
3205
  }
3212
- function ir(t) {
3206
+ function or(t) {
3213
3207
  let e = 0;
3214
3208
  for (const { element: n } of t)
3215
3209
  n.repetition_type === "REPEATED" && e++;
3216
3210
  return e;
3217
3211
  }
3218
- function Ve(t) {
3212
+ function Ye(t) {
3219
3213
  let e = 0;
3220
3214
  for (const { element: n } of t.slice(1))
3221
3215
  n.repetition_type !== "REQUIRED" && e++;
3222
3216
  return e;
3223
3217
  }
3224
- function ru(t) {
3218
+ function eu(t) {
3225
3219
  if (!t || t.element.converted_type !== "LIST" || t.children.length > 1) return !1;
3226
3220
  const e = t.children[0];
3227
3221
  return !(e.children.length > 1 || e.element.repetition_type !== "REPEATED");
3228
3222
  }
3229
- function ou(t) {
3223
+ function nu(t) {
3230
3224
  if (!t || t.element.converted_type !== "MAP" || t.children.length > 1) return !1;
3231
3225
  const e = t.children[0];
3232
3226
  return !(e.children.length !== 2 || e.element.repetition_type !== "REPEATED" || e.children.find((n) => n.element.name === "key")?.element.repetition_type === "REPEATED" || e.children.find((n) => n.element.name === "value")?.element.repetition_type === "REPEATED");
3233
3227
  }
3234
- function iu(t) {
3228
+ function ru(t) {
3235
3229
  if (t.length !== 2) return !1;
3236
3230
  const [, e] = t;
3237
3231
  return !(e.element.repetition_type === "REPEATED" || e.children.length);
@@ -3249,11 +3243,11 @@ const K = {
3249
3243
  LIST: 9,
3250
3244
  STRUCT: 12
3251
3245
  };
3252
- function ar(t) {
3246
+ function ir(t) {
3253
3247
  let e = 0;
3254
3248
  const n = {};
3255
3249
  for (; t.offset < t.view.byteLength; ) {
3256
- const [r, o, i] = ur(t, e);
3250
+ const [r, o, i] = lr(t, e);
3257
3251
  if (e = i, r === K.STOP)
3258
3252
  break;
3259
3253
  n[`field_${o}`] = oe(t, r);
@@ -3270,9 +3264,9 @@ function oe(t, e) {
3270
3264
  return t.view.getInt8(t.offset++);
3271
3265
  case K.I16:
3272
3266
  case K.I32:
3273
- return lu(t);
3267
+ return iu(t);
3274
3268
  case K.I64:
3275
- return Le(t);
3269
+ return Ce(t);
3276
3270
  case K.DOUBLE: {
3277
3271
  const n = t.view.getFloat64(t.offset, !0);
3278
3272
  return t.offset += 8, n;
@@ -3282,7 +3276,7 @@ function oe(t, e) {
3282
3276
  return t.offset += n, r;
3283
3277
  }
3284
3278
  case K.LIST: {
3285
- const [n, r] = uu(t), o = n === K.TRUE || n === K.FALSE, i = new Array(r);
3279
+ const [n, r] = au(t), o = n === K.TRUE || n === K.FALSE, i = new Array(r);
3286
3280
  for (let a = 0; a < r; a++)
3287
3281
  i[a] = o ? oe(t, K.BYTE) === 1 : oe(t, n);
3288
3282
  return i;
@@ -3292,7 +3286,7 @@ function oe(t, e) {
3292
3286
  let r = 0;
3293
3287
  for (; ; ) {
3294
3288
  let o, i;
3295
- if ([o, i, r] = ur(t, r), o === K.STOP)
3289
+ if ([o, i, r] = lr(t, r), o === K.STOP)
3296
3290
  break;
3297
3291
  n[`field_${i}`] = oe(t, o);
3298
3292
  }
@@ -3312,7 +3306,7 @@ function Et(t) {
3312
3306
  n += 7;
3313
3307
  }
3314
3308
  }
3315
- function au(t) {
3309
+ function ou(t) {
3316
3310
  let e = 0n, n = 0n;
3317
3311
  for (; ; ) {
3318
3312
  const r = t.view.getUint8(t.offset++);
@@ -3321,18 +3315,18 @@ function au(t) {
3321
3315
  n += 7n;
3322
3316
  }
3323
3317
  }
3324
- function lu(t) {
3318
+ function iu(t) {
3325
3319
  const e = Et(t);
3326
3320
  return e >>> 1 ^ -(e & 1);
3327
3321
  }
3328
- function Le(t) {
3329
- const e = au(t);
3322
+ function Ce(t) {
3323
+ const e = ou(t);
3330
3324
  return e >> 1n ^ -(e & 1n);
3331
3325
  }
3332
- function lr(t) {
3326
+ function ar(t) {
3333
3327
  return t & 15;
3334
3328
  }
3335
- function ur(t, e) {
3329
+ function lr(t, e) {
3336
3330
  const n = t.view.getUint8(t.offset++);
3337
3331
  if ((n & 15) === K.STOP)
3338
3332
  return [0, 0, e];
@@ -3342,18 +3336,18 @@ function ur(t, e) {
3342
3336
  o = e + r;
3343
3337
  else
3344
3338
  throw new Error("non-delta field id not supported");
3345
- return [lr(n), o, o];
3339
+ return [ar(n), o, o];
3346
3340
  }
3347
- function uu(t) {
3348
- const e = t.view.getUint8(t.offset++), n = e >> 4, r = lr(e);
3341
+ function au(t) {
3342
+ const e = t.view.getUint8(t.offset++), n = e >> 4, r = ar(e);
3349
3343
  if (n === 15) {
3350
3344
  const o = Et(t);
3351
3345
  return [r, o];
3352
3346
  }
3353
3347
  return [r, n];
3354
3348
  }
3355
- const su = 1 << 19;
3356
- async function cu(t, { parsers: e, initialFetchSize: n = su } = {}) {
3349
+ const lu = 1 << 19;
3350
+ async function uu(t, { parsers: e, initialFetchSize: n = lu } = {}) {
3357
3351
  if (!t || !(t.byteLength >= 0)) throw new Error("parquet expected AsyncBuffer");
3358
3352
  const r = Math.max(0, t.byteLength - n), o = await t.slice(r, t.byteLength), i = new DataView(o);
3359
3353
  if (i.getUint32(o.byteLength - 4, !0) !== 827474256)
@@ -3363,44 +3357,44 @@ async function cu(t, { parsers: e, initialFetchSize: n = su } = {}) {
3363
3357
  throw new Error(`parquet metadata length ${a} exceeds available buffer ${t.byteLength - 8}`);
3364
3358
  if (a + 8 > n) {
3365
3359
  const l = t.byteLength - a - 8, s = await t.slice(l, r), u = new ArrayBuffer(a + 8), f = new Uint8Array(u);
3366
- return f.set(new Uint8Array(s)), f.set(new Uint8Array(o), r - l), ke(u, { parsers: e });
3360
+ return f.set(new Uint8Array(s)), f.set(new Uint8Array(o), r - l), Le(u, { parsers: e });
3367
3361
  } else
3368
- return ke(o, { parsers: e });
3362
+ return Le(o, { parsers: e });
3369
3363
  }
3370
- function ke(t, { parsers: e } = {}) {
3364
+ function Le(t, { parsers: e } = {}) {
3371
3365
  if (!(t instanceof ArrayBuffer)) throw new Error("parquet expected ArrayBuffer");
3372
3366
  const n = new DataView(t);
3373
- if (e = { ...Zn, ...e }, n.byteLength < 8)
3367
+ if (e = { ...Jn, ...e }, n.byteLength < 8)
3374
3368
  throw new Error("parquet file is too short");
3375
3369
  if (n.getUint32(n.byteLength - 4, !0) !== 827474256)
3376
3370
  throw new Error("parquet file invalid (footer != PAR1)");
3377
3371
  const r = n.byteLength - 8, o = n.getUint32(r, !0);
3378
3372
  if (o > n.byteLength - 8)
3379
3373
  throw new Error(`parquet metadata length ${o} exceeds available buffer ${n.byteLength - 8}`);
3380
- const i = r - o, a = ar({ view: n, offset: i }), l = new TextDecoder();
3374
+ const i = r - o, a = ir({ view: n, offset: i }), l = new TextDecoder();
3381
3375
  function s(A) {
3382
3376
  return A && l.decode(A);
3383
3377
  }
3384
3378
  const u = a.field_1, f = a.field_2.map((A) => ({
3385
- type: vn[A.field_1],
3379
+ type: gn[A.field_1],
3386
3380
  type_length: A.field_2,
3387
- repetition_type: Zl[A.field_3],
3381
+ repetition_type: Kl[A.field_3],
3388
3382
  name: s(A.field_4),
3389
3383
  num_children: A.field_5,
3390
- converted_type: tu[A.field_6],
3384
+ converted_type: Jl[A.field_6],
3391
3385
  scale: A.field_7,
3392
3386
  precision: A.field_8,
3393
3387
  field_id: A.field_9,
3394
- logical_type: hu(A.field_10)
3388
+ logical_type: cu(A.field_10)
3395
3389
  })), h = f.filter((A) => A.type), d = a.field_3, p = a.field_4.map((A) => ({
3396
- columns: A.field_1.map((m, L) => ({
3390
+ columns: A.field_1.map((m, k) => ({
3397
3391
  file_path: s(m.field_1),
3398
3392
  file_offset: m.field_2,
3399
3393
  meta_data: m.field_3 && {
3400
- type: vn[m.field_3.field_1],
3401
- encodings: m.field_3.field_2?.map((D) => yt[D]),
3394
+ type: gn[m.field_3.field_1],
3395
+ encodings: m.field_3.field_2?.map((U) => yt[U]),
3402
3396
  path_in_schema: m.field_3.field_3.map(s),
3403
- codec: eu[m.field_3.field_4],
3397
+ codec: Zl[m.field_3.field_4],
3404
3398
  num_values: m.field_3.field_5,
3405
3399
  total_uncompressed_size: m.field_3.field_6,
3406
3400
  total_compressed_size: m.field_3.field_7,
@@ -3408,11 +3402,11 @@ function ke(t, { parsers: e } = {}) {
3408
3402
  data_page_offset: m.field_3.field_9,
3409
3403
  index_page_offset: m.field_3.field_10,
3410
3404
  dictionary_page_offset: m.field_3.field_11,
3411
- statistics: du(m.field_3.field_12, h[L], e),
3412
- encoding_stats: m.field_3.field_13?.map((D) => ({
3413
- page_type: Jn[D.field_1],
3414
- encoding: yt[D.field_2],
3415
- count: D.field_3
3405
+ statistics: fu(m.field_3.field_12, h[k], e),
3406
+ encoding_stats: m.field_3.field_13?.map((U) => ({
3407
+ page_type: Kn[U.field_1],
3408
+ encoding: yt[U.field_2],
3409
+ count: U.field_3
3416
3410
  })),
3417
3411
  bloom_filter_offset: m.field_3.field_14,
3418
3412
  bloom_filter_length: m.field_3.field_15,
@@ -3442,21 +3436,21 @@ function ke(t, { parsers: e } = {}) {
3442
3436
  })), w = a.field_5?.map((A) => ({
3443
3437
  key: s(A.field_1),
3444
3438
  value: s(A.field_2)
3445
- })), I = s(a.field_6);
3439
+ })), E = s(a.field_6);
3446
3440
  return {
3447
3441
  version: u,
3448
3442
  schema: f,
3449
3443
  num_rows: d,
3450
3444
  row_groups: p,
3451
3445
  key_value_metadata: w,
3452
- created_by: I,
3446
+ created_by: E,
3453
3447
  metadata_length: o
3454
3448
  };
3455
3449
  }
3456
- function fu({ schema: t }) {
3457
- return or(t, [])[0];
3450
+ function su({ schema: t }) {
3451
+ return rr(t, [])[0];
3458
3452
  }
3459
- function hu(t) {
3453
+ function cu(t) {
3460
3454
  return t?.field_1 ? { type: "STRING" } : t?.field_2 ? { type: "MAP" } : t?.field_3 ? { type: "LIST" } : t?.field_4 ? { type: "ENUM" } : t?.field_5 ? {
3461
3455
  type: "DECIMAL",
3462
3456
  scale: t.field_5.field_1,
@@ -3464,24 +3458,24 @@ function hu(t) {
3464
3458
  } : t?.field_6 ? { type: "DATE" } : t?.field_7 ? {
3465
3459
  type: "TIME",
3466
3460
  isAdjustedToUTC: t.field_7.field_1,
3467
- unit: wn(t.field_7.field_2)
3461
+ unit: yn(t.field_7.field_2)
3468
3462
  } : t?.field_8 ? {
3469
3463
  type: "TIMESTAMP",
3470
3464
  isAdjustedToUTC: t.field_8.field_1,
3471
- unit: wn(t.field_8.field_2)
3465
+ unit: yn(t.field_8.field_2)
3472
3466
  } : t?.field_10 ? {
3473
3467
  type: "INTEGER",
3474
3468
  bitWidth: t.field_10.field_1,
3475
3469
  isSigned: t.field_10.field_2
3476
3470
  } : t?.field_11 ? { type: "NULL" } : t?.field_12 ? { type: "JSON" } : t?.field_13 ? { type: "BSON" } : t?.field_14 ? { type: "UUID" } : t?.field_15 ? { type: "FLOAT16" } : t;
3477
3471
  }
3478
- function wn(t) {
3472
+ function yn(t) {
3479
3473
  if (t.field_1) return "MILLIS";
3480
3474
  if (t.field_2) return "MICROS";
3481
3475
  if (t.field_3) return "NANOS";
3482
3476
  throw new Error("parquet time unit required");
3483
3477
  }
3484
- function du(t, e, n) {
3478
+ function fu(t, e, n) {
3485
3479
  return t && {
3486
3480
  max: Zt(t.field_1, e, n),
3487
3481
  min: Zt(t.field_2, e, n),
@@ -3499,22 +3493,22 @@ function Zt(t, e, n) {
3499
3493
  if (r === "BOOLEAN") return t[0] === 1;
3500
3494
  if (r === "BYTE_ARRAY") return new TextDecoder().decode(t);
3501
3495
  const a = new DataView(t.buffer, t.byteOffset, t.byteLength);
3502
- return r === "FLOAT" && a.byteLength === 4 ? a.getFloat32(0, !0) : r === "DOUBLE" && a.byteLength === 8 ? a.getFloat64(0, !0) : r === "INT32" && o === "DATE" ? n.dateFromDays(a.getInt32(0, !0)) : r === "INT64" && o === "TIMESTAMP_MILLIS" ? n.timestampFromMilliseconds(a.getBigInt64(0, !0)) : r === "INT64" && o === "TIMESTAMP_MICROS" ? n.timestampFromMicroseconds(a.getBigInt64(0, !0)) : r === "INT64" && i?.type === "TIMESTAMP" && i?.unit === "NANOS" ? n.timestampFromNanoseconds(a.getBigInt64(0, !0)) : r === "INT64" && i?.type === "TIMESTAMP" && i?.unit === "MICROS" ? n.timestampFromMicroseconds(a.getBigInt64(0, !0)) : r === "INT64" && i?.type === "TIMESTAMP" ? n.timestampFromMilliseconds(a.getBigInt64(0, !0)) : r === "INT32" && a.byteLength === 4 ? a.getInt32(0, !0) : r === "INT64" && a.byteLength === 8 ? a.getBigInt64(0, !0) : o === "DECIMAL" ? er(t) * 10 ** -(e.scale || 0) : i?.type === "FLOAT16" ? nr(t) : t;
3496
+ return r === "FLOAT" && a.byteLength === 4 ? a.getFloat32(0, !0) : r === "DOUBLE" && a.byteLength === 8 ? a.getFloat64(0, !0) : r === "INT32" && o === "DATE" ? n.dateFromDays(a.getInt32(0, !0)) : r === "INT64" && o === "TIMESTAMP_MILLIS" ? n.timestampFromMilliseconds(a.getBigInt64(0, !0)) : r === "INT64" && o === "TIMESTAMP_MICROS" ? n.timestampFromMicroseconds(a.getBigInt64(0, !0)) : r === "INT64" && i?.type === "TIMESTAMP" && i?.unit === "NANOS" ? n.timestampFromNanoseconds(a.getBigInt64(0, !0)) : r === "INT64" && i?.type === "TIMESTAMP" && i?.unit === "MICROS" ? n.timestampFromMicroseconds(a.getBigInt64(0, !0)) : r === "INT64" && i?.type === "TIMESTAMP" ? n.timestampFromMilliseconds(a.getBigInt64(0, !0)) : r === "INT32" && a.byteLength === 4 ? a.getInt32(0, !0) : r === "INT64" && a.byteLength === 8 ? a.getBigInt64(0, !0) : o === "DECIMAL" ? tr(t) * 10 ** -(e.scale || 0) : i?.type === "FLOAT16" ? er(t) : t;
3503
3497
  }
3504
- function je(t, e) {
3498
+ function Ve(t, e) {
3505
3499
  for (let n = 0; n < e.length; n += 1e4)
3506
3500
  t.push(...e.slice(n, n + 1e4));
3507
3501
  }
3508
- function sr(t) {
3502
+ function ur(t) {
3509
3503
  if (!t) return [];
3510
3504
  if (t.length === 1) return t[0];
3511
3505
  const e = [];
3512
3506
  for (const n of t)
3513
- je(e, n);
3507
+ Ve(e, n);
3514
3508
  return e;
3515
3509
  }
3516
- const pu = 1 << 25;
3517
- function _u({ metadata: t, rowStart: e = 0, rowEnd: n = 1 / 0, columns: r }) {
3510
+ const hu = 1 << 25;
3511
+ function du({ metadata: t, rowStart: e = 0, rowEnd: n = 1 / 0, columns: r }) {
3518
3512
  if (!t) throw new Error("parquetPlan requires metadata");
3519
3513
  const o = [], i = [];
3520
3514
  let a = 0;
@@ -3522,21 +3516,21 @@ function _u({ metadata: t, rowStart: e = 0, rowEnd: n = 1 / 0, columns: r }) {
3522
3516
  const s = Number(l.num_rows), u = a + s;
3523
3517
  if (s > 0 && u >= e && a < n) {
3524
3518
  const f = [];
3525
- for (const { file_path: w, meta_data: I } of l.columns) {
3519
+ for (const { file_path: w, meta_data: E } of l.columns) {
3526
3520
  if (w) throw new Error("parquet file_path not supported");
3527
- if (!I) throw new Error("parquet column metadata is undefined");
3528
- (!r || r.includes(I.path_in_schema[0])) && f.push(cr(I));
3521
+ if (!E) throw new Error("parquet column metadata is undefined");
3522
+ (!r || r.includes(E.path_in_schema[0])) && f.push(sr(E));
3529
3523
  }
3530
3524
  const h = Math.max(e - a, 0), d = Math.min(n - a, s);
3531
3525
  o.push({ ranges: f, rowGroup: l, groupStart: a, groupRows: s, selectStart: h, selectEnd: d });
3532
3526
  const p = f[f.length - 1]?.endByte - f[0]?.startByte;
3533
- if (!r && p < pu)
3527
+ if (!r && p < hu)
3534
3528
  i.push({
3535
3529
  startByte: f[0].startByte,
3536
3530
  endByte: f[f.length - 1].endByte
3537
3531
  });
3538
3532
  else if (f.length)
3539
- je(i, f);
3533
+ Ve(i, f);
3540
3534
  else if (r?.length)
3541
3535
  throw new Error(`parquet columns not found: ${r.join(", ")}`);
3542
3536
  }
@@ -3544,14 +3538,14 @@ function _u({ metadata: t, rowStart: e = 0, rowEnd: n = 1 / 0, columns: r }) {
3544
3538
  }
3545
3539
  return isFinite(n) || (n = a), { metadata: t, rowStart: e, rowEnd: n, columns: r, fetches: i, groups: o };
3546
3540
  }
3547
- function cr({ dictionary_page_offset: t, data_page_offset: e, total_compressed_size: n }) {
3541
+ function sr({ dictionary_page_offset: t, data_page_offset: e, total_compressed_size: n }) {
3548
3542
  const r = t || e;
3549
3543
  return {
3550
3544
  startByte: Number(r),
3551
3545
  endByte: Number(r + n)
3552
3546
  };
3553
3547
  }
3554
- function mu(t, { fetches: e }) {
3548
+ function pu(t, { fetches: e }) {
3555
3549
  const n = e.map(({ startByte: r, endByte: o }) => t.slice(r, o));
3556
3550
  return {
3557
3551
  byteLength: t.byteLength,
@@ -3566,10 +3560,10 @@ function mu(t, { fetches: e }) {
3566
3560
  }
3567
3561
  };
3568
3562
  }
3569
- function bn(t, e, n, r, o) {
3563
+ function wn(t, e, n, r, o) {
3570
3564
  const i = e?.length || n.length;
3571
3565
  if (!i) return r;
3572
- const a = Ve(o), l = o.map(({ element: w }) => w.repetition_type);
3566
+ const a = Ye(o), l = o.map(({ element: w }) => w.repetition_type);
3573
3567
  let s = 0;
3574
3568
  const u = [t];
3575
3569
  let f = t, h = 0, d = 0, p = 0;
@@ -3577,28 +3571,28 @@ function bn(t, e, n, r, o) {
3577
3571
  for (; h < l.length - 2 && p < n[0]; )
3578
3572
  h++, l[h] !== "REQUIRED" && (f = f.at(-1), u.push(f), d++), l[h] === "REPEATED" && p++;
3579
3573
  for (let w = 0; w < i; w++) {
3580
- const I = e?.length ? e[w] : a, A = n[w];
3574
+ const E = e?.length ? e[w] : a, A = n[w];
3581
3575
  for (; h && (A < p || l[h] !== "REPEATED"); )
3582
3576
  l[h] !== "REQUIRED" && (u.pop(), d--), l[h] === "REPEATED" && p--, h--;
3583
- for (f = u.at(-1); (h < l.length - 2 || l[h + 1] === "REPEATED") && (d < I || l[h + 1] === "REQUIRED"); ) {
3577
+ for (f = u.at(-1); (h < l.length - 2 || l[h + 1] === "REPEATED") && (d < E || l[h + 1] === "REQUIRED"); ) {
3584
3578
  if (h++, l[h] !== "REQUIRED") {
3585
3579
  const m = [];
3586
3580
  f.push(m), f = m, u.push(m), d++;
3587
3581
  }
3588
3582
  l[h] === "REPEATED" && p++;
3589
3583
  }
3590
- I === a ? f.push(r[s++]) : h === l.length - 2 ? f.push(null) : f.push([]);
3584
+ E === a ? f.push(r[s++]) : h === l.length - 2 ? f.push(null) : f.push([]);
3591
3585
  }
3592
3586
  if (!t.length)
3593
3587
  for (let w = 0; w < a; w++) {
3594
- const I = [];
3595
- f.push(I), f = I;
3588
+ const E = [];
3589
+ f.push(E), f = E;
3596
3590
  }
3597
3591
  return t;
3598
3592
  }
3599
3593
  function Ft(t, e, n = 0) {
3600
3594
  const r = e.path.join("."), o = e.element.repetition_type === "OPTIONAL", i = o ? n + 1 : n;
3601
- if (ru(e)) {
3595
+ if (eu(e)) {
3602
3596
  let a = e.children[0], l = i;
3603
3597
  a.children.length === 1 && (a = a.children[0], l++), Ft(t, a, l);
3604
3598
  const s = a.path.join("."), u = t.get(s);
@@ -3606,7 +3600,7 @@ function Ft(t, e, n = 0) {
3606
3600
  o && ie(u, n), t.set(r, u), t.delete(s);
3607
3601
  return;
3608
3602
  }
3609
- if (ou(e)) {
3603
+ if (nu(e)) {
3610
3604
  const a = e.children[0].element.name;
3611
3605
  Ft(t, e.children[0].children[0], i + 1), Ft(t, e.children[0].children[1], i + 1);
3612
3606
  const l = t.get(`${r}.${a}.key`), s = t.get(`${r}.${a}.value`);
@@ -3614,7 +3608,7 @@ function Ft(t, e, n = 0) {
3614
3608
  if (!s) throw new Error("parquet map column missing values");
3615
3609
  if (l.length !== s.length)
3616
3610
  throw new Error("parquet map column key/value length mismatch");
3617
- const u = fr(l, s, i);
3611
+ const u = cr(l, s, i);
3618
3612
  o && ie(u, n), t.delete(`${r}.${a}.key`), t.delete(`${r}.${a}.value`), t.set(r, u);
3619
3613
  return;
3620
3614
  }
@@ -3628,7 +3622,7 @@ function Ft(t, e, n = 0) {
3628
3622
  }
3629
3623
  for (const u of e.children)
3630
3624
  t.delete(u.path.join("."));
3631
- const s = hr(l, a);
3625
+ const s = fr(l, a);
3632
3626
  o && ie(s, n), t.set(r, s);
3633
3627
  }
3634
3628
  }
@@ -3636,11 +3630,11 @@ function ie(t, e) {
3636
3630
  for (let n = 0; n < t.length; n++)
3637
3631
  e ? ie(t[n], e - 1) : t[n] = t[n][0];
3638
3632
  }
3639
- function fr(t, e, n) {
3633
+ function cr(t, e, n) {
3640
3634
  const r = [];
3641
3635
  for (let o = 0; o < t.length; o++)
3642
3636
  if (n)
3643
- r.push(fr(t[o], e[o], n - 1));
3637
+ r.push(cr(t[o], e[o], n - 1));
3644
3638
  else if (t[o]) {
3645
3639
  const i = {};
3646
3640
  for (let a = 0; a < t[o].length; a++) {
@@ -3652,7 +3646,7 @@ function fr(t, e, n) {
3652
3646
  r.push(void 0);
3653
3647
  return r;
3654
3648
  }
3655
- function hr(t, e) {
3649
+ function fr(t, e) {
3656
3650
  const n = Object.keys(t), r = t[n[0]]?.length, o = [];
3657
3651
  for (let i = 0; i < r; i++) {
3658
3652
  const a = {};
@@ -3660,29 +3654,29 @@ function hr(t, e) {
3660
3654
  if (t[l].length !== r) throw new Error("parquet struct parsing error");
3661
3655
  a[l] = t[l][i];
3662
3656
  }
3663
- e ? o.push(hr(a, e - 1)) : o.push(a);
3657
+ e ? o.push(fr(a, e - 1)) : o.push(a);
3664
3658
  }
3665
3659
  return o;
3666
3660
  }
3667
3661
  function Vt(t, e, n) {
3668
3662
  const r = n instanceof Int32Array, o = Et(t), i = Et(t);
3669
3663
  Et(t);
3670
- let a = Le(t), l = 0;
3664
+ let a = Ce(t), l = 0;
3671
3665
  n[l++] = r ? Number(a) : a;
3672
3666
  const s = o / i;
3673
3667
  for (; l < e; ) {
3674
- const u = Le(t), f = new Uint8Array(i);
3668
+ const u = Ce(t), f = new Uint8Array(i);
3675
3669
  for (let h = 0; h < i; h++)
3676
3670
  f[h] = t.view.getUint8(t.offset++);
3677
3671
  for (let h = 0; h < i && l < e; h++) {
3678
3672
  const d = BigInt(f[h]);
3679
3673
  if (d) {
3680
3674
  let p = 0n, w = s;
3681
- const I = (1n << d) - 1n;
3675
+ const E = (1n << d) - 1n;
3682
3676
  for (; w && l < e; ) {
3683
- let A = BigInt(t.view.getUint8(t.offset)) >> p & I;
3677
+ let A = BigInt(t.view.getUint8(t.offset)) >> p & E;
3684
3678
  for (p += d; p >= 8; )
3685
- p -= 8n, t.offset++, p && (A |= BigInt(t.view.getUint8(t.offset)) << d - p & I);
3679
+ p -= 8n, t.offset++, p && (A |= BigInt(t.view.getUint8(t.offset)) << d - p & E);
3686
3680
  const m = u + A;
3687
3681
  a += m, n[l++] = r ? Number(a) : a, w--;
3688
3682
  }
@@ -3693,13 +3687,13 @@ function Vt(t, e, n) {
3693
3687
  }
3694
3688
  }
3695
3689
  }
3696
- function dr(t, e, n) {
3690
+ function hr(t, e, n) {
3697
3691
  const r = new Int32Array(e);
3698
3692
  Vt(t, e, r);
3699
3693
  for (let o = 0; o < e; o++)
3700
3694
  n[o] = new Uint8Array(t.view.buffer, t.view.byteOffset + t.offset, r[o]), t.offset += r[o];
3701
3695
  }
3702
- function gu(t, e, n) {
3696
+ function _u(t, e, n) {
3703
3697
  const r = new Int32Array(e);
3704
3698
  Vt(t, e, r);
3705
3699
  const o = new Int32Array(e);
@@ -3709,7 +3703,7 @@ function gu(t, e, n) {
3709
3703
  r[i] ? (n[i] = new Uint8Array(r[i] + o[i]), n[i].set(n[i - 1].subarray(0, r[i])), n[i].set(a, r[i])) : n[i] = a, t.offset += o[i];
3710
3704
  }
3711
3705
  }
3712
- function ge(t) {
3706
+ function me(t) {
3713
3707
  return 32 - Math.clz32(t);
3714
3708
  }
3715
3709
  function mt(t, e, n, r) {
@@ -3719,15 +3713,15 @@ function mt(t, e, n, r) {
3719
3713
  for (; i < n.length; ) {
3720
3714
  const a = Et(t);
3721
3715
  if (a & 1)
3722
- i = yu(t, a, e, n, i);
3716
+ i = gu(t, a, e, n, i);
3723
3717
  else {
3724
3718
  const l = a >>> 1;
3725
- vu(t, l, e, n, i), i += l;
3719
+ mu(t, l, e, n, i), i += l;
3726
3720
  }
3727
3721
  }
3728
3722
  t.offset = o + r;
3729
3723
  }
3730
- function vu(t, e, n, r, o) {
3724
+ function mu(t, e, n, r, o) {
3731
3725
  const i = n + 7 >> 3;
3732
3726
  let a = 0;
3733
3727
  for (let l = 0; l < i; l++)
@@ -3735,7 +3729,7 @@ function vu(t, e, n, r, o) {
3735
3729
  for (let l = 0; l < e; l++)
3736
3730
  r[o + l] = a;
3737
3731
  }
3738
- function yu(t, e, n, r, o) {
3732
+ function gu(t, e, n, r, o) {
3739
3733
  let i = e >> 1 << 3;
3740
3734
  const a = (1 << n) - 1;
3741
3735
  let l = 0;
@@ -3748,8 +3742,8 @@ function yu(t, e, n, r, o) {
3748
3742
  u > 8 ? (u -= 8, s -= 8, l >>>= 8) : s - u < n ? (l |= t.view.getUint8(t.offset) << s, t.offset++, s += 8) : (o < r.length && (r[o++] = l >> u & a), i--, u += n);
3749
3743
  return o;
3750
3744
  }
3751
- function pr(t, e, n, r) {
3752
- const o = wu(n, r), i = new Uint8Array(e * o);
3745
+ function dr(t, e, n, r) {
3746
+ const o = vu(n, r), i = new Uint8Array(e * o);
3753
3747
  for (let a = 0; a < o; a++)
3754
3748
  for (let l = 0; l < e; l++)
3755
3749
  i[l * o + a] = t.view.getUint8(t.offset++);
@@ -3765,7 +3759,7 @@ function pr(t, e, n, r) {
3765
3759
  }
3766
3760
  throw new Error(`parquet byte_stream_split unsupported type: ${n}`);
3767
3761
  }
3768
- function wu(t, e) {
3762
+ function vu(t, e) {
3769
3763
  switch (t) {
3770
3764
  case "INT32":
3771
3765
  case "FLOAT":
@@ -3780,29 +3774,29 @@ function wu(t, e) {
3780
3774
  throw new Error(`parquet unsupported type: ${t}`);
3781
3775
  }
3782
3776
  }
3783
- function Ge(t, e, n, r) {
3777
+ function je(t, e, n, r) {
3784
3778
  if (n === 0) return [];
3785
3779
  if (e === "BOOLEAN")
3786
- return bu(t, n);
3780
+ return yu(t, n);
3787
3781
  if (e === "INT32")
3788
- return Au(t, n);
3782
+ return wu(t, n);
3789
3783
  if (e === "INT64")
3790
- return Eu(t, n);
3784
+ return bu(t, n);
3791
3785
  if (e === "INT96")
3792
- return Tu(t, n);
3786
+ return Au(t, n);
3793
3787
  if (e === "FLOAT")
3794
- return Iu(t, n);
3788
+ return Eu(t, n);
3795
3789
  if (e === "DOUBLE")
3796
- return Mu(t, n);
3790
+ return Tu(t, n);
3797
3791
  if (e === "BYTE_ARRAY")
3798
- return xu(t, n);
3792
+ return Iu(t, n);
3799
3793
  if (e === "FIXED_LEN_BYTE_ARRAY") {
3800
3794
  if (!r) throw new Error("parquet missing fixed length");
3801
- return Ru(t, n, r);
3795
+ return Mu(t, n, r);
3802
3796
  } else
3803
3797
  throw new Error(`parquet unhandled type: ${e}`);
3804
3798
  }
3805
- function bu(t, e) {
3799
+ function yu(t, e) {
3806
3800
  const n = new Array(e);
3807
3801
  for (let r = 0; r < e; r++) {
3808
3802
  const o = t.offset + (r / 8 | 0), i = r % 8, a = t.view.getUint8(o);
@@ -3810,15 +3804,15 @@ function bu(t, e) {
3810
3804
  }
3811
3805
  return t.offset += Math.ceil(e / 8), n;
3812
3806
  }
3813
- function Au(t, e) {
3814
- const n = (t.view.byteOffset + t.offset) % 4 ? new Int32Array(ve(t.view.buffer, t.view.byteOffset + t.offset, e * 4)) : new Int32Array(t.view.buffer, t.view.byteOffset + t.offset, e);
3807
+ function wu(t, e) {
3808
+ const n = (t.view.byteOffset + t.offset) % 4 ? new Int32Array(ge(t.view.buffer, t.view.byteOffset + t.offset, e * 4)) : new Int32Array(t.view.buffer, t.view.byteOffset + t.offset, e);
3815
3809
  return t.offset += e * 4, n;
3816
3810
  }
3817
- function Eu(t, e) {
3818
- const n = (t.view.byteOffset + t.offset) % 8 ? new BigInt64Array(ve(t.view.buffer, t.view.byteOffset + t.offset, e * 8)) : new BigInt64Array(t.view.buffer, t.view.byteOffset + t.offset, e);
3811
+ function bu(t, e) {
3812
+ const n = (t.view.byteOffset + t.offset) % 8 ? new BigInt64Array(ge(t.view.buffer, t.view.byteOffset + t.offset, e * 8)) : new BigInt64Array(t.view.buffer, t.view.byteOffset + t.offset, e);
3819
3813
  return t.offset += e * 8, n;
3820
3814
  }
3821
- function Tu(t, e) {
3815
+ function Au(t, e) {
3822
3816
  const n = new Array(e);
3823
3817
  for (let r = 0; r < e; r++) {
3824
3818
  const o = t.view.getBigInt64(t.offset + r * 12, !0), i = t.view.getInt32(t.offset + r * 12 + 8, !0);
@@ -3826,15 +3820,15 @@ function Tu(t, e) {
3826
3820
  }
3827
3821
  return t.offset += e * 12, n;
3828
3822
  }
3829
- function Iu(t, e) {
3830
- const n = (t.view.byteOffset + t.offset) % 4 ? new Float32Array(ve(t.view.buffer, t.view.byteOffset + t.offset, e * 4)) : new Float32Array(t.view.buffer, t.view.byteOffset + t.offset, e);
3823
+ function Eu(t, e) {
3824
+ const n = (t.view.byteOffset + t.offset) % 4 ? new Float32Array(ge(t.view.buffer, t.view.byteOffset + t.offset, e * 4)) : new Float32Array(t.view.buffer, t.view.byteOffset + t.offset, e);
3831
3825
  return t.offset += e * 4, n;
3832
3826
  }
3833
- function Mu(t, e) {
3834
- const n = (t.view.byteOffset + t.offset) % 8 ? new Float64Array(ve(t.view.buffer, t.view.byteOffset + t.offset, e * 8)) : new Float64Array(t.view.buffer, t.view.byteOffset + t.offset, e);
3827
+ function Tu(t, e) {
3828
+ const n = (t.view.byteOffset + t.offset) % 8 ? new Float64Array(ge(t.view.buffer, t.view.byteOffset + t.offset, e * 8)) : new Float64Array(t.view.buffer, t.view.byteOffset + t.offset, e);
3835
3829
  return t.offset += e * 8, n;
3836
3830
  }
3837
- function xu(t, e) {
3831
+ function Iu(t, e) {
3838
3832
  const n = new Array(e);
3839
3833
  for (let r = 0; r < e; r++) {
3840
3834
  const o = t.view.getUint32(t.offset, !0);
@@ -3842,22 +3836,22 @@ function xu(t, e) {
3842
3836
  }
3843
3837
  return n;
3844
3838
  }
3845
- function Ru(t, e, n) {
3839
+ function Mu(t, e, n) {
3846
3840
  const r = new Array(e);
3847
3841
  for (let o = 0; o < e; o++)
3848
3842
  r[o] = new Uint8Array(t.view.buffer, t.view.byteOffset + t.offset, n), t.offset += n;
3849
3843
  return r;
3850
3844
  }
3851
- function ve(t, e, n) {
3845
+ function ge(t, e, n) {
3852
3846
  const r = new ArrayBuffer(n);
3853
3847
  return new Uint8Array(r).set(new Uint8Array(t, e, n)), r;
3854
3848
  }
3855
- const Nu = [0, 255, 65535, 16777215, 4294967295];
3856
- function An(t, e, n, r, o) {
3849
+ const xu = [0, 255, 65535, 16777215, 4294967295];
3850
+ function bn(t, e, n, r, o) {
3857
3851
  for (let i = 0; i < o; i++)
3858
3852
  n[r + i] = t[e + i];
3859
3853
  }
3860
- function Su(t, e) {
3854
+ function Ru(t, e) {
3861
3855
  const n = t.byteLength, r = e.byteLength;
3862
3856
  let o = 0, i = 0;
3863
3857
  for (; o < n; ) {
@@ -3878,11 +3872,11 @@ function Su(t, e) {
3878
3872
  if (o + 3 >= n)
3879
3873
  throw new Error("snappy error literal pos + 3 >= inputLength");
3880
3874
  const u = s - 60;
3881
- s = t[o] + (t[o + 1] << 8) + (t[o + 2] << 16) + (t[o + 3] << 24), s = (s & Nu[u]) + 1, o += u;
3875
+ s = t[o] + (t[o + 1] << 8) + (t[o + 2] << 16) + (t[o + 3] << 24), s = (s & xu[u]) + 1, o += u;
3882
3876
  }
3883
3877
  if (o + s > n)
3884
3878
  throw new Error("snappy error literal exceeds input length");
3885
- An(t, o, e, i, s), o += s, i += s;
3879
+ bn(t, o, e, i, s), o += s, i += s;
3886
3880
  } else {
3887
3881
  let s = 0;
3888
3882
  switch (a & 3) {
@@ -3904,51 +3898,51 @@ function Su(t, e) {
3904
3898
  throw new Error(`invalid offset ${s} pos ${o} inputLength ${n}`);
3905
3899
  if (s > i)
3906
3900
  throw new Error("cannot copy from before start of buffer");
3907
- An(e, i - s, e, i, l), i += l;
3901
+ bn(e, i - s, e, i, l), i += l;
3908
3902
  }
3909
3903
  }
3910
3904
  if (i !== r) throw new Error("premature end of input");
3911
3905
  }
3912
- function Cu(t, e, { type: n, element: r, schemaPath: o }) {
3906
+ function Nu(t, e, { type: n, element: r, schemaPath: o }) {
3913
3907
  const i = new DataView(t.buffer, t.byteOffset, t.byteLength), a = { view: i, offset: 0 };
3914
3908
  let l;
3915
- const s = Lu(a, e, o), { definitionLevels: u, numNulls: f } = ku(a, e, o), h = e.num_values - f;
3909
+ const s = Su(a, e, o), { definitionLevels: u, numNulls: f } = Cu(a, e, o), h = e.num_values - f;
3916
3910
  if (e.encoding === "PLAIN")
3917
- l = Ge(a, n, h, r.type_length);
3911
+ l = je(a, n, h, r.type_length);
3918
3912
  else if (e.encoding === "PLAIN_DICTIONARY" || e.encoding === "RLE_DICTIONARY" || e.encoding === "RLE") {
3919
3913
  const d = n === "BOOLEAN" ? 1 : i.getUint8(a.offset++);
3920
3914
  d ? (l = new Array(h), n === "BOOLEAN" ? (mt(a, d, l), l = l.map((p) => !!p)) : mt(a, d, l, i.byteLength - a.offset)) : l = new Uint8Array(h);
3921
3915
  } else if (e.encoding === "BYTE_STREAM_SPLIT")
3922
- l = pr(a, h, n, r.type_length);
3916
+ l = dr(a, h, n, r.type_length);
3923
3917
  else if (e.encoding === "DELTA_BINARY_PACKED")
3924
3918
  l = n === "INT32" ? new Int32Array(h) : new BigInt64Array(h), Vt(a, h, l);
3925
3919
  else if (e.encoding === "DELTA_LENGTH_BYTE_ARRAY")
3926
- l = new Array(h), dr(a, h, l);
3920
+ l = new Array(h), hr(a, h, l);
3927
3921
  else
3928
3922
  throw new Error(`parquet unsupported encoding: ${e.encoding}`);
3929
3923
  return { definitionLevels: u, repetitionLevels: s, dataPage: l };
3930
3924
  }
3931
- function Lu(t, e, n) {
3925
+ function Su(t, e, n) {
3932
3926
  if (n.length > 1) {
3933
- const r = ir(n);
3927
+ const r = or(n);
3934
3928
  if (r) {
3935
3929
  const o = new Array(e.num_values);
3936
- return mt(t, ge(r), o), o;
3930
+ return mt(t, me(r), o), o;
3937
3931
  }
3938
3932
  }
3939
3933
  return [];
3940
3934
  }
3941
- function ku(t, e, n) {
3942
- const r = Ve(n);
3935
+ function Cu(t, e, n) {
3936
+ const r = Ye(n);
3943
3937
  if (!r) return { definitionLevels: [], numNulls: 0 };
3944
3938
  const o = new Array(e.num_values);
3945
- mt(t, ge(r), o);
3939
+ mt(t, me(r), o);
3946
3940
  let i = e.num_values;
3947
3941
  for (const a of o)
3948
3942
  a === r && i--;
3949
3943
  return i === 0 && (o.length = 0), { definitionLevels: o, numNulls: i };
3950
3944
  }
3951
- function Be(t, e, n, r) {
3945
+ function ke(t, e, n, r) {
3952
3946
  let o;
3953
3947
  const i = r?.[n];
3954
3948
  if (n === "UNCOMPRESSED")
@@ -3956,57 +3950,57 @@ function Be(t, e, n, r) {
3956
3950
  else if (i)
3957
3951
  o = i(t, e);
3958
3952
  else if (n === "SNAPPY")
3959
- o = new Uint8Array(e), Su(t, o);
3953
+ o = new Uint8Array(e), Ru(t, o);
3960
3954
  else
3961
3955
  throw new Error(`parquet unsupported compression codec: ${n}`);
3962
3956
  if (o?.length !== e)
3963
3957
  throw new Error(`parquet decompressed page length ${o?.length} does not match header ${e}`);
3964
3958
  return o;
3965
3959
  }
3966
- function Bu(t, e, n) {
3960
+ function Lu(t, e, n) {
3967
3961
  const r = { view: new DataView(t.buffer, t.byteOffset, t.byteLength), offset: 0 }, { type: o, element: i, schemaPath: a, codec: l, compressors: s } = n, u = e.data_page_header_v2;
3968
3962
  if (!u) throw new Error("parquet data page header v2 is undefined");
3969
- const f = Uu(r, u, a);
3963
+ const f = ku(r, u, a);
3970
3964
  r.offset = u.repetition_levels_byte_length;
3971
- const h = Du(r, u, a), d = e.uncompressed_page_size - u.definition_levels_byte_length - u.repetition_levels_byte_length;
3965
+ const h = Bu(r, u, a), d = e.uncompressed_page_size - u.definition_levels_byte_length - u.repetition_levels_byte_length;
3972
3966
  let p = t.subarray(r.offset);
3973
- u.is_compressed !== !1 && (p = Be(p, d, l, s));
3974
- const w = new DataView(p.buffer, p.byteOffset, p.byteLength), I = { view: w, offset: 0 };
3967
+ u.is_compressed !== !1 && (p = ke(p, d, l, s));
3968
+ const w = new DataView(p.buffer, p.byteOffset, p.byteLength), E = { view: w, offset: 0 };
3975
3969
  let A;
3976
3970
  const m = u.num_values - u.num_nulls;
3977
3971
  if (u.encoding === "PLAIN")
3978
- A = Ge(I, o, m, i.type_length);
3972
+ A = je(E, o, m, i.type_length);
3979
3973
  else if (u.encoding === "RLE")
3980
- A = new Array(m), mt(I, 1, A), A = A.map((L) => !!L);
3974
+ A = new Array(m), mt(E, 1, A), A = A.map((k) => !!k);
3981
3975
  else if (u.encoding === "PLAIN_DICTIONARY" || u.encoding === "RLE_DICTIONARY") {
3982
- const L = w.getUint8(I.offset++);
3983
- A = new Array(m), mt(I, L, A, d - 1);
3976
+ const k = w.getUint8(E.offset++);
3977
+ A = new Array(m), mt(E, k, A, d - 1);
3984
3978
  } else if (u.encoding === "DELTA_BINARY_PACKED")
3985
- A = o === "INT32" ? new Int32Array(m) : new BigInt64Array(m), Vt(I, m, A);
3979
+ A = o === "INT32" ? new Int32Array(m) : new BigInt64Array(m), Vt(E, m, A);
3986
3980
  else if (u.encoding === "DELTA_LENGTH_BYTE_ARRAY")
3987
- A = new Array(m), dr(I, m, A);
3981
+ A = new Array(m), hr(E, m, A);
3988
3982
  else if (u.encoding === "DELTA_BYTE_ARRAY")
3989
- A = new Array(m), gu(I, m, A);
3983
+ A = new Array(m), _u(E, m, A);
3990
3984
  else if (u.encoding === "BYTE_STREAM_SPLIT")
3991
- A = pr(r, m, o, i.type_length);
3985
+ A = dr(r, m, o, i.type_length);
3992
3986
  else
3993
3987
  throw new Error(`parquet unsupported encoding: ${u.encoding}`);
3994
3988
  return { definitionLevels: h, repetitionLevels: f, dataPage: A };
3995
3989
  }
3996
- function Uu(t, e, n) {
3997
- const r = ir(n);
3990
+ function ku(t, e, n) {
3991
+ const r = or(n);
3998
3992
  if (!r) return [];
3999
3993
  const o = new Array(e.num_values);
4000
- return mt(t, ge(r), o, e.repetition_levels_byte_length), o;
3994
+ return mt(t, me(r), o, e.repetition_levels_byte_length), o;
4001
3995
  }
4002
- function Du(t, e, n) {
4003
- const r = Ve(n);
3996
+ function Bu(t, e, n) {
3997
+ const r = Ye(n);
4004
3998
  if (r) {
4005
3999
  const o = new Array(e.num_values);
4006
- return mt(t, ge(r), o, e.definition_levels_byte_length), o;
4000
+ return mt(t, me(r), o, e.definition_levels_byte_length), o;
4007
4001
  }
4008
4002
  }
4009
- function $u(t, { groupStart: e, selectStart: n, selectEnd: r }, o, i) {
4003
+ function Du(t, { groupStart: e, selectStart: n, selectEnd: r }, o, i) {
4010
4004
  const { columnName: a } = o, l = [];
4011
4005
  let s, u, f = 0;
4012
4006
  const h = i && (() => {
@@ -4018,17 +4012,17 @@ function $u(t, { groupStart: e, selectStart: n, selectEnd: r }, o, i) {
4018
4012
  });
4019
4013
  });
4020
4014
  for (; f < r && !(t.offset >= t.view.byteLength - 1); ) {
4021
- const d = Fu(t);
4015
+ const d = Uu(t);
4022
4016
  if (d.type === "DICTIONARY_PAGE")
4023
- s = En(t, d, o, s, void 0, 0), s = tr(s, o);
4017
+ s = An(t, d, o, s, void 0, 0), s = Zn(s, o);
4024
4018
  else {
4025
- const p = u?.length || 0, w = En(t, d, o, s, u, n - f);
4019
+ const p = u?.length || 0, w = An(t, d, o, s, u, n - f);
4026
4020
  u === w ? f += w.length - p : (h?.(), l.push(w), f += w.length, u = w);
4027
4021
  }
4028
4022
  }
4029
4023
  return h?.(), f > r && u && (l[l.length - 1] = u.slice(0, r - (f - u.length))), l;
4030
4024
  }
4031
- function En(t, e, n, r, o, i) {
4025
+ function An(t, e, n, r, o, i) {
4032
4026
  const { type: a, element: l, schemaPath: s, codec: u, compressors: f } = n, h = new Uint8Array(
4033
4027
  t.view.buffer,
4034
4028
  t.view.byteOffset + t.offset,
@@ -4037,16 +4031,16 @@ function En(t, e, n, r, o, i) {
4037
4031
  if (t.offset += e.compressed_page_size, e.type === "DATA_PAGE") {
4038
4032
  const d = e.data_page_header;
4039
4033
  if (!d) throw new Error("parquet data page header is undefined");
4040
- if (i > d.num_values && iu(s))
4034
+ if (i > d.num_values && ru(s))
4041
4035
  return new Array(d.num_values);
4042
- const p = Be(h, Number(e.uncompressed_page_size), u, f), { definitionLevels: w, repetitionLevels: I, dataPage: A } = Cu(p, d, n);
4043
- let m = yn(A, r, d.encoding, n);
4044
- if (I.length || w?.length) {
4045
- const L = Array.isArray(o) ? o : [];
4046
- return bn(L, w, I, m, s);
4036
+ const p = ke(h, Number(e.uncompressed_page_size), u, f), { definitionLevels: w, repetitionLevels: E, dataPage: A } = Nu(p, d, n);
4037
+ let m = vn(A, r, d.encoding, n);
4038
+ if (E.length || w?.length) {
4039
+ const k = Array.isArray(o) ? o : [];
4040
+ return wn(k, w, E, m, s);
4047
4041
  } else {
4048
- for (let L = 2; L < s.length; L++)
4049
- s[L].element.repetition_type !== "REQUIRED" && (m = Array.from(m, (D) => [D]));
4042
+ for (let k = 2; k < s.length; k++)
4043
+ s[k].element.repetition_type !== "REQUIRED" && (m = Array.from(m, (U) => [U]));
4050
4044
  return m;
4051
4045
  }
4052
4046
  } else if (e.type === "DATA_PAGE_V2") {
@@ -4054,23 +4048,23 @@ function En(t, e, n, r, o, i) {
4054
4048
  if (!d) throw new Error("parquet data page header v2 is undefined");
4055
4049
  if (i > d.num_rows)
4056
4050
  return new Array(d.num_values);
4057
- const { definitionLevels: p, repetitionLevels: w, dataPage: I } = Bu(h, e, n), A = yn(I, r, d.encoding, n), m = Array.isArray(o) ? o : [];
4058
- return bn(m, p, w, A, s);
4051
+ const { definitionLevels: p, repetitionLevels: w, dataPage: E } = Lu(h, e, n), A = vn(E, r, d.encoding, n), m = Array.isArray(o) ? o : [];
4052
+ return wn(m, p, w, A, s);
4059
4053
  } else if (e.type === "DICTIONARY_PAGE") {
4060
4054
  const d = e.dictionary_page_header;
4061
4055
  if (!d) throw new Error("parquet dictionary page header is undefined");
4062
- const p = Be(
4056
+ const p = ke(
4063
4057
  h,
4064
4058
  Number(e.uncompressed_page_size),
4065
4059
  u,
4066
4060
  f
4067
4061
  ), w = { view: new DataView(p.buffer, p.byteOffset, p.byteLength), offset: 0 };
4068
- return Ge(w, a, d.num_values, l.type_length);
4062
+ return je(w, a, d.num_values, l.type_length);
4069
4063
  } else
4070
4064
  throw new Error(`parquet unsupported page type: ${e.type}`);
4071
4065
  }
4072
- function Fu(t) {
4073
- const e = ar(t), n = Jn[e.field_1], r = e.field_2, o = e.field_3, i = e.field_4, a = e.field_5 && {
4066
+ function Uu(t) {
4067
+ const e = ir(t), n = Kn[e.field_1], r = e.field_2, o = e.field_3, i = e.field_4, a = e.field_5 && {
4074
4068
  num_values: e.field_5.field_1,
4075
4069
  encoding: yt[e.field_5.field_2],
4076
4070
  definition_level_encoding: yt[e.field_5.field_3],
@@ -4109,23 +4103,23 @@ function Fu(t) {
4109
4103
  data_page_header_v2: u
4110
4104
  };
4111
4105
  }
4112
- function Pu(t, { metadata: e, columns: n }, r) {
4113
- const { file: o, compressors: i, utf8: a } = t, l = [], s = { ...Zn, ...t.parsers };
4106
+ function $u(t, { metadata: e, columns: n }, r) {
4107
+ const { file: o, compressors: i, utf8: a } = t, l = [], s = { ...Jn, ...t.parsers };
4114
4108
  for (const { file_path: u, meta_data: f } of r.rowGroup.columns) {
4115
4109
  if (u) throw new Error("parquet file_path not supported");
4116
4110
  if (!f) throw new Error("parquet column metadata is undefined");
4117
4111
  const h = f.path_in_schema[0];
4118
4112
  if (n && !n.includes(h)) continue;
4119
- const { startByte: d, endByte: p } = cr(f), w = p - d;
4113
+ const { startByte: d, endByte: p } = sr(f), w = p - d;
4120
4114
  if (w > 1 << 30) {
4121
4115
  console.warn(`parquet skipping huge column "${f.path_in_schema}" ${w} bytes`);
4122
4116
  continue;
4123
4117
  }
4124
- const I = Promise.resolve(o.slice(d, p));
4118
+ const E = Promise.resolve(o.slice(d, p));
4125
4119
  l.push({
4126
4120
  pathInSchema: f.path_in_schema,
4127
- data: I.then((A) => {
4128
- const m = or(e.schema, f.path_in_schema), L = { view: new DataView(A), offset: 0 }, D = {
4121
+ data: E.then((A) => {
4122
+ const m = rr(e.schema, f.path_in_schema), k = { view: new DataView(A), offset: 0 }, U = {
4129
4123
  columnName: f.path_in_schema.join("."),
4130
4124
  type: f.type,
4131
4125
  element: m[m.length - 1].element,
@@ -4135,14 +4129,14 @@ function Pu(t, { metadata: e, columns: n }, r) {
4135
4129
  compressors: i,
4136
4130
  utf8: a
4137
4131
  };
4138
- return $u(L, r, D, t.onPage);
4132
+ return Du(k, r, U, t.onPage);
4139
4133
  })
4140
4134
  });
4141
4135
  }
4142
4136
  return { groupStart: r.groupStart, groupRows: r.groupRows, asyncColumns: l };
4143
4137
  }
4144
- async function Ou({ asyncColumns: t }, e, n, r, o) {
4145
- const i = new Array(n), a = await Promise.all(t.map(({ data: f }) => f.then(sr))), l = t.map((f) => f.pathInSchema[0]).filter((f) => !r || r.includes(f)), s = r ?? l, u = s.map((f) => t.findIndex((h) => h.pathInSchema[0] === f));
4138
+ async function Fu({ asyncColumns: t }, e, n, r, o) {
4139
+ const i = new Array(n), a = await Promise.all(t.map(({ data: f }) => f.then(ur))), l = t.map((f) => f.pathInSchema[0]).filter((f) => !r || r.includes(f)), s = r ?? l, u = s.map((f) => t.findIndex((h) => h.pathInSchema[0] === f));
4146
4140
  for (let f = e; f < n; f++)
4147
4141
  if (o === "object") {
4148
4142
  const h = {};
@@ -4157,14 +4151,14 @@ async function Ou({ asyncColumns: t }, e, n, r, o) {
4157
4151
  }
4158
4152
  return i;
4159
4153
  }
4160
- function zu(t, e) {
4154
+ function Ou(t, e) {
4161
4155
  const { asyncColumns: n } = t, r = [];
4162
4156
  for (const o of e.children)
4163
4157
  if (o.children.length) {
4164
4158
  const i = n.filter((s) => s.pathInSchema[0] === o.element.name);
4165
4159
  if (!i.length) continue;
4166
4160
  const a = /* @__PURE__ */ new Map(), l = Promise.all(i.map((s) => s.data.then((u) => {
4167
- a.set(s.pathInSchema.join("."), sr(u));
4161
+ a.set(s.pathInSchema.join("."), ur(u));
4168
4162
  }))).then(() => {
4169
4163
  Ft(a, o);
4170
4164
  const s = a.get(o.path.join("."));
@@ -4178,15 +4172,15 @@ function zu(t, e) {
4178
4172
  }
4179
4173
  return { ...t, asyncColumns: r };
4180
4174
  }
4181
- async function qu(t) {
4182
- t.metadata ??= await cu(t.file);
4183
- const e = Yu(t), { rowStart: n = 0, rowEnd: r, columns: o, onChunk: i, onComplete: a, rowFormat: l } = t;
4175
+ async function Pu(t) {
4176
+ t.metadata ??= await uu(t.file);
4177
+ const e = qu(t), { rowStart: n = 0, rowEnd: r, columns: o, onChunk: i, onComplete: a, rowFormat: l } = t;
4184
4178
  if (!a && !i) {
4185
4179
  for (const { asyncColumns: f } of e)
4186
4180
  for (const { data: h } of f) await h;
4187
4181
  return;
4188
4182
  }
4189
- const s = fu(t.metadata), u = e.map((f) => zu(f, s));
4183
+ const s = su(t.metadata), u = e.map((f) => Ou(f, s));
4190
4184
  if (i)
4191
4185
  for (const f of u)
4192
4186
  for (const h of f.asyncColumns)
@@ -4203,20 +4197,20 @@ async function qu(t) {
4203
4197
  if (a) {
4204
4198
  const f = [];
4205
4199
  for (const h of u) {
4206
- const d = Math.max(n - h.groupStart, 0), p = Math.min((r ?? 1 / 0) - h.groupStart, h.groupRows), w = await Ou(h, d, p, o, l);
4207
- je(f, w.slice(d, p));
4200
+ const d = Math.max(n - h.groupStart, 0), p = Math.min((r ?? 1 / 0) - h.groupStart, h.groupRows), w = await Fu(h, d, p, o, l);
4201
+ Ve(f, w.slice(d, p));
4208
4202
  }
4209
4203
  a(f);
4210
4204
  } else
4211
4205
  for (const { asyncColumns: f } of u)
4212
4206
  for (const { data: h } of f) await h;
4213
4207
  }
4214
- function Yu(t) {
4208
+ function qu(t) {
4215
4209
  if (!t.metadata) throw new Error("parquet requires metadata");
4216
- const e = _u(t);
4217
- return t.file = mu(t.file, e), e.groups.map((n) => Pu(t, e, n));
4210
+ const e = du(t);
4211
+ return t.file = pu(t.file, e), e.groups.map((n) => $u(t, e, n));
4218
4212
  }
4219
- const Vu = { class: "app-container" }, ju = /* @__PURE__ */ Lt({
4213
+ const zu = { class: "app-container" }, Yu = /* @__PURE__ */ Lt({
4220
4214
  __name: "wrapper",
4221
4215
  props: {
4222
4216
  apiUrl: {},
@@ -4236,86 +4230,90 @@ const Vu = { class: "app-container" }, ju = /* @__PURE__ */ Lt({
4236
4230
  pkgType: e.pkg?.content?.packageType || "",
4237
4231
  apiUrl: e.apiUrl || ""
4238
4232
  }),
4239
- async ({ srcUrl: E, srcFileType: M, srcFileId: N, pkgId: C, pkgType: U, apiUrl: P }) => {
4233
+ async ({ srcUrl: I, srcFileType: N, srcFileId: C, pkgId: L, pkgType: O, apiUrl: G }) => {
4240
4234
  try {
4241
- if (f.value = void 0, h.value = void 0, E) {
4242
- const _ = M ?? (E.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
4243
- await m(E, _, N);
4235
+ if (f.value = void 0, h.value = void 0, I) {
4236
+ const v = N ?? (I.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
4237
+ await k(I, v, C);
4244
4238
  return;
4245
4239
  }
4246
- if (!C || !P)
4240
+ if (!L || !G)
4247
4241
  return;
4248
- await I(C, P);
4249
- const j = w.value?.[0]?.content?.id;
4250
- if (!j) {
4242
+ await A(L, G);
4243
+ const q = w.value?.[0]?.content?.id;
4244
+ if (!q) {
4251
4245
  console.error("[UMAP Wrapper] No files returned from /view");
4252
4246
  return;
4253
4247
  }
4254
- const W = await A(C, j, P);
4255
- await m(W, U === "CSV" ? "csv" : "parquet", j);
4256
- } catch (j) {
4257
- console.error("[UMAP Wrapper] Load failed:", j?.message || j);
4248
+ const _ = await m(L, q, G);
4249
+ await k(_, O === "CSV" ? "csv" : "parquet", q);
4250
+ } catch (q) {
4251
+ console.error("[UMAP Wrapper] Load failed:", q?.message || q);
4258
4252
  }
4259
4253
  },
4260
4254
  { immediate: !0 }
4261
4255
  );
4262
- async function I(E, M) {
4263
- const N = await ae(), C = `${M}/packages/${E}/view?api_key=${N}`, U = await fetch(C);
4264
- if (!U.ok) throw new Error(`view failed: ${U.status}`);
4265
- w.value = await U.json();
4256
+ async function E() {
4257
+ const { useGetToken: I } = await import("./useGetToken-BRN19kkn-Dzc3_tWy.mjs");
4258
+ return I();
4259
+ }
4260
+ async function A(I, N) {
4261
+ const C = await E(), L = `${N}/packages/${I}/view?api_key=${C}`, O = await fetch(L);
4262
+ if (!O.ok) throw new Error(`view failed: ${O.status}`);
4263
+ w.value = await O.json();
4266
4264
  }
4267
- async function A(E, M, N) {
4268
- const C = await ae(), U = `${N}/packages/${E}/files/${M}?api_key=${C}`, P = await fetch(U);
4269
- if (!P.ok) throw new Error(`file url failed: ${P.status}`);
4270
- return (await P.json()).url;
4265
+ async function m(I, N, C) {
4266
+ const L = await E(), O = `${C}/packages/${I}/files/${N}?api_key=${L}`, G = await fetch(O);
4267
+ if (!G.ok) throw new Error(`file url failed: ${G.status}`);
4268
+ return (await G.json()).url;
4271
4269
  }
4272
- async function m(E, M, N) {
4273
- if (M === "csv")
4270
+ async function k(I, N, C) {
4271
+ if (N === "csv")
4274
4272
  throw new Error("CSV not yet supported by UMAP wrapper. Provide a Parquet file.");
4275
- const C = await fetch(E);
4276
- if (!C.ok) throw new Error(`fetch failed: ${C.status}`);
4277
- const U = await C.arrayBuffer();
4278
- await qu({
4279
- file: U,
4280
- onComplete: (P) => {
4281
- h.value = ke(U);
4273
+ const L = await fetch(I);
4274
+ if (!L.ok) throw new Error(`fetch failed: ${L.status}`);
4275
+ const O = await L.arrayBuffer();
4276
+ await Pu({
4277
+ file: O,
4278
+ onComplete: (G) => {
4279
+ h.value = Le(O);
4282
4280
  try {
4283
- const j = h.value?.key_value_metadata?.[0];
4284
- j?.key && (r.value = j.key);
4281
+ const q = h.value?.key_value_metadata?.[0];
4282
+ q?.key && (r.value = q.key);
4285
4283
  } catch {
4286
4284
  }
4287
- f.value = P;
4285
+ f.value = G;
4288
4286
  }
4289
- }), H();
4287
+ }), M();
4290
4288
  }
4291
- function L() {
4289
+ function U() {
4292
4290
  l.value = !l.value, s.value++;
4293
4291
  }
4294
- function D(E) {
4292
+ function H(I) {
4295
4293
  try {
4296
- if (!E || E.length < 7) return [1, 0, 0];
4297
- const M = parseInt(E.slice(1, 3), 16) / 255, N = parseInt(E.slice(3, 5), 16) / 255, C = parseInt(E.slice(5, 7), 16) / 255;
4298
- return Number.isNaN(M) || Number.isNaN(N) || Number.isNaN(C) ? [1, 0, 0] : [M, N, C];
4294
+ if (!I || I.length < 7) return [1, 0, 0];
4295
+ const N = parseInt(I.slice(1, 3), 16) / 255, C = parseInt(I.slice(3, 5), 16) / 255, L = parseInt(I.slice(5, 7), 16) / 255;
4296
+ return Number.isNaN(N) || Number.isNaN(C) || Number.isNaN(L) ? [1, 0, 0] : [N, C, L];
4299
4297
  } catch {
4300
4298
  return [1, 0, 0];
4301
4299
  }
4302
4300
  }
4303
- function H() {
4301
+ function M() {
4304
4302
  if (!h.value) return;
4305
- const E = ["#4269d0", "#efb118", "#ff725c", "#6cc5b0", "#3ca951", "#ff8ab7", "#a463f2", "#97bbf5", "#9c6b4e", "#9498a0"].map(D), M = h.value.key_value_metadata || [];
4306
- for (let N = 0; N < M.length - 1; N++) {
4307
- const C = M[N].key, U = JSON.parse(M[N].value);
4308
- let P = /* @__PURE__ */ new Map(), j = 0;
4309
- for (const W of U)
4310
- P.set(W, E[j % E.length]), j++;
4311
- p.value.set(C, P), p.value.get(C) || p.value.set(C, /* @__PURE__ */ new Map());
4303
+ const I = ["#4269d0", "#efb118", "#ff725c", "#6cc5b0", "#3ca951", "#ff8ab7", "#a463f2", "#97bbf5", "#9c6b4e", "#9498a0"].map(H), N = h.value.key_value_metadata || [];
4304
+ for (let C = 0; C < N.length - 1; C++) {
4305
+ const L = N[C].key, O = JSON.parse(N[C].value);
4306
+ let G = /* @__PURE__ */ new Map(), q = 0;
4307
+ for (const _ of O)
4308
+ G.set(_, I[q % I.length]), q++;
4309
+ p.value.set(L, G), p.value.get(L) || p.value.set(L, /* @__PURE__ */ new Map());
4312
4310
  }
4313
4311
  }
4314
- function x(E) {
4315
- u.value = E[0], d.value = E[1];
4312
+ function x(I) {
4313
+ u.value = I[0], d.value = I[1];
4316
4314
  }
4317
- return (E, M) => (z(), Y("div", Vu, [
4318
- (z(), Tn(Vl, {
4315
+ return (I, N) => (z(), V("div", zu, [
4316
+ (z(), En(zl, {
4319
4317
  data: f.value,
4320
4318
  metaData: h.value,
4321
4319
  pointCount: n.value,
@@ -4327,49 +4325,49 @@ const Vu = { class: "app-container" }, ju = /* @__PURE__ */ Lt({
4327
4325
  forceRegenerate: l.value,
4328
4326
  key: s.value
4329
4327
  }, null, 8, ["data", "metaData", "pointCount", "color-map", "colorMode", "startColor", "endColor", "singleColor", "forceRegenerate"])),
4330
- it(Jl, {
4328
+ it(Ql, {
4331
4329
  pointCount: n.value,
4332
- "onUpdate:pointCount": M[0] || (M[0] = (N) => n.value = N),
4330
+ "onUpdate:pointCount": N[0] || (N[0] = (C) => n.value = C),
4333
4331
  colorMode: r.value,
4334
- "onUpdate:colorMode": M[1] || (M[1] = (N) => r.value = N),
4332
+ "onUpdate:colorMode": N[1] || (N[1] = (C) => r.value = C),
4335
4333
  startColor: o.value,
4336
- "onUpdate:startColor": M[2] || (M[2] = (N) => o.value = N),
4334
+ "onUpdate:startColor": N[2] || (N[2] = (C) => o.value = C),
4337
4335
  endColor: i.value,
4338
- "onUpdate:endColor": M[3] || (M[3] = (N) => i.value = N),
4336
+ "onUpdate:endColor": N[3] || (N[3] = (C) => i.value = C),
4339
4337
  singleColor: a.value,
4340
- "onUpdate:singleColor": M[4] || (M[4] = (N) => a.value = N),
4338
+ "onUpdate:singleColor": N[4] || (N[4] = (C) => a.value = C),
4341
4339
  "color-scheme": d.value,
4342
4340
  "color-map-map": p.value,
4343
- onRegenerate: L,
4341
+ onRegenerate: U,
4344
4342
  onUpdateColorMap: x
4345
4343
  }, null, 8, ["pointCount", "colorMode", "startColor", "endColor", "singleColor", "color-scheme", "color-map-map"])
4346
4344
  ]));
4347
4345
  }
4348
- }), Gu = /* @__PURE__ */ jt(ju, [["__scopeId", "data-v-00da5d75"]]), Xu = "dashboard:globalVars";
4349
- function _r(t = !1) {
4350
- const e = Br(Xu, null);
4346
+ }), Vu = /* @__PURE__ */ jt(Yu, [["__scopeId", "data-v-2197517e"]]), ju = "dashboard:globalVars";
4347
+ function pr(t = !1) {
4348
+ const e = kr(ju, null);
4351
4349
  return !e && t && console.warn("[Widget] dashboard:globalVars not provided."), e;
4352
4350
  }
4353
- const Hu = { class: "data-explorer-wrap" }, Wu = { class: "data-explorer-info" }, Qu = /* @__PURE__ */ Lt({
4351
+ const Gu = { class: "data-explorer-wrap" }, Xu = { class: "data-explorer-info" }, Wu = /* @__PURE__ */ Lt({
4354
4352
  inheritAttrs: !1,
4355
4353
  __name: "DataExplorer",
4356
4354
  setup(t) {
4357
- const e = _r(), n = S("Data Explorer"), r = Z(() => Rt(e.s3Url));
4358
- return Ur(() => {
4355
+ const e = pr(), n = S("Data Explorer"), r = Z(() => Rt(e.s3Url));
4356
+ return Br(() => {
4359
4357
  }), (o, i) => {
4360
- const a = Ae("el-icon");
4361
- return z(), Y(_t, null, [
4362
- In(o.$slots, "default", { widgetName: n.value }, void 0, !0),
4363
- B("div", Hu, [
4364
- B("div", Wu, [
4358
+ const a = be("el-icon");
4359
+ return z(), V(_t, null, [
4360
+ Tn(o.$slots, "default", { widgetName: n.value }, void 0, !0),
4361
+ D("div", Gu, [
4362
+ D("div", Xu, [
4365
4363
  it(Rt(Dr), { placement: "top-start" }, {
4366
- content: Pt(() => [...i[0] || (i[0] = [
4367
- Ee("Type in a query or use the suggested query buttons to run on your csv file", -1)
4364
+ content: Ot(() => [...i[0] || (i[0] = [
4365
+ Ae("Type in a query or use the suggested query buttons to run on your csv file", -1)
4368
4366
  ])]),
4369
- default: Pt(() => [
4367
+ default: Ot(() => [
4370
4368
  it(a, { color: "#8300BF" }, {
4371
- default: Pt(() => [
4372
- it(Rt(Or))
4369
+ default: Ot(() => [
4370
+ it(Rt(Fr))
4373
4371
  ]),
4374
4372
  _: 1
4375
4373
  })
@@ -4377,31 +4375,31 @@ const Hu = { class: "data-explorer-wrap" }, Wu = { class: "data-explorer-info" }
4377
4375
  _: 1
4378
4376
  })
4379
4377
  ]),
4380
- it(Rt(po), { srcUrl: r.value }, null, 8, ["srcUrl"])
4378
+ it(Rt(fo), { srcUrl: r.value }, null, 8, ["srcUrl"])
4381
4379
  ])
4382
4380
  ], 64);
4383
4381
  };
4384
4382
  }
4385
- }), mr = (t, e) => {
4383
+ }), _r = (t, e) => {
4386
4384
  const n = t.__vccOpts || t;
4387
4385
  for (const [r, o] of e)
4388
4386
  n[r] = o;
4389
4387
  return n;
4390
- }, rs = /* @__PURE__ */ mr(Qu, [["__scopeId", "data-v-08f7f19e"]]), Ku = { class: "umap-wrap" }, Ju = /* @__PURE__ */ Object.assign({
4388
+ }, ts = /* @__PURE__ */ _r(Wu, [["__scopeId", "data-v-08f7f19e"]]), Hu = { class: "umap-wrap" }, Qu = /* @__PURE__ */ Object.assign({
4391
4389
  inheritAttrs: !1
4392
4390
  }, {
4393
4391
  __name: "Umap",
4394
4392
  setup(t) {
4395
- const e = _r(), n = S("Data Explorer"), r = Z(() => Rt(e?.s3Url));
4396
- return (o, i) => (z(), Y(_t, null, [
4397
- In(o.$slots, "default", { widgetName: n.value }, void 0, !0),
4398
- B("div", Ku, [
4399
- it(Rt(Gu), { srcUrl: r.value }, null, 8, ["srcUrl"])
4393
+ const e = pr(), n = S("Data Explorer"), r = Z(() => Rt(e?.s3Url));
4394
+ return (o, i) => (z(), V(_t, null, [
4395
+ Tn(o.$slots, "default", { widgetName: n.value }, void 0, !0),
4396
+ D("div", Hu, [
4397
+ it(Rt(Vu), { srcUrl: r.value }, null, 8, ["srcUrl"])
4400
4398
  ])
4401
4399
  ], 64));
4402
4400
  }
4403
- }), os = /* @__PURE__ */ mr(Ju, [["__scopeId", "data-v-c778c86e"]]);
4401
+ }), es = /* @__PURE__ */ _r(Qu, [["__scopeId", "data-v-c778c86e"]]);
4404
4402
  export {
4405
- rs as DataExplorer,
4406
- os as UMAP
4403
+ ts as DataExplorer,
4404
+ es as UMAP
4407
4405
  };