@bicharts/chart-host 0.5.86 → 0.5.87

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.
@@ -26,36 +26,36 @@ var require_papaparse_min = __commonJS({
26
26
  function P4(e) {
27
27
  return 65279 === e.charCodeAt(0) ? e.slice(1) : e;
28
28
  }
29
- function u2(e) {
29
+ function u4(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
31
  var t = b2(e2);
32
32
  t.chunkSize = parseInt(t.chunkSize), e2.step || e2.chunk || (t.chunkSize = null);
33
- this._handle = new i(t), (this._handle.streamer = this)._config = t;
33
+ this._handle = new i2(t), (this._handle.streamer = this)._config = t;
34
34
  }.call(this, e), this.parseChunk = function(t, e2) {
35
- var i2 = parseInt(this._config.skipFirstNLines) || 0;
36
- if (this.isFirstChunk && 0 < i2) {
35
+ var i4 = parseInt(this._config.skipFirstNLines) || 0;
36
+ if (this.isFirstChunk && 0 < i4) {
37
37
  let e4 = this._config.newline;
38
- e4 || (r2 = this._config.quoteChar || '"', e4 = this._handle.guessLineEndings(t, r2)), t = [...t.split(e4).slice(i2)].join(e4);
38
+ e4 || (r2 = this._config.quoteChar || '"', e4 = this._handle.guessLineEndings(t, r2)), t = [...t.split(e4).slice(i4)].join(e4);
39
39
  }
40
40
  this.isFirstChunk && q3(this._config.beforeFirstChunk) && void 0 !== (r2 = this._config.beforeFirstChunk(t)) && (t = r2), this.isFirstChunk = false, this._halted = false;
41
- var i2 = this._partialLine + t, r2 = (this._partialLine = "", this._handle.parse(i2, this._baseIndex, !this._finished));
41
+ var i4 = this._partialLine + t, r2 = (this._partialLine = "", this._handle.parse(i4, this._baseIndex, !this._finished));
42
42
  if (!this._handle.paused() && !this._handle.aborted()) {
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 (a4) n.postMessage({ results: r2, workerId: v3.WORKER_ID, finished: i2 });
43
+ t = r2.meta.cursor, i4 = (this._finished || (this._partialLine = i4.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 (a4) n.postMessage({ results: r2, workerId: v3.WORKER_ID, finished: i4 });
45
45
  else if (q3(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 || !i4 || !q3(this._config.complete) || r2 && r2.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = true), i4 || r2 && r2.meta.paused || this._nextChunk(), r2;
50
50
  }
51
51
  this._halted = true;
52
52
  }, this._sendError = function(e2) {
53
53
  q3(this._config.error) ? this._config.error(e2) : a4 && this._config.error && n.postMessage({ workerId: v3.WORKER_ID, error: e2, finished: false });
54
54
  };
55
55
  }
56
- function f(e) {
56
+ function f2(e) {
57
57
  var r2;
58
- (e = e || {}).chunkSize || (e.chunkSize = v3.RemoteChunkSize), u2.call(this, e), this._nextChunk = s2 ? function() {
58
+ (e = e || {}).chunkSize || (e.chunkSize = v3.RemoteChunkSize), u4.call(this, e), this._nextChunk = s2 ? function() {
59
59
  this._readChunk(), this._chunkLoaded();
60
60
  } : function() {
61
61
  this._readChunk();
@@ -68,8 +68,8 @@ var require_papaparse_min = __commonJS({
68
68
  var e2, t = this._config.downloadRequestHeaders;
69
69
  for (e2 in t) r2.setRequestHeader(e2, t[e2]);
70
70
  }
71
- var i2;
72
- this._config.chunkSize && (i2 = this._start + this._config.chunkSize - 1, r2.setRequestHeader("Range", "bytes=" + this._start + "-" + i2));
71
+ var i4;
72
+ this._config.chunkSize && (i4 = this._start + this._config.chunkSize - 1, r2.setRequestHeader("Range", "bytes=" + this._start + "-" + i4));
73
73
  try {
74
74
  r2.send(this._config.downloadRequestBody);
75
75
  } catch (e4) {
@@ -85,46 +85,46 @@ var require_papaparse_min = __commonJS({
85
85
  };
86
86
  }
87
87
  function l2(e) {
88
- (e = e || {}).chunkSize || (e.chunkSize = v3.LocalChunkSize), u2.call(this, e);
89
- var i2, r2, n2 = "undefined" != typeof FileReader;
88
+ (e = e || {}).chunkSize || (e.chunkSize = v3.LocalChunkSize), u4.call(this, e);
89
+ var i4, r2, n2 = "undefined" != typeof FileReader;
90
90
  this.stream = function(e2) {
91
- this._input = e2, r2 = e2.slice || e2.webkitSlice || e2.mozSlice, n2 ? ((i2 = new FileReader()).onload = y4(this._chunkLoaded, this), i2.onerror = y4(this._chunkError, this)) : i2 = new FileReaderSync(), this._nextChunk();
91
+ this._input = e2, r2 = e2.slice || e2.webkitSlice || e2.mozSlice, n2 ? ((i4 = new FileReader()).onload = y4(this._chunkLoaded, this), i4.onerror = y4(this._chunkError, this)) : i4 = new FileReaderSync(), this._nextChunk();
92
92
  }, this._nextChunk = function() {
93
93
  this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
94
94
  }, this._readChunk = function() {
95
- var e2 = this._input, t = (this._config.chunkSize && (t = Math.min(this._start + this._config.chunkSize, this._input.size), e2 = r2.call(e2, this._start, t)), i2.readAsText(e2, this._config.encoding));
95
+ var e2 = this._input, t = (this._config.chunkSize && (t = Math.min(this._start + this._config.chunkSize, this._input.size), e2 = r2.call(e2, this._start, t)), i4.readAsText(e2, this._config.encoding));
96
96
  n2 || this._chunkLoaded({ target: { result: t } });
97
97
  }, this._chunkLoaded = function(e2) {
98
98
  this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(e2.target.result);
99
99
  }, this._chunkError = function() {
100
- this._sendError(i2.error);
100
+ this._sendError(i4.error);
101
101
  };
102
102
  }
103
103
  function c2(e) {
104
- var i2;
105
- u2.call(this, e = e || {}), this.stream = function(e2) {
106
- return i2 = e2, this._nextChunk();
104
+ var i4;
105
+ u4.call(this, e = e || {}), this.stream = function(e2) {
106
+ return i4 = e2, this._nextChunk();
107
107
  }, this._nextChunk = function() {
108
108
  var e2, t;
109
- if (!this._finished) return e2 = this._config.chunkSize, i2 = e2 ? (t = i2.substring(0, e2), i2.substring(e2)) : (t = i2, ""), this._finished = !i2, this.parseChunk(t);
109
+ if (!this._finished) return e2 = this._config.chunkSize, i4 = e2 ? (t = i4.substring(0, e2), i4.substring(e2)) : (t = i4, ""), this._finished = !i4, this.parseChunk(t);
110
110
  };
111
111
  }
112
- function p(e) {
113
- u2.call(this, e = e || {});
114
- var t = [], i2 = true, r2 = false;
112
+ function p2(e) {
113
+ u4.call(this, e = e || {});
114
+ var t = [], i4 = true, r2 = false;
115
115
  this.pause = function() {
116
- u2.prototype.pause.apply(this, arguments), this._input.pause();
116
+ u4.prototype.pause.apply(this, arguments), this._input.pause();
117
117
  }, this.resume = function() {
118
- u2.prototype.resume.apply(this, arguments), this._input.resume();
118
+ u4.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() {
122
122
  r2 && 1 === t.length && (this._finished = true);
123
123
  }, this._nextChunk = function() {
124
- this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : i2 = true;
124
+ this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : i4 = true;
125
125
  }, this._streamData = y4(function(e2) {
126
126
  try {
127
- t.push("string" == typeof e2 ? e2 : e2.toString(this._config.encoding)), i2 && (i2 = false, this._checkIsFinished(), this.parseChunk(t.shift()));
127
+ t.push("string" == typeof e2 ? e2 : e2.toString(this._config.encoding)), i4 && (i4 = false, this._checkIsFinished(), this.parseChunk(t.shift()));
128
128
  } catch (e4) {
129
129
  this._streamError(e4);
130
130
  }
@@ -136,91 +136,91 @@ var require_papaparse_min = __commonJS({
136
136
  this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
137
137
  }, this);
138
138
  }
139
- function i(m2) {
140
- var n2, s4, a5, t, o2 = Math.pow(2, 53), h3 = -o2, u4 = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, d2 = /^((\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, f2 = 0, l3 = false, e = false, c4 = [], p2 = { data: [], errors: [], meta: {} };
139
+ function i2(m2) {
140
+ var n2, s4, a5, t, o2 = Math.pow(2, 53), h3 = -o2, u5 = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, d2 = /^((\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)))$/, i4 = this, r2 = 0, f4 = 0, l3 = false, e = false, c4 = [], p4 = { data: [], errors: [], meta: {} };
141
141
  function y5(e2) {
142
142
  return "greedy" === m2.skipEmptyLines ? "" === e2.join("").trim() : 1 === e2.length && 0 === e2[0].length;
143
143
  }
144
144
  function g4() {
145
- if (p2 && a5 && (k2("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + v3.DefaultDelimiter + "'"), a5 = false), m2.skipEmptyLines && (p2.data = p2.data.filter(function(e4) {
145
+ if (p4 && a5 && (k2("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + v3.DefaultDelimiter + "'"), a5 = false), m2.skipEmptyLines && (p4.data = p4.data.filter(function(e4) {
146
146
  return !y5(e4);
147
147
  })), _3()) {
148
148
  let t4 = function(e4, t5) {
149
149
  e4 = P4(e4), q3(m2.transformHeader) && (e4 = m2.transformHeader(e4, t5)), c4.push(e4);
150
150
  };
151
151
  var t2 = t4;
152
- if (p2) if (Array.isArray(p2.data[0])) {
153
- for (var e2 = 0; _3() && e2 < p2.data.length; e2++) p2.data[e2].forEach(t4);
154
- p2.data.splice(0, 1);
155
- } else p2.data.forEach(t4);
152
+ if (p4) if (Array.isArray(p4.data[0])) {
153
+ for (var e2 = 0; _3() && e2 < p4.data.length; e2++) p4.data[e2].forEach(t4);
154
+ p4.data.splice(0, 1);
155
+ } else p4.data.forEach(t4);
156
156
  }
157
- function i4(e4, t4) {
158
- for (var i5 = m2.header ? {} : [], r5 = 0; r5 < e4.length; r5++) {
157
+ function i5(e4, t4) {
158
+ for (var i6 = m2.header ? {} : [], r5 = 0; r5 < e4.length; r5++) {
159
159
  var n4 = r5, s5 = e4[r5], s5 = ((e5, t5) => ((e6) => (m2.dynamicTypingFunction && void 0 === m2.dynamicTyping[e6] && (m2.dynamicTyping[e6] = m2.dynamicTypingFunction(e6)), true === (m2.dynamicTyping[e6] || m2.dynamicTyping)))(e5) ? "true" === t5 || "TRUE" === t5 || "false" !== t5 && "FALSE" !== t5 && (((e6) => {
160
- if (u4.test(e6)) {
160
+ if (u5.test(e6)) {
161
161
  e6 = parseFloat(e6);
162
162
  if (h3 < e6 && e6 < o2) return 1;
163
163
  }
164
164
  })(t5) ? parseFloat(t5) : d2.test(t5) ? new Date(t5) : "" === t5 ? null : t5) : t5)(n4 = m2.header ? r5 >= c4.length ? "__parsed_extra" : c4[r5] : n4, s5 = m2.transform ? m2.transform(s5, n4) : s5);
165
- "__parsed_extra" === n4 ? (i5[n4] = i5[n4] || [], i5[n4].push(s5)) : i5[n4] = s5;
165
+ "__parsed_extra" === n4 ? (i6[n4] = i6[n4] || [], i6[n4].push(s5)) : i6[n4] = s5;
166
166
  }
167
- return m2.header && (r5 > c4.length ? k2("FieldMismatch", "TooManyFields", "Too many fields: expected " + c4.length + " fields but parsed " + r5, f2 + t4) : r5 < c4.length && k2("FieldMismatch", "TooFewFields", "Too few fields: expected " + c4.length + " fields but parsed " + r5, f2 + t4)), i5;
167
+ return m2.header && (r5 > c4.length ? k2("FieldMismatch", "TooManyFields", "Too many fields: expected " + c4.length + " fields but parsed " + r5, f4 + t4) : r5 < c4.length && k2("FieldMismatch", "TooFewFields", "Too few fields: expected " + c4.length + " fields but parsed " + r5, f4 + t4)), i6;
168
168
  }
169
169
  var r4;
170
- p2 && (m2.header || m2.dynamicTyping || m2.transform) && (r4 = 1, !p2.data.length || Array.isArray(p2.data[0]) ? (p2.data = p2.data.map(i4), r4 = p2.data.length) : p2.data = i4(p2.data, 0), m2.header && p2.meta && (p2.meta.fields = c4), f2 += r4);
170
+ p4 && (m2.header || m2.dynamicTyping || m2.transform) && (r4 = 1, !p4.data.length || Array.isArray(p4.data[0]) ? (p4.data = p4.data.map(i5), r4 = p4.data.length) : p4.data = i5(p4.data, 0), m2.header && p4.meta && (p4.meta.fields = c4), f4 += r4);
171
171
  }
172
172
  function _3() {
173
173
  return m2.header && 0 === c4.length;
174
174
  }
175
- function k2(e2, t2, i4, r4) {
176
- e2 = { type: e2, code: t2, message: i4 };
177
- void 0 !== r4 && (e2.row = r4), p2.errors.push(e2);
175
+ function k2(e2, t2, i5, r4) {
176
+ e2 = { type: e2, code: t2, message: i5 };
177
+ void 0 !== r4 && (e2.row = r4), p4.errors.push(e2);
178
178
  }
179
179
  q3(m2.step) && (t = m2.step, m2.step = function(e2) {
180
- p2 = e2, _3() ? g4() : (g4(), 0 !== p2.data.length && (r2 += e2.data.length, m2.preview && r2 > m2.preview ? s4.abort() : (p2.data = p2.data[0], t(p2, i2))));
181
- }), this.parse = function(e2, t2, i4) {
182
- var r4 = m2.quoteChar || '"', r4 = (m2.newline || (m2.newline = this.guessLineEndings(e2, r4)), a5 = false, m2.delimiter ? q3(m2.delimiter) && (m2.delimiter = m2.delimiter(e2), p2.meta.delimiter = m2.delimiter) : ((r4 = ((e4, t4, i5, r5, n4) => {
180
+ p4 = e2, _3() ? g4() : (g4(), 0 !== p4.data.length && (r2 += e2.data.length, m2.preview && r2 > m2.preview ? s4.abort() : (p4.data = p4.data[0], t(p4, i4))));
181
+ }), this.parse = function(e2, t2, i5) {
182
+ var r4 = m2.quoteChar || '"', r4 = (m2.newline || (m2.newline = this.guessLineEndings(e2, r4)), a5 = false, m2.delimiter ? q3(m2.delimiter) && (m2.delimiter = m2.delimiter(e2), p4.meta.delimiter = m2.delimiter) : ((r4 = ((e4, t4, i6, r5, n4) => {
183
183
  var s5, a6, o4, h4;
184
184
  n4 = n4 || [",", " ", "|", ";", v3.RECORD_SEP, v3.UNIT_SEP];
185
- for (var u5 = 0; u5 < n4.length; u5++) {
186
- for (var d3, f4 = n4[u5], l4 = 0, c5 = 0, p4 = 0, g5 = (o4 = void 0, new E4({ comments: r5, delimiter: f4, newline: t4, preview: 10 }).parse(e4)), _4 = 0; _4 < g5.data.length; _4++) i5 && y5(g5.data[_4]) ? p4++ : (d3 = g5.data[_4].length, c5 += d3, void 0 === o4 ? o4 = d3 : 0 < d3 && (l4 += Math.abs(d3 - o4), o4 = d3));
187
- 0 < g5.data.length && (c5 /= g5.data.length - p4), (void 0 === a6 || l4 <= a6) && (void 0 === h4 || h4 < c5) && 1.99 < c5 && (a6 = l4, s5 = f4, h4 = c5);
185
+ for (var u6 = 0; u6 < n4.length; u6++) {
186
+ for (var d3, f5 = n4[u6], l4 = 0, c5 = 0, p5 = 0, g5 = (o4 = void 0, new E4({ comments: r5, delimiter: f5, newline: t4, preview: 10 }).parse(e4)), _4 = 0; _4 < g5.data.length; _4++) i6 && y5(g5.data[_4]) ? p5++ : (d3 = g5.data[_4].length, c5 += d3, void 0 === o4 ? o4 = d3 : 0 < d3 && (l4 += Math.abs(d3 - o4), o4 = d3));
187
+ 0 < g5.data.length && (c5 /= g5.data.length - p5), (void 0 === a6 || l4 <= a6) && (void 0 === h4 || h4 < c5) && 1.99 < c5 && (a6 = l4, s5 = f5, h4 = c5);
188
188
  }
189
189
  return { successful: !!(m2.delimiter = s5), bestDelimiter: s5 };
190
- })(e2, m2.newline, m2.skipEmptyLines, m2.comments, m2.delimitersToGuess)).successful ? m2.delimiter = r4.bestDelimiter : (a5 = true, m2.delimiter = v3.DefaultDelimiter), p2.meta.delimiter = m2.delimiter), b2(m2));
191
- return m2.preview && m2.header && r4.preview++, n2 = e2, s4 = new E4(r4), p2 = s4.parse(n2, t2, i4), g4(), l3 ? { meta: { paused: true } } : p2 || { meta: { paused: false } };
190
+ })(e2, m2.newline, m2.skipEmptyLines, m2.comments, m2.delimitersToGuess)).successful ? m2.delimiter = r4.bestDelimiter : (a5 = true, m2.delimiter = v3.DefaultDelimiter), p4.meta.delimiter = m2.delimiter), b2(m2));
191
+ return m2.preview && m2.header && r4.preview++, n2 = e2, s4 = new E4(r4), p4 = s4.parse(n2, t2, i5), g4(), l3 ? { meta: { paused: true } } : p4 || { meta: { paused: false } };
192
192
  }, this.paused = function() {
193
193
  return l3;
194
194
  }, this.pause = function() {
195
195
  l3 = true, s4.abort(), n2 = q3(m2.chunk) ? "" : n2.substring(s4.getCharIndex());
196
196
  }, this.resume = function() {
197
- i2.streamer._halted ? (l3 = false, i2.streamer.parseChunk(n2, true)) : setTimeout(i2.resume, 3);
197
+ i4.streamer._halted ? (l3 = false, i4.streamer.parseChunk(n2, true)) : setTimeout(i4.resume, 3);
198
198
  }, this.aborted = function() {
199
199
  return e;
200
200
  }, this.abort = function() {
201
- e = true, s4.abort(), p2.meta.aborted = true, q3(m2.complete) && m2.complete(p2), n2 = "";
201
+ e = true, s4.abort(), p4.meta.aborted = true, q3(m2.complete) && m2.complete(p4), n2 = "";
202
202
  }, this.guessLineEndings = function(e2, t2) {
203
203
  e2 = e2.substring(0, 1048576);
204
- var t2 = new RegExp(U3(t2) + "([^]*?)" + U3(t2), "gm"), i4 = (e2 = e2.replace(t2, "")).split("\r"), t2 = e2.split("\n"), e2 = 1 < t2.length && t2[0].length < i4[0].length;
205
- if (1 === i4.length || e2) return "\n";
206
- for (var r4 = 0, n4 = 0; n4 < i4.length; n4++) "\n" === i4[n4][0] && r4++;
207
- return r4 >= i4.length / 2 ? "\r\n" : "\r";
204
+ var t2 = new RegExp(U3(t2) + "([^]*?)" + U3(t2), "gm"), i5 = (e2 = e2.replace(t2, "")).split("\r"), t2 = e2.split("\n"), e2 = 1 < t2.length && t2[0].length < i5[0].length;
205
+ if (1 === i5.length || e2) return "\n";
206
+ for (var r4 = 0, n4 = 0; n4 < i5.length; n4++) "\n" === i5[n4][0] && r4++;
207
+ return r4 >= i5.length / 2 ? "\r\n" : "\r";
208
208
  };
209
209
  }
210
210
  function U3(e) {
211
211
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
212
212
  }
213
213
  function E4(C2) {
214
- var S = (C2 = C2 || {}).delimiter, O2 = C2.newline, x2 = C2.comments, I2 = C2.step, A = C2.preview, T2 = C2.fastMode, D3 = null, L2 = false, F3 = null == C2.quoteChar ? '"' : C2.quoteChar, j3 = F3;
214
+ var S = (C2 = C2 || {}).delimiter, O2 = C2.newline, x2 = C2.comments, I2 = C2.step, A = C2.preview, T3 = C2.fastMode, D3 = null, L2 = false, F4 = null == C2.quoteChar ? '"' : C2.quoteChar, j3 = F4;
215
215
  if (void 0 !== C2.escapeChar && (j3 = C2.escapeChar), ("string" != typeof S || -1 < v3.BAD_DELIMITERS.indexOf(S)) && (S = ","), x2 === S) throw new Error("Comment character same as delimiter");
216
216
  true === x2 ? x2 = "#" : ("string" != typeof x2 || -1 < v3.BAD_DELIMITERS.indexOf(x2)) && (x2 = false), "\n" !== O2 && "\r" !== O2 && "\r\n" !== O2 && (O2 = "\n");
217
217
  var z3 = 0, M = false;
218
- this.parse = function(i2, t, r2) {
219
- if ("string" != typeof i2) throw new Error("Input must be a string");
220
- var n2 = i2.length, e = S.length, s4 = O2.length, a5 = x2.length, o2 = q3(I2), h3 = [], u4 = [], d2 = [], f2 = z3 = 0;
221
- if (!i2) return w2();
222
- if (T2 || false !== T2 && -1 === i2.indexOf(F3)) {
223
- for (var l3 = i2.split(O2), c4 = 0; c4 < l3.length; c4++) {
218
+ this.parse = function(i4, t, r2) {
219
+ if ("string" != typeof i4) throw new Error("Input must be a string");
220
+ var n2 = i4.length, e = S.length, s4 = O2.length, a5 = x2.length, o2 = q3(I2), h3 = [], u5 = [], d2 = [], f4 = z3 = 0;
221
+ if (!i4) return w2();
222
+ if (T3 || false !== T3 && -1 === i4.indexOf(F4)) {
223
+ for (var l3 = i4.split(O2), c4 = 0; c4 < l3.length; c4++) {
224
224
  if (d2 = l3[c4], z3 += d2.length, c4 !== l3.length - 1) z3 += O2.length;
225
225
  else if (r2) return w2();
226
226
  if (!x2 || d2.substring(0, a5) !== x2) {
@@ -232,68 +232,68 @@ var require_papaparse_min = __commonJS({
232
232
  }
233
233
  return w2();
234
234
  }
235
- for (var p2 = i2.indexOf(S, z3), g4 = i2.indexOf(O2, z3), _3 = new RegExp(U3(j3) + U3(F3), "g"), m2 = i2.indexOf(F3, z3); ; ) if (i2[z3] === F3) for (m2 = z3, z3++; ; ) {
236
- if (-1 === (m2 = i2.indexOf(F3, m2 + 1))) return r2 || u4.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h3.length, index: z3 }), E5();
237
- if (m2 === n2 - 1) return E5(i2.substring(z3, m2).replace(_3, F3));
238
- if (F3 === j3 && i2[m2 + 1] === j3) m2++;
239
- else if (F3 === j3 || 0 === m2 || i2[m2 - 1] !== j3) {
240
- -1 !== p2 && p2 < m2 + 1 && (p2 = i2.indexOf(S, m2 + 1));
241
- var y5 = v4(-1 === (g4 = -1 !== g4 && g4 < m2 + 1 ? i2.indexOf(O2, m2 + 1) : g4) ? p2 : Math.min(p2, g4));
242
- if (i2.substr(m2 + 1 + y5, e) === S) {
243
- d2.push(i2.substring(z3, m2).replace(_3, F3)), i2[z3 = m2 + 1 + y5 + e] !== F3 && (m2 = i2.indexOf(F3, z3)), p2 = i2.indexOf(S, z3), g4 = i2.indexOf(O2, z3);
235
+ for (var p4 = i4.indexOf(S, z3), g4 = i4.indexOf(O2, z3), _3 = new RegExp(U3(j3) + U3(F4), "g"), m2 = i4.indexOf(F4, z3); ; ) if (i4[z3] === F4) for (m2 = z3, z3++; ; ) {
236
+ if (-1 === (m2 = i4.indexOf(F4, m2 + 1))) return r2 || u5.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h3.length, index: z3 }), E5();
237
+ if (m2 === n2 - 1) return E5(i4.substring(z3, m2).replace(_3, F4));
238
+ if (F4 === j3 && i4[m2 + 1] === j3) m2++;
239
+ else if (F4 === j3 || 0 === m2 || i4[m2 - 1] !== j3) {
240
+ -1 !== p4 && p4 < m2 + 1 && (p4 = i4.indexOf(S, m2 + 1));
241
+ var y5 = v4(-1 === (g4 = -1 !== g4 && g4 < m2 + 1 ? i4.indexOf(O2, m2 + 1) : g4) ? p4 : Math.min(p4, g4));
242
+ if (i4.substr(m2 + 1 + y5, e) === S) {
243
+ d2.push(i4.substring(z3, m2).replace(_3, F4)), i4[z3 = m2 + 1 + y5 + e] !== F4 && (m2 = i4.indexOf(F4, z3)), p4 = i4.indexOf(S, z3), g4 = i4.indexOf(O2, z3);
244
244
  break;
245
245
  }
246
246
  y5 = v4(g4);
247
- if (i2.substring(m2 + 1 + y5, m2 + 1 + y5 + s4) === O2) {
248
- if (d2.push(i2.substring(z3, m2).replace(_3, F3)), b4(m2 + 1 + y5 + s4), p2 = i2.indexOf(S, z3), m2 = i2.indexOf(F3, z3), o2 && (R(), M)) return w2();
247
+ if (i4.substring(m2 + 1 + y5, m2 + 1 + y5 + s4) === O2) {
248
+ if (d2.push(i4.substring(z3, m2).replace(_3, F4)), b4(m2 + 1 + y5 + s4), p4 = i4.indexOf(S, z3), m2 = i4.indexOf(F4, z3), o2 && (R(), M)) return w2();
249
249
  if (A && h3.length >= A) return w2(true);
250
250
  break;
251
251
  }
252
- u4.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: h3.length, index: z3 }), m2++;
252
+ u5.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: h3.length, index: z3 }), m2++;
253
253
  }
254
254
  }
255
- else if (x2 && 0 === d2.length && i2.substring(z3, z3 + a5) === x2) {
255
+ else if (x2 && 0 === d2.length && i4.substring(z3, z3 + a5) === x2) {
256
256
  if (-1 === g4) return w2();
257
- z3 = g4 + s4, g4 = i2.indexOf(O2, z3), p2 = i2.indexOf(S, z3);
258
- } else if (-1 !== p2 && (p2 < g4 || -1 === g4)) d2.push(i2.substring(z3, p2)), z3 = p2 + e, p2 = i2.indexOf(S, z3);
257
+ z3 = g4 + s4, g4 = i4.indexOf(O2, z3), p4 = i4.indexOf(S, z3);
258
+ } else if (-1 !== p4 && (p4 < g4 || -1 === g4)) d2.push(i4.substring(z3, p4)), z3 = p4 + e, p4 = i4.indexOf(S, z3);
259
259
  else {
260
260
  if (-1 === g4) break;
261
- if (d2.push(i2.substring(z3, g4)), b4(g4 + s4), o2 && (R(), M)) return w2();
261
+ if (d2.push(i4.substring(z3, g4)), b4(g4 + s4), o2 && (R(), M)) return w2();
262
262
  if (A && h3.length >= A) return w2(true);
263
263
  }
264
264
  return E5();
265
265
  function k2(e2) {
266
- h3.push(e2), f2 = z3;
266
+ h3.push(e2), f4 = z3;
267
267
  }
268
268
  function v4(e2) {
269
269
  var t2 = 0;
270
- return t2 = -1 !== e2 && (e2 = i2.substring(m2 + 1, e2)) && "" === e2.trim() ? e2.length : t2;
270
+ return t2 = -1 !== e2 && (e2 = i4.substring(m2 + 1, e2)) && "" === e2.trim() ? e2.length : t2;
271
271
  }
272
272
  function E5(e2) {
273
- return r2 || (void 0 === e2 && (e2 = i2.substring(z3)), d2.push(e2), z3 = n2, k2(d2), o2 && R()), w2();
273
+ return r2 || (void 0 === e2 && (e2 = i4.substring(z3)), d2.push(e2), z3 = n2, k2(d2), o2 && R()), w2();
274
274
  }
275
275
  function b4(e2) {
276
- z3 = e2, k2(d2), d2 = [], g4 = i2.indexOf(O2, z3);
276
+ z3 = e2, k2(d2), d2 = [], g4 = i4.indexOf(O2, z3);
277
277
  }
278
278
  function w2(e2) {
279
279
  if (C2.header && !t && h3.length && !L2) {
280
280
  var s5 = h3[0], a6 = /* @__PURE__ */ Object.create(null), o4 = new Set(s5);
281
281
  let n4 = false;
282
282
  for (let r4 = 0; r4 < s5.length; r4++) {
283
- let i4 = P4(s5[r4]);
284
- if (a6[i4 = q3(C2.transformHeader) ? C2.transformHeader(i4, r4) : i4]) {
285
- let e4, t2 = a6[i4];
286
- for (; e4 = i4 + "_" + t2, t2++, o4.has(e4); ) ;
287
- o4.add(e4), s5[r4] = e4, a6[i4]++, n4 = true, (D3 = null === D3 ? {} : D3)[e4] = i4;
288
- } else a6[i4] = 1, s5[r4] = i4;
289
- o4.add(i4);
283
+ let i5 = P4(s5[r4]);
284
+ if (a6[i5 = q3(C2.transformHeader) ? C2.transformHeader(i5, r4) : i5]) {
285
+ let e4, t2 = a6[i5];
286
+ for (; e4 = i5 + "_" + t2, t2++, o4.has(e4); ) ;
287
+ o4.add(e4), s5[r4] = e4, a6[i5]++, n4 = true, (D3 = null === D3 ? {} : D3)[e4] = i5;
288
+ } else a6[i5] = 1, s5[r4] = i5;
289
+ o4.add(i5);
290
290
  }
291
291
  n4 && console.warn("Duplicate headers found and renamed."), L2 = true;
292
292
  }
293
- return { data: h3, errors: u4, meta: { delimiter: S, linebreak: O2, aborted: M, truncated: !!e2, cursor: f2 + (t || 0), renamedHeaders: D3 } };
293
+ return { data: h3, errors: u5, meta: { delimiter: S, linebreak: O2, aborted: M, truncated: !!e2, cursor: f4 + (t || 0), renamedHeaders: D3 } };
294
294
  }
295
295
  function R() {
296
- I2(w2()), h3 = [], u4 = [];
296
+ I2(w2()), h3 = [], u5 = [];
297
297
  }
298
298
  }, this.abort = function() {
299
299
  M = true;
@@ -302,31 +302,31 @@ var require_papaparse_min = __commonJS({
302
302
  };
303
303
  }
304
304
  function g3(e) {
305
- var t = e.data, i2 = o[t.workerId], r2 = false;
306
- if (t.error) i2.userError(t.error, t.file);
305
+ var t = e.data, i4 = o[t.workerId], r2 = false;
306
+ if (t.error) i4.userError(t.error, t.file);
307
307
  else if (t.results && t.results.data) {
308
308
  var n2 = { abort: function() {
309
309
  r2 = true, _2(t.workerId, { data: [], errors: [], meta: { aborted: true } });
310
310
  }, pause: m, resume: m };
311
- if (q3(i2.userStep)) {
312
- for (var s4 = 0; s4 < t.results.data.length && (i2.userStep({ data: t.results.data[s4], errors: t.results.errors, meta: t.results.meta }, n2), !r2); s4++) ;
311
+ if (q3(i4.userStep)) {
312
+ for (var s4 = 0; s4 < t.results.data.length && (i4.userStep({ data: t.results.data[s4], errors: t.results.errors, meta: t.results.meta }, n2), !r2); s4++) ;
313
313
  delete t.results;
314
- } else q3(i2.userChunk) && (i2.userChunk(t.results, n2, t.file), delete t.results);
314
+ } else q3(i4.userChunk) && (i4.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
- var i2 = o[e];
320
- q3(i2.userComplete) && i2.userComplete(t), i2.terminate(), delete o[e];
319
+ var i4 = o[e];
320
+ q3(i4.userComplete) && i4.userComplete(t), i4.terminate(), delete o[e];
321
321
  }
322
322
  function m() {
323
323
  throw new Error("Not implemented.");
324
324
  }
325
325
  function b2(e) {
326
326
  if ("object" != typeof e || null === e) return e;
327
- var t, i2 = Array.isArray(e) ? [] : {};
328
- for (t in e) i2[t] = b2(e[t]);
329
- return i2;
327
+ var t, i4 = Array.isArray(e) ? [] : {};
328
+ for (t in e) i4[t] = b2(e[t]);
329
+ return i4;
330
330
  }
331
331
  function y4(e, t) {
332
332
  return function() {
@@ -337,22 +337,22 @@ var require_papaparse_min = __commonJS({
337
337
  return "function" == typeof e;
338
338
  }
339
339
  return v3.parse = function(e, t) {
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 || !v3.WORKERS_SUPPORTED) return i2 = null, v3.NODE_STREAM_INPUT, "string" == typeof e ? (e = P4(e), i2 = new (t.download ? f : c2)(t)) : true === e.readable && q3(e.read) && q3(e.on) ? i2 = new p(t) : (n.File && e instanceof File || e instanceof Object) && (i2 = new l2(t)), i2.stream(e);
343
- (i2 = (() => {
340
+ var i4 = (t = t || {}).dynamicTyping || false;
341
+ q3(i4) && (t.dynamicTypingFunction = i4, i4 = {});
342
+ if (t.dynamicTyping = i4, t.transform = !!q3(t.transform) && t.transform, !t.worker || !v3.WORKERS_SUPPORTED) return i4 = null, v3.NODE_STREAM_INPUT, "string" == typeof e ? (e = P4(e), i4 = new (t.download ? f2 : c2)(t)) : true === e.readable && q3(e.read) && q3(e.on) ? i4 = new p2(t) : (n.File && e instanceof File || e instanceof Object) && (i4 = new l2(t)), i4.stream(e);
343
+ (i4 = (() => {
344
344
  var e2;
345
345
  return !!v3.WORKERS_SUPPORTED && (e2 = (() => {
346
346
  var e4 = n.URL || n.webkitURL || null, t2 = r.toString();
347
347
  return v3.BLOB_URL || (v3.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 = h2++, 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, i4.userChunk = t.chunk, i4.userComplete = t.complete, i4.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, i4.postMessage({ input: e, config: t, workerId: i4.id });
350
350
  }, v3.unparse = function(e, t) {
351
- var s4 = false, _3 = true, m2 = ",", y5 = "\r\n", a5 = '"', o2 = a5 + a5, i2 = false, r2 = null, h3 = false, u4 = ((() => {
351
+ var s4 = false, _3 = true, m2 = ",", y5 = "\r\n", a5 = '"', o2 = a5 + a5, i4 = false, r2 = null, h3 = false, u5 = ((() => {
352
352
  if ("object" == typeof t) {
353
353
  if ("string" != typeof t.delimiter || v3.BAD_DELIMITERS.filter(function(e2) {
354
354
  return -1 !== t.delimiter.indexOf(e2);
355
- }).length || (m2 = t.delimiter), "boolean" != typeof t.quotes && "function" != typeof t.quotes && !Array.isArray(t.quotes) || (s4 = t.quotes), "boolean" != typeof t.skipEmptyLines && "string" != typeof t.skipEmptyLines || (i2 = t.skipEmptyLines), "string" == typeof t.newline && (y5 = t.newline), "string" == typeof t.quoteChar && (a5 = t.quoteChar, o2 = a5 + a5), "boolean" == typeof t.header && (_3 = t.header), Array.isArray(t.columns)) {
355
+ }).length || (m2 = t.delimiter), "boolean" != typeof t.quotes && "function" != typeof t.quotes && !Array.isArray(t.quotes) || (s4 = t.quotes), "boolean" != typeof t.skipEmptyLines && "string" != typeof t.skipEmptyLines || (i4 = t.skipEmptyLines), "string" == typeof t.newline && (y5 = 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
  }
@@ -361,75 +361,75 @@ var require_papaparse_min = __commonJS({
361
361
  })(), new RegExp(U3(a5), "g"));
362
362
  "string" == typeof e && (e = JSON.parse(e));
363
363
  if (Array.isArray(e)) {
364
- if (!e.length || Array.isArray(e[0])) return n2(null, e, i2);
365
- if ("object" == typeof e[0]) return n2(r2 || Object.keys(e[0]), e, i2);
366
- } else if ("object" == typeof e) return "string" == typeof e.data && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || r2), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : "object" == typeof e.data[0] ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || "object" == typeof e.data[0] || (e.data = [e.data])), n2(e.fields || [], e.data || [], i2);
364
+ if (!e.length || Array.isArray(e[0])) return n2(null, e, i4);
365
+ if ("object" == typeof e[0]) return n2(r2 || Object.keys(e[0]), e, i4);
366
+ } else if ("object" == typeof e) return "string" == typeof e.data && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || r2), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : "object" == typeof e.data[0] ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || "object" == typeof e.data[0] || (e.data = [e.data])), n2(e.fields || [], e.data || [], i4);
367
367
  throw new Error("Unable to serialize unrecognized input");
368
- function n2(e2, t2, i4) {
368
+ function n2(e2, t2, i5) {
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), s5 = !Array.isArray(t2[0]);
370
370
  if (n4 && _3) {
371
371
  for (var a6 = 0; a6 < e2.length; a6++) 0 < a6 && (r4 += m2), r4 += k2(e2[a6], a6);
372
372
  0 < t2.length && (r4 += y5);
373
373
  }
374
374
  for (var o4 = 0; o4 < t2.length; o4++) {
375
- var h4 = (n4 ? e2 : t2[o4]).length, u5 = false, d2 = 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
- for (var f2 = [], l3 = 0; l3 < h4; l3++) {
375
+ var h4 = (n4 ? e2 : t2[o4]).length, u6 = false, d2 = n4 ? 0 === Object.keys(t2[o4]).length : 0 === t2[o4].length;
376
+ if (i5 && !n4 && (u6 = "greedy" === i5 ? "" === t2[o4].join("").trim() : 1 === t2[o4].length && 0 === t2[o4][0].length), "greedy" === i5 && n4) {
377
+ for (var f4 = [], l3 = 0; l3 < h4; l3++) {
378
378
  var c4 = s5 ? e2[l3] : l3;
379
- f2.push(t2[o4][c4]);
379
+ f4.push(t2[o4][c4]);
380
380
  }
381
- u5 = "" === f2.join("").trim();
381
+ u6 = "" === f4.join("").trim();
382
382
  }
383
- if (!u5) {
384
- for (var p2 = 0; p2 < h4; p2++) {
385
- 0 < p2 && !d2 && (r4 += m2);
386
- var g4 = n4 && s5 ? e2[p2] : p2;
387
- r4 += k2(t2[o4][g4], p2);
383
+ if (!u6) {
384
+ for (var p4 = 0; p4 < h4; p4++) {
385
+ 0 < p4 && !d2 && (r4 += m2);
386
+ var g4 = n4 && s5 ? e2[p4] : p4;
387
+ r4 += k2(t2[o4][g4], p4);
388
388
  }
389
- o4 < t2.length - 1 && (!i4 || 0 < h4 && !d2) && (r4 += y5);
389
+ o4 < t2.length - 1 && (!i5 || 0 < h4 && !d2) && (r4 += y5);
390
390
  }
391
391
  }
392
392
  return r4;
393
393
  }
394
394
  function k2(e2, t2) {
395
- var i4, r4, n4;
396
- return null == e2 ? "" : e2.constructor === Date ? JSON.stringify(e2).slice(1, 25) : (n4 = false, h3 && "string" == typeof e2 && h3.test(e2) && (e2 = "'" + e2, n4 = true), r4 = (i4 = e2.toString()).replace(u4, o2), (n4 = n4 || true === s4 || "function" == typeof s4 && s4(e2, t2) || Array.isArray(s4) && s4[t2] || ((e4, t4) => {
397
- for (var i5 = 0; i5 < t4.length; i5++) if (-1 < e4.indexOf(t4[i5])) return true;
395
+ var i5, r4, n4;
396
+ return null == e2 ? "" : e2.constructor === Date ? JSON.stringify(e2).slice(1, 25) : (n4 = false, h3 && "string" == typeof e2 && h3.test(e2) && (e2 = "'" + e2, n4 = true), r4 = (i5 = e2.toString()).replace(u5, o2), (n4 = n4 || true === s4 || "function" == typeof s4 && s4(e2, t2) || Array.isArray(s4) && s4[t2] || ((e4, t4) => {
397
+ for (var i6 = 0; i6 < t4.length; i6++) if (-1 < e4.indexOf(t4[i6])) return true;
398
398
  return false;
399
- })(r4, v3.BAD_DELIMITERS) || -1 < r4.indexOf(m2) || -1 < i4.indexOf(a5) || " " === r4.charAt(0) || " " === r4.charAt(r4.length - 1)) ? a5 + r4 + a5 : r4);
399
+ })(r4, v3.BAD_DELIMITERS) || -1 < r4.indexOf(m2) || -1 < i5.indexOf(a5) || " " === r4.charAt(0) || " " === r4.charAt(r4.length - 1)) ? a5 + r4 + a5 : r4);
400
400
  }
401
- }, v3.RECORD_SEP = String.fromCharCode(30), v3.UNIT_SEP = String.fromCharCode(31), v3.BYTE_ORDER_MARK = "\uFEFF", v3.BAD_DELIMITERS = ["\r", "\n", '"', v3.BYTE_ORDER_MARK], v3.WORKERS_SUPPORTED = !s2 && !!n.Worker, v3.NODE_STREAM_INPUT = 1, v3.LocalChunkSize = 10485760, v3.RemoteChunkSize = 5242880, v3.DefaultDelimiter = ",", v3.Parser = E4, v3.ParserHandle = i, v3.NetworkStreamer = f, v3.FileStreamer = l2, v3.StringStreamer = c2, v3.ReadableStreamStreamer = p, n.jQuery && ((d = n.jQuery).fn.parse = function(o2) {
402
- var i2 = o2.config || {}, h3 = [];
401
+ }, v3.RECORD_SEP = String.fromCharCode(30), v3.UNIT_SEP = String.fromCharCode(31), v3.BYTE_ORDER_MARK = "\uFEFF", v3.BAD_DELIMITERS = ["\r", "\n", '"', v3.BYTE_ORDER_MARK], v3.WORKERS_SUPPORTED = !s2 && !!n.Worker, v3.NODE_STREAM_INPUT = 1, v3.LocalChunkSize = 10485760, v3.RemoteChunkSize = 5242880, v3.DefaultDelimiter = ",", v3.Parser = E4, v3.ParserHandle = i2, v3.NetworkStreamer = f2, v3.FileStreamer = l2, v3.StringStreamer = c2, v3.ReadableStreamStreamer = p2, n.jQuery && ((d = n.jQuery).fn.parse = function(o2) {
402
+ var i4 = o2.config || {}, h3 = [];
403
403
  return this.each(function(e2) {
404
404
  if (!("INPUT" === d(this).prop("tagName").toUpperCase() && "file" === d(this).attr("type").toLowerCase() && n.FileReader) || !this.files || 0 === this.files.length) return true;
405
- for (var t = 0; t < this.files.length; t++) h3.push({ file: this.files[t], inputElem: this, instanceConfig: d.extend({}, i2) });
405
+ for (var t = 0; t < this.files.length; t++) h3.push({ file: this.files[t], inputElem: this, instanceConfig: d.extend({}, i4) });
406
406
  }), e(), this;
407
407
  function e() {
408
408
  if (0 === h3.length) q3(o2.complete) && o2.complete();
409
409
  else {
410
- var e2, t, i4, r2, n2 = h3[0];
410
+ var e2, t, i5, r2, n2 = h3[0];
411
411
  if (q3(o2.before)) {
412
412
  var s4 = o2.before(n2.file, n2.inputElem);
413
413
  if ("object" == typeof s4) {
414
- if ("abort" === s4.action) return e2 = "AbortError", t = n2.file, i4 = n2.inputElem, r2 = s4.reason, void (q3(o2.error) && o2.error({ name: e2 }, t, i4, r2));
415
- if ("skip" === s4.action) return void u4();
414
+ if ("abort" === s4.action) return e2 = "AbortError", t = n2.file, i5 = n2.inputElem, r2 = s4.reason, void (q3(o2.error) && o2.error({ name: e2 }, t, i5, r2));
415
+ if ("skip" === s4.action) return void u5();
416
416
  "object" == typeof s4.config && (n2.instanceConfig = d.extend(n2.instanceConfig, s4.config));
417
- } else if ("skip" === s4) return void u4();
417
+ } else if ("skip" === s4) return void u5();
418
418
  }
419
419
  var a5 = n2.instanceConfig.complete;
420
420
  n2.instanceConfig.complete = function(e4) {
421
- q3(a5) && a5(e4, n2.file, n2.inputElem), u4();
421
+ q3(a5) && a5(e4, n2.file, n2.inputElem), u5();
422
422
  }, v3.parse(n2.file, n2.instanceConfig);
423
423
  }
424
424
  }
425
- function u4() {
425
+ function u5() {
426
426
  h3.splice(0, 1), e();
427
427
  }
428
428
  }), a4 && (n.onmessage = function(e) {
429
429
  e = e.data;
430
430
  void 0 === v3.WORKER_ID && e && (v3.WORKER_ID = e.workerId);
431
431
  "string" == typeof e.input ? n.postMessage({ workerId: v3.WORKER_ID, results: v3.parse(e.input, e.config), finished: true }) : (n.File && e.input instanceof File || e.input instanceof Object) && (e = v3.parse(e.input, e.config)) && n.postMessage({ workerId: v3.WORKER_ID, results: e, finished: true });
432
- }), (f.prototype = Object.create(u2.prototype)).constructor = f, (l2.prototype = Object.create(u2.prototype)).constructor = l2, (c2.prototype = Object.create(c2.prototype)).constructor = c2, (p.prototype = Object.create(u2.prototype)).constructor = p, v3;
432
+ }), (f2.prototype = Object.create(u4.prototype)).constructor = f2, (l2.prototype = Object.create(u4.prototype)).constructor = l2, (c2.prototype = Object.create(c2.prototype)).constructor = c2, (p2.prototype = Object.create(u4.prototype)).constructor = p2, v3;
433
433
  });
434
434
  }
435
435
  });
@@ -481,15 +481,15 @@ var numberOr = (raw, dflt) => {
481
481
  const n = raw == null || raw === "" ? NaN : Number(raw);
482
482
  return Number.isFinite(n) ? n : dflt;
483
483
  };
484
- function resolveOptions(p) {
484
+ function resolveOptions(p2) {
485
485
  return {
486
486
  // ---- host fields: pass through exactly as supplied ----
487
- width: p.width,
488
- height: p.height,
489
- palette: p.palette,
490
- geoUnmatched: p.geoUnmatched,
491
- geo: p.geo,
492
- geoPoint: p.geoPoint,
487
+ width: p2.width,
488
+ height: p2.height,
489
+ palette: p2.palette,
490
+ geoUnmatched: p2.geoUnmatched,
491
+ geo: p2.geo,
492
+ geoPoint: p2.geoPoint,
493
493
  // THIRD AND FOURTH OCCURRENCES OF THE animLoopDelaySec OMISSION, found together by
494
494
  // reading the contract against this list rather than by a bug report. geoPointDest is
495
495
  // declared on RenderOptions, passed by the visual and read by the route archetypes, and
@@ -497,8 +497,8 @@ function resolveOptions(p) {
497
497
  // endpoint" never saw the destination end at all. The guard test at the bottom of
498
498
  // tests/defaults.test.ts now compares the two lists, because four instances of one
499
499
  // omission is a missing check, not four mistakes.
500
- geoPointDest: p.geoPointDest,
501
- maxMapPoints: p.maxMapPoints,
500
+ geoPointDest: p2.geoPointDest,
501
+ maxMapPoints: p2.maxMapPoints,
502
502
  // FIFTH AND SIXTH OCCURRENCES, and the two that argue hardest for the guard test: both
503
503
  // were passed by the visual AND read by the charts, and neither was ever declared here or
504
504
  // in the contract - so the contract-vs-whitelist check could not see them either. What
@@ -506,41 +506,41 @@ function resolveOptions(p) {
506
506
  // 0 is MEANINGFUL for both ("let the chart choose", "no paging"), so numberOr rather than
507
507
  // `|| DEFAULT`, which would turn an explicit 0 into something else. Clamping stays
508
508
  // chart-side for the same reason it does for flipIntervalMs.
509
- geoPointRadiusPx: Math.max(0, numberOr(p.geoPointRadiusPx, 0)),
510
- pageSize: Math.max(0, numberOr(p.pageSize, 0)),
511
- uiState: p.uiState,
512
- setUiState: p.setUiState,
513
- backgroundColor: p.backgroundColor,
514
- themeBg: p.themeBg,
515
- themeFg: p.themeFg,
516
- isHighContrast: p.isHighContrast,
517
- themeAccent: p.themeAccent,
518
- cultureCode: p.cultureCode,
519
- allowTooltips: p.allowTooltips,
520
- noDataText: p.noDataText,
521
- onSelect: p.onSelect,
509
+ geoPointRadiusPx: Math.max(0, numberOr(p2.geoPointRadiusPx, 0)),
510
+ pageSize: Math.max(0, numberOr(p2.pageSize, 0)),
511
+ uiState: p2.uiState,
512
+ setUiState: p2.setUiState,
513
+ backgroundColor: p2.backgroundColor,
514
+ themeBg: p2.themeBg,
515
+ themeFg: p2.themeFg,
516
+ isHighContrast: p2.isHighContrast,
517
+ themeAccent: p2.themeAccent,
518
+ cultureCode: p2.cultureCode,
519
+ allowTooltips: p2.allowTooltips,
520
+ noDataText: p2.noDataText,
521
+ onSelect: p2.onSelect,
522
522
  // ---- live-restyle knobs: `raw || undefined` / `.toString() || undefined` ----
523
- colorScaleLow: p.colorScaleLow || void 0,
524
- colorScaleHigh: p.colorScaleHigh || void 0,
523
+ colorScaleLow: p2.colorScaleLow || void 0,
524
+ colorScaleHigh: p2.colorScaleHigh || void 0,
525
525
  // "" (global, the default), "frame", or "self"; anything else fails open to global.
526
- colorScaleScope: p.colorScaleScope === "frame" || p.colorScaleScope === "self" ? p.colorScaleScope : "",
526
+ colorScaleScope: p2.colorScaleScope === "frame" || p2.colorScaleScope === "self" ? p2.colorScaleScope : "",
527
527
  // Math.max(50, Math.min(100, Number(raw) || 95)) — only meaningful under "self".
528
- colorScaleSelfClampPct: clamp(Number(p.colorScaleSelfClampPct) || COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT, COLOR_SCALE_SELF_CLAMP_PCT_MIN, COLOR_SCALE_SELF_CLAMP_PCT_MAX),
528
+ colorScaleSelfClampPct: clamp(Number(p2.colorScaleSelfClampPct) || COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT, COLOR_SCALE_SELF_CLAMP_PCT_MIN, COLOR_SCALE_SELF_CLAMP_PCT_MAX),
529
529
  // Map fills: `raw || undefined` like the colour-scale endpoints. The no-data ->
530
530
  // land cascade is left to the chart (so the fallback chain is visible in the
531
531
  // generated code); HC substitution has already happened in the caller.
532
- geoLandColor: p.geoLandColor || void 0,
533
- geoNoDataColor: p.geoNoDataColor || void 0,
534
- aggregation: (p.aggregation == null ? "" : String(p.aggregation)) || void 0,
532
+ geoLandColor: p2.geoLandColor || void 0,
533
+ geoNoDataColor: p2.geoNoDataColor || void 0,
534
+ aggregation: (p2.aggregation == null ? "" : String(p2.aggregation)) || void 0,
535
535
  // A recognised value wins, anything else falls to the default: an unknown string must
536
536
  // never reach a chart as a live mode. Both of these are read on EVERY render, so a
537
537
  // reader can change their mind about a cached chart without regenerating it.
538
538
  approximatePositions: (() => {
539
- const v3 = (p.approximatePositions == null ? "" : String(p.approximatePositions)).toLowerCase();
539
+ const v3 = (p2.approximatePositions == null ? "" : String(p2.approximatePositions)).toLowerCase();
540
540
  return v3 === "mark" || v3 === "aggregate" || v3 === "skip" ? v3 : APPROXIMATE_POSITIONS_DEFAULT;
541
541
  })(),
542
542
  valueAxisBaseline: (() => {
543
- const v3 = (p.valueAxisBaseline == null ? "" : String(p.valueAxisBaseline)).toLowerCase();
543
+ const v3 = (p2.valueAxisBaseline == null ? "" : String(p2.valueAxisBaseline)).toLowerCase();
544
544
  return v3 === "zero" || v3 === "fit" || v3 === "auto" ? v3 : VALUE_AXIS_BASELINE_DEFAULT;
545
545
  })(),
546
546
  // Same shape, and the same reason for it: an unrecognised string must never reach a chart
@@ -548,25 +548,25 @@ function resolveOptions(p) {
548
548
  // the setting that makes the chart PROVE the grid before it names a period, so a garbled
549
549
  // value withdraws the claim rather than asserting one.
550
550
  seasonalMarkers: (() => {
551
- const v3 = (p.seasonalMarkers == null ? "" : String(p.seasonalMarkers)).toLowerCase();
551
+ const v3 = (p2.seasonalMarkers == null ? "" : String(p2.seasonalMarkers)).toLowerCase();
552
552
  return v3 === "auto" || v3 === "always" || v3 === "never" ? v3 : SEASONAL_MARKERS_DEFAULT;
553
553
  })(),
554
554
  // ---- animation: booleans, default+clamp numerics, "" default enum ----
555
- animAutoPlay: !!p.animAutoPlay,
555
+ animAutoPlay: !!p2.animAutoPlay,
556
556
  // Math.max(250, Math.min(5000, Number(raw) || 1000))
557
- animPlaySpeedMs: clamp(Number(p.animPlaySpeedMs) || ANIM_PLAY_SPEED_DEFAULT, ANIM_PLAY_SPEED_MIN, ANIM_PLAY_SPEED_MAX),
557
+ animPlaySpeedMs: clamp(Number(p2.animPlaySpeedMs) || ANIM_PLAY_SPEED_DEFAULT, ANIM_PLAY_SPEED_MIN, ANIM_PLAY_SPEED_MAX),
558
558
  // Loop-restart delay (seconds on the overview between auto-play passes).
559
559
  // Floored at 0, deliberately NO upper clamp (huge = play once per viewing),
560
560
  // and 0 must survive as 0 — hence numberOr, not `|| DEFAULT`. This field was
561
561
  // MISSING from the resolve list when the assembly moved here, so callers
562
562
  // that passed it saw it dropped: the scrubber read undefined -> 0 -> every
563
563
  // pass restarted instantly and resumed-state auto-play lost its pacing.
564
- animLoopDelaySec: Math.max(ANIM_LOOP_DELAY_MIN, numberOr(p.animLoopDelaySec, ANIM_LOOP_DELAY_DEFAULT)),
564
+ animLoopDelaySec: Math.max(ANIM_LOOP_DELAY_MIN, numberOr(p2.animLoopDelaySec, ANIM_LOOP_DELAY_DEFAULT)),
565
565
  // Math.max(3, Math.min(500, Number(raw) || 60))
566
- animMaxIdealFrames: clamp(Number(p.animMaxIdealFrames) || ANIM_MAX_IDEAL_FRAMES_DEFAULT, ANIM_MAX_IDEAL_FRAMES_MIN, ANIM_MAX_IDEAL_FRAMES_MAX),
567
- animStopAtEnd: !!p.animStopAtEnd,
568
- filtersDuringPlay: !!p.filtersDuringPlay,
569
- animTimelineStyle: (p.animTimelineStyle || "").toString(),
566
+ animMaxIdealFrames: clamp(Number(p2.animMaxIdealFrames) || ANIM_MAX_IDEAL_FRAMES_DEFAULT, ANIM_MAX_IDEAL_FRAMES_MIN, ANIM_MAX_IDEAL_FRAMES_MAX),
567
+ animStopAtEnd: !!p2.animStopAtEnd,
568
+ filtersDuringPlay: !!p2.filtersDuringPlay,
569
+ animTimelineStyle: (p2.animTimelineStyle || "").toString(),
570
570
  // ---- card deck ----
571
571
  // SECOND OCCURRENCE OF THE animLoopDelaySec BUG, six lines above (2026-08-13). The
572
572
  // visual passed both of these, the generated code read both correctly, and this
@@ -579,7 +579,7 @@ function resolveOptions(p) {
579
579
  // flipSync DEFAULTS TRUE, so it cannot use `!!p.flipSync` — that would read a missing
580
580
  // value as "independent" and hand every deck twelve control strips. Absent means
581
581
  // synced; only an explicit false switches it.
582
- flipSync: p.flipSync === void 0 || p.flipSync === null ? true : !!p.flipSync,
582
+ flipSync: p2.flipSync === void 0 || p2.flipSync === null ? true : !!p2.flipSync,
583
583
  // WHERE the controls live, which is a different question from whether the cards move
584
584
  // together (2026-08-13: "the ability to flip individual cards shouldn't necessarily
585
585
  // stop being able to flip all together too"). Resolution order matters and is the whole
@@ -592,22 +592,22 @@ function resolveOptions(p) {
592
592
  // because a newer client shipped, and "both" would have done exactly that to every deck
593
593
  // already in a report.
594
594
  flipMode: (() => {
595
- const m = (p.flipMode == null ? "" : String(p.flipMode)).toLowerCase();
595
+ const m = (p2.flipMode == null ? "" : String(p2.flipMode)).toLowerCase();
596
596
  if (m === "single" || m === "all" || m === "both") return m;
597
- if (p.flipSync === false) return "single";
598
- if (p.flipSync === true) return "all";
597
+ if (p2.flipSync === false) return "single";
598
+ if (p2.flipSync === true) return "all";
599
599
  return FLIP_MODE_DEFAULT;
600
600
  })(),
601
601
  // 0 is MEANINGFUL here (manual only) and is the default, so numberOr — not
602
602
  // `|| DEFAULT` — for the same reason animLoopDelaySec uses it. Clamping stays
603
603
  // chart-side: the archetype already clamps 500..120000 and two clamps in two
604
604
  // repositories is how they end up disagreeing.
605
- flipIntervalMs: Math.max(0, numberOr(p.flipIntervalMs, 0)),
605
+ flipIntervalMs: Math.max(0, numberOr(p2.flipIntervalMs, 0)),
606
606
  // `raw || undefined`, the same idiom as the colour-scale endpoints and the map fills:
607
607
  // blank must arrive as ABSENT, not as an empty string, because the chart's fallback is
608
608
  // `options.cardBackgroundColor || <its own choice>` and "" would satisfy a truthiness
609
609
  // test in some hands while painting nothing in others.
610
- cardBackgroundColor: p.cardBackgroundColor || void 0
610
+ cardBackgroundColor: p2.cardBackgroundColor || void 0
611
611
  };
612
612
  }
613
613
 
@@ -630,7 +630,7 @@ function worldBasemap(world) {
630
630
  if (!_worldBase) {
631
631
  _worldBase = {
632
632
  type: "FeatureCollection",
633
- features: world.features.filter((f) => f?.geometry && f.geometry.type !== "Point")
633
+ features: world.features.filter((f2) => f2?.geometry && f2.geometry.type !== "Point")
634
634
  };
635
635
  }
636
636
  return _worldBase;
@@ -639,7 +639,7 @@ function northAmerica(world) {
639
639
  if (!_na) {
640
640
  _na = {
641
641
  type: "FeatureCollection",
642
- features: world.features.filter((f) => NA_ISO3.has(f?.id) && f?.geometry && f.geometry.type !== "Point").map((f) => clipFeatureToLat(f, NA_LAT_MAX)).filter((f) => f !== null)
642
+ features: world.features.filter((f2) => NA_ISO3.has(f2?.id) && f2?.geometry && f2.geometry.type !== "Point").map((f2) => clipFeatureToLat(f2, NA_LAT_MAX)).filter((f2) => f2 !== null)
643
643
  };
644
644
  }
645
645
  return _na;
@@ -729,21 +729,21 @@ function j() {
729
729
  } catch {
730
730
  continue;
731
731
  }
732
- for (let [i, r] of N) {
732
+ for (let [i2, r] of N) {
733
733
  let a4;
734
734
  try {
735
- a4 = o.of(i);
735
+ a4 = o.of(i2);
736
736
  } catch {
737
737
  a4 = void 0;
738
738
  }
739
- if (!a4 || a4 === i) continue;
739
+ if (!a4 || a4 === i2) continue;
740
740
  let s2 = u(a4);
741
741
  s2 && !n.has(s2) && n.set(s2, r);
742
742
  }
743
743
  }
744
744
  for (let [t, o] of Object.entries(Q)) {
745
- let i = u(t);
746
- i && n.set(i, o);
745
+ let i2 = u(t);
746
+ i2 && n.set(i2, o);
747
747
  }
748
748
  return b = n, n;
749
749
  }
@@ -778,20 +778,20 @@ var t3 = { US: "washington", CA: "ottawa", MX: "mexico city", GB: "london", FR:
778
778
  var U = null;
779
779
  function y() {
780
780
  if (U) return U;
781
- let n = /* @__PURE__ */ new Map(), e = P, t = (o, i, r) => {
781
+ let n = /* @__PURE__ */ new Map(), e = P, t = (o, i2, r) => {
782
782
  if (!o) return;
783
783
  let a4 = n.get(o);
784
- a4 ? a4.some((s2) => s2.row === i) || a4.push({ row: i, primary: r }) : n.set(o, [{ row: i, primary: r }]);
784
+ a4 ? a4.some((s2) => s2.row === i2) || a4.push({ row: i2, primary: r }) : n.set(o, [{ row: i2, primary: r }]);
785
785
  };
786
786
  for (let o of e.split(",")) {
787
- let i = o.split("|");
788
- if (i.length < 7) continue;
789
- let r = { a1: i[1], cc: i[2], lon: +i[3], lat: +i[4], pop: +i[5], kinds: i[6] || "N" };
790
- i.length > 8 && i[8] && (r.tags = i[8].split(";").filter(Boolean));
787
+ let i2 = o.split("|");
788
+ if (i2.length < 7) continue;
789
+ let r = { a1: i2[1], cc: i2[2], lon: +i2[3], lat: +i2[4], pop: +i2[5], kinds: i2[6] || "N" };
790
+ i2.length > 8 && i2[8] && (r.tags = i2[8].split(";").filter(Boolean));
791
791
  let a4 = t3[r.cc];
792
- 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 s2 of i[7].split(";")) t(u(s2), r, false);
792
+ if (a4 && u(i2[0]) === a4 && (r.tags || (r.tags = []), r.tags.includes("capital") || r.tags.push("capital")), t(u(i2[0]), r, true), i2.length > 7 && i2[7]) for (let s2 of i2[7].split(";")) t(u(s2), r, false);
793
793
  }
794
- for (let o of n.values()) o.sort((i, r) => r.row.pop - i.row.pop);
794
+ for (let o of n.values()) o.sort((i2, r) => r.row.pop - i2.row.pop);
795
795
  return U = n, n;
796
796
  }
797
797
  var e3 = 200;
@@ -802,17 +802,17 @@ function i3() {
802
802
  for (let [e, t] of y()) {
803
803
  if (!e.endsWith(" city")) continue;
804
804
  let o = e.slice(0, -5);
805
- !o || y().get(o)?.some((i) => i.primary) || t[0].row.pop < e3 || n.set(o, t);
805
+ !o || y().get(o)?.some((i2) => i2.primary) || t[0].row.pop < e3 || n.set(o, t);
806
806
  }
807
807
  return L = n, n;
808
808
  }
809
809
  function O(n) {
810
810
  if (!n) return;
811
811
  let e = y().get(n);
812
- if (e?.some((i) => i.primary)) return e;
812
+ if (e?.some((i2) => i2.primary)) return e;
813
813
  let t = i3().get(n);
814
814
  if (!t) return e;
815
- let o = t.map((i) => ({ row: i.row, primary: true }));
815
+ let o = t.map((i2) => ({ row: i2.row, primary: true }));
816
816
  return e ? [...o, ...e] : o;
817
817
  }
818
818
  var I = null;
@@ -825,10 +825,10 @@ function o3() {
825
825
  }
826
826
  let e = /* @__PURE__ */ new Map();
827
827
  for (let t of y().values()) for (let o of t) {
828
- let i = T(o.row.cc);
829
- if (!i) continue;
830
- let r = e.get(i);
831
- (r === void 0 || o.row.pop > r) && (e.set(i, o.row.pop), n.set(i, { lon: o.row.lon, lat: o.row.lat }));
828
+ let i2 = T(o.row.cc);
829
+ if (!i2) continue;
830
+ let r = e.get(i2);
831
+ (r === void 0 || o.row.pop > r) && (e.set(i2, o.row.pop), n.set(i2, { lon: o.row.lon, lat: o.row.lat }));
832
832
  }
833
833
  return I = n, n;
834
834
  }
@@ -841,8 +841,8 @@ function D() {
841
841
  if (t.length < 5) continue;
842
842
  let o = { key: t[0], cc: t[1], name: t[2], lon: +t[3], lat: +t[4] };
843
843
  n.set(u(o.key), o);
844
- let i = u(o.name);
845
- i === "mexico" && o.cc === "MX" ? (n.set("estado de mexico", o), n.set("edomex", o)) : n.set(i, o);
844
+ let i2 = u(o.name);
845
+ i2 === "mexico" && o.cc === "MX" ? (n.set("estado de mexico", o), n.set("edomex", o)) : n.set(i2, o);
846
846
  }
847
847
  return B = n, n;
848
848
  }
@@ -898,30 +898,30 @@ function A3(n) {
898
898
  if (isFinite(a4) && isFinite(s2) && a4 >= -90 && a4 <= 90 && s2 >= -180 && s2 <= 180) if (a4 === 0 && s2 === 0) e = { lat: 0, lon: 0, precision: "latlon" };
899
899
  else return { lat: a4, lon: s2, precision: "latlon" };
900
900
  }
901
- let i = E(n.country), r = Y(n.state);
902
- if (r && i && c3(r) !== i && (r = null), n.city !== void 0 && n.city !== null) {
903
- let a4 = u(String(n.city)), s2 = O(a4), f = s2 ? F(s2, n.mapKind) : null;
904
- if (f && f.length) {
901
+ let i2 = E(n.country), r = Y(n.state);
902
+ if (r && i2 && c3(r) !== i2 && (r = null), n.city !== void 0 && n.city !== null) {
903
+ let a4 = u(String(n.city)), s2 = O(a4), f2 = s2 ? F(s2, n.mapKind) : null;
904
+ if (f2 && f2.length) {
905
905
  let d = n.state === void 0 || n.state === null ? "" : String(n.state).trim(), R = d ? u(d) : "", g3 = d ? Y(d) : null, S = [], m = -1;
906
- for (let c2 of f) {
906
+ for (let c2 of f2) {
907
907
  let l2 = c2.row, A = 0;
908
908
  if (d && l2.a1 !== "") if (g3 && l2.a1 === g3 || u(l2.a1) === R) A++;
909
909
  else continue;
910
- if (i) if (T(l2.cc) === i) A++;
910
+ if (i2) if (T(l2.cc) === i2) A++;
911
911
  else continue;
912
912
  A > m ? (m = A, S = [c2]) : A === m && S.push(c2);
913
913
  }
914
914
  S.some((c2) => c2.primary) && (S = S.filter((c2) => c2.primary));
915
- let p = /* @__PURE__ */ new Map();
916
- for (let c2 of S) p.set(c2.row.lon.toFixed(2) + "," + c2.row.lat.toFixed(2), c2.row);
917
- if (p.size === 1) {
915
+ let p2 = /* @__PURE__ */ new Map();
916
+ for (let c2 of S) p2.set(c2.row.lon.toFixed(2) + "," + c2.row.lat.toFixed(2), c2.row);
917
+ if (p2.size === 1) {
918
918
  let c2 = S[0].row;
919
919
  return { lat: c2.lat, lon: c2.lon, precision: "city" };
920
920
  }
921
- if (p.size > 1) return { ambiguous: true, matches: p.size };
921
+ if (p2.size > 1) return { ambiguous: true, matches: p2.size };
922
922
  }
923
923
  }
924
- if (!i || r3.has(i)) for (let a4 of Z(n.zip)) {
924
+ if (!i2 || r3.has(i2)) for (let a4 of Z(n.zip)) {
925
925
  let s2 = a3().get(a4);
926
926
  if (s2) return { lat: s2.lat, lon: s2.lon, precision: "zip3" };
927
927
  }
@@ -929,8 +929,8 @@ function A3(n) {
929
929
  let a4 = D().get(u(r));
930
930
  if (a4) return { lat: a4.lat, lon: a4.lon, precision: "state" };
931
931
  }
932
- if (i && (n.mapKind !== "north-america" || s3.has(i))) {
933
- let a4 = o3().get(i);
932
+ if (i2 && (n.mapKind !== "north-america" || s3.has(i2))) {
933
+ let a4 = o3().get(i2);
934
934
  if (a4) return { lat: a4.lat, lon: a4.lon, precision: "country" };
935
935
  }
936
936
  return e;
@@ -938,26 +938,26 @@ function A3(n) {
938
938
  var G = { latlon: 0, city: 1, zip3: 2, state: 3, country: 4 };
939
939
  var x = 8;
940
940
  function y3(n, e) {
941
- let t = new Array(n.length), o = new Array(n.length), i = new Array(n.length), r = /* @__PURE__ */ new Set(), a4 = [], s2 = /* @__PURE__ */ new Set(), f = [], d = /* @__PURE__ */ new Set(), R = [], g3 = { latlon: 0, city: 0, zip3: 0, state: 0, country: 0 }, S = 0, m = 0, p = null;
941
+ let t = new Array(n.length), o = new Array(n.length), i2 = new Array(n.length), r = /* @__PURE__ */ new Set(), a4 = [], s2 = /* @__PURE__ */ new Set(), f2 = [], d = /* @__PURE__ */ new Set(), R = [], g3 = { latlon: 0, city: 0, zip3: 0, state: 0, country: 0 }, S = 0, m = 0, p2 = null;
942
942
  for (let l2 = 0; l2 < n.length; ++l2) {
943
943
  let A = n[l2], C2 = A3({ ...A, mapKind: e });
944
944
  if (S3(C2)) {
945
- t[l2] = null, o[l2] = null, i[l2] = null, m++;
945
+ t[l2] = null, o[l2] = null, i2[l2] = null, m++;
946
946
  let M = K(A);
947
947
  M && !d.has(M.toLowerCase()) && (d.add(M.toLowerCase()), R.length < x && R.push(M));
948
948
  } else if (C2) {
949
- if (t[l2] = C2.lat, o[l2] = C2.lon, i[l2] = C2.precision, S++, g3[C2.precision]++, (p === null || G[C2.precision] > G[p]) && (p = C2.precision), G[C2.precision] > G.city) {
949
+ if (t[l2] = C2.lat, o[l2] = C2.lon, i2[l2] = C2.precision, S++, g3[C2.precision]++, (p2 === null || G[C2.precision] > G[p2]) && (p2 = C2.precision), G[C2.precision] > G.city) {
950
950
  let M = K(A);
951
- M && !s2.has(M.toLowerCase()) && (s2.add(M.toLowerCase()), f.length < x && f.push(M));
951
+ M && !s2.has(M.toLowerCase()) && (s2.add(M.toLowerCase()), f2.length < x && f2.push(M));
952
952
  }
953
953
  } else {
954
- t[l2] = null, o[l2] = null, i[l2] = null;
954
+ t[l2] = null, o[l2] = null, i2[l2] = null;
955
955
  let M = K(A);
956
956
  M && !r.has(M.toLowerCase()) && (r.add(M.toLowerCase()), a4.push(M));
957
957
  }
958
958
  }
959
959
  let c2 = !n3() && n.some((l2) => l2.city !== null && l2.city !== void 0 && String(l2.city).trim() !== "");
960
- return { lat: t, lon: o, precisions: i, precision: p, precisionCounts: g3, coarseExamples: f, unmatched: a4, ambiguousRows: m, ambiguousExamples: R, matchedRows: S, totalRows: n.length, ...c2 ? { cityTableMissing: true } : {} };
960
+ return { lat: t, lon: o, precisions: i2, precision: p2, precisionCounts: g3, coarseExamples: f2, unmatched: a4, ambiguousRows: m, ambiguousExamples: R, matchedRows: S, totalRows: n.length, ...c2 ? { cityTableMissing: true } : {} };
961
961
  }
962
962
  function K(n) {
963
963
  let e = [n.city, n.state, n.zip, n.country].filter((t) => t != null && String(t).trim() !== "").map((t) => String(t).trim()).join(", ");
@@ -969,13 +969,27 @@ function p3(n, e) {
969
969
  return t ? F(t, e).length > 0 : false;
970
970
  }
971
971
 
972
- // ../shape-core/dist/chunk-GLLNTEEM.mjs
972
+ // ../shape-core/dist/chunk-6NQENOVB.mjs
973
973
  /*! @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. */
974
974
  function s(t) {
975
975
  return t ? t.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_\-./]+/g, " ").toLowerCase().split(/\s+/).filter((n) => n.length > 0) : [];
976
976
  }
977
+ function p(t) {
978
+ let n = Date.parse(t);
979
+ if (isNaN(n)) return null;
980
+ let e = new Date(n);
981
+ if (F2.test(t) || i.test(t.trim()) || l.test(t)) return e;
982
+ let r = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds())), o = e.getFullYear();
983
+ return o >= 0 && o < 100 && r.setUTCFullYear(o), r;
984
+ }
985
+ function u2(t) {
986
+ 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;
987
+ }
988
+ var F2 = /^\s*\d{4}(-\d{2}(-\d{2})?)?\s*$/;
989
+ var i = /(?:Z|[+-]\d{2}:?\d{2})$/i;
990
+ var l = /\b(?:GMT|UTC)\b/i;
977
991
 
978
- // ../shape-core/dist/chunk-KNCUJNVB.mjs
992
+ // ../shape-core/dist/chunk-RC567DAC.mjs
979
993
  /*! @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. */
980
994
  var St = "006007008009010011012013014015016017018019020021022023024025026027028029030031032033034035036037038039040041042043044045046047048049050051052053054056057058059060061062063064065066067068069070071072073074075076077078079080081082083084085086087088089100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191193194195196197198199200201202203204205206207208209210211212214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310312313314315316317318319320321322323324325326327328329330331333334335336337338339341342344346347349350351352354355356357358359360361362363364365366367368369370371372373374376377378379380381382383384385386387388389390391392393394395396397398400401402403404405406407408409410411412413414415416417418420421422423424425426427430431432433434435436437438439440441442443444445446447448449450451452453454455456457458460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508510511512513514515516520521522523524525526527528530531532534535537538539540541542543544545546547548549550551553554556557558559560561562563564565566567570571572573574575576577580581582583584585586587588590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620622623624625626627628629630631633634635636637638639640641644645646647648650651652653654655656657658660661662664665666667668669670671672673674675676677678679680681683684685686687688689690691692693700701703704705706707708710711712713714716717718719720721722723724725726727728729730731734735736737738739740741743744745746747748749750751752753754755756757758759760761762763764765766767768769770772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816820821822823824825826827828829830831832833834835836837838840841843844845846847850851852853855856857859860863864865870871873874875877878879880881882883884890891893894895897898900902903904905906907908910911912913914915916917918919920921922923924925926927928930931932933934935936937939940941943944945946947948949950951952953954955956957958959960961967968969970971972973974975976977978979980981982983984985986988989990991992993994995996997998999";
981
995
  var w = new Set(St.match(/.{3}/g) ?? []);
@@ -984,11 +998,11 @@ var ct = new Set(at.map((n) => n[0]));
984
998
  var yt = { "Ala.": "AL", "Alab.": "AL", "Ariz.": "AZ", "Ark.": "AR", "Calif.": "CA", "Cal.": "CA", "Colo.": "CO", "Col.": "CO", "Conn.": "CT", "Del.": "DE", "Fla.": "FL", "Flor.": "FL", "Ga.": "GA", "Ill.": "IL", "Ind.": "IN", "Kan.": "KS", "Kans.": "KS", "Ky.": "KY", "La.": "LA", "Md.": "MD", "Mass.": "MA", "Mich.": "MI", "Minn.": "MN", "Miss.": "MS", "Mo.": "MO", "Mont.": "MT", "Neb.": "NE", "Nebr.": "NE", "Nev.": "NV", "N.H.": "NH", "N.J.": "NJ", "N.M.": "NM", "N.Mex.": "NM", "N. Mex.": "NM", "N.Y.": "NY", "N.C.": "NC", "N.D.": "ND", "N.Dak.": "ND", "N. Dak.": "ND", "Okla.": "OK", "Ore.": "OR", "Oreg.": "OR", "Pa.": "PA", "Penn.": "PA", "Penna.": "PA", "R.I.": "RI", "S.C.": "SC", "S.D.": "SD", "S.Dak.": "SD", "S. Dak.": "SD", "Tenn.": "TN", "Tex.": "TX", "Vt.": "VT", "Va.": "VA", "Wash.": "WA", "W.Va.": "WV", "W. Va.": "WV", "Wis.": "WI", "Wisc.": "WI", "Wyo.": "WY", "D.C.": "DC", "Wash. D.C.": "DC", "Wash., D.C.": "DC", "P.R.": "PR", "V.I.": "VI" };
985
999
  var ut = (() => {
986
1000
  let n = /* @__PURE__ */ new Map();
987
- for (let [s2, i] of at) n.set(g(i), s2);
1001
+ for (let [s2, i2] of at) n.set(g(i2), s2);
988
1002
  n.set(g("Washington DC"), "DC"), n.set(g("Washington D.C."), "DC"), n.set(g("US Virgin Islands"), "VI");
989
- for (let [s2, i] of Object.entries(yt)) {
1003
+ for (let [s2, i2] of Object.entries(yt)) {
990
1004
  let r = g(s2);
991
- r && !n.has(r) && n.set(r, i);
1005
+ r && !n.has(r) && n.set(r, i2);
992
1006
  }
993
1007
  return n;
994
1008
  })();
@@ -1002,27 +1016,27 @@ function g(n) {
1002
1016
  var rt = /* @__PURE__ */ new Set(["zip", "zipcode", "postal", "postcode", "plz"]);
1003
1017
  function y2(n, s2) {
1004
1018
  if (!n) return false;
1005
- for (let i of s(n)) if (s2.has(i)) return true;
1019
+ for (let i2 of s(n)) if (s2.has(i2)) return true;
1006
1020
  return false;
1007
1021
  }
1008
1022
  function Mt(n, s2) {
1009
1023
  if (n == null) return null;
1010
- let i = String(n).trim();
1011
- if (i.length === 0) return null;
1024
+ let i2 = String(n).trim();
1025
+ if (i2.length === 0) return null;
1012
1026
  switch (s2) {
1013
1027
  case "country-iso3":
1014
1028
  case "country-iso2":
1015
1029
  case "country-name":
1016
- return E(i);
1030
+ return E(i2);
1017
1031
  case "us-state-code":
1018
1032
  case "us-state-name": {
1019
- let r = ft(i);
1020
- return ct.has(r) ? r : ut.get(g(i)) ?? null;
1033
+ let r = ft(i2);
1034
+ return ct.has(r) ? r : ut.get(g(i2)) ?? null;
1021
1035
  }
1022
1036
  case "us-zip5":
1023
- return M3(i);
1037
+ return M3(i2);
1024
1038
  case "us-county-fips":
1025
- return /^\d{5}$/.test(i) && lt.has(i.slice(0, 2)) ? i : null;
1039
+ return /^\d{5}$/.test(i2) && lt.has(i2.slice(0, 2)) ? i2 : null;
1026
1040
  default:
1027
1041
  return null;
1028
1042
  }
@@ -1045,95 +1059,95 @@ function It(n, s2) {
1045
1059
  return s2 === "us-zip5" ? w.has(n.slice(0, 3)) : true;
1046
1060
  }
1047
1061
  function Wt(n, s2) {
1048
- let i = new Array(n.length), r = /* @__PURE__ */ new Set(), M = [], h2 = 0;
1062
+ let i2 = new Array(n.length), r = /* @__PURE__ */ new Set(), M = [], h2 = 0;
1049
1063
  for (let N2 = 0; N2 < n.length; ++N2) {
1050
1064
  let I2 = Mt(n[N2], s2), O2 = I2 !== null && It(I2, s2) ? I2 : null;
1051
- if (i[N2] = O2, O2 !== null) h2++;
1065
+ if (i2[N2] = O2, O2 !== null) h2++;
1052
1066
  else {
1053
1067
  let d = n[N2];
1054
1068
  if (d != null) {
1055
- let p = String(d).trim();
1056
- if (p.length > 0) {
1057
- let m = p.toLowerCase();
1058
- r.has(m) || (r.add(m), M.push(p));
1069
+ let p2 = String(d).trim();
1070
+ if (p2.length > 0) {
1071
+ let m = p2.toLowerCase();
1072
+ r.has(m) || (r.add(m), M.push(p2));
1059
1073
  }
1060
1074
  }
1061
1075
  }
1062
1076
  }
1063
- return { iso: i, unmatched: M, matchedRows: h2, totalRows: n.length };
1077
+ return { iso: i2, unmatched: M, matchedRows: h2, totalRows: n.length };
1064
1078
  }
1065
1079
 
1066
- // ../shape-core/dist/chunk-RBHJL2XA.mjs
1080
+ // ../shape-core/dist/chunk-6W2GOB6U.mjs
1067
1081
  var import_papaparse = __toESM(require_papaparse_min(), 1);
1068
1082
  /*! @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. */
1069
- var bt = { "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" };
1083
+ var yt2 = { "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" };
1070
1084
  var j2 = (() => {
1071
1085
  let n = /* @__PURE__ */ new Map();
1072
- for (let t of Object.keys(bt)) for (let e of bt[t].split(/\s+/)) e && n.set(e, t);
1086
+ for (let t of Object.keys(yt2)) for (let e of yt2[t].split(/\s+/)) e && n.set(e, t);
1073
1087
  return n;
1074
1088
  })();
1075
- function Lt(n) {
1089
+ function Pt(n) {
1076
1090
  for (let [t, e] of n) {
1077
1091
  let r = j2.get(t);
1078
1092
  r && !j2.has(e) && j2.set(e, r);
1079
1093
  }
1080
1094
  }
1081
- Lt(N);
1082
- var Pt = ["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"];
1083
- var Gt2 = ["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"];
1084
- var Wt2 = ["latitude", "longitude"];
1095
+ Pt(N);
1096
+ var Gt2 = ["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"];
1097
+ var Wt2 = ["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"];
1085
1098
  var Ft = ["latitude", "longitude"];
1086
- var St2 = /^\s*(sum|count|count\s+distinct|distinct\s+count)\s+of\s+/i;
1087
- var Vt = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1088
- var kt = new RegExp("\\b(" + Pt.join("|") + ")\\b|(" + Gt2.join("|") + ")$", "i");
1089
- var Ut = new RegExp("\\b(" + Wt2.join("|") + ")\\b|(" + Ft.join("|") + ")$", "i");
1090
- function Ct(n) {
1091
- return n ? String(n).replace(St2, "").trim() : "";
1092
- }
1093
- function Bt(n) {
1094
- return !!n && St2.test(String(n));
1095
- }
1096
- var zt = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
1097
- var _t = new RegExp("^\\s*(" + [...zt].sort((n, t) => t.length - n.length).map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
1099
+ var Vt = ["latitude", "longitude"];
1100
+ var Ct = /^\s*(sum|count|count\s+distinct|distinct\s+count)\s+of\s+/i;
1101
+ var kt = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1102
+ var Bt = new RegExp("\\b(" + Gt2.join("|") + ")\\b|(" + Wt2.join("|") + ")$", "i");
1103
+ var zt = new RegExp("\\b(" + Ft.join("|") + ")\\b|(" + Vt.join("|") + ")$", "i");
1104
+ function Mt2(n) {
1105
+ return n ? String(n).replace(Ct, "").trim() : "";
1106
+ }
1107
+ function Ut(n) {
1108
+ return !!n && Ct.test(String(n));
1109
+ }
1110
+ var Kt = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
1111
+ var St2 = new RegExp("^\\s*(" + [...Kt].sort((n, t) => t.length - n.length).map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
1098
1112
  function Ht(n) {
1099
- let t = Ct(n);
1100
- return t.length === 0 ? "" : t.replace(Vt, " ");
1113
+ let t = Mt2(n);
1114
+ return t.length === 0 ? "" : t.replace(kt, " ");
1101
1115
  }
1102
- function At(n, t) {
1116
+ function Tt(n, t) {
1103
1117
  if (!t) return false;
1104
- let e = Ct(t);
1118
+ let e = Mt2(t);
1105
1119
  return n.test(Ht(t)) || n.test(e) || n.test(s(e).join(" "));
1106
1120
  }
1107
- function Tt(n) {
1108
- return At(Ut, n);
1121
+ function Nt(n) {
1122
+ return Tt(zt, n);
1109
1123
  }
1110
- function Kt(n) {
1111
- return At(kt, n) || Tt(n);
1112
- }
1113
- var Nt = /int|double|decimal|single|float|number|currency|money/i;
1114
1124
  function Yt(n) {
1115
- let t = String(n?.valueNature ?? "").trim().toLowerCase();
1116
- return t === "categorical" ? "Categorical" : t === "ordinal" ? "Ordinal" : t === "continuous" || n?.isMeasure === true || Nt.test(String(n?.dataType ?? "")) ? "Continuous" : "Categorical";
1125
+ return Tt(Bt, n) || Nt(n);
1117
1126
  }
1127
+ var Rt = /int|double|decimal|single|float|number|currency|money/i;
1118
1128
  function Zt(n) {
1119
- return n?.isMeasure === true || Nt.test(String(n?.dataType ?? ""));
1129
+ let t = String(n?.valueNature ?? "").trim().toLowerCase();
1130
+ return t === "categorical" ? "Categorical" : t === "ordinal" ? "Ordinal" : t === "continuous" || n?.isMeasure === true || Rt.test(String(n?.dataType ?? "")) ? "Continuous" : "Categorical";
1131
+ }
1132
+ function Xt(n) {
1133
+ return n?.isMeasure === true || Rt.test(String(n?.dataType ?? ""));
1120
1134
  }
1121
- function Rt(n) {
1122
- let t = n ?? {}, e = Yt(t);
1135
+ function vt(n) {
1136
+ let t = n ?? {}, e = Zt(t);
1123
1137
  if (e !== "Continuous") return { nature: e, additivity: "unknown", basis: "role", suppressed: false };
1124
- if (Tt(t.name)) return { nature: e, additivity: "positional", basis: "name", suppressed: true };
1138
+ if (Nt(t.name)) return { nature: e, additivity: "positional", basis: "name", suppressed: true };
1125
1139
  let r = String(t.additivity ?? "").trim().toLowerCase();
1126
- if (!(r === "additive" && Bt(t.name))) {
1140
+ if (!(r === "additive" && Ut(t.name))) {
1127
1141
  if (r === "additive") return { nature: e, additivity: "additive", basis: "measured", suppressed: false };
1128
1142
  if (r === "part_of_whole") return { nature: e, additivity: "part_of_whole", basis: "measured", suppressed: false };
1129
1143
  if (r === "intensive_rate") return { nature: e, additivity: "intensive_rate", basis: "measured", suppressed: false };
1130
1144
  }
1131
- return t.discourageAggregationAcrossGroups === true ? { nature: e, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : Kt(t.name) ? { nature: e, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: e, additivity: "additive", basis: "default", suppressed: false };
1145
+ return t.discourageAggregationAcrossGroups === true ? { nature: e, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : Yt(t.name) ? { nature: e, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: e, additivity: "additive", basis: "default", suppressed: false };
1132
1146
  }
1133
- function vt(n) {
1134
- let t = Rt(n), e = n ?? {};
1147
+ function It2(n) {
1148
+ let t = vt(n), e = n ?? {};
1135
1149
  if (t.nature === "Categorical") return ["first", "distinctcount", "count"];
1136
- if (t.nature === "Ordinal") return Zt(e) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1150
+ if (t.nature === "Ordinal") return Xt(e) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1137
1151
  switch (t.additivity) {
1138
1152
  case "positional":
1139
1153
  return ["min", "max", "count", "distinctcount", "first"];
@@ -1143,13 +1157,13 @@ function vt(n) {
1143
1157
  return ["sum", "average", "median", "min", "max", "count", "distinctcount", "first"];
1144
1158
  }
1145
1159
  }
1146
- function Ce(n) {
1147
- return vt(n)[0];
1160
+ function Me(n) {
1161
+ return It2(n)[0];
1148
1162
  }
1149
- function Ae(n, t) {
1163
+ function Te(n, t) {
1150
1164
  if (t !== "sum" && t !== "count") return false;
1151
1165
  if (t === "count") return true;
1152
- let e = Rt(n);
1166
+ let e = vt(n);
1153
1167
  return e.additivity === "additive" || e.additivity === "part_of_whole" || e.additivity === "unknown";
1154
1168
  }
1155
1169
 
@@ -1161,113 +1175,113 @@ function G2(r) {
1161
1175
  return !!E(r);
1162
1176
  }
1163
1177
  function C(r) {
1164
- let e = /* @__PURE__ */ new Set();
1165
- for (let n of r) {
1166
- if (n == null) continue;
1167
- let s2 = u(String(n));
1168
- if (!V(s2) && !e.has(s2) && (e.add(s2), e.size >= U2)) break;
1178
+ let n = /* @__PURE__ */ new Set();
1179
+ for (let e of r) {
1180
+ if (e == null) continue;
1181
+ let s2 = u(String(e));
1182
+ if (!V(s2) && !n.has(s2) && (n.add(s2), n.size >= U2)) break;
1169
1183
  }
1170
- return Array.from(e);
1184
+ return Array.from(n);
1171
1185
  }
1172
1186
  function P2(r) {
1173
- let e = C(r);
1174
- if (e.length === 0 || $2(r) < 95) return false;
1175
- let n = e.filter((c2) => G2(c2) && !Y(c2)).length, s2 = e.filter((c2) => !G2(c2) && !!Y(c2)).length;
1176
- return n >= 1 && n >= s2;
1187
+ let n = C(r);
1188
+ if (n.length === 0 || $2(r) < 95) return false;
1189
+ let e = n.filter((c2) => G2(c2) && !Y(c2)).length, s2 = n.filter((c2) => !G2(c2) && !!Y(c2)).length;
1190
+ return e >= 1 && e >= s2;
1177
1191
  }
1178
- function q2(r, e) {
1192
+ function q2(r, n) {
1179
1193
  if (!Y(r)) return false;
1180
- let n = E(r);
1181
- return n ? e === "world" ? true : s3.has(n) : false;
1194
+ let e = E(r);
1195
+ return e ? n === "world" ? true : s3.has(e) : false;
1182
1196
  }
1183
1197
  function $2(r) {
1184
- let e = C(r);
1185
- if (e.length === 0) return 0;
1186
- let n = 0;
1187
- for (let s2 of e) G2(s2) && n++;
1188
- return Math.round(n / e.length * 1e3) / 10;
1198
+ let n = C(r);
1199
+ if (n.length === 0) return 0;
1200
+ let e = 0;
1201
+ for (let s2 of n) G2(s2) && e++;
1202
+ return Math.round(e / n.length * 1e3) / 10;
1189
1203
  }
1190
1204
  function v2(r) {
1191
- let e = C(r);
1192
- if (e.length === 0) return 0;
1193
- let n = 0;
1194
- for (let s2 of e) Y(s2) && n++;
1195
- return Math.round(n / e.length * 1e3) / 10;
1205
+ let n = C(r);
1206
+ if (n.length === 0) return 0;
1207
+ let e = 0;
1208
+ for (let s2 of n) Y(s2) && e++;
1209
+ return Math.round(e / n.length * 1e3) / 10;
1196
1210
  }
1197
- function F2(r) {
1198
- let e = /* @__PURE__ */ new Set();
1199
- for (let n of r) {
1200
- if (n == null) continue;
1201
- let s2 = String(n).trim();
1202
- if (!V(u(s2)) && !e.has(s2) && (e.add(s2), e.size >= U2)) break;
1211
+ function F3(r) {
1212
+ let n = /* @__PURE__ */ new Set();
1213
+ for (let e of r) {
1214
+ if (e == null) continue;
1215
+ let s2 = String(e).trim();
1216
+ if (!V(u(s2)) && !n.has(s2) && (n.add(s2), n.size >= U2)) break;
1203
1217
  }
1204
- return Array.from(e);
1218
+ return Array.from(n);
1205
1219
  }
1206
1220
  function D2(r) {
1207
- let e = F2(r);
1208
- if (e.length === 0) return 0;
1209
- let n = 0;
1210
- for (let s2 of e) Z(s2).length > 0 && n++;
1211
- return Math.round(n / e.length * 1e3) / 10;
1221
+ let n = F3(r);
1222
+ if (n.length === 0) return 0;
1223
+ let e = 0;
1224
+ for (let s2 of n) Z(s2).length > 0 && e++;
1225
+ return Math.round(e / n.length * 1e3) / 10;
1212
1226
  }
1213
- function Z2(r, e) {
1214
- return y2(e, rt) ? true : F2(r).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
1227
+ function Z2(r, n) {
1228
+ return y2(n, rt) ? true : F3(r).some((e) => /^\d{5}(-\d{4})?$/.test(e.replace(/\.0+$/, "")));
1215
1229
  }
1216
- function tn(r, e) {
1217
- let n = C(r);
1218
- if (n.length === 0) return 0;
1230
+ function ne(r, n) {
1231
+ let e = C(r);
1232
+ if (e.length === 0) return 0;
1219
1233
  let s2 = 0;
1220
- for (let c2 of n) p3(c2, e) && s2++;
1221
- return Math.round(s2 / n.length * 1e3) / 10;
1234
+ for (let c2 of e) p3(c2, n) && s2++;
1235
+ return Math.round(s2 / e.length * 1e3) / 10;
1222
1236
  }
1223
- function z2(r, e) {
1224
- let n = 0;
1225
- for (let s2 of C(r)) e(s2) && n++;
1226
- return n;
1237
+ function z2(r, n) {
1238
+ let e = 0;
1239
+ for (let s2 of C(r)) n(s2) && e++;
1240
+ return e;
1227
1241
  }
1228
- function nn(r, e) {
1229
- let n = 0;
1230
- for (let s2 of F2(r)) e(s2) && n++;
1231
- return n;
1242
+ function oe(r, n) {
1243
+ let e = 0;
1244
+ for (let s2 of F3(r)) n(s2) && e++;
1245
+ return e;
1232
1246
  }
1233
- function en(r, e, n, s2, c2) {
1234
- let A = [], u2 = [], o = {}, M = {}, _2 = new Set(r), l2 = (t) => e.map((i) => i[t]);
1247
+ function ie(r, n, e, s2, c2) {
1248
+ let A = [], u4 = [], o = {}, M = {}, _2 = new Set(r), l2 = (t) => n.map((i2) => i2[t]);
1235
1249
  for (let t of ["city", "country"]) {
1236
- let i = n?.[t];
1237
- i && _2.has(i) && (o[t] = i);
1250
+ let i2 = e?.[t];
1251
+ i2 && _2.has(i2) && (o[t] = i2);
1238
1252
  }
1239
1253
  let X2 = new Set(c2 ?? r);
1240
1254
  for (let t of ["lat", "lon"]) {
1241
- let i = n?.[t];
1242
- i && X2.has(i) && (o[t] = i);
1255
+ let i2 = e?.[t];
1256
+ i2 && X2.has(i2) && (o[t] = i2);
1243
1257
  }
1244
- let g3 = n?.zip;
1258
+ let g3 = e?.zip;
1245
1259
  if (g3 && _2.has(g3)) {
1246
- let t = l2(g3), i = D2(t);
1247
- i < 95 ? u2.push(`zip=${g3} (only ${i}% of values read as ZIPs)`) : Z2(t, g3) ? o.zip = g3 : u2.push(`zip=${g3} (all values are 3-4 digits with nothing to say they are postal)`);
1260
+ let t = l2(g3), i2 = D2(t);
1261
+ i2 < 95 ? u4.push(`zip=${g3} (only ${i2}% of values read as ZIPs)`) : Z2(t, g3) ? o.zip = g3 : u4.push(`zip=${g3} (all values are 3-4 digits with nothing to say they are postal)`);
1248
1262
  }
1249
- let p = n?.state;
1250
- if (p && _2.has(p)) {
1251
- let t = l2(p), i = C(t);
1252
- i.length > 0 && i.every((a4) => q2(a4, s2)) ? u2.push(`state=${p} (every value is "CA", which is both Canada and California)`) : P2(t) ? (u2.push(`state=${p} (every value is a country, not a state)`), o.country || (o.country = p)) : v2(t) < 95 ? u2.push(`state=${p} (only ${v2(t)}% of values are states/provinces)`) : o.state = p;
1263
+ let p2 = e?.state;
1264
+ if (p2 && _2.has(p2)) {
1265
+ let t = l2(p2), i2 = C(t);
1266
+ i2.length > 0 && i2.every((a4) => q2(a4, s2)) ? 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)) : v2(t) < 95 ? u4.push(`state=${p2} (only ${v2(t)}% of values are states/provinces)`) : o.state = p2;
1253
1267
  }
1254
1268
  let d = new Set(Object.values(o).filter(Boolean)), x2 = r.filter((t) => !d.has(t) && !t.startsWith("__"));
1255
1269
  if (!o.state) {
1256
1270
  let t = null;
1257
- for (let i of x2) {
1258
- let a4 = l2(i);
1271
+ for (let i2 of x2) {
1272
+ let a4 = l2(i2);
1259
1273
  if (P2(a4)) continue;
1260
- let f = v2(a4);
1261
- if (f < 95) continue;
1274
+ let f2 = v2(a4);
1275
+ if (f2 < 95) continue;
1262
1276
  let N2 = z2(a4, (S) => !!Y(S)), Y2 = z2(a4, (S) => !!Y(S) && !q2(S, s2));
1263
- N2 < E2 && Y2 < 1 || (!t || f > t.pct) && (t = { name: i, pct: f });
1277
+ N2 < E2 && Y2 < 1 || (!t || f2 > t.pct) && (t = { name: i2, pct: f2 });
1264
1278
  }
1265
1279
  t && (o.state = t.name, d.add(t.name), A.push(`state=${t.name} (${t.pct}% states/provinces)`));
1266
1280
  }
1267
1281
  if (!o.zip) for (let t of x2) {
1268
1282
  if (d.has(t)) continue;
1269
- let i = l2(t), a4 = D2(i);
1270
- if (!(a4 < 95) && Z2(i, t) && !(nn(i, (f) => Z(f).length > 0) < E2)) {
1283
+ let i2 = l2(t), a4 = D2(i2);
1284
+ if (!(a4 < 95) && Z2(i2, t) && !(oe(i2, (f2) => Z(f2).length > 0) < E2)) {
1271
1285
  o.zip = t, d.add(t), A.push(`zip=${t} (${a4}% ZIP codes)`);
1272
1286
  break;
1273
1287
  }
@@ -1275,27 +1289,27 @@ function en(r, e, n, s2, c2) {
1275
1289
  let h2 = o.country;
1276
1290
  if (!h2 || !P2(l2(h2))) {
1277
1291
  let t = null;
1278
- for (let i of x2) {
1279
- if (d.has(i) || !P2(l2(i))) continue;
1280
- let a4 = $2(l2(i));
1281
- (!t || a4 > t.pct) && (t = { name: i, pct: a4 });
1292
+ for (let i2 of x2) {
1293
+ if (d.has(i2) || !P2(l2(i2))) continue;
1294
+ let a4 = $2(l2(i2));
1295
+ (!t || a4 > t.pct) && (t = { name: i2, pct: a4 });
1282
1296
  }
1283
- t && (h2 && (u2.push(`country=${h2} (only ${$2(l2(h2))}% of values are country identifiers; using ${t.name} instead)`), M.country = h2), o.country = t.name, d.add(t.name), A.push(`country=${t.name}`));
1297
+ t && (h2 && (u4.push(`country=${h2} (only ${$2(l2(h2))}% of values are country identifiers; using ${t.name} instead)`), M.country = h2), o.country = t.name, d.add(t.name), A.push(`country=${t.name}`));
1284
1298
  }
1285
1299
  if (!o.city) {
1286
1300
  let t = null;
1287
- for (let i of x2) {
1288
- if (d.has(i)) continue;
1289
- let a4 = l2(i), f = tn(a4, s2);
1290
- f < m3 || z2(a4, (N2) => p3(N2, s2)) < E2 || (!t || f > t.pct) && (t = { name: i, pct: f });
1301
+ for (let i2 of x2) {
1302
+ if (d.has(i2)) continue;
1303
+ let a4 = l2(i2), f2 = ne(a4, s2);
1304
+ f2 < m3 || z2(a4, (N2) => p3(N2, s2)) < E2 || (!t || f2 > t.pct) && (t = { name: i2, pct: f2 });
1291
1305
  }
1292
1306
  t && (o.city = t.name, A.push(`city=${t.name} (${t.pct}% known cities)`));
1293
1307
  }
1294
- let B2 = o.country ? l2(o.country) : [], k2 = !!o.country && P2(B2), j3 = k2 ? new Set(B2.map((t) => E(t == null ? null : String(t))).filter(Boolean)).size : 0, K2 = k2 && j3 >= 2, L2 = !!(o.lat && o.lon) && e.some((t) => {
1295
- let i = +String(t[o.lat] ?? "").trim(), a4 = +String(t[o.lon] ?? "").trim();
1296
- return isFinite(i) && isFinite(a4) && i >= -90 && i <= 90 && a4 >= -180 && a4 <= 180 && String(t[o.lat] ?? "").trim() !== "" && String(t[o.lon] ?? "").trim() !== "";
1308
+ let B2 = o.country ? l2(o.country) : [], k2 = !!o.country && P2(B2), j3 = k2 ? new Set(B2.map((t) => E(t == null ? null : String(t))).filter(Boolean)).size : 0, K2 = k2 && j3 >= 2, L2 = !!(o.lat && o.lon) && n.some((t) => {
1309
+ let i2 = +String(t[o.lat] ?? "").trim(), a4 = +String(t[o.lon] ?? "").trim();
1310
+ return isFinite(i2) && isFinite(a4) && i2 >= -90 && i2 <= 90 && a4 >= -180 && a4 <= 180 && String(t[o.lat] ?? "").trim() !== "" && String(t[o.lon] ?? "").trim() !== "";
1297
1311
  });
1298
- return o.lat && o.lon && !L2 && u2.push(`lat/lon=${o.lat}/${o.lon} (no row holds a usable coordinate pair)`), o.country && !K2 && !(o.city || o.state || o.zip || L2) && u2.push(k2 ? `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 || L2) ? o : null, backfilled: A, refused: u2, ...Object.keys(M).length ? { labelFallback: M } : {} };
1312
+ return o.lat && o.lon && !L2 && u4.push(`lat/lon=${o.lat}/${o.lon} (no row holds a usable coordinate pair)`), o.country && !K2 && !(o.city || o.state || o.zip || L2) && u4.push(k2 ? `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 || L2) ? o : null, backfilled: A, refused: u4, ...Object.keys(M).length ? { labelFallback: M } : {} };
1299
1313
  }
1300
1314
 
1301
1315
  // src/payload.ts
@@ -1310,7 +1324,7 @@ function resolvePointChannel(cols, rowObjs, point) {
1310
1324
  let labelCol;
1311
1325
  if (bind) {
1312
1326
  const dims = cols.filter((c2) => !c2.isMeasure).map((c2) => c2.name);
1313
- const res = en(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
1327
+ const res = ie(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
1314
1328
  bind = res.bind;
1315
1329
  rolesBackfilled = res.backfilled;
1316
1330
  rolesRefused = res.refused;
@@ -1319,14 +1333,14 @@ function resolvePointChannel(cols, rowObjs, point) {
1319
1333
  }
1320
1334
  const hasPointBind = !!bind && !!(bind.city || bind.state || bind.zip || bind.country || bind.lat && bind.lon);
1321
1335
  if (hasPointBind) {
1322
- const p = bind;
1336
+ const p2 = bind;
1323
1337
  const built = y3(rowObjs.map((r) => ({
1324
- lat: p.lat ? r[p.lat] : null,
1325
- lon: p.lon ? r[p.lon] : null,
1326
- city: p.city ? r[p.city] : null,
1327
- state: p.state ? r[p.state] : null,
1328
- zip: p.zip ? r[p.zip] : null,
1329
- country: p.country ? r[p.country] : null,
1338
+ lat: p2.lat ? r[p2.lat] : null,
1339
+ lon: p2.lon ? r[p2.lon] : null,
1340
+ city: p2.city ? r[p2.city] : null,
1341
+ state: p2.state ? r[p2.state] : null,
1342
+ zip: p2.zip ? r[p2.zip] : null,
1343
+ country: p2.country ? r[p2.country] : null,
1330
1344
  label: labelCol ? r[labelCol] : null
1331
1345
  })), point?.mapKind);
1332
1346
  pLat = built.lat;
@@ -1448,8 +1462,8 @@ function createMarkResolver(env) {
1448
1462
  };
1449
1463
  const isInvisibleStrokePath = (el) => {
1450
1464
  if (el.tagName.toLowerCase() !== "path") return false;
1451
- const f = el.getAttribute("fill");
1452
- if (f !== null && f !== "" && f !== "none" && f !== "transparent") return false;
1465
+ const f2 = el.getAttribute("fill");
1466
+ if (f2 !== null && f2 !== "" && f2 !== "none" && f2 !== "transparent") return false;
1453
1467
  const s2 = (el.getAttribute("stroke") || "").trim().toLowerCase();
1454
1468
  const so = parseFloat(el.getAttribute("stroke-opacity") || "1");
1455
1469
  return s2 === "transparent" || s2 === "none" || so <= 0.01;
@@ -1461,8 +1475,8 @@ function createMarkResolver(env) {
1461
1475
  if (!m) return Number.MAX_VALUE;
1462
1476
  let best = Number.MAX_VALUE;
1463
1477
  const N2 = 64;
1464
- for (let i = 0; i <= N2; i++) {
1465
- const pt = el.getPointAtLength(L2 * i / N2);
1478
+ for (let i2 = 0; i2 <= N2; i2++) {
1479
+ const pt = el.getPointAtLength(L2 * i2 / N2);
1466
1480
  const dx = m.a * pt.x + m.c * pt.y + m.e - x2;
1467
1481
  const dy = m.b * pt.x + m.d * pt.y + m.f - y4;
1468
1482
  const d = dx * dx + dy * dy;
@@ -1561,8 +1575,8 @@ function createMarkResolver(env) {
1561
1575
  for (const n of all) {
1562
1576
  const tag = (n.tagName || "").toLowerCase();
1563
1577
  if (!SHAPE.test(tag)) continue;
1564
- const pe = viewStyle(n);
1565
- if (pe && pe !== "none") return true;
1578
+ const pe2 = viewStyle(n);
1579
+ if (pe2 && pe2 !== "none") return true;
1566
1580
  }
1567
1581
  return false;
1568
1582
  };
@@ -1682,12 +1696,12 @@ function censusMarks(container) {
1682
1696
  return EMPTY;
1683
1697
  }
1684
1698
  }
1685
- function isBlankRender(i) {
1686
- if (i.contractUntagged) return false;
1687
- if (i.animated) return false;
1688
- if (i.authoredNoDataText) return false;
1689
- if (!(i.rows > 0)) return false;
1690
- return i.markCount === 0;
1699
+ function isBlankRender(i2) {
1700
+ if (i2.contractUntagged) return false;
1701
+ if (i2.animated) return false;
1702
+ if (i2.authoredNoDataText) return false;
1703
+ if (!(i2.rows > 0)) return false;
1704
+ return i2.markCount === 0;
1691
1705
  }
1692
1706
  function blankRenderFlag(lang, cause) {
1693
1707
  const clean = (s2) => String(s2 || "unknown").toLowerCase().replace(/[^a-z0-9-]+/g, "-");
@@ -1720,8 +1734,8 @@ function attrOrComputed(el, name, cs) {
1720
1734
  return c2 === null || c2 === void 0 ? "" : String(c2).trim();
1721
1735
  }
1722
1736
  function isUnfilled(fill) {
1723
- const f = fill.toLowerCase();
1724
- return f === "none" || f === "transparent" || f === "rgba(0, 0, 0, 0)" || f === "rgba(0,0,0,0)";
1737
+ const f2 = fill.toLowerCase();
1738
+ return f2 === "none" || f2 === "transparent" || f2 === "rgba(0, 0, 0, 0)" || f2 === "rgba(0,0,0,0)";
1725
1739
  }
1726
1740
  function widthPx(raw) {
1727
1741
  const m = /^(-?\d+(?:\.\d+)?)\s*(px)?$/i.exec(raw);
@@ -1890,8 +1904,8 @@ function svgInkReach(svg) {
1890
1904
  if (!(box.width > 0) || !(box.height > 0)) return null;
1891
1905
  const els = svg.querySelectorAll(FIT_CONTENT_SELECTOR);
1892
1906
  let right = -Infinity, bottom = -Infinity, seen = 0;
1893
- for (let i = 0; i < els.length && seen < FIT_WALK_CAP; i++) {
1894
- const r = els[i].getBoundingClientRect();
1907
+ for (let i2 = 0; i2 < els.length && seen < FIT_WALK_CAP; i2++) {
1908
+ const r = els[i2].getBoundingClientRect();
1895
1909
  if (r.width <= 0 && r.height <= 0) continue;
1896
1910
  if (isPhantomBox(r.width, r.height, box.width, box.height)) continue;
1897
1911
  seen++;
@@ -1909,8 +1923,8 @@ function measureContainerBoxes(c2, inkOf) {
1909
1923
  if (!c2 || !c2.children) return boxes;
1910
1924
  const view = c2.ownerDocument && c2.ownerDocument.defaultView || globalThis;
1911
1925
  const cRect = c2.getBoundingClientRect();
1912
- for (let i = 0; i < c2.children.length; i++) {
1913
- const el = c2.children[i];
1926
+ for (let i2 = 0; i2 < c2.children.length; i2++) {
1927
+ const el = c2.children[i2];
1914
1928
  let floating = false;
1915
1929
  try {
1916
1930
  const cs = view.getComputedStyle(el);
@@ -1994,8 +2008,8 @@ function textHidden(t, view) {
1994
2008
  function backdropFill(svg, container, view, svgBox) {
1995
2009
  try {
1996
2010
  const rects = svg.querySelectorAll("rect");
1997
- for (let i = 0; i < rects.length && i < 6; i++) {
1998
- const r = rects[i];
2011
+ for (let i2 = 0; i2 < rects.length && i2 < 6; i2++) {
2012
+ const r = rects[i2];
1999
2013
  if (r.closest(".d3-mark")) continue;
2000
2014
  const b2 = r.getBoundingClientRect();
2001
2015
  if (b2.width >= svgBox.width * 0.9 && b2.height >= svgBox.height * 0.9) {
@@ -2036,7 +2050,7 @@ function cloneWithChain(el, svg, root) {
2036
2050
  }
2037
2051
  parent.appendChild(el.cloneNode(true));
2038
2052
  const ids = root.querySelectorAll("[id]");
2039
- for (let i = 0; i < ids.length; i++) ids[i].removeAttribute("id");
2053
+ for (let i2 = 0; i2 < ids.length; i2++) ids[i2].removeAttribute("id");
2040
2054
  }
2041
2055
  function pinScrolledAxis(container, svg) {
2042
2056
  unpinScrolledAxis(container);
@@ -2054,14 +2068,14 @@ function pinScrolledAxis(container, svg) {
2054
2068
  const rel = (r) => ({ left: r.left - svgBox.left, top: r.top - svgBox.top, right: r.right - svgBox.left, bottom: r.bottom - svgBox.top });
2055
2069
  const ticks = svg.querySelectorAll(".tick");
2056
2070
  const byAxis = /* @__PURE__ */ new Map();
2057
- for (let i = 0; i < ticks.length; i++) {
2058
- const t = ticks[i];
2071
+ for (let i2 = 0; i2 < ticks.length; i2++) {
2072
+ const t = ticks[i2];
2059
2073
  if (t.closest("svg") !== svg) continue;
2060
- const p = t.parentElement;
2061
- if (!p) continue;
2062
- const list = byAxis.get(p);
2074
+ const p2 = t.parentElement;
2075
+ if (!p2) continue;
2076
+ const list = byAxis.get(p2);
2063
2077
  if (list) list.push(t);
2064
- else byAxis.set(p, [t]);
2078
+ else byAxis.set(p2, [t]);
2065
2079
  }
2066
2080
  const axes = [];
2067
2081
  const cands = [];
@@ -2075,8 +2089,8 @@ function pinScrolledAxis(container, svg) {
2075
2089
  labels.push(rel(r));
2076
2090
  }
2077
2091
  const tracks = [];
2078
- for (let i = 0; i < axis2.children.length; i++) {
2079
- const ch = axis2.children[i];
2092
+ for (let i2 = 0; i2 < axis2.children.length; i2++) {
2093
+ const ch = axis2.children[i2];
2080
2094
  if (ch.tagName.toLowerCase() !== "path" || !(ch.getAttribute("class") || "").split(/\s+/).includes("domain")) continue;
2081
2095
  const r = ch.getBoundingClientRect();
2082
2096
  if (r.width > 0 && r.height <= 4) tracks.push(rel(r));
@@ -2092,8 +2106,8 @@ function pinScrolledAxis(container, svg) {
2092
2106
  if (!(bandPx > 0)) return noPin("unmeasurable");
2093
2107
  const carried = [];
2094
2108
  const texts = svg.querySelectorAll("text");
2095
- for (let i = 0; i < texts.length && carried.length < AXIS_PIN_MAX_CARRIED; i++) {
2096
- const t = texts[i];
2109
+ for (let i2 = 0; i2 < texts.length && carried.length < AXIS_PIN_MAX_CARRIED; i2++) {
2110
+ const t = texts[i2];
2097
2111
  if (t.closest("svg") !== svg) continue;
2098
2112
  if (t.closest(".tick") || t.closest(".d3-mark") || t.closest(".d3-legend-mark")) continue;
2099
2113
  if (axis.contains(t) || textHidden(t, view)) continue;
@@ -2107,7 +2121,7 @@ function pinScrolledAxis(container, svg) {
2107
2121
  if (v3) pinSvg.setAttribute(a4, v3);
2108
2122
  }
2109
2123
  const styles = svg.querySelectorAll("style");
2110
- for (let i = 0; i < styles.length; i++) pinSvg.appendChild(styles[i].cloneNode(true));
2124
+ for (let i2 = 0; i2 < styles.length; i2++) pinSvg.appendChild(styles[i2].cloneNode(true));
2111
2125
  const vbX = (svgBox.left - m.e) / m.a, vbY = (svgBox.top + band.top - m.f) / m.d;
2112
2126
  const vbW = svgBox.width / m.a, vbH = bandPx / m.d;
2113
2127
  pinSvg.setAttribute("viewBox", `${vbX} ${vbY} ${vbW} ${vbH}`);
@@ -2207,8 +2221,8 @@ function fitRenderedChart(container, opts = {}) {
2207
2221
  if (!container) return result;
2208
2222
  try {
2209
2223
  let svg = null;
2210
- for (let i = 0; i < container.children.length && !svg; i++) {
2211
- const el = container.children[i];
2224
+ for (let i2 = 0; i2 < container.children.length && !svg; i2++) {
2225
+ const el = container.children[i2];
2212
2226
  if (el.tagName && el.tagName.toLowerCase() === "svg") svg = el;
2213
2227
  }
2214
2228
  if (!svg) svg = container.querySelector("svg");
@@ -2375,10 +2389,10 @@ function glyphSampleGrid(box, n = GLYPH_SAMPLE_N) {
2375
2389
  const out = [];
2376
2390
  if (!box || !(box.width > 0) || !(box.height > 0) || !(n >= 1)) return out;
2377
2391
  const k2 = Math.floor(n);
2378
- for (let i = 0; i < k2; i++) {
2392
+ for (let i2 = 0; i2 < k2; i2++) {
2379
2393
  for (let j3 = 0; j3 < k2; j3++) {
2380
2394
  out.push({
2381
- x: box.left + box.width * (i + 0.5) / k2,
2395
+ x: box.left + box.width * (i2 + 0.5) / k2,
2382
2396
  y: box.top + box.height * (j3 + 0.5) / k2
2383
2397
  });
2384
2398
  }
@@ -2390,8 +2404,8 @@ function clamp01(v3) {
2390
2404
  return Math.max(0, Math.min(1, v3));
2391
2405
  }
2392
2406
  function hexToRGB(hex) {
2393
- const p = toRGBA(hex);
2394
- return [p[0], p[1], p[2]];
2407
+ const p2 = toRGBA(hex);
2408
+ return [p2[0], p2[1], p2[2]];
2395
2409
  }
2396
2410
 
2397
2411
  // src/labelContrastDom.ts
@@ -2408,11 +2422,11 @@ function backedSamples(el, pts) {
2408
2422
  if (pts.length === 0) return null;
2409
2423
  const inv = m.inverse();
2410
2424
  const hit = [];
2411
- for (let i = 0; i < pts.length; i++) {
2412
- const p = svg.createSVGPoint();
2413
- p.x = pts[i].x;
2414
- p.y = pts[i].y;
2415
- hit.push(ge2.isPointInFill(p.matrixTransform(inv)));
2425
+ for (let i2 = 0; i2 < pts.length; i2++) {
2426
+ const p2 = svg.createSVGPoint();
2427
+ p2.x = pts[i2].x;
2428
+ p2.y = pts[i2].y;
2429
+ hit.push(ge2.isPointInFill(p2.matrixTransform(inv)));
2416
2430
  }
2417
2431
  return hit;
2418
2432
  } catch {
@@ -2454,7 +2468,7 @@ function applyLabelContrast(container, opts = {}) {
2454
2468
  report.skipped = "too-many-shapes";
2455
2469
  return report;
2456
2470
  }
2457
- for (let i = 0; i < shapeEls.length; i++) pushShape(shapeEls[i]);
2471
+ for (let i2 = 0; i2 < shapeEls.length; i2++) pushShape(shapeEls[i2]);
2458
2472
  if (rects.length === 0) {
2459
2473
  report.skipped = "no-shapes";
2460
2474
  return report;
@@ -2491,10 +2505,10 @@ function applyLabelContrast(container, opts = {}) {
2491
2505
  }
2492
2506
  let inside = 0;
2493
2507
  const paints = effAlpha(x2.mk) >= PILL_MIN_ALPHA;
2494
- for (let i = 0; i < mask.length; i++) {
2495
- if (!mask[i]) continue;
2508
+ for (let i2 = 0; i2 < mask.length; i2++) {
2509
+ if (!mask[i2]) continue;
2496
2510
  inside++;
2497
- if (paints) painted[i] = true;
2511
+ if (paints) painted[i2] = true;
2498
2512
  }
2499
2513
  return { mk: x2.mk, ov: glyphArea * (inside / mask.length) };
2500
2514
  }).filter((x2) => x2.ov > 0);
@@ -2502,7 +2516,7 @@ function applyLabelContrast(container, opts = {}) {
2502
2516
  if (under.length === 0) continue;
2503
2517
  if (unmeasured === 0 && pts.length > 0) {
2504
2518
  let held = 0;
2505
- for (let i = 0; i < painted.length; i++) if (painted[i]) held++;
2519
+ for (let i2 = 0; i2 < painted.length; i2++) if (painted[i2]) held++;
2506
2520
  if (!backingHoldsGlyph(glyphArea * (held / pts.length), glyphArea)) {
2507
2521
  report.pageMajority++;
2508
2522
  continue;
@@ -2987,10 +3001,12 @@ export {
2987
3001
  registerGeoAsset,
2988
3002
  clearGeoCache,
2989
3003
  L3,
2990
- Rt,
3004
+ p,
3005
+ u2 as u,
2991
3006
  vt,
2992
- Ce,
2993
- Ae,
3007
+ It2 as It,
3008
+ Me,
3009
+ Te,
2994
3010
  buildRenderPayload,
2995
3011
  createMarkResolver,
2996
3012
  ensureCrossfilterHitTargets,