@bicharts/chart-host 0.6.43 → 0.6.45
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/dist/{chunk-MVM2R7K7.mjs → chunk-XWVIYCMM.mjs} +224 -224
- package/dist/index.mjs +9 -9
- package/dist/react.mjs +1 -1
- package/package.json +1 -1
|
@@ -211,13 +211,13 @@ var require_papaparse_min = __commonJS({
|
|
|
211
211
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
212
212
|
}
|
|
213
213
|
function E4(C2) {
|
|
214
|
-
var S2 = (C2 = C2 || {}).delimiter, O3 = C2.newline, x3 = C2.comments,
|
|
215
|
-
if (void 0 !== C2.escapeChar && (
|
|
214
|
+
var S2 = (C2 = C2 || {}).delimiter, O3 = C2.newline, x3 = C2.comments, I4 = C2.step, A4 = C2.preview, T2 = C2.fastMode, D2 = null, L4 = false, F4 = null == C2.quoteChar ? '"' : C2.quoteChar, j3 = F4;
|
|
215
|
+
if (void 0 !== C2.escapeChar && (j3 = C2.escapeChar), ("string" != typeof S2 || -1 < v2.BAD_DELIMITERS.indexOf(S2)) && (S2 = ","), x3 === S2) throw new Error("Comment character same as delimiter");
|
|
216
216
|
true === x3 ? x3 = "#" : ("string" != typeof x3 || -1 < v2.BAD_DELIMITERS.indexOf(x3)) && (x3 = false), "\n" !== O3 && "\r" !== O3 && "\r\n" !== O3 && (O3 = "\n");
|
|
217
217
|
var z4 = 0, M2 = false;
|
|
218
218
|
this.parse = function(i2, t, r4) {
|
|
219
219
|
if ("string" != typeof i2) throw new Error("Input must be a string");
|
|
220
|
-
var n2 = i2.length, e = S2.length, s2 = O3.length, a4 = x3.length, o4 = q2(
|
|
220
|
+
var n2 = i2.length, e = S2.length, s2 = O3.length, a4 = x3.length, o4 = q2(I4), h4 = [], u4 = [], d3 = [], f5 = z4 = 0;
|
|
221
221
|
if (!i2) return w2();
|
|
222
222
|
if (T2 || false !== T2 && -1 === i2.indexOf(F4)) {
|
|
223
223
|
for (var l2 = i2.split(O3), c4 = 0; c4 < l2.length; c4++) {
|
|
@@ -227,16 +227,16 @@ var require_papaparse_min = __commonJS({
|
|
|
227
227
|
if (o4) {
|
|
228
228
|
if (h4 = [], k3(d3.split(S2)), R2(), M2) return w2();
|
|
229
229
|
} else k3(d3.split(S2));
|
|
230
|
-
if (
|
|
230
|
+
if (A4 && A4 <= c4) return h4 = h4.slice(0, A4), w2(true);
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
return w2();
|
|
234
234
|
}
|
|
235
|
-
for (var p4 = i2.indexOf(S2, z4), g4 = i2.indexOf(O3, z4), _4 = new RegExp(U2(
|
|
235
|
+
for (var p4 = i2.indexOf(S2, z4), g4 = i2.indexOf(O3, z4), _4 = new RegExp(U2(j3) + U2(F4), "g"), m4 = i2.indexOf(F4, z4); ; ) if (i2[z4] === F4) for (m4 = z4, z4++; ; ) {
|
|
236
236
|
if (-1 === (m4 = i2.indexOf(F4, m4 + 1))) return r4 || u4.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h4.length, index: z4 }), E5();
|
|
237
237
|
if (m4 === n2 - 1) return E5(i2.substring(z4, m4).replace(_4, F4));
|
|
238
|
-
if (F4 ===
|
|
239
|
-
else if (F4 ===
|
|
238
|
+
if (F4 === j3 && i2[m4 + 1] === j3) m4++;
|
|
239
|
+
else if (F4 === j3 || 0 === m4 || i2[m4 - 1] !== j3) {
|
|
240
240
|
-1 !== p4 && p4 < m4 + 1 && (p4 = i2.indexOf(S2, m4 + 1));
|
|
241
241
|
var y5 = v3(-1 === (g4 = -1 !== g4 && g4 < m4 + 1 ? i2.indexOf(O3, m4 + 1) : g4) ? p4 : Math.min(p4, g4));
|
|
242
242
|
if (i2.substr(m4 + 1 + y5, e) === S2) {
|
|
@@ -246,7 +246,7 @@ var require_papaparse_min = __commonJS({
|
|
|
246
246
|
y5 = v3(g4);
|
|
247
247
|
if (i2.substring(m4 + 1 + y5, m4 + 1 + y5 + s2) === O3) {
|
|
248
248
|
if (d3.push(i2.substring(z4, m4).replace(_4, F4)), b5(m4 + 1 + y5 + s2), p4 = i2.indexOf(S2, z4), m4 = i2.indexOf(F4, z4), o4 && (R2(), M2)) return w2();
|
|
249
|
-
if (
|
|
249
|
+
if (A4 && h4.length >= A4) return w2(true);
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
u4.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: h4.length, index: z4 }), m4++;
|
|
@@ -259,7 +259,7 @@ var require_papaparse_min = __commonJS({
|
|
|
259
259
|
else {
|
|
260
260
|
if (-1 === g4) break;
|
|
261
261
|
if (d3.push(i2.substring(z4, g4)), b5(g4 + s2), o4 && (R2(), M2)) return w2();
|
|
262
|
-
if (
|
|
262
|
+
if (A4 && h4.length >= A4) return w2(true);
|
|
263
263
|
}
|
|
264
264
|
return E5();
|
|
265
265
|
function k3(e2) {
|
|
@@ -293,7 +293,7 @@ var require_papaparse_min = __commonJS({
|
|
|
293
293
|
return { data: h4, errors: u4, meta: { delimiter: S2, linebreak: O3, aborted: M2, truncated: !!e2, cursor: f5 + (t || 0), renamedHeaders: D2 } };
|
|
294
294
|
}
|
|
295
295
|
function R2() {
|
|
296
|
-
|
|
296
|
+
I4(w2()), h4 = [], u4 = [];
|
|
297
297
|
}
|
|
298
298
|
}, this.abort = function() {
|
|
299
299
|
M2 = true;
|
|
@@ -509,10 +509,10 @@ function f(t) {
|
|
|
509
509
|
}
|
|
510
510
|
function rgbToLab(r2, g3, b4) {
|
|
511
511
|
const R2 = linearise(r2), G3 = linearise(g3), B3 = linearise(b4);
|
|
512
|
-
const
|
|
512
|
+
const X3 = 0.4124564 * R2 + 0.3575761 * G3 + 0.1804375 * B3;
|
|
513
513
|
const Y3 = 0.2126729 * R2 + 0.7151522 * G3 + 0.072175 * B3;
|
|
514
|
-
const
|
|
515
|
-
const fx = f(
|
|
514
|
+
const Z5 = 0.0193339 * R2 + 0.119192 * G3 + 0.9503041 * B3;
|
|
515
|
+
const fx = f(X3 / Xn), fy = f(Y3 / Yn), fz = f(Z5 / Zn);
|
|
516
516
|
return { L: 116 * fy - 16, a: 500 * (fx - fy), b: 200 * (fy - fz) };
|
|
517
517
|
}
|
|
518
518
|
function hexToLab(hex2) {
|
|
@@ -567,13 +567,13 @@ function labToHex(lab) {
|
|
|
567
567
|
return t32 > EPS ? t32 : (116 * t - 16) / KAPPA;
|
|
568
568
|
};
|
|
569
569
|
const fy = (lab.L + 16) / 116, fx = fy + lab.a / 500, fz = fy - lab.b / 200;
|
|
570
|
-
const
|
|
570
|
+
const X3 = Xn * finv(fx);
|
|
571
571
|
const Y3 = Yn * (lab.L > KAPPA * EPS ? fy * fy * fy : lab.L / KAPPA);
|
|
572
|
-
const
|
|
572
|
+
const Z5 = Zn * finv(fz);
|
|
573
573
|
const lin = [
|
|
574
|
-
3.2404542 *
|
|
575
|
-
-0.969266 *
|
|
576
|
-
0.0556434 *
|
|
574
|
+
3.2404542 * X3 - 1.5371385 * Y3 - 0.4985314 * Z5,
|
|
575
|
+
-0.969266 * X3 + 1.8760108 * Y3 + 0.041556 * Z5,
|
|
576
|
+
0.0556434 * X3 - 0.2040259 * Y3 + 1.0572252 * Z5
|
|
577
577
|
];
|
|
578
578
|
return "#" + lin.map((v2) => {
|
|
579
579
|
const c2 = Math.max(0, Math.min(1, v2));
|
|
@@ -678,14 +678,14 @@ function censusColourSpread(container, doc) {
|
|
|
678
678
|
const d2 = cs.map(() => new Array(cs.length).fill(0));
|
|
679
679
|
let span = 0, lo = 0, hi = 1;
|
|
680
680
|
for (let i = 0; i < cs.length; i++) {
|
|
681
|
-
for (let
|
|
682
|
-
const v2 = deltaE2000(cs[i], cs[
|
|
683
|
-
d2[i][
|
|
684
|
-
d2[
|
|
681
|
+
for (let j3 = i + 1; j3 < cs.length; j3++) {
|
|
682
|
+
const v2 = deltaE2000(cs[i], cs[j3]);
|
|
683
|
+
d2[i][j3] = v2;
|
|
684
|
+
d2[j3][i] = v2;
|
|
685
685
|
if (v2 > span) {
|
|
686
686
|
span = v2;
|
|
687
687
|
lo = i;
|
|
688
|
-
hi =
|
|
688
|
+
hi = j3;
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
}
|
|
@@ -700,8 +700,8 @@ function censusColourSpread(container, doc) {
|
|
|
700
700
|
let crowd = 0;
|
|
701
701
|
for (let i = 0; i < cs.length; i++) {
|
|
702
702
|
let n = 0;
|
|
703
|
-
for (let
|
|
704
|
-
if (i ===
|
|
703
|
+
for (let j3 = 0; j3 < cs.length; j3++) {
|
|
704
|
+
if (i === j3 || d2[i][j3] <= SAME_SHADE_DELTA_E) n += top[j3].n;
|
|
705
705
|
}
|
|
706
706
|
if (n > crowd) crowd = n;
|
|
707
707
|
}
|
|
@@ -773,15 +773,15 @@ function resolveAutoColorScale(p2) {
|
|
|
773
773
|
};
|
|
774
774
|
const candidates = p2.isHighContrast ? [normHex(p2.themeAccent), normHex(p2.themeFg)] : [...palette.map(normHex), normHex(p2.themeAccent), normHex(p2.themeFg)];
|
|
775
775
|
const accent = candidates.find(usable) ?? FALLBACK_ACCENT;
|
|
776
|
-
const
|
|
776
|
+
const A4 = hexToLab(accent);
|
|
777
777
|
let t = 0.1;
|
|
778
|
-
let low = mixLab(bg,
|
|
778
|
+
let low = mixLab(bg, A4, t);
|
|
779
779
|
while (t < 0.6 && deltaE2000(paintedOver(labToHex(low), canvas, AUTO_RAMP_DRAWN_OPACITY), bg) < SAME_SHADE_DELTA_E) {
|
|
780
780
|
t += 0.02;
|
|
781
|
-
low = mixLab(bg,
|
|
781
|
+
low = mixLab(bg, A4, t);
|
|
782
782
|
}
|
|
783
783
|
const lowHex = labToHex(low);
|
|
784
|
-
let high = { ...
|
|
784
|
+
let high = { ...A4 };
|
|
785
785
|
let highHex = labToHex(high);
|
|
786
786
|
for (let step = 0; step < 80 && autoRampMinStep(lowHex, highHex, canvas) < AUTO_RAMP_MIN_STEP_DELTA_E; step++) {
|
|
787
787
|
const L4 = Math.max(4, Math.min(98, high.L + (darkCanvas ? 1 : -1)));
|
|
@@ -1240,12 +1240,12 @@ function A3(n) {
|
|
|
1240
1240
|
if (f4 && f4.length) {
|
|
1241
1241
|
let d2 = n.state === void 0 || n.state === null ? "" : String(n.state).trim(), R2 = d2 ? u(d2) : "", g3 = d2 ? Y(d2) : null, S2 = [], m2 = -1;
|
|
1242
1242
|
for (let c2 of f4) {
|
|
1243
|
-
let l = c2.row,
|
|
1244
|
-
if (d2 && l.a1 !== "") if (g3 && l.a1 === g3 || u(l.a1) === R2)
|
|
1243
|
+
let l = c2.row, A4 = 0;
|
|
1244
|
+
if (d2 && l.a1 !== "") if (g3 && l.a1 === g3 || u(l.a1) === R2) A4++;
|
|
1245
1245
|
else continue;
|
|
1246
|
-
if (i) if (T(l.cc) === i)
|
|
1246
|
+
if (i) if (T(l.cc) === i) A4++;
|
|
1247
1247
|
else continue;
|
|
1248
|
-
|
|
1248
|
+
A4 > m2 ? (m2 = A4, S2 = [c2]) : A4 === m2 && S2.push(c2);
|
|
1249
1249
|
}
|
|
1250
1250
|
S2.some((c2) => c2.primary) && (S2 = S2.filter((c2) => c2.primary));
|
|
1251
1251
|
let p2 = /* @__PURE__ */ new Map();
|
|
@@ -1276,19 +1276,19 @@ var x = 8;
|
|
|
1276
1276
|
function y3(n, e) {
|
|
1277
1277
|
let t = new Array(n.length), o2 = new Array(n.length), i = new Array(n.length), r2 = /* @__PURE__ */ new Set(), a2 = [], s = /* @__PURE__ */ new Set(), f4 = [], d2 = /* @__PURE__ */ new Set(), R2 = [], g3 = { latlon: 0, city: 0, zip3: 0, state: 0, country: 0 }, S2 = 0, m2 = 0, p2 = null;
|
|
1278
1278
|
for (let l = 0; l < n.length; ++l) {
|
|
1279
|
-
let
|
|
1279
|
+
let A4 = n[l], C2 = A3({ ...A4, mapKind: e });
|
|
1280
1280
|
if (S3(C2)) {
|
|
1281
1281
|
t[l] = null, o2[l] = null, i[l] = null, m2++;
|
|
1282
|
-
let M2 = K(
|
|
1282
|
+
let M2 = K(A4);
|
|
1283
1283
|
M2 && !d2.has(M2.toLowerCase()) && (d2.add(M2.toLowerCase()), R2.length < x && R2.push(M2));
|
|
1284
1284
|
} else if (C2) {
|
|
1285
1285
|
if (t[l] = C2.lat, o2[l] = C2.lon, i[l] = C2.precision, S2++, g3[C2.precision]++, (p2 === null || G[C2.precision] > G[p2]) && (p2 = C2.precision), G[C2.precision] > G.city) {
|
|
1286
|
-
let M2 = K(
|
|
1286
|
+
let M2 = K(A4);
|
|
1287
1287
|
M2 && !s.has(M2.toLowerCase()) && (s.add(M2.toLowerCase()), f4.length < x && f4.push(M2));
|
|
1288
1288
|
}
|
|
1289
1289
|
} else {
|
|
1290
1290
|
t[l] = null, o2[l] = null, i[l] = null;
|
|
1291
|
-
let M2 = K(
|
|
1291
|
+
let M2 = K(A4);
|
|
1292
1292
|
M2 && !r2.has(M2.toLowerCase()) && (r2.add(M2.toLowerCase()), a2.push(M2));
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
@@ -1465,7 +1465,7 @@ function It(n, s) {
|
|
|
1465
1465
|
function Wt(n, s) {
|
|
1466
1466
|
let i = new Array(n.length), r2 = /* @__PURE__ */ new Set(), M2 = [], h3 = 0;
|
|
1467
1467
|
for (let N2 = 0; N2 < n.length; ++N2) {
|
|
1468
|
-
let
|
|
1468
|
+
let I4 = Mt(n[N2], s), O3 = I4 !== null && It(I4, s) ? I4 : null;
|
|
1469
1469
|
if (i[N2] = O3, O3 !== null) h3++;
|
|
1470
1470
|
else {
|
|
1471
1471
|
let d2 = n[N2];
|
|
@@ -1481,88 +1481,88 @@ function Wt(n, s) {
|
|
|
1481
1481
|
return { iso: i, unmatched: M2, matchedRows: h3, totalRows: n.length };
|
|
1482
1482
|
}
|
|
1483
1483
|
|
|
1484
|
-
// ../shape-core/dist/chunk-
|
|
1484
|
+
// ../shape-core/dist/chunk-FUHYYIXD.mjs
|
|
1485
1485
|
var import_papaparse = __toESM(require_papaparse_min(), 1);
|
|
1486
1486
|
/*! @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. */
|
|
1487
|
-
var
|
|
1487
|
+
var ze = { "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" };
|
|
1488
1488
|
var J3 = (() => {
|
|
1489
1489
|
let t = /* @__PURE__ */ new Map();
|
|
1490
|
-
for (let e of Object.keys(
|
|
1490
|
+
for (let e of Object.keys(ze)) for (let n of ze[e].split(/\s+/)) n && t.set(n, e);
|
|
1491
1491
|
return t;
|
|
1492
1492
|
})();
|
|
1493
|
-
function
|
|
1493
|
+
function yt2(t) {
|
|
1494
1494
|
for (let [e, n] of t) {
|
|
1495
1495
|
let i = J3.get(e);
|
|
1496
1496
|
i && !J3.has(n) && J3.set(n, i);
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
|
-
|
|
1500
|
-
var
|
|
1501
|
-
var
|
|
1502
|
-
var
|
|
1503
|
-
var
|
|
1504
|
-
function
|
|
1499
|
+
yt2(N);
|
|
1500
|
+
var St2 = ["rate", "ratio", "pct", "percent", "percentage", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "z[_-]?score", "average", "avg", "mean", "median", "stddev", "variance", "gpa", "percentile", "quantile", "efficiency", "accuracy", "probability", "multiplier", "coefficient", "correlation", "occupancy", "age", "bmi", "temperature", "density", "pressure", "humidity", "ph", "velocity", "speed", "elevation", "altitude", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps", "temperatuur", "temperatur", "temperatura", "teplota", "lampotila", "homerseklet", "sicaklik", "pression", "presion", "pressao", "pressione", "druck", "tryck", "tlak", "paine", "nyomas", "presiune", "humidite", "humedad", "umidade", "umidita", "feuchtigkeit", "vochtigheid", "kosteus", "vlhkost", "vitesse", "velocidad", "velocidade", "velocita", "geschwindigkeit", "snelheid", "hastighet", "hastighed", "rychlost", "nopeus", "sebesseg", "brzina", "predkosc", "densite", "densidad", "densidade", "densita", "dichte", "dichtheid", "hustota", "tiheys", "gustoca", "moyenne", "mediane", "promedio", "mediana", "gemiddelde", "durchschnitt", "mittelwert", "genomsnitt", "gennemsnit", "gjennomsnitt", "keskiarvo", "atlag", "ortalama", "prosjek", "srednia", "prumer", "priemer", "medie", "taux", "tasa", "taxa", "tasso", "verhaltnis", "verhouding", "aandeel", "anteil", "andel", "osuus", "podil", "udzial", "udio", "pourcentage", "porcentaje", "percentual", "prozent", "procent", "prosentti", "szazalek", "yuzde", "participacion", "participacao", "pondere", "omjer", "arany", "oran", "rata", "leeftijd", "edad", "idade", "wiek", "eletkor", "varsta", "puntuacion", "pontuacao", "punteggio", "betyg", "ocena", "indice", "indeks", "wskaznik", "puan"];
|
|
1501
|
+
var _t = ["pct", "percent", "percentage", "rate", "ratio", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "gpa", "percentile", "quantile", "bmi", "density", "pressure", "humidity", "velocity", "efficiency", "occupancy", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps"];
|
|
1502
|
+
var At = ["latitude", "longitude"];
|
|
1503
|
+
var Ct = ["latitude", "longitude"];
|
|
1504
|
+
function Z3(t) {
|
|
1505
1505
|
return p(t);
|
|
1506
1506
|
}
|
|
1507
|
-
var
|
|
1508
|
-
function
|
|
1507
|
+
var be = ["somme de", "suma de", "soma de", "summe von", "som van", "somma di", "summa av", "sum av", "sum af", "soucet z", "suma z", "totaal van", "total de", "toplam", "osszeg", "nombre de", "recuento de", "contagem de", "anzahl von", "aantal van", "conteggio di", "antal av", "lukumaara", "pocet z"];
|
|
1508
|
+
function Mt2(t) {
|
|
1509
1509
|
return [...t].sort((e, n) => n.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|");
|
|
1510
1510
|
}
|
|
1511
|
-
var
|
|
1512
|
-
var
|
|
1513
|
-
var
|
|
1514
|
-
var
|
|
1515
|
-
function
|
|
1511
|
+
var $e = new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:" + Mt2(be) + ")\\s+)", "i");
|
|
1512
|
+
var xt = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
|
|
1513
|
+
var Rt = new RegExp("\\b(" + St2.join("|") + ")\\b|(" + _t.join("|") + ")$", "i");
|
|
1514
|
+
var Tt = new RegExp("\\b(" + At.join("|") + ")\\b|(" + Ct.join("|") + ")$", "i");
|
|
1515
|
+
function me(t) {
|
|
1516
1516
|
if (!t) return "";
|
|
1517
|
-
let e = String(t), n =
|
|
1517
|
+
let e = String(t), n = $e.exec(Z3(e));
|
|
1518
1518
|
return (n ? e.slice(n[0].length) : e).trim();
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1521
|
-
return !!t &&
|
|
1520
|
+
function Nt(t) {
|
|
1521
|
+
return !!t && $e.test(Z3(String(t)));
|
|
1522
1522
|
}
|
|
1523
|
-
var
|
|
1524
|
-
var
|
|
1525
|
-
var
|
|
1526
|
-
var
|
|
1527
|
-
function
|
|
1528
|
-
let e =
|
|
1529
|
-
return e.length === 0 ? "" : e.replace(
|
|
1523
|
+
var Et = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
|
|
1524
|
+
var Ve = new RegExp("^\\s*(" + [...Et].sort((t, e) => e.length - t.length).map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
|
|
1525
|
+
var He = { Sum: ["Sum of "], Avg: ["Average of "], Average: ["Average of "], Count: ["Count of "], CountNonNull: ["Count of "], Min: ["Min of ", "First ", "Earliest "], Max: ["Max of ", "Last ", "Latest "], Median: ["Median of "], StandardDeviation: ["Standard deviation of "], Variance: ["Variance of "] };
|
|
1526
|
+
var It2 = new RegExp("^(" + Object.keys(He).join("|") + ")\\((.+)\\)$");
|
|
1527
|
+
function vt(t) {
|
|
1528
|
+
let e = me(t);
|
|
1529
|
+
return e.length === 0 ? "" : e.replace(xt, " ");
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1531
|
+
function je(t, e) {
|
|
1532
1532
|
if (!e) return false;
|
|
1533
|
-
let n =
|
|
1534
|
-
return t.test(
|
|
1533
|
+
let n = me(e);
|
|
1534
|
+
return t.test(Z3(vt(e))) || t.test(Z3(n)) || t.test(Z3(d(n).join(" ")));
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1537
|
-
return
|
|
1536
|
+
function Xe(t) {
|
|
1537
|
+
return je(Tt, t);
|
|
1538
1538
|
}
|
|
1539
|
-
function
|
|
1540
|
-
return
|
|
1539
|
+
function wt(t) {
|
|
1540
|
+
return je(Rt, t) || Xe(t);
|
|
1541
1541
|
}
|
|
1542
|
-
var
|
|
1543
|
-
function
|
|
1542
|
+
var Ze = /int|double|decimal|single|float|number|currency|money/i;
|
|
1543
|
+
function Lt(t) {
|
|
1544
1544
|
let e = String(t?.valueNature ?? "").trim().toLowerCase();
|
|
1545
|
-
return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || t?.isMeasure === true ||
|
|
1545
|
+
return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || t?.isMeasure === true || Ze.test(String(t?.dataType ?? "")) ? "Continuous" : "Categorical";
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1548
|
-
return t?.isMeasure === true ||
|
|
1547
|
+
function Dt(t) {
|
|
1548
|
+
return t?.isMeasure === true || Ze.test(String(t?.dataType ?? ""));
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1551
|
-
let e = t ?? {}, n =
|
|
1550
|
+
function qe(t) {
|
|
1551
|
+
let e = t ?? {}, n = Lt(e);
|
|
1552
1552
|
if (n !== "Continuous") return { nature: n, additivity: "unknown", basis: "role", suppressed: false };
|
|
1553
|
-
if (
|
|
1553
|
+
if (Xe(e.name)) return { nature: n, additivity: "positional", basis: "name", suppressed: true };
|
|
1554
1554
|
let i = String(e.additivity ?? "").trim().toLowerCase();
|
|
1555
|
-
if (!(i === "additive" &&
|
|
1555
|
+
if (!(i === "additive" && Nt(e.name))) {
|
|
1556
1556
|
if (i === "additive") return { nature: n, additivity: "additive", basis: "measured", suppressed: false };
|
|
1557
1557
|
if (i === "part_of_whole") return { nature: n, additivity: "part_of_whole", basis: "measured", suppressed: false };
|
|
1558
1558
|
if (i === "intensive_rate") return { nature: n, additivity: "intensive_rate", basis: "measured", suppressed: false };
|
|
1559
1559
|
}
|
|
1560
|
-
return e.discourageAggregationAcrossGroups === true ? { nature: n, additivity: "intensive_rate", basis: "host-flag", suppressed: false } :
|
|
1560
|
+
return e.discourageAggregationAcrossGroups === true ? { nature: n, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : wt(e.name) ? { nature: n, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: n, additivity: "additive", basis: "default", suppressed: false };
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1563
|
-
let e =
|
|
1562
|
+
function Qe(t) {
|
|
1563
|
+
let e = qe(t), n = t ?? {};
|
|
1564
1564
|
if (e.nature === "Categorical") return ["first", "distinctcount", "count"];
|
|
1565
|
-
if (e.nature === "Ordinal") return
|
|
1565
|
+
if (e.nature === "Ordinal") return Dt(n) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
|
|
1566
1566
|
switch (e.additivity) {
|
|
1567
1567
|
case "positional":
|
|
1568
1568
|
return ["min", "max", "count", "distinctcount", "first"];
|
|
@@ -1572,22 +1572,22 @@ function Xe(t) {
|
|
|
1572
1572
|
return ["sum", "average", "median", "min", "max", "count", "distinctcount", "first"];
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1576
|
-
return
|
|
1575
|
+
function Zn2(t) {
|
|
1576
|
+
return Qe(t)[0];
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function Qn(t, e) {
|
|
1579
1579
|
if (e !== "sum" && e !== "count") return false;
|
|
1580
1580
|
if (e === "count") return true;
|
|
1581
|
-
let n =
|
|
1581
|
+
let n = qe(t);
|
|
1582
1582
|
return n.additivity === "additive" || n.additivity === "part_of_whole" || n.additivity === "unknown";
|
|
1583
1583
|
}
|
|
1584
|
-
var
|
|
1584
|
+
var Yt = new RegExp([String.raw`\bisMeasure\b`, String.raw`\bdataType\b`, String.raw`\bcolumns\s*\[\s*-?\d`, String.raw`\.iloc\s*\[[^\]]*,`, String.raw`\.iat\s*\[`, String.raw`\bselect_dtypes\b`, String.raw`\b_get_numeric_data\b`, String.raw`\bis_numeric_dtype\b`, String.raw`\bfor\s+\w+\s+in\s+(?:list\s*\(\s*)?df\.columns\b`, String.raw`\bdf\.columns\s*\.\s*(?:tolist|to_list|difference|drop)\b`, String.raw`\bdf\.dtypes\b`, String.raw`\bObject\s*\.\s*(?:keys|values|entries)\s*\(\s*(?:rows|data|df)?\s*\[\s*0\s*\]`, String.raw`\b(?:row|rw|r)\s*\[\s*\d+\s*\]`].join("|"));
|
|
1585
1585
|
|
|
1586
1586
|
// ../shape-core/dist/index.mjs
|
|
1587
1587
|
/*! @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. */
|
|
1588
|
-
var
|
|
1589
|
-
var
|
|
1590
|
-
function
|
|
1588
|
+
var Z4 = 2;
|
|
1589
|
+
var me2 = 400;
|
|
1590
|
+
function ee3(t) {
|
|
1591
1591
|
return !!E(t);
|
|
1592
1592
|
}
|
|
1593
1593
|
function F3(t) {
|
|
@@ -1595,26 +1595,26 @@ function F3(t) {
|
|
|
1595
1595
|
for (let n of t) {
|
|
1596
1596
|
if (n == null) continue;
|
|
1597
1597
|
let o2 = u(String(n));
|
|
1598
|
-
if (!V(o2) && !e.has(o2) && (e.add(o2), e.size >=
|
|
1598
|
+
if (!V(o2) && !e.has(o2) && (e.add(o2), e.size >= me2)) break;
|
|
1599
1599
|
}
|
|
1600
1600
|
return Array.from(e);
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function A2(t) {
|
|
1603
1603
|
let e = F3(t);
|
|
1604
|
-
if (e.length === 0 ||
|
|
1605
|
-
let n = e.filter((u2) =>
|
|
1604
|
+
if (e.length === 0 || te(t) < 95) return false;
|
|
1605
|
+
let n = e.filter((u2) => ee3(u2) && !Y(u2)).length, o2 = e.filter((u2) => !ee3(u2) && !!Y(u2)).length;
|
|
1606
1606
|
return n >= 1 && n >= o2;
|
|
1607
1607
|
}
|
|
1608
|
-
function
|
|
1608
|
+
function ce3(t, e) {
|
|
1609
1609
|
if (!Y(t)) return false;
|
|
1610
1610
|
let n = E(t);
|
|
1611
1611
|
return n ? e === "world" ? true : s3.has(n) : false;
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function te(t) {
|
|
1614
1614
|
let e = F3(t);
|
|
1615
1615
|
if (e.length === 0) return 0;
|
|
1616
1616
|
let n = 0;
|
|
1617
|
-
for (let o2 of e)
|
|
1617
|
+
for (let o2 of e) ee3(o2) && n++;
|
|
1618
1618
|
return Math.round(n / e.length * 1e3) / 10;
|
|
1619
1619
|
}
|
|
1620
1620
|
function z3(t) {
|
|
@@ -1624,26 +1624,26 @@ function z3(t) {
|
|
|
1624
1624
|
for (let o2 of e) Y(o2) && n++;
|
|
1625
1625
|
return Math.round(n / e.length * 1e3) / 10;
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1627
|
+
function re2(t) {
|
|
1628
1628
|
let e = /* @__PURE__ */ new Set();
|
|
1629
1629
|
for (let n of t) {
|
|
1630
1630
|
if (n == null) continue;
|
|
1631
1631
|
let o2 = String(n).trim();
|
|
1632
|
-
if (!V(u(o2)) && !e.has(o2) && (e.add(o2), e.size >=
|
|
1632
|
+
if (!V(u(o2)) && !e.has(o2) && (e.add(o2), e.size >= me2)) break;
|
|
1633
1633
|
}
|
|
1634
1634
|
return Array.from(e);
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1637
|
-
let e =
|
|
1636
|
+
function ne2(t) {
|
|
1637
|
+
let e = re2(t);
|
|
1638
1638
|
if (e.length === 0) return 0;
|
|
1639
1639
|
let n = 0;
|
|
1640
1640
|
for (let o2 of e) Z(o2).length > 0 && n++;
|
|
1641
1641
|
return Math.round(n / e.length * 1e3) / 10;
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1644
|
-
return y2(e, rt) ? true :
|
|
1643
|
+
function de(t, e) {
|
|
1644
|
+
return y2(e, rt) ? true : re2(t).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1646
|
+
function qn2(t, e) {
|
|
1647
1647
|
let n = F3(t);
|
|
1648
1648
|
if (n.length === 0) return 0;
|
|
1649
1649
|
let o2 = 0;
|
|
@@ -1655,85 +1655,85 @@ function J4(t, e) {
|
|
|
1655
1655
|
for (let o2 of F3(t)) e(o2) && n++;
|
|
1656
1656
|
return n;
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function zn2(t, e) {
|
|
1659
1659
|
let n = 0;
|
|
1660
|
-
for (let o2 of
|
|
1660
|
+
for (let o2 of re2(t)) e(o2) && n++;
|
|
1661
1661
|
return n;
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1664
|
-
let l = [], a2 = [],
|
|
1665
|
-
for (let
|
|
1666
|
-
let c2 = n?.[
|
|
1667
|
-
c2 &&
|
|
1663
|
+
function $n(t, e, n, o2, u2) {
|
|
1664
|
+
let l = [], a2 = [], i = {}, b4 = {}, E4 = new Set(t), C2 = (s) => e.map((c2) => c2[s]);
|
|
1665
|
+
for (let s of ["city", "country"]) {
|
|
1666
|
+
let c2 = n?.[s];
|
|
1667
|
+
c2 && E4.has(c2) && (i[s] = c2);
|
|
1668
1668
|
}
|
|
1669
|
-
let
|
|
1670
|
-
for (let
|
|
1671
|
-
let c2 = n?.[
|
|
1672
|
-
c2 &&
|
|
1669
|
+
let g3 = new Set(u2 ?? t);
|
|
1670
|
+
for (let s of ["lat", "lon"]) {
|
|
1671
|
+
let c2 = n?.[s];
|
|
1672
|
+
c2 && g3.has(c2) && (i[s] = c2);
|
|
1673
1673
|
}
|
|
1674
1674
|
let f4 = n?.zip;
|
|
1675
|
-
if (f4 &&
|
|
1676
|
-
let
|
|
1677
|
-
c2 < 95 ? a2.push(`zip=${f4} (only ${c2}% of values read as ZIPs)`) :
|
|
1675
|
+
if (f4 && E4.has(f4)) {
|
|
1676
|
+
let s = C2(f4), c2 = ne2(s);
|
|
1677
|
+
c2 < 95 ? a2.push(`zip=${f4} (only ${c2}% of values read as ZIPs)`) : de(s, f4) ? i.zip = f4 : a2.push(`zip=${f4} (all values are 3-4 digits with nothing to say they are postal)`);
|
|
1678
1678
|
}
|
|
1679
1679
|
let d2 = n?.state;
|
|
1680
|
-
if (d2 &&
|
|
1681
|
-
let
|
|
1682
|
-
c2.length > 0 && c2.every((S2) =>
|
|
1680
|
+
if (d2 && E4.has(d2)) {
|
|
1681
|
+
let s = C2(d2), c2 = F3(s);
|
|
1682
|
+
c2.length > 0 && c2.every((S2) => ce3(S2, o2)) ? a2.push(`state=${d2} (every value is "CA", which is both Canada and California)`) : A2(s) ? (a2.push(`state=${d2} (every value is a country, not a state)`), i.country || (i.country = d2)) : z3(s) < 95 ? a2.push(`state=${d2} (only ${z3(s)}% of values are states/provinces)`) : i.state = d2;
|
|
1683
1683
|
}
|
|
1684
|
-
let p2 = new Set(Object.values(
|
|
1685
|
-
if (!
|
|
1686
|
-
let
|
|
1687
|
-
for (let c2 of
|
|
1684
|
+
let p2 = new Set(Object.values(i).filter(Boolean)), y4 = t.filter((s) => !p2.has(s) && !s.startsWith("__"));
|
|
1685
|
+
if (!i.state) {
|
|
1686
|
+
let s = null;
|
|
1687
|
+
for (let c2 of y4) {
|
|
1688
1688
|
let S2 = C2(c2);
|
|
1689
|
-
if (
|
|
1690
|
-
let
|
|
1691
|
-
if (
|
|
1692
|
-
let
|
|
1693
|
-
|
|
1689
|
+
if (A2(S2)) continue;
|
|
1690
|
+
let P4 = z3(S2);
|
|
1691
|
+
if (P4 < 95) continue;
|
|
1692
|
+
let H3 = J4(S2, (D2) => !!Y(D2)), Ie = J4(S2, (D2) => !!Y(D2) && !ce3(D2, o2));
|
|
1693
|
+
H3 < Z4 && Ie < 1 || (!s || P4 > s.pct) && (s = { name: c2, pct: P4 });
|
|
1694
1694
|
}
|
|
1695
|
-
|
|
1695
|
+
s && (i.state = s.name, p2.add(s.name), l.push(`state=${s.name} (${s.pct}% states/provinces)`));
|
|
1696
1696
|
}
|
|
1697
|
-
if (!
|
|
1698
|
-
if (p2.has(
|
|
1699
|
-
let c2 = C2(
|
|
1700
|
-
if (!(S2 < 95) &&
|
|
1701
|
-
|
|
1697
|
+
if (!i.zip) for (let s of y4) {
|
|
1698
|
+
if (p2.has(s)) continue;
|
|
1699
|
+
let c2 = C2(s), S2 = ne2(c2);
|
|
1700
|
+
if (!(S2 < 95) && de(c2, s) && !(zn2(c2, (P4) => Z(P4).length > 0) < Z4)) {
|
|
1701
|
+
i.zip = s, p2.add(s), l.push(`zip=${s} (${S2}% ZIP codes)`);
|
|
1702
1702
|
break;
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
|
-
let
|
|
1706
|
-
if (!
|
|
1707
|
-
let
|
|
1708
|
-
for (let c2 of
|
|
1709
|
-
if (p2.has(c2) || !
|
|
1710
|
-
let S2 =
|
|
1711
|
-
(!
|
|
1705
|
+
let T2 = i.country;
|
|
1706
|
+
if (!T2 || !A2(C2(T2))) {
|
|
1707
|
+
let s = null;
|
|
1708
|
+
for (let c2 of y4) {
|
|
1709
|
+
if (p2.has(c2) || !A2(C2(c2))) continue;
|
|
1710
|
+
let S2 = te(C2(c2));
|
|
1711
|
+
(!s || S2 > s.pct) && (s = { name: c2, pct: S2 });
|
|
1712
1712
|
}
|
|
1713
|
-
|
|
1713
|
+
s && (T2 && (a2.push(`country=${T2} (only ${te(C2(T2))}% of values are country identifiers; using ${s.name} instead)`), b4.country = T2), i.country = s.name, p2.add(s.name), l.push(`country=${s.name}`));
|
|
1714
1714
|
}
|
|
1715
|
-
if (!
|
|
1716
|
-
let
|
|
1717
|
-
for (let c2 of
|
|
1715
|
+
if (!i.city) {
|
|
1716
|
+
let s = null;
|
|
1717
|
+
for (let c2 of y4) {
|
|
1718
1718
|
if (p2.has(c2)) continue;
|
|
1719
|
-
let S2 = C2(c2),
|
|
1720
|
-
|
|
1719
|
+
let S2 = C2(c2), P4 = qn2(S2, o2);
|
|
1720
|
+
P4 < m3 || J4(S2, (H3) => p3(H3, o2)) < Z4 || (!s || P4 > s.pct) && (s = { name: c2, pct: P4 });
|
|
1721
1721
|
}
|
|
1722
|
-
|
|
1722
|
+
s && (i.city = s.name, l.push(`city=${s.name} (${s.pct}% known cities)`));
|
|
1723
1723
|
}
|
|
1724
|
-
let L4 =
|
|
1725
|
-
let c2 = +String(i
|
|
1726
|
-
return isFinite(c2) && isFinite(S2) && c2 >= -90 && c2 <= 90 && S2 >= -180 && S2 <= 180 && String(i
|
|
1724
|
+
let L4 = i.country ? C2(i.country) : [], R2 = !!i.country && A2(L4), M2 = R2 ? new Set(L4.map((s) => E(s == null ? null : String(s))).filter(Boolean)).size : 0, x3 = R2 && M2 >= 2, w2 = !!(i.lat && i.lon) && e.some((s) => {
|
|
1725
|
+
let c2 = +String(s[i.lat] ?? "").trim(), S2 = +String(s[i.lon] ?? "").trim();
|
|
1726
|
+
return isFinite(c2) && isFinite(S2) && c2 >= -90 && c2 <= 90 && S2 >= -180 && S2 <= 180 && String(s[i.lat] ?? "").trim() !== "" && String(s[i.lon] ?? "").trim() !== "";
|
|
1727
1727
|
});
|
|
1728
|
-
return
|
|
1728
|
+
return i.lat && i.lon && !w2 && a2.push(`lat/lon=${i.lat}/${i.lon} (no row holds a usable coordinate pair)`), i.country && !x3 && !(i.city || i.state || i.zip || w2) && a2.push(R2 ? `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 || w2) ? i : null, backfilled: l, refused: a2, ...Object.keys(b4).length ? { labelFallback: b4 } : {} };
|
|
1729
1729
|
}
|
|
1730
1730
|
var r = (t, ...e) => ({ part: t, langs: Object.freeze(e) });
|
|
1731
|
-
var
|
|
1732
|
-
var
|
|
1733
|
-
var
|
|
1734
|
-
var
|
|
1735
|
-
var
|
|
1736
|
-
var
|
|
1731
|
+
var oe2 = 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") });
|
|
1732
|
+
var Hn2 = Object.freeze(Array.from(new Set(Object.values(oe2).flatMap((t) => t.langs))));
|
|
1733
|
+
var fe = Object.freeze(["fa", "ar", "he", "th"]);
|
|
1734
|
+
var hr = Object.freeze({ integer: "number", decimal: "number", double: "number", datetime: "date", date: "date", boolean: "boolean", string: "text" });
|
|
1735
|
+
var wr = Object.freeze({ RENDER_START: "render-start", RENDER_OK: "render-ok", RENDER_ERROR: "render-error", VIEW: "view", VIEW_VERDICT: "view-verdict" });
|
|
1736
|
+
var Le = 2 ** 31 - 1;
|
|
1737
1737
|
|
|
1738
1738
|
// src/payload.ts
|
|
1739
1739
|
var ROW_IDX_COLUMN = "__rowIdx__";
|
|
@@ -1748,7 +1748,7 @@ function resolvePointChannel(cols, rowObjs, point) {
|
|
|
1748
1748
|
let labelCol;
|
|
1749
1749
|
if (bind) {
|
|
1750
1750
|
const dims = cols.filter((c2) => !c2.isMeasure).map((c2) => c2.name);
|
|
1751
|
-
const res =
|
|
1751
|
+
const res = $n(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
|
|
1752
1752
|
bind = res.bind;
|
|
1753
1753
|
rolesBackfilled = res.backfilled;
|
|
1754
1754
|
rolesRefused = res.refused;
|
|
@@ -1942,10 +1942,10 @@ function stripJsComments(code) {
|
|
|
1942
1942
|
continue;
|
|
1943
1943
|
}
|
|
1944
1944
|
if (ch === "/" && next === "/") {
|
|
1945
|
-
let
|
|
1946
|
-
while (
|
|
1945
|
+
let j3 = i + 2;
|
|
1946
|
+
while (j3 < n && src[j3] !== "\n" && src[j3] !== "\r") j3++;
|
|
1947
1947
|
out += " ";
|
|
1948
|
-
i =
|
|
1948
|
+
i = j3;
|
|
1949
1949
|
wordOpen = false;
|
|
1950
1950
|
continue;
|
|
1951
1951
|
}
|
|
@@ -1959,10 +1959,10 @@ function stripJsComments(code) {
|
|
|
1959
1959
|
continue;
|
|
1960
1960
|
}
|
|
1961
1961
|
if (ch === "'" || ch === '"') {
|
|
1962
|
-
let
|
|
1963
|
-
while (
|
|
1964
|
-
out += src.slice(i, Math.min(
|
|
1965
|
-
i =
|
|
1962
|
+
let j3 = i + 1;
|
|
1963
|
+
while (j3 < n && src[j3] !== ch && src[j3] !== "\n") j3 += src[j3] === "\\" ? 2 : 1;
|
|
1964
|
+
out += src.slice(i, Math.min(j3 + 1, n));
|
|
1965
|
+
i = j3 + 1;
|
|
1966
1966
|
prevSig = ch;
|
|
1967
1967
|
prevWord = "";
|
|
1968
1968
|
wordOpen = false;
|
|
@@ -1976,23 +1976,23 @@ function stripJsComments(code) {
|
|
|
1976
1976
|
continue;
|
|
1977
1977
|
}
|
|
1978
1978
|
if (ch === "/" && regexMayFollow()) {
|
|
1979
|
-
let
|
|
1980
|
-
while (
|
|
1981
|
-
const c2 = src[
|
|
1979
|
+
let j3 = i + 1, inClass = false;
|
|
1980
|
+
while (j3 < n && src[j3] !== "\n") {
|
|
1981
|
+
const c2 = src[j3];
|
|
1982
1982
|
if (c2 === "\\") {
|
|
1983
|
-
|
|
1983
|
+
j3 += 2;
|
|
1984
1984
|
continue;
|
|
1985
1985
|
}
|
|
1986
1986
|
if (c2 === "[") inClass = true;
|
|
1987
1987
|
else if (c2 === "]") inClass = false;
|
|
1988
1988
|
else if (c2 === "/" && !inClass) break;
|
|
1989
|
-
|
|
1989
|
+
j3++;
|
|
1990
1990
|
}
|
|
1991
|
-
if (
|
|
1992
|
-
|
|
1993
|
-
while (
|
|
1994
|
-
out += src.slice(i,
|
|
1995
|
-
i =
|
|
1991
|
+
if (j3 < n && src[j3] === "/") {
|
|
1992
|
+
j3++;
|
|
1993
|
+
while (j3 < n && /[A-Za-z]/.test(src[j3])) j3++;
|
|
1994
|
+
out += src.slice(i, j3);
|
|
1995
|
+
i = j3;
|
|
1996
1996
|
prevSig = "/";
|
|
1997
1997
|
prevWord = "";
|
|
1998
1998
|
wordOpen = false;
|
|
@@ -2094,9 +2094,9 @@ function createMarkResolver(env) {
|
|
|
2094
2094
|
let best = Number.MAX_VALUE;
|
|
2095
2095
|
const N2 = 64;
|
|
2096
2096
|
for (let i = 0; i <= N2; i++) {
|
|
2097
|
-
const
|
|
2098
|
-
const dx = m2.a *
|
|
2099
|
-
const dy = m2.b *
|
|
2097
|
+
const pt2 = el.getPointAtLength(L4 * i / N2);
|
|
2098
|
+
const dx = m2.a * pt2.x + m2.c * pt2.y + m2.e - x3;
|
|
2099
|
+
const dy = m2.b * pt2.x + m2.d * pt2.y + m2.f - y4;
|
|
2100
2100
|
const d2 = dx * dx + dy * dy;
|
|
2101
2101
|
if (d2 < best) best = d2;
|
|
2102
2102
|
}
|
|
@@ -2182,8 +2182,8 @@ function createMarkResolver(env) {
|
|
|
2182
2182
|
for (const n of all) {
|
|
2183
2183
|
const tag = (n.tagName || "").toLowerCase();
|
|
2184
2184
|
if (!SHAPE.test(tag)) continue;
|
|
2185
|
-
const
|
|
2186
|
-
if (
|
|
2185
|
+
const pe = viewStyle(n);
|
|
2186
|
+
if (pe && pe !== "none") return true;
|
|
2187
2187
|
}
|
|
2188
2188
|
return false;
|
|
2189
2189
|
};
|
|
@@ -2628,8 +2628,8 @@ function censusValuePlacement(container, data) {
|
|
|
2628
2628
|
const fit = 1 - ssRes / ssTot;
|
|
2629
2629
|
if (fit >= VALUE_AXIS_MIN_FIT && (!best || fit > best.fit)) {
|
|
2630
2630
|
const full = new Array(dots.length).fill(NaN);
|
|
2631
|
-
keep.forEach((k3,
|
|
2632
|
-
full[k3] = res[
|
|
2631
|
+
keep.forEach((k3, j3) => {
|
|
2632
|
+
full[k3] = res[j3];
|
|
2633
2633
|
});
|
|
2634
2634
|
best = { col: c2, axis, fit, res: full, log };
|
|
2635
2635
|
}
|
|
@@ -2859,14 +2859,14 @@ var SVG_NS2 = "http://www.w3.org/2000/svg";
|
|
|
2859
2859
|
var AXIS_PIN_MAX_CARRIED = 12;
|
|
2860
2860
|
function unpinScrolledAxis(container) {
|
|
2861
2861
|
if (!container) return;
|
|
2862
|
-
const
|
|
2863
|
-
if (!
|
|
2862
|
+
const st = container[CONTAINER_SLOT_AXIS_PIN];
|
|
2863
|
+
if (!st) return;
|
|
2864
2864
|
try {
|
|
2865
|
-
container.removeEventListener("scroll",
|
|
2865
|
+
container.removeEventListener("scroll", st.onScroll);
|
|
2866
2866
|
} catch {
|
|
2867
2867
|
}
|
|
2868
2868
|
try {
|
|
2869
|
-
if (
|
|
2869
|
+
if (st.overlay.parentNode) st.overlay.parentNode.removeChild(st.overlay);
|
|
2870
2870
|
} catch {
|
|
2871
2871
|
}
|
|
2872
2872
|
try {
|
|
@@ -3044,15 +3044,15 @@ function pinScrolledAxis(container, svg) {
|
|
|
3044
3044
|
const svgTop = svgBox.top - cRect.top - container.clientTop + container.scrollTop;
|
|
3045
3045
|
const contentBand = { top: svgTop + band.top, bottom: svgTop + band.bottom };
|
|
3046
3046
|
const place = () => {
|
|
3047
|
-
const
|
|
3048
|
-
const edge2 = axisPinPlacement(contentBand,
|
|
3047
|
+
const st = container.scrollTop, vh = container.clientHeight;
|
|
3048
|
+
const edge2 = axisPinPlacement(contentBand, st, vh);
|
|
3049
3049
|
if (!edge2) {
|
|
3050
3050
|
o2.display = "none";
|
|
3051
3051
|
return null;
|
|
3052
3052
|
}
|
|
3053
3053
|
o2.display = "block";
|
|
3054
3054
|
o2.left = `${svgLeft}px`;
|
|
3055
|
-
o2.top = `${edge2 === "top" ?
|
|
3055
|
+
o2.top = `${edge2 === "top" ? st : st + vh - bandPx}px`;
|
|
3056
3056
|
return edge2;
|
|
3057
3057
|
};
|
|
3058
3058
|
const onScroll = () => {
|
|
@@ -3268,10 +3268,10 @@ function glyphSampleGrid(box, n = GLYPH_SAMPLE_N) {
|
|
|
3268
3268
|
if (!box || !(box.width > 0) || !(box.height > 0) || !(n >= 1)) return out;
|
|
3269
3269
|
const k3 = Math.floor(n);
|
|
3270
3270
|
for (let i = 0; i < k3; i++) {
|
|
3271
|
-
for (let
|
|
3271
|
+
for (let j3 = 0; j3 < k3; j3++) {
|
|
3272
3272
|
out.push({
|
|
3273
3273
|
x: box.left + box.width * (i + 0.5) / k3,
|
|
3274
|
-
y: box.top + box.height * (
|
|
3274
|
+
y: box.top + box.height * (j3 + 0.5) / k3
|
|
3275
3275
|
});
|
|
3276
3276
|
}
|
|
3277
3277
|
}
|
|
@@ -3292,10 +3292,10 @@ var LABEL_CONTRAST_CAP = 2e3;
|
|
|
3292
3292
|
var EMPTY5 = { rects: 0, scanned: 0, fixed: 0, pillsBoosted: 0, offFill: 0, pageMajority: 0, paintedOver: 0 };
|
|
3293
3293
|
function backedSamples(el, pts) {
|
|
3294
3294
|
try {
|
|
3295
|
-
const
|
|
3296
|
-
if (typeof
|
|
3297
|
-
const m2 =
|
|
3298
|
-
const svg =
|
|
3295
|
+
const ge2 = el;
|
|
3296
|
+
if (typeof ge2.isPointInFill !== "function" || typeof ge2.getScreenCTM !== "function") return null;
|
|
3297
|
+
const m2 = ge2.getScreenCTM();
|
|
3298
|
+
const svg = ge2.ownerSVGElement;
|
|
3299
3299
|
if (!m2 || !svg || typeof svg.createSVGPoint !== "function") return null;
|
|
3300
3300
|
if (pts.length === 0) return null;
|
|
3301
3301
|
const inv = m2.inverse();
|
|
@@ -3304,7 +3304,7 @@ function backedSamples(el, pts) {
|
|
|
3304
3304
|
const p2 = svg.createSVGPoint();
|
|
3305
3305
|
p2.x = pts[i].x;
|
|
3306
3306
|
p2.y = pts[i].y;
|
|
3307
|
-
hit.push(
|
|
3307
|
+
hit.push(ge2.isPointInFill(p2.matrixTransform(inv)));
|
|
3308
3308
|
}
|
|
3309
3309
|
return hit;
|
|
3310
3310
|
} catch {
|
|
@@ -3438,10 +3438,10 @@ function applyLabelContrast(container, opts = {}) {
|
|
|
3438
3438
|
const cellRGBA = toRGBA(cell.fill);
|
|
3439
3439
|
let bgRGB = cellRGBA ? compositeOver([cellRGBA[0], cellRGBA[1], cellRGBA[2], cellRGBA[3] * cell.op], pageRGB) : pageRGB;
|
|
3440
3440
|
if (pill) {
|
|
3441
|
-
const
|
|
3442
|
-
if (
|
|
3443
|
-
bgRGB = compositeOver([
|
|
3444
|
-
pill.el.setAttribute("fill", `rgb(${
|
|
3441
|
+
const pr = toRGBA(pill.fill);
|
|
3442
|
+
if (pr) {
|
|
3443
|
+
bgRGB = compositeOver([pr[0], pr[1], pr[2], 0.9], bgRGB);
|
|
3444
|
+
pill.el.setAttribute("fill", `rgb(${pr[0]}, ${pr[1]}, ${pr[2]})`);
|
|
3445
3445
|
pill.el.setAttribute("fill-opacity", "0.9");
|
|
3446
3446
|
report.pillsBoosted++;
|
|
3447
3447
|
}
|
|
@@ -3584,9 +3584,9 @@ function compileRenderFn(code, win, doc, d3) {
|
|
|
3584
3584
|
"[@bicharts/chart-host] the generated code could not be COMPILED, so nothing was drawn. This path evaluates the chart as a code string, which cannot contain ES-module syntax" + (modular ? " \u2014 and this code still has `import`/`export` in it after the export clause was stripped. Either request the plain form from the generator, or `import` the module yourself and pass the render function directly." : ".") + " Original error: " + msg
|
|
3585
3585
|
);
|
|
3586
3586
|
}
|
|
3587
|
-
const
|
|
3588
|
-
if (typeof
|
|
3589
|
-
return
|
|
3587
|
+
const fn2 = factory.call(null, null, null, null, win, doc, writableD3(d3));
|
|
3588
|
+
if (typeof fn2 !== "function") throw new Error("generated code did not define render(container, data, options)");
|
|
3589
|
+
return fn2;
|
|
3590
3590
|
}
|
|
3591
3591
|
var ASYNC_RENDER_TIMEOUT_MS = 15e3;
|
|
3592
3592
|
var isThenable = (v2) => !!v2 && (typeof v2 === "object" || typeof v2 === "function") && typeof v2.then === "function";
|
|
@@ -3651,9 +3651,9 @@ function createChartHost(container, config) {
|
|
|
3651
3651
|
const ensureAffordanceStyles = () => {
|
|
3652
3652
|
try {
|
|
3653
3653
|
if (!doc || doc.getElementById("bic-chart-host-affordances")) return;
|
|
3654
|
-
const
|
|
3655
|
-
|
|
3656
|
-
|
|
3654
|
+
const st = doc.createElement("style");
|
|
3655
|
+
st.id = "bic-chart-host-affordances";
|
|
3656
|
+
st.textContent = `
|
|
3657
3657
|
/* TYPOGRAPHY FIREWALL. Generated charts set font-size but almost never line-height or
|
|
3658
3658
|
letter-spacing, so they INHERIT whatever the host page cascades in. A page with
|
|
3659
3659
|
\`:root { font: 18px/145% }\` (the stock Vite template does exactly this) hands every
|
|
@@ -3702,7 +3702,7 @@ function createChartHost(container, config) {
|
|
|
3702
3702
|
font-weight: 700 !important;
|
|
3703
3703
|
text-decoration: underline !important;
|
|
3704
3704
|
}`;
|
|
3705
|
-
(doc.head || doc.documentElement)?.appendChild(
|
|
3705
|
+
(doc.head || doc.documentElement)?.appendChild(st);
|
|
3706
3706
|
} catch {
|
|
3707
3707
|
}
|
|
3708
3708
|
};
|
|
@@ -3720,8 +3720,8 @@ function createChartHost(container, config) {
|
|
|
3720
3720
|
const marks = container.querySelectorAll(`.${MARK_CLASS}[${ROW_IDX_ATTR}], .${LEGEND_MARK_CLASS}[${ROW_IDX_ATTR}]`);
|
|
3721
3721
|
for (const m2 of Array.from(marks)) {
|
|
3722
3722
|
const rows = parseRowIdxs(m2.getAttribute(ROW_IDX_ATTR));
|
|
3723
|
-
const
|
|
3724
|
-
m2.classList?.[
|
|
3723
|
+
const on = active && rows.some((r2) => wanted.has(r2));
|
|
3724
|
+
m2.classList?.[on ? "add" : "remove"](MARK_SELECTED_CLASS);
|
|
3725
3725
|
}
|
|
3726
3726
|
} catch {
|
|
3727
3727
|
}
|
|
@@ -3918,9 +3918,9 @@ function createChartHost(container, config) {
|
|
|
3918
3918
|
`[@bicharts/chart-host] the chart did not finish drawing within ${Math.round(ASYNC_RENDER_TIMEOUT_MS / 1e3)}s, so the host stopped waiting for it. Nothing past that point ran: no label-contrast pass, no hit-target heal, no census, no fit. A render() that returns a promise has to settle it.`
|
|
3919
3919
|
));
|
|
3920
3920
|
}, ASYNC_RENDER_TIMEOUT_MS);
|
|
3921
|
-
const done = (
|
|
3921
|
+
const done = (fn2) => {
|
|
3922
3922
|
clearTimeout(timer);
|
|
3923
|
-
|
|
3923
|
+
fn2();
|
|
3924
3924
|
};
|
|
3925
3925
|
Promise.resolve(outcome).then(
|
|
3926
3926
|
() => done(() => {
|
|
@@ -4007,11 +4007,11 @@ function toSourceRows(rowMap, payloadRowIdxs) {
|
|
|
4007
4007
|
return payloadRowIdxs.map((i) => rowMap[i]).filter((i) => i !== void 0);
|
|
4008
4008
|
}
|
|
4009
4009
|
function toPayloadRows(rowMap, sourceRowIdxs) {
|
|
4010
|
-
const
|
|
4010
|
+
const at2 = /* @__PURE__ */ new Map();
|
|
4011
4011
|
rowMap.forEach((src, k3) => {
|
|
4012
|
-
if (!
|
|
4012
|
+
if (!at2.has(src)) at2.set(src, k3);
|
|
4013
4013
|
});
|
|
4014
|
-
return sourceRowIdxs.map((s) =>
|
|
4014
|
+
return sourceRowIdxs.map((s) => at2.get(s)).filter((k3) => k3 !== void 0);
|
|
4015
4015
|
}
|
|
4016
4016
|
var sameRows = (a2, b4) => {
|
|
4017
4017
|
if (a2.length !== b4.length) return false;
|
|
@@ -4196,10 +4196,10 @@ export {
|
|
|
4196
4196
|
le,
|
|
4197
4197
|
L2 as L,
|
|
4198
4198
|
L3,
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4199
|
+
qe,
|
|
4200
|
+
Qe,
|
|
4201
|
+
Zn2 as Zn,
|
|
4202
|
+
Qn,
|
|
4203
4203
|
buildRenderPayload,
|
|
4204
4204
|
stripJsComments,
|
|
4205
4205
|
rowIdxsFromMark,
|
package/dist/index.mjs
CHANGED
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
AXIS_PIN_MIN_LABELS,
|
|
21
21
|
AXIS_PIN_TRACK_REACH_PX,
|
|
22
22
|
BACKING_MAJORITY,
|
|
23
|
-
Bn,
|
|
24
23
|
COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT,
|
|
25
24
|
COLOR_SCALE_SELF_CLAMP_PCT_MAX,
|
|
26
25
|
COLOR_SCALE_SELF_CLAMP_PCT_MIN,
|
|
@@ -37,10 +36,8 @@ import {
|
|
|
37
36
|
FLIP_MODE_DEFAULT,
|
|
38
37
|
GEO_POINT_PRECISIONS,
|
|
39
38
|
GLYPH_SAMPLE_N,
|
|
40
|
-
Gn,
|
|
41
39
|
HOST_CONTAINER_CLASS,
|
|
42
40
|
HOST_CONTRACT_VERSION,
|
|
43
|
-
He,
|
|
44
41
|
L,
|
|
45
42
|
L3,
|
|
46
43
|
LABEL_CONTRAST_CAP,
|
|
@@ -60,6 +57,8 @@ import {
|
|
|
60
57
|
PILL_MIN_ALPHA,
|
|
61
58
|
PILL_MIN_COVERAGE,
|
|
62
59
|
PILL_OPAQUE_ALPHA,
|
|
60
|
+
Qe,
|
|
61
|
+
Qn,
|
|
63
62
|
ROW_IDX_ATTR,
|
|
64
63
|
SAME_SHADE_DELTA_E,
|
|
65
64
|
SCROLL_SLACK_PX,
|
|
@@ -71,7 +70,7 @@ import {
|
|
|
71
70
|
VIEW_ONLY_UI_STATE_KEYS,
|
|
72
71
|
WHITE_TEXT_BG_LUM,
|
|
73
72
|
XFILTER_REFRESH_EVENT,
|
|
74
|
-
|
|
73
|
+
Zn,
|
|
75
74
|
applyLabelContrast,
|
|
76
75
|
assembleD3,
|
|
77
76
|
autoRampCanvas,
|
|
@@ -128,6 +127,7 @@ import {
|
|
|
128
127
|
pinScrolledAxis,
|
|
129
128
|
planAxisPin,
|
|
130
129
|
planFrameGrow,
|
|
130
|
+
qe,
|
|
131
131
|
registerGeo,
|
|
132
132
|
registerGeoAsset,
|
|
133
133
|
relativeLuminance,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
unpinScrolledAxis,
|
|
147
147
|
valuePlacementFlag,
|
|
148
148
|
withoutViewOnlyKeys
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-XWVIYCMM.mjs";
|
|
150
150
|
import "./chunk-A2GMXZP7.mjs";
|
|
151
151
|
import "./chunk-GHODWOAL.mjs";
|
|
152
152
|
|
|
@@ -1493,15 +1493,15 @@ function displayText(col, raw, opts) {
|
|
|
1493
1493
|
return String(raw);
|
|
1494
1494
|
}
|
|
1495
1495
|
function isSuppressed(col) {
|
|
1496
|
-
return
|
|
1496
|
+
return qe(col).suppressed;
|
|
1497
1497
|
}
|
|
1498
1498
|
function resolveAgg(col, requested, auto) {
|
|
1499
1499
|
const fallback = () => {
|
|
1500
|
-
const d2 =
|
|
1500
|
+
const d2 = Zn(col);
|
|
1501
1501
|
return d2 === "first" ? "count" : d2;
|
|
1502
1502
|
};
|
|
1503
1503
|
if (auto) return fallback();
|
|
1504
|
-
return
|
|
1504
|
+
return Qe(col).indexOf(requested) >= 0 ? requested : fallback();
|
|
1505
1505
|
}
|
|
1506
1506
|
function toNumber(v2) {
|
|
1507
1507
|
if (v2 == null || v2 === "") return null;
|
|
@@ -1604,7 +1604,7 @@ function computeSelectionCard(payload, selectedRowIdxs, opts = {}) {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
const value = reduce(selVals, colAgg, selRaw);
|
|
1606
1606
|
let sharePct = null;
|
|
1607
|
-
if (
|
|
1607
|
+
if (Qn(col, colAgg) && value != null) {
|
|
1608
1608
|
const allVals = [];
|
|
1609
1609
|
const allRaw = [];
|
|
1610
1610
|
for (let r2 = 0; r2 < rows.length; r2++) {
|
package/dist/react.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.45",
|
|
4
4
|
"description": "Run a BIC-generated D3 chart in any web host: compiles the generated render() function, applies the shared option defaults, resolves mark clicks (through tooltip overlays), owns the selection affordance, and translates row indices between cross-filtered charts. The same contract the BIC Power BI visual implements, minus Power BI. React bindings at @bicharts/chart-host/react.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|