precision-dashwidgets 0.3.3 → 0.3.4

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,4 +1,4 @@
1
- import { defineComponent as _e, createElementBlock as O, openBlock as F, createElementVNode as N, ref as R, computed as j, watch as Q, onMounted as Ve, onBeforeUnmount as Rt, createCommentVNode as Ce, withDirectives as Te, vModelText as un, Fragment as re, renderList as ve, toDisplayString as G, vModelSelect as _t, createBlock as sn, createVNode as oe, vShow as Vn, normalizeStyle as Wn, onUnmounted as jn, resolveComponent as bt, normalizeClass as Hn, withCtx as Pe, createTextVNode as At, inject as Xn, unref as we, watchEffect as Gn, renderSlot as Nt } from "vue";
1
+ import { defineComponent as _e, createElementBlock as O, openBlock as B, createElementVNode as N, ref as T, computed as j, watch as Q, onMounted as Ve, onBeforeUnmount as Tt, withDirectives as Re, vModelText as ln, Fragment as re, renderList as ve, toDisplayString as G, vModelSelect as _t, createCommentVNode as Ee, createBlock as sn, createVNode as oe, vShow as Vn, normalizeStyle as Wn, onUnmounted as jn, resolveComponent as bt, normalizeClass as Hn, withCtx as Pe, createTextVNode as At, inject as Xn, unref as we, watchEffect as Gn, renderSlot as Nt } from "vue";
2
2
  import { ElTooltip as Qn } from "element-plus";
3
3
  import { defineStore as Kn } from "pinia";
4
4
  /*! Element Plus Icons Vue v2.3.2 */
@@ -6,7 +6,7 @@ var Jn = /* @__PURE__ */ _e({
6
6
  name: "InfoFilled",
7
7
  __name: "info-filled",
8
8
  setup(e) {
9
- return (t, n) => (F(), O("svg", {
9
+ return (t, n) => (B(), O("svg", {
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  viewBox: "0 0 1024 1024"
12
12
  }, [
@@ -20,24 +20,24 @@ var Jn = /* @__PURE__ */ _e({
20
20
  function W(e) {
21
21
  return e != null && typeof e == "object" && e["@@functional/placeholder"] === !0;
22
22
  }
23
- function Me(e) {
23
+ function Ce(e) {
24
24
  return function t(n) {
25
25
  return arguments.length === 0 || W(n) ? t : e.apply(this, arguments);
26
26
  };
27
27
  }
28
- function Ee(e) {
28
+ function Me(e) {
29
29
  return function t(n, r) {
30
30
  switch (arguments.length) {
31
31
  case 0:
32
32
  return t;
33
33
  case 1:
34
- return W(n) ? t : Me(function(a) {
34
+ return W(n) ? t : Ce(function(a) {
35
35
  return e(n, a);
36
36
  });
37
37
  default:
38
- return W(n) && W(r) ? t : W(n) ? Me(function(a) {
38
+ return W(n) && W(r) ? t : W(n) ? Ce(function(a) {
39
39
  return e(a, r);
40
- }) : W(r) ? Me(function(a) {
40
+ }) : W(r) ? Ce(function(a) {
41
41
  return e(n, a);
42
42
  }) : e(n, r);
43
43
  }
@@ -49,29 +49,29 @@ function er(e) {
49
49
  case 0:
50
50
  return t;
51
51
  case 1:
52
- return W(n) ? t : Ee(function(i, l) {
53
- return e(n, i, l);
52
+ return W(n) ? t : Me(function(i, u) {
53
+ return e(n, i, u);
54
54
  });
55
55
  case 2:
56
- return W(n) && W(r) ? t : W(n) ? Ee(function(i, l) {
57
- return e(i, r, l);
58
- }) : W(r) ? Ee(function(i, l) {
59
- return e(n, i, l);
60
- }) : Me(function(i) {
56
+ return W(n) && W(r) ? t : W(n) ? Me(function(i, u) {
57
+ return e(i, r, u);
58
+ }) : W(r) ? Me(function(i, u) {
59
+ return e(n, i, u);
60
+ }) : Ce(function(i) {
61
61
  return e(n, r, i);
62
62
  });
63
63
  default:
64
- return W(n) && W(r) && W(a) ? t : W(n) && W(r) ? Ee(function(i, l) {
65
- return e(i, l, a);
66
- }) : W(n) && W(a) ? Ee(function(i, l) {
67
- return e(i, r, l);
68
- }) : W(r) && W(a) ? Ee(function(i, l) {
69
- return e(n, i, l);
70
- }) : W(n) ? Me(function(i) {
64
+ return W(n) && W(r) && W(a) ? t : W(n) && W(r) ? Me(function(i, u) {
65
+ return e(i, u, a);
66
+ }) : W(n) && W(a) ? Me(function(i, u) {
67
+ return e(i, r, u);
68
+ }) : W(r) && W(a) ? Me(function(i, u) {
69
+ return e(n, i, u);
70
+ }) : W(n) ? Ce(function(i) {
71
71
  return e(i, r, a);
72
- }) : W(r) ? Me(function(i) {
72
+ }) : W(r) ? Ce(function(i) {
73
73
  return e(n, i, a);
74
- }) : W(a) ? Me(function(i) {
74
+ }) : W(a) ? Ce(function(i) {
75
75
  return e(n, r, i);
76
76
  }) : e(n, r, a);
77
77
  }
@@ -84,7 +84,7 @@ function nr(e, t) {
84
84
  var n = e < 0 ? t.length + e : e;
85
85
  return t[n];
86
86
  }
87
- var rr = /* @__PURE__ */ Ee(function(e, t) {
87
+ var rr = /* @__PURE__ */ Me(function(e, t) {
88
88
  return t == null || t !== t ? e : t;
89
89
  });
90
90
  function ar(e, t) {
@@ -100,19 +100,19 @@ var or = /* @__PURE__ */ er(function(e, t, n) {
100
100
  return rr(e, ar(t, n));
101
101
  });
102
102
  const Lt = Kn("duckdb", () => {
103
- const e = R(null), t = R(!1), n = R(!1), r = R(""), a = R(/* @__PURE__ */ new Map()), i = R(/* @__PURE__ */ new Map()), l = R(/* @__PURE__ */ new Map());
104
- let u = null;
105
- const f = j(() => t.value && !r.value), c = j(() => (_) => (console.log(_), a.value.get(_))), d = j(() => (_) => {
106
- const E = a.value.get(_);
107
- return E && !E.isLoading && !E.error;
103
+ const e = T(null), t = T(!1), n = T(!1), r = T(""), a = T(/* @__PURE__ */ new Map()), i = T(/* @__PURE__ */ new Map()), u = T(/* @__PURE__ */ new Map());
104
+ let l = null;
105
+ const f = j(() => t.value && !r.value), c = j(() => (_) => a.value.get(_)), d = j(() => (_) => {
106
+ const M = a.value.get(_);
107
+ return M && !M.isLoading && !M.error;
108
108
  }), y = j(() => i.value.size), w = j(() => i.value.size > 0), A = async () => {
109
109
  if (typeof window > "u" || typeof Worker > "u") {
110
110
  const _ = "DuckDB can only be initialized in the browser.";
111
111
  throw r.value = _, new Error(_);
112
112
  }
113
- return e.value ? e.value : u ? (await u, e.value) : (n.value = !0, r.value = "", u = (async () => {
113
+ return e.value ? e.value : l ? (await l, e.value) : (n.value = !0, r.value = "", l = (async () => {
114
114
  try {
115
- const _ = await import("./duckdb-browser-CI2dpY-v-CoCsU0kJ.mjs"), E = {
115
+ const _ = await import("./duckdb-browser-CI2dpY-v-CoCsU0kJ.mjs"), M = {
116
116
  mvp: {
117
117
  mainModule: "/static/duckdb/duckdb-mvp.wasm",
118
118
  mainWorker: "/static/duckdb/duckdb-browser-mvp.worker.js"
@@ -121,47 +121,47 @@ const Lt = Kn("duckdb", () => {
121
121
  mainModule: "/static/duckdb/duckdb-eh.wasm",
122
122
  mainWorker: "/static/duckdb/duckdb-browser-eh.worker.js"
123
123
  }
124
- }, s = await _.selectBundle(E), p = new Worker(s.mainWorker), o = new _.ConsoleLogger(_.LogLevel.WARNING);
124
+ }, s = await _.selectBundle(M), p = new Worker(s.mainWorker), o = new _.ConsoleLogger(_.LogLevel.WARNING);
125
125
  return e.value = new _.AsyncDuckDB(o, p), await e.value.instantiate(s.mainModule), t.value = !0, e.value;
126
126
  } catch (_) {
127
127
  throw r.value = `Failed to initialize DuckDB: ${(_ == null ? void 0 : _.message) || _}`, e.value = null, _;
128
128
  } finally {
129
- n.value = !1, u = null;
129
+ n.value = !1, l = null;
130
130
  }
131
- })(), await u, e.value);
132
- }, M = async (_) => {
131
+ })(), await l, e.value);
132
+ }, C = async (_) => {
133
133
  e.value || await A();
134
- const E = await e.value.connect(), s = _ || `conn_${Date.now()}_${Math.random().toString(36).slice(2, 11)}`;
134
+ const M = await e.value.connect(), s = _ || `conn_${Date.now()}_${Math.random().toString(36).slice(2, 11)}`;
135
135
  return i.value.set(s, {
136
- connection: E,
136
+ connection: M,
137
137
  viewerId: s,
138
138
  createdAt: /* @__PURE__ */ new Date()
139
- }), { connection: E, connectionId: s };
139
+ }), { connection: M, connectionId: s };
140
140
  }, S = async (_) => {
141
- const E = i.value.get(_);
142
- E && (await E.connection.close(), i.value.delete(_), $(_), i.value.size === 0 && console.log("No active connections remaining. Keeping DuckDB instance for potential reuse."));
141
+ const M = i.value.get(_);
142
+ M && (await M.connection.close(), i.value.delete(_), $(_), i.value.size === 0 && console.log("No active connections remaining. Keeping DuckDB instance for potential reuse."));
143
143
  }, $ = (_) => {
144
- for (const [E, s] of l.value)
145
- s.delete(_), s.size === 0 && console.log(`File ${E} is no longer used by any viewers`);
146
- }, k = (_, E) => {
147
- l.value.has(_) || l.value.set(_, /* @__PURE__ */ new Set()), l.value.get(_).add(E);
148
- }, B = async (_) => {
149
- const E = a.value.get(_);
150
- if (E && E.tableName)
144
+ for (const [M, s] of u.value)
145
+ s.delete(_), s.size === 0 && console.log(`File ${M} is no longer used by any viewers`);
146
+ }, k = (_, M) => {
147
+ u.value.has(_) || u.value.set(_, /* @__PURE__ */ new Set()), u.value.get(_).add(M);
148
+ }, F = async (_) => {
149
+ const M = a.value.get(_);
150
+ if (M && M.tableName)
151
151
  try {
152
152
  const s = await e.value.connect();
153
- await s.query(`DROP TABLE IF EXISTS ${E.tableName};`), await s.close();
153
+ await s.query(`DROP TABLE IF EXISTS ${M.tableName};`), await s.close();
154
154
  } catch (s) {
155
- console.warn(`Failed to drop table ${E.tableName}:`, s);
155
+ console.warn(`Failed to drop table ${M.tableName}:`, s);
156
156
  }
157
- a.value.delete(_), l.value.delete(_);
158
- }, D = async (_, E, s = "my_data", p = {}, o = null, v = null) => {
157
+ a.value.delete(_), u.value.delete(_);
158
+ }, D = async (_, M, s = "my_data", p = {}, o = null, v = null) => {
159
159
  const g = v || _, h = a.value.get(g);
160
- if (console.log(a.value), h && !h.isLoading && !h.error)
161
- return console.log(`File already loaded using stable key ${g}, reusing table: ${h.tableName}`), o && k(g, o), h.tableName;
160
+ if (h && !h.isLoading && !h.error)
161
+ return o && k(g, o), h.tableName;
162
162
  f.value || await A(), a.value.set(g, {
163
163
  tableName: s,
164
- fileType: E,
164
+ fileType: M,
165
165
  fileUrl: _,
166
166
  // Store the current URL for reference
167
167
  isLoading: !0,
@@ -172,19 +172,19 @@ const Lt = Kn("duckdb", () => {
172
172
  if (!m.ok)
173
173
  throw new Error(`Failed to fetch file: ${m.status} ${m.statusText}`);
174
174
  let x;
175
- if (E === "csv") {
175
+ if (M === "csv") {
176
176
  const b = await m.text(), L = await new Blob([b], { type: "text/csv" }).arrayBuffer();
177
177
  x = new Uint8Array(L);
178
178
  } else {
179
179
  const b = await m.arrayBuffer();
180
180
  x = new Uint8Array(b);
181
181
  }
182
- const T = `${v || s}.${E}`;
183
- await e.value.registerFileBuffer(T, x);
184
- const C = await e.value.connect();
182
+ const R = `${v || s}.${M}`;
183
+ await e.value.registerFileBuffer(R, x);
184
+ const E = await e.value.connect();
185
185
  try {
186
186
  let b;
187
- if (E === "csv") {
187
+ if (M === "csv") {
188
188
  const I = {
189
189
  header: !0,
190
190
  delimiter: ",",
@@ -192,20 +192,20 @@ const Lt = Kn("duckdb", () => {
192
192
  };
193
193
  b = `
194
194
  CREATE OR REPLACE TABLE ${s} AS
195
- SELECT * FROM read_csv('${T}', header=${I.header}, delim='${I.delimiter}');
195
+ SELECT * FROM read_csv('${R}', header=${I.header}, delim='${I.delimiter}');
196
196
  `;
197
- } else if (E === "parquet")
197
+ } else if (M === "parquet")
198
198
  b = `
199
199
  CREATE OR REPLACE TABLE ${s} AS
200
- SELECT * FROM read_parquet('${T}');
200
+ SELECT * FROM read_parquet('${R}');
201
201
  `;
202
202
  else
203
- throw new Error(`Unsupported file type: ${E}`);
204
- await C.query(b);
205
- const L = (await C.query(`SELECT COUNT(*) as count FROM ${s};`)).toArray()[0].count;
203
+ throw new Error(`Unsupported file type: ${M}`);
204
+ await E.query(b);
205
+ const L = (await E.query(`SELECT COUNT(*) as count FROM ${s};`)).toArray()[0].count;
206
206
  return a.value.set(g, {
207
207
  tableName: s,
208
- fileType: E,
208
+ fileType: M,
209
209
  fileUrl: _,
210
210
  // Store current URL for reference
211
211
  isLoading: !1,
@@ -214,21 +214,21 @@ const Lt = Kn("duckdb", () => {
214
214
  loadedAt: /* @__PURE__ */ new Date()
215
215
  }), o && k(g, o), s;
216
216
  } finally {
217
- await C.close();
217
+ await E.close();
218
218
  }
219
219
  } catch (m) {
220
220
  throw a.value.set(g, {
221
221
  tableName: s,
222
- fileType: E,
222
+ fileType: M,
223
223
  fileUrl: _,
224
224
  isLoading: !1,
225
225
  error: m.message
226
226
  }), m;
227
227
  }
228
- }, z = async (_, E) => {
229
- const s = i.value.get(E);
228
+ }, z = async (_, M) => {
229
+ const s = i.value.get(M);
230
230
  if (!s)
231
- throw new Error(`Connection not found: ${E}`);
231
+ throw new Error(`Connection not found: ${M}`);
232
232
  return (await s.connection.query(_)).toArray().map((p) => {
233
233
  const o = {};
234
234
  for (const [v, g] of Object.entries(p))
@@ -236,9 +236,9 @@ const Lt = Kn("duckdb", () => {
236
236
  return o;
237
237
  });
238
238
  }, q = async () => {
239
- for (const [_, E] of i.value)
239
+ for (const [_, M] of i.value)
240
240
  try {
241
- await E.connection.close(), console.log(`Closed connection: ${_}`);
241
+ await M.connection.close(), console.log(`Closed connection: ${_}`);
242
242
  } catch (s) {
243
243
  console.warn(`Error closing connection ${_}:`, s);
244
244
  }
@@ -250,24 +250,24 @@ const Lt = Kn("duckdb", () => {
250
250
  }
251
251
  e.value = null;
252
252
  }
253
- t.value = !1, a.value.clear(), l.value.clear(), r.value = "";
253
+ t.value = !1, a.value.clear(), u.value.clear(), r.value = "";
254
254
  }, H = async (_ = !1) => {
255
255
  _ || i.value.size === 0 ? await q() : console.log(`Skipping global cleanup. ${i.value.size} active connections remaining.`);
256
256
  }, V = () => {
257
257
  const _ = [];
258
- for (const [E, s] of i.value)
258
+ for (const [M, s] of i.value)
259
259
  _.push({
260
- connectionId: E,
260
+ connectionId: M,
261
261
  viewerId: s.viewerId,
262
262
  createdAt: s.createdAt
263
263
  });
264
264
  return _;
265
265
  }, K = () => {
266
266
  const _ = [];
267
- for (const [E, s] of l.value) {
268
- const p = a.value.get(E);
267
+ for (const [M, s] of u.value) {
268
+ const p = a.value.get(M);
269
269
  _.push({
270
- fileId: E,
270
+ fileId: M,
271
271
  tableName: p == null ? void 0 : p.tableName,
272
272
  fileType: p == null ? void 0 : p.fileType,
273
273
  fileUrl: p == null ? void 0 : p.fileUrl,
@@ -277,7 +277,7 @@ const Lt = Kn("duckdb", () => {
277
277
  });
278
278
  }
279
279
  return _;
280
- }, X = R(null), P = R(0);
280
+ }, X = T(null), P = T(0);
281
281
  function ne(_) {
282
282
  return `"${String(_).replace(/"/g, '""')}"`;
283
283
  }
@@ -289,7 +289,7 @@ const Lt = Kn("duckdb", () => {
289
289
  initError: r,
290
290
  loadedFiles: a,
291
291
  connections: i,
292
- fileUsage: l,
292
+ fileUsage: u,
293
293
  sharedResultName: X,
294
294
  sharedVersion: P,
295
295
  // Getters
@@ -300,37 +300,37 @@ const Lt = Kn("duckdb", () => {
300
300
  hasActiveConnections: w,
301
301
  // Actions
302
302
  initDuckDB: A,
303
- createConnection: M,
303
+ createConnection: C,
304
304
  closeConnection: S,
305
305
  cleanupViewerFileUsage: $,
306
306
  trackFileUsage: k,
307
- unloadFile: B,
307
+ unloadFile: F,
308
308
  loadFile: D,
309
309
  executeQuery: z,
310
310
  cleanup: H,
311
311
  performGlobalCleanup: q,
312
312
  getConnectionInfo: V,
313
313
  getFileUsageInfo: K,
314
- publishViewFromQuery: async (_, E, s) => {
314
+ publishViewFromQuery: async (_, M, s) => {
315
315
  var p;
316
316
  const o = (p = i.value.get(s)) == null ? void 0 : p.connection;
317
317
  if (!o) throw new Error(`Connection not found: ${s}`);
318
- await o.query(`CREATE OR REPLACE VIEW ${ne(_)} AS ${E}`), X.value = _, P.value++;
318
+ await o.query(`CREATE OR REPLACE VIEW ${ne(_)} AS ${M}`), X.value = _, P.value++;
319
319
  },
320
- publishTableFromQuery: async (_, E, s) => {
320
+ publishTableFromQuery: async (_, M, s) => {
321
321
  var p;
322
322
  const o = (p = i.value.get(s)) == null ? void 0 : p.connection;
323
323
  if (!o) throw new Error(`Connection not found: ${s}`);
324
- await o.query(`CREATE OR REPLACE TABLE ${ne(_)} AS ${E}`), X.value = _, P.value++;
324
+ await o.query(`CREATE OR REPLACE TABLE ${ne(_)} AS ${M}`), X.value = _, P.value++;
325
325
  },
326
- formatIdFromUrl: (_) => (console.log(_), "url_" + btoa(_).replace(/=+$/, "").replace(/[+/]/g, "_"))
326
+ formatIdFromUrl: (_) => "url_" + btoa(_).replace(/=+$/, "").replace(/[+/]/g, "_")
327
327
  };
328
328
  }), Ie = (e, t) => {
329
329
  const n = e.__vccOpts || e;
330
330
  for (const [r, a] of t)
331
331
  n[r] = a;
332
332
  return n;
333
- }, ir = { class: "dashboard-container" }, lr = { class: "dashboard-header" }, ur = { class: "dashboard-content" }, sr = {
333
+ }, ir = { class: "dashboard-container" }, ur = { class: "dashboard-header" }, lr = { class: "dashboard-content" }, sr = {
334
334
  key: 0,
335
335
  class: "query-panel"
336
336
  }, cr = { class: "query-examples" }, fr = ["onClick"], hr = {
@@ -372,11 +372,11 @@ const Lt = Kn("duckdb", () => {
372
372
  },
373
373
  emits: ["query-results"],
374
374
  setup(e, { emit: t }) {
375
- const n = e, r = t, a = Lt(), i = R({
375
+ const n = e, r = t, a = Lt(), i = T({
376
376
  header: !0,
377
377
  dynamicTyping: !0,
378
378
  delimiter: ","
379
- }), l = R(!1), u = R(!1), f = R(n.url), c = R("my_data"), d = R(""), y = R(null), w = R(""), A = R("table"), M = R(1), S = R(50), $ = R(null);
379
+ }), u = T(!1), l = T(!1), f = T(n.url), c = T("my_data"), d = T(""), y = T(null), w = T(""), A = T("table"), C = T(1), S = T(50), $ = T(null);
380
380
  Q(
381
381
  () => n.url,
382
382
  async (h) => {
@@ -389,12 +389,12 @@ const Lt = Kn("duckdb", () => {
389
389
  },
390
390
  { immediate: !0 }
391
391
  );
392
- const k = j(() => a.isReady && $.value && !l.value), B = j(() => a.formatIdFromUrl(n.url)), D = j(() => l.value ? "Loading..." : a.isInitializing ? "Initializing..." : a.isReady ? k.value ? "Connected" : "Not Connected" : "Not Ready"), z = j(() => !y.value || !Array.isArray(y.value) || y.value.length === 0 ? [] : Object.keys(y.value[0] || {})), q = j(() => !y.value || !Array.isArray(y.value) ? 0 : Math.ceil(y.value.length / S.value)), H = j(() => {
392
+ const k = j(() => a.isReady && $.value && !u.value), F = j(() => a.formatIdFromUrl(n.url)), D = j(() => u.value ? "Loading..." : a.isInitializing ? "Initializing..." : a.isReady ? k.value ? "Connected" : "Not Connected" : "Not Ready"), z = j(() => !y.value || !Array.isArray(y.value) || y.value.length === 0 ? [] : Object.keys(y.value[0] || {})), q = j(() => !y.value || !Array.isArray(y.value) ? 0 : Math.ceil(y.value.length / S.value)), H = j(() => {
393
393
  if (!y.value || !Array.isArray(y.value)) return [];
394
- const h = (M.value - 1) * S.value, m = h + S.value;
394
+ const h = (C.value - 1) * S.value, m = h + S.value;
395
395
  return y.value.slice(h, m);
396
396
  }), V = j(() => [
397
- { name: "Show All", query: "SELECT * FROM data LIMIT 100;" },
397
+ { name: "Show All", query: "SELECT * FROM data;" },
398
398
  { name: "Count Rows", query: "SELECT COUNT(*) as row_count FROM data;" },
399
399
  {
400
400
  name: "Group By",
@@ -435,7 +435,7 @@ const Lt = Kn("duckdb", () => {
435
435
  w.value = "Please provide a valid S3 URL";
436
436
  return;
437
437
  }
438
- l.value = !0, w.value = "";
438
+ u.value = !0, w.value = "";
439
439
  try {
440
440
  const h = n.fileId ? `file_${n.fileId}` : `data_${Date.now()}`, m = await a.loadFile(
441
441
  f.value,
@@ -445,12 +445,12 @@ const Lt = Kn("duckdb", () => {
445
445
  i.value,
446
446
  n.viewerId,
447
447
  // Pass viewer ID for tracking
448
- B.value
448
+ F.value
449
449
  );
450
- c.value = m, p("SELECT * FROM data LIMIT 100;");
450
+ c.value = m, p("SELECT * FROM data;");
451
451
  } catch {
452
452
  } finally {
453
- l.value = !1;
453
+ u.value = !1;
454
454
  }
455
455
  }, ne = (h) => !c.value || !h ? h : h.replace(/\bFROM\s+data\b/gi, `FROM ${c.value}`).replace(/\bJOIN\s+data\b/gi, `JOIN ${c.value}`).replace(/\bUPDATE\s+data\b/gi, `UPDATE ${c.value}`).replace(/\bINSERT\s+INTO\s+data\b/gi, `INSERT INTO ${c.value}`).replace(/\bINTO\s+data\b/gi, `INTO ${c.value}`).replace(/\btable_info\(\s*data\s*\)/gi, `table_info(${c.value})`).replace(/\bDESCRIBE\s+data\b/gi, `DESCRIBE ${c.value}`).replace(
456
456
  /\bPRAGMA\s+table_info\(\s*data\s*\)/gi,
@@ -464,7 +464,7 @@ const Lt = Kn("duckdb", () => {
464
464
  w.value = "No data table loaded";
465
465
  return;
466
466
  }
467
- u.value = !0, w.value = "", M.value = 1;
467
+ l.value = !0, w.value = "", C.value = 1;
468
468
  try {
469
469
  const h = ne(d.value.trim());
470
470
  y.value = await a.executeQuery(
@@ -477,12 +477,12 @@ const Lt = Kn("duckdb", () => {
477
477
  } catch (h) {
478
478
  console.error("Query execution failed:", h), w.value = `Query execution failed: ${h.message}`, y.value = null;
479
479
  } finally {
480
- u.value = !1;
480
+ l.value = !1;
481
481
  }
482
- }, E = (h) => {
483
- M.value = h;
482
+ }, M = (h) => {
483
+ C.value = h;
484
484
  }, s = (h) => {
485
- S.value = h, M.value = 1;
485
+ S.value = h, C.value = 1;
486
486
  }, p = (h) => {
487
487
  d.value = h;
488
488
  }, o = (h) => h == null ? "NULL" : typeof h == "number" ? Number.isInteger(h) ? h.toString() : h.toFixed(4) : typeof h == "string" && h.length > 100 ? h.substring(0, 100) + "..." : h.toString(), v = () => {
@@ -496,8 +496,8 @@ const Lt = Kn("duckdb", () => {
496
496
  }).join(",")
497
497
  )
498
498
  ].join(`
499
- `), x = new Blob([m], { type: "text/csv" }), T = URL.createObjectURL(x), C = document.createElement("a");
500
- C.href = T, C.download = "query-results.csv", C.click(), URL.revokeObjectURL(T);
499
+ `), x = new Blob([m], { type: "text/csv" }), R = URL.createObjectURL(x), E = document.createElement("a");
500
+ E.href = R, E.download = "query-results.csv", E.click(), URL.revokeObjectURL(R);
501
501
  }, g = () => {
502
502
  w.value = "";
503
503
  };
@@ -506,45 +506,45 @@ const Lt = Kn("duckdb", () => {
506
506
  }), jn(async () => {
507
507
  $.value && (a.activeConnectionCount, a.loadedFiles.size, await a.closeConnection($.value), a.activeConnectionCount, a.loadedFiles.size);
508
508
  }), (h, m) => {
509
- const x = bt("bf-button"), T = bt("el-pagination");
510
- return F(), O("div", ir, [
511
- N("header", lr, [
509
+ const x = bt("bf-button"), R = bt("el-pagination");
510
+ return B(), O("div", ir, [
511
+ N("header", ur, [
512
512
  m[3] || (m[3] = N("h1", null, "Data Explorer", -1)),
513
513
  N("div", {
514
- class: Hn(["status-indicator", { connected: k.value, loading: l.value }])
514
+ class: Hn(["status-indicator", { connected: k.value, loading: u.value }])
515
515
  }, G(D.value), 3)
516
516
  ]),
517
- N("div", ur, [
518
- k.value ? (F(), O("div", sr, [
517
+ N("div", lr, [
518
+ k.value ? (B(), O("div", sr, [
519
519
  m[5] || (m[5] = N("h3", null, "SQL Query", -1)),
520
520
  N("div", cr, [
521
521
  m[4] || (m[4] = N("span", null, "Quick queries:", -1)),
522
- (F(!0), O(re, null, ve(V.value, (C) => (F(), O("button", {
523
- key: C.name,
524
- onClick: (b) => p(C.query),
522
+ (B(!0), O(re, null, ve(V.value, (E) => (B(), O("button", {
523
+ key: E.name,
524
+ onClick: (b) => p(E.query),
525
525
  class: "example-btn"
526
- }, G(C.name), 9, fr))), 128))
526
+ }, G(E.name), 9, fr))), 128))
527
527
  ]),
528
- Te(N("textarea", {
529
- "onUpdate:modelValue": m[0] || (m[0] = (C) => d.value = C),
530
- placeholder: "SELECT * FROM data LIMIT 10;",
528
+ Re(N("textarea", {
529
+ "onUpdate:modelValue": m[0] || (m[0] = (E) => d.value = E),
530
+ placeholder: "SELECT * FROM data;",
531
531
  class: "query-textarea",
532
532
  rows: "4"
533
533
  }, null, 512), [
534
- [un, d.value]
534
+ [ln, d.value]
535
535
  ]),
536
536
  oe(x, {
537
537
  class: "execute-query-button",
538
538
  onClick: _,
539
- disabled: u.value || !d.value
539
+ disabled: l.value || !d.value
540
540
  }, {
541
541
  default: Pe(() => [
542
- At(G(u.value ? "Running..." : "Execute Query"), 1)
542
+ At(G(l.value ? "Running..." : "Execute Query"), 1)
543
543
  ]),
544
544
  _: 1
545
545
  }, 8, ["disabled"])
546
- ])) : Ce("", !0),
547
- y.value ? (F(), O("div", hr, [
546
+ ])) : Ee("", !0),
547
+ y.value ? (B(), O("div", hr, [
548
548
  N("h3", null, "Results (" + G(y.value.length) + " rows)", 1),
549
549
  N("div", dr, [
550
550
  N("div", pr, [
@@ -559,61 +559,61 @@ const Lt = Kn("duckdb", () => {
559
559
  })
560
560
  ]),
561
561
  N("div", vr, [
562
- A.value === "table" && q.value > 1 ? (F(), sn(T, {
562
+ A.value === "table" && q.value > 1 ? (B(), sn(R, {
563
563
  key: 0,
564
- "current-page": M.value,
565
- "onUpdate:currentPage": m[1] || (m[1] = (C) => M.value = C),
564
+ "current-page": C.value,
565
+ "onUpdate:currentPage": m[1] || (m[1] = (E) => C.value = E),
566
566
  "page-size": S.value,
567
567
  total: y.value.length,
568
568
  layout: "prev, pager, next",
569
- onCurrentChange: E,
569
+ onCurrentChange: M,
570
570
  class: "results-pagination"
571
- }, null, 8, ["current-page", "page-size", "total"])) : Ce("", !0)
571
+ }, null, 8, ["current-page", "page-size", "total"])) : Ee("", !0)
572
572
  ])
573
573
  ]),
574
574
  m[7] || (m[7] = N("div", { class: "pagination-wrapper" }, null, -1)),
575
- A.value === "table" ? (F(), O("div", mr, [
575
+ A.value === "table" ? (B(), O("div", mr, [
576
576
  N("table", gr, [
577
577
  N("thead", null, [
578
578
  N("tr", null, [
579
- (F(!0), O(re, null, ve(z.value, (C) => (F(), O("th", { key: C }, G(C), 1))), 128))
579
+ (B(!0), O(re, null, ve(z.value, (E) => (B(), O("th", { key: E }, G(E), 1))), 128))
580
580
  ])
581
581
  ]),
582
582
  N("tbody", null, [
583
- (F(!0), O(re, null, ve(H.value, (C, b) => (F(), O("tr", { key: b }, [
584
- (F(!0), O(re, null, ve(z.value, (L) => (F(), O("td", { key: L }, G(o(C[L])), 1))), 128))
583
+ (B(!0), O(re, null, ve(H.value, (E, b) => (B(), O("tr", { key: b }, [
584
+ (B(!0), O(re, null, ve(z.value, (L) => (B(), O("td", { key: L }, G(o(E[L])), 1))), 128))
585
585
  ]))), 128))
586
586
  ])
587
587
  ]),
588
- q.value > 1 ? (F(), O("div", yr, [
589
- oe(T, {
590
- "current-page": M.value,
591
- "onUpdate:currentPage": m[2] || (m[2] = (C) => M.value = C),
588
+ q.value > 1 ? (B(), O("div", yr, [
589
+ oe(R, {
590
+ "current-page": C.value,
591
+ "onUpdate:currentPage": m[2] || (m[2] = (E) => C.value = E),
592
592
  "page-size": S.value,
593
593
  total: y.value.length,
594
594
  layout: " prev, pager, next",
595
595
  "page-sizes": [25, 50, 100, 200, 500],
596
- onCurrentChange: E,
596
+ onCurrentChange: M,
597
597
  onSizeChange: s
598
598
  }, null, 8, ["current-page", "page-size", "total"])
599
- ])) : Ce("", !0)
600
- ])) : (F(), O("div", wr, [
599
+ ])) : Ee("", !0)
600
+ ])) : (B(), O("div", wr, [
601
601
  N("pre", null, G(JSON.stringify(y.value.slice(0, 100), null, 2)), 1)
602
602
  ]))
603
- ])) : Ce("", !0),
604
- w.value ? (F(), O("div", _r, [
603
+ ])) : Ee("", !0),
604
+ w.value ? (B(), O("div", _r, [
605
605
  m[8] || (m[8] = N("h3", null, "Error", -1)),
606
606
  N("p", null, G(w.value), 1),
607
607
  N("button", {
608
608
  onClick: g,
609
609
  class: "clear-error-btn"
610
610
  }, "Clear")
611
- ])) : Ce("", !0)
611
+ ])) : Ee("", !0)
612
612
  ])
613
613
  ]);
614
614
  };
615
615
  }
616
- }, Ar = /* @__PURE__ */ Ie(br, [["__scopeId", "data-v-ff1acf8c"]]), xr = { class: "app-container" }, Er = /* @__PURE__ */ _e({
616
+ }, Ar = /* @__PURE__ */ Ie(br, [["__scopeId", "data-v-b5de149e"]]), xr = { class: "app-container" }, Mr = /* @__PURE__ */ _e({
617
617
  __name: "DataExplorerWrap",
618
618
  props: {
619
619
  pkg: {},
@@ -624,11 +624,11 @@ const Lt = Kn("duckdb", () => {
624
624
  },
625
625
  emits: ["queryResults"],
626
626
  setup(e, { emit: t }) {
627
- const n = e, r = t, a = R([]), i = R(""), l = R("parquet"), u = R("");
627
+ const n = e, r = t, a = T([]), i = T(""), u = T("parquet"), l = T("");
628
628
  Ve(async () => {
629
- var w, A, M, S, $;
629
+ var w, A, C, S, $;
630
630
  if (n.srcUrl) {
631
- i.value = n.srcUrl, l.value = n.srcFileType ?? (n.srcUrl.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
631
+ i.value = n.srcUrl, u.value = n.srcFileType ?? (n.srcUrl.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
632
632
  return;
633
633
  }
634
634
  const k = or("", ["content", "id"], n.pkg);
@@ -638,16 +638,16 @@ const Lt = Kn("duckdb", () => {
638
638
  }
639
639
  try {
640
640
  await d(k);
641
- const B = (M = (A = (w = a.value) == null ? void 0 : w[0]) == null ? void 0 : A.content) == null ? void 0 : M.id;
642
- if (!B) {
641
+ const F = (C = (A = (w = a.value) == null ? void 0 : w[0]) == null ? void 0 : A.content) == null ? void 0 : C.id;
642
+ if (!F) {
643
643
  console.error("[DuckDBViewerWrapper] No files found in /view response.");
644
644
  return;
645
645
  }
646
- u.value = B, i.value = await y(k, B);
646
+ l.value = F, i.value = await y(k, F);
647
647
  const D = ($ = (S = n.pkg) == null ? void 0 : S.content) == null ? void 0 : $.packageType;
648
- l.value = D === "CSV" ? "csv" : "parquet";
649
- } catch (B) {
650
- console.error(B);
648
+ u.value = D === "CSV" ? "csv" : "parquet";
649
+ } catch (F) {
650
+ console.error(F);
651
651
  }
652
652
  });
653
653
  function f(w) {
@@ -658,26 +658,26 @@ const Lt = Kn("duckdb", () => {
658
658
  return w();
659
659
  }
660
660
  async function d(w) {
661
- const A = await c(), M = `${n.apiUrl}/packages/${w}/view?api_key=${A}`, S = await fetch(M);
661
+ const A = await c(), C = `${n.apiUrl}/packages/${w}/view?api_key=${A}`, S = await fetch(C);
662
662
  if (!S.ok) throw new Error(`view failed: ${S.status}`);
663
663
  a.value = await S.json();
664
664
  }
665
665
  async function y(w, A) {
666
- const M = await c(), S = `${n.apiUrl}/packages/${w}/files/${A}?api_key=${M}`, $ = await fetch(S);
666
+ const C = await c(), S = `${n.apiUrl}/packages/${w}/files/${A}?api_key=${C}`, $ = await fetch(S);
667
667
  if (!$.ok) throw new Error(`file url failed: ${$.status}`);
668
668
  return (await $.json()).url;
669
669
  }
670
- return (w, A) => (F(), O("div", xr, [
670
+ return (w, A) => (B(), O("div", xr, [
671
671
  oe(Ar, {
672
672
  url: i.value,
673
- "file-type": l.value,
674
- "file-id": u.value,
675
- onQueryResults: A[0] || (A[0] = (M) => f(M))
673
+ "file-type": u.value,
674
+ "file-id": l.value,
675
+ onQueryResults: A[0] || (A[0] = (C) => f(C))
676
676
  }, null, 8, ["url", "file-type", "file-id"])
677
677
  ]));
678
678
  }
679
- }), Cr = /* @__PURE__ */ Ie(Er, [["__scopeId", "data-v-7298e5bf"]]);
680
- var Mr = { value: () => {
679
+ }), Er = /* @__PURE__ */ Ie(Mr, [["__scopeId", "data-v-7298e5bf"]]);
680
+ var Cr = { value: () => {
681
681
  } };
682
682
  function It() {
683
683
  for (var e = 0, t = arguments.length, n = {}, r; e < t; ++e) {
@@ -699,13 +699,13 @@ function Sr(e, t) {
699
699
  Ke.prototype = It.prototype = {
700
700
  constructor: Ke,
701
701
  on: function(e, t) {
702
- var n = this._, r = Sr(e + "", n), a, i = -1, l = r.length;
702
+ var n = this._, r = Sr(e + "", n), a, i = -1, u = r.length;
703
703
  if (arguments.length < 2) {
704
- for (; ++i < l; ) if ((a = (e = r[i]).type) && (a = kr(n[a], e.name))) return a;
704
+ for (; ++i < u; ) if ((a = (e = r[i]).type) && (a = kr(n[a], e.name))) return a;
705
705
  return;
706
706
  }
707
707
  if (t != null && typeof t != "function") throw new Error("invalid callback: " + t);
708
- for (; ++i < l; )
708
+ for (; ++i < u; )
709
709
  if (a = (e = r[i]).type) n[a] = Yt(n[a], e.name, t);
710
710
  else if (t == null) for (a in n) n[a] = Yt(n[a], e.name, null);
711
711
  return this;
@@ -733,7 +733,7 @@ function kr(e, t) {
733
733
  function Yt(e, t, n) {
734
734
  for (var r = 0, a = e.length; r < a; ++r)
735
735
  if (e[r].name === t) {
736
- e[r] = Mr, e = e.slice(0, r).concat(e.slice(r + 1));
736
+ e[r] = Cr, e = e.slice(0, r).concat(e.slice(r + 1));
737
737
  break;
738
738
  }
739
739
  return n != null && e.push({ name: t, value: n }), e;
@@ -746,7 +746,7 @@ const Vt = {
746
746
  xml: "http://www.w3.org/XML/1998/namespace",
747
747
  xmlns: "http://www.w3.org/2000/xmlns/"
748
748
  };
749
- function ut(e) {
749
+ function lt(e) {
750
750
  var t = e += "", n = t.indexOf(":");
751
751
  return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), Vt.hasOwnProperty(t) ? { space: Vt[t], local: e } : e;
752
752
  }
@@ -756,27 +756,27 @@ function $r(e) {
756
756
  return n === xt && t.documentElement.namespaceURI === xt ? t.createElement(e) : t.createElementNS(n, e);
757
757
  };
758
758
  }
759
- function Tr(e) {
759
+ function Rr(e) {
760
760
  return function() {
761
761
  return this.ownerDocument.createElementNS(e.space, e.local);
762
762
  };
763
763
  }
764
764
  function cn(e) {
765
- var t = ut(e);
766
- return (t.local ? Tr : $r)(t);
765
+ var t = lt(e);
766
+ return (t.local ? Rr : $r)(t);
767
767
  }
768
- function Rr() {
768
+ function Tr() {
769
769
  }
770
770
  function Ut(e) {
771
- return e == null ? Rr : function() {
771
+ return e == null ? Tr : function() {
772
772
  return this.querySelector(e);
773
773
  };
774
774
  }
775
775
  function Nr(e) {
776
776
  typeof e != "function" && (e = Ut(e));
777
777
  for (var t = this._groups, n = t.length, r = new Array(n), a = 0; a < n; ++a)
778
- for (var i = t[a], l = i.length, u = r[a] = new Array(l), f, c, d = 0; d < l; ++d)
779
- (f = i[d]) && (c = e.call(f, f.__data__, d, i)) && ("__data__" in f && (c.__data__ = f.__data__), u[d] = c);
778
+ for (var i = t[a], u = i.length, l = r[a] = new Array(u), f, c, d = 0; d < u; ++d)
779
+ (f = i[d]) && (c = e.call(f, f.__data__, d, i)) && ("__data__" in f && (c.__data__ = f.__data__), l[d] = c);
780
780
  return new te(r, this._parents);
781
781
  }
782
782
  function Lr(e) {
@@ -795,11 +795,11 @@ function Ur(e) {
795
795
  return Lr(e.apply(this, arguments));
796
796
  };
797
797
  }
798
- function Fr(e) {
798
+ function Br(e) {
799
799
  typeof e == "function" ? e = Ur(e) : e = fn(e);
800
800
  for (var t = this._groups, n = t.length, r = [], a = [], i = 0; i < n; ++i)
801
- for (var l = t[i], u = l.length, f, c = 0; c < u; ++c)
802
- (f = l[c]) && (r.push(e.call(f, f.__data__, c, l)), a.push(f));
801
+ for (var u = t[i], l = u.length, f, c = 0; c < l; ++c)
802
+ (f = u[c]) && (r.push(e.call(f, f.__data__, c, u)), a.push(f));
803
803
  return new te(r, a);
804
804
  }
805
805
  function hn(e) {
@@ -812,10 +812,10 @@ function dn(e) {
812
812
  return t.matches(e);
813
813
  };
814
814
  }
815
- var Br = Array.prototype.find;
815
+ var Fr = Array.prototype.find;
816
816
  function Or(e) {
817
817
  return function() {
818
- return Br.call(this.children, e);
818
+ return Fr.call(this.children, e);
819
819
  };
820
820
  }
821
821
  function Pr() {
@@ -839,8 +839,8 @@ function Vr(e) {
839
839
  function Wr(e) {
840
840
  typeof e != "function" && (e = hn(e));
841
841
  for (var t = this._groups, n = t.length, r = new Array(n), a = 0; a < n; ++a)
842
- for (var i = t[a], l = i.length, u = r[a] = [], f, c = 0; c < l; ++c)
843
- (f = i[c]) && e.call(f, f.__data__, c, i) && u.push(f);
842
+ for (var i = t[a], u = i.length, l = r[a] = [], f, c = 0; c < u; ++c)
843
+ (f = i[c]) && e.call(f, f.__data__, c, i) && l.push(f);
844
844
  return new te(r, this._parents);
845
845
  }
846
846
  function pn(e) {
@@ -873,19 +873,19 @@ function Hr(e) {
873
873
  };
874
874
  }
875
875
  function Xr(e, t, n, r, a, i) {
876
- for (var l = 0, u, f = t.length, c = i.length; l < c; ++l)
877
- (u = t[l]) ? (u.__data__ = i[l], r[l] = u) : n[l] = new tt(e, i[l]);
878
- for (; l < f; ++l)
879
- (u = t[l]) && (a[l] = u);
880
- }
881
- function Gr(e, t, n, r, a, i, l) {
882
- var u, f, c = /* @__PURE__ */ new Map(), d = t.length, y = i.length, w = new Array(d), A;
883
- for (u = 0; u < d; ++u)
884
- (f = t[u]) && (w[u] = A = l.call(f, f.__data__, u, t) + "", c.has(A) ? a[u] = f : c.set(A, f));
885
- for (u = 0; u < y; ++u)
886
- A = l.call(e, i[u], u, i) + "", (f = c.get(A)) ? (r[u] = f, f.__data__ = i[u], c.delete(A)) : n[u] = new tt(e, i[u]);
887
- for (u = 0; u < d; ++u)
888
- (f = t[u]) && c.get(w[u]) === f && (a[u] = f);
876
+ for (var u = 0, l, f = t.length, c = i.length; u < c; ++u)
877
+ (l = t[u]) ? (l.__data__ = i[u], r[u] = l) : n[u] = new tt(e, i[u]);
878
+ for (; u < f; ++u)
879
+ (l = t[u]) && (a[u] = l);
880
+ }
881
+ function Gr(e, t, n, r, a, i, u) {
882
+ var l, f, c = /* @__PURE__ */ new Map(), d = t.length, y = i.length, w = new Array(d), A;
883
+ for (l = 0; l < d; ++l)
884
+ (f = t[l]) && (w[l] = A = u.call(f, f.__data__, l, t) + "", c.has(A) ? a[l] = f : c.set(A, f));
885
+ for (l = 0; l < y; ++l)
886
+ A = u.call(e, i[l], l, i) + "", (f = c.get(A)) ? (r[l] = f, f.__data__ = i[l], c.delete(A)) : n[l] = new tt(e, i[l]);
887
+ for (l = 0; l < d; ++l)
888
+ (f = t[l]) && c.get(w[l]) === f && (a[l] = f);
889
889
  }
890
890
  function Qr(e) {
891
891
  return e.__data__;
@@ -894,16 +894,16 @@ function Kr(e, t) {
894
894
  if (!arguments.length) return Array.from(this, Qr);
895
895
  var n = t ? Gr : Xr, r = this._parents, a = this._groups;
896
896
  typeof e != "function" && (e = Hr(e));
897
- for (var i = a.length, l = new Array(i), u = new Array(i), f = new Array(i), c = 0; c < i; ++c) {
898
- var d = r[c], y = a[c], w = y.length, A = Jr(e.call(d, d && d.__data__, c, r)), M = A.length, S = u[c] = new Array(M), $ = l[c] = new Array(M), k = f[c] = new Array(w);
897
+ for (var i = a.length, u = new Array(i), l = new Array(i), f = new Array(i), c = 0; c < i; ++c) {
898
+ var d = r[c], y = a[c], w = y.length, A = Jr(e.call(d, d && d.__data__, c, r)), C = A.length, S = l[c] = new Array(C), $ = u[c] = new Array(C), k = f[c] = new Array(w);
899
899
  n(d, y, S, $, k, A, t);
900
- for (var B = 0, D = 0, z, q; B < M; ++B)
901
- if (z = S[B]) {
902
- for (B >= D && (D = B + 1); !(q = $[D]) && ++D < M; ) ;
900
+ for (var F = 0, D = 0, z, q; F < C; ++F)
901
+ if (z = S[F]) {
902
+ for (F >= D && (D = F + 1); !(q = $[D]) && ++D < C; ) ;
903
903
  z._next = q || null;
904
904
  }
905
905
  }
906
- return l = new te(l, r), l._enter = u, l._exit = f, l;
906
+ return u = new te(u, r), u._enter = l, u._exit = f, u;
907
907
  }
908
908
  function Jr(e) {
909
909
  return typeof e == "object" && "length" in e ? e : Array.from(e);
@@ -916,17 +916,17 @@ function ea(e, t, n) {
916
916
  return typeof e == "function" ? (r = e(r), r && (r = r.selection())) : r = r.append(e + ""), t != null && (a = t(a), a && (a = a.selection())), n == null ? i.remove() : n(i), r && a ? r.merge(a).order() : a;
917
917
  }
918
918
  function ta(e) {
919
- for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, a = n.length, i = r.length, l = Math.min(a, i), u = new Array(a), f = 0; f < l; ++f)
920
- for (var c = n[f], d = r[f], y = c.length, w = u[f] = new Array(y), A, M = 0; M < y; ++M)
921
- (A = c[M] || d[M]) && (w[M] = A);
919
+ for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, a = n.length, i = r.length, u = Math.min(a, i), l = new Array(a), f = 0; f < u; ++f)
920
+ for (var c = n[f], d = r[f], y = c.length, w = l[f] = new Array(y), A, C = 0; C < y; ++C)
921
+ (A = c[C] || d[C]) && (w[C] = A);
922
922
  for (; f < a; ++f)
923
- u[f] = n[f];
924
- return new te(u, this._parents);
923
+ l[f] = n[f];
924
+ return new te(l, this._parents);
925
925
  }
926
926
  function na() {
927
927
  for (var e = this._groups, t = -1, n = e.length; ++t < n; )
928
- for (var r = e[t], a = r.length - 1, i = r[a], l; --a >= 0; )
929
- (l = r[a]) && (i && l.compareDocumentPosition(i) ^ 4 && i.parentNode.insertBefore(l, i), i = l);
928
+ for (var r = e[t], a = r.length - 1, i = r[a], u; --a >= 0; )
929
+ (u = r[a]) && (i && u.compareDocumentPosition(i) ^ 4 && i.parentNode.insertBefore(u, i), i = u);
930
930
  return this;
931
931
  }
932
932
  function ra(e) {
@@ -935,8 +935,8 @@ function ra(e) {
935
935
  return y && w ? e(y.__data__, w.__data__) : !y - !w;
936
936
  }
937
937
  for (var n = this._groups, r = n.length, a = new Array(r), i = 0; i < r; ++i) {
938
- for (var l = n[i], u = l.length, f = a[i] = new Array(u), c, d = 0; d < u; ++d)
939
- (c = l[d]) && (f[d] = c);
938
+ for (var u = n[i], l = u.length, f = a[i] = new Array(l), c, d = 0; d < l; ++d)
939
+ (c = u[d]) && (f[d] = c);
940
940
  f.sort(t);
941
941
  }
942
942
  return new te(a, this._parents).order();
@@ -951,15 +951,15 @@ function oa() {
951
951
  function ia() {
952
952
  return Array.from(this);
953
953
  }
954
- function la() {
954
+ function ua() {
955
955
  for (var e = this._groups, t = 0, n = e.length; t < n; ++t)
956
956
  for (var r = e[t], a = 0, i = r.length; a < i; ++a) {
957
- var l = r[a];
958
- if (l) return l;
957
+ var u = r[a];
958
+ if (u) return u;
959
959
  }
960
960
  return null;
961
961
  }
962
- function ua() {
962
+ function la() {
963
963
  let e = 0;
964
964
  for (const t of this) ++e;
965
965
  return e;
@@ -969,8 +969,8 @@ function sa() {
969
969
  }
970
970
  function ca(e) {
971
971
  for (var t = this._groups, n = 0, r = t.length; n < r; ++n)
972
- for (var a = t[n], i = 0, l = a.length, u; i < l; ++i)
973
- (u = a[i]) && e.call(u, u.__data__, i, a);
972
+ for (var a = t[n], i = 0, u = a.length, l; i < u; ++i)
973
+ (l = a[i]) && e.call(l, l.__data__, i, a);
974
974
  return this;
975
975
  }
976
976
  function fa(e) {
@@ -1006,7 +1006,7 @@ function ma(e, t) {
1006
1006
  };
1007
1007
  }
1008
1008
  function ga(e, t) {
1009
- var n = ut(e);
1009
+ var n = lt(e);
1010
1010
  if (arguments.length < 2) {
1011
1011
  var r = this.node();
1012
1012
  return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
@@ -1048,19 +1048,19 @@ function xa(e, t) {
1048
1048
  this[e] = t;
1049
1049
  };
1050
1050
  }
1051
- function Ea(e, t) {
1051
+ function Ma(e, t) {
1052
1052
  return function() {
1053
1053
  var n = t.apply(this, arguments);
1054
1054
  n == null ? delete this[e] : this[e] = n;
1055
1055
  };
1056
1056
  }
1057
- function Ca(e, t) {
1058
- return arguments.length > 1 ? this.each((t == null ? Aa : typeof t == "function" ? Ea : xa)(e, t)) : this.node()[e];
1057
+ function Ea(e, t) {
1058
+ return arguments.length > 1 ? this.each((t == null ? Aa : typeof t == "function" ? Ma : xa)(e, t)) : this.node()[e];
1059
1059
  }
1060
1060
  function mn(e) {
1061
1061
  return e.trim().split(/^|\s+/);
1062
1062
  }
1063
- function Ft(e) {
1063
+ function Bt(e) {
1064
1064
  return e.classList || new gn(e);
1065
1065
  }
1066
1066
  function gn(e) {
@@ -1080,12 +1080,12 @@ gn.prototype = {
1080
1080
  }
1081
1081
  };
1082
1082
  function yn(e, t) {
1083
- for (var n = Ft(e), r = -1, a = t.length; ++r < a; ) n.add(t[r]);
1083
+ for (var n = Bt(e), r = -1, a = t.length; ++r < a; ) n.add(t[r]);
1084
1084
  }
1085
1085
  function wn(e, t) {
1086
- for (var n = Ft(e), r = -1, a = t.length; ++r < a; ) n.remove(t[r]);
1086
+ for (var n = Bt(e), r = -1, a = t.length; ++r < a; ) n.remove(t[r]);
1087
1087
  }
1088
- function Ma(e) {
1088
+ function Ca(e) {
1089
1089
  return function() {
1090
1090
  yn(this, e);
1091
1091
  };
@@ -1103,15 +1103,15 @@ function ka(e, t) {
1103
1103
  function $a(e, t) {
1104
1104
  var n = mn(e + "");
1105
1105
  if (arguments.length < 2) {
1106
- for (var r = Ft(this.node()), a = -1, i = n.length; ++a < i; ) if (!r.contains(n[a])) return !1;
1106
+ for (var r = Bt(this.node()), a = -1, i = n.length; ++a < i; ) if (!r.contains(n[a])) return !1;
1107
1107
  return !0;
1108
1108
  }
1109
- return this.each((typeof t == "function" ? ka : t ? Ma : Sa)(n, t));
1109
+ return this.each((typeof t == "function" ? ka : t ? Ca : Sa)(n, t));
1110
1110
  }
1111
- function Ta() {
1111
+ function Ra() {
1112
1112
  this.textContent = "";
1113
1113
  }
1114
- function Ra(e) {
1114
+ function Ta(e) {
1115
1115
  return function() {
1116
1116
  this.textContent = e;
1117
1117
  };
@@ -1123,7 +1123,7 @@ function Na(e) {
1123
1123
  };
1124
1124
  }
1125
1125
  function La(e) {
1126
- return arguments.length ? this.each(e == null ? Ta : (typeof e == "function" ? Na : Ra)(e)) : this.node().textContent;
1126
+ return arguments.length ? this.each(e == null ? Ra : (typeof e == "function" ? Na : Ta)(e)) : this.node().textContent;
1127
1127
  }
1128
1128
  function Ia() {
1129
1129
  this.innerHTML = "";
@@ -1133,14 +1133,14 @@ function Ua(e) {
1133
1133
  this.innerHTML = e;
1134
1134
  };
1135
1135
  }
1136
- function Fa(e) {
1136
+ function Ba(e) {
1137
1137
  return function() {
1138
1138
  var t = e.apply(this, arguments);
1139
1139
  this.innerHTML = t ?? "";
1140
1140
  };
1141
1141
  }
1142
- function Ba(e) {
1143
- return arguments.length ? this.each(e == null ? Ia : (typeof e == "function" ? Fa : Ua)(e)) : this.node().innerHTML;
1142
+ function Fa(e) {
1143
+ return arguments.length ? this.each(e == null ? Ia : (typeof e == "function" ? Ba : Ua)(e)) : this.node().innerHTML;
1144
1144
  }
1145
1145
  function Oa() {
1146
1146
  this.nextSibling && this.parentNode.appendChild(this);
@@ -1215,8 +1215,8 @@ function eo(e, t, n) {
1215
1215
  return function() {
1216
1216
  var r = this.__on, a, i = Ka(t);
1217
1217
  if (r) {
1218
- for (var l = 0, u = r.length; l < u; ++l)
1219
- if ((a = r[l]).type === e.type && a.name === e.name) {
1218
+ for (var u = 0, l = r.length; u < l; ++u)
1219
+ if ((a = r[u]).type === e.type && a.name === e.name) {
1220
1220
  this.removeEventListener(a.type, a.listener, a.options), this.addEventListener(a.type, a.listener = i, a.options = n), a.value = t;
1221
1221
  return;
1222
1222
  }
@@ -1225,18 +1225,18 @@ function eo(e, t, n) {
1225
1225
  };
1226
1226
  }
1227
1227
  function to(e, t, n) {
1228
- var r = Ja(e + ""), a, i = r.length, l;
1228
+ var r = Ja(e + ""), a, i = r.length, u;
1229
1229
  if (arguments.length < 2) {
1230
- var u = this.node().__on;
1231
- if (u) {
1232
- for (var f = 0, c = u.length, d; f < c; ++f)
1233
- for (a = 0, d = u[f]; a < i; ++a)
1234
- if ((l = r[a]).type === d.type && l.name === d.name)
1230
+ var l = this.node().__on;
1231
+ if (l) {
1232
+ for (var f = 0, c = l.length, d; f < c; ++f)
1233
+ for (a = 0, d = l[f]; a < i; ++a)
1234
+ if ((u = r[a]).type === d.type && u.name === d.name)
1235
1235
  return d.value;
1236
1236
  }
1237
1237
  return;
1238
1238
  }
1239
- for (u = t ? eo : Za, a = 0; a < i; ++a) this.each(u(r[a], t, n));
1239
+ for (l = t ? eo : Za, a = 0; a < i; ++a) this.each(l(r[a], t, n));
1240
1240
  return this;
1241
1241
  }
1242
1242
  function _n(e, t, n) {
@@ -1258,8 +1258,8 @@ function ao(e, t) {
1258
1258
  }
1259
1259
  function* oo() {
1260
1260
  for (var e = this._groups, t = 0, n = e.length; t < n; ++t)
1261
- for (var r = e[t], a = 0, i = r.length, l; a < i; ++a)
1262
- (l = r[a]) && (yield l);
1261
+ for (var r = e[t], a = 0, i = r.length, u; a < i; ++a)
1262
+ (u = r[a]) && (yield u);
1263
1263
  }
1264
1264
  var bn = [null];
1265
1265
  function te(e, t) {
@@ -1274,7 +1274,7 @@ function io() {
1274
1274
  te.prototype = We.prototype = {
1275
1275
  constructor: te,
1276
1276
  select: Nr,
1277
- selectAll: Fr,
1277
+ selectAll: Br,
1278
1278
  selectChild: Dr,
1279
1279
  selectChildren: Vr,
1280
1280
  filter: Wr,
@@ -1288,16 +1288,16 @@ te.prototype = We.prototype = {
1288
1288
  sort: ra,
1289
1289
  call: oa,
1290
1290
  nodes: ia,
1291
- node: la,
1292
- size: ua,
1291
+ node: ua,
1292
+ size: la,
1293
1293
  empty: sa,
1294
1294
  each: ca,
1295
1295
  attr: ga,
1296
1296
  style: ba,
1297
- property: Ca,
1297
+ property: Ea,
1298
1298
  classed: $a,
1299
1299
  text: La,
1300
- html: Ba,
1300
+ html: Fa,
1301
1301
  raise: Pa,
1302
1302
  lower: za,
1303
1303
  append: qa,
@@ -1312,13 +1312,13 @@ te.prototype = We.prototype = {
1312
1312
  function pe(e) {
1313
1313
  return typeof e == "string" ? new te([[document.querySelector(e)]], [document.documentElement]) : new te([[e]], bn);
1314
1314
  }
1315
- function lo(e) {
1315
+ function uo(e) {
1316
1316
  let t;
1317
1317
  for (; t = e.sourceEvent; ) e = t;
1318
1318
  return e;
1319
1319
  }
1320
1320
  function xe(e, t) {
1321
- if (e = lo(e), t === void 0 && (t = e.currentTarget), t) {
1321
+ if (e = uo(e), t === void 0 && (t = e.currentTarget), t) {
1322
1322
  var n = t.ownerSVGElement || t;
1323
1323
  if (n.createSVGPoint) {
1324
1324
  var r = n.createSVGPoint();
@@ -1331,21 +1331,21 @@ function xe(e, t) {
1331
1331
  }
1332
1332
  return [e.pageX, e.pageY];
1333
1333
  }
1334
- const Et = { capture: !0, passive: !1 };
1335
- function Ct(e) {
1334
+ const Mt = { capture: !0, passive: !1 };
1335
+ function Et(e) {
1336
1336
  e.preventDefault(), e.stopImmediatePropagation();
1337
1337
  }
1338
- function uo(e) {
1339
- var t = e.document.documentElement, n = pe(e).on("dragstart.drag", Ct, Et);
1340
- "onselectstart" in t ? n.on("selectstart.drag", Ct, Et) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
1338
+ function lo(e) {
1339
+ var t = e.document.documentElement, n = pe(e).on("dragstart.drag", Et, Mt);
1340
+ "onselectstart" in t ? n.on("selectstart.drag", Et, Mt) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
1341
1341
  }
1342
1342
  function so(e, t) {
1343
1343
  var n = e.document.documentElement, r = pe(e).on("dragstart.drag", null);
1344
- t && (r.on("click.drag", Ct, Et), setTimeout(function() {
1344
+ t && (r.on("click.drag", Et, Mt), setTimeout(function() {
1345
1345
  r.on("click.drag", null);
1346
1346
  }, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
1347
1347
  }
1348
- function Bt(e, t, n) {
1348
+ function Ft(e, t, n) {
1349
1349
  e.prototype = t.prototype = n, n.constructor = e;
1350
1350
  }
1351
1351
  function An(e, t) {
@@ -1355,7 +1355,7 @@ function An(e, t) {
1355
1355
  }
1356
1356
  function je() {
1357
1357
  }
1358
- var De = 0.7, nt = 1 / De, Re = "\\s*([+-]?\\d+)\\s*", ze = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", se = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", co = /^#([0-9a-f]{3,8})$/, fo = new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`), ho = new RegExp(`^rgb\\(${se},${se},${se}\\)$`), po = new RegExp(`^rgba\\(${Re},${Re},${Re},${ze}\\)$`), vo = new RegExp(`^rgba\\(${se},${se},${se},${ze}\\)$`), mo = new RegExp(`^hsl\\(${ze},${se},${se}\\)$`), go = new RegExp(`^hsla\\(${ze},${se},${se},${ze}\\)$`), Wt = {
1358
+ var De = 0.7, nt = 1 / De, Te = "\\s*([+-]?\\d+)\\s*", ze = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", se = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", co = /^#([0-9a-f]{3,8})$/, fo = new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`), ho = new RegExp(`^rgb\\(${se},${se},${se}\\)$`), po = new RegExp(`^rgba\\(${Te},${Te},${Te},${ze}\\)$`), vo = new RegExp(`^rgba\\(${se},${se},${se},${ze}\\)$`), mo = new RegExp(`^hsl\\(${ze},${se},${se}\\)$`), go = new RegExp(`^hsla\\(${ze},${se},${se},${ze}\\)$`), Wt = {
1359
1359
  aliceblue: 15792383,
1360
1360
  antiquewhite: 16444375,
1361
1361
  aqua: 65535,
@@ -1505,7 +1505,7 @@ var De = 0.7, nt = 1 / De, Re = "\\s*([+-]?\\d+)\\s*", ze = "\\s*([+-]?(?:\\d*\\
1505
1505
  yellow: 16776960,
1506
1506
  yellowgreen: 10145074
1507
1507
  };
1508
- Bt(je, qe, {
1508
+ Ft(je, qe, {
1509
1509
  copy(e) {
1510
1510
  return Object.assign(new this.constructor(), this, e);
1511
1511
  },
@@ -1545,13 +1545,13 @@ function He(e, t, n, r) {
1545
1545
  function _o(e) {
1546
1546
  return e instanceof je || (e = qe(e)), e ? (e = e.rgb(), new ee(e.r, e.g, e.b, e.opacity)) : new ee();
1547
1547
  }
1548
- function Mt(e, t, n, r) {
1548
+ function Ct(e, t, n, r) {
1549
1549
  return arguments.length === 1 ? _o(e) : new ee(e, t, n, r ?? 1);
1550
1550
  }
1551
1551
  function ee(e, t, n, r) {
1552
1552
  this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
1553
1553
  }
1554
- Bt(ee, Mt, An(je, {
1554
+ Ft(ee, Ct, An(je, {
1555
1555
  brighter(e) {
1556
1556
  return e = e == null ? nt : Math.pow(nt, e), new ee(this.r * e, this.g * e, this.b * e, this.opacity);
1557
1557
  },
@@ -1601,8 +1601,8 @@ function xn(e) {
1601
1601
  if (e instanceof je || (e = qe(e)), !e) return new ae();
1602
1602
  if (e instanceof ae) return e;
1603
1603
  e = e.rgb();
1604
- var t = e.r / 255, n = e.g / 255, r = e.b / 255, a = Math.min(t, n, r), i = Math.max(t, n, r), l = NaN, u = i - a, f = (i + a) / 2;
1605
- return u ? (t === i ? l = (n - r) / u + (n < r) * 6 : n === i ? l = (r - t) / u + 2 : l = (t - n) / u + 4, u /= f < 0.5 ? i + a : 2 - i - a, l *= 60) : u = f > 0 && f < 1 ? 0 : l, new ae(l, u, f, e.opacity);
1604
+ var t = e.r / 255, n = e.g / 255, r = e.b / 255, a = Math.min(t, n, r), i = Math.max(t, n, r), u = NaN, l = i - a, f = (i + a) / 2;
1605
+ return l ? (t === i ? u = (n - r) / l + (n < r) * 6 : n === i ? u = (r - t) / l + 2 : u = (t - n) / l + 4, l /= f < 0.5 ? i + a : 2 - i - a, u *= 60) : l = f > 0 && f < 1 ? 0 : u, new ae(u, l, f, e.opacity);
1606
1606
  }
1607
1607
  function Ao(e, t, n, r) {
1608
1608
  return arguments.length === 1 ? xn(e) : new ae(e, t, n, r ?? 1);
@@ -1610,7 +1610,7 @@ function Ao(e, t, n, r) {
1610
1610
  function ae(e, t, n, r) {
1611
1611
  this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
1612
1612
  }
1613
- Bt(ae, Ao, An(je, {
1613
+ Ft(ae, Ao, An(je, {
1614
1614
  brighter(e) {
1615
1615
  return e = e == null ? nt : Math.pow(nt, e), new ae(this.h, this.s, this.l * e, this.opacity);
1616
1616
  },
@@ -1646,32 +1646,32 @@ function Xe(e) {
1646
1646
  function ht(e, t, n) {
1647
1647
  return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
1648
1648
  }
1649
- const En = (e) => () => e;
1649
+ const Mn = (e) => () => e;
1650
1650
  function xo(e, t) {
1651
1651
  return function(n) {
1652
1652
  return e + n * t;
1653
1653
  };
1654
1654
  }
1655
- function Eo(e, t, n) {
1655
+ function Mo(e, t, n) {
1656
1656
  return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(r) {
1657
1657
  return Math.pow(e + r * t, n);
1658
1658
  };
1659
1659
  }
1660
- function Co(e) {
1661
- return (e = +e) == 1 ? Cn : function(t, n) {
1662
- return n - t ? Eo(t, n, e) : En(isNaN(t) ? n : t);
1660
+ function Eo(e) {
1661
+ return (e = +e) == 1 ? En : function(t, n) {
1662
+ return n - t ? Mo(t, n, e) : Mn(isNaN(t) ? n : t);
1663
1663
  };
1664
1664
  }
1665
- function Cn(e, t) {
1665
+ function En(e, t) {
1666
1666
  var n = t - e;
1667
- return n ? xo(e, n) : En(isNaN(e) ? t : e);
1667
+ return n ? xo(e, n) : Mn(isNaN(e) ? t : e);
1668
1668
  }
1669
1669
  const Zt = (function e(t) {
1670
- var n = Co(t);
1670
+ var n = Eo(t);
1671
1671
  function r(a, i) {
1672
- var l = n((a = Mt(a)).r, (i = Mt(i)).r), u = n(a.g, i.g), f = n(a.b, i.b), c = Cn(a.opacity, i.opacity);
1672
+ var u = n((a = Ct(a)).r, (i = Ct(i)).r), l = n(a.g, i.g), f = n(a.b, i.b), c = En(a.opacity, i.opacity);
1673
1673
  return function(d) {
1674
- return a.r = l(d), a.g = u(d), a.b = f(d), a.opacity = c(d), a + "";
1674
+ return a.r = u(d), a.g = l(d), a.b = f(d), a.opacity = c(d), a + "";
1675
1675
  };
1676
1676
  }
1677
1677
  return r.gamma = e, r;
@@ -1682,7 +1682,7 @@ function ye(e, t) {
1682
1682
  };
1683
1683
  }
1684
1684
  var St = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, dt = new RegExp(St.source, "g");
1685
- function Mo(e) {
1685
+ function Co(e) {
1686
1686
  return function() {
1687
1687
  return e;
1688
1688
  };
@@ -1693,15 +1693,15 @@ function So(e) {
1693
1693
  };
1694
1694
  }
1695
1695
  function ko(e, t) {
1696
- var n = St.lastIndex = dt.lastIndex = 0, r, a, i, l = -1, u = [], f = [];
1696
+ var n = St.lastIndex = dt.lastIndex = 0, r, a, i, u = -1, l = [], f = [];
1697
1697
  for (e = e + "", t = t + ""; (r = St.exec(e)) && (a = dt.exec(t)); )
1698
- (i = a.index) > n && (i = t.slice(n, i), u[l] ? u[l] += i : u[++l] = i), (r = r[0]) === (a = a[0]) ? u[l] ? u[l] += a : u[++l] = a : (u[++l] = null, f.push({ i: l, x: ye(r, a) })), n = dt.lastIndex;
1699
- return n < t.length && (i = t.slice(n), u[l] ? u[l] += i : u[++l] = i), u.length < 2 ? f[0] ? So(f[0].x) : Mo(t) : (t = f.length, function(c) {
1700
- for (var d = 0, y; d < t; ++d) u[(y = f[d]).i] = y.x(c);
1701
- return u.join("");
1698
+ (i = a.index) > n && (i = t.slice(n, i), l[u] ? l[u] += i : l[++u] = i), (r = r[0]) === (a = a[0]) ? l[u] ? l[u] += a : l[++u] = a : (l[++u] = null, f.push({ i: u, x: ye(r, a) })), n = dt.lastIndex;
1699
+ return n < t.length && (i = t.slice(n), l[u] ? l[u] += i : l[++u] = i), l.length < 2 ? f[0] ? So(f[0].x) : Co(t) : (t = f.length, function(c) {
1700
+ for (var d = 0, y; d < t; ++d) l[(y = f[d]).i] = y.x(c);
1701
+ return l.join("");
1702
1702
  });
1703
1703
  }
1704
- var en = 180 / Math.PI, Mn = {
1704
+ var en = 180 / Math.PI, Cn = {
1705
1705
  translateX: 0,
1706
1706
  translateY: 0,
1707
1707
  rotate: 0,
@@ -1710,55 +1710,55 @@ var en = 180 / Math.PI, Mn = {
1710
1710
  scaleY: 1
1711
1711
  };
1712
1712
  function Sn(e, t, n, r, a, i) {
1713
- var l, u, f;
1714
- return (l = Math.sqrt(e * e + t * t)) && (e /= l, t /= l), (f = e * n + t * r) && (n -= e * f, r -= t * f), (u = Math.sqrt(n * n + r * r)) && (n /= u, r /= u, f /= u), e * r < t * n && (e = -e, t = -t, f = -f, l = -l), {
1713
+ var u, l, f;
1714
+ return (u = Math.sqrt(e * e + t * t)) && (e /= u, t /= u), (f = e * n + t * r) && (n -= e * f, r -= t * f), (l = Math.sqrt(n * n + r * r)) && (n /= l, r /= l, f /= l), e * r < t * n && (e = -e, t = -t, f = -f, u = -u), {
1715
1715
  translateX: a,
1716
1716
  translateY: i,
1717
1717
  rotate: Math.atan2(t, e) * en,
1718
1718
  skewX: Math.atan(f) * en,
1719
- scaleX: l,
1720
- scaleY: u
1719
+ scaleX: u,
1720
+ scaleY: l
1721
1721
  };
1722
1722
  }
1723
1723
  var Ge;
1724
1724
  function $o(e) {
1725
1725
  const t = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(e + "");
1726
- return t.isIdentity ? Mn : Sn(t.a, t.b, t.c, t.d, t.e, t.f);
1726
+ return t.isIdentity ? Cn : Sn(t.a, t.b, t.c, t.d, t.e, t.f);
1727
1727
  }
1728
- function To(e) {
1729
- return e == null || (Ge || (Ge = document.createElementNS("http://www.w3.org/2000/svg", "g")), Ge.setAttribute("transform", e), !(e = Ge.transform.baseVal.consolidate())) ? Mn : (e = e.matrix, Sn(e.a, e.b, e.c, e.d, e.e, e.f));
1728
+ function Ro(e) {
1729
+ return e == null || (Ge || (Ge = document.createElementNS("http://www.w3.org/2000/svg", "g")), Ge.setAttribute("transform", e), !(e = Ge.transform.baseVal.consolidate())) ? Cn : (e = e.matrix, Sn(e.a, e.b, e.c, e.d, e.e, e.f));
1730
1730
  }
1731
1731
  function kn(e, t, n, r) {
1732
1732
  function a(c) {
1733
1733
  return c.length ? c.pop() + " " : "";
1734
1734
  }
1735
- function i(c, d, y, w, A, M) {
1735
+ function i(c, d, y, w, A, C) {
1736
1736
  if (c !== y || d !== w) {
1737
1737
  var S = A.push("translate(", null, t, null, n);
1738
- M.push({ i: S - 4, x: ye(c, y) }, { i: S - 2, x: ye(d, w) });
1738
+ C.push({ i: S - 4, x: ye(c, y) }, { i: S - 2, x: ye(d, w) });
1739
1739
  } else (y || w) && A.push("translate(" + y + t + w + n);
1740
1740
  }
1741
- function l(c, d, y, w) {
1741
+ function u(c, d, y, w) {
1742
1742
  c !== d ? (c - d > 180 ? d += 360 : d - c > 180 && (c += 360), w.push({ i: y.push(a(y) + "rotate(", null, r) - 2, x: ye(c, d) })) : d && y.push(a(y) + "rotate(" + d + r);
1743
1743
  }
1744
- function u(c, d, y, w) {
1744
+ function l(c, d, y, w) {
1745
1745
  c !== d ? w.push({ i: y.push(a(y) + "skewX(", null, r) - 2, x: ye(c, d) }) : d && y.push(a(y) + "skewX(" + d + r);
1746
1746
  }
1747
- function f(c, d, y, w, A, M) {
1747
+ function f(c, d, y, w, A, C) {
1748
1748
  if (c !== y || d !== w) {
1749
1749
  var S = A.push(a(A) + "scale(", null, ",", null, ")");
1750
- M.push({ i: S - 4, x: ye(c, y) }, { i: S - 2, x: ye(d, w) });
1750
+ C.push({ i: S - 4, x: ye(c, y) }, { i: S - 2, x: ye(d, w) });
1751
1751
  } else (y !== 1 || w !== 1) && A.push(a(A) + "scale(" + y + "," + w + ")");
1752
1752
  }
1753
1753
  return function(c, d) {
1754
1754
  var y = [], w = [];
1755
- return c = e(c), d = e(d), i(c.translateX, c.translateY, d.translateX, d.translateY, y, w), l(c.rotate, d.rotate, y, w), u(c.skewX, d.skewX, y, w), f(c.scaleX, c.scaleY, d.scaleX, d.scaleY, y, w), c = d = null, function(A) {
1756
- for (var M = -1, S = w.length, $; ++M < S; ) y[($ = w[M]).i] = $.x(A);
1755
+ return c = e(c), d = e(d), i(c.translateX, c.translateY, d.translateX, d.translateY, y, w), u(c.rotate, d.rotate, y, w), l(c.skewX, d.skewX, y, w), f(c.scaleX, c.scaleY, d.scaleX, d.scaleY, y, w), c = d = null, function(A) {
1756
+ for (var C = -1, S = w.length, $; ++C < S; ) y[($ = w[C]).i] = $.x(A);
1757
1757
  return y.join("");
1758
1758
  };
1759
1759
  };
1760
1760
  }
1761
- var Ro = kn($o, "px, ", "px)", "deg)"), No = kn(To, ", ", ")", ")"), Lo = 1e-12;
1761
+ var To = kn($o, "px, ", "px)", "deg)"), No = kn(Ro, ", ", ")", ")"), Lo = 1e-12;
1762
1762
  function tn(e) {
1763
1763
  return ((e = Math.exp(e)) + 1 / e) / 2;
1764
1764
  }
@@ -1768,24 +1768,24 @@ function Io(e) {
1768
1768
  function Uo(e) {
1769
1769
  return ((e = Math.exp(2 * e)) - 1) / (e + 1);
1770
1770
  }
1771
- const Fo = (function e(t, n, r) {
1772
- function a(i, l) {
1773
- var u = i[0], f = i[1], c = i[2], d = l[0], y = l[1], w = l[2], A = d - u, M = y - f, S = A * A + M * M, $, k;
1771
+ const Bo = (function e(t, n, r) {
1772
+ function a(i, u) {
1773
+ var l = i[0], f = i[1], c = i[2], d = u[0], y = u[1], w = u[2], A = d - l, C = y - f, S = A * A + C * C, $, k;
1774
1774
  if (S < Lo)
1775
1775
  k = Math.log(w / c) / t, $ = function(V) {
1776
1776
  return [
1777
- u + V * A,
1778
- f + V * M,
1777
+ l + V * A,
1778
+ f + V * C,
1779
1779
  c * Math.exp(t * V * k)
1780
1780
  ];
1781
1781
  };
1782
1782
  else {
1783
- var B = Math.sqrt(S), D = (w * w - c * c + r * S) / (2 * c * n * B), z = (w * w - c * c - r * S) / (2 * w * n * B), q = Math.log(Math.sqrt(D * D + 1) - D), H = Math.log(Math.sqrt(z * z + 1) - z);
1783
+ var F = Math.sqrt(S), D = (w * w - c * c + r * S) / (2 * c * n * F), z = (w * w - c * c - r * S) / (2 * w * n * F), q = Math.log(Math.sqrt(D * D + 1) - D), H = Math.log(Math.sqrt(z * z + 1) - z);
1784
1784
  k = (H - q) / t, $ = function(V) {
1785
- var K = V * k, X = tn(q), P = c / (n * B) * (X * Uo(t * K + q) - Io(q));
1785
+ var K = V * k, X = tn(q), P = c / (n * F) * (X * Uo(t * K + q) - Io(q));
1786
1786
  return [
1787
- u + P * A,
1788
- f + P * M,
1787
+ l + P * A,
1788
+ f + P * C,
1789
1789
  c * X / tn(t * K + q)
1790
1790
  ];
1791
1791
  };
@@ -1793,23 +1793,23 @@ const Fo = (function e(t, n, r) {
1793
1793
  return $.duration = k * 1e3 * t / Math.SQRT2, $;
1794
1794
  }
1795
1795
  return a.rho = function(i) {
1796
- var l = Math.max(1e-3, +i), u = l * l, f = u * u;
1797
- return e(l, u, f);
1796
+ var u = Math.max(1e-3, +i), l = u * u, f = l * l;
1797
+ return e(u, l, f);
1798
1798
  }, a;
1799
1799
  })(Math.SQRT2, 2, 4);
1800
- var Le = 0, Be = 0, Ue = 0, $n = 1e3, at, Oe, ot = 0, $e = 0, st = 0, Ye = typeof performance == "object" && performance.now ? performance : Date, Tn = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
1800
+ var Le = 0, Fe = 0, Ue = 0, $n = 1e3, at, Oe, ot = 0, $e = 0, st = 0, Ye = typeof performance == "object" && performance.now ? performance : Date, Rn = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
1801
1801
  setTimeout(e, 17);
1802
1802
  };
1803
1803
  function Ot() {
1804
- return $e || (Tn(Bo), $e = Ye.now() + st);
1804
+ return $e || (Rn(Fo), $e = Ye.now() + st);
1805
1805
  }
1806
- function Bo() {
1806
+ function Fo() {
1807
1807
  $e = 0;
1808
1808
  }
1809
1809
  function it() {
1810
1810
  this._call = this._time = this._next = null;
1811
1811
  }
1812
- it.prototype = Rn.prototype = {
1812
+ it.prototype = Tn.prototype = {
1813
1813
  constructor: it,
1814
1814
  restart: function(e, t, n) {
1815
1815
  if (typeof e != "function") throw new TypeError("callback is not a function");
@@ -1819,7 +1819,7 @@ it.prototype = Rn.prototype = {
1819
1819
  this._call && (this._call = null, this._time = 1 / 0, kt());
1820
1820
  }
1821
1821
  };
1822
- function Rn(e, t, n) {
1822
+ function Tn(e, t, n) {
1823
1823
  var r = new it();
1824
1824
  return r.restart(e, t, n), r;
1825
1825
  }
@@ -1830,7 +1830,7 @@ function Oo() {
1830
1830
  --Le;
1831
1831
  }
1832
1832
  function nn() {
1833
- $e = (ot = Ye.now()) + st, Le = Be = 0;
1833
+ $e = (ot = Ye.now()) + st, Le = Fe = 0;
1834
1834
  try {
1835
1835
  Oo();
1836
1836
  } finally {
@@ -1848,9 +1848,9 @@ function Do() {
1848
1848
  }
1849
1849
  function kt(e) {
1850
1850
  if (!Le) {
1851
- Be && (Be = clearTimeout(Be));
1851
+ Fe && (Fe = clearTimeout(Fe));
1852
1852
  var t = e - $e;
1853
- t > 24 ? (e < 1 / 0 && (Be = setTimeout(nn, e - Ye.now() - st)), Ue && (Ue = clearInterval(Ue))) : (Ue || (ot = Ye.now(), Ue = setInterval(Po, $n)), Le = 1, Tn(nn));
1853
+ t > 24 ? (e < 1 / 0 && (Fe = setTimeout(nn, e - Ye.now() - st)), Ue && (Ue = clearInterval(Ue))) : (Ue || (ot = Ye.now(), Ue = setInterval(Po, $n)), Le = 1, Rn(nn));
1854
1854
  }
1855
1855
  }
1856
1856
  function rn(e, t, n) {
@@ -1859,11 +1859,11 @@ function rn(e, t, n) {
1859
1859
  r.stop(), e(a + t);
1860
1860
  }, t, n), r;
1861
1861
  }
1862
- var zo = It("start", "end", "cancel", "interrupt"), qo = [], Nn = 0, an = 1, $t = 2, Je = 3, on = 4, Tt = 5, Ze = 6;
1862
+ var zo = It("start", "end", "cancel", "interrupt"), qo = [], Nn = 0, an = 1, $t = 2, Je = 3, on = 4, Rt = 5, Ze = 6;
1863
1863
  function ct(e, t, n, r, a, i) {
1864
- var l = e.__transition;
1865
- if (!l) e.__transition = {};
1866
- else if (n in l) return;
1864
+ var u = e.__transition;
1865
+ if (!u) e.__transition = {};
1866
+ else if (n in u) return;
1867
1867
  Yo(e, n, {
1868
1868
  name: t,
1869
1869
  index: r,
@@ -1897,30 +1897,30 @@ function ie(e, t) {
1897
1897
  }
1898
1898
  function Yo(e, t, n) {
1899
1899
  var r = e.__transition, a;
1900
- r[t] = n, n.timer = Rn(i, 0, n.time);
1900
+ r[t] = n, n.timer = Tn(i, 0, n.time);
1901
1901
  function i(c) {
1902
- n.state = an, n.timer.restart(l, n.delay, n.time), n.delay <= c && l(c - n.delay);
1902
+ n.state = an, n.timer.restart(u, n.delay, n.time), n.delay <= c && u(c - n.delay);
1903
1903
  }
1904
- function l(c) {
1904
+ function u(c) {
1905
1905
  var d, y, w, A;
1906
1906
  if (n.state !== an) return f();
1907
1907
  for (d in r)
1908
1908
  if (A = r[d], A.name === n.name) {
1909
- if (A.state === Je) return rn(l);
1909
+ if (A.state === Je) return rn(u);
1910
1910
  A.state === on ? (A.state = Ze, A.timer.stop(), A.on.call("interrupt", e, e.__data__, A.index, A.group), delete r[d]) : +d < t && (A.state = Ze, A.timer.stop(), A.on.call("cancel", e, e.__data__, A.index, A.group), delete r[d]);
1911
1911
  }
1912
1912
  if (rn(function() {
1913
- n.state === Je && (n.state = on, n.timer.restart(u, n.delay, n.time), u(c));
1913
+ n.state === Je && (n.state = on, n.timer.restart(l, n.delay, n.time), l(c));
1914
1914
  }), n.state = $t, n.on.call("start", e, e.__data__, n.index, n.group), n.state === $t) {
1915
1915
  for (n.state = Je, a = new Array(w = n.tween.length), d = 0, y = -1; d < w; ++d)
1916
1916
  (A = n.tween[d].value.call(e, e.__data__, n.index, n.group)) && (a[++y] = A);
1917
1917
  a.length = y + 1;
1918
1918
  }
1919
1919
  }
1920
- function u(c) {
1921
- for (var d = c < n.duration ? n.ease.call(null, c / n.duration) : (n.timer.restart(f), n.state = Tt, 1), y = -1, w = a.length; ++y < w; )
1920
+ function l(c) {
1921
+ for (var d = c < n.duration ? n.ease.call(null, c / n.duration) : (n.timer.restart(f), n.state = Rt, 1), y = -1, w = a.length; ++y < w; )
1922
1922
  a[y].call(e, d);
1923
- n.state === Tt && (n.on.call("end", e, e.__data__, n.index, n.group), f());
1923
+ n.state === Rt && (n.on.call("end", e, e.__data__, n.index, n.group), f());
1924
1924
  }
1925
1925
  function f() {
1926
1926
  n.state = Ze, n.timer.stop(), delete r[t];
@@ -1929,15 +1929,15 @@ function Yo(e, t, n) {
1929
1929
  }
1930
1930
  }
1931
1931
  function et(e, t) {
1932
- var n = e.__transition, r, a, i = !0, l;
1932
+ var n = e.__transition, r, a, i = !0, u;
1933
1933
  if (n) {
1934
1934
  t = t == null ? null : t + "";
1935
- for (l in n) {
1936
- if ((r = n[l]).name !== t) {
1935
+ for (u in n) {
1936
+ if ((r = n[u]).name !== t) {
1937
1937
  i = !1;
1938
1938
  continue;
1939
1939
  }
1940
- a = r.state > $t && r.state < Tt, r.state = Ze, r.timer.stop(), r.on.call(a ? "interrupt" : "cancel", e, e.__data__, r.index, r.group), delete n[l];
1940
+ a = r.state > $t && r.state < Rt, r.state = Ze, r.timer.stop(), r.on.call(a ? "interrupt" : "cancel", e, e.__data__, r.index, r.group), delete n[u];
1941
1941
  }
1942
1942
  i && delete e.__transition;
1943
1943
  }
@@ -1953,9 +1953,9 @@ function Wo(e, t) {
1953
1953
  var a = ce(this, e), i = a.tween;
1954
1954
  if (i !== n) {
1955
1955
  r = n = i;
1956
- for (var l = 0, u = r.length; l < u; ++l)
1957
- if (r[l].name === t) {
1958
- r = r.slice(), r.splice(l, 1);
1956
+ for (var u = 0, l = r.length; u < l; ++u)
1957
+ if (r[u].name === t) {
1958
+ r = r.slice(), r.splice(u, 1);
1959
1959
  break;
1960
1960
  }
1961
1961
  }
@@ -1966,15 +1966,15 @@ function jo(e, t, n) {
1966
1966
  var r, a;
1967
1967
  if (typeof n != "function") throw new Error();
1968
1968
  return function() {
1969
- var i = ce(this, e), l = i.tween;
1970
- if (l !== r) {
1971
- a = (r = l).slice();
1972
- for (var u = { name: t, value: n }, f = 0, c = a.length; f < c; ++f)
1969
+ var i = ce(this, e), u = i.tween;
1970
+ if (u !== r) {
1971
+ a = (r = u).slice();
1972
+ for (var l = { name: t, value: n }, f = 0, c = a.length; f < c; ++f)
1973
1973
  if (a[f].name === t) {
1974
- a[f] = u;
1974
+ a[f] = l;
1975
1975
  break;
1976
1976
  }
1977
- f === c && a.push(u);
1977
+ f === c && a.push(l);
1978
1978
  }
1979
1979
  i.tween = a;
1980
1980
  };
@@ -1982,9 +1982,9 @@ function jo(e, t, n) {
1982
1982
  function Ho(e, t) {
1983
1983
  var n = this._id;
1984
1984
  if (e += "", arguments.length < 2) {
1985
- for (var r = ie(this.node(), n).tween, a = 0, i = r.length, l; a < i; ++a)
1986
- if ((l = r[a]).name === e)
1987
- return l.value;
1985
+ for (var r = ie(this.node(), n).tween, a = 0, i = r.length, u; a < i; ++a)
1986
+ if ((u = r[a]).name === e)
1987
+ return u.value;
1988
1988
  return null;
1989
1989
  }
1990
1990
  return this.each((t == null ? Wo : jo)(n, e, t));
@@ -2015,33 +2015,33 @@ function Go(e) {
2015
2015
  function Qo(e, t, n) {
2016
2016
  var r, a = n + "", i;
2017
2017
  return function() {
2018
- var l = this.getAttribute(e);
2019
- return l === a ? null : l === r ? i : i = t(r = l, n);
2018
+ var u = this.getAttribute(e);
2019
+ return u === a ? null : u === r ? i : i = t(r = u, n);
2020
2020
  };
2021
2021
  }
2022
2022
  function Ko(e, t, n) {
2023
2023
  var r, a = n + "", i;
2024
2024
  return function() {
2025
- var l = this.getAttributeNS(e.space, e.local);
2026
- return l === a ? null : l === r ? i : i = t(r = l, n);
2025
+ var u = this.getAttributeNS(e.space, e.local);
2026
+ return u === a ? null : u === r ? i : i = t(r = u, n);
2027
2027
  };
2028
2028
  }
2029
2029
  function Jo(e, t, n) {
2030
2030
  var r, a, i;
2031
2031
  return function() {
2032
- var l, u = n(this), f;
2033
- return u == null ? void this.removeAttribute(e) : (l = this.getAttribute(e), f = u + "", l === f ? null : l === r && f === a ? i : (a = f, i = t(r = l, u)));
2032
+ var u, l = n(this), f;
2033
+ return l == null ? void this.removeAttribute(e) : (u = this.getAttribute(e), f = l + "", u === f ? null : u === r && f === a ? i : (a = f, i = t(r = u, l)));
2034
2034
  };
2035
2035
  }
2036
2036
  function Zo(e, t, n) {
2037
2037
  var r, a, i;
2038
2038
  return function() {
2039
- var l, u = n(this), f;
2040
- return u == null ? void this.removeAttributeNS(e.space, e.local) : (l = this.getAttributeNS(e.space, e.local), f = u + "", l === f ? null : l === r && f === a ? i : (a = f, i = t(r = l, u)));
2039
+ var u, l = n(this), f;
2040
+ return l == null ? void this.removeAttributeNS(e.space, e.local) : (u = this.getAttributeNS(e.space, e.local), f = l + "", u === f ? null : u === r && f === a ? i : (a = f, i = t(r = u, l)));
2041
2041
  };
2042
2042
  }
2043
2043
  function ei(e, t) {
2044
- var n = ut(e), r = n === "transform" ? No : Ln;
2044
+ var n = lt(e), r = n === "transform" ? No : Ln;
2045
2045
  return this.attrTween(e, typeof t == "function" ? (n.local ? Zo : Jo)(n, r, Dt(this, "attr." + e, t)) : t == null ? (n.local ? Go : Xo)(n) : (n.local ? Ko : Qo)(n, r, t));
2046
2046
  }
2047
2047
  function ti(e, t) {
@@ -2075,7 +2075,7 @@ function oi(e, t) {
2075
2075
  if (arguments.length < 2) return (n = this.tween(n)) && n._value;
2076
2076
  if (t == null) return this.tween(n, null);
2077
2077
  if (typeof t != "function") throw new Error();
2078
- var r = ut(e);
2078
+ var r = lt(e);
2079
2079
  return this.tween(n, (r.local ? ri : ai)(r, t));
2080
2080
  }
2081
2081
  function ii(e, t) {
@@ -2083,14 +2083,14 @@ function ii(e, t) {
2083
2083
  Pt(this, e).delay = +t.apply(this, arguments);
2084
2084
  };
2085
2085
  }
2086
- function li(e, t) {
2086
+ function ui(e, t) {
2087
2087
  return t = +t, function() {
2088
2088
  Pt(this, e).delay = t;
2089
2089
  };
2090
2090
  }
2091
- function ui(e) {
2091
+ function li(e) {
2092
2092
  var t = this._id;
2093
- return arguments.length ? this.each((typeof e == "function" ? ii : li)(t, e)) : ie(this.node(), t).delay;
2093
+ return arguments.length ? this.each((typeof e == "function" ? ii : ui)(t, e)) : ie(this.node(), t).delay;
2094
2094
  }
2095
2095
  function si(e, t) {
2096
2096
  return function() {
@@ -2130,18 +2130,18 @@ function vi(e) {
2130
2130
  function mi(e) {
2131
2131
  typeof e != "function" && (e = hn(e));
2132
2132
  for (var t = this._groups, n = t.length, r = new Array(n), a = 0; a < n; ++a)
2133
- for (var i = t[a], l = i.length, u = r[a] = [], f, c = 0; c < l; ++c)
2134
- (f = i[c]) && e.call(f, f.__data__, c, i) && u.push(f);
2133
+ for (var i = t[a], u = i.length, l = r[a] = [], f, c = 0; c < u; ++c)
2134
+ (f = i[c]) && e.call(f, f.__data__, c, i) && l.push(f);
2135
2135
  return new ge(r, this._parents, this._name, this._id);
2136
2136
  }
2137
2137
  function gi(e) {
2138
2138
  if (e._id !== this._id) throw new Error();
2139
- for (var t = this._groups, n = e._groups, r = t.length, a = n.length, i = Math.min(r, a), l = new Array(r), u = 0; u < i; ++u)
2140
- for (var f = t[u], c = n[u], d = f.length, y = l[u] = new Array(d), w, A = 0; A < d; ++A)
2139
+ for (var t = this._groups, n = e._groups, r = t.length, a = n.length, i = Math.min(r, a), u = new Array(r), l = 0; l < i; ++l)
2140
+ for (var f = t[l], c = n[l], d = f.length, y = u[l] = new Array(d), w, A = 0; A < d; ++A)
2141
2141
  (w = f[A] || c[A]) && (y[A] = w);
2142
- for (; u < r; ++u)
2143
- l[u] = t[u];
2144
- return new ge(l, this._parents, this._name, this._id);
2142
+ for (; l < r; ++l)
2143
+ u[l] = t[l];
2144
+ return new ge(u, this._parents, this._name, this._id);
2145
2145
  }
2146
2146
  function yi(e) {
2147
2147
  return (e + "").trim().split(/^|\s+/).every(function(t) {
@@ -2152,8 +2152,8 @@ function yi(e) {
2152
2152
  function wi(e, t, n) {
2153
2153
  var r, a, i = yi(t) ? Pt : ce;
2154
2154
  return function() {
2155
- var l = i(this, e), u = l.on;
2156
- u !== r && (a = (r = u).copy()).on(t, n), l.on = a;
2155
+ var u = i(this, e), l = u.on;
2156
+ l !== r && (a = (r = l).copy()).on(t, n), u.on = a;
2157
2157
  };
2158
2158
  }
2159
2159
  function _i(e, t) {
@@ -2173,32 +2173,32 @@ function Ai() {
2173
2173
  function xi(e) {
2174
2174
  var t = this._name, n = this._id;
2175
2175
  typeof e != "function" && (e = Ut(e));
2176
- for (var r = this._groups, a = r.length, i = new Array(a), l = 0; l < a; ++l)
2177
- for (var u = r[l], f = u.length, c = i[l] = new Array(f), d, y, w = 0; w < f; ++w)
2178
- (d = u[w]) && (y = e.call(d, d.__data__, w, u)) && ("__data__" in d && (y.__data__ = d.__data__), c[w] = y, ct(c[w], t, n, w, c, ie(d, n)));
2176
+ for (var r = this._groups, a = r.length, i = new Array(a), u = 0; u < a; ++u)
2177
+ for (var l = r[u], f = l.length, c = i[u] = new Array(f), d, y, w = 0; w < f; ++w)
2178
+ (d = l[w]) && (y = e.call(d, d.__data__, w, l)) && ("__data__" in d && (y.__data__ = d.__data__), c[w] = y, ct(c[w], t, n, w, c, ie(d, n)));
2179
2179
  return new ge(i, this._parents, t, n);
2180
2180
  }
2181
- function Ei(e) {
2181
+ function Mi(e) {
2182
2182
  var t = this._name, n = this._id;
2183
2183
  typeof e != "function" && (e = fn(e));
2184
- for (var r = this._groups, a = r.length, i = [], l = [], u = 0; u < a; ++u)
2185
- for (var f = r[u], c = f.length, d, y = 0; y < c; ++y)
2184
+ for (var r = this._groups, a = r.length, i = [], u = [], l = 0; l < a; ++l)
2185
+ for (var f = r[l], c = f.length, d, y = 0; y < c; ++y)
2186
2186
  if (d = f[y]) {
2187
- for (var w = e.call(d, d.__data__, y, f), A, M = ie(d, n), S = 0, $ = w.length; S < $; ++S)
2188
- (A = w[S]) && ct(A, t, n, S, w, M);
2189
- i.push(w), l.push(d);
2187
+ for (var w = e.call(d, d.__data__, y, f), A, C = ie(d, n), S = 0, $ = w.length; S < $; ++S)
2188
+ (A = w[S]) && ct(A, t, n, S, w, C);
2189
+ i.push(w), u.push(d);
2190
2190
  }
2191
- return new ge(i, l, t, n);
2191
+ return new ge(i, u, t, n);
2192
2192
  }
2193
- var Ci = We.prototype.constructor;
2194
- function Mi() {
2195
- return new Ci(this._groups, this._parents);
2193
+ var Ei = We.prototype.constructor;
2194
+ function Ci() {
2195
+ return new Ei(this._groups, this._parents);
2196
2196
  }
2197
2197
  function Si(e, t) {
2198
2198
  var n, r, a;
2199
2199
  return function() {
2200
- var i = Ne(this, e), l = (this.style.removeProperty(e), Ne(this, e));
2201
- return i === l ? null : i === n && l === r ? a : a = t(n = i, r = l);
2200
+ var i = Ne(this, e), u = (this.style.removeProperty(e), Ne(this, e));
2201
+ return i === u ? null : i === n && u === r ? a : a = t(n = i, r = u);
2202
2202
  };
2203
2203
  }
2204
2204
  function In(e) {
@@ -2209,27 +2209,27 @@ function In(e) {
2209
2209
  function ki(e, t, n) {
2210
2210
  var r, a = n + "", i;
2211
2211
  return function() {
2212
- var l = Ne(this, e);
2213
- return l === a ? null : l === r ? i : i = t(r = l, n);
2212
+ var u = Ne(this, e);
2213
+ return u === a ? null : u === r ? i : i = t(r = u, n);
2214
2214
  };
2215
2215
  }
2216
2216
  function $i(e, t, n) {
2217
2217
  var r, a, i;
2218
2218
  return function() {
2219
- var l = Ne(this, e), u = n(this), f = u + "";
2220
- return u == null && (f = u = (this.style.removeProperty(e), Ne(this, e))), l === f ? null : l === r && f === a ? i : (a = f, i = t(r = l, u));
2219
+ var u = Ne(this, e), l = n(this), f = l + "";
2220
+ return l == null && (f = l = (this.style.removeProperty(e), Ne(this, e))), u === f ? null : u === r && f === a ? i : (a = f, i = t(r = u, l));
2221
2221
  };
2222
2222
  }
2223
- function Ti(e, t) {
2224
- var n, r, a, i = "style." + t, l = "end." + i, u;
2223
+ function Ri(e, t) {
2224
+ var n, r, a, i = "style." + t, u = "end." + i, l;
2225
2225
  return function() {
2226
- var f = ce(this, e), c = f.on, d = f.value[i] == null ? u || (u = In(t)) : void 0;
2227
- (c !== n || a !== d) && (r = (n = c).copy()).on(l, a = d), f.on = r;
2226
+ var f = ce(this, e), c = f.on, d = f.value[i] == null ? l || (l = In(t)) : void 0;
2227
+ (c !== n || a !== d) && (r = (n = c).copy()).on(u, a = d), f.on = r;
2228
2228
  };
2229
2229
  }
2230
- function Ri(e, t, n) {
2231
- var r = (e += "") == "transform" ? Ro : Ln;
2232
- return t == null ? this.styleTween(e, Si(e, r)).on("end.style." + e, In(e)) : typeof t == "function" ? this.styleTween(e, $i(e, r, Dt(this, "style." + e, t))).each(Ti(this._id, e)) : this.styleTween(e, ki(e, r, t), n).on("end.style." + e, null);
2230
+ function Ti(e, t, n) {
2231
+ var r = (e += "") == "transform" ? To : Ln;
2232
+ return t == null ? this.styleTween(e, Si(e, r)).on("end.style." + e, In(e)) : typeof t == "function" ? this.styleTween(e, $i(e, r, Dt(this, "style." + e, t))).each(Ri(this._id, e)) : this.styleTween(e, ki(e, r, t), n).on("end.style." + e, null);
2233
2233
  }
2234
2234
  function Ni(e, t, n) {
2235
2235
  return function(r) {
@@ -2239,8 +2239,8 @@ function Ni(e, t, n) {
2239
2239
  function Li(e, t, n) {
2240
2240
  var r, a;
2241
2241
  function i() {
2242
- var l = t.apply(this, arguments);
2243
- return l !== a && (r = (a = l) && Ni(e, l, n)), r;
2242
+ var u = t.apply(this, arguments);
2243
+ return u !== a && (r = (a = u) && Ni(e, u, n)), r;
2244
2244
  }
2245
2245
  return i._value = t, i;
2246
2246
  }
@@ -2256,14 +2256,14 @@ function Ui(e) {
2256
2256
  this.textContent = e;
2257
2257
  };
2258
2258
  }
2259
- function Fi(e) {
2259
+ function Bi(e) {
2260
2260
  return function() {
2261
2261
  var t = e(this);
2262
2262
  this.textContent = t ?? "";
2263
2263
  };
2264
2264
  }
2265
- function Bi(e) {
2266
- return this.tween("text", typeof e == "function" ? Fi(Dt(this, "text", e)) : Ui(e == null ? "" : e + ""));
2265
+ function Fi(e) {
2266
+ return this.tween("text", typeof e == "function" ? Bi(Dt(this, "text", e)) : Ui(e == null ? "" : e + ""));
2267
2267
  }
2268
2268
  function Oi(e) {
2269
2269
  return function(t) {
@@ -2287,10 +2287,10 @@ function Di(e) {
2287
2287
  }
2288
2288
  function zi() {
2289
2289
  for (var e = this._name, t = this._id, n = Un(), r = this._groups, a = r.length, i = 0; i < a; ++i)
2290
- for (var l = r[i], u = l.length, f, c = 0; c < u; ++c)
2291
- if (f = l[c]) {
2290
+ for (var u = r[i], l = u.length, f, c = 0; c < l; ++c)
2291
+ if (f = u[c]) {
2292
2292
  var d = ie(f, t);
2293
- ct(f, e, n, c, l, {
2293
+ ct(f, e, n, c, u, {
2294
2294
  time: d.time + d.delay + d.duration,
2295
2295
  delay: 0,
2296
2296
  duration: d.duration,
@@ -2301,13 +2301,13 @@ function zi() {
2301
2301
  }
2302
2302
  function qi() {
2303
2303
  var e, t, n = this, r = n._id, a = n.size();
2304
- return new Promise(function(i, l) {
2305
- var u = { value: l }, f = { value: function() {
2304
+ return new Promise(function(i, u) {
2305
+ var l = { value: u }, f = { value: function() {
2306
2306
  --a === 0 && i();
2307
2307
  } };
2308
2308
  n.each(function() {
2309
2309
  var c = ce(this, r), d = c.on;
2310
- d !== e && (t = (e = d).copy(), t._.cancel.push(u), t._.interrupt.push(u), t._.end.push(f)), c.on = t;
2310
+ d !== e && (t = (e = d).copy(), t._.cancel.push(l), t._.interrupt.push(l), t._.end.push(f)), c.on = t;
2311
2311
  }), a === 0 && i();
2312
2312
  });
2313
2313
  }
@@ -2322,12 +2322,12 @@ var de = We.prototype;
2322
2322
  ge.prototype = {
2323
2323
  constructor: ge,
2324
2324
  select: xi,
2325
- selectAll: Ei,
2325
+ selectAll: Mi,
2326
2326
  selectChild: de.selectChild,
2327
2327
  selectChildren: de.selectChildren,
2328
2328
  filter: mi,
2329
2329
  merge: gi,
2330
- selection: Mi,
2330
+ selection: Ci,
2331
2331
  transition: zi,
2332
2332
  call: de.call,
2333
2333
  nodes: de.nodes,
@@ -2338,13 +2338,13 @@ ge.prototype = {
2338
2338
  on: _i,
2339
2339
  attr: ei,
2340
2340
  attrTween: oi,
2341
- style: Ri,
2341
+ style: Ti,
2342
2342
  styleTween: Ii,
2343
- text: Bi,
2343
+ text: Fi,
2344
2344
  textTween: Di,
2345
2345
  remove: Ai,
2346
2346
  tween: Ho,
2347
- delay: ui,
2347
+ delay: li,
2348
2348
  duration: fi,
2349
2349
  ease: di,
2350
2350
  easeVarying: vi,
@@ -2371,8 +2371,8 @@ function Hi(e) {
2371
2371
  var t, n;
2372
2372
  e instanceof ge ? (t = e._id, e = e._name) : (t = Un(), (n = Wi).time = Ot(), e = e == null ? null : e + "");
2373
2373
  for (var r = this._groups, a = r.length, i = 0; i < a; ++i)
2374
- for (var l = r[i], u = l.length, f, c = 0; c < u; ++c)
2375
- (f = l[c]) && ct(f, e, t, c, l, n || ji(f, t));
2374
+ for (var u = r[i], l = u.length, f, c = 0; c < l; ++c)
2375
+ (f = u[c]) && ct(f, e, t, c, u, n || ji(f, t));
2376
2376
  return new ge(r, this._parents, e, t);
2377
2377
  }
2378
2378
  We.prototype.interrupt = Vo;
@@ -2431,12 +2431,12 @@ me.prototype = {
2431
2431
  return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
2432
2432
  }
2433
2433
  };
2434
- var lt = new me(1, 0, 0);
2434
+ var ut = new me(1, 0, 0);
2435
2435
  me.prototype;
2436
2436
  function pt(e) {
2437
2437
  e.stopImmediatePropagation();
2438
2438
  }
2439
- function Fe(e) {
2439
+ function Be(e) {
2440
2440
  e.preventDefault(), e.stopImmediatePropagation();
2441
2441
  }
2442
2442
  function Gi(e) {
@@ -2446,8 +2446,8 @@ function Qi() {
2446
2446
  var e = this;
2447
2447
  return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute("viewBox") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];
2448
2448
  }
2449
- function ln() {
2450
- return this.__zoom || lt;
2449
+ function un() {
2450
+ return this.__zoom || ut;
2451
2451
  }
2452
2452
  function Ki(e) {
2453
2453
  return -e.deltaY * (e.deltaMode === 1 ? 0.05 : e.deltaMode ? 1 : 2e-3) * (e.ctrlKey ? 10 : 1);
@@ -2456,20 +2456,20 @@ function Ji() {
2456
2456
  return navigator.maxTouchPoints || "ontouchstart" in this;
2457
2457
  }
2458
2458
  function Zi(e, t, n) {
2459
- var r = e.invertX(t[0][0]) - n[0][0], a = e.invertX(t[1][0]) - n[1][0], i = e.invertY(t[0][1]) - n[0][1], l = e.invertY(t[1][1]) - n[1][1];
2459
+ var r = e.invertX(t[0][0]) - n[0][0], a = e.invertX(t[1][0]) - n[1][0], i = e.invertY(t[0][1]) - n[0][1], u = e.invertY(t[1][1]) - n[1][1];
2460
2460
  return e.translate(
2461
2461
  a > r ? (r + a) / 2 : Math.min(0, r) || Math.max(0, a),
2462
- l > i ? (i + l) / 2 : Math.min(0, i) || Math.max(0, l)
2462
+ u > i ? (i + u) / 2 : Math.min(0, i) || Math.max(0, u)
2463
2463
  );
2464
2464
  }
2465
- function el() {
2466
- var e = Gi, t = Qi, n = Zi, r = Ki, a = Ji, i = [0, 1 / 0], l = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], u = 250, f = Fo, c = It("start", "zoom", "end"), d, y, w, A = 500, M = 150, S = 0, $ = 10;
2465
+ function eu() {
2466
+ var e = Gi, t = Qi, n = Zi, r = Ki, a = Ji, i = [0, 1 / 0], u = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], l = 250, f = Bo, c = It("start", "zoom", "end"), d, y, w, A = 500, C = 150, S = 0, $ = 10;
2467
2467
  function k(s) {
2468
- s.property("__zoom", ln).on("wheel.zoom", K, { passive: !1 }).on("mousedown.zoom", X).on("dblclick.zoom", P).filter(a).on("touchstart.zoom", ne).on("touchmove.zoom", _).on("touchend.zoom touchcancel.zoom", E).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2468
+ s.property("__zoom", un).on("wheel.zoom", K, { passive: !1 }).on("mousedown.zoom", X).on("dblclick.zoom", P).filter(a).on("touchstart.zoom", ne).on("touchmove.zoom", _).on("touchend.zoom touchcancel.zoom", M).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2469
2469
  }
2470
2470
  k.transform = function(s, p, o, v) {
2471
2471
  var g = s.selection ? s.selection() : s;
2472
- g.property("__zoom", ln), s !== g ? q(s, p, o, v) : g.interrupt().each(function() {
2472
+ g.property("__zoom", un), s !== g ? q(s, p, o, v) : g.interrupt().each(function() {
2473
2473
  H(this, arguments).event(v).start().zoom(null, typeof p == "function" ? p.apply(this, arguments) : p).end();
2474
2474
  });
2475
2475
  }, k.scaleBy = function(s, p, o, v) {
@@ -2479,26 +2479,26 @@ function el() {
2479
2479
  }, o, v);
2480
2480
  }, k.scaleTo = function(s, p, o, v) {
2481
2481
  k.transform(s, function() {
2482
- var g = t.apply(this, arguments), h = this.__zoom, m = o == null ? z(g) : typeof o == "function" ? o.apply(this, arguments) : o, x = h.invert(m), T = typeof p == "function" ? p.apply(this, arguments) : p;
2483
- return n(D(B(h, T), m, x), g, l);
2482
+ var g = t.apply(this, arguments), h = this.__zoom, m = o == null ? z(g) : typeof o == "function" ? o.apply(this, arguments) : o, x = h.invert(m), R = typeof p == "function" ? p.apply(this, arguments) : p;
2483
+ return n(D(F(h, R), m, x), g, u);
2484
2484
  }, o, v);
2485
2485
  }, k.translateBy = function(s, p, o, v) {
2486
2486
  k.transform(s, function() {
2487
2487
  return n(this.__zoom.translate(
2488
2488
  typeof p == "function" ? p.apply(this, arguments) : p,
2489
2489
  typeof o == "function" ? o.apply(this, arguments) : o
2490
- ), t.apply(this, arguments), l);
2490
+ ), t.apply(this, arguments), u);
2491
2491
  }, null, v);
2492
2492
  }, k.translateTo = function(s, p, o, v, g) {
2493
2493
  k.transform(s, function() {
2494
2494
  var h = t.apply(this, arguments), m = this.__zoom, x = v == null ? z(h) : typeof v == "function" ? v.apply(this, arguments) : v;
2495
- return n(lt.translate(x[0], x[1]).scale(m.k).translate(
2495
+ return n(ut.translate(x[0], x[1]).scale(m.k).translate(
2496
2496
  typeof p == "function" ? -p.apply(this, arguments) : -p,
2497
2497
  typeof o == "function" ? -o.apply(this, arguments) : -o
2498
- ), h, l);
2498
+ ), h, u);
2499
2499
  }, v, g);
2500
2500
  };
2501
- function B(s, p) {
2501
+ function F(s, p) {
2502
2502
  return p = Math.max(i[0], Math.min(i[1], p)), p === s.k ? s : new me(p, s.x, s.y);
2503
2503
  }
2504
2504
  function D(s, p, o) {
@@ -2514,12 +2514,12 @@ function el() {
2514
2514
  }).on("interrupt.zoom end.zoom", function() {
2515
2515
  H(this, arguments).event(v).end();
2516
2516
  }).tween("zoom", function() {
2517
- var g = this, h = arguments, m = H(g, h).event(v), x = t.apply(g, h), T = o == null ? z(x) : typeof o == "function" ? o.apply(g, h) : o, C = Math.max(x[1][0] - x[0][0], x[1][1] - x[0][1]), b = g.__zoom, L = typeof p == "function" ? p.apply(g, h) : p, I = f(b.invert(T).concat(C / b.k), L.invert(T).concat(C / L.k));
2517
+ var g = this, h = arguments, m = H(g, h).event(v), x = t.apply(g, h), R = o == null ? z(x) : typeof o == "function" ? o.apply(g, h) : o, E = Math.max(x[1][0] - x[0][0], x[1][1] - x[0][1]), b = g.__zoom, L = typeof p == "function" ? p.apply(g, h) : p, I = f(b.invert(R).concat(E / b.k), L.invert(R).concat(E / L.k));
2518
2518
  return function(U) {
2519
2519
  if (U === 1) U = L;
2520
2520
  else {
2521
- var Y = I(U), le = C / Y[2];
2522
- U = new me(le, T[0] - Y[0] * le, T[1] - Y[1] * le);
2521
+ var Y = I(U), ue = E / Y[2];
2522
+ U = new me(ue, R[0] - Y[0] * ue, R[1] - Y[1] * ue);
2523
2523
  }
2524
2524
  m.zoom(null, U);
2525
2525
  };
@@ -2568,56 +2568,56 @@ function el() {
2568
2568
  if (v.k === g) return;
2569
2569
  o.mouse = [h, v.invert(h)], et(this), o.start();
2570
2570
  }
2571
- Fe(s), o.wheel = setTimeout(m, M), o.zoom("mouse", n(D(B(v, g), o.mouse[0], o.mouse[1]), o.extent, l));
2571
+ Be(s), o.wheel = setTimeout(m, C), o.zoom("mouse", n(D(F(v, g), o.mouse[0], o.mouse[1]), o.extent, u));
2572
2572
  function m() {
2573
2573
  o.wheel = null, o.end();
2574
2574
  }
2575
2575
  }
2576
2576
  function X(s, ...p) {
2577
2577
  if (w || !e.apply(this, arguments)) return;
2578
- var o = s.currentTarget, v = H(this, p, !0).event(s), g = pe(s.view).on("mousemove.zoom", T, !0).on("mouseup.zoom", C, !0), h = xe(s, o), m = s.clientX, x = s.clientY;
2579
- uo(s.view), pt(s), v.mouse = [h, this.__zoom.invert(h)], et(this), v.start();
2580
- function T(b) {
2581
- if (Fe(b), !v.moved) {
2578
+ var o = s.currentTarget, v = H(this, p, !0).event(s), g = pe(s.view).on("mousemove.zoom", R, !0).on("mouseup.zoom", E, !0), h = xe(s, o), m = s.clientX, x = s.clientY;
2579
+ lo(s.view), pt(s), v.mouse = [h, this.__zoom.invert(h)], et(this), v.start();
2580
+ function R(b) {
2581
+ if (Be(b), !v.moved) {
2582
2582
  var L = b.clientX - m, I = b.clientY - x;
2583
2583
  v.moved = L * L + I * I > S;
2584
2584
  }
2585
- v.event(b).zoom("mouse", n(D(v.that.__zoom, v.mouse[0] = xe(b, o), v.mouse[1]), v.extent, l));
2585
+ v.event(b).zoom("mouse", n(D(v.that.__zoom, v.mouse[0] = xe(b, o), v.mouse[1]), v.extent, u));
2586
2586
  }
2587
- function C(b) {
2588
- g.on("mousemove.zoom mouseup.zoom", null), so(b.view, v.moved), Fe(b), v.event(b).end();
2587
+ function E(b) {
2588
+ g.on("mousemove.zoom mouseup.zoom", null), so(b.view, v.moved), Be(b), v.event(b).end();
2589
2589
  }
2590
2590
  }
2591
2591
  function P(s, ...p) {
2592
2592
  if (e.apply(this, arguments)) {
2593
- var o = this.__zoom, v = xe(s.changedTouches ? s.changedTouches[0] : s, this), g = o.invert(v), h = o.k * (s.shiftKey ? 0.5 : 2), m = n(D(B(o, h), v, g), t.apply(this, p), l);
2594
- Fe(s), u > 0 ? pe(this).transition().duration(u).call(q, m, v, s) : pe(this).call(k.transform, m, v, s);
2593
+ var o = this.__zoom, v = xe(s.changedTouches ? s.changedTouches[0] : s, this), g = o.invert(v), h = o.k * (s.shiftKey ? 0.5 : 2), m = n(D(F(o, h), v, g), t.apply(this, p), u);
2594
+ Be(s), l > 0 ? pe(this).transition().duration(l).call(q, m, v, s) : pe(this).call(k.transform, m, v, s);
2595
2595
  }
2596
2596
  }
2597
2597
  function ne(s, ...p) {
2598
2598
  if (e.apply(this, arguments)) {
2599
- var o = s.touches, v = o.length, g = H(this, p, s.changedTouches.length === v).event(s), h, m, x, T;
2599
+ var o = s.touches, v = o.length, g = H(this, p, s.changedTouches.length === v).event(s), h, m, x, R;
2600
2600
  for (pt(s), m = 0; m < v; ++m)
2601
- x = o[m], T = xe(x, this), T = [T, this.__zoom.invert(T), x.identifier], g.touch0 ? !g.touch1 && g.touch0[2] !== T[2] && (g.touch1 = T, g.taps = 0) : (g.touch0 = T, h = !0, g.taps = 1 + !!d);
2602
- d && (d = clearTimeout(d)), h && (g.taps < 2 && (y = T[0], d = setTimeout(function() {
2601
+ x = o[m], R = xe(x, this), R = [R, this.__zoom.invert(R), x.identifier], g.touch0 ? !g.touch1 && g.touch0[2] !== R[2] && (g.touch1 = R, g.taps = 0) : (g.touch0 = R, h = !0, g.taps = 1 + !!d);
2602
+ d && (d = clearTimeout(d)), h && (g.taps < 2 && (y = R[0], d = setTimeout(function() {
2603
2603
  d = null;
2604
2604
  }, A)), et(this), g.start());
2605
2605
  }
2606
2606
  }
2607
2607
  function _(s, ...p) {
2608
2608
  if (this.__zooming) {
2609
- var o = H(this, p).event(s), v = s.changedTouches, g = v.length, h, m, x, T;
2610
- for (Fe(s), h = 0; h < g; ++h)
2609
+ var o = H(this, p).event(s), v = s.changedTouches, g = v.length, h, m, x, R;
2610
+ for (Be(s), h = 0; h < g; ++h)
2611
2611
  m = v[h], x = xe(m, this), o.touch0 && o.touch0[2] === m.identifier ? o.touch0[0] = x : o.touch1 && o.touch1[2] === m.identifier && (o.touch1[0] = x);
2612
2612
  if (m = o.that.__zoom, o.touch1) {
2613
- var C = o.touch0[0], b = o.touch0[1], L = o.touch1[0], I = o.touch1[1], U = (U = L[0] - C[0]) * U + (U = L[1] - C[1]) * U, Y = (Y = I[0] - b[0]) * Y + (Y = I[1] - b[1]) * Y;
2614
- m = B(m, Math.sqrt(U / Y)), x = [(C[0] + L[0]) / 2, (C[1] + L[1]) / 2], T = [(b[0] + I[0]) / 2, (b[1] + I[1]) / 2];
2615
- } else if (o.touch0) x = o.touch0[0], T = o.touch0[1];
2613
+ var E = o.touch0[0], b = o.touch0[1], L = o.touch1[0], I = o.touch1[1], U = (U = L[0] - E[0]) * U + (U = L[1] - E[1]) * U, Y = (Y = I[0] - b[0]) * Y + (Y = I[1] - b[1]) * Y;
2614
+ m = F(m, Math.sqrt(U / Y)), x = [(E[0] + L[0]) / 2, (E[1] + L[1]) / 2], R = [(b[0] + I[0]) / 2, (b[1] + I[1]) / 2];
2615
+ } else if (o.touch0) x = o.touch0[0], R = o.touch0[1];
2616
2616
  else return;
2617
- o.zoom("touch", n(D(m, x, T), o.extent, l));
2617
+ o.zoom("touch", n(D(m, x, R), o.extent, u));
2618
2618
  }
2619
2619
  }
2620
- function E(s, ...p) {
2620
+ function M(s, ...p) {
2621
2621
  if (this.__zooming) {
2622
2622
  var o = H(this, p).event(s), v = s.changedTouches, g = v.length, h, m;
2623
2623
  for (pt(s), w && clearTimeout(w), w = setTimeout(function() {
@@ -2642,11 +2642,11 @@ function el() {
2642
2642
  }, k.scaleExtent = function(s) {
2643
2643
  return arguments.length ? (i[0] = +s[0], i[1] = +s[1], k) : [i[0], i[1]];
2644
2644
  }, k.translateExtent = function(s) {
2645
- return arguments.length ? (l[0][0] = +s[0][0], l[1][0] = +s[1][0], l[0][1] = +s[0][1], l[1][1] = +s[1][1], k) : [[l[0][0], l[0][1]], [l[1][0], l[1][1]]];
2645
+ return arguments.length ? (u[0][0] = +s[0][0], u[1][0] = +s[1][0], u[0][1] = +s[0][1], u[1][1] = +s[1][1], k) : [[u[0][0], u[0][1]], [u[1][0], u[1][1]]];
2646
2646
  }, k.constrain = function(s) {
2647
2647
  return arguments.length ? (n = s, k) : n;
2648
2648
  }, k.duration = function(s) {
2649
- return arguments.length ? (u = +s, k) : u;
2649
+ return arguments.length ? (l = +s, k) : l;
2650
2650
  }, k.interpolate = function(s) {
2651
2651
  return arguments.length ? (f = s, k) : f;
2652
2652
  }, k.on = function() {
@@ -2658,7 +2658,7 @@ function el() {
2658
2658
  return arguments.length ? ($ = +s, k) : $;
2659
2659
  }, k;
2660
2660
  }
2661
- const tl = /* @__PURE__ */ _e({
2661
+ const tu = /* @__PURE__ */ _e({
2662
2662
  __name: "scatterplot",
2663
2663
  props: {
2664
2664
  pointCount: { type: Number, default: 5e3 },
@@ -2674,51 +2674,51 @@ const tl = /* @__PURE__ */ _e({
2674
2674
  },
2675
2675
  emits: ["updateColorMap"],
2676
2676
  setup(e, { emit: t }) {
2677
- const n = e, r = R(null), a = R(null), i = R(null), l = R(null);
2678
- let u = null, f = null, c = null, d = [], y = null, w = null, A = null, M = 0, S = 0, $ = 1;
2677
+ const n = e, r = T(null), a = T(null), i = T(null), u = T(null);
2678
+ let l = null, f = null, c = null, d = [], y = null, w = null, A = null, C = 0, S = 0, $ = 1;
2679
2679
  Q(() => n.colorMap, p, { deep: !0 });
2680
2680
  function k(o) {
2681
2681
  if (!o || o.length < 7) return [1, 0, 0];
2682
2682
  const v = parseInt(o.slice(1, 3), 16) / 255, g = parseInt(o.slice(3, 5), 16) / 255, h = parseInt(o.slice(5, 7), 16) / 255;
2683
2683
  return [v, g, h].some(Number.isNaN) ? [1, 0, 0] : [v, g, h];
2684
2684
  }
2685
- const B = (o, v, g) => o + (v - o) * g;
2685
+ const F = (o, v, g) => o + (v - o) * g;
2686
2686
  function D(o, v) {
2687
2687
  const g = o.parentElement;
2688
- g && ($ = window.devicePixelRatio || 1, M = g.clientWidth || 800, S = g.clientHeight || 400, o.style.width = `${M}px`, o.style.height = `${S}px`, o.width = Math.round(M * $), o.height = Math.round(S * $), v.viewport(0, 0, o.width, o.height));
2688
+ g && ($ = window.devicePixelRatio || 1, C = g.clientWidth || 800, S = g.clientHeight || 400, o.style.width = `${C}px`, o.style.height = `${S}px`, o.width = Math.round(C * $), o.height = Math.round(S * $), v.viewport(0, 0, o.width, o.height));
2689
2689
  }
2690
2690
  function z(o, v) {
2691
- var g, h, m, x, T, C, b, L, I, U, Y, le;
2692
- const J = (C = (T = (x = (m = (h = (g = n.metaData) == null ? void 0 : g.row_groups) == null ? void 0 : h[0]) == null ? void 0 : m.columns) == null ? void 0 : x[0]) == null ? void 0 : T.meta_data) == null ? void 0 : C.statistics, ue = (le = (Y = (U = (I = (L = (b = n.metaData) == null ? void 0 : b.row_groups) == null ? void 0 : L[0]) == null ? void 0 : I.columns) == null ? void 0 : U[1]) == null ? void 0 : Y.meta_data) == null ? void 0 : le.statistics, fe = Number((J == null ? void 0 : J.min_value) ?? -1), be = Number((J == null ? void 0 : J.max_value) ?? 1), Z = Number((ue == null ? void 0 : ue.min_value) ?? -1), he = Number((ue == null ? void 0 : ue.max_value) ?? 1), Ae = (fe + be) / 2, Fn = (Z + he) / 2, Bn = Math.max(1e-9, be - fe), On = Math.max(1e-9, he - Z), Pn = 2 / Math.max(Bn, On), Dn = y.x / o * 2 - 1, zn = -y.y / v * 2 + 1, ft = y.k * Pn, qn = Dn - ft * Ae, Yn = zn - ft * Fn;
2691
+ var g, h, m, x, R, E, b, L, I, U, Y, ue;
2692
+ const J = (E = (R = (x = (m = (h = (g = n.metaData) == null ? void 0 : g.row_groups) == null ? void 0 : h[0]) == null ? void 0 : m.columns) == null ? void 0 : x[0]) == null ? void 0 : R.meta_data) == null ? void 0 : E.statistics, le = (ue = (Y = (U = (I = (L = (b = n.metaData) == null ? void 0 : b.row_groups) == null ? void 0 : L[0]) == null ? void 0 : I.columns) == null ? void 0 : U[1]) == null ? void 0 : Y.meta_data) == null ? void 0 : ue.statistics, fe = Number((J == null ? void 0 : J.min_value) ?? -1), be = Number((J == null ? void 0 : J.max_value) ?? 1), Z = Number((le == null ? void 0 : le.min_value) ?? -1), he = Number((le == null ? void 0 : le.max_value) ?? 1), Ae = (fe + be) / 2, Bn = (Z + he) / 2, Fn = Math.max(1e-9, be - fe), On = Math.max(1e-9, he - Z), Pn = 2 / Math.max(Fn, On), Dn = y.x / o * 2 - 1, zn = -y.y / v * 2 + 1, ft = y.k * Pn, qn = Dn - ft * Ae, Yn = zn - ft * Bn;
2693
2693
  return { s: ft, tx: qn, ty: Yn };
2694
2694
  }
2695
2695
  function q(o, v, g, h) {
2696
- const { s: m, tx: x, ty: T } = z(g, h), C = o / g * 2 - 1, b = -(v / h * 2 - 1), L = (C - x) / m, I = (b - T) / m;
2696
+ const { s: m, tx: x, ty: R } = z(g, h), E = o / g * 2 - 1, b = -(v / h * 2 - 1), L = (E - x) / m, I = (b - R) / m;
2697
2697
  return { x: L, y: I };
2698
2698
  }
2699
2699
  function H(o, v, g, h, m) {
2700
2700
  if (!o.length || !y) return null;
2701
2701
  const x = q(v, g, h, m);
2702
- let T = 1 / 0, C = null;
2702
+ let R = 1 / 0, E = null;
2703
2703
  for (const b of o) {
2704
2704
  const L = b.x - x.x, I = b.y - x.y, U = Math.hypot(L, I), Y = 3 / (y.k / 2);
2705
- U < T && U < Y && (T = U, C = b);
2705
+ U < R && U < Y && (R = U, E = b);
2706
2706
  }
2707
- return C;
2707
+ return E;
2708
2708
  }
2709
2709
  function V() {
2710
2710
  var o, v;
2711
2711
  const g = [], h = ((o = n.metaData) == null ? void 0 : o.schema) || [], m = n.data;
2712
2712
  for (let x = 0; x < m.length; x++) {
2713
- const T = m[x], C = Number(T[0]), b = Number(T[1]), L = {};
2713
+ const R = m[x], E = Number(R[0]), b = Number(R[1]), L = {};
2714
2714
  for (let I = 0; I < h.length; I++) {
2715
2715
  const U = ((v = h[I]) == null ? void 0 : v.name) ?? `col_${I}`;
2716
- L[U] = T[I];
2716
+ L[U] = R[I];
2717
2717
  }
2718
2718
  g.push({
2719
- x: C,
2719
+ x: E,
2720
2720
  y: b,
2721
- rawX: C,
2721
+ rawX: E,
2722
2722
  rawY: b,
2723
2723
  color: [0.5, 0.5, 0.5],
2724
2724
  id: x,
@@ -2745,14 +2745,14 @@ const tl = /* @__PURE__ */ _e({
2745
2745
  o.bufferData(o.ARRAY_BUFFER, m, o.STATIC_DRAW);
2746
2746
  const x = o.createBuffer();
2747
2747
  o.bindBuffer(o.ARRAY_BUFFER, x);
2748
- const T = new Float32Array(g.flatMap((U) => U.color));
2749
- o.bufferData(o.ARRAY_BUFFER, T, o.STATIC_DRAW);
2750
- const C = o.getAttribLocation(v, "a_position"), b = o.getAttribLocation(v, "a_color"), L = o.getUniformLocation(v, "u_viewMatrix"), I = o.getUniformLocation(v, "u_pointSize");
2748
+ const R = new Float32Array(g.flatMap((U) => U.color));
2749
+ o.bufferData(o.ARRAY_BUFFER, R, o.STATIC_DRAW);
2750
+ const E = o.getAttribLocation(v, "a_position"), b = o.getAttribLocation(v, "a_color"), L = o.getUniformLocation(v, "u_viewMatrix"), I = o.getUniformLocation(v, "u_pointSize");
2751
2751
  return {
2752
2752
  program: v,
2753
2753
  positionBuffer: h,
2754
2754
  colorBuffer: x,
2755
- positionAttributeLocation: C,
2755
+ positionAttributeLocation: E,
2756
2756
  colorAttributeLocation: b,
2757
2757
  viewMatrixLocation: L,
2758
2758
  pointSizeLocation: I,
@@ -2764,15 +2764,15 @@ const tl = /* @__PURE__ */ _e({
2764
2764
  const {
2765
2765
  program: m,
2766
2766
  positionBuffer: x,
2767
- colorBuffer: T,
2768
- positionAttributeLocation: C,
2767
+ colorBuffer: R,
2768
+ positionAttributeLocation: E,
2769
2769
  colorAttributeLocation: b,
2770
2770
  viewMatrixLocation: L,
2771
2771
  pointSizeLocation: I,
2772
2772
  count: U
2773
2773
  } = v;
2774
- o.clearColor(0, 0, 0, 1), o.clear(o.COLOR_BUFFER_BIT), o.useProgram(m), o.enableVertexAttribArray(C), o.bindBuffer(o.ARRAY_BUFFER, x), o.vertexAttribPointer(C, 2, o.FLOAT, !1, 0, 0), o.enableVertexAttribArray(b), o.bindBuffer(o.ARRAY_BUFFER, T), o.vertexAttribPointer(b, 3, o.FLOAT, !1, 0, 0);
2775
- const Y = o.canvas.clientWidth, le = o.canvas.clientHeight, { s: J, tx: ue, ty: fe } = z(Y, le), be = new Float32Array([
2774
+ o.clearColor(0, 0, 0, 1), o.clear(o.COLOR_BUFFER_BIT), o.useProgram(m), o.enableVertexAttribArray(E), o.bindBuffer(o.ARRAY_BUFFER, x), o.vertexAttribPointer(E, 2, o.FLOAT, !1, 0, 0), o.enableVertexAttribArray(b), o.bindBuffer(o.ARRAY_BUFFER, R), o.vertexAttribPointer(b, 3, o.FLOAT, !1, 0, 0);
2775
+ const Y = o.canvas.clientWidth, ue = o.canvas.clientHeight, { s: J, tx: le, ty: fe } = z(Y, ue), be = new Float32Array([
2776
2776
  J,
2777
2777
  0,
2778
2778
  0,
@@ -2785,14 +2785,14 @@ const tl = /* @__PURE__ */ _e({
2785
2785
  0,
2786
2786
  1,
2787
2787
  0,
2788
- ue,
2788
+ le,
2789
2789
  fe,
2790
2790
  0,
2791
2791
  1
2792
2792
  ]);
2793
2793
  if (o.uniformMatrix4fv(L, !1, be), o.uniform1f(I, Math.max(1.5, g * Math.sqrt(y.k) * $)), o.enable(o.BLEND), o.blendFunc(o.SRC_ALPHA, o.ONE_MINUS_SRC_ALPHA), o.drawArrays(o.POINTS, 0, U), h) {
2794
2794
  const Z = o.createBuffer();
2795
- o.bindBuffer(o.ARRAY_BUFFER, Z), o.bufferData(o.ARRAY_BUFFER, new Float32Array([h.x, h.y]), o.STATIC_DRAW), o.vertexAttribPointer(C, 2, o.FLOAT, !1, 0, 0);
2795
+ o.bindBuffer(o.ARRAY_BUFFER, Z), o.bufferData(o.ARRAY_BUFFER, new Float32Array([h.x, h.y]), o.STATIC_DRAW), o.vertexAttribPointer(E, 2, o.FLOAT, !1, 0, 0);
2796
2796
  const he = o.createBuffer();
2797
2797
  o.bindBuffer(o.ARRAY_BUFFER, he), o.bufferData(o.ARRAY_BUFFER, new Float32Array([1, 1, 0.5]), o.STATIC_DRAW), o.vertexAttribPointer(b, 3, o.FLOAT, !1, 0, 0), o.uniform1f(I, Math.max(2.5, g * Math.sqrt(y.k) * 2.5 * $)), o.drawArrays(o.POINTS, 0, 1);
2798
2798
  const Ae = o.createBuffer();
@@ -2801,15 +2801,15 @@ const tl = /* @__PURE__ */ _e({
2801
2801
  }
2802
2802
  function ne() {
2803
2803
  if (!(!a.value || !r.value)) {
2804
- if (u = a.value.getContext("webgl", {
2804
+ if (l = a.value.getContext("webgl", {
2805
2805
  preserveDrawingBuffer: !0,
2806
2806
  antialias: !0,
2807
2807
  alpha: !0
2808
- }) || a.value.getContext("experimental-webgl"), !u) {
2808
+ }) || a.value.getContext("experimental-webgl"), !l) {
2809
2809
  console.error("WebGL not supported");
2810
2810
  return;
2811
2811
  }
2812
- D(a.value, u), f = K(u, `
2812
+ D(a.value, l), f = K(l, `
2813
2813
  attribute vec2 a_position;
2814
2814
  attribute vec3 a_color;
2815
2815
  uniform mat4 u_viewMatrix;
@@ -2830,22 +2830,22 @@ const tl = /* @__PURE__ */ _e({
2830
2830
  if (dist > 0.4) { alpha = 1.0 - (dist - 0.4) * 2.0; }
2831
2831
  gl_FragColor = vec4(v_color, alpha);
2832
2832
  }
2833
- `), f && (u.useProgram(f), d = V(), c = X(u, f, d), y = lt.translate(M / 2, S / 2).scale(1), w = el().scaleExtent([0.1, 100]).on("zoom", (o) => {
2834
- y = o.transform, P(u, c, 2, A);
2835
- }), pe(a.value).call(w), requestAnimationFrame(() => P(u, c, 2, null)), a.value.addEventListener("mousemove", _), a.value.addEventListener("mouseleave", E));
2833
+ `), f && (l.useProgram(f), d = V(), c = X(l, f, d), y = ut.translate(C / 2, S / 2).scale(1), w = eu().scaleExtent([0.1, 100]).on("zoom", (o) => {
2834
+ y = o.transform, P(l, c, 2, A);
2835
+ }), pe(a.value).call(w), requestAnimationFrame(() => P(l, c, 2, null)), a.value.addEventListener("mousemove", _), a.value.addEventListener("mouseleave", M));
2836
2836
  }
2837
2837
  }
2838
2838
  function _(o) {
2839
2839
  var v, g, h, m, x;
2840
2840
  if (!a.value) return;
2841
- const T = a.value.getBoundingClientRect(), C = o.clientX - T.left, b = o.clientY - T.top, L = H(d, C, b, M, S);
2841
+ const R = a.value.getBoundingClientRect(), E = o.clientX - R.left, b = o.clientY - R.top, L = H(d, E, b, C, S);
2842
2842
  if (L) {
2843
2843
  const I = i.value;
2844
2844
  I.style.left = `${o.clientX + 15}px`, I.style.top = `${o.clientY - 15}px`, I.style.opacity = "1";
2845
- const U = ((v = n.metaData) == null ? void 0 : v.schema) || [], Y = U.findIndex((Z) => (Z == null ? void 0 : Z.name) === n.colorMode), le = n.colorMode, J = Y >= 0 ? (h = L.attrs) == null ? void 0 : h[((g = U[Y]) == null ? void 0 : g.name) || ""] : void 0;
2846
- let ue = "";
2845
+ const U = ((v = n.metaData) == null ? void 0 : v.schema) || [], Y = U.findIndex((Z) => (Z == null ? void 0 : Z.name) === n.colorMode), ue = n.colorMode, J = Y >= 0 ? (h = L.attrs) == null ? void 0 : h[((g = U[Y]) == null ? void 0 : g.name) || ""] : void 0;
2846
+ let le = "";
2847
2847
  const fe = n.selectedMapEntries;
2848
- J !== void 0 && (fe instanceof Map ? ue = fe.has(J) ? String(J) : "" : Array.isArray(fe) && (ue = fe.some(([Z]) => Z === J) ? String(J) : ""));
2848
+ J !== void 0 && (fe instanceof Map ? le = fe.has(J) ? String(J) : "" : Array.isArray(fe) && (le = fe.some(([Z]) => Z === J) ? String(J) : ""));
2849
2849
  const be = [];
2850
2850
  for (let Z = 2; Z < Math.min(U.length, 7); Z++) {
2851
2851
  const he = (m = U[Z]) == null ? void 0 : m.name;
@@ -2855,58 +2855,58 @@ const tl = /* @__PURE__ */ _e({
2855
2855
  }
2856
2856
  I.innerHTML = `
2857
2857
  <strong>(${L.rawX.toFixed(2)}, ${L.rawY.toFixed(2)})</strong>
2858
- ${Y >= 0 ? `<div><b>${le}</b>: ${ue || String(J)}</div>` : ""}
2858
+ ${Y >= 0 ? `<div><b>${ue}</b>: ${le || String(J)}</div>` : ""}
2859
2859
  ${be.join("")}
2860
- `, A = L, P(u, c, 2, A);
2860
+ `, A = L, P(l, c, 2, A);
2861
2861
  } else
2862
- i.value && (i.value.style.opacity = "0"), A !== null && (A = null, P(u, c, 2, null));
2862
+ i.value && (i.value.style.opacity = "0"), A !== null && (A = null, P(l, c, 2, null));
2863
2863
  }
2864
- function E() {
2865
- i.value && (i.value.style.opacity = "0"), A !== null && (A = null, P(u, c, 2, null));
2864
+ function M() {
2865
+ i.value && (i.value.style.opacity = "0"), A !== null && (A = null, P(l, c, 2, null));
2866
2866
  }
2867
2867
  function s() {
2868
- !a.value || !u || (D(a.value, u), P(u, c, 2, A));
2868
+ !a.value || !l || (D(a.value, l), P(l, c, 2, A));
2869
2869
  }
2870
2870
  function p() {
2871
2871
  var o;
2872
- if (!u || !c || !n.data.length) return;
2873
- const v = (((o = n.metaData) == null ? void 0 : o.schema) || []).findIndex((C) => (C == null ? void 0 : C.name) === n.colorMode), g = v >= 0 ? v : -1, h = k(n.startColor), m = k(n.endColor);
2872
+ if (!l || !c || !n.data.length) return;
2873
+ const v = (((o = n.metaData) == null ? void 0 : o.schema) || []).findIndex((E) => (E == null ? void 0 : E.name) === n.colorMode), g = v >= 0 ? v : -1, h = k(n.startColor), m = k(n.endColor);
2874
2874
  let x = [];
2875
2875
  if (n.colorMap && n.colorMap.size > 0 && g >= 0)
2876
- x = n.data.flatMap((C) => n.colorMap.get(C[g]) || [0.6, 0.6, 0.6]);
2876
+ x = n.data.flatMap((E) => n.colorMap.get(E[g]) || [0.6, 0.6, 0.6]);
2877
2877
  else if (g >= 0) {
2878
- const C = n.data.map((I) => Number(I[g])).filter(Number.isFinite), b = Math.min(...C), L = Math.max(...C) - b || 1;
2878
+ const E = n.data.map((I) => Number(I[g])).filter(Number.isFinite), b = Math.min(...E), L = Math.max(...E) - b || 1;
2879
2879
  x = n.data.flatMap((I) => {
2880
2880
  const U = Number(I[g]), Y = Math.max(0, Math.min(1, (U - b) / L));
2881
2881
  return [
2882
- B(h[0], m[0], Y),
2883
- B(h[1], m[1], Y),
2884
- B(h[2], m[2], Y)
2882
+ F(h[0], m[0], Y),
2883
+ F(h[1], m[1], Y),
2884
+ F(h[2], m[2], Y)
2885
2885
  ];
2886
2886
  });
2887
2887
  } else {
2888
- const C = k(n.singleColor);
2889
- x = n.data.flatMap(() => C);
2888
+ const E = k(n.singleColor);
2889
+ x = n.data.flatMap(() => E);
2890
2890
  }
2891
- u.deleteBuffer(c.colorBuffer);
2892
- const T = u.createBuffer();
2893
- u.bindBuffer(u.ARRAY_BUFFER, T), u.bufferData(u.ARRAY_BUFFER, new Float32Array(x), u.STATIC_DRAW), c.colorBuffer = T, P(u, c, 2, A);
2891
+ l.deleteBuffer(c.colorBuffer);
2892
+ const R = l.createBuffer();
2893
+ l.bindBuffer(l.ARRAY_BUFFER, R), l.bufferData(l.ARRAY_BUFFER, new Float32Array(x), l.STATIC_DRAW), c.colorBuffer = R, P(l, c, 2, A);
2894
2894
  }
2895
2895
  return Q(() => n.forceRegenerate, () => {
2896
- !u || !f || (d = V(), c && (u.deleteBuffer(c.positionBuffer), u.deleteBuffer(c.colorBuffer)), c = X(u, f, d), y = lt, a.value && w && pe(a.value).call(w.transform, y), p(), P(u, c, 2, null));
2896
+ !l || !f || (d = V(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = X(l, f, d), y = ut, a.value && w && pe(a.value).call(w.transform, y), p(), P(l, c, 2, null));
2897
2897
  }), Q(() => n.data, () => {
2898
- if (!u || !f) {
2898
+ if (!l || !f) {
2899
2899
  ne();
2900
2900
  return;
2901
2901
  }
2902
- d = V(), c && (u.deleteBuffer(c.positionBuffer), u.deleteBuffer(c.colorBuffer)), c = X(u, f, d), p(), P(u, c, 2, null);
2902
+ d = V(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = X(l, f, d), p(), P(l, c, 2, null);
2903
2903
  }), Q(() => n.colorMode, p), Q([() => n.startColor, () => n.endColor, () => n.singleColor], p), Q(() => n.pointCount, (o) => {
2904
- !u || !f || (d = V(), c && (u.deleteBuffer(c.positionBuffer), u.deleteBuffer(c.colorBuffer)), c = X(u, f, d), p(), P(u, c, 2, null));
2904
+ !l || !f || (d = V(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = X(l, f, d), p(), P(l, c, 2, null));
2905
2905
  }), Ve(() => {
2906
2906
  window.addEventListener("resize", s);
2907
- }), Rt(() => {
2908
- a.value && (a.value.removeEventListener("mousemove", _), a.value.removeEventListener("mouseleave", E)), window.removeEventListener("resize", s), u && c && (u.deleteBuffer(c.positionBuffer), u.deleteBuffer(c.colorBuffer), f && u.deleteProgram(f));
2909
- }), (o, v) => (F(), O("div", {
2907
+ }), Tt(() => {
2908
+ a.value && (a.value.removeEventListener("mousemove", _), a.value.removeEventListener("mouseleave", M)), window.removeEventListener("resize", s), l && c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer), f && l.deleteProgram(f));
2909
+ }), (o, v) => (B(), O("div", {
2910
2910
  class: "scatterplot-container",
2911
2911
  ref_key: "containerRef",
2912
2912
  ref: r
@@ -2920,19 +2920,19 @@ const tl = /* @__PURE__ */ _e({
2920
2920
  ref_key: "tooltipRef",
2921
2921
  ref: i
2922
2922
  }, null, 512),
2923
- Te(N("div", {
2923
+ Re(N("div", {
2924
2924
  id: "debug",
2925
2925
  ref_key: "debugRef",
2926
- ref: l
2926
+ ref: u
2927
2927
  }, null, 512), [
2928
2928
  [Vn, !1]
2929
2929
  ])
2930
2930
  ], 512));
2931
2931
  }
2932
- }), nl = /* @__PURE__ */ Ie(tl, [["__scopeId", "data-v-aa7d57bd"]]), rl = { class: "control-panel" }, al = { class: "color-option" }, ol = ["value"], il = {
2932
+ }), nu = /* @__PURE__ */ Ie(tu, [["__scopeId", "data-v-aa7d57bd"]]), ru = { class: "control-panel" }, au = { class: "color-option" }, ou = ["value"], iu = {
2933
2933
  key: 0,
2934
2934
  class: "color-option"
2935
- }, ll = { class: "legend" }, ul = { class: "legend-label" }, sl = /* @__PURE__ */ _e({
2935
+ }, uu = { class: "legend" }, lu = { class: "legend-label" }, su = /* @__PURE__ */ _e({
2936
2936
  __name: "control",
2937
2937
  props: {
2938
2938
  pointCount: { type: Number, default: 5e3 },
@@ -2954,56 +2954,56 @@ const tl = /* @__PURE__ */ _e({
2954
2954
  "updateColorMap"
2955
2955
  ],
2956
2956
  setup(e, { emit: t }) {
2957
- const n = e, r = t, a = R(n.pointCount), i = R(n.colorMode), l = R(n.startColor), u = R(n.endColor), f = R(n.singleColor), c = j(
2957
+ const n = e, r = t, a = T(n.pointCount), i = T(n.colorMode), u = T(n.startColor), l = T(n.endColor), f = T(n.singleColor), c = j(
2958
2958
  () => n.colorMapMap instanceof Map ? Array.from(n.colorMapMap.keys()) : []
2959
2959
  ), d = j(
2960
2960
  () => n.colorMapMap instanceof Map ? n.colorMapMap.get(i.value) : void 0
2961
2961
  ), y = j(() => d.value ? Array.from(d.value.entries()) : []);
2962
- function w(M) {
2963
- if (!M) return "rgb(150,150,150)";
2964
- const [S, $, k] = M;
2962
+ function w(C) {
2963
+ if (!C) return "rgb(150,150,150)";
2964
+ const [S, $, k] = C;
2965
2965
  return `rgb(${Math.round(S * 255)}, ${Math.round($ * 255)}, ${Math.round(k * 255)})`;
2966
2966
  }
2967
2967
  function A() {
2968
- r("update:colorMode", i.value), r("updateColorMap", [i.value, d.value ?? /* @__PURE__ */ new Map()]), r("update:startColor", l.value), r("update:endColor", u.value), r("update:singleColor", f.value);
2968
+ r("update:colorMode", i.value), r("updateColorMap", [i.value, d.value ?? /* @__PURE__ */ new Map()]), r("update:startColor", u.value), r("update:endColor", l.value), r("update:singleColor", f.value);
2969
2969
  }
2970
- return Q(() => n.pointCount, (M) => a.value = M), Q(() => n.colorMode, (M) => i.value = M), Q(() => n.startColor, (M) => l.value = M), Q(() => n.endColor, (M) => u.value = M), Q(() => n.singleColor, (M) => f.value = M), Q(i, A), Q(() => n.colorMapMap, () => {
2970
+ return Q(() => n.pointCount, (C) => a.value = C), Q(() => n.colorMode, (C) => i.value = C), Q(() => n.startColor, (C) => u.value = C), Q(() => n.endColor, (C) => l.value = C), Q(() => n.singleColor, (C) => f.value = C), Q(i, A), Q(() => n.colorMapMap, () => {
2971
2971
  n.colorMapMap instanceof Map && (i.value !== "random" && !n.colorMapMap.has(i.value) && (i.value = "random"), A());
2972
- }), (M, S) => (F(), O("div", rl, [
2972
+ }), (C, S) => (B(), O("div", ru, [
2973
2973
  S[4] || (S[4] = N("h3", null, "Color Controls", -1)),
2974
- N("div", al, [
2974
+ N("div", au, [
2975
2975
  S[2] || (S[2] = N("label", { for: "colorMode" }, "Color Mode:", -1)),
2976
- Te(N("select", {
2976
+ Re(N("select", {
2977
2977
  id: "colorMode",
2978
2978
  "onUpdate:modelValue": S[0] || (S[0] = ($) => i.value = $)
2979
2979
  }, [
2980
2980
  S[1] || (S[1] = N("option", { value: "random" }, "all", -1)),
2981
- (F(!0), O(re, null, ve(c.value, ($) => (F(), O("option", {
2981
+ (B(!0), O(re, null, ve(c.value, ($) => (B(), O("option", {
2982
2982
  key: $,
2983
2983
  value: $
2984
- }, G($), 9, ol))), 128))
2984
+ }, G($), 9, ou))), 128))
2985
2985
  ], 512), [
2986
2986
  [_t, i.value]
2987
2987
  ])
2988
2988
  ]),
2989
- y.value.length ? (F(), O("div", il, [
2990
- N("div", ll, [
2989
+ y.value.length ? (B(), O("div", iu, [
2990
+ N("div", uu, [
2991
2991
  S[3] || (S[3] = N("h4", null, "Legend", -1)),
2992
- (F(!0), O(re, null, ve(y.value, ([$, k], B) => (F(), O("div", {
2992
+ (B(!0), O(re, null, ve(y.value, ([$, k], F) => (B(), O("div", {
2993
2993
  class: "legend-item",
2994
- key: `${$}-${B}`
2994
+ key: `${$}-${F}`
2995
2995
  }, [
2996
2996
  N("div", {
2997
2997
  class: "legend-color",
2998
2998
  style: Wn({ backgroundColor: w(k) })
2999
2999
  }, null, 4),
3000
- N("div", ul, G($), 1)
3000
+ N("div", lu, G($), 1)
3001
3001
  ]))), 128))
3002
3002
  ])
3003
- ])) : Ce("", !0)
3003
+ ])) : Ee("", !0)
3004
3004
  ]));
3005
3005
  }
3006
- }), cl = /* @__PURE__ */ Ie(sl, [["__scopeId", "data-v-832c88a6"]]), fl = { class: "app-container" }, vt = "UMAP_1", mt = "UMAP_2", hl = /* @__PURE__ */ _e({
3006
+ }), cu = /* @__PURE__ */ Ie(su, [["__scopeId", "data-v-832c88a6"]]), fu = { class: "app-container" }, vt = "UMAP_1", mt = "UMAP_2", hu = /* @__PURE__ */ _e({
3007
3007
  __name: "wrapper",
3008
3008
  props: {
3009
3009
  apiUrl: {},
@@ -3013,7 +3013,7 @@ const tl = /* @__PURE__ */ _e({
3013
3013
  srcFileId: {}
3014
3014
  },
3015
3015
  setup(e) {
3016
- const t = e, n = R(5e3), r = R("random"), a = R("#ff0000"), i = R("#0000ff"), l = R("#4285f4"), u = R(!1), f = R(0), c = R([]), d = R(null), y = R(/* @__PURE__ */ new Map()), w = R(/* @__PURE__ */ new Map()), A = R([]), M = Lt(), S = R(null), $ = R(null), k = j(() => M.formatIdFromUrl(t.srcUrl));
3016
+ const t = e, n = T(5e3), r = T("random"), a = T("#ff0000"), i = T("#0000ff"), u = T("#4285f4"), l = T(!1), f = T(0), c = T([]), d = T(null), y = T(/* @__PURE__ */ new Map()), w = T(/* @__PURE__ */ new Map()), A = T([]), C = Lt(), S = T(null), $ = T(null), k = j(() => C.formatIdFromUrl(t.srcUrl));
3017
3017
  Q(
3018
3018
  () => {
3019
3019
  var p, o, v, g;
@@ -3027,16 +3027,16 @@ const tl = /* @__PURE__ */ _e({
3027
3027
  };
3028
3028
  },
3029
3029
  async ({ srcUrl: p, srcFileType: o, srcFileId: v, pkgId: g, pkgType: h, apiUrl: m }) => {
3030
- var x, T, C;
3030
+ var x, R, E;
3031
3031
  try {
3032
- if (c.value = [], d.value = null, await B(), p) {
3032
+ if (c.value = [], d.value = null, await F(), p) {
3033
3033
  const b = o ?? (p.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
3034
3034
  await D(p, b, k.value), await z();
3035
3035
  return;
3036
3036
  }
3037
3037
  if (g && m) {
3038
3038
  await K(g, m);
3039
- const b = (C = (T = (x = A.value) == null ? void 0 : x[0]) == null ? void 0 : T.content) == null ? void 0 : C.id;
3039
+ const b = (E = (R = (x = A.value) == null ? void 0 : x[0]) == null ? void 0 : R.content) == null ? void 0 : E.id;
3040
3040
  if (!b) return;
3041
3041
  const L = await X(g, b, m);
3042
3042
  await D(L, h === "CSV" ? "csv" : "parquet", b), await z();
@@ -3048,23 +3048,23 @@ const tl = /* @__PURE__ */ _e({
3048
3048
  { immediate: !0 }
3049
3049
  ), Q(n, async () => {
3050
3050
  $.value && S.value && await q();
3051
- }), Q([() => M.sharedVersion, () => M.sharedResultName], async () => {
3052
- M.sharedResultName && (await B(), $.value = M.sharedResultName, await z());
3051
+ }), Q([() => C.sharedVersion, () => C.sharedResultName], async () => {
3052
+ C.sharedResultName && (await F(), $.value = C.sharedResultName, await z());
3053
3053
  });
3054
- async function B() {
3054
+ async function F() {
3055
3055
  if (S.value) return;
3056
- const { connectionId: p } = await M.createConnection(`umap_${Date.now()}`);
3056
+ const { connectionId: p } = await C.createConnection(`umap_${Date.now()}`);
3057
3057
  S.value = p;
3058
3058
  }
3059
3059
  async function D(p, o, v) {
3060
3060
  const g = `umap_${v.replace(/[^a-zA-Z0-9_]/g, "_")}`;
3061
- $.value = await M.loadFile(p, o, g, {}, S.value, v);
3061
+ $.value = await C.loadFile(p, o, g, {}, S.value, v);
3062
3062
  }
3063
3063
  async function z() {
3064
3064
  var p, o, v, g;
3065
3065
  if (!$.value || !S.value) return;
3066
- const h = await s($.value), m = h.filter((C) => /DOUBLE|HUGEINT|BIGINT|INTEGER|DECIMAL|FLOAT|REAL/i.test(C.type)), x = h.some((C) => C.name === vt) ? vt : ((p = m[0]) == null ? void 0 : p.name) || ((o = h[0]) == null ? void 0 : o.name), T = h.some((C) => C.name === mt) ? mt : ((v = m[1]) == null ? void 0 : v.name) || ((g = h[1]) == null ? void 0 : g.name) || x;
3067
- await q(x, T, h.map((C) => C.name)), await H(h, x, T);
3066
+ const h = await s($.value), m = h.filter((E) => /DOUBLE|HUGEINT|BIGINT|INTEGER|DECIMAL|FLOAT|REAL/i.test(E.type)), x = h.some((E) => E.name === vt) ? vt : ((p = m[0]) == null ? void 0 : p.name) || ((o = h[0]) == null ? void 0 : o.name), R = h.some((E) => E.name === mt) ? mt : ((v = m[1]) == null ? void 0 : v.name) || ((g = h[1]) == null ? void 0 : g.name) || x;
3067
+ await q(x, R, h.map((E) => E.name)), await H(h, x, R);
3068
3068
  }
3069
3069
  async function q(p = vt, o = mt, v) {
3070
3070
  var g;
@@ -3073,20 +3073,20 @@ const tl = /* @__PURE__ */ _e({
3073
3073
  `CAST(${P(p)} AS DOUBLE) AS __x`,
3074
3074
  `CAST(${P(o)} AS DOUBLE) AS __y`,
3075
3075
  ...h.map((b) => P(b))
3076
- ].join(", ")} FROM ${$.value} LIMIT ${n.value}`, x = await M.executeQuery(m, S.value);
3076
+ ].join(", ")} FROM ${$.value} LIMIT ${n.value}`, x = await C.executeQuery(m, S.value);
3077
3077
  c.value = x.map((b) => [b.__x, b.__y, ...h.map((L) => b[L])]);
3078
- const T = `
3078
+ const R = `
3079
3079
  SELECT min(${P(p)}) AS xmin, max(${P(p)}) AS xmax,
3080
3080
  min(${P(o)}) AS ymin, max(${P(o)}) AS ymax
3081
3081
  FROM ${$.value}
3082
- `, C = ((g = await M.executeQuery(T, S.value)) == null ? void 0 : g[0]) || { xmin: -1, xmax: 1, ymin: -1, ymax: 1 };
3082
+ `, E = ((g = await C.executeQuery(R, S.value)) == null ? void 0 : g[0]) || { xmin: -1, xmax: 1, ymin: -1, ymax: 1 };
3083
3083
  d.value = {
3084
3084
  schema: [{ name: p }, { name: o }, ...h.map((b) => ({ name: b }))],
3085
3085
  row_groups: [
3086
3086
  {
3087
3087
  columns: [
3088
- { meta_data: { statistics: { min_value: C.xmin, max_value: C.xmax } } },
3089
- { meta_data: { statistics: { min_value: C.ymin, max_value: C.ymax } } }
3088
+ { meta_data: { statistics: { min_value: E.xmin, max_value: E.xmax } } },
3089
+ { meta_data: { statistics: { min_value: E.ymin, max_value: E.ymax } } }
3090
3090
  ]
3091
3091
  }
3092
3092
  ]
@@ -3103,8 +3103,8 @@ const tl = /* @__PURE__ */ _e({
3103
3103
  if (h(m.type))
3104
3104
  w.value.set(m.name, /* @__PURE__ */ new Map());
3105
3105
  else {
3106
- const x = `SELECT DISTINCT ${P(m.name)} AS v FROM ${$.value} LIMIT 10000`, T = (await M.executeQuery(x, S.value)).map((b) => b.v).filter((b) => b != null), C = /* @__PURE__ */ new Map();
3107
- T.forEach((b, L) => C.set(b, _(g[L % g.length]))), w.value.set(m.name, C);
3106
+ const x = `SELECT DISTINCT ${P(m.name)} AS v FROM ${$.value} LIMIT 10000`, R = (await C.executeQuery(x, S.value)).map((b) => b.v).filter((b) => b != null), E = /* @__PURE__ */ new Map();
3107
+ R.forEach((b, L) => E.set(b, _(g[L % g.length]))), w.value.set(m.name, E);
3108
3108
  }
3109
3109
  }
3110
3110
  (d.value || (d.value = {})).key_value_metadata = Array.from(w.value.keys()).map((m) => {
@@ -3133,7 +3133,7 @@ const tl = /* @__PURE__ */ _e({
3133
3133
  return `"${p.replace(/"/g, '""')}"`;
3134
3134
  }
3135
3135
  function ne() {
3136
- u.value = !u.value, f.value++;
3136
+ l.value = !l.value, f.value++;
3137
3137
  }
3138
3138
  function _(p) {
3139
3139
  try {
@@ -3144,18 +3144,18 @@ const tl = /* @__PURE__ */ _e({
3144
3144
  return [1, 0, 0];
3145
3145
  }
3146
3146
  }
3147
- function E(p) {
3147
+ function M(p) {
3148
3148
  y.value = p[1];
3149
3149
  }
3150
3150
  async function s(p) {
3151
- return (await M.executeQuery(`PRAGMA table_info(${p});`, S.value)).map((o) => ({ name: o.name, type: o.type }));
3151
+ return (await C.executeQuery(`PRAGMA table_info(${p});`, S.value)).map((o) => ({ name: o.name, type: o.type }));
3152
3152
  }
3153
3153
  return Ve(async () => {
3154
- await B();
3155
- }), Rt(async () => {
3156
- S.value && await M.closeConnection(S.value);
3157
- }), (p, o) => (F(), O("div", fl, [
3158
- (F(), sn(nl, {
3154
+ await F();
3155
+ }), Tt(async () => {
3156
+ S.value && await C.closeConnection(S.value);
3157
+ }), (p, o) => (B(), O("div", fu, [
3158
+ (B(), sn(nu, {
3159
3159
  data: c.value,
3160
3160
  metaData: d.value,
3161
3161
  pointCount: n.value,
@@ -3163,12 +3163,12 @@ const tl = /* @__PURE__ */ _e({
3163
3163
  colorMode: r.value,
3164
3164
  startColor: a.value,
3165
3165
  endColor: i.value,
3166
- singleColor: l.value,
3166
+ singleColor: u.value,
3167
3167
  selectedMapEntries: Array.from(y.value),
3168
- forceRegenerate: u.value,
3168
+ forceRegenerate: l.value,
3169
3169
  key: f.value
3170
3170
  }, null, 8, ["data", "metaData", "pointCount", "color-map", "colorMode", "startColor", "endColor", "singleColor", "selectedMapEntries", "forceRegenerate"])),
3171
- oe(cl, {
3171
+ oe(cu, {
3172
3172
  pointCount: n.value,
3173
3173
  "onUpdate:pointCount": o[0] || (o[0] = (v) => n.value = v),
3174
3174
  colorMode: r.value,
@@ -3177,19 +3177,19 @@ const tl = /* @__PURE__ */ _e({
3177
3177
  "onUpdate:startColor": o[2] || (o[2] = (v) => a.value = v),
3178
3178
  endColor: i.value,
3179
3179
  "onUpdate:endColor": o[3] || (o[3] = (v) => i.value = v),
3180
- singleColor: l.value,
3181
- "onUpdate:singleColor": o[4] || (o[4] = (v) => l.value = v),
3180
+ singleColor: u.value,
3181
+ "onUpdate:singleColor": o[4] || (o[4] = (v) => u.value = v),
3182
3182
  "color-scheme": y.value,
3183
3183
  "color-map-map": w.value,
3184
3184
  onRegenerate: ne,
3185
- onUpdateColorMap: E
3185
+ onUpdateColorMap: M
3186
3186
  }, null, 8, ["pointCount", "colorMode", "startColor", "endColor", "singleColor", "color-scheme", "color-map-map"])
3187
3187
  ]));
3188
3188
  }
3189
- }), dl = /* @__PURE__ */ Ie(hl, [["__scopeId", "data-v-1515ae28"]]), pl = { class: "pp-container" }, vl = { class: "pp-header" }, ml = { class: "pp-controls" }, gl = { class: "pp-field" }, yl = ["disabled"], wl = { class: "pp-field" }, _l = ["disabled"], bl = ["value"], Al = ["value"], xl = { class: "pp-field" }, El = ["disabled"], Cl = ["value"], Ml = { class: "pp-field" }, Sl = ["disabled"], kl = {
3189
+ }), du = /* @__PURE__ */ Ie(hu, [["__scopeId", "data-v-1515ae28"]]), pu = { class: "pp-container" }, vu = { class: "pp-header" }, mu = { class: "pp-controls" }, gu = { class: "pp-field" }, yu = ["disabled"], wu = { class: "pp-field" }, _u = ["disabled"], bu = ["value"], Au = ["value"], xu = ["disabled"], Mu = ["value"], Eu = { class: "pp-field" }, Cu = ["disabled"], Su = {
3190
3190
  key: 0,
3191
3191
  class: "pp-message"
3192
- }, gt = 100, yt = 12, wt = "(other)", $l = /* @__PURE__ */ _e({
3192
+ }, gt = 100, yt = 12, wt = "(other)", ku = /* @__PURE__ */ _e({
3193
3193
  __name: "proportionPlot",
3194
3194
  props: {
3195
3195
  apiUrl: {},
@@ -3202,25 +3202,25 @@ const tl = /* @__PURE__ */ _e({
3202
3202
  setup(e) {
3203
3203
  const t = e;
3204
3204
  let n;
3205
- const r = Lt(), a = R(null), i = R(null), l = R(
3205
+ const r = Lt(), a = T(null), i = T(null), u = T(
3206
3206
  t.srcUrl || "https://temp-precision-dashboard-data.s3.us-east-1.amazonaws.com/precision_human_drg_data.parquet"
3207
- ), u = j(() => r.formatIdFromUrl(l.value)), f = R(!1), c = R(""), d = R([]), y = R(""), w = R(""), A = `proportion-plot-${Math.random().toString(36).slice(2)}`;
3207
+ ), l = j(() => r.formatIdFromUrl(u.value)), f = T(!1), c = T(""), d = T([]), y = T(""), w = T(""), A = `proportion-plot-${Math.random().toString(36).slice(2)}`;
3208
3208
  Q(
3209
3209
  () => ({ srcUrl: t.srcUrl, srcFileType: t.srcFileType, srcFileId: t.srcFileId, pkg: t.pkg, apiUrl: t.apiUrl }),
3210
- async ({ srcUrl: _, srcFileType: E, srcFileId: s, pkg: p, apiUrl: o }) => {
3210
+ async ({ srcUrl: _, srcFileType: M, srcFileId: s, pkg: p, apiUrl: o }) => {
3211
3211
  var v, g;
3212
3212
  try {
3213
- if (_ && (l.value = _), await k(), l.value) {
3214
- const x = E ?? (l.value.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
3215
- await D(x, u.value);
3213
+ if (_ && (u.value = _), await k(), u.value) {
3214
+ const x = M ?? (u.value.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
3215
+ await D(x, l.value);
3216
3216
  return;
3217
3217
  }
3218
3218
  const h = (v = p == null ? void 0 : p.content) == null ? void 0 : v.id, m = (g = p == null ? void 0 : p.content) == null ? void 0 : g.packageType;
3219
3219
  if (h && o) {
3220
3220
  const x = await K(h, o);
3221
3221
  if (!x) return;
3222
- const T = await X(h, x, o), C = m === "CSV" ? "csv" : "parquet", b = x.replace(/[^a-zA-Z0-9_.-]/g, "_");
3223
- l.value = T, await D(C, b);
3222
+ const R = await X(h, x, o), E = m === "CSV" ? "csv" : "parquet", b = x.replace(/[^a-zA-Z0-9_.-]/g, "_");
3223
+ u.value = R, await D(E, b);
3224
3224
  }
3225
3225
  } catch (h) {
3226
3226
  console.error("[ProportionPlot] Load failed:", (h == null ? void 0 : h.message) || h), c.value = `Load failed: ${(h == null ? void 0 : h.message) || h}`;
@@ -3228,23 +3228,23 @@ const tl = /* @__PURE__ */ _e({
3228
3228
  },
3229
3229
  { immediate: !0 }
3230
3230
  );
3231
- const M = /* @__PURE__ */ new Set(["VARCHAR", "STRING", "TEXT", "BOOL", "BOOLEAN", "DATE", "TIMESTAMP"]), S = j(() => d.value.filter((_) => M.has(_.type) || _.type.startsWith("VARCHAR"))), $ = j(() => d.value.filter((_) => !M.has(_.type)));
3231
+ const C = /* @__PURE__ */ new Set(["VARCHAR", "STRING", "TEXT", "BOOL", "BOOLEAN", "DATE", "TIMESTAMP"]), S = j(() => d.value.filter((_) => C.has(_.type) || _.type.startsWith("VARCHAR"))), $ = j(() => d.value.filter((_) => !C.has(_.type)));
3232
3232
  async function k() {
3233
3233
  if (a.value) return;
3234
3234
  const { connectionId: _ } = await r.createConnection(`prop_${Date.now()}`);
3235
3235
  a.value = _;
3236
3236
  }
3237
- function B(_) {
3238
- const E = String(_).replace(/[^A-Za-z0-9_]/g, "_");
3239
- return (/^[A-Za-z_]/.test(E) ? E : `t_${E}`).slice(0, 63);
3237
+ function F(_) {
3238
+ const M = String(_).replace(/[^A-Za-z0-9_]/g, "_");
3239
+ return (/^[A-Za-z_]/.test(M) ? M : `t_${M}`).slice(0, 63);
3240
3240
  }
3241
- async function D(_, E) {
3241
+ async function D(_, M) {
3242
3242
  a.value || await k();
3243
- const s = (E || t.srcFileId || l.value || "file").replace(/[^A-Za-z0-9]/g, "_");
3243
+ const s = (M || t.srcFileId || u.value || "file").replace(/[^A-Za-z0-9]/g, "_");
3244
3244
  f.value = !0, c.value = "Loading file into DuckDB…";
3245
3245
  try {
3246
- const p = _ ?? (l.value.toLowerCase().endsWith(".csv") ? "csv" : "parquet"), o = t.tableNameOverride || B(`file_${s.slice(0, 48)}`), v = await r.loadFile(
3247
- l.value,
3246
+ const p = _ ?? (u.value.toLowerCase().endsWith(".csv") ? "csv" : "parquet"), o = t.tableNameOverride || F(`file_${s.slice(0, 48)}`), v = await r.loadFile(
3247
+ u.value,
3248
3248
  p,
3249
3249
  o,
3250
3250
  {},
@@ -3260,12 +3260,12 @@ const tl = /* @__PURE__ */ _e({
3260
3260
  return '"' + String(_).replace(/"/g, '""') + '"';
3261
3261
  }
3262
3262
  async function q(_ = !1) {
3263
- var E, s, p, o;
3263
+ var M, s, p, o;
3264
3264
  if (!i.value || !a.value) return;
3265
3265
  const v = `PRAGMA table_info(${z(i.value)})`, g = await r.executeQuery(v, a.value);
3266
3266
  if (d.value = g.map((h) => ({ name: String(h.name), type: String(h.type).toUpperCase() })), _ || !y.value || !w.value) {
3267
- const h = d.value.filter((m) => M.has(m.type) || m.type.startsWith("VARCHAR"));
3268
- y.value = ((E = h[0]) == null ? void 0 : E.name) || ((s = d.value[0]) == null ? void 0 : s.name) || "", w.value = ((p = h[1]) == null ? void 0 : p.name) || ((o = h[0]) == null ? void 0 : o.name) || "";
3267
+ const h = d.value.filter((m) => C.has(m.type) || m.type.startsWith("VARCHAR"));
3268
+ y.value = ((M = h[0]) == null ? void 0 : M.name) || ((s = d.value[0]) == null ? void 0 : s.name) || "", w.value = ((p = h[1]) == null ? void 0 : p.name) || ((o = h[0]) == null ? void 0 : o.name) || "";
3269
3269
  }
3270
3270
  c.value = `Columns: ${d.value.length}.`;
3271
3271
  }
@@ -3277,9 +3277,9 @@ const tl = /* @__PURE__ */ _e({
3277
3277
  }
3278
3278
  f.value = !0, c.value = "Computing proportions…";
3279
3279
  try {
3280
- const _ = z(i.value), E = z(y.value), s = z(w.value), p = `
3280
+ const _ = z(i.value), M = z(y.value), s = z(w.value), p = `
3281
3281
  WITH xf AS (
3282
- SELECT ${E} AS x, COUNT(*) AS c
3282
+ SELECT ${M} AS x, COUNT(*) AS c
3283
3283
  FROM ${_}
3284
3284
  GROUP BY 1
3285
3285
  ORDER BY c DESC
@@ -3295,11 +3295,11 @@ const tl = /* @__PURE__ */ _e({
3295
3295
  filtered AS (
3296
3296
  SELECT src.*
3297
3297
  FROM ${_} AS src
3298
- JOIN xf ON src.${E} = xf.x -- <-- src."org.ident"
3298
+ JOIN xf ON src.${M} = xf.x -- <-- src."org.ident"
3299
3299
  ),
3300
3300
  labeled AS (
3301
3301
  SELECT
3302
- ${E} AS x,
3302
+ ${M} AS x,
3303
3303
  CASE
3304
3304
  WHEN ${s} IN (SELECT y FROM yf) THEN COALESCE(${s}, '(missing)')
3305
3305
  ELSE '${wt}'
@@ -3335,7 +3335,7 @@ const tl = /* @__PURE__ */ _e({
3335
3335
  x: v,
3336
3336
  y: v.map((L) => m.get(h(L, b)) ?? 0),
3337
3337
  hovertemplate: `${w.value}=%{fullData.name}<br>${y.value}=%{x}<br>Proportion=%{y:.1%}<extra></extra>`
3338
- })), T = {
3338
+ })), R = {
3339
3339
  title: `${w.value} proportions within ${y.value}`,
3340
3340
  barmode: "stack",
3341
3341
  yaxis: { range: [0, 1], tickformat: ".0%", title: "Proportion" },
@@ -3343,9 +3343,9 @@ const tl = /* @__PURE__ */ _e({
3343
3343
  legend: { orientation: "h", y: -0.2 },
3344
3344
  margin: { t: 48, r: 16, b: 96, l: 56 }
3345
3345
  };
3346
- await n.newPlot(A, x, T, { responsive: !0 });
3347
- const C = (v.length >= gt ? ` Limited to top ${gt} ${y.value}.` : "") + (g.length >= yt || g.includes(wt) ? ` Limited to top ${yt} ${w.value} (+ ${wt}).` : "");
3348
- c.value = `Plotted ${g.length} categories across ${v.length} groups.${C}`;
3346
+ await n.newPlot(A, x, R, { responsive: !0 });
3347
+ const E = (v.length >= gt ? ` Limited to top ${gt} ${y.value}.` : "") + (g.length >= yt || g.includes(wt) ? ` Limited to top ${yt} ${w.value} (+ ${wt}).` : "");
3348
+ c.value = `Plotted ${g.length} categories across ${v.length} groups.${E}`;
3349
3349
  } catch (_) {
3350
3350
  console.error(_), c.value = `Error: ${(_ == null ? void 0 : _.message) || _}`;
3351
3351
  } finally {
@@ -3355,15 +3355,15 @@ const tl = /* @__PURE__ */ _e({
3355
3355
  }
3356
3356
  async function V() {
3357
3357
  }
3358
- async function K(_, E) {
3358
+ async function K(_, M) {
3359
3359
  var s, p;
3360
- const o = await V(), v = `${E}/packages/${_}/view?api_key=${o}`, g = await fetch(v);
3360
+ const o = await V(), v = `${M}/packages/${_}/view?api_key=${o}`, g = await fetch(v);
3361
3361
  if (!g.ok) return null;
3362
3362
  const h = await g.json();
3363
3363
  return (p = (s = h == null ? void 0 : h[0]) == null ? void 0 : s.content) == null ? void 0 : p.id;
3364
3364
  }
3365
- async function X(_, E, s) {
3366
- const p = await V(), o = `${s}/packages/${_}/files/${E}?api_key=${p}`, v = await fetch(o);
3365
+ async function X(_, M, s) {
3366
+ const p = await V(), o = `${s}/packages/${_}/files/${M}?api_key=${p}`, v = await fetch(o);
3367
3367
  if (!v.ok) throw new Error(`file url failed: ${v.status}`);
3368
3368
  return (await v.json()).url;
3369
3369
  }
@@ -3373,79 +3373,81 @@ const tl = /* @__PURE__ */ _e({
3373
3373
  async function ne() {
3374
3374
  if (!P()) return null;
3375
3375
  if (n) return n;
3376
- const _ = await import("./plotly.min-C6i-CQY9-Buq8XTFA.mjs").then((E) => E.p);
3376
+ const _ = await import("./plotly.min-C6i-CQY9-Buq8XTFA.mjs").then((M) => M.p);
3377
3377
  return n = _.default ?? _, n;
3378
3378
  }
3379
3379
  return Ve(async () => {
3380
3380
  await k(), await ne();
3381
- }), Rt(async () => {
3381
+ }), Tt(async () => {
3382
3382
  a.value && await r.closeConnection(a.value);
3383
- }), (_, E) => (F(), O("div", pl, [
3384
- N("div", vl, [
3385
- N("div", ml, [
3386
- N("div", gl, [
3387
- E[3] || (E[3] = N("label", null, "Data URL", -1)),
3388
- Te(N("input", {
3389
- "onUpdate:modelValue": E[0] || (E[0] = (s) => l.value = s),
3383
+ }), (_, M) => (B(), O("div", pu, [
3384
+ N("div", vu, [
3385
+ N("div", mu, [
3386
+ N("div", gu, [
3387
+ M[3] || (M[3] = N("label", null, "Data URL", -1)),
3388
+ Re(N("input", {
3389
+ "onUpdate:modelValue": M[0] || (M[0] = (s) => u.value = s),
3390
3390
  type: "text",
3391
3391
  class: "pp-input pp-input--url",
3392
3392
  disabled: f.value,
3393
3393
  placeholder: "https://.../file.parquet"
3394
- }, null, 8, yl), [
3395
- [un, l.value]
3396
- ])
3397
- ]),
3398
- N("div", wl, [
3399
- E[5] || (E[5] = N("label", null, "X (group) column", -1)),
3400
- Te(N("select", {
3401
- "onUpdate:modelValue": E[1] || (E[1] = (s) => y.value = s),
3402
- class: "pp-select",
3403
- disabled: f.value || d.value.length === 0
3404
- }, [
3405
- E[4] || (E[4] = N("option", {
3406
- disabled: "",
3407
- value: ""
3408
- }, "— choose —", -1)),
3409
- (F(!0), O(re, null, ve(S.value, (s) => (F(), O("option", {
3410
- key: s.name,
3411
- value: s.name
3412
- }, G(s.name) + " (" + G(s.type) + ")", 9, bl))), 128)),
3413
- (F(!0), O(re, null, ve($.value, (s) => (F(), O("option", {
3414
- key: s.name + "-num",
3415
- value: s.name
3416
- }, G(s.name) + " (" + G(s.type) + ")", 9, Al))), 128))
3417
- ], 8, _l), [
3418
- [_t, y.value]
3394
+ }, null, 8, yu), [
3395
+ [ln, u.value]
3419
3396
  ])
3420
3397
  ]),
3421
- N("div", xl, [
3422
- E[7] || (E[7] = N("label", null, "Y (category) column", -1)),
3423
- Te(N("select", {
3424
- "onUpdate:modelValue": E[2] || (E[2] = (s) => w.value = s),
3425
- class: "pp-select",
3426
- disabled: f.value || d.value.length === 0
3427
- }, [
3428
- E[6] || (E[6] = N("option", {
3429
- disabled: "",
3430
- value: ""
3431
- }, "— choose —", -1)),
3432
- (F(!0), O(re, null, ve(S.value, (s) => (F(), O("option", {
3433
- key: s.name + "-y",
3434
- value: s.name
3435
- }, G(s.name) + " (" + G(s.type) + ")", 9, Cl))), 128))
3436
- ], 8, El), [
3437
- [_t, w.value]
3398
+ N("div", wu, [
3399
+ N("div", null, [
3400
+ M[5] || (M[5] = N("label", null, "X (group) column", -1)),
3401
+ Re(N("select", {
3402
+ "onUpdate:modelValue": M[1] || (M[1] = (s) => y.value = s),
3403
+ class: "pp-select",
3404
+ disabled: f.value || d.value.length === 0
3405
+ }, [
3406
+ M[4] || (M[4] = N("option", {
3407
+ disabled: "",
3408
+ value: ""
3409
+ }, "— choose —", -1)),
3410
+ (B(!0), O(re, null, ve(S.value, (s) => (B(), O("option", {
3411
+ key: s.name,
3412
+ value: s.name
3413
+ }, G(s.name) + " (" + G(s.type) + ")", 9, bu))), 128)),
3414
+ (B(!0), O(re, null, ve($.value, (s) => (B(), O("option", {
3415
+ key: s.name + "-num",
3416
+ value: s.name
3417
+ }, G(s.name) + " (" + G(s.type) + ")", 9, Au))), 128))
3418
+ ], 8, _u), [
3419
+ [_t, y.value]
3420
+ ])
3421
+ ]),
3422
+ N("div", null, [
3423
+ M[7] || (M[7] = N("label", null, "Y (category) column", -1)),
3424
+ Re(N("select", {
3425
+ "onUpdate:modelValue": M[2] || (M[2] = (s) => w.value = s),
3426
+ class: "pp-select",
3427
+ disabled: f.value || d.value.length === 0
3428
+ }, [
3429
+ M[6] || (M[6] = N("option", {
3430
+ disabled: "",
3431
+ value: ""
3432
+ }, "— choose —", -1)),
3433
+ (B(!0), O(re, null, ve(S.value, (s) => (B(), O("option", {
3434
+ key: s.name + "-y",
3435
+ value: s.name
3436
+ }, G(s.name) + " (" + G(s.type) + ")", 9, Mu))), 128))
3437
+ ], 8, xu), [
3438
+ [_t, w.value]
3439
+ ])
3438
3440
  ])
3439
3441
  ]),
3440
- N("div", Ml, [
3442
+ N("div", Eu, [
3441
3443
  N("button", {
3442
3444
  class: "pp-btn pp-btn--primary",
3443
3445
  disabled: !y.value || !w.value || f.value || !a.value || !i.value,
3444
3446
  onClick: H
3445
- }, G(f.value ? "Working…" : "Plot"), 9, Sl)
3447
+ }, G(f.value ? "Working…" : "Plot"), 9, Cu),
3448
+ c.value ? (B(), O("div", Su, G(c.value), 1)) : Ee("", !0)
3446
3449
  ])
3447
- ]),
3448
- c.value ? (F(), O("div", kl, G(c.value), 1)) : Ce("", !0)
3450
+ ])
3449
3451
  ]),
3450
3452
  N("div", {
3451
3453
  id: A,
@@ -3453,29 +3455,29 @@ const tl = /* @__PURE__ */ _e({
3453
3455
  })
3454
3456
  ]));
3455
3457
  }
3456
- }), Tl = /* @__PURE__ */ Ie($l, [["__scopeId", "data-v-d76dd94b"]]), Rl = "dashboard:globalVars";
3458
+ }), $u = /* @__PURE__ */ Ie(ku, [["__scopeId", "data-v-53bd6454"]]), Ru = "dashboard:globalVars";
3457
3459
  function zt(e = !1) {
3458
- const t = Xn(Rl, null);
3460
+ const t = Xn(Ru, null);
3459
3461
  return !t && e && console.warn("[Widget] dashboard:globalVars not provided."), t;
3460
3462
  }
3461
- const Nl = { class: "data-explorer-wrap" }, Ll = { class: "data-explorer-info" }, Il = /* @__PURE__ */ _e({
3463
+ const Tu = { class: "data-explorer-wrap" }, Nu = { class: "data-explorer-info" }, Lu = /* @__PURE__ */ _e({
3462
3464
  inheritAttrs: !1,
3463
3465
  __name: "DataExplorer",
3464
3466
  setup(e) {
3465
- const t = zt(), n = R("Data Explorer"), r = j(() => we(t.s3Url));
3467
+ const t = zt(), n = T("Data Explorer"), r = j(() => we(t.s3Url));
3466
3468
  return Gn(() => {
3467
3469
  }), (a, i) => {
3468
- const l = bt("el-icon");
3469
- return F(), O(re, null, [
3470
+ const u = bt("el-icon");
3471
+ return B(), O(re, null, [
3470
3472
  Nt(a.$slots, "default", { widgetName: n.value }, void 0, !0),
3471
- N("div", Nl, [
3472
- N("div", Ll, [
3473
+ N("div", Tu, [
3474
+ N("div", Nu, [
3473
3475
  oe(we(Qn), { placement: "top-start" }, {
3474
3476
  content: Pe(() => [...i[0] || (i[0] = [
3475
3477
  At("Type in a query or use the suggested query buttons to run on your csv file", -1)
3476
3478
  ])]),
3477
3479
  default: Pe(() => [
3478
- oe(l, { color: "#8300BF" }, {
3480
+ oe(u, { color: "#8300BF" }, {
3479
3481
  default: Pe(() => [
3480
3482
  oe(we(Zn))
3481
3483
  ]),
@@ -3485,7 +3487,7 @@ const Nl = { class: "data-explorer-wrap" }, Ll = { class: "data-explorer-info" }
3485
3487
  _: 1
3486
3488
  })
3487
3489
  ]),
3488
- oe(we(Cr), { srcUrl: r.value }, null, 8, ["srcUrl"])
3490
+ oe(we(Er), { srcUrl: r.value }, null, 8, ["srcUrl"])
3489
3491
  ])
3490
3492
  ], 64);
3491
3493
  };
@@ -3495,34 +3497,34 @@ const Nl = { class: "data-explorer-wrap" }, Ll = { class: "data-explorer-info" }
3495
3497
  for (const [r, a] of t)
3496
3498
  n[r] = a;
3497
3499
  return n;
3498
- }, ql = /* @__PURE__ */ qt(Il, [["__scopeId", "data-v-2908b590"]]), Ul = { class: "umap-wrap" }, Fl = /* @__PURE__ */ Object.assign({
3500
+ }, zu = /* @__PURE__ */ qt(Lu, [["__scopeId", "data-v-e47a9f7d"]]), Iu = { class: "umap-wrap" }, Uu = /* @__PURE__ */ Object.assign({
3499
3501
  inheritAttrs: !1
3500
3502
  }, {
3501
3503
  __name: "Umap",
3502
3504
  setup(e) {
3503
- const t = zt(), n = R("Data Explorer"), r = j(() => we(t == null ? void 0 : t.s3Url));
3504
- return (a, i) => (F(), O(re, null, [
3505
+ const t = zt(), n = T("Data Explorer"), r = j(() => we(t == null ? void 0 : t.s3Url));
3506
+ return (a, i) => (B(), O(re, null, [
3505
3507
  Nt(a.$slots, "default", { widgetName: n.value }, void 0, !0),
3506
- N("div", Ul, [
3507
- oe(we(dl), { srcUrl: r.value }, null, 8, ["srcUrl"])
3508
+ N("div", Iu, [
3509
+ oe(we(du), { srcUrl: r.value }, null, 8, ["srcUrl"])
3508
3510
  ])
3509
3511
  ], 64));
3510
3512
  }
3511
- }), Yl = /* @__PURE__ */ qt(Fl, [["__scopeId", "data-v-d8a1dc37"]]), Bl = { class: "proportion-plot-wrap" }, Ol = /* @__PURE__ */ _e({
3513
+ }), qu = /* @__PURE__ */ qt(Uu, [["__scopeId", "data-v-d8a1dc37"]]), Bu = { class: "proportion-plot-wrap" }, Fu = /* @__PURE__ */ _e({
3512
3514
  inheritAttrs: !1,
3513
3515
  __name: "Proportion",
3514
3516
  setup(e) {
3515
3517
  const t = zt(), n = j(() => we(t.s3Url));
3516
- return (r, a) => (F(), O(re, null, [
3518
+ return (r, a) => (B(), O(re, null, [
3517
3519
  Nt(r.$slots, "default", {}, void 0, !0),
3518
- N("div", Bl, [
3519
- oe(we(Tl), { srcUrl: n.value }, null, 8, ["srcUrl"])
3520
+ N("div", Bu, [
3521
+ oe(we($u), { srcUrl: n.value }, null, 8, ["srcUrl"])
3520
3522
  ])
3521
3523
  ], 64));
3522
3524
  }
3523
- }), Vl = /* @__PURE__ */ qt(Ol, [["__scopeId", "data-v-96c1c44d"]]);
3525
+ }), Yu = /* @__PURE__ */ qt(Fu, [["__scopeId", "data-v-96c1c44d"]]);
3524
3526
  export {
3525
- ql as DataExplorer,
3526
- Vl as ProportionPlot,
3527
- Yl as UMAP
3527
+ zu as DataExplorer,
3528
+ Yu as ProportionPlot,
3529
+ qu as UMAP
3528
3530
  };