@bicharts/chart-host 0.6.113 → 0.6.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -5
- package/dist/adapters.mjs +3 -3
- package/dist/card.mjs +2 -2
- package/dist/{chunk-2KLFIGTQ.mjs → chunk-2GW3S5VD.mjs} +130 -16
- package/dist/{chunk-TE54AFRN.mjs → chunk-7K3F3RZ6.mjs} +473 -128
- package/dist/{chunk-7XT5OJ6M.mjs → chunk-AQO4ROMU.mjs} +1 -1
- package/dist/{chunk-IL5M7K6Z.mjs → chunk-CVTCR7HQ.mjs} +2 -2
- package/dist/{chunk-GTJG3SMD.mjs → chunk-DILJDN6C.mjs} +1 -1
- package/dist/{chunk-KY4FI2HA.mjs → chunk-GXR7T6G5.mjs} +1 -1
- package/dist/{chunk-KGVNZR23.mjs → chunk-PQKLWYKK.mjs} +1 -1
- package/dist/{chunk-PELRAFYZ.mjs → chunk-QLIRQJ6B.mjs} +1 -1
- package/dist/{chunk-FIG5DIW7.mjs → chunk-VPFP35XI.mjs} +72 -72
- package/dist/{chunk-AEO5SFEQ.mjs → chunk-YOCYWON4.mjs} +1 -1
- package/dist/{chunk-OLCUKXKL.mjs → chunk-YSRMSDRP.mjs} +1 -1
- package/dist/dax.mjs +1 -1
- package/dist/index.mjs +43 -9
- package/dist/legend-fit.mjs +3 -3
- package/dist/page.mjs +7 -5
- package/dist/provinces.mjs +1 -1
- package/dist/react.mjs +15 -12
- package/dist/testing.mjs +1 -1
- package/dist/types/contract.d.ts +14 -3
- package/dist/types/filterScope.d.ts +42 -3
- package/dist/types/host.d.ts +9 -5
- package/dist/types/index.d.ts +3 -1
- package/dist/types/keyboardMarks.d.ts +1 -1
- package/dist/types/markFollower.d.ts +21 -0
- package/dist/types/page.d.ts +1 -1
- package/dist/types/react.d.ts +11 -3
- package/dist/types/selectionMarker.d.ts +92 -0
- package/dist/zoom-memory.mjs +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
gestureWasDrag,
|
|
5
5
|
isInsideControl,
|
|
6
6
|
rowIdxsFromMark
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PQKLWYKK.mjs";
|
|
8
8
|
import {
|
|
9
9
|
AXIS_FILTER_CLASS,
|
|
10
10
|
CONTROL_CLASS,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
MARK_CLASS,
|
|
13
13
|
ROW_IDX_ATTR,
|
|
14
14
|
SNAPSHOT_SVG_ATTR
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GXR7T6G5.mjs";
|
|
16
16
|
|
|
17
17
|
// src/lasso.ts
|
|
18
18
|
var LASSO_ROW_CAP = 5e3;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
2
|
import {
|
|
3
3
|
LASSO_KNOB_KEY
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CVTCR7HQ.mjs";
|
|
5
5
|
|
|
6
6
|
// src/controls.ts
|
|
7
7
|
var isKnob = (key) => key !== LASSO_KNOB_KEY;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
2
|
|
|
3
3
|
// src/contract.ts
|
|
4
|
-
var HOST_CONTRACT_VERSION = "1.
|
|
4
|
+
var HOST_CONTRACT_VERSION = "1.24.0";
|
|
5
5
|
var GEO_POINT_PRECISIONS = ["latlon", "city", "zip3", "state", "country"];
|
|
6
6
|
var MARK_CLASS = "d3-mark";
|
|
7
7
|
var LEGEND_MARK_CLASS = "d3-legend-mark";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
2
|
import {
|
|
3
3
|
SNAPSHOT_SVG_ATTR
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GXR7T6G5.mjs";
|
|
5
5
|
|
|
6
6
|
// src/snapshot.ts
|
|
7
7
|
var DEFAULT_TIMEOUT_MS = 2e3;
|
|
@@ -32,20 +32,20 @@ var require_papaparse_min = __commonJS({
|
|
|
32
32
|
let e3 = this._config.newline;
|
|
33
33
|
e3 || (r3 = this._config.quoteChar || '"', e3 = this._handle.guessLineEndings(t, r3)), t = [...t.split(e3).slice(i2)].join(e3);
|
|
34
34
|
}
|
|
35
|
-
this.isFirstChunk &&
|
|
35
|
+
this.isFirstChunk && q4(this._config.beforeFirstChunk) && void 0 !== (r3 = this._config.beforeFirstChunk(t)) && (t = r3), this.isFirstChunk = false, this._halted = false;
|
|
36
36
|
var i2 = this._partialLine + t, r3 = (this._partialLine = "", this._handle.parse(i2, this._baseIndex, !this._finished));
|
|
37
37
|
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
38
38
|
t = r3.meta.cursor, i2 = (this._finished || (this._partialLine = i2.substring(t - this._baseIndex), this._baseIndex = t), r3 && r3.data && (this._rowCount += r3.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview);
|
|
39
39
|
if (a3) n.postMessage({ results: r3, workerId: v2.WORKER_ID, finished: i2 });
|
|
40
|
-
else if (
|
|
40
|
+
else if (q4(this._config.chunk) && !e2) {
|
|
41
41
|
if (this._config.chunk(r3, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = true);
|
|
42
42
|
this._completeResults = r3 = void 0;
|
|
43
43
|
}
|
|
44
|
-
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(r3.data), this._completeResults.errors = this._completeResults.errors.concat(r3.errors), this._completeResults.meta = r3.meta), this._completed || !i2 || !
|
|
44
|
+
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(r3.data), this._completeResults.errors = this._completeResults.errors.concat(r3.errors), this._completeResults.meta = r3.meta), this._completed || !i2 || !q4(this._config.complete) || r3 && r3.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = true), i2 || r3 && r3.meta.paused || this._nextChunk(), r3;
|
|
45
45
|
}
|
|
46
46
|
this._halted = true;
|
|
47
47
|
}, this._sendError = function(e2) {
|
|
48
|
-
|
|
48
|
+
q4(this._config.error) ? this._config.error(e2) : a3 && this._config.error && n.postMessage({ workerId: v2.WORKER_ID, error: e2, finished: false });
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
function f2(e) {
|
|
@@ -141,7 +141,7 @@ var require_papaparse_min = __commonJS({
|
|
|
141
141
|
return !y4(e3);
|
|
142
142
|
})), _4()) {
|
|
143
143
|
let t3 = function(e3, t4) {
|
|
144
|
-
e3 = P2(e3),
|
|
144
|
+
e3 = P2(e3), q4(m3.transformHeader) && (e3 = m3.transformHeader(e3, t4)), c2.push(e3);
|
|
145
145
|
};
|
|
146
146
|
var t2 = t3;
|
|
147
147
|
if (p4) if (Array.isArray(p4.data[0])) {
|
|
@@ -171,10 +171,10 @@ var require_papaparse_min = __commonJS({
|
|
|
171
171
|
e2 = { type: e2, code: t2, message: i3 };
|
|
172
172
|
void 0 !== r4 && (e2.row = r4), p4.errors.push(e2);
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
q4(m3.step) && (t = m3.step, m3.step = function(e2) {
|
|
175
175
|
p4 = e2, _4() ? g6() : (g6(), 0 !== p4.data.length && (r3 += e2.data.length, m3.preview && r3 > m3.preview ? s3.abort() : (p4.data = p4.data[0], t(p4, i2))));
|
|
176
176
|
}), this.parse = function(e2, t2, i3) {
|
|
177
|
-
var r4 = m3.quoteChar || '"', r4 = (m3.newline || (m3.newline = this.guessLineEndings(e2, r4)), a4 = false, m3.delimiter ?
|
|
177
|
+
var r4 = m3.quoteChar || '"', r4 = (m3.newline || (m3.newline = this.guessLineEndings(e2, r4)), a4 = false, m3.delimiter ? q4(m3.delimiter) && (m3.delimiter = m3.delimiter(e2), p4.meta.delimiter = m3.delimiter) : ((r4 = ((e3, t3, i4, r5, n3) => {
|
|
178
178
|
var s4, a5, o4, h5;
|
|
179
179
|
n3 = n3 || [",", " ", "|", ";", v2.RECORD_SEP, v2.UNIT_SEP];
|
|
180
180
|
for (var u5 = 0; u5 < n3.length; u5++) {
|
|
@@ -187,13 +187,13 @@ var require_papaparse_min = __commonJS({
|
|
|
187
187
|
}, this.paused = function() {
|
|
188
188
|
return l3;
|
|
189
189
|
}, this.pause = function() {
|
|
190
|
-
l3 = true, s3.abort(), n2 =
|
|
190
|
+
l3 = true, s3.abort(), n2 = q4(m3.chunk) ? "" : n2.substring(s3.getCharIndex());
|
|
191
191
|
}, this.resume = function() {
|
|
192
192
|
i2.streamer._halted ? (l3 = false, i2.streamer.parseChunk(n2, true)) : setTimeout(i2.resume, 3);
|
|
193
193
|
}, this.aborted = function() {
|
|
194
194
|
return e;
|
|
195
195
|
}, this.abort = function() {
|
|
196
|
-
e = true, s3.abort(), p4.meta.aborted = true,
|
|
196
|
+
e = true, s3.abort(), p4.meta.aborted = true, q4(m3.complete) && m3.complete(p4), n2 = "";
|
|
197
197
|
}, this.guessLineEndings = function(e2, t2) {
|
|
198
198
|
e2 = e2.substring(0, 1048576);
|
|
199
199
|
var t2 = new RegExp(U(t2) + "([^]*?)" + U(t2), "gm"), i3 = (e2 = e2.replace(t2, "")).split("\r"), t2 = e2.split("\n"), e2 = 1 < t2.length && t2[0].length < i3[0].length;
|
|
@@ -212,7 +212,7 @@ var require_papaparse_min = __commonJS({
|
|
|
212
212
|
var z2 = 0, M2 = false;
|
|
213
213
|
this.parse = function(i2, t, r3) {
|
|
214
214
|
if ("string" != typeof i2) throw new Error("Input must be a string");
|
|
215
|
-
var n2 = i2.length, e = S.length, s3 = O2.length, a4 = x3.length, o3 =
|
|
215
|
+
var n2 = i2.length, e = S.length, s3 = O2.length, a4 = x3.length, o3 = q4(I3), h4 = [], u4 = [], d3 = [], f3 = z2 = 0;
|
|
216
216
|
if (!i2) return w4();
|
|
217
217
|
if (T3 || false !== T3 && -1 === i2.indexOf(F4)) {
|
|
218
218
|
for (var l3 = i2.split(O2), c2 = 0; c2 < l3.length; c2++) {
|
|
@@ -276,7 +276,7 @@ var require_papaparse_min = __commonJS({
|
|
|
276
276
|
let n3 = false;
|
|
277
277
|
for (let r4 = 0; r4 < s4.length; r4++) {
|
|
278
278
|
let i3 = P2(s4[r4]);
|
|
279
|
-
if (a5[i3 =
|
|
279
|
+
if (a5[i3 = q4(C3.transformHeader) ? C3.transformHeader(i3, r4) : i3]) {
|
|
280
280
|
let e3, t2 = a5[i3];
|
|
281
281
|
for (; e3 = i3 + "_" + t2, t2++, o4.has(e3); ) ;
|
|
282
282
|
o4.add(e3), s4[r4] = e3, a5[i3]++, n3 = true, (D3 = null === D3 ? {} : D3)[e3] = i3;
|
|
@@ -303,16 +303,16 @@ var require_papaparse_min = __commonJS({
|
|
|
303
303
|
var n2 = { abort: function() {
|
|
304
304
|
r3 = true, _3(t.workerId, { data: [], errors: [], meta: { aborted: true } });
|
|
305
305
|
}, pause: m2, resume: m2 };
|
|
306
|
-
if (
|
|
306
|
+
if (q4(i2.userStep)) {
|
|
307
307
|
for (var s3 = 0; s3 < t.results.data.length && (i2.userStep({ data: t.results.data[s3], errors: t.results.errors, meta: t.results.meta }, n2), !r3); s3++) ;
|
|
308
308
|
delete t.results;
|
|
309
|
-
} else
|
|
309
|
+
} else q4(i2.userChunk) && (i2.userChunk(t.results, n2, t.file), delete t.results);
|
|
310
310
|
}
|
|
311
311
|
t.finished && !r3 && _3(t.workerId, t.results);
|
|
312
312
|
}
|
|
313
313
|
function _3(e, t) {
|
|
314
314
|
var i2 = o2[e];
|
|
315
|
-
|
|
315
|
+
q4(i2.userComplete) && i2.userComplete(t), i2.terminate(), delete o2[e];
|
|
316
316
|
}
|
|
317
317
|
function m2() {
|
|
318
318
|
throw new Error("Not implemented.");
|
|
@@ -328,20 +328,20 @@ var require_papaparse_min = __commonJS({
|
|
|
328
328
|
e.apply(t, arguments);
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function q4(e) {
|
|
332
332
|
return "function" == typeof e;
|
|
333
333
|
}
|
|
334
334
|
return v2.parse = function(e, t) {
|
|
335
335
|
var i2 = (t = t || {}).dynamicTyping || false;
|
|
336
|
-
|
|
337
|
-
if (t.dynamicTyping = i2, t.transform = !!
|
|
336
|
+
q4(i2) && (t.dynamicTypingFunction = i2, i2 = {});
|
|
337
|
+
if (t.dynamicTyping = i2, t.transform = !!q4(t.transform) && t.transform, !t.worker || !v2.WORKERS_SUPPORTED) return i2 = null, v2.NODE_STREAM_INPUT, "string" == typeof e ? (e = P2(e), i2 = new (t.download ? f2 : c)(t)) : true === e.readable && q4(e.read) && q4(e.on) ? i2 = new p3(t) : (n.File && e instanceof File || e instanceof Object) && (i2 = new l2(t)), i2.stream(e);
|
|
338
338
|
(i2 = (() => {
|
|
339
339
|
var e2;
|
|
340
340
|
return !!v2.WORKERS_SUPPORTED && (e2 = (() => {
|
|
341
341
|
var e3 = n.URL || n.webkitURL || null, t2 = r2.toString();
|
|
342
342
|
return v2.BLOB_URL || (v2.BLOB_URL = e3.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" })));
|
|
343
343
|
})(), (e2 = new n.Worker(e2)).onmessage = g5, e2.id = h3++, o2[e2.id] = e2);
|
|
344
|
-
})()).userStep = t.step, i2.userChunk = t.chunk, i2.userComplete = t.complete, i2.userError = t.error, t.step =
|
|
344
|
+
})()).userStep = t.step, i2.userChunk = t.chunk, i2.userComplete = t.complete, i2.userError = t.error, t.step = q4(t.step), t.chunk = q4(t.chunk), t.complete = q4(t.complete), t.error = q4(t.error), delete t.worker, i2.postMessage({ input: e, config: t, workerId: i2.id });
|
|
345
345
|
}, v2.unparse = function(e, t) {
|
|
346
346
|
var s3 = false, _4 = true, m3 = ",", y4 = "\r\n", a4 = '"', o3 = a4 + a4, i2 = false, r3 = null, h4 = false, u4 = ((() => {
|
|
347
347
|
if ("object" == typeof t) {
|
|
@@ -400,20 +400,20 @@ var require_papaparse_min = __commonJS({
|
|
|
400
400
|
for (var t = 0; t < this.files.length; t++) h4.push({ file: this.files[t], inputElem: this, instanceConfig: d2.extend({}, i2) });
|
|
401
401
|
}), e(), this;
|
|
402
402
|
function e() {
|
|
403
|
-
if (0 === h4.length)
|
|
403
|
+
if (0 === h4.length) q4(o3.complete) && o3.complete();
|
|
404
404
|
else {
|
|
405
405
|
var e2, t, i3, r3, n2 = h4[0];
|
|
406
|
-
if (
|
|
406
|
+
if (q4(o3.before)) {
|
|
407
407
|
var s3 = o3.before(n2.file, n2.inputElem);
|
|
408
408
|
if ("object" == typeof s3) {
|
|
409
|
-
if ("abort" === s3.action) return e2 = "AbortError", t = n2.file, i3 = n2.inputElem, r3 = s3.reason, void (
|
|
409
|
+
if ("abort" === s3.action) return e2 = "AbortError", t = n2.file, i3 = n2.inputElem, r3 = s3.reason, void (q4(o3.error) && o3.error({ name: e2 }, t, i3, r3));
|
|
410
410
|
if ("skip" === s3.action) return void u4();
|
|
411
411
|
"object" == typeof s3.config && (n2.instanceConfig = d2.extend(n2.instanceConfig, s3.config));
|
|
412
412
|
} else if ("skip" === s3) return void u4();
|
|
413
413
|
}
|
|
414
414
|
var a4 = n2.instanceConfig.complete;
|
|
415
415
|
n2.instanceConfig.complete = function(e3) {
|
|
416
|
-
|
|
416
|
+
q4(a4) && a4(e3, n2.file, n2.inputElem), u4();
|
|
417
417
|
}, v2.parse(n2.file, n2.instanceConfig);
|
|
418
418
|
}
|
|
419
419
|
}
|
|
@@ -1357,7 +1357,7 @@ var ar = new RegExp([String.raw`\bisMeasure\b`, String.raw`\bdataType\b`, String
|
|
|
1357
1357
|
// ../shape-core/dist/index.mjs
|
|
1358
1358
|
/*! @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. */
|
|
1359
1359
|
var ee = 2;
|
|
1360
|
-
var
|
|
1360
|
+
var ye = 400;
|
|
1361
1361
|
function ne(e) {
|
|
1362
1362
|
return !!I(e);
|
|
1363
1363
|
}
|
|
@@ -1366,7 +1366,7 @@ function F3(e) {
|
|
|
1366
1366
|
for (let n of e) {
|
|
1367
1367
|
if (n == null) continue;
|
|
1368
1368
|
let o2 = g3(String(n));
|
|
1369
|
-
if (!T2(o2) && !t.has(o2) && (t.add(o2), t.size >=
|
|
1369
|
+
if (!T2(o2) && !t.has(o2) && (t.add(o2), t.size >= ye)) break;
|
|
1370
1370
|
}
|
|
1371
1371
|
return Array.from(t);
|
|
1372
1372
|
}
|
|
@@ -1376,7 +1376,7 @@ function N(e) {
|
|
|
1376
1376
|
let n = t.filter((a3) => ne(a3) && !An(a3)).length, o2 = t.filter((a3) => !ne(a3) && !!An(a3)).length;
|
|
1377
1377
|
return n >= 1 && n >= o2;
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1379
|
+
function pe(e, t) {
|
|
1380
1380
|
if (!An(e)) return false;
|
|
1381
1381
|
let n = I(e);
|
|
1382
1382
|
return n ? t === "world" ? true : bn.has(n) : false;
|
|
@@ -1391,7 +1391,7 @@ function re(e) {
|
|
|
1391
1391
|
function oe2(e) {
|
|
1392
1392
|
return An(e) ? true : W2() ? z(e).status !== "unmatched" || z(e.trim().replace(/\s+/g, "-")).status !== "unmatched" : false;
|
|
1393
1393
|
}
|
|
1394
|
-
function
|
|
1394
|
+
function H3(e) {
|
|
1395
1395
|
let t = F3(e);
|
|
1396
1396
|
if (t.length === 0) return 0;
|
|
1397
1397
|
let n = 0;
|
|
@@ -1403,7 +1403,7 @@ function se(e) {
|
|
|
1403
1403
|
for (let n of e) {
|
|
1404
1404
|
if (n == null) continue;
|
|
1405
1405
|
let o2 = String(n).trim();
|
|
1406
|
-
if (!T2(g3(o2)) && !t.has(o2) && (t.add(o2), t.size >=
|
|
1406
|
+
if (!T2(g3(o2)) && !t.has(o2) && (t.add(o2), t.size >= ye)) break;
|
|
1407
1407
|
}
|
|
1408
1408
|
return Array.from(t);
|
|
1409
1409
|
}
|
|
@@ -1414,10 +1414,10 @@ function ie(e) {
|
|
|
1414
1414
|
for (let o2 of t) Gn(o2).length > 0 && n++;
|
|
1415
1415
|
return Math.round(n / t.length * 1e3) / 10;
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function ge(e, t) {
|
|
1418
1418
|
return y2(t, fn) ? true : se(e).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function wr(e, t) {
|
|
1421
1421
|
let n = F3(e);
|
|
1422
1422
|
if (n.length === 0) return 0;
|
|
1423
1423
|
let o2 = 0;
|
|
@@ -1429,86 +1429,86 @@ function te(e, t) {
|
|
|
1429
1429
|
for (let o2 of F3(e)) t(o2) && n++;
|
|
1430
1430
|
return n;
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function _r(e, t) {
|
|
1433
1433
|
let n = 0;
|
|
1434
1434
|
for (let o2 of se(e)) t(o2) && n++;
|
|
1435
1435
|
return n;
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1438
|
-
let u3 = [], l2 = [], i = {},
|
|
1437
|
+
function Or(e, t, n, o2, a3) {
|
|
1438
|
+
let u3 = [], l2 = [], i = {}, C3 = {}, y3 = new Set(e), h3 = (s2) => t.map((d2) => d2[s2]);
|
|
1439
1439
|
for (let s2 of ["city", "country"]) {
|
|
1440
1440
|
let d2 = n?.[s2];
|
|
1441
|
-
d2 &&
|
|
1441
|
+
d2 && y3.has(d2) && (i[s2] = d2);
|
|
1442
1442
|
}
|
|
1443
|
-
let
|
|
1443
|
+
let f2 = new Set(a3 ?? e);
|
|
1444
1444
|
for (let s2 of ["lat", "lon"]) {
|
|
1445
1445
|
let d2 = n?.[s2];
|
|
1446
|
-
d2 &&
|
|
1446
|
+
d2 && f2.has(d2) && (i[s2] = d2);
|
|
1447
1447
|
}
|
|
1448
|
-
let
|
|
1449
|
-
if (
|
|
1450
|
-
let s2 =
|
|
1451
|
-
d2 < 95 ? l2.push(`zip=${
|
|
1448
|
+
let p3 = n?.zip;
|
|
1449
|
+
if (p3 && y3.has(p3)) {
|
|
1450
|
+
let s2 = h3(p3), d2 = ie(s2);
|
|
1451
|
+
d2 < 95 ? l2.push(`zip=${p3} (only ${d2}% of values read as ZIPs)`) : ge(s2, p3) ? i.zip = p3 : l2.push(`zip=${p3} (all values are 3-4 digits with nothing to say they are postal)`);
|
|
1452
1452
|
}
|
|
1453
1453
|
let c = n?.state;
|
|
1454
|
-
if (c &&
|
|
1455
|
-
let s2 =
|
|
1456
|
-
d2.length > 0 && d2.every((S) =>
|
|
1454
|
+
if (c && y3.has(c)) {
|
|
1455
|
+
let s2 = h3(c), d2 = F3(s2);
|
|
1456
|
+
d2.length > 0 && d2.every((S) => pe(S, o2)) ? l2.push(`state=${c} (every value is "CA", which is both Canada and California)`) : N(s2) ? (l2.push(`state=${c} (every value is a country, not a state)`), i.country || (i.country = c)) : H3(s2) < 95 ? l2.push(`state=${c} (only ${H3(s2)}% of values are states/provinces)`) : i.state = c;
|
|
1457
1457
|
}
|
|
1458
|
-
let
|
|
1458
|
+
let g5 = new Set(Object.values(i).filter(Boolean)), b2 = e.filter((s2) => !g5.has(s2) && !s2.startsWith("__"));
|
|
1459
1459
|
if (!i.state) {
|
|
1460
1460
|
let s2 = null;
|
|
1461
|
-
for (let d2 of
|
|
1462
|
-
let S =
|
|
1461
|
+
for (let d2 of b2) {
|
|
1462
|
+
let S = h3(d2);
|
|
1463
1463
|
if (N(S)) continue;
|
|
1464
|
-
let O2 =
|
|
1464
|
+
let O2 = H3(S);
|
|
1465
1465
|
if (O2 < 95) continue;
|
|
1466
|
-
let
|
|
1467
|
-
|
|
1466
|
+
let z2 = te(S, oe2), We2 = te(S, (ce) => oe2(ce) && !pe(ce, o2));
|
|
1467
|
+
z2 < ee && We2 < 1 || (!s2 || O2 > s2.pct) && (s2 = { name: d2, pct: O2 });
|
|
1468
1468
|
}
|
|
1469
|
-
s2 && (i.state = s2.name,
|
|
1469
|
+
s2 && (i.state = s2.name, g5.add(s2.name), u3.push(`state=${s2.name} (${s2.pct}% states/provinces)`));
|
|
1470
1470
|
}
|
|
1471
|
-
if (!i.zip) for (let s2 of
|
|
1472
|
-
if (
|
|
1473
|
-
let d2 =
|
|
1474
|
-
if (!(S < 95) &&
|
|
1475
|
-
i.zip = s2,
|
|
1471
|
+
if (!i.zip) for (let s2 of b2) {
|
|
1472
|
+
if (g5.has(s2)) continue;
|
|
1473
|
+
let d2 = h3(s2), S = ie(d2);
|
|
1474
|
+
if (!(S < 95) && ge(d2, s2) && !(_r(d2, (O2) => Gn(O2).length > 0) < ee)) {
|
|
1475
|
+
i.zip = s2, g5.add(s2), u3.push(`zip=${s2} (${S}% ZIP codes)`);
|
|
1476
1476
|
break;
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
1479
|
let T3 = i.country;
|
|
1480
|
-
if (!T3 || !N(
|
|
1480
|
+
if (!T3 || !N(h3(T3))) {
|
|
1481
1481
|
let s2 = null;
|
|
1482
|
-
for (let d2 of
|
|
1483
|
-
if (
|
|
1484
|
-
let S = re(
|
|
1482
|
+
for (let d2 of b2) {
|
|
1483
|
+
if (g5.has(d2) || !N(h3(d2))) continue;
|
|
1484
|
+
let S = re(h3(d2));
|
|
1485
1485
|
(!s2 || S > s2.pct) && (s2 = { name: d2, pct: S });
|
|
1486
1486
|
}
|
|
1487
|
-
s2 && (T3 && (l2.push(`country=${T3} (only ${re(
|
|
1487
|
+
s2 && (T3 && (l2.push(`country=${T3} (only ${re(h3(T3))}% of values are country identifiers; using ${s2.name} instead)`), C3.country = T3), i.country = s2.name, g5.add(s2.name), u3.push(`country=${s2.name}`));
|
|
1488
1488
|
}
|
|
1489
1489
|
if (!i.city) {
|
|
1490
1490
|
let s2 = null;
|
|
1491
|
-
for (let d2 of
|
|
1492
|
-
if (
|
|
1493
|
-
let S =
|
|
1494
|
-
O2 < pt || te(S, (
|
|
1491
|
+
for (let d2 of b2) {
|
|
1492
|
+
if (g5.has(d2)) continue;
|
|
1493
|
+
let S = h3(d2), O2 = wr(S, o2);
|
|
1494
|
+
O2 < pt || te(S, (z2) => kt(z2, o2)) < ee || (!s2 || O2 > s2.pct) && (s2 = { name: d2, pct: O2 });
|
|
1495
1495
|
}
|
|
1496
1496
|
s2 && (i.city = s2.name, u3.push(`city=${s2.name} (${s2.pct}% known cities)`));
|
|
1497
1497
|
}
|
|
1498
|
-
let P2 = i.country ?
|
|
1498
|
+
let P2 = i.country ? h3(i.country) : [], R3 = !!i.country && N(P2), L3 = R3 ? new Set(P2.map((s2) => I(s2 == null ? null : String(s2))).filter(Boolean)).size : 0, x3 = R3 && L3 >= 2, w4 = !!(i.lat && i.lon) && t.some((s2) => {
|
|
1499
1499
|
let d2 = +String(s2[i.lat] ?? "").trim(), S = +String(s2[i.lon] ?? "").trim();
|
|
1500
1500
|
return isFinite(d2) && isFinite(S) && d2 >= -90 && d2 <= 90 && S >= -180 && S <= 180 && String(s2[i.lat] ?? "").trim() !== "" && String(s2[i.lon] ?? "").trim() !== "";
|
|
1501
1501
|
});
|
|
1502
|
-
return i.lat && i.lon && !w4 && l2.push(`lat/lon=${i.lat}/${i.lon} (no row holds a usable coordinate pair)`), i.country && !x3 && !(i.city || i.state || i.zip || w4) && l2.push(R3 ? `country=${i.country} (every row resolves to the same country - nothing to place apart)` : `country=${i.country} (values are not country identifiers)`), { bind: !!(i.city || i.state || i.zip || x3 || w4) ? i : null, backfilled: u3, refused: l2, ...Object.keys(
|
|
1502
|
+
return i.lat && i.lon && !w4 && l2.push(`lat/lon=${i.lat}/${i.lon} (no row holds a usable coordinate pair)`), i.country && !x3 && !(i.city || i.state || i.zip || w4) && l2.push(R3 ? `country=${i.country} (every row resolves to the same country - nothing to place apart)` : `country=${i.country} (values are not country identifiers)`), { bind: !!(i.city || i.state || i.zip || x3 || w4) ? i : null, backfilled: u3, refused: l2, ...Object.keys(C3).length ? { labelFallback: C3 } : {} };
|
|
1503
1503
|
}
|
|
1504
1504
|
var r = (e, ...t) => ({ part: e, langs: Object.freeze(t) });
|
|
1505
1505
|
var ae = Object.freeze({ jaar: r("year", "nl"), kwartaal: r("quarter", "nl"), maand: r("month", "nl"), dag: r("day", "nl", "sv", "da", "nb"), jahr: r("year", "de"), quartal: r("quarter", "de"), monat: r("month", "de"), tag: r("day", "de"), ann\u00E9e: r("year", "fr"), mois: r("month", "fr"), jour: r("day", "fr"), trimestre: r("quarter", "fr", "es", "pt", "it"), a\u00F1o: r("year", "es"), mes: r("month", "es"), d\u00EDa: r("day", "es"), ano: r("year", "pt"), m\u00EAs: r("month", "pt"), dia: r("day", "pt"), anno: r("year", "it"), mese: r("month", "it"), giorno: r("day", "it"), \u0433\u043E\u0434: r("year", "ru"), \u043C\u0435\u0441\u044F\u0446: r("month", "ru"), \u0440\u0456\u043A: r("year", "uk"), \u043C\u0456\u0441\u044F\u0446\u044C: r("month", "uk"), \u043A\u0432\u0430\u0440\u0442\u0430\u043B: r("quarter", "ru", "uk"), \u0434\u0435\u043D\u044C: r("day", "ru", "uk"), rok: r("year", "pl", "cs", "sk"), kwarta\u0142: r("quarter", "pl"), miesi\u0105c: r("month", "pl"), dzie\u0144: r("day", "pl"), \u010Dtvrtlet\u00ED: r("quarter", "cs"), m\u011Bs\u00EDc: r("month", "cs"), den: r("day", "cs"), \u0161tvr\u0165rok: r("quarter", "sk"), mesiac: r("month", "sk"), de\u0148: r("day", "sk"), \u00E5r: r("year", "sv", "da", "nb"), kvartal: r("quarter", "sv", "da", "nb"), m\u00E5nad: r("month", "sv"), m\u00E5ned: r("month", "da", "nb"), vuosi: r("year", "fi"), vuosinelj\u00E4nnes: r("quarter", "fi"), kuukausi: r("month", "fi"), p\u00E4iv\u00E4: r("day", "fi"), \u00E9v: r("year", "hu"), negyed\u00E9v: r("quarter", "hu"), h\u00F3nap: r("month", "hu"), nap: r("day", "hu"), y\u0131l: r("year", "tr"), \u00E7eyrek: r("quarter", "tr"), ay: r("month", "tr"), g\u00FCn: r("day", "tr"), \u03AD\u03C4\u03BF\u03C2: r("year", "el"), \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF: r("quarter", "el"), \u03BC\u03AE\u03BD\u03B1\u03C2: r("month", "el"), \u03B7\u03BC\u03AD\u03C1\u03B1: r("day", "el"), an: r("year", "ro"), trimestru: r("quarter", "ro"), lun\u0103: r("month", "ro"), zi: r("day", "ro"), godina: r("year", "hr"), tromjese\u010Dje: r("quarter", "hr"), mjesec: r("month", "hr"), dan: r("day", "hr"), \u5E74: r("year", "ja", "zh"), \u56DB\u534A\u671F: r("quarter", "ja"), \u5B63\u5EA6: r("quarter", "zh"), \u6708: r("month", "ja", "zh"), \u65E5: r("day", "ja", "zh"), \uC5F0\uB3C4: r("year", "ko"), \uBD84\uAE30: r("quarter", "ko"), \uC6D4: r("month", "ko"), \uC77C: r("day", "ko"), tahun: r("year", "id"), kuartal: r("quarter", "id"), triwulan: r("quarter", "id"), bulan: r("month", "id"), hari: r("day", "id"), n\u0103m: r("year", "vi"), qu\u00FD: r("quarter", "vi"), th\u00E1ng: r("month", "vi"), ng\u00E0y: r("day", "vi"), \u0E1B\u0E35: r("year", "th"), \u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A: r("quarter", "th"), \u0E40\u0E14\u0E37\u0E2D\u0E19: r("month", "th"), \u0E27\u0E31\u0E19: r("day", "th"), \u0627\u0644\u0633\u0646\u0629: r("year", "ar"), \u0633\u0646\u0629: r("year", "ar"), \u0627\u0644\u0639\u0627\u0645: r("year", "ar"), \u0639\u0627\u0645: r("year", "ar"), \u0627\u0644\u0631\u0628\u0639: r("quarter", "ar"), \u0631\u0628\u0639: r("quarter", "ar"), "\u0631\u0628\u0639 \u0627\u0644\u0633\u0646\u0629": r("quarter", "ar"), \u0627\u0644\u0634\u0647\u0631: r("month", "ar"), \u0634\u0647\u0631: r("month", "ar"), \u0627\u0644\u064A\u0648\u0645: r("day", "ar"), \u064A\u0648\u0645: r("day", "ar"), \u05E9\u05E0\u05D4: r("year", "he"), \u05E8\u05D1\u05E2\u05D5\u05DF: r("quarter", "he"), \u05D7\u05D5\u05D3\u05E9: r("month", "he"), \u05D9\u05D5\u05DD: r("day", "he"), \u0935\u0930\u094D\u0937: r("year", "hi"), \u0938\u093E\u0932: r("year", "hi"), \u0924\u093F\u092E\u093E\u0939\u0940: r("quarter", "hi"), \u092E\u0939\u0940\u0928\u093E: r("month", "hi"), \u092E\u093E\u0939: r("month", "hi"), \u0926\u093F\u0928: r("day", "hi"), \u0633\u0627\u0644: r("year", "fa"), \u0645\u0627\u0647: r("month", "fa"), \u0631\u0648\u0632: r("day", "fa") });
|
|
1506
|
-
var
|
|
1507
|
-
var
|
|
1508
|
-
var
|
|
1509
|
-
var
|
|
1510
|
-
var
|
|
1511
|
-
var
|
|
1506
|
+
var Ar = Object.freeze(Array.from(new Set(Object.values(ae).flatMap((e) => e.langs))));
|
|
1507
|
+
var he = Object.freeze(["fa", "ar", "he", "th"]);
|
|
1508
|
+
var ao = Object.freeze({ integer: "number", decimal: "number", double: "number", datetime: "date", date: "date", boolean: "boolean", string: "text" });
|
|
1509
|
+
var yo = Object.freeze({ RENDER_START: "render-start", RENDER_OK: "render-ok", RENDER_ERROR: "render-error", VIEW: "view", VIEW_VERDICT: "view-verdict", REDRAW: "redraw", INTERACT: "interact" });
|
|
1510
|
+
var ho = Object.freeze(["open", "generate", "version", "rebind", "data", "sample", "fix", "resize", "other"]);
|
|
1511
|
+
var Fe = 2 ** 31 - 1;
|
|
1512
1512
|
|
|
1513
1513
|
export {
|
|
1514
1514
|
K,
|
|
@@ -1530,5 +1530,5 @@ export {
|
|
|
1530
1530
|
Kt,
|
|
1531
1531
|
Oi,
|
|
1532
1532
|
Li,
|
|
1533
|
-
|
|
1533
|
+
Or
|
|
1534
1534
|
};
|
package/dist/dax.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
2
|
import {
|
|
3
3
|
isAnyValue
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2GW3S5VD.mjs";
|
|
5
5
|
import "./chunk-GHODWOAL.mjs";
|
|
6
6
|
|
|
7
7
|
// src/dax.ts
|