@bicharts/chart-host 0.5.107 → 0.5.108

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.
@@ -22,13 +22,13 @@ var require_papaparse_min = __commonJS({
22
22
  "function" == typeof define && define.amd ? define([], t) : "object" == typeof module && "undefined" != typeof exports ? module.exports = t() : e.Papa = t();
23
23
  })(exports, function r() {
24
24
  var n = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== n ? n : {};
25
- var d2, s = !n.document && !!n.postMessage, a2 = n.IS_PAPA_WORKER || false, o = {}, h3 = 0, v2 = {};
25
+ var d2, s = !n.document && !!n.postMessage, a4 = n.IS_PAPA_WORKER || false, o = {}, h3 = 0, v2 = {};
26
26
  function P4(e) {
27
27
  return 65279 === e.charCodeAt(0) ? e.slice(1) : e;
28
28
  }
29
- function u4(e) {
29
+ function u2(e) {
30
30
  this._handle = null, this._finished = false, this._completed = false, this._halted = false, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = true, this._completeResults = { data: [], errors: [], meta: {} }, function(e2) {
31
- var t = b2(e2);
31
+ var t = b4(e2);
32
32
  t.chunkSize = parseInt(t.chunkSize), e2.step || e2.chunk || (t.chunkSize = null);
33
33
  this._handle = new i(t), (this._handle.streamer = this)._config = t;
34
34
  }.call(this, e), this.parseChunk = function(t, e2) {
@@ -37,25 +37,25 @@ var require_papaparse_min = __commonJS({
37
37
  let e4 = this._config.newline;
38
38
  e4 || (r2 = this._config.quoteChar || '"', e4 = this._handle.guessLineEndings(t, r2)), t = [...t.split(e4).slice(i2)].join(e4);
39
39
  }
40
- this.isFirstChunk && q3(this._config.beforeFirstChunk) && void 0 !== (r2 = this._config.beforeFirstChunk(t)) && (t = r2), this.isFirstChunk = false, this._halted = false;
40
+ this.isFirstChunk && q4(this._config.beforeFirstChunk) && void 0 !== (r2 = this._config.beforeFirstChunk(t)) && (t = r2), this.isFirstChunk = false, this._halted = false;
41
41
  var i2 = this._partialLine + t, r2 = (this._partialLine = "", this._handle.parse(i2, this._baseIndex, !this._finished));
42
42
  if (!this._handle.paused() && !this._handle.aborted()) {
43
43
  t = r2.meta.cursor, i2 = (this._finished || (this._partialLine = i2.substring(t - this._baseIndex), this._baseIndex = t), r2 && r2.data && (this._rowCount += r2.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview);
44
- if (a2) n.postMessage({ results: r2, workerId: v2.WORKER_ID, finished: i2 });
45
- else if (q3(this._config.chunk) && !e2) {
44
+ if (a4) n.postMessage({ results: r2, workerId: v2.WORKER_ID, finished: i2 });
45
+ else if (q4(this._config.chunk) && !e2) {
46
46
  if (this._config.chunk(r2, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = true);
47
47
  this._completeResults = r2 = void 0;
48
48
  }
49
- return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(r2.data), this._completeResults.errors = this._completeResults.errors.concat(r2.errors), this._completeResults.meta = r2.meta), this._completed || !i2 || !q3(this._config.complete) || r2 && r2.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = true), i2 || r2 && r2.meta.paused || this._nextChunk(), r2;
49
+ return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(r2.data), this._completeResults.errors = this._completeResults.errors.concat(r2.errors), this._completeResults.meta = r2.meta), this._completed || !i2 || !q4(this._config.complete) || r2 && r2.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = true), i2 || r2 && r2.meta.paused || this._nextChunk(), r2;
50
50
  }
51
51
  this._halted = true;
52
52
  }, this._sendError = function(e2) {
53
- q3(this._config.error) ? this._config.error(e2) : a2 && this._config.error && n.postMessage({ workerId: v2.WORKER_ID, error: e2, finished: false });
53
+ q4(this._config.error) ? this._config.error(e2) : a4 && this._config.error && n.postMessage({ workerId: v2.WORKER_ID, error: e2, finished: false });
54
54
  };
55
55
  }
56
56
  function f4(e) {
57
57
  var r2;
58
- (e = e || {}).chunkSize || (e.chunkSize = v2.RemoteChunkSize), u4.call(this, e), this._nextChunk = s ? function() {
58
+ (e = e || {}).chunkSize || (e.chunkSize = v2.RemoteChunkSize), u2.call(this, e), this._nextChunk = s ? function() {
59
59
  this._readChunk(), this._chunkLoaded();
60
60
  } : function() {
61
61
  this._readChunk();
@@ -85,7 +85,7 @@ var require_papaparse_min = __commonJS({
85
85
  };
86
86
  }
87
87
  function l(e) {
88
- (e = e || {}).chunkSize || (e.chunkSize = v2.LocalChunkSize), u4.call(this, e);
88
+ (e = e || {}).chunkSize || (e.chunkSize = v2.LocalChunkSize), u2.call(this, e);
89
89
  var i2, r2, n2 = "undefined" != typeof FileReader;
90
90
  this.stream = function(e2) {
91
91
  this._input = e2, r2 = e2.slice || e2.webkitSlice || e2.mozSlice, n2 ? ((i2 = new FileReader()).onload = y5(this._chunkLoaded, this), i2.onerror = y5(this._chunkError, this)) : i2 = new FileReaderSync(), this._nextChunk();
@@ -102,7 +102,7 @@ var require_papaparse_min = __commonJS({
102
102
  }
103
103
  function c2(e) {
104
104
  var i2;
105
- u4.call(this, e = e || {}), this.stream = function(e2) {
105
+ u2.call(this, e = e || {}), this.stream = function(e2) {
106
106
  return i2 = e2, this._nextChunk();
107
107
  }, this._nextChunk = function() {
108
108
  var e2, t;
@@ -110,12 +110,12 @@ var require_papaparse_min = __commonJS({
110
110
  };
111
111
  }
112
112
  function p2(e) {
113
- u4.call(this, e = e || {});
113
+ u2.call(this, e = e || {});
114
114
  var t = [], i2 = true, r2 = false;
115
115
  this.pause = function() {
116
- u4.prototype.pause.apply(this, arguments), this._input.pause();
116
+ u2.prototype.pause.apply(this, arguments), this._input.pause();
117
117
  }, this.resume = function() {
118
- u4.prototype.resume.apply(this, arguments), this._input.resume();
118
+ u2.prototype.resume.apply(this, arguments), this._input.resume();
119
119
  }, this.stream = function(e2) {
120
120
  this._input = e2, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
121
121
  }, this._checkIsFinished = function() {
@@ -137,16 +137,16 @@ var require_papaparse_min = __commonJS({
137
137
  }, this);
138
138
  }
139
139
  function i(m4) {
140
- var n2, s2, a4, t, o2 = Math.pow(2, 53), h4 = -o2, u5 = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, d3 = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, i2 = this, r2 = 0, f5 = 0, l2 = false, e = false, c4 = [], p4 = { data: [], errors: [], meta: {} };
140
+ var n2, s2, a5, t, o2 = Math.pow(2, 53), h4 = -o2, u4 = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, d3 = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, i2 = this, r2 = 0, f5 = 0, l2 = false, e = false, c4 = [], p4 = { data: [], errors: [], meta: {} };
141
141
  function y6(e2) {
142
142
  return "greedy" === m4.skipEmptyLines ? "" === e2.join("").trim() : 1 === e2.length && 0 === e2[0].length;
143
143
  }
144
144
  function g4() {
145
- if (p4 && a4 && (k2("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + v2.DefaultDelimiter + "'"), a4 = false), m4.skipEmptyLines && (p4.data = p4.data.filter(function(e4) {
145
+ if (p4 && a5 && (k2("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + v2.DefaultDelimiter + "'"), a5 = false), m4.skipEmptyLines && (p4.data = p4.data.filter(function(e4) {
146
146
  return !y6(e4);
147
147
  })), _3()) {
148
148
  let t4 = function(e4, t5) {
149
- e4 = P4(e4), q3(m4.transformHeader) && (e4 = m4.transformHeader(e4, t5)), c4.push(e4);
149
+ e4 = P4(e4), q4(m4.transformHeader) && (e4 = m4.transformHeader(e4, t5)), c4.push(e4);
150
150
  };
151
151
  var t2 = t4;
152
152
  if (p4) if (Array.isArray(p4.data[0])) {
@@ -157,7 +157,7 @@ var require_papaparse_min = __commonJS({
157
157
  function i4(e4, t4) {
158
158
  for (var i5 = m4.header ? {} : [], r5 = 0; r5 < e4.length; r5++) {
159
159
  var n4 = r5, s4 = e4[r5], s4 = ((e5, t5) => ((e6) => (m4.dynamicTypingFunction && void 0 === m4.dynamicTyping[e6] && (m4.dynamicTyping[e6] = m4.dynamicTypingFunction(e6)), true === (m4.dynamicTyping[e6] || m4.dynamicTyping)))(e5) ? "true" === t5 || "TRUE" === t5 || "false" !== t5 && "FALSE" !== t5 && (((e6) => {
160
- if (u5.test(e6)) {
160
+ if (u4.test(e6)) {
161
161
  e6 = parseFloat(e6);
162
162
  if (h4 < e6 && e6 < o2) return 1;
163
163
  }
@@ -176,29 +176,29 @@ var require_papaparse_min = __commonJS({
176
176
  e2 = { type: e2, code: t2, message: i4 };
177
177
  void 0 !== r4 && (e2.row = r4), p4.errors.push(e2);
178
178
  }
179
- q3(m4.step) && (t = m4.step, m4.step = function(e2) {
179
+ q4(m4.step) && (t = m4.step, m4.step = function(e2) {
180
180
  p4 = e2, _3() ? g4() : (g4(), 0 !== p4.data.length && (r2 += e2.data.length, m4.preview && r2 > m4.preview ? s2.abort() : (p4.data = p4.data[0], t(p4, i2))));
181
181
  }), this.parse = function(e2, t2, i4) {
182
- var r4 = m4.quoteChar || '"', r4 = (m4.newline || (m4.newline = this.guessLineEndings(e2, r4)), a4 = false, m4.delimiter ? q3(m4.delimiter) && (m4.delimiter = m4.delimiter(e2), p4.meta.delimiter = m4.delimiter) : ((r4 = ((e4, t4, i5, r5, n4) => {
183
- var s4, a5, o4, h5;
182
+ var r4 = m4.quoteChar || '"', r4 = (m4.newline || (m4.newline = this.guessLineEndings(e2, r4)), a5 = false, m4.delimiter ? q4(m4.delimiter) && (m4.delimiter = m4.delimiter(e2), p4.meta.delimiter = m4.delimiter) : ((r4 = ((e4, t4, i5, r5, n4) => {
183
+ var s4, a6, o4, h5;
184
184
  n4 = n4 || [",", " ", "|", ";", v2.RECORD_SEP, v2.UNIT_SEP];
185
- for (var u6 = 0; u6 < n4.length; u6++) {
186
- for (var d4, f6 = n4[u6], l3 = 0, c5 = 0, p5 = 0, g5 = (o4 = void 0, new E2({ comments: r5, delimiter: f6, newline: t4, preview: 10 }).parse(e4)), _4 = 0; _4 < g5.data.length; _4++) i5 && y6(g5.data[_4]) ? p5++ : (d4 = g5.data[_4].length, c5 += d4, void 0 === o4 ? o4 = d4 : 0 < d4 && (l3 += Math.abs(d4 - o4), o4 = d4));
187
- 0 < g5.data.length && (c5 /= g5.data.length - p5), (void 0 === a5 || l3 <= a5) && (void 0 === h5 || h5 < c5) && 1.99 < c5 && (a5 = l3, s4 = f6, h5 = c5);
185
+ for (var u5 = 0; u5 < n4.length; u5++) {
186
+ for (var d4, f6 = n4[u5], l3 = 0, c5 = 0, p5 = 0, g5 = (o4 = void 0, new E2({ comments: r5, delimiter: f6, newline: t4, preview: 10 }).parse(e4)), _4 = 0; _4 < g5.data.length; _4++) i5 && y6(g5.data[_4]) ? p5++ : (d4 = g5.data[_4].length, c5 += d4, void 0 === o4 ? o4 = d4 : 0 < d4 && (l3 += Math.abs(d4 - o4), o4 = d4));
187
+ 0 < g5.data.length && (c5 /= g5.data.length - p5), (void 0 === a6 || l3 <= a6) && (void 0 === h5 || h5 < c5) && 1.99 < c5 && (a6 = l3, s4 = f6, h5 = c5);
188
188
  }
189
189
  return { successful: !!(m4.delimiter = s4), bestDelimiter: s4 };
190
- })(e2, m4.newline, m4.skipEmptyLines, m4.comments, m4.delimitersToGuess)).successful ? m4.delimiter = r4.bestDelimiter : (a4 = true, m4.delimiter = v2.DefaultDelimiter), p4.meta.delimiter = m4.delimiter), b2(m4));
190
+ })(e2, m4.newline, m4.skipEmptyLines, m4.comments, m4.delimitersToGuess)).successful ? m4.delimiter = r4.bestDelimiter : (a5 = true, m4.delimiter = v2.DefaultDelimiter), p4.meta.delimiter = m4.delimiter), b4(m4));
191
191
  return m4.preview && m4.header && r4.preview++, n2 = e2, s2 = new E2(r4), p4 = s2.parse(n2, t2, i4), g4(), l2 ? { meta: { paused: true } } : p4 || { meta: { paused: false } };
192
192
  }, this.paused = function() {
193
193
  return l2;
194
194
  }, this.pause = function() {
195
- l2 = true, s2.abort(), n2 = q3(m4.chunk) ? "" : n2.substring(s2.getCharIndex());
195
+ l2 = true, s2.abort(), n2 = q4(m4.chunk) ? "" : n2.substring(s2.getCharIndex());
196
196
  }, this.resume = function() {
197
197
  i2.streamer._halted ? (l2 = false, i2.streamer.parseChunk(n2, true)) : setTimeout(i2.resume, 3);
198
198
  }, this.aborted = function() {
199
199
  return e;
200
200
  }, this.abort = function() {
201
- e = true, s2.abort(), p4.meta.aborted = true, q3(m4.complete) && m4.complete(p4), n2 = "";
201
+ e = true, s2.abort(), p4.meta.aborted = true, q4(m4.complete) && m4.complete(p4), n2 = "";
202
202
  }, this.guessLineEndings = function(e2, t2) {
203
203
  e2 = e2.substring(0, 1048576);
204
204
  var t2 = new RegExp(U2(t2) + "([^]*?)" + U2(t2), "gm"), i4 = (e2 = e2.replace(t2, "")).split("\r"), t2 = e2.split("\n"), e2 = 1 < t2.length && t2[0].length < i4[0].length;
@@ -211,19 +211,19 @@ var require_papaparse_min = __commonJS({
211
211
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
212
212
  }
213
213
  function E2(C) {
214
- var S = (C = C || {}).delimiter, O3 = C.newline, x3 = C.comments, I2 = C.step, A2 = C.preview, T3 = C.fastMode, D4 = null, L2 = false, F4 = null == C.quoteChar ? '"' : C.quoteChar, j3 = F4;
215
- if (void 0 !== C.escapeChar && (j3 = C.escapeChar), ("string" != typeof S || -1 < v2.BAD_DELIMITERS.indexOf(S)) && (S = ","), x3 === S) throw new Error("Comment character same as delimiter");
214
+ var S = (C = C || {}).delimiter, O3 = C.newline, x3 = C.comments, I2 = C.step, A2 = C.preview, T3 = C.fastMode, D4 = null, L2 = false, F4 = null == C.quoteChar ? '"' : C.quoteChar, j2 = F4;
215
+ if (void 0 !== C.escapeChar && (j2 = C.escapeChar), ("string" != typeof S || -1 < v2.BAD_DELIMITERS.indexOf(S)) && (S = ","), x3 === S) throw new Error("Comment character same as delimiter");
216
216
  true === x3 ? x3 = "#" : ("string" != typeof x3 || -1 < v2.BAD_DELIMITERS.indexOf(x3)) && (x3 = false), "\n" !== O3 && "\r" !== O3 && "\r\n" !== O3 && (O3 = "\n");
217
217
  var z3 = 0, M4 = false;
218
218
  this.parse = function(i2, t, r2) {
219
219
  if ("string" != typeof i2) throw new Error("Input must be a string");
220
- var n2 = i2.length, e = S.length, s2 = O3.length, a4 = x3.length, o2 = q3(I2), h4 = [], u5 = [], d3 = [], f5 = z3 = 0;
220
+ var n2 = i2.length, e = S.length, s2 = O3.length, a5 = x3.length, o2 = q4(I2), h4 = [], u4 = [], d3 = [], f5 = z3 = 0;
221
221
  if (!i2) return w2();
222
222
  if (T3 || false !== T3 && -1 === i2.indexOf(F4)) {
223
223
  for (var l2 = i2.split(O3), c4 = 0; c4 < l2.length; c4++) {
224
224
  if (d3 = l2[c4], z3 += d3.length, c4 !== l2.length - 1) z3 += O3.length;
225
225
  else if (r2) return w2();
226
- if (!x3 || d3.substring(0, a4) !== x3) {
226
+ if (!x3 || d3.substring(0, a5) !== x3) {
227
227
  if (o2) {
228
228
  if (h4 = [], k2(d3.split(S)), R2(), M4) return w2();
229
229
  } else k2(d3.split(S));
@@ -232,11 +232,11 @@ var require_papaparse_min = __commonJS({
232
232
  }
233
233
  return w2();
234
234
  }
235
- for (var p4 = i2.indexOf(S, z3), g4 = i2.indexOf(O3, z3), _3 = new RegExp(U2(j3) + U2(F4), "g"), m4 = i2.indexOf(F4, z3); ; ) if (i2[z3] === F4) for (m4 = z3, z3++; ; ) {
236
- if (-1 === (m4 = i2.indexOf(F4, m4 + 1))) return r2 || u5.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h4.length, index: z3 }), E4();
235
+ for (var p4 = i2.indexOf(S, z3), g4 = i2.indexOf(O3, z3), _3 = new RegExp(U2(j2) + U2(F4), "g"), m4 = i2.indexOf(F4, z3); ; ) if (i2[z3] === F4) for (m4 = z3, z3++; ; ) {
236
+ if (-1 === (m4 = i2.indexOf(F4, m4 + 1))) return r2 || u4.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h4.length, index: z3 }), E4();
237
237
  if (m4 === n2 - 1) return E4(i2.substring(z3, m4).replace(_3, F4));
238
- if (F4 === j3 && i2[m4 + 1] === j3) m4++;
239
- else if (F4 === j3 || 0 === m4 || i2[m4 - 1] !== j3) {
238
+ if (F4 === j2 && i2[m4 + 1] === j2) m4++;
239
+ else if (F4 === j2 || 0 === m4 || i2[m4 - 1] !== j2) {
240
240
  -1 !== p4 && p4 < m4 + 1 && (p4 = i2.indexOf(S, m4 + 1));
241
241
  var y6 = v3(-1 === (g4 = -1 !== g4 && g4 < m4 + 1 ? i2.indexOf(O3, m4 + 1) : g4) ? p4 : Math.min(p4, g4));
242
242
  if (i2.substr(m4 + 1 + y6, e) === S) {
@@ -245,20 +245,20 @@ var require_papaparse_min = __commonJS({
245
245
  }
246
246
  y6 = v3(g4);
247
247
  if (i2.substring(m4 + 1 + y6, m4 + 1 + y6 + s2) === O3) {
248
- if (d3.push(i2.substring(z3, m4).replace(_3, F4)), b4(m4 + 1 + y6 + s2), p4 = i2.indexOf(S, z3), m4 = i2.indexOf(F4, z3), o2 && (R2(), M4)) return w2();
248
+ if (d3.push(i2.substring(z3, m4).replace(_3, F4)), b5(m4 + 1 + y6 + s2), p4 = i2.indexOf(S, z3), m4 = i2.indexOf(F4, z3), o2 && (R2(), M4)) return w2();
249
249
  if (A2 && h4.length >= A2) return w2(true);
250
250
  break;
251
251
  }
252
- u5.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: h4.length, index: z3 }), m4++;
252
+ u4.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: h4.length, index: z3 }), m4++;
253
253
  }
254
254
  }
255
- else if (x3 && 0 === d3.length && i2.substring(z3, z3 + a4) === x3) {
255
+ else if (x3 && 0 === d3.length && i2.substring(z3, z3 + a5) === x3) {
256
256
  if (-1 === g4) return w2();
257
257
  z3 = g4 + s2, g4 = i2.indexOf(O3, z3), p4 = i2.indexOf(S, z3);
258
258
  } else if (-1 !== p4 && (p4 < g4 || -1 === g4)) d3.push(i2.substring(z3, p4)), z3 = p4 + e, p4 = i2.indexOf(S, z3);
259
259
  else {
260
260
  if (-1 === g4) break;
261
- if (d3.push(i2.substring(z3, g4)), b4(g4 + s2), o2 && (R2(), M4)) return w2();
261
+ if (d3.push(i2.substring(z3, g4)), b5(g4 + s2), o2 && (R2(), M4)) return w2();
262
262
  if (A2 && h4.length >= A2) return w2(true);
263
263
  }
264
264
  return E4();
@@ -272,28 +272,28 @@ var require_papaparse_min = __commonJS({
272
272
  function E4(e2) {
273
273
  return r2 || (void 0 === e2 && (e2 = i2.substring(z3)), d3.push(e2), z3 = n2, k2(d3), o2 && R2()), w2();
274
274
  }
275
- function b4(e2) {
275
+ function b5(e2) {
276
276
  z3 = e2, k2(d3), d3 = [], g4 = i2.indexOf(O3, z3);
277
277
  }
278
278
  function w2(e2) {
279
279
  if (C.header && !t && h4.length && !L2) {
280
- var s4 = h4[0], a5 = /* @__PURE__ */ Object.create(null), o4 = new Set(s4);
280
+ var s4 = h4[0], a6 = /* @__PURE__ */ Object.create(null), o4 = new Set(s4);
281
281
  let n4 = false;
282
282
  for (let r4 = 0; r4 < s4.length; r4++) {
283
283
  let i4 = P4(s4[r4]);
284
- if (a5[i4 = q3(C.transformHeader) ? C.transformHeader(i4, r4) : i4]) {
285
- let e4, t2 = a5[i4];
284
+ if (a6[i4 = q4(C.transformHeader) ? C.transformHeader(i4, r4) : i4]) {
285
+ let e4, t2 = a6[i4];
286
286
  for (; e4 = i4 + "_" + t2, t2++, o4.has(e4); ) ;
287
- o4.add(e4), s4[r4] = e4, a5[i4]++, n4 = true, (D4 = null === D4 ? {} : D4)[e4] = i4;
288
- } else a5[i4] = 1, s4[r4] = i4;
287
+ o4.add(e4), s4[r4] = e4, a6[i4]++, n4 = true, (D4 = null === D4 ? {} : D4)[e4] = i4;
288
+ } else a6[i4] = 1, s4[r4] = i4;
289
289
  o4.add(i4);
290
290
  }
291
291
  n4 && console.warn("Duplicate headers found and renamed."), L2 = true;
292
292
  }
293
- return { data: h4, errors: u5, meta: { delimiter: S, linebreak: O3, aborted: M4, truncated: !!e2, cursor: f5 + (t || 0), renamedHeaders: D4 } };
293
+ return { data: h4, errors: u4, meta: { delimiter: S, linebreak: O3, aborted: M4, truncated: !!e2, cursor: f5 + (t || 0), renamedHeaders: D4 } };
294
294
  }
295
295
  function R2() {
296
- I2(w2()), h4 = [], u5 = [];
296
+ I2(w2()), h4 = [], u4 = [];
297
297
  }
298
298
  }, this.abort = function() {
299
299
  M4 = true;
@@ -308,24 +308,24 @@ var require_papaparse_min = __commonJS({
308
308
  var n2 = { abort: function() {
309
309
  r2 = true, _2(t.workerId, { data: [], errors: [], meta: { aborted: true } });
310
310
  }, pause: m2, resume: m2 };
311
- if (q3(i2.userStep)) {
311
+ if (q4(i2.userStep)) {
312
312
  for (var s2 = 0; s2 < t.results.data.length && (i2.userStep({ data: t.results.data[s2], errors: t.results.errors, meta: t.results.meta }, n2), !r2); s2++) ;
313
313
  delete t.results;
314
- } else q3(i2.userChunk) && (i2.userChunk(t.results, n2, t.file), delete t.results);
314
+ } else q4(i2.userChunk) && (i2.userChunk(t.results, n2, t.file), delete t.results);
315
315
  }
316
316
  t.finished && !r2 && _2(t.workerId, t.results);
317
317
  }
318
318
  function _2(e, t) {
319
319
  var i2 = o[e];
320
- q3(i2.userComplete) && i2.userComplete(t), i2.terminate(), delete o[e];
320
+ q4(i2.userComplete) && i2.userComplete(t), i2.terminate(), delete o[e];
321
321
  }
322
322
  function m2() {
323
323
  throw new Error("Not implemented.");
324
324
  }
325
- function b2(e) {
325
+ function b4(e) {
326
326
  if ("object" != typeof e || null === e) return e;
327
327
  var t, i2 = Array.isArray(e) ? [] : {};
328
- for (t in e) i2[t] = b2(e[t]);
328
+ for (t in e) i2[t] = b4(e[t]);
329
329
  return i2;
330
330
  }
331
331
  function y5(e, t) {
@@ -333,32 +333,32 @@ var require_papaparse_min = __commonJS({
333
333
  e.apply(t, arguments);
334
334
  };
335
335
  }
336
- function q3(e) {
336
+ function q4(e) {
337
337
  return "function" == typeof e;
338
338
  }
339
339
  return v2.parse = function(e, t) {
340
340
  var i2 = (t = t || {}).dynamicTyping || false;
341
- q3(i2) && (t.dynamicTypingFunction = i2, i2 = {});
342
- if (t.dynamicTyping = i2, t.transform = !!q3(t.transform) && t.transform, !t.worker || !v2.WORKERS_SUPPORTED) return i2 = null, v2.NODE_STREAM_INPUT, "string" == typeof e ? (e = P4(e), i2 = new (t.download ? f4 : c2)(t)) : true === e.readable && q3(e.read) && q3(e.on) ? i2 = new p2(t) : (n.File && e instanceof File || e instanceof Object) && (i2 = new l(t)), i2.stream(e);
341
+ q4(i2) && (t.dynamicTypingFunction = i2, i2 = {});
342
+ if (t.dynamicTyping = i2, t.transform = !!q4(t.transform) && t.transform, !t.worker || !v2.WORKERS_SUPPORTED) return i2 = null, v2.NODE_STREAM_INPUT, "string" == typeof e ? (e = P4(e), i2 = new (t.download ? f4 : c2)(t)) : true === e.readable && q4(e.read) && q4(e.on) ? i2 = new p2(t) : (n.File && e instanceof File || e instanceof Object) && (i2 = new l(t)), i2.stream(e);
343
343
  (i2 = (() => {
344
344
  var e2;
345
345
  return !!v2.WORKERS_SUPPORTED && (e2 = (() => {
346
346
  var e4 = n.URL || n.webkitURL || null, t2 = r.toString();
347
347
  return v2.BLOB_URL || (v2.BLOB_URL = e4.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", t2, ")();"], { type: "text/javascript" })));
348
348
  })(), (e2 = new n.Worker(e2)).onmessage = g3, e2.id = h3++, o[e2.id] = e2);
349
- })()).userStep = t.step, i2.userChunk = t.chunk, i2.userComplete = t.complete, i2.userError = t.error, t.step = q3(t.step), t.chunk = q3(t.chunk), t.complete = q3(t.complete), t.error = q3(t.error), delete t.worker, i2.postMessage({ input: e, config: t, workerId: i2.id });
349
+ })()).userStep = t.step, i2.userChunk = t.chunk, i2.userComplete = t.complete, i2.userError = t.error, t.step = q4(t.step), t.chunk = q4(t.chunk), t.complete = q4(t.complete), t.error = q4(t.error), delete t.worker, i2.postMessage({ input: e, config: t, workerId: i2.id });
350
350
  }, v2.unparse = function(e, t) {
351
- var s2 = false, _3 = true, m4 = ",", y6 = "\r\n", a4 = '"', o2 = a4 + a4, i2 = false, r2 = null, h4 = false, u5 = ((() => {
351
+ var s2 = false, _3 = true, m4 = ",", y6 = "\r\n", a5 = '"', o2 = a5 + a5, i2 = false, r2 = null, h4 = false, u4 = ((() => {
352
352
  if ("object" == typeof t) {
353
353
  if ("string" != typeof t.delimiter || v2.BAD_DELIMITERS.filter(function(e2) {
354
354
  return -1 !== t.delimiter.indexOf(e2);
355
- }).length || (m4 = t.delimiter), "boolean" != typeof t.quotes && "function" != typeof t.quotes && !Array.isArray(t.quotes) || (s2 = t.quotes), "boolean" != typeof t.skipEmptyLines && "string" != typeof t.skipEmptyLines || (i2 = t.skipEmptyLines), "string" == typeof t.newline && (y6 = t.newline), "string" == typeof t.quoteChar && (a4 = t.quoteChar, o2 = a4 + a4), "boolean" == typeof t.header && (_3 = t.header), Array.isArray(t.columns)) {
355
+ }).length || (m4 = t.delimiter), "boolean" != typeof t.quotes && "function" != typeof t.quotes && !Array.isArray(t.quotes) || (s2 = t.quotes), "boolean" != typeof t.skipEmptyLines && "string" != typeof t.skipEmptyLines || (i2 = t.skipEmptyLines), "string" == typeof t.newline && (y6 = t.newline), "string" == typeof t.quoteChar && (a5 = t.quoteChar, o2 = a5 + a5), "boolean" == typeof t.header && (_3 = t.header), Array.isArray(t.columns)) {
356
356
  if (0 === t.columns.length) throw new Error("Option columns is empty");
357
357
  r2 = t.columns;
358
358
  }
359
- void 0 !== t.escapeChar && (o2 = t.escapeChar + a4), t.escapeFormulae instanceof RegExp ? h4 = t.escapeFormulae : "boolean" == typeof t.escapeFormulae && t.escapeFormulae && (h4 = /^[=+\-@\t\r].*$/);
359
+ void 0 !== t.escapeChar && (o2 = t.escapeChar + a5), t.escapeFormulae instanceof RegExp ? h4 = t.escapeFormulae : "boolean" == typeof t.escapeFormulae && t.escapeFormulae && (h4 = /^[=+\-@\t\r].*$/);
360
360
  }
361
- })(), new RegExp(U2(a4), "g"));
361
+ })(), new RegExp(U2(a5), "g"));
362
362
  "string" == typeof e && (e = JSON.parse(e));
363
363
  if (Array.isArray(e)) {
364
364
  if (!e.length || Array.isArray(e[0])) return n2(null, e, i2);
@@ -368,19 +368,19 @@ var require_papaparse_min = __commonJS({
368
368
  function n2(e2, t2, i4) {
369
369
  var r4 = "", n4 = ("string" == typeof e2 && (e2 = JSON.parse(e2)), "string" == typeof t2 && (t2 = JSON.parse(t2)), Array.isArray(e2) && 0 < e2.length), s4 = !Array.isArray(t2[0]);
370
370
  if (n4 && _3) {
371
- for (var a5 = 0; a5 < e2.length; a5++) 0 < a5 && (r4 += m4), r4 += k2(e2[a5], a5);
371
+ for (var a6 = 0; a6 < e2.length; a6++) 0 < a6 && (r4 += m4), r4 += k2(e2[a6], a6);
372
372
  0 < t2.length && (r4 += y6);
373
373
  }
374
374
  for (var o4 = 0; o4 < t2.length; o4++) {
375
- var h5 = (n4 ? e2 : t2[o4]).length, u6 = false, d3 = n4 ? 0 === Object.keys(t2[o4]).length : 0 === t2[o4].length;
376
- if (i4 && !n4 && (u6 = "greedy" === i4 ? "" === t2[o4].join("").trim() : 1 === t2[o4].length && 0 === t2[o4][0].length), "greedy" === i4 && n4) {
375
+ var h5 = (n4 ? e2 : t2[o4]).length, u5 = false, d3 = n4 ? 0 === Object.keys(t2[o4]).length : 0 === t2[o4].length;
376
+ if (i4 && !n4 && (u5 = "greedy" === i4 ? "" === t2[o4].join("").trim() : 1 === t2[o4].length && 0 === t2[o4][0].length), "greedy" === i4 && n4) {
377
377
  for (var f5 = [], l2 = 0; l2 < h5; l2++) {
378
378
  var c4 = s4 ? e2[l2] : l2;
379
379
  f5.push(t2[o4][c4]);
380
380
  }
381
- u6 = "" === f5.join("").trim();
381
+ u5 = "" === f5.join("").trim();
382
382
  }
383
- if (!u6) {
383
+ if (!u5) {
384
384
  for (var p4 = 0; p4 < h5; p4++) {
385
385
  0 < p4 && !d3 && (r4 += m4);
386
386
  var g4 = n4 && s4 ? e2[p4] : p4;
@@ -393,10 +393,10 @@ var require_papaparse_min = __commonJS({
393
393
  }
394
394
  function k2(e2, t2) {
395
395
  var i4, r4, n4;
396
- return null == e2 ? "" : e2.constructor === Date ? JSON.stringify(e2).slice(1, 25) : (n4 = false, h4 && "string" == typeof e2 && h4.test(e2) && (e2 = "'" + e2, n4 = true), r4 = (i4 = e2.toString()).replace(u5, o2), (n4 = n4 || true === s2 || "function" == typeof s2 && s2(e2, t2) || Array.isArray(s2) && s2[t2] || ((e4, t4) => {
396
+ return null == e2 ? "" : e2.constructor === Date ? JSON.stringify(e2).slice(1, 25) : (n4 = false, h4 && "string" == typeof e2 && h4.test(e2) && (e2 = "'" + e2, n4 = true), r4 = (i4 = e2.toString()).replace(u4, o2), (n4 = n4 || true === s2 || "function" == typeof s2 && s2(e2, t2) || Array.isArray(s2) && s2[t2] || ((e4, t4) => {
397
397
  for (var i5 = 0; i5 < t4.length; i5++) if (-1 < e4.indexOf(t4[i5])) return true;
398
398
  return false;
399
- })(r4, v2.BAD_DELIMITERS) || -1 < r4.indexOf(m4) || -1 < i4.indexOf(a4) || " " === r4.charAt(0) || " " === r4.charAt(r4.length - 1)) ? a4 + r4 + a4 : r4);
399
+ })(r4, v2.BAD_DELIMITERS) || -1 < r4.indexOf(m4) || -1 < i4.indexOf(a5) || " " === r4.charAt(0) || " " === r4.charAt(r4.length - 1)) ? a5 + r4 + a5 : r4);
400
400
  }
401
401
  }, v2.RECORD_SEP = String.fromCharCode(30), v2.UNIT_SEP = String.fromCharCode(31), v2.BYTE_ORDER_MARK = "\uFEFF", v2.BAD_DELIMITERS = ["\r", "\n", '"', v2.BYTE_ORDER_MARK], v2.WORKERS_SUPPORTED = !s && !!n.Worker, v2.NODE_STREAM_INPUT = 1, v2.LocalChunkSize = 10485760, v2.RemoteChunkSize = 5242880, v2.DefaultDelimiter = ",", v2.Parser = E2, v2.ParserHandle = i, v2.NetworkStreamer = f4, v2.FileStreamer = l, v2.StringStreamer = c2, v2.ReadableStreamStreamer = p2, n.jQuery && ((d2 = n.jQuery).fn.parse = function(o2) {
402
402
  var i2 = o2.config || {}, h4 = [];
@@ -405,31 +405,31 @@ var require_papaparse_min = __commonJS({
405
405
  for (var t = 0; t < this.files.length; t++) h4.push({ file: this.files[t], inputElem: this, instanceConfig: d2.extend({}, i2) });
406
406
  }), e(), this;
407
407
  function e() {
408
- if (0 === h4.length) q3(o2.complete) && o2.complete();
408
+ if (0 === h4.length) q4(o2.complete) && o2.complete();
409
409
  else {
410
410
  var e2, t, i4, r2, n2 = h4[0];
411
- if (q3(o2.before)) {
411
+ if (q4(o2.before)) {
412
412
  var s2 = o2.before(n2.file, n2.inputElem);
413
413
  if ("object" == typeof s2) {
414
- if ("abort" === s2.action) return e2 = "AbortError", t = n2.file, i4 = n2.inputElem, r2 = s2.reason, void (q3(o2.error) && o2.error({ name: e2 }, t, i4, r2));
415
- if ("skip" === s2.action) return void u5();
414
+ if ("abort" === s2.action) return e2 = "AbortError", t = n2.file, i4 = n2.inputElem, r2 = s2.reason, void (q4(o2.error) && o2.error({ name: e2 }, t, i4, r2));
415
+ if ("skip" === s2.action) return void u4();
416
416
  "object" == typeof s2.config && (n2.instanceConfig = d2.extend(n2.instanceConfig, s2.config));
417
- } else if ("skip" === s2) return void u5();
417
+ } else if ("skip" === s2) return void u4();
418
418
  }
419
- var a4 = n2.instanceConfig.complete;
419
+ var a5 = n2.instanceConfig.complete;
420
420
  n2.instanceConfig.complete = function(e4) {
421
- q3(a4) && a4(e4, n2.file, n2.inputElem), u5();
421
+ q4(a5) && a5(e4, n2.file, n2.inputElem), u4();
422
422
  }, v2.parse(n2.file, n2.instanceConfig);
423
423
  }
424
424
  }
425
- function u5() {
425
+ function u4() {
426
426
  h4.splice(0, 1), e();
427
427
  }
428
- }), a2 && (n.onmessage = function(e) {
428
+ }), a4 && (n.onmessage = function(e) {
429
429
  e = e.data;
430
430
  void 0 === v2.WORKER_ID && e && (v2.WORKER_ID = e.workerId);
431
431
  "string" == typeof e.input ? n.postMessage({ workerId: v2.WORKER_ID, results: v2.parse(e.input, e.config), finished: true }) : (n.File && e.input instanceof File || e.input instanceof Object) && (e = v2.parse(e.input, e.config)) && n.postMessage({ workerId: v2.WORKER_ID, results: e, finished: true });
432
- }), (f4.prototype = Object.create(u4.prototype)).constructor = f4, (l.prototype = Object.create(u4.prototype)).constructor = l, (c2.prototype = Object.create(c2.prototype)).constructor = c2, (p2.prototype = Object.create(u4.prototype)).constructor = p2, v2;
432
+ }), (f4.prototype = Object.create(u2.prototype)).constructor = f4, (l.prototype = Object.create(u2.prototype)).constructor = l, (c2.prototype = Object.create(c2.prototype)).constructor = c2, (p2.prototype = Object.create(u2.prototype)).constructor = p2, v2;
433
433
  });
434
434
  }
435
435
  });
@@ -498,8 +498,8 @@ var KAPPA = 24389 / 27;
498
498
  function f(t) {
499
499
  return t > EPS ? Math.cbrt(t) : (KAPPA * t + 16) / 116;
500
500
  }
501
- function rgbToLab(r, g3, b2) {
502
- const R2 = linearise(r), G3 = linearise(g3), B2 = linearise(b2);
501
+ function rgbToLab(r, g3, b4) {
502
+ const R2 = linearise(r), G3 = linearise(g3), B2 = linearise(b4);
503
503
  const X2 = 0.4124564 * R2 + 0.3575761 * G3 + 0.1804375 * B2;
504
504
  const Y2 = 0.2126729 * R2 + 0.7151522 * G3 + 0.072175 * B2;
505
505
  const Z3 = 0.0193339 * R2 + 0.119192 * G3 + 0.9503041 * B2;
@@ -572,8 +572,8 @@ function labToHex(lab) {
572
572
  return Math.round(g3 * 255).toString(16).padStart(2, "0");
573
573
  }).join("");
574
574
  }
575
- function deltaEHex(a2, b2) {
576
- const la = hexToLab(a2), lb = hexToLab(b2);
575
+ function deltaEHex(a4, b4) {
576
+ const la = hexToLab(a4), lb = hexToLab(b4);
577
577
  return la && lb ? deltaE2000(la, lb) : NaN;
578
578
  }
579
579
 
@@ -595,8 +595,8 @@ function styleOf(el, doc) {
595
595
  }
596
596
  }
597
597
  function fillOf(el, cs) {
598
- const a2 = el.getAttribute?.("fill");
599
- if (a2 !== null && a2 !== void 0 && String(a2).trim() !== "") return String(a2).trim();
598
+ const a4 = el.getAttribute?.("fill");
599
+ if (a4 !== null && a4 !== void 0 && String(a4).trim() !== "") return String(a4).trim();
600
600
  const c2 = cs?.fill;
601
601
  return c2 === null || c2 === void 0 ? "" : String(c2).trim();
602
602
  }
@@ -663,20 +663,20 @@ function censusColourSpread(container, doc) {
663
663
  else cells.set(k2, { rgb, n: 1 });
664
664
  }
665
665
  if (marks < MIN_MARKS || distinct.size < MIN_RAMP_FILLS) return EMPTY;
666
- const top = [...cells.values()].sort((a2, b2) => b2.n - a2.n).slice(0, MAX_CELLS);
666
+ const top = [...cells.values()].sort((a4, b4) => b4.n - a4.n).slice(0, MAX_CELLS);
667
667
  const cs = top.map((c2) => hexToLab(hex(c2.rgb))).filter((l) => l !== null);
668
668
  if (cs.length < MIN_RAMP_FILLS) return EMPTY;
669
669
  const d2 = cs.map(() => new Array(cs.length).fill(0));
670
670
  let span = 0, lo = 0, hi = 1;
671
671
  for (let i = 0; i < cs.length; i++) {
672
- for (let j3 = i + 1; j3 < cs.length; j3++) {
673
- const v2 = deltaE2000(cs[i], cs[j3]);
674
- d2[i][j3] = v2;
675
- d2[j3][i] = v2;
672
+ for (let j2 = i + 1; j2 < cs.length; j2++) {
673
+ const v2 = deltaE2000(cs[i], cs[j2]);
674
+ d2[i][j2] = v2;
675
+ d2[j2][i] = v2;
676
676
  if (v2 > span) {
677
677
  span = v2;
678
678
  lo = i;
679
- hi = j3;
679
+ hi = j2;
680
680
  }
681
681
  }
682
682
  }
@@ -691,8 +691,8 @@ function censusColourSpread(container, doc) {
691
691
  let crowd = 0;
692
692
  for (let i = 0; i < cs.length; i++) {
693
693
  let n = 0;
694
- for (let j3 = 0; j3 < cs.length; j3++) {
695
- if (i === j3 || d2[i][j3] <= SAME_SHADE_DELTA_E) n += top[j3].n;
694
+ for (let j2 = 0; j2 < cs.length; j2++) {
695
+ if (i === j2 || d2[i][j2] <= SAME_SHADE_DELTA_E) n += top[j2].n;
696
696
  }
697
697
  if (n > crowd) crowd = n;
698
698
  }
@@ -725,8 +725,8 @@ function normHex(raw) {
725
725
  const h3 = m2[1].length === 3 ? m2[1].split("").map((c2) => c2 + c2).join("") : m2[1];
726
726
  return "#" + h3.toLowerCase();
727
727
  }
728
- function mixLab(a2, b2, t) {
729
- return { L: a2.L + (b2.L - a2.L) * t, a: a2.a + (b2.a - a2.a) * t, b: a2.b + (b2.b - a2.b) * t };
728
+ function mixLab(a4, b4, t) {
729
+ return { L: a4.L + (b4.L - a4.L) * t, a: a4.a + (b4.a - a4.a) * t, b: a4.b + (b4.b - a4.b) * t };
730
730
  }
731
731
  function paintedOver(fg, canvas, alpha) {
732
732
  const f4 = [1, 3, 5].map((i) => parseInt(fg.slice(i, i + 2), 16));
@@ -1054,14 +1054,14 @@ function j() {
1054
1054
  continue;
1055
1055
  }
1056
1056
  for (let [i, r] of N) {
1057
- let a2;
1057
+ let a4;
1058
1058
  try {
1059
- a2 = o.of(i);
1059
+ a4 = o.of(i);
1060
1060
  } catch {
1061
- a2 = void 0;
1061
+ a4 = void 0;
1062
1062
  }
1063
- if (!a2 || a2 === i) continue;
1064
- let s = u(a2);
1063
+ if (!a4 || a4 === i) continue;
1064
+ let s = u(a4);
1065
1065
  s && !n.has(s) && n.set(s, r);
1066
1066
  }
1067
1067
  }
@@ -1104,16 +1104,16 @@ function y() {
1104
1104
  if (U) return U;
1105
1105
  let n = /* @__PURE__ */ new Map(), e = P, t = (o, i, r) => {
1106
1106
  if (!o) return;
1107
- let a2 = n.get(o);
1108
- a2 ? a2.some((s) => s.row === i) || a2.push({ row: i, primary: r }) : n.set(o, [{ row: i, primary: r }]);
1107
+ let a4 = n.get(o);
1108
+ a4 ? a4.some((s) => s.row === i) || a4.push({ row: i, primary: r }) : n.set(o, [{ row: i, primary: r }]);
1109
1109
  };
1110
1110
  for (let o of e.split(",")) {
1111
1111
  let i = o.split("|");
1112
1112
  if (i.length < 7) continue;
1113
1113
  let r = { a1: i[1], cc: i[2], lon: +i[3], lat: +i[4], pop: +i[5], kinds: i[6] || "N" };
1114
1114
  i.length > 8 && i[8] && (r.tags = i[8].split(";").filter(Boolean));
1115
- let a2 = t3[r.cc];
1116
- if (a2 && u(i[0]) === a2 && (r.tags || (r.tags = []), r.tags.includes("capital") || r.tags.push("capital")), t(u(i[0]), r, true), i.length > 7 && i[7]) for (let s of i[7].split(";")) t(u(s), r, false);
1115
+ let a4 = t3[r.cc];
1116
+ if (a4 && u(i[0]) === a4 && (r.tags || (r.tags = []), r.tags.includes("capital") || r.tags.push("capital")), t(u(i[0]), r, true), i.length > 7 && i[7]) for (let s of i[7].split(";")) t(u(s), r, false);
1117
1117
  }
1118
1118
  for (let o of n.values()) o.sort((i, r) => r.row.pop - i.row.pop);
1119
1119
  return U = n, n;
@@ -1218,13 +1218,13 @@ function S3(n) {
1218
1218
  function A3(n) {
1219
1219
  let e = null, t = typeof n.lat == "string" ? n.lat.trim() : n.lat, o = typeof n.lon == "string" ? n.lon.trim() : n.lon;
1220
1220
  if (t != null && t !== "" && o !== void 0 && o !== null && o !== "") {
1221
- let a2 = +t, s = +o;
1222
- if (isFinite(a2) && isFinite(s) && a2 >= -90 && a2 <= 90 && s >= -180 && s <= 180) if (a2 === 0 && s === 0) e = { lat: 0, lon: 0, precision: "latlon" };
1223
- else return { lat: a2, lon: s, precision: "latlon" };
1221
+ let a4 = +t, s = +o;
1222
+ if (isFinite(a4) && isFinite(s) && a4 >= -90 && a4 <= 90 && s >= -180 && s <= 180) if (a4 === 0 && s === 0) e = { lat: 0, lon: 0, precision: "latlon" };
1223
+ else return { lat: a4, lon: s, precision: "latlon" };
1224
1224
  }
1225
1225
  let i = E(n.country), r = Y(n.state);
1226
1226
  if (r && i && c3(r) !== i && (r = null), n.city !== void 0 && n.city !== null) {
1227
- let a2 = u(String(n.city)), s = O(a2), f4 = s ? F(s, n.mapKind) : null;
1227
+ let a4 = u(String(n.city)), s = O(a4), f4 = s ? F(s, n.mapKind) : null;
1228
1228
  if (f4 && f4.length) {
1229
1229
  let d2 = n.state === void 0 || n.state === null ? "" : String(n.state).trim(), R2 = d2 ? u(d2) : "", g3 = d2 ? Y(d2) : null, S = [], m2 = -1;
1230
1230
  for (let c2 of f4) {
@@ -1245,24 +1245,24 @@ function A3(n) {
1245
1245
  if (p2.size > 1) return { ambiguous: true, matches: p2.size };
1246
1246
  }
1247
1247
  }
1248
- if (!i || r3.has(i)) for (let a2 of Z(n.zip)) {
1249
- let s = a3().get(a2);
1248
+ if (!i || r3.has(i)) for (let a4 of Z(n.zip)) {
1249
+ let s = a3().get(a4);
1250
1250
  if (s) return { lat: s.lat, lon: s.lon, precision: "zip3" };
1251
1251
  }
1252
1252
  if (r) {
1253
- let a2 = D().get(u(r));
1254
- if (a2) return { lat: a2.lat, lon: a2.lon, precision: "state" };
1253
+ let a4 = D().get(u(r));
1254
+ if (a4) return { lat: a4.lat, lon: a4.lon, precision: "state" };
1255
1255
  }
1256
1256
  if (i && (n.mapKind !== "north-america" || s3.has(i))) {
1257
- let a2 = o3().get(i);
1258
- if (a2) return { lat: a2.lat, lon: a2.lon, precision: "country" };
1257
+ let a4 = o3().get(i);
1258
+ if (a4) return { lat: a4.lat, lon: a4.lon, precision: "country" };
1259
1259
  }
1260
1260
  return e;
1261
1261
  }
1262
1262
  var G = { latlon: 0, city: 1, zip3: 2, state: 3, country: 4 };
1263
1263
  var x = 8;
1264
1264
  function y3(n, e) {
1265
- let t = new Array(n.length), o = new Array(n.length), i = new Array(n.length), r = /* @__PURE__ */ new Set(), a2 = [], s = /* @__PURE__ */ new Set(), f4 = [], d2 = /* @__PURE__ */ new Set(), R2 = [], g3 = { latlon: 0, city: 0, zip3: 0, state: 0, country: 0 }, S = 0, m2 = 0, p2 = null;
1265
+ let t = new Array(n.length), o = new Array(n.length), i = new Array(n.length), r = /* @__PURE__ */ new Set(), a4 = [], s = /* @__PURE__ */ new Set(), f4 = [], d2 = /* @__PURE__ */ new Set(), R2 = [], g3 = { latlon: 0, city: 0, zip3: 0, state: 0, country: 0 }, S = 0, m2 = 0, p2 = null;
1266
1266
  for (let l = 0; l < n.length; ++l) {
1267
1267
  let A2 = n[l], C = A3({ ...A2, mapKind: e });
1268
1268
  if (S3(C)) {
@@ -1277,11 +1277,11 @@ function y3(n, e) {
1277
1277
  } else {
1278
1278
  t[l] = null, o[l] = null, i[l] = null;
1279
1279
  let M4 = K(A2);
1280
- M4 && !r.has(M4.toLowerCase()) && (r.add(M4.toLowerCase()), a2.push(M4));
1280
+ M4 && !r.has(M4.toLowerCase()) && (r.add(M4.toLowerCase()), a4.push(M4));
1281
1281
  }
1282
1282
  }
1283
1283
  let c2 = !n3() && n.some((l) => l.city !== null && l.city !== void 0 && String(l.city).trim() !== "");
1284
- return { lat: t, lon: o, precisions: i, precision: p2, precisionCounts: g3, coarseExamples: f4, unmatched: a2, ambiguousRows: m2, ambiguousExamples: R2, matchedRows: S, totalRows: n.length, ...c2 ? { cityTableMissing: true } : {} };
1284
+ return { lat: t, lon: o, precisions: i, precision: p2, precisionCounts: g3, coarseExamples: f4, unmatched: a4, ambiguousRows: m2, ambiguousExamples: R2, matchedRows: S, totalRows: n.length, ...c2 ? { cityTableMissing: true } : {} };
1285
1285
  }
1286
1286
  function K(n) {
1287
1287
  let e = [n.city, n.state, n.zip, n.country].filter((t) => t != null && String(t).trim() !== "").map((t) => String(t).trim()).join(", ");
@@ -1293,66 +1293,66 @@ function p3(n, e) {
1293
1293
  return t ? F(t, e).length > 0 : false;
1294
1294
  }
1295
1295
 
1296
- // ../shape-core/dist/chunk-GPX2G67N.mjs
1296
+ // ../shape-core/dist/chunk-FUTSF2X5.mjs
1297
1297
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
1298
- function T2(t) {
1299
- return t ? t.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_\-./]+/g, " ").toLowerCase().split(/\s+/).filter((e) => e.length > 0) : [];
1298
+ function T2(n) {
1299
+ return n ? n.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_\-./]+/g, " ").toLowerCase().split(/\s+/).filter((e) => e.length > 0) : [];
1300
1300
  }
1301
- function R(t) {
1302
- let e = Date.parse(t);
1301
+ function M(n) {
1302
+ let e = Date.parse(n);
1303
1303
  if (isNaN(e)) return null;
1304
- let n = new Date(e);
1305
- if (f2.test(t) || g.test(t.trim()) || d.test(t)) return n;
1306
- let o = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds(), n.getMilliseconds())), r = n.getFullYear();
1307
- return r >= 0 && r < 100 && o.setUTCFullYear(r), o;
1308
- }
1309
- function u2(t) {
1310
- return !(t instanceof Date) || isNaN(t.getTime()) ? null : t.getUTCHours() === 0 && t.getUTCMinutes() === 0 && t.getUTCSeconds() === 0 && t.getUTCMilliseconds() === 0 ? "utc" : t.getHours() === 0 && t.getMinutes() === 0 && t.getSeconds() === 0 && t.getMilliseconds() === 0 ? "local" : null;
1311
- }
1312
- function c(t) {
1313
- let e = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate())), n = t.getFullYear();
1314
- return n >= 0 && n < 100 && e.setUTCFullYear(n), e;
1315
- }
1316
- function F2(t, e) {
1317
- let n = [];
1318
- for (let o of t) {
1319
- if (!o || !/date|time/i.test(String(o.dataType ?? ""))) continue;
1320
- let r = 0, l = true;
1321
- for (let s of e) {
1322
- let i = s ? s[o.name] : void 0;
1304
+ let t = new Date(e);
1305
+ if (F2.test(n) || g.test(n.trim()) || p.test(n)) return t;
1306
+ let r = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds())), o = t.getFullYear();
1307
+ return o >= 0 && o < 100 && r.setUTCFullYear(o), r;
1308
+ }
1309
+ function a2(n) {
1310
+ return !(n instanceof Date) || isNaN(n.getTime()) ? null : n.getUTCHours() === 0 && n.getUTCMinutes() === 0 && n.getUTCSeconds() === 0 && n.getUTCMilliseconds() === 0 ? "utc" : n.getHours() === 0 && n.getMinutes() === 0 && n.getSeconds() === 0 && n.getMilliseconds() === 0 ? "local" : null;
1311
+ }
1312
+ function c(n) {
1313
+ let e = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate())), t = n.getFullYear();
1314
+ return t >= 0 && t < 100 && e.setUTCFullYear(t), e;
1315
+ }
1316
+ function f2(n, e) {
1317
+ let t = [];
1318
+ for (let r of n) {
1319
+ if (!r || !/date|time/i.test(String(r.dataType ?? ""))) continue;
1320
+ let o = 0, l = true;
1321
+ for (let u2 of e) {
1322
+ let i = u2 ? u2[r.name] : void 0;
1323
1323
  if (i == null || i === "") continue;
1324
1324
  if (!(i instanceof Date)) {
1325
1325
  l = false;
1326
1326
  break;
1327
1327
  }
1328
- let a2 = u2(i);
1329
- if (a2 === null) {
1328
+ let s = a2(i);
1329
+ if (s === null) {
1330
1330
  l = false;
1331
1331
  break;
1332
1332
  }
1333
- a2 === "local" && r++;
1333
+ s === "local" && o++;
1334
1334
  }
1335
- l && r > 0 && n.push(o.name);
1335
+ l && o > 0 && t.push(r.name);
1336
1336
  }
1337
- return n;
1337
+ return t;
1338
1338
  }
1339
- function h2(t, e) {
1340
- let n = F2(t, e);
1341
- return n.length === 0 ? { rows: e, columns: n } : { rows: e.map((r) => {
1342
- if (!r) return r;
1343
- let l = { ...r };
1344
- for (let s of n) {
1345
- let i = l[s];
1346
- i instanceof Date && u2(i) === "local" && (l[s] = c(i));
1339
+ function b2(n, e) {
1340
+ let t = f2(n, e);
1341
+ return t.length === 0 ? { rows: e, columns: t } : { rows: e.map((o) => {
1342
+ if (!o) return o;
1343
+ let l = { ...o };
1344
+ for (let u2 of t) {
1345
+ let i = l[u2];
1346
+ i instanceof Date && a2(i) === "local" && (l[u2] = c(i));
1347
1347
  }
1348
1348
  return l;
1349
- }), columns: n };
1349
+ }), columns: t };
1350
1350
  }
1351
- var f2 = /^\s*\d{4}(-\d{2}(-\d{2})?)?\s*$/;
1351
+ var F2 = /^\s*\d{4}(-\d{2}(-\d{2})?)?\s*$/;
1352
1352
  var g = /(?:Z|[+-]\d{2}:?\d{2})$/i;
1353
- var d = /\b(?:GMT|UTC)\b/i;
1353
+ var p = /\b(?:GMT|UTC)\b/i;
1354
1354
 
1355
- // ../shape-core/dist/chunk-2AGC3A7S.mjs
1355
+ // ../shape-core/dist/chunk-OZEOA6ZE.mjs
1356
1356
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
1357
1357
  var St = "006007008009010011012013014015016017018019020021022023024025026027028029030031032033034035036037038039040041042043044045046047048049050051052053054056057058059060061062063064065066067068069070071072073074075076077078079080081082083084085086087088089100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191193194195196197198199200201202203204205206207208209210211212214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310312313314315316317318319320321322323324325326327328329330331333334335336337338339341342344346347349350351352354355356357358359360361362363364365366367368369370371372373374376377378379380381382383384385386387388389390391392393394395396397398400401402403404405406407408409410411412413414415416417418420421422423424425426427430431432433434435436437438439440441442443444445446447448449450451452453454455456457458460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508510511512513514515516520521522523524525526527528530531532534535537538539540541542543544545546547548549550551553554556557558559560561562563564565566567570571572573574575576577580581582583584585586587588590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620622623624625626627628629630631633634635636637638639640641644645646647648650651652653654655656657658660661662664665666667668669670671672673674675676677678679680681683684685686687688689690691692693700701703704705706707708710711712713714716717718719720721722723724725726727728729730731734735736737738739740741743744745746747748749750751752753754755756757758759760761762763764765766767768769770772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816820821822823824825826827828829830831832833834835836837838840841843844845846847850851852853855856857859860863864865870871873874875877878879880881882883884890891893894895897898900902903904905906907908910911912913914915916917918919920921922923924925926927928930931932933934935936937939940941943944945946947948949950951952953954955956957958959960961967968969970971972973974975976977978979980981982983984985986988989990991992993994995996997998999";
1358
1358
  var w = new Set(St.match(/.{3}/g) ?? []);
@@ -1440,89 +1440,89 @@ function Wt(n, s) {
1440
1440
  return { iso: i, unmatched: M4, matchedRows: h3, totalRows: n.length };
1441
1441
  }
1442
1442
 
1443
- // ../shape-core/dist/chunk-BZVL57QR.mjs
1443
+ // ../shape-core/dist/chunk-3GJMGEA5.mjs
1444
1444
  var import_papaparse = __toESM(require_papaparse_min(), 1);
1445
1445
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
1446
- var Ae = { "north-america": "AG AI AW BB BL BM BQ BS BZ CA CR CU CW DM DO GD GL GP GT HN HT JM KN KY LC MF MQ MS MX NI PA PM PR SV SX TC TT US VC VG VI", "south-america": "AR BO BR CL CO EC FK GF GY PE PY SR UY VE", europe: "AD AL AT AX BA BE BG BY CH CY CZ DE DK EE ES FI FO FR GB GG GI GR HR HU IE IM IS IT JE LI LT LU LV MC MD ME MK MT NL NO PL PT RO RS RU SE SI SJ SK SM UA VA", africa: "AO BF BI BJ BW CD CF CG CI CM CV DJ DZ EG EH ER ET GA GH GM GN GQ GW KE KM LR LS LY MA MG ML MR MU MW MZ NA NE NG RE RW SC SD SH SL SN SO SS ST SZ TD TG TN TZ UG YT ZA ZM ZW", asia: "AE AF AM AZ BD BH BN BT CC CN CX GE HK ID IL IN IO IQ IR JO JP KG KH KP KR KW KZ LA LB LK MM MN MO MV MY NP OM PH PK PS QA SA SG SY TH TJ TL TM TR TW UZ VN YE", oceania: "AS AU CK FJ FM GU KI MH MP NC NF NR NU NZ PF PG PN PW SB TK TO TV UM VU WF WS", antarctica: "AQ BV GS HM TF" };
1447
- var ee = (() => {
1446
+ var _e = { "north-america": "AG AI AW BB BL BM BQ BS BZ CA CR CU CW DM DO GD GL GP GT HN HT JM KN KY LC MF MQ MS MX NI PA PM PR SV SX TC TT US VC VG VI", "south-america": "AR BO BR CL CO EC FK GF GY PE PY SR UY VE", europe: "AD AL AT AX BA BE BG BY CH CY CZ DE DK EE ES FI FO FR GB GG GI GR HR HU IE IM IS IT JE LI LT LU LV MC MD ME MK MT NL NO PL PT RO RS RU SE SI SJ SK SM UA VA", africa: "AO BF BI BJ BW CD CF CG CI CM CV DJ DZ EG EH ER ET GA GH GM GN GQ GW KE KM LR LS LY MA MG ML MR MU MW MZ NA NE NG RE RW SC SD SH SL SN SO SS ST SZ TD TG TN TZ UG YT ZA ZM ZW", asia: "AE AF AM AZ BD BH BN BT CC CN CX GE HK ID IL IN IO IQ IR JO JP KG KH KP KR KW KZ LA LB LK MM MN MO MV MY NP OM PH PK PS QA SA SG SY TH TJ TL TM TR TW UZ VN YE", oceania: "AS AU CK FJ FM GU KI MH MP NC NF NR NU NZ PF PG PN PW SB TK TO TV UM VU WF WS", antarctica: "AQ BV GS HM TF" };
1447
+ var q2 = (() => {
1448
1448
  let n = /* @__PURE__ */ new Map();
1449
- for (let e of Object.keys(Ae)) for (let t of Ae[e].split(/\s+/)) t && n.set(t, e);
1449
+ for (let e of Object.keys(_e)) for (let t of _e[e].split(/\s+/)) t && n.set(t, e);
1450
1450
  return n;
1451
1451
  })();
1452
- function He(n) {
1452
+ function Ve(n) {
1453
1453
  for (let [e, t] of n) {
1454
- let i = ee.get(e);
1455
- i && !ee.has(t) && ee.set(t, i);
1454
+ let i = q2.get(e);
1455
+ i && !q2.has(t) && q2.set(t, i);
1456
1456
  }
1457
1457
  }
1458
- He(N);
1459
- var Ke = ["rate", "ratio", "pct", "percent", "percentage", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "z[_-]?score", "average", "avg", "mean", "median", "stddev", "variance", "gpa", "percentile", "quantile", "efficiency", "accuracy", "probability", "multiplier", "coefficient", "correlation", "occupancy", "age", "bmi", "temperature", "density", "pressure", "humidity", "ph", "velocity", "speed", "elevation", "altitude", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps", "temperatuur", "temperatur", "temperatura", "teplota", "lampotila", "homerseklet", "sicaklik", "pression", "presion", "pressao", "pressione", "druck", "tryck", "tlak", "paine", "nyomas", "presiune", "humidite", "humedad", "umidade", "umidita", "feuchtigkeit", "vochtigheid", "kosteus", "vlhkost", "vitesse", "velocidad", "velocidade", "velocita", "geschwindigkeit", "snelheid", "hastighet", "hastighed", "rychlost", "nopeus", "sebesseg", "brzina", "predkosc", "densite", "densidad", "densidade", "densita", "dichte", "dichtheid", "hustota", "tiheys", "gustoca", "moyenne", "mediane", "promedio", "mediana", "gemiddelde", "durchschnitt", "mittelwert", "genomsnitt", "gennemsnit", "gjennomsnitt", "keskiarvo", "atlag", "ortalama", "prosjek", "srednia", "prumer", "priemer", "medie", "taux", "tasa", "taxa", "tasso", "verhaltnis", "verhouding", "aandeel", "anteil", "andel", "osuus", "podil", "udzial", "udio", "pourcentage", "porcentaje", "percentual", "prozent", "procent", "prosentti", "szazalek", "yuzde", "participacion", "participacao", "pondere", "omjer", "arany", "oran", "rata", "leeftijd", "edad", "idade", "wiek", "eletkor", "varsta", "puntuacion", "pontuacao", "punteggio", "betyg", "ocena", "indice", "indeks", "wskaznik", "puan"];
1460
- var $e = ["pct", "percent", "percentage", "rate", "ratio", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "gpa", "percentile", "quantile", "bmi", "density", "pressure", "humidity", "velocity", "efficiency", "occupancy", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps"];
1461
- var Ze = ["latitude", "longitude"];
1462
- var Xe = ["latitude", "longitude"];
1463
- function j2(n) {
1458
+ Ve(N);
1459
+ var Be = ["rate", "ratio", "pct", "percent", "percentage", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "z[_-]?score", "average", "avg", "mean", "median", "stddev", "variance", "gpa", "percentile", "quantile", "efficiency", "accuracy", "probability", "multiplier", "coefficient", "correlation", "occupancy", "age", "bmi", "temperature", "density", "pressure", "humidity", "ph", "velocity", "speed", "elevation", "altitude", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps", "temperatuur", "temperatur", "temperatura", "teplota", "lampotila", "homerseklet", "sicaklik", "pression", "presion", "pressao", "pressione", "druck", "tryck", "tlak", "paine", "nyomas", "presiune", "humidite", "humedad", "umidade", "umidita", "feuchtigkeit", "vochtigheid", "kosteus", "vlhkost", "vitesse", "velocidad", "velocidade", "velocita", "geschwindigkeit", "snelheid", "hastighet", "hastighed", "rychlost", "nopeus", "sebesseg", "brzina", "predkosc", "densite", "densidad", "densidade", "densita", "dichte", "dichtheid", "hustota", "tiheys", "gustoca", "moyenne", "mediane", "promedio", "mediana", "gemiddelde", "durchschnitt", "mittelwert", "genomsnitt", "gennemsnit", "gjennomsnitt", "keskiarvo", "atlag", "ortalama", "prosjek", "srednia", "prumer", "priemer", "medie", "taux", "tasa", "taxa", "tasso", "verhaltnis", "verhouding", "aandeel", "anteil", "andel", "osuus", "podil", "udzial", "udio", "pourcentage", "porcentaje", "percentual", "prozent", "procent", "prosentti", "szazalek", "yuzde", "participacion", "participacao", "pondere", "omjer", "arany", "oran", "rata", "leeftijd", "edad", "idade", "wiek", "eletkor", "varsta", "puntuacion", "pontuacao", "punteggio", "betyg", "ocena", "indice", "indeks", "wskaznik", "puan"];
1460
+ var Ye = ["pct", "percent", "percentage", "rate", "ratio", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "gpa", "percentile", "quantile", "bmi", "density", "pressure", "humidity", "velocity", "efficiency", "occupancy", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps"];
1461
+ var He = ["latitude", "longitude"];
1462
+ var Ke = ["latitude", "longitude"];
1463
+ function $2(n) {
1464
1464
  return Array.from(n).map((e) => {
1465
1465
  let t = e.normalize("NFD").replace(/[̀-ͯ]/g, "");
1466
1466
  return t.length === 1 ? t : e;
1467
1467
  }).join("");
1468
1468
  }
1469
- var oe = ["somme de", "suma de", "soma de", "summe von", "som van", "somma di", "summa av", "sum av", "sum af", "soucet z", "suma z", "totaal van", "total de", "toplam", "osszeg", "nombre de", "recuento de", "contagem de", "anzahl von", "aantal van", "conteggio di", "antal av", "lukumaara", "pocet z"];
1470
- function je(n) {
1469
+ var ie = ["somme de", "suma de", "soma de", "summe von", "som van", "somma di", "summa av", "sum av", "sum af", "soucet z", "suma z", "totaal van", "total de", "toplam", "osszeg", "nombre de", "recuento de", "contagem de", "anzahl von", "aantal van", "conteggio di", "antal av", "lukumaara", "pocet z"];
1470
+ function $e(n) {
1471
1471
  return [...n].sort((e, t) => t.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|");
1472
1472
  }
1473
- var Ne = new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:" + je(oe) + ")\\s+)", "i");
1474
- var qe = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1475
- var Qe = new RegExp("\\b(" + Ke.join("|") + ")\\b|(" + $e.join("|") + ")$", "i");
1476
- var Je = new RegExp("\\b(" + Ze.join("|") + ")\\b|(" + Xe.join("|") + ")$", "i");
1477
- function xe(n) {
1473
+ var Ae = new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:" + $e(ie) + ")\\s+)", "i");
1474
+ var Ze = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1475
+ var Xe = new RegExp("\\b(" + Be.join("|") + ")\\b|(" + Ye.join("|") + ")$", "i");
1476
+ var je = new RegExp("\\b(" + He.join("|") + ")\\b|(" + Ke.join("|") + ")$", "i");
1477
+ function Te(n) {
1478
1478
  if (!n) return "";
1479
- let e = String(n), t = Ne.exec(j2(e));
1479
+ let e = String(n), t = Ae.exec($2(e));
1480
1480
  return (t ? e.slice(t[0].length) : e).trim();
1481
1481
  }
1482
- function et(n) {
1483
- return !!n && Ne.test(j2(String(n)));
1482
+ function qe(n) {
1483
+ return !!n && Ae.test($2(String(n)));
1484
1484
  }
1485
- var tt = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
1486
- var Re = new RegExp("^\\s*(" + [...tt].sort((n, e) => e.length - n.length).map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
1487
- function nt(n) {
1488
- let e = xe(n);
1489
- return e.length === 0 ? "" : e.replace(qe, " ");
1485
+ var Qe = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
1486
+ var Me = new RegExp("^\\s*(" + [...Qe].sort((n, e) => e.length - n.length).map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
1487
+ function Je(n) {
1488
+ let e = Te(n);
1489
+ return e.length === 0 ? "" : e.replace(Ze, " ");
1490
1490
  }
1491
- function we(n, e) {
1491
+ function ve(n, e) {
1492
1492
  if (!e) return false;
1493
- let t = xe(e);
1494
- return n.test(j2(nt(e))) || n.test(j2(t)) || n.test(j2(T2(t).join(" ")));
1493
+ let t = Te(e);
1494
+ return n.test($2(Je(e))) || n.test($2(t)) || n.test($2(T2(t).join(" ")));
1495
1495
  }
1496
- function Ee(n) {
1497
- return we(Je, n);
1496
+ function Ne(n) {
1497
+ return ve(je, n);
1498
1498
  }
1499
- function it(n) {
1500
- return we(Qe, n) || Ee(n);
1499
+ function et(n) {
1500
+ return ve(Xe, n) || Ne(n);
1501
1501
  }
1502
- var De = /int|double|decimal|single|float|number|currency|money/i;
1503
- function rt2(n) {
1502
+ var xe = /int|double|decimal|single|float|number|currency|money/i;
1503
+ function tt(n) {
1504
1504
  let e = String(n?.valueNature ?? "").trim().toLowerCase();
1505
- return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || n?.isMeasure === true || De.test(String(n?.dataType ?? "")) ? "Continuous" : "Categorical";
1505
+ return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || n?.isMeasure === true || xe.test(String(n?.dataType ?? "")) ? "Continuous" : "Categorical";
1506
1506
  }
1507
- function st(n) {
1508
- return n?.isMeasure === true || De.test(String(n?.dataType ?? ""));
1507
+ function nt(n) {
1508
+ return n?.isMeasure === true || xe.test(String(n?.dataType ?? ""));
1509
1509
  }
1510
- function Oe(n) {
1511
- let e = n ?? {}, t = rt2(e);
1510
+ function Ie(n) {
1511
+ let e = n ?? {}, t = tt(e);
1512
1512
  if (t !== "Continuous") return { nature: t, additivity: "unknown", basis: "role", suppressed: false };
1513
- if (Ee(e.name)) return { nature: t, additivity: "positional", basis: "name", suppressed: true };
1513
+ if (Ne(e.name)) return { nature: t, additivity: "positional", basis: "name", suppressed: true };
1514
1514
  let i = String(e.additivity ?? "").trim().toLowerCase();
1515
- if (!(i === "additive" && et(e.name))) {
1515
+ if (!(i === "additive" && qe(e.name))) {
1516
1516
  if (i === "additive") return { nature: t, additivity: "additive", basis: "measured", suppressed: false };
1517
1517
  if (i === "part_of_whole") return { nature: t, additivity: "part_of_whole", basis: "measured", suppressed: false };
1518
1518
  if (i === "intensive_rate") return { nature: t, additivity: "intensive_rate", basis: "measured", suppressed: false };
1519
1519
  }
1520
- return e.discourageAggregationAcrossGroups === true ? { nature: t, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : it(e.name) ? { nature: t, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: t, additivity: "additive", basis: "default", suppressed: false };
1520
+ return e.discourageAggregationAcrossGroups === true ? { nature: t, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : et(e.name) ? { nature: t, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: t, additivity: "additive", basis: "default", suppressed: false };
1521
1521
  }
1522
- function Le(n) {
1523
- let e = Oe(n), t = n ?? {};
1522
+ function Ee(n) {
1523
+ let e = Ie(n), t = n ?? {};
1524
1524
  if (e.nature === "Categorical") return ["first", "distinctcount", "count"];
1525
- if (e.nature === "Ordinal") return st(t) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1525
+ if (e.nature === "Ordinal") return nt(t) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1526
1526
  switch (e.additivity) {
1527
1527
  case "positional":
1528
1528
  return ["min", "max", "count", "distinctcount", "first"];
@@ -1532,13 +1532,13 @@ function Le(n) {
1532
1532
  return ["sum", "average", "median", "min", "max", "count", "distinctcount", "first"];
1533
1533
  }
1534
1534
  }
1535
- function Yt(n) {
1536
- return Le(n)[0];
1535
+ function Vt(n) {
1536
+ return Ee(n)[0];
1537
1537
  }
1538
- function Kt(n, e) {
1538
+ function Yt(n, e) {
1539
1539
  if (e !== "sum" && e !== "count") return false;
1540
1540
  if (e === "count") return true;
1541
- let t = Oe(n);
1541
+ let t = Ie(n);
1542
1542
  return t.additivity === "additive" || t.additivity === "part_of_whole" || t.additivity === "unknown";
1543
1543
  }
1544
1544
 
@@ -1592,14 +1592,14 @@ function F3(r) {
1592
1592
  }
1593
1593
  return Array.from(n);
1594
1594
  }
1595
- function $2(r) {
1595
+ function $3(r) {
1596
1596
  let n = F3(r);
1597
1597
  if (n.length === 0) return 0;
1598
1598
  let e = 0;
1599
1599
  for (let s of n) Z(s).length > 0 && e++;
1600
1600
  return Math.round(e / n.length * 1e3) / 10;
1601
1601
  }
1602
- function q2(r, n) {
1602
+ function q3(r, n) {
1603
1603
  return y2(n, rt) ? true : F3(r).some((e) => /^\d{5}(-\d{4})?$/.test(e.replace(/\.0+$/, "")));
1604
1604
  }
1605
1605
  function ue(r, n) {
@@ -1620,7 +1620,7 @@ function fe(r, n) {
1620
1620
  return e;
1621
1621
  }
1622
1622
  function pe(r, n, e, s, c2) {
1623
- let C = [], u4 = [], o = {}, _2 = {}, v2 = new Set(r), l = (t) => n.map((i) => i[t]);
1623
+ let C = [], u2 = [], o = {}, _2 = {}, v2 = new Set(r), l = (t) => n.map((i) => i[t]);
1624
1624
  for (let t of ["city", "country"]) {
1625
1625
  let i = e?.[t];
1626
1626
  i && v2.has(i) && (o[t] = i);
@@ -1632,32 +1632,32 @@ function pe(r, n, e, s, c2) {
1632
1632
  }
1633
1633
  let d2 = e?.zip;
1634
1634
  if (d2 && v2.has(d2)) {
1635
- let t = l(d2), i = $2(t);
1636
- i < 95 ? u4.push(`zip=${d2} (only ${i}% of values read as ZIPs)`) : q2(t, d2) ? o.zip = d2 : u4.push(`zip=${d2} (all values are 3-4 digits with nothing to say they are postal)`);
1635
+ let t = l(d2), i = $3(t);
1636
+ i < 95 ? u2.push(`zip=${d2} (only ${i}% of values read as ZIPs)`) : q3(t, d2) ? o.zip = d2 : u2.push(`zip=${d2} (all values are 3-4 digits with nothing to say they are postal)`);
1637
1637
  }
1638
1638
  let p2 = e?.state;
1639
1639
  if (p2 && v2.has(p2)) {
1640
1640
  let t = l(p2), i = A(t);
1641
- i.length > 0 && i.every((a2) => W2(a2, s)) ? u4.push(`state=${p2} (every value is "CA", which is both Canada and California)`) : P2(t) ? (u4.push(`state=${p2} (every value is a country, not a state)`), o.country || (o.country = p2)) : M2(t) < 95 ? u4.push(`state=${p2} (only ${M2(t)}% of values are states/provinces)`) : o.state = p2;
1641
+ i.length > 0 && i.every((a4) => W2(a4, s)) ? u2.push(`state=${p2} (every value is "CA", which is both Canada and California)`) : P2(t) ? (u2.push(`state=${p2} (every value is a country, not a state)`), o.country || (o.country = p2)) : M2(t) < 95 ? u2.push(`state=${p2} (only ${M2(t)}% of values are states/provinces)`) : o.state = p2;
1642
1642
  }
1643
1643
  let g3 = new Set(Object.values(o).filter(Boolean)), T3 = r.filter((t) => !g3.has(t) && !t.startsWith("__"));
1644
1644
  if (!o.state) {
1645
1645
  let t = null;
1646
1646
  for (let i of T3) {
1647
- let a2 = l(i);
1648
- if (P2(a2)) continue;
1649
- let f4 = M2(a2);
1647
+ let a4 = l(i);
1648
+ if (P2(a4)) continue;
1649
+ let f4 = M2(a4);
1650
1650
  if (f4 < 95) continue;
1651
- let k2 = D3(a2, (x3) => !!Y(x3)), Y2 = D3(a2, (x3) => !!Y(x3) && !W2(x3, s));
1651
+ let k2 = D3(a4, (x3) => !!Y(x3)), Y2 = D3(a4, (x3) => !!Y(x3) && !W2(x3, s));
1652
1652
  k2 < O2 && Y2 < 1 || (!t || f4 > t.pct) && (t = { name: i, pct: f4 });
1653
1653
  }
1654
1654
  t && (o.state = t.name, g3.add(t.name), C.push(`state=${t.name} (${t.pct}% states/provinces)`));
1655
1655
  }
1656
1656
  if (!o.zip) for (let t of T3) {
1657
1657
  if (g3.has(t)) continue;
1658
- let i = l(t), a2 = $2(i);
1659
- if (!(a2 < 95) && q2(i, t) && !(fe(i, (f4) => Z(f4).length > 0) < O2)) {
1660
- o.zip = t, g3.add(t), C.push(`zip=${t} (${a2}% ZIP codes)`);
1658
+ let i = l(t), a4 = $3(i);
1659
+ if (!(a4 < 95) && q3(i, t) && !(fe(i, (f4) => Z(f4).length > 0) < O2)) {
1660
+ o.zip = t, g3.add(t), C.push(`zip=${t} (${a4}% ZIP codes)`);
1661
1661
  break;
1662
1662
  }
1663
1663
  }
@@ -1666,25 +1666,25 @@ function pe(r, n, e, s, c2) {
1666
1666
  let t = null;
1667
1667
  for (let i of T3) {
1668
1668
  if (g3.has(i) || !P2(l(i))) continue;
1669
- let a2 = G2(l(i));
1670
- (!t || a2 > t.pct) && (t = { name: i, pct: a2 });
1669
+ let a4 = G2(l(i));
1670
+ (!t || a4 > t.pct) && (t = { name: i, pct: a4 });
1671
1671
  }
1672
- t && (h3 && (u4.push(`country=${h3} (only ${G2(l(h3))}% of values are country identifiers; using ${t.name} instead)`), _2.country = h3), o.country = t.name, g3.add(t.name), C.push(`country=${t.name}`));
1672
+ t && (h3 && (u2.push(`country=${h3} (only ${G2(l(h3))}% of values are country identifiers; using ${t.name} instead)`), _2.country = h3), o.country = t.name, g3.add(t.name), C.push(`country=${t.name}`));
1673
1673
  }
1674
1674
  if (!o.city) {
1675
1675
  let t = null;
1676
1676
  for (let i of T3) {
1677
1677
  if (g3.has(i)) continue;
1678
- let a2 = l(i), f4 = ue(a2, s);
1679
- f4 < m3 || D3(a2, (k2) => p3(k2, s)) < O2 || (!t || f4 > t.pct) && (t = { name: i, pct: f4 });
1678
+ let a4 = l(i), f4 = ue(a4, s);
1679
+ f4 < m3 || D3(a4, (k2) => p3(k2, s)) < O2 || (!t || f4 > t.pct) && (t = { name: i, pct: f4 });
1680
1680
  }
1681
1681
  t && (o.city = t.name, C.push(`city=${t.name} (${t.pct}% known cities)`));
1682
1682
  }
1683
- let B2 = o.country ? l(o.country) : [], L2 = !!o.country && P2(B2), j3 = L2 ? new Set(B2.map((t) => E(t == null ? null : String(t))).filter(Boolean)).size : 0, K2 = L2 && j3 >= 2, N2 = !!(o.lat && o.lon) && n.some((t) => {
1684
- let i = +String(t[o.lat] ?? "").trim(), a2 = +String(t[o.lon] ?? "").trim();
1685
- return isFinite(i) && isFinite(a2) && i >= -90 && i <= 90 && a2 >= -180 && a2 <= 180 && String(t[o.lat] ?? "").trim() !== "" && String(t[o.lon] ?? "").trim() !== "";
1683
+ let B2 = o.country ? l(o.country) : [], L2 = !!o.country && P2(B2), j2 = L2 ? new Set(B2.map((t) => E(t == null ? null : String(t))).filter(Boolean)).size : 0, K2 = L2 && j2 >= 2, N2 = !!(o.lat && o.lon) && n.some((t) => {
1684
+ let i = +String(t[o.lat] ?? "").trim(), a4 = +String(t[o.lon] ?? "").trim();
1685
+ return isFinite(i) && isFinite(a4) && i >= -90 && i <= 90 && a4 >= -180 && a4 <= 180 && String(t[o.lat] ?? "").trim() !== "" && String(t[o.lon] ?? "").trim() !== "";
1686
1686
  });
1687
- return o.lat && o.lon && !N2 && u4.push(`lat/lon=${o.lat}/${o.lon} (no row holds a usable coordinate pair)`), o.country && !K2 && !(o.city || o.state || o.zip || N2) && u4.push(L2 ? `country=${o.country} (every row resolves to the same country - nothing to place apart)` : `country=${o.country} (values are not country identifiers)`), { bind: !!(o.city || o.state || o.zip || K2 || N2) ? o : null, backfilled: C, refused: u4, ...Object.keys(_2).length ? { labelFallback: _2 } : {} };
1687
+ return o.lat && o.lon && !N2 && u2.push(`lat/lon=${o.lat}/${o.lon} (no row holds a usable coordinate pair)`), o.country && !K2 && !(o.city || o.state || o.zip || N2) && u2.push(L2 ? `country=${o.country} (every row resolves to the same country - nothing to place apart)` : `country=${o.country} (values are not country identifiers)`), { bind: !!(o.city || o.state || o.zip || K2 || N2) ? o : null, backfilled: C, refused: u2, ...Object.keys(_2).length ? { labelFallback: _2 } : {} };
1688
1688
  }
1689
1689
 
1690
1690
  // src/payload.ts
@@ -1747,7 +1747,7 @@ function buildRenderPayload(cols, rowObjs, geo, point, destination, opts) {
1747
1747
  const colNames = cols.map((c2) => c2.name);
1748
1748
  let utcDayColumns = null;
1749
1749
  if (opts?.utcDays) {
1750
- const norm = h2(cols, rowObjs);
1750
+ const norm = b2(cols, rowObjs);
1751
1751
  rowObjs = norm.rows;
1752
1752
  utcDayColumns = norm.columns;
1753
1753
  }
@@ -1771,29 +1771,29 @@ function buildRenderPayload(cols, rowObjs, geo, point, destination, opts) {
1771
1771
  const out = new Array(rowObjs.length);
1772
1772
  for (let r = 0; r < rowObjs.length; r++) {
1773
1773
  const row = rowObjs[r];
1774
- const a2 = new Array(cols.length + extra);
1774
+ const a4 = new Array(cols.length + extra);
1775
1775
  for (let c2 = 0; c2 < cols.length; c2++) {
1776
1776
  const v2 = row[colNames[c2]];
1777
1777
  if (v2 instanceof Date) {
1778
- a2[c2] = v2.toISOString();
1778
+ a4[c2] = v2.toISOString();
1779
1779
  } else {
1780
- a2[c2] = v2 ?? null;
1780
+ a4[c2] = v2 ?? null;
1781
1781
  }
1782
1782
  }
1783
1783
  let k2 = cols.length;
1784
- a2[k2++] = r;
1785
- if (geoIso) a2[k2++] = geoIso[r];
1784
+ a4[k2++] = r;
1785
+ if (geoIso) a4[k2++] = geoIso[r];
1786
1786
  if (pLat && pLon) {
1787
- a2[k2++] = pLat[r];
1788
- a2[k2++] = pLon[r];
1789
- a2[k2++] = pPrec ? pPrec[r] : null;
1787
+ a4[k2++] = pLat[r];
1788
+ a4[k2++] = pLon[r];
1789
+ a4[k2++] = pPrec ? pPrec[r] : null;
1790
1790
  }
1791
1791
  if (dLat && dLon) {
1792
- a2[k2++] = dLat[r];
1793
- a2[k2++] = dLon[r];
1794
- a2[k2++] = dPrec ? dPrec[r] : null;
1792
+ a4[k2++] = dLat[r];
1793
+ a4[k2++] = dLon[r];
1794
+ a4[k2++] = dPrec ? dPrec[r] : null;
1795
1795
  }
1796
- out[r] = a2;
1796
+ out[r] = a4;
1797
1797
  }
1798
1798
  const colsOut = [...cols, { name: "__rowIdx__", dataType: "Integer", isMeasure: false, modelDesc: "" }];
1799
1799
  if (geoIso) colsOut.push({ name: "__geoIso__", dataType: "String", isMeasure: false, modelDesc: "" });
@@ -2110,8 +2110,8 @@ function styleOf2(el, doc) {
2110
2110
  }
2111
2111
  }
2112
2112
  function attrOrComputed(el, name, cs) {
2113
- const a2 = el.getAttribute?.(name);
2114
- if (a2 !== null && a2 !== void 0 && String(a2).trim() !== "") return String(a2).trim();
2113
+ const a4 = el.getAttribute?.(name);
2114
+ if (a4 !== null && a4 !== void 0 && String(a4).trim() !== "") return String(a4).trim();
2115
2115
  const c2 = cs?.[name === "stroke-width" ? "strokeWidth" : name];
2116
2116
  return c2 === null || c2 === void 0 ? "" : String(c2).trim();
2117
2117
  }
@@ -2185,7 +2185,7 @@ function num(el, name) {
2185
2185
  }
2186
2186
  function median(xs) {
2187
2187
  if (!xs.length) return NaN;
2188
- const s = [...xs].sort((a2, b2) => a2 - b2);
2188
+ const s = [...xs].sort((a4, b4) => a4 - b4);
2189
2189
  const m2 = s.length >> 1;
2190
2190
  return s.length % 2 ? s[m2] : (s[m2 - 1] + s[m2]) / 2;
2191
2191
  }
@@ -2196,17 +2196,17 @@ function robustLine(v2, pos) {
2196
2196
  for (let i = 0; i < n; i += step) idx.push(i);
2197
2197
  const slopes = [];
2198
2198
  for (let p2 = 0; p2 < idx.length; p2++) {
2199
- for (let q3 = p2 + 1; q3 < idx.length; q3++) {
2200
- const dv = v2[idx[q3]] - v2[idx[p2]];
2199
+ for (let q4 = p2 + 1; q4 < idx.length; q4++) {
2200
+ const dv = v2[idx[q4]] - v2[idx[p2]];
2201
2201
  if (Math.abs(dv) < 1e-12) continue;
2202
- slopes.push((pos[idx[q3]] - pos[idx[p2]]) / dv);
2202
+ slopes.push((pos[idx[q4]] - pos[idx[p2]]) / dv);
2203
2203
  }
2204
2204
  }
2205
2205
  if (slopes.length < 3) return null;
2206
- const b2 = median(slopes);
2207
- if (!Number.isFinite(b2) || Math.abs(b2) < 1e-12) return null;
2208
- const a2 = median(pos.map((y5, i) => y5 - b2 * v2[i]));
2209
- return Number.isFinite(a2) ? { a: a2, b: b2 } : null;
2206
+ const b4 = median(slopes);
2207
+ if (!Number.isFinite(b4) || Math.abs(b4) < 1e-12) return null;
2208
+ const a4 = median(pos.map((y5, i) => y5 - b4 * v2[i]));
2209
+ return Number.isFinite(a4) ? { a: a4, b: b4 } : null;
2210
2210
  }
2211
2211
  function censusValuePlacement(container, data) {
2212
2212
  try {
@@ -2265,8 +2265,8 @@ function censusValuePlacement(container, data) {
2265
2265
  const fit = 1 - ssRes / ssTot;
2266
2266
  if (fit >= VALUE_AXIS_MIN_FIT && (!best || fit > best.fit)) {
2267
2267
  const full = new Array(dots.length).fill(NaN);
2268
- keep.forEach((k2, j3) => {
2269
- full[k2] = res[j3];
2268
+ keep.forEach((k2, j2) => {
2269
+ full[k2] = res[j2];
2270
2270
  });
2271
2271
  best = { col: c2, axis, fit, res: full, log };
2272
2272
  }
@@ -2313,14 +2313,14 @@ function needsScroll(contentPx, viewportPx, slackPx = SCROLL_SLACK_PX) {
2313
2313
  }
2314
2314
  function contentExtentOf(boxes) {
2315
2315
  if (!boxes || boxes.length === 0) return { w: 0, h: 0, source: "none" };
2316
- const usable = boxes.filter((b2) => b2 && isFinite(b2.right) && isFinite(b2.bottom) && (b2.right > 0 || b2.bottom > 0));
2316
+ const usable = boxes.filter((b4) => b4 && isFinite(b4.right) && isFinite(b4.bottom) && (b4.right > 0 || b4.bottom > 0));
2317
2317
  if (usable.length === 0) return { w: 0, h: 0, source: "none" };
2318
- const inFlow = usable.filter((b2) => !b2.floating);
2318
+ const inFlow = usable.filter((b4) => !b4.floating);
2319
2319
  const counted = inFlow.length > 0 ? inFlow : usable;
2320
2320
  let w2 = 0, h3 = 0;
2321
- for (const b2 of counted) {
2322
- if (b2.right > w2) w2 = b2.right;
2323
- if (b2.bottom > h3) h3 = b2.bottom;
2321
+ for (const b4 of counted) {
2322
+ if (b4.right > w2) w2 = b4.right;
2323
+ if (b4.bottom > h3) h3 = b4.bottom;
2324
2324
  }
2325
2325
  return { w: w2, h: h3, source: inFlow.length > 0 ? "in-flow" : "all-floating" };
2326
2326
  }
@@ -2354,8 +2354,8 @@ var AXIS_PIN_TRACK_REACH_PX = 12;
2354
2354
  function isHorizontalLabelRow(boxes) {
2355
2355
  if (!boxes || boxes.length < 2) return false;
2356
2356
  let minX = Infinity, maxX = -Infinity, minY = Infinity, maxY = -Infinity;
2357
- for (const b2 of boxes) {
2358
- const cx = (b2.left + b2.right) / 2, cy = (b2.top + b2.bottom) / 2;
2357
+ for (const b4 of boxes) {
2358
+ const cx = (b4.left + b4.right) / 2, cy = (b4.top + b4.bottom) / 2;
2359
2359
  if (!isFinite(cx) || !isFinite(cy)) return false;
2360
2360
  if (cx < minX) minX = cx;
2361
2361
  if (cx > maxX) maxX = cx;
@@ -2367,10 +2367,10 @@ function isHorizontalLabelRow(boxes) {
2367
2367
  function labelBand(boxes, tracks = [], pad = AXIS_PIN_BAND_PAD_PX, trackReach = AXIS_PIN_TRACK_REACH_PX) {
2368
2368
  if (!boxes || boxes.length === 0) return null;
2369
2369
  let top = Infinity, bottom = -Infinity;
2370
- for (const b2 of boxes) {
2371
- if (!isFinite(b2.top) || !isFinite(b2.bottom)) continue;
2372
- if (b2.top < top) top = b2.top;
2373
- if (b2.bottom > bottom) bottom = b2.bottom;
2370
+ for (const b4 of boxes) {
2371
+ if (!isFinite(b4.top) || !isFinite(b4.bottom)) continue;
2372
+ if (b4.top < top) top = b4.top;
2373
+ if (b4.bottom > bottom) bottom = b4.bottom;
2374
2374
  }
2375
2375
  if (!isFinite(top) || !isFinite(bottom) || bottom <= top) return null;
2376
2376
  for (const t of tracks || []) {
@@ -2485,7 +2485,7 @@ function fitReadingFor(lane, c2, slackPx = SCROLL_SLACK_PX, inkOf) {
2485
2485
  overflowsY: needsScroll(contentH, viewH, slackPx),
2486
2486
  extentSource: extent.source,
2487
2487
  boxes: boxes.length,
2488
- floating: boxes.filter((b2) => b2.floating).length,
2488
+ floating: boxes.filter((b4) => b4.floating).length,
2489
2489
  scrollW: c2.scrollWidth,
2490
2490
  scrollH: c2.scrollHeight
2491
2491
  };
@@ -2496,14 +2496,14 @@ var SVG_NS2 = "http://www.w3.org/2000/svg";
2496
2496
  var AXIS_PIN_MAX_CARRIED = 12;
2497
2497
  function unpinScrolledAxis(container) {
2498
2498
  if (!container) return;
2499
- const st2 = container[CONTAINER_SLOT_AXIS_PIN];
2500
- if (!st2) return;
2499
+ const st = container[CONTAINER_SLOT_AXIS_PIN];
2500
+ if (!st) return;
2501
2501
  try {
2502
- container.removeEventListener("scroll", st2.onScroll);
2502
+ container.removeEventListener("scroll", st.onScroll);
2503
2503
  } catch {
2504
2504
  }
2505
2505
  try {
2506
- if (st2.overlay.parentNode) st2.overlay.parentNode.removeChild(st2.overlay);
2506
+ if (st.overlay.parentNode) st.overlay.parentNode.removeChild(st.overlay);
2507
2507
  } catch {
2508
2508
  }
2509
2509
  try {
@@ -2526,8 +2526,8 @@ function backdropFill(svg, container, view, svgBox) {
2526
2526
  for (let i = 0; i < rects.length && i < 6; i++) {
2527
2527
  const r = rects[i];
2528
2528
  if (r.closest(".d3-mark")) continue;
2529
- const b2 = r.getBoundingClientRect();
2530
- if (b2.width >= svgBox.width * 0.9 && b2.height >= svgBox.height * 0.9) {
2529
+ const b4 = r.getBoundingClientRect();
2530
+ if (b4.width >= svgBox.width * 0.9 && b4.height >= svgBox.height * 0.9) {
2531
2531
  let fill = "";
2532
2532
  try {
2533
2533
  fill = view.getComputedStyle(r).fill || "";
@@ -2631,9 +2631,9 @@ function pinScrolledAxis(container, svg) {
2631
2631
  if (r.top >= band.top && r.bottom <= band.bottom) carried.push(t);
2632
2632
  }
2633
2633
  const pinSvg = doc.createElementNS(SVG_NS2, "svg");
2634
- for (const a2 of ["font-family", "font-size", "font-weight", "font", "fill", "color", "text-rendering"]) {
2635
- const v2 = svg.getAttribute(a2);
2636
- if (v2) pinSvg.setAttribute(a2, v2);
2634
+ for (const a4 of ["font-family", "font-size", "font-weight", "font", "fill", "color", "text-rendering"]) {
2635
+ const v2 = svg.getAttribute(a4);
2636
+ if (v2) pinSvg.setAttribute(a4, v2);
2637
2637
  }
2638
2638
  const styles = svg.querySelectorAll("style");
2639
2639
  for (let i = 0; i < styles.length; i++) pinSvg.appendChild(styles[i].cloneNode(true));
@@ -2681,15 +2681,15 @@ function pinScrolledAxis(container, svg) {
2681
2681
  const svgTop = svgBox.top - cRect.top - container.clientTop + container.scrollTop;
2682
2682
  const contentBand = { top: svgTop + band.top, bottom: svgTop + band.bottom };
2683
2683
  const place = () => {
2684
- const st2 = container.scrollTop, vh = container.clientHeight;
2685
- const edge2 = axisPinPlacement(contentBand, st2, vh);
2684
+ const st = container.scrollTop, vh = container.clientHeight;
2685
+ const edge2 = axisPinPlacement(contentBand, st, vh);
2686
2686
  if (!edge2) {
2687
2687
  o.display = "none";
2688
2688
  return null;
2689
2689
  }
2690
2690
  o.display = "block";
2691
2691
  o.left = `${svgLeft}px`;
2692
- o.top = `${edge2 === "top" ? st2 : st2 + vh - bandPx}px`;
2692
+ o.top = `${edge2 === "top" ? st : st + vh - bandPx}px`;
2693
2693
  return edge2;
2694
2694
  };
2695
2695
  const onScroll = () => {
@@ -2766,8 +2766,8 @@ function fitRenderedChart(container, opts = {}) {
2766
2766
  if (plan.grow) {
2767
2767
  svg.setAttribute("height", String(plan.heightPx));
2768
2768
  if (vb > 0) {
2769
- const b2 = svg.viewBox.baseVal;
2770
- svg.setAttribute("viewBox", `${b2.x} ${b2.y} ${b2.width} ${plan.viewBoxH}`);
2769
+ const b4 = svg.viewBox.baseVal;
2770
+ svg.setAttribute("viewBox", `${b4.x} ${b4.y} ${b4.width} ${plan.viewBoxH}`);
2771
2771
  }
2772
2772
  result.grew = true;
2773
2773
  }
@@ -2828,8 +2828,8 @@ var WHITE_TEXT_BG_LUM = 0.5;
2828
2828
  var PILL_MIN_ALPHA = 0.05;
2829
2829
  var PILL_OPAQUE_ALPHA = 0.85;
2830
2830
  var PAGE_MATCH_TOLERANCE = 2;
2831
- function isPillBackdropAlpha(a2) {
2832
- return a2 >= PILL_MIN_ALPHA && a2 < PILL_OPAQUE_ALPHA;
2831
+ function isPillBackdropAlpha(a4) {
2832
+ return a4 >= PILL_MIN_ALPHA && a4 < PILL_OPAQUE_ALPHA;
2833
2833
  }
2834
2834
  var PILL_MIN_COVERAGE = 0.6;
2835
2835
  function pillBacksGlyph(overlapArea, glyphArea) {
@@ -2857,11 +2857,11 @@ function toRGBA(c2) {
2857
2857
  return parseRGBA(c2);
2858
2858
  }
2859
2859
  function compositeOver(fg, bg) {
2860
- const a2 = Math.max(0, Math.min(1, fg[3]));
2860
+ const a4 = Math.max(0, Math.min(1, fg[3]));
2861
2861
  return [
2862
- Math.round(fg[0] * a2 + bg[0] * (1 - a2)),
2863
- Math.round(fg[1] * a2 + bg[1] * (1 - a2)),
2864
- Math.round(fg[2] * a2 + bg[2] * (1 - a2))
2862
+ Math.round(fg[0] * a4 + bg[0] * (1 - a4)),
2863
+ Math.round(fg[1] * a4 + bg[1] * (1 - a4)),
2864
+ Math.round(fg[2] * a4 + bg[2] * (1 - a4))
2865
2865
  ];
2866
2866
  }
2867
2867
  function relativeLuminance(rgb) {
@@ -2905,10 +2905,10 @@ function glyphSampleGrid(box, n = GLYPH_SAMPLE_N) {
2905
2905
  if (!box || !(box.width > 0) || !(box.height > 0) || !(n >= 1)) return out;
2906
2906
  const k2 = Math.floor(n);
2907
2907
  for (let i = 0; i < k2; i++) {
2908
- for (let j3 = 0; j3 < k2; j3++) {
2908
+ for (let j2 = 0; j2 < k2; j2++) {
2909
2909
  out.push({
2910
2910
  x: box.left + box.width * (i + 0.5) / k2,
2911
- y: box.top + box.height * (j3 + 0.5) / k2
2911
+ y: box.top + box.height * (j2 + 0.5) / k2
2912
2912
  });
2913
2913
  }
2914
2914
  }
@@ -3069,7 +3069,7 @@ function applyLabelContrast(container, opts = {}) {
3069
3069
  }
3070
3070
  report.scanned++;
3071
3071
  const opaqueUnder = under.filter((x3) => effAlpha(x3.mk) >= PILL_OPAQUE_ALPHA);
3072
- const cellEntry = (opaqueUnder.length ? opaqueUnder : under).reduce((a2, b2) => b2.ov > a2.ov || b2.ov === a2.ov && b2.mk.ord > a2.mk.ord ? b2 : a2);
3072
+ const cellEntry = (opaqueUnder.length ? opaqueUnder : under).reduce((a4, b4) => b4.ov > a4.ov || b4.ov === a4.ov && b4.mk.ord > a4.mk.ord ? b4 : a4);
3073
3073
  const cell = cellEntry.mk;
3074
3074
  const pill = under.find((x3) => x3.mk !== cell && isPillBackdropAlpha(effAlpha(x3.mk)) && x3.mk.ord > cell.ord && pillBacksGlyph(x3.ov, glyphArea))?.mk;
3075
3075
  const cellRGBA = toRGBA(cell.fill);
@@ -3099,6 +3099,21 @@ function applyLabelContrast(container, opts = {}) {
3099
3099
  }
3100
3100
  }
3101
3101
 
3102
+ // src/invalidSentinel.ts
3103
+ function isInvalidSentinelError(text) {
3104
+ if (!text) return false;
3105
+ return /\bINVALID\s*:/.test(text);
3106
+ }
3107
+ function invalidSentinelReason(text, max = 240) {
3108
+ if (!text) return "";
3109
+ const m2 = /\bINVALID\s*:\s*([^\r\n]*)/.exec(text);
3110
+ if (!m2) return "";
3111
+ const reason = m2[1].trim();
3112
+ const cap = Math.max(0, Math.floor(max));
3113
+ if (reason.length <= cap) return reason;
3114
+ return cap <= 3 ? reason.slice(0, cap) : reason.slice(0, cap - 3).trimEnd() + "...";
3115
+ }
3116
+
3102
3117
  // src/host.ts
3103
3118
  function sessionViewStateProvider(container) {
3104
3119
  const holder = container;
@@ -3218,7 +3233,11 @@ function createChartHost(container, config) {
3218
3233
  }
3219
3234
  };
3220
3235
  }
3221
- let resolved = resolveOptions(raw);
3236
+ const resolveForHost = (input) => {
3237
+ const out = resolveOptions(input);
3238
+ return out.allowTooltips == null ? { ...out, allowTooltips: true } : out;
3239
+ };
3240
+ let resolved = resolveForHost(raw);
3222
3241
  let renderFn = config.renderFn ?? null;
3223
3242
  let destroyed = false;
3224
3243
  let warnedGeo = false;
@@ -3231,9 +3250,9 @@ function createChartHost(container, config) {
3231
3250
  const ensureAffordanceStyles = () => {
3232
3251
  try {
3233
3252
  if (!doc || doc.getElementById("bic-chart-host-affordances")) return;
3234
- const st2 = doc.createElement("style");
3235
- st2.id = "bic-chart-host-affordances";
3236
- st2.textContent = `
3253
+ const st = doc.createElement("style");
3254
+ st.id = "bic-chart-host-affordances";
3255
+ st.textContent = `
3237
3256
  /* TYPOGRAPHY FIREWALL. Generated charts set font-size but almost never line-height or
3238
3257
  letter-spacing, so they INHERIT whatever the host page cascades in. A page with
3239
3258
  \`:root { font: 18px/145% }\` (the stock Vite template does exactly this) hands every
@@ -3282,7 +3301,7 @@ function createChartHost(container, config) {
3282
3301
  font-weight: 700 !important;
3283
3302
  text-decoration: underline !important;
3284
3303
  }`;
3285
- (doc.head || doc.documentElement)?.appendChild(st2);
3304
+ (doc.head || doc.documentElement)?.appendChild(st);
3286
3305
  } catch {
3287
3306
  }
3288
3307
  };
@@ -3411,6 +3430,13 @@ function createChartHost(container, config) {
3411
3430
  try {
3412
3431
  renderFn(container, { columns: data.columns, rows: data.rows }, resolved);
3413
3432
  } catch (err) {
3433
+ const message = String(err?.message ?? err ?? "");
3434
+ if (config.onInvalidSentinel && isInvalidSentinelError(message)) {
3435
+ stopAnim();
3436
+ container.innerHTML = "";
3437
+ config.onInvalidSentinel({ reason: invalidSentinelReason(message), message });
3438
+ return;
3439
+ }
3414
3440
  throw explainRenderFailure(err, d3);
3415
3441
  }
3416
3442
  if (labelContrastOpts !== false) {
@@ -3476,7 +3502,7 @@ function createChartHost(container, config) {
3476
3502
  },
3477
3503
  setOptions(partial) {
3478
3504
  raw = { ...raw, ...partial };
3479
- resolved = resolveOptions(raw);
3505
+ resolved = resolveForHost(raw);
3480
3506
  host.render();
3481
3507
  },
3482
3508
  setData(next) {
@@ -3583,12 +3609,12 @@ export {
3583
3609
  registerGeoAsset,
3584
3610
  clearGeoCache,
3585
3611
  L3,
3586
- R,
3587
- u2 as u,
3588
- Oe,
3589
- Le,
3612
+ M,
3613
+ a2 as a,
3614
+ Ie,
3615
+ Ee,
3616
+ Vt,
3590
3617
  Yt,
3591
- Kt,
3592
3618
  buildRenderPayload,
3593
3619
  createMarkResolver,
3594
3620
  ensureCrossfilterHitTargets,
@@ -3648,6 +3674,8 @@ export {
3648
3674
  LABEL_CONTRAST_DONE_ATTR,
3649
3675
  LABEL_CONTRAST_CAP,
3650
3676
  applyLabelContrast,
3677
+ isInvalidSentinelError,
3678
+ invalidSentinelReason,
3651
3679
  sessionViewStateProvider,
3652
3680
  noopViewStateProvider,
3653
3681
  requiredD3Plugins,