@uwdata/vgplot 0.6.1 → 0.7.0
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/LICENSE +19 -0
- package/dist/vgplot.js +398 -355
- package/dist/vgplot.min.js +14 -14
- package/package.json +6 -6
package/dist/vgplot.js
CHANGED
|
@@ -12884,6 +12884,15 @@ var Query = class _Query {
|
|
|
12884
12884
|
static except(...queries) {
|
|
12885
12885
|
return new SetOperation("EXCEPT", queries.flat());
|
|
12886
12886
|
}
|
|
12887
|
+
static describe(query) {
|
|
12888
|
+
const q2 = query.clone();
|
|
12889
|
+
const { clone, toString } = q2;
|
|
12890
|
+
return Object.assign(q2, {
|
|
12891
|
+
describe: true,
|
|
12892
|
+
clone: () => _Query.describe(clone.call(q2)),
|
|
12893
|
+
toString: () => `DESCRIBE ${toString.call(q2)}`
|
|
12894
|
+
});
|
|
12895
|
+
}
|
|
12887
12896
|
constructor() {
|
|
12888
12897
|
this.query = {
|
|
12889
12898
|
with: [],
|
|
@@ -13118,6 +13127,7 @@ var Query = class _Query {
|
|
|
13118
13127
|
}
|
|
13119
13128
|
toString() {
|
|
13120
13129
|
const {
|
|
13130
|
+
with: cte,
|
|
13121
13131
|
select: select2,
|
|
13122
13132
|
distinct: distinct2,
|
|
13123
13133
|
from: from2,
|
|
@@ -13129,8 +13139,7 @@ var Query = class _Query {
|
|
|
13129
13139
|
qualify,
|
|
13130
13140
|
orderby,
|
|
13131
13141
|
limit,
|
|
13132
|
-
offset: offset2
|
|
13133
|
-
with: cte
|
|
13142
|
+
offset: offset2
|
|
13134
13143
|
} = this.query;
|
|
13135
13144
|
const sql2 = [];
|
|
13136
13145
|
if (cte.length) {
|
|
@@ -13252,6 +13261,9 @@ var SetOperation = class _SetOperation {
|
|
|
13252
13261
|
function isQuery(value) {
|
|
13253
13262
|
return value instanceof Query || value instanceof SetOperation;
|
|
13254
13263
|
}
|
|
13264
|
+
function isDescribeQuery(value) {
|
|
13265
|
+
return isQuery(value) && value.describe;
|
|
13266
|
+
}
|
|
13255
13267
|
function unquote(s2) {
|
|
13256
13268
|
return isDoubleQuoted(s2) ? s2.slice(1, -1) : s2;
|
|
13257
13269
|
}
|
|
@@ -13433,131 +13445,6 @@ function toDuckDBValue(value) {
|
|
|
13433
13445
|
}
|
|
13434
13446
|
}
|
|
13435
13447
|
|
|
13436
|
-
// ../core/src/util/js-type.js
|
|
13437
|
-
function jsType(type2) {
|
|
13438
|
-
switch (type2) {
|
|
13439
|
-
case "BIGINT":
|
|
13440
|
-
case "HUGEINT":
|
|
13441
|
-
case "INTEGER":
|
|
13442
|
-
case "SMALLINT":
|
|
13443
|
-
case "TINYINT":
|
|
13444
|
-
case "UBIGINT":
|
|
13445
|
-
case "UINTEGER":
|
|
13446
|
-
case "USMALLINT":
|
|
13447
|
-
case "UTINYINT":
|
|
13448
|
-
case "DOUBLE":
|
|
13449
|
-
case "FLOAT":
|
|
13450
|
-
case "REAL":
|
|
13451
|
-
case "DECIMAL":
|
|
13452
|
-
return "number";
|
|
13453
|
-
case "DATE":
|
|
13454
|
-
case "TIMESTAMP":
|
|
13455
|
-
case "TIMESTAMPTZ":
|
|
13456
|
-
case "TIMESTAMP WITH TIME ZONE":
|
|
13457
|
-
case "TIME":
|
|
13458
|
-
case "TIMESTAMP_NS":
|
|
13459
|
-
return "date";
|
|
13460
|
-
case "BOOLEAN":
|
|
13461
|
-
return "boolean";
|
|
13462
|
-
case "VARCHAR":
|
|
13463
|
-
case "UUID":
|
|
13464
|
-
return "string";
|
|
13465
|
-
case "LIST":
|
|
13466
|
-
return "array";
|
|
13467
|
-
case "BLOB":
|
|
13468
|
-
case "STRUCT":
|
|
13469
|
-
case "MAP":
|
|
13470
|
-
return "object";
|
|
13471
|
-
default:
|
|
13472
|
-
throw new Error(`Unsupported type: ${type2}`);
|
|
13473
|
-
}
|
|
13474
|
-
}
|
|
13475
|
-
|
|
13476
|
-
// ../core/src/util/summarize.js
|
|
13477
|
-
var Count = "count";
|
|
13478
|
-
var Nulls = "nulls";
|
|
13479
|
-
var Max = "max";
|
|
13480
|
-
var Min = "min";
|
|
13481
|
-
var Distinct = "distinct";
|
|
13482
|
-
var statMap = {
|
|
13483
|
-
[Count]: count,
|
|
13484
|
-
[Distinct]: (column3) => count(column3).distinct(),
|
|
13485
|
-
[Max]: max,
|
|
13486
|
-
[Min]: min,
|
|
13487
|
-
[Nulls]: (column3) => count().where(isNull(column3))
|
|
13488
|
-
};
|
|
13489
|
-
function summarize({ table: table3, column: column3 }, stats) {
|
|
13490
|
-
return Query.from(table3).select(stats.map((s2) => [s2, statMap[s2](column3)]));
|
|
13491
|
-
}
|
|
13492
|
-
|
|
13493
|
-
// ../core/src/Catalog.js
|
|
13494
|
-
var object = () => /* @__PURE__ */ Object.create(null);
|
|
13495
|
-
var Catalog = class {
|
|
13496
|
-
constructor(coordinator2) {
|
|
13497
|
-
this.mc = coordinator2;
|
|
13498
|
-
this.clear();
|
|
13499
|
-
}
|
|
13500
|
-
clear() {
|
|
13501
|
-
this.tables = object();
|
|
13502
|
-
}
|
|
13503
|
-
tableInfo(table3) {
|
|
13504
|
-
const cache = this.tables;
|
|
13505
|
-
if (cache[table3]) {
|
|
13506
|
-
return cache[table3];
|
|
13507
|
-
}
|
|
13508
|
-
const infoPromise = getTableInfo(this.mc, table3).catch((err) => {
|
|
13509
|
-
cache[table3] = null;
|
|
13510
|
-
throw err;
|
|
13511
|
-
});
|
|
13512
|
-
return cache[table3] = infoPromise;
|
|
13513
|
-
}
|
|
13514
|
-
async fieldInfo({ table: table3, column: column3, stats }) {
|
|
13515
|
-
const tableInfo = await this.tableInfo(table3);
|
|
13516
|
-
const colInfo = tableInfo[column3];
|
|
13517
|
-
if (colInfo == null)
|
|
13518
|
-
return;
|
|
13519
|
-
if (!stats?.length)
|
|
13520
|
-
return colInfo;
|
|
13521
|
-
const result = await this.mc.query(
|
|
13522
|
-
summarize(colInfo, stats),
|
|
13523
|
-
{ persist: true }
|
|
13524
|
-
);
|
|
13525
|
-
const info = { ...colInfo, ...Array.from(result)[0] };
|
|
13526
|
-
for (const key in info) {
|
|
13527
|
-
const value = info[key];
|
|
13528
|
-
if (typeof value === "bigint") {
|
|
13529
|
-
info[key] = Number(value);
|
|
13530
|
-
}
|
|
13531
|
-
}
|
|
13532
|
-
return info;
|
|
13533
|
-
}
|
|
13534
|
-
async queryFields(fields) {
|
|
13535
|
-
const list = await resolveFields(this, fields);
|
|
13536
|
-
const data = await Promise.all(list.map((f2) => this.fieldInfo(f2)));
|
|
13537
|
-
return data.filter((x4) => x4);
|
|
13538
|
-
}
|
|
13539
|
-
};
|
|
13540
|
-
async function getTableInfo(mc, table3) {
|
|
13541
|
-
const result = await mc.query(
|
|
13542
|
-
`DESCRIBE ${asRelation(table3)}`,
|
|
13543
|
-
{ type: "json", cache: false }
|
|
13544
|
-
);
|
|
13545
|
-
const columns = object();
|
|
13546
|
-
for (const entry of result) {
|
|
13547
|
-
columns[entry.column_name] = {
|
|
13548
|
-
table: table3,
|
|
13549
|
-
column: entry.column_name,
|
|
13550
|
-
sqlType: entry.column_type,
|
|
13551
|
-
type: jsType(entry.column_type),
|
|
13552
|
-
nullable: entry.null === "YES"
|
|
13553
|
-
};
|
|
13554
|
-
}
|
|
13555
|
-
return columns;
|
|
13556
|
-
}
|
|
13557
|
-
async function resolveFields(catalog, list) {
|
|
13558
|
-
return list.length === 1 && list[0].column === "*" ? Object.values(await catalog.tableInfo(list[0].table)) : list;
|
|
13559
|
-
}
|
|
13560
|
-
|
|
13561
13448
|
// ../core/src/util/hash.js
|
|
13562
13449
|
function fnv_hash(v3) {
|
|
13563
13450
|
let a3 = 2166136261;
|
|
@@ -13917,7 +13804,7 @@ function consolidate(group3, enqueue, record) {
|
|
|
13917
13804
|
type: "arrow",
|
|
13918
13805
|
cache: false,
|
|
13919
13806
|
record: false,
|
|
13920
|
-
query: consolidatedQuery(group3, record)
|
|
13807
|
+
query: group3.query = consolidatedQuery(group3, record)
|
|
13921
13808
|
},
|
|
13922
13809
|
result: group3.result = queryResult()
|
|
13923
13810
|
});
|
|
@@ -13965,7 +13852,7 @@ function consolidatedQuery(group3, record) {
|
|
|
13965
13852
|
return query.$select(Array.from(fields.values()));
|
|
13966
13853
|
}
|
|
13967
13854
|
async function processResults(group3, cache) {
|
|
13968
|
-
const { maps, result } = group3;
|
|
13855
|
+
const { maps, query, result } = group3;
|
|
13969
13856
|
if (!maps)
|
|
13970
13857
|
return;
|
|
13971
13858
|
let data;
|
|
@@ -13977,25 +13864,33 @@ async function processResults(group3, cache) {
|
|
|
13977
13864
|
}
|
|
13978
13865
|
return;
|
|
13979
13866
|
}
|
|
13867
|
+
const describe = isDescribeQuery(query);
|
|
13980
13868
|
group3.forEach(({ entry }, index2) => {
|
|
13981
13869
|
const { request, result: result2 } = entry;
|
|
13982
|
-
const
|
|
13870
|
+
const map4 = maps[index2];
|
|
13871
|
+
const extract = describe && map4 ? filterResult(data, map4) : map4 ? projectResult(data, map4) : data;
|
|
13983
13872
|
if (request.cache) {
|
|
13984
|
-
cache.set(String(request.query),
|
|
13873
|
+
cache.set(String(request.query), extract);
|
|
13985
13874
|
}
|
|
13986
|
-
result2.fulfill(
|
|
13875
|
+
result2.fulfill(extract);
|
|
13987
13876
|
});
|
|
13988
13877
|
}
|
|
13989
13878
|
function projectResult(data, map4) {
|
|
13990
|
-
|
|
13991
|
-
|
|
13992
|
-
|
|
13993
|
-
|
|
13879
|
+
const cols = {};
|
|
13880
|
+
for (const [name2, as] of map4) {
|
|
13881
|
+
cols[as] = data.getChild(name2);
|
|
13882
|
+
}
|
|
13883
|
+
return new data.constructor(cols);
|
|
13884
|
+
}
|
|
13885
|
+
function filterResult(data, map4) {
|
|
13886
|
+
const lookup = new Map(map4);
|
|
13887
|
+
const result = [];
|
|
13888
|
+
for (const d of data) {
|
|
13889
|
+
if (lookup.has(d.column_name)) {
|
|
13890
|
+
result.push({ ...d, column_name: lookup.get(d.column_name) });
|
|
13994
13891
|
}
|
|
13995
|
-
return new data.constructor(cols);
|
|
13996
|
-
} else {
|
|
13997
|
-
return data;
|
|
13998
13892
|
}
|
|
13893
|
+
return result;
|
|
13999
13894
|
}
|
|
14000
13895
|
|
|
14001
13896
|
// ../core/src/util/cache.js
|
|
@@ -14242,6 +14137,197 @@ function QueryManager() {
|
|
|
14242
14137
|
};
|
|
14243
14138
|
}
|
|
14244
14139
|
|
|
14140
|
+
// ../core/src/util/js-type.js
|
|
14141
|
+
function jsType(type2) {
|
|
14142
|
+
switch (type2) {
|
|
14143
|
+
case "BIGINT":
|
|
14144
|
+
case "HUGEINT":
|
|
14145
|
+
case "INTEGER":
|
|
14146
|
+
case "SMALLINT":
|
|
14147
|
+
case "TINYINT":
|
|
14148
|
+
case "UBIGINT":
|
|
14149
|
+
case "UINTEGER":
|
|
14150
|
+
case "USMALLINT":
|
|
14151
|
+
case "UTINYINT":
|
|
14152
|
+
case "DOUBLE":
|
|
14153
|
+
case "FLOAT":
|
|
14154
|
+
case "REAL":
|
|
14155
|
+
return "number";
|
|
14156
|
+
case "DATE":
|
|
14157
|
+
case "TIMESTAMP":
|
|
14158
|
+
case "TIMESTAMPTZ":
|
|
14159
|
+
case "TIMESTAMP WITH TIME ZONE":
|
|
14160
|
+
case "TIME":
|
|
14161
|
+
case "TIMESTAMP_NS":
|
|
14162
|
+
return "date";
|
|
14163
|
+
case "BOOLEAN":
|
|
14164
|
+
return "boolean";
|
|
14165
|
+
case "VARCHAR":
|
|
14166
|
+
case "UUID":
|
|
14167
|
+
return "string";
|
|
14168
|
+
case "ARRAY":
|
|
14169
|
+
case "LIST":
|
|
14170
|
+
return "array";
|
|
14171
|
+
case "BLOB":
|
|
14172
|
+
case "STRUCT":
|
|
14173
|
+
case "MAP":
|
|
14174
|
+
case "GEOMETRY":
|
|
14175
|
+
return "object";
|
|
14176
|
+
default:
|
|
14177
|
+
if (type2.startsWith("DECIMAL")) {
|
|
14178
|
+
return "number";
|
|
14179
|
+
} else if (type2.startsWith("STRUCT") || type2.startsWith("MAP")) {
|
|
14180
|
+
return "object";
|
|
14181
|
+
} else if (type2.endsWith("]")) {
|
|
14182
|
+
return "array";
|
|
14183
|
+
}
|
|
14184
|
+
throw new Error(`Unsupported type: ${type2}`);
|
|
14185
|
+
}
|
|
14186
|
+
}
|
|
14187
|
+
|
|
14188
|
+
// ../core/src/util/convert-arrow.js
|
|
14189
|
+
var INTEGER = 2;
|
|
14190
|
+
var FLOAT = 3;
|
|
14191
|
+
var DECIMAL = 7;
|
|
14192
|
+
var TIMESTAMP = 10;
|
|
14193
|
+
function isArrowTable(values2) {
|
|
14194
|
+
return typeof values2?.getChild === "function";
|
|
14195
|
+
}
|
|
14196
|
+
function convertArrowArrayType(type2) {
|
|
14197
|
+
switch (type2.typeId) {
|
|
14198
|
+
case INTEGER:
|
|
14199
|
+
case FLOAT:
|
|
14200
|
+
case DECIMAL:
|
|
14201
|
+
return Float64Array;
|
|
14202
|
+
default:
|
|
14203
|
+
return Array;
|
|
14204
|
+
}
|
|
14205
|
+
}
|
|
14206
|
+
function convertArrowValue(type2) {
|
|
14207
|
+
const { typeId } = type2;
|
|
14208
|
+
if (typeId === TIMESTAMP) {
|
|
14209
|
+
return (v3) => v3 == null ? v3 : new Date(v3);
|
|
14210
|
+
}
|
|
14211
|
+
if (typeId === INTEGER && type2.bitWidth >= 64) {
|
|
14212
|
+
return (v3) => v3 == null ? v3 : Number(v3);
|
|
14213
|
+
}
|
|
14214
|
+
if (typeId === DECIMAL) {
|
|
14215
|
+
const scale3 = 1 / Math.pow(10, type2.scale);
|
|
14216
|
+
return (v3) => v3 == null ? v3 : decimalToNumber(v3, scale3);
|
|
14217
|
+
}
|
|
14218
|
+
return (v3) => v3;
|
|
14219
|
+
}
|
|
14220
|
+
function convertArrowColumn(column3) {
|
|
14221
|
+
const { type: type2 } = column3;
|
|
14222
|
+
const { typeId } = type2;
|
|
14223
|
+
if (typeId === TIMESTAMP) {
|
|
14224
|
+
const size = column3.length;
|
|
14225
|
+
const array3 = new Array(size);
|
|
14226
|
+
for (let row = 0; row < size; ++row) {
|
|
14227
|
+
const v3 = column3.get(row);
|
|
14228
|
+
array3[row] = v3 == null ? null : new Date(v3);
|
|
14229
|
+
}
|
|
14230
|
+
return array3;
|
|
14231
|
+
}
|
|
14232
|
+
if (typeId === INTEGER && type2.bitWidth >= 64) {
|
|
14233
|
+
const size = column3.length;
|
|
14234
|
+
const array3 = new Float64Array(size);
|
|
14235
|
+
for (let row = 0; row < size; ++row) {
|
|
14236
|
+
const v3 = column3.get(row);
|
|
14237
|
+
array3[row] = v3 == null ? NaN : Number(v3);
|
|
14238
|
+
}
|
|
14239
|
+
return array3;
|
|
14240
|
+
}
|
|
14241
|
+
if (typeId === DECIMAL) {
|
|
14242
|
+
const scale3 = 1 / Math.pow(10, type2.scale);
|
|
14243
|
+
const size = column3.length;
|
|
14244
|
+
const array3 = new Float64Array(size);
|
|
14245
|
+
for (let row = 0; row < size; ++row) {
|
|
14246
|
+
const v3 = column3.get(row);
|
|
14247
|
+
array3[row] = v3 == null ? NaN : decimalToNumber(v3, scale3);
|
|
14248
|
+
}
|
|
14249
|
+
return array3;
|
|
14250
|
+
}
|
|
14251
|
+
return column3.toArray();
|
|
14252
|
+
}
|
|
14253
|
+
var BASE32 = Array.from(
|
|
14254
|
+
{ length: 8 },
|
|
14255
|
+
(_2, i) => Math.pow(2, i * 32)
|
|
14256
|
+
);
|
|
14257
|
+
function decimalToNumber(v3, scale3) {
|
|
14258
|
+
const n = v3.length;
|
|
14259
|
+
let x4 = 0;
|
|
14260
|
+
if (v3.signed && (v3[n - 1] | 0) < 0) {
|
|
14261
|
+
for (let i = 0; i < n; ++i) {
|
|
14262
|
+
x4 += ~(v3[i] | 0) * BASE32[i];
|
|
14263
|
+
}
|
|
14264
|
+
x4 = -(x4 + 1);
|
|
14265
|
+
} else {
|
|
14266
|
+
for (let i = 0; i < n; ++i) {
|
|
14267
|
+
x4 += v3[i] * BASE32[i];
|
|
14268
|
+
}
|
|
14269
|
+
}
|
|
14270
|
+
return x4 * scale3;
|
|
14271
|
+
}
|
|
14272
|
+
|
|
14273
|
+
// ../core/src/util/field-info.js
|
|
14274
|
+
var Count = "count";
|
|
14275
|
+
var Nulls = "nulls";
|
|
14276
|
+
var Max = "max";
|
|
14277
|
+
var Min = "min";
|
|
14278
|
+
var Distinct = "distinct";
|
|
14279
|
+
var statMap = {
|
|
14280
|
+
[Count]: count,
|
|
14281
|
+
[Distinct]: (column3) => count(column3).distinct(),
|
|
14282
|
+
[Max]: max,
|
|
14283
|
+
[Min]: min,
|
|
14284
|
+
[Nulls]: (column3) => count().where(isNull(column3))
|
|
14285
|
+
};
|
|
14286
|
+
function summarize(table3, column3, stats) {
|
|
14287
|
+
return Query.from(table3).select(Array.from(stats, (s2) => [s2, statMap[s2](column3)]));
|
|
14288
|
+
}
|
|
14289
|
+
async function queryFieldInfo(mc, fields) {
|
|
14290
|
+
if (fields.length === 1 && `${fields[0].column}` === "*") {
|
|
14291
|
+
return getTableInfo(mc, fields[0].table);
|
|
14292
|
+
} else {
|
|
14293
|
+
return (await Promise.all(fields.map((f2) => getFieldInfo(mc, f2)))).filter((x4) => x4);
|
|
14294
|
+
}
|
|
14295
|
+
}
|
|
14296
|
+
async function getFieldInfo(mc, { table: table3, column: column3, stats }) {
|
|
14297
|
+
const q2 = Query.from({ source: table3 }).select({ column: column3 }).groupby(column3.aggregate ? sql`ALL` : []);
|
|
14298
|
+
const [desc2] = Array.from(await mc.query(Query.describe(q2)));
|
|
14299
|
+
const info = {
|
|
14300
|
+
table: table3,
|
|
14301
|
+
column: `${column3}`,
|
|
14302
|
+
sqlType: desc2.column_type,
|
|
14303
|
+
type: jsType(desc2.column_type),
|
|
14304
|
+
nullable: desc2.null === "YES"
|
|
14305
|
+
};
|
|
14306
|
+
if (!(stats?.length || stats?.size))
|
|
14307
|
+
return info;
|
|
14308
|
+
const result = await mc.query(
|
|
14309
|
+
summarize(table3, column3, stats),
|
|
14310
|
+
{ persist: true }
|
|
14311
|
+
);
|
|
14312
|
+
for (let i = 0; i < result.numCols; ++i) {
|
|
14313
|
+
const { name: name2 } = result.schema.fields[i];
|
|
14314
|
+
const child = result.getChildAt(i);
|
|
14315
|
+
const convert = convertArrowValue(child.type);
|
|
14316
|
+
info[name2] = convert(child.get(0));
|
|
14317
|
+
}
|
|
14318
|
+
return info;
|
|
14319
|
+
}
|
|
14320
|
+
async function getTableInfo(mc, table3) {
|
|
14321
|
+
const result = await mc.query(`DESCRIBE ${asRelation(table3)}`);
|
|
14322
|
+
return Array.from(result).map((desc2) => ({
|
|
14323
|
+
table: table3,
|
|
14324
|
+
column: desc2.column_name,
|
|
14325
|
+
sqlType: desc2.column_type,
|
|
14326
|
+
type: jsType(desc2.column_type),
|
|
14327
|
+
nullable: desc2.null === "YES"
|
|
14328
|
+
}));
|
|
14329
|
+
}
|
|
14330
|
+
|
|
14245
14331
|
// ../core/src/util/void-logger.js
|
|
14246
14332
|
function voidLogger() {
|
|
14247
14333
|
return {
|
|
@@ -14274,7 +14360,6 @@ var Coordinator = class {
|
|
|
14274
14360
|
logger = console,
|
|
14275
14361
|
manager = QueryManager()
|
|
14276
14362
|
} = options;
|
|
14277
|
-
this.catalog = new Catalog(this);
|
|
14278
14363
|
this.manager = manager;
|
|
14279
14364
|
this.logger(logger);
|
|
14280
14365
|
this.configure(options);
|
|
@@ -14293,7 +14378,7 @@ var Coordinator = class {
|
|
|
14293
14378
|
this.manager.consolidate(consolidate2);
|
|
14294
14379
|
this.indexes = indexes2;
|
|
14295
14380
|
}
|
|
14296
|
-
clear({ clients = true, cache = true
|
|
14381
|
+
clear({ clients = true, cache = true } = {}) {
|
|
14297
14382
|
this.manager.clear();
|
|
14298
14383
|
if (clients) {
|
|
14299
14384
|
this.clients?.forEach((client) => this.disconnect(client));
|
|
@@ -14303,8 +14388,6 @@ var Coordinator = class {
|
|
|
14303
14388
|
}
|
|
14304
14389
|
if (cache)
|
|
14305
14390
|
this.manager.cache().clear();
|
|
14306
|
-
if (catalog)
|
|
14307
|
-
this.catalog.clear();
|
|
14308
14391
|
}
|
|
14309
14392
|
databaseConnector(db) {
|
|
14310
14393
|
return this.manager.connector(db);
|
|
@@ -14357,7 +14440,7 @@ var Coordinator = class {
|
|
|
14357
14440
|
* @param {import('./MosaicClient.js').MosaicClient} client the client to disconnect
|
|
14358
14441
|
*/
|
|
14359
14442
|
async connect(client) {
|
|
14360
|
-
const {
|
|
14443
|
+
const { clients, filterGroups, indexes: indexes2 } = this;
|
|
14361
14444
|
if (clients.has(client)) {
|
|
14362
14445
|
throw new Error("Client already connected.");
|
|
14363
14446
|
}
|
|
@@ -14365,7 +14448,7 @@ var Coordinator = class {
|
|
|
14365
14448
|
client.coordinator = this;
|
|
14366
14449
|
const fields = client.fields();
|
|
14367
14450
|
if (fields?.length) {
|
|
14368
|
-
client.fieldInfo(await
|
|
14451
|
+
client.fieldInfo(await queryFieldInfo(this, fields));
|
|
14369
14452
|
}
|
|
14370
14453
|
const filter3 = client.filterBy;
|
|
14371
14454
|
if (filter3) {
|
|
@@ -26211,7 +26294,7 @@ var C = () => (async (s2) => {
|
|
|
26211
26294
|
return false;
|
|
26212
26295
|
}
|
|
26213
26296
|
})(new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 4, 1, 3, 1, 1, 10, 11, 1, 9, 0, 65, 0, 254, 16, 2, 0, 26, 11]));
|
|
26214
|
-
var _ = { name: "@duckdb/duckdb-wasm", version: "1.28.1-
|
|
26297
|
+
var _ = { name: "@duckdb/duckdb-wasm", version: "1.28.1-dev99.0", description: "DuckDB powered by WebAssembly", license: "MIT", repository: { type: "git", url: "https://github.com/duckdb/duckdb-wasm.git" }, keywords: ["sql", "duckdb", "relational", "database", "data", "query", "wasm", "analytics", "olap", "arrow", "parquet", "json", "csv"], dependencies: { "apache-arrow": "^14.0.1" }, devDependencies: { "@types/emscripten": "^1.39.10", "@types/jasmine": "^5.1.4", "@typescript-eslint/eslint-plugin": "^6.18.0", "@typescript-eslint/parser": "^6.18.0", esbuild: "^0.19.10", eslint: "^8.56.0", "eslint-plugin-jasmine": "^4.1.3", "eslint-plugin-react": "^7.33.2", "fast-glob": "^3.3.2", jasmine: "^5.1.0", "jasmine-core": "^5.1.1", "jasmine-spec-reporter": "^7.0.0", "js-sha256": "^0.10.1", karma: "^6.4.2", "karma-chrome-launcher": "^3.2.0", "karma-coverage": "^2.2.1", "karma-firefox-launcher": "^2.1.2", "karma-jasmine": "^5.1.0", "karma-jasmine-html-reporter": "^2.1.0", "karma-sourcemap-loader": "^0.4.0", "karma-spec-reporter": "^0.0.36", "make-dir": "^4.0.0", nyc: "^15.1.0", prettier: "^3.2.2", puppeteer: "^21.7.0", rimraf: "^5.0.5", s3rver: "^3.7.1", typedoc: "^0.25.7", typescript: "^5.3.3", "wasm-feature-detect": "^1.6.1", "web-worker": "^1.2.0" }, scripts: { "build:debug": "node bundle.mjs debug && tsc --emitDeclarationOnly", "build:release": "node bundle.mjs release && tsc --emitDeclarationOnly", docs: "typedoc", report: "node ./coverage.mjs", "test:node": "node --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs", "test:node:debug": "node --inspect-brk --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs", "test:node:coverage": "nyc -r json --report-dir ./coverage/node node ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs", "test:firefox": "karma start ./karma/tests-firefox.cjs", "test:chrome": "karma start ./karma/tests-chrome.cjs", "test:chrome:eh": "karma start ./karma/tests-chrome-eh.cjs", "test:chrome:coverage": "karma start ./karma/tests-chrome-coverage.cjs", "test:browser": "karma start ./karma/tests-all.cjs", "test:browser:debug": "karma start ./karma/tests-debug.cjs", test: "npm run test:chrome && npm run test:node", "test:coverage": "npm run test:chrome:coverage && npm run test:node:coverage && npm run report", lint: "eslint src test" }, files: ["dist", "!dist/types/test"], main: "dist/duckdb-browser.cjs", module: "dist/duckdb-browser.mjs", types: "dist/duckdb-browser.d.ts", jsdelivr: "dist/duckdb-browser.cjs", unpkg: "dist/duckdb-browser.mjs", sideEffects: false, browser: { fs: false, path: false, perf_hooks: false, os: false, worker_threads: false }, exports: { "./dist/duckdb-mvp.wasm": "./dist/duckdb-mvp.wasm", "./dist/duckdb-eh.wasm": "./dist/duckdb-eh.wasm", "./dist/duckdb-coi.wasm": "./dist/duckdb-coi.wasm", "./dist/duckdb-browser": "./dist/duckdb-browser.mjs", "./dist/duckdb-browser.cjs": "./dist/duckdb-browser.cjs", "./dist/duckdb-browser.mjs": "./dist/duckdb-browser.mjs", "./dist/duckdb-browser-blocking": "./dist/duckdb-browser-blocking.mjs", "./dist/duckdb-browser-blocking.mjs": "./dist/duckdb-browser-blocking.mjs", "./dist/duckdb-browser-blocking.cjs": "./dist/duckdb-browser-blocking.cjs", "./dist/duckdb-browser-coi.pthread.worker.js": "./dist/duckdb-browser-coi.pthread.worker.js", "./dist/duckdb-browser-coi.worker.js": "./dist/duckdb-browser-coi.worker.js", "./dist/duckdb-browser-eh.worker.js": "./dist/duckdb-browser-eh.worker.js", "./dist/duckdb-browser-mvp.worker.js": "./dist/duckdb-browser-mvp.worker.js", "./dist/duckdb-node": "./dist/duckdb-node.cjs", "./dist/duckdb-node.cjs": "./dist/duckdb-node.cjs", "./dist/duckdb-node-blocking": "./dist/duckdb-node-blocking.cjs", "./dist/duckdb-node-blocking.cjs": "./dist/duckdb-node-blocking.cjs", "./dist/duckdb-node-eh.worker.cjs": "./dist/duckdb-node-eh.worker.cjs", "./dist/duckdb-node-mvp.worker.cjs": "./dist/duckdb-node-mvp.worker.cjs", "./blocking": { browser: { types: "./dist/duckdb-browser-blocking.d.ts", import: "./dist/duckdb-browser-blocking.mjs", require: "./dist/duckdb-browser-blocking.cjs" }, node: { types: "./dist/duckdb-node-blocking.d.ts", require: "./dist/duckdb-node-blocking.cjs", import: "./dist/duckdb-node-blocking.cjs" }, types: "./dist/duckdb-browser-blocking.d.ts", import: "./dist/duckdb-browser-blocking.mjs", require: "./dist/duckdb-browser-blocking.cjs" }, ".": { browser: { types: "./dist/duckdb-browser.d.ts", import: "./dist/duckdb-browser.mjs", require: "./dist/duckdb-browser.cjs" }, node: { types: "./dist/duckdb-node.d.ts", import: "./dist/duckdb-node.cjs", require: "./dist/duckdb-node.cjs" }, types: "./dist/duckdb-browser.d.ts", import: "./dist/duckdb-browser.mjs", require: "./dist/duckdb-browser.cjs" } } };
|
|
26215
26298
|
var W = _.name;
|
|
26216
26299
|
var v = _.version;
|
|
26217
26300
|
var I = _.version.split(".");
|
|
@@ -33464,46 +33547,46 @@ function streamGeometry(geometry, stream) {
|
|
|
33464
33547
|
}
|
|
33465
33548
|
}
|
|
33466
33549
|
var streamObjectType = {
|
|
33467
|
-
Feature: function(
|
|
33468
|
-
streamGeometry(
|
|
33550
|
+
Feature: function(object, stream) {
|
|
33551
|
+
streamGeometry(object.geometry, stream);
|
|
33469
33552
|
},
|
|
33470
|
-
FeatureCollection: function(
|
|
33471
|
-
var features =
|
|
33553
|
+
FeatureCollection: function(object, stream) {
|
|
33554
|
+
var features = object.features, i = -1, n = features.length;
|
|
33472
33555
|
while (++i < n)
|
|
33473
33556
|
streamGeometry(features[i].geometry, stream);
|
|
33474
33557
|
}
|
|
33475
33558
|
};
|
|
33476
33559
|
var streamGeometryType = {
|
|
33477
|
-
Sphere: function(
|
|
33560
|
+
Sphere: function(object, stream) {
|
|
33478
33561
|
stream.sphere();
|
|
33479
33562
|
},
|
|
33480
|
-
Point: function(
|
|
33481
|
-
|
|
33482
|
-
stream.point(
|
|
33563
|
+
Point: function(object, stream) {
|
|
33564
|
+
object = object.coordinates;
|
|
33565
|
+
stream.point(object[0], object[1], object[2]);
|
|
33483
33566
|
},
|
|
33484
|
-
MultiPoint: function(
|
|
33485
|
-
var coordinates =
|
|
33567
|
+
MultiPoint: function(object, stream) {
|
|
33568
|
+
var coordinates = object.coordinates, i = -1, n = coordinates.length;
|
|
33486
33569
|
while (++i < n)
|
|
33487
|
-
|
|
33570
|
+
object = coordinates[i], stream.point(object[0], object[1], object[2]);
|
|
33488
33571
|
},
|
|
33489
|
-
LineString: function(
|
|
33490
|
-
streamLine(
|
|
33572
|
+
LineString: function(object, stream) {
|
|
33573
|
+
streamLine(object.coordinates, stream, 0);
|
|
33491
33574
|
},
|
|
33492
|
-
MultiLineString: function(
|
|
33493
|
-
var coordinates =
|
|
33575
|
+
MultiLineString: function(object, stream) {
|
|
33576
|
+
var coordinates = object.coordinates, i = -1, n = coordinates.length;
|
|
33494
33577
|
while (++i < n)
|
|
33495
33578
|
streamLine(coordinates[i], stream, 0);
|
|
33496
33579
|
},
|
|
33497
|
-
Polygon: function(
|
|
33498
|
-
streamPolygon(
|
|
33580
|
+
Polygon: function(object, stream) {
|
|
33581
|
+
streamPolygon(object.coordinates, stream);
|
|
33499
33582
|
},
|
|
33500
|
-
MultiPolygon: function(
|
|
33501
|
-
var coordinates =
|
|
33583
|
+
MultiPolygon: function(object, stream) {
|
|
33584
|
+
var coordinates = object.coordinates, i = -1, n = coordinates.length;
|
|
33502
33585
|
while (++i < n)
|
|
33503
33586
|
streamPolygon(coordinates[i], stream);
|
|
33504
33587
|
},
|
|
33505
|
-
GeometryCollection: function(
|
|
33506
|
-
var geometries =
|
|
33588
|
+
GeometryCollection: function(object, stream) {
|
|
33589
|
+
var geometries = object.geometries, i = -1, n = geometries.length;
|
|
33507
33590
|
while (++i < n)
|
|
33508
33591
|
streamGeometry(geometries[i], stream);
|
|
33509
33592
|
}
|
|
@@ -33522,11 +33605,11 @@ function streamPolygon(coordinates, stream) {
|
|
|
33522
33605
|
streamLine(coordinates[i], stream, 1);
|
|
33523
33606
|
stream.polygonEnd();
|
|
33524
33607
|
}
|
|
33525
|
-
function stream_default(
|
|
33526
|
-
if (
|
|
33527
|
-
streamObjectType[
|
|
33608
|
+
function stream_default(object, stream) {
|
|
33609
|
+
if (object && streamObjectType.hasOwnProperty(object.type)) {
|
|
33610
|
+
streamObjectType[object.type](object, stream);
|
|
33528
33611
|
} else {
|
|
33529
|
-
streamGeometry(
|
|
33612
|
+
streamGeometry(object, stream);
|
|
33530
33613
|
}
|
|
33531
33614
|
}
|
|
33532
33615
|
|
|
@@ -33650,12 +33733,12 @@ function centroidRingPoint(lambda, phi) {
|
|
|
33650
33733
|
Z1 += w * (z0 + (z0 = z2));
|
|
33651
33734
|
centroidPointCartesian(x0, y0, z0);
|
|
33652
33735
|
}
|
|
33653
|
-
function centroid_default(
|
|
33736
|
+
function centroid_default(object) {
|
|
33654
33737
|
W0 = W1 = X0 = Y0 = Z0 = X1 = Y1 = Z1 = 0;
|
|
33655
33738
|
X22 = new Adder();
|
|
33656
33739
|
Y22 = new Adder();
|
|
33657
33740
|
Z2 = new Adder();
|
|
33658
|
-
stream_default(
|
|
33741
|
+
stream_default(object, centroidStream);
|
|
33659
33742
|
var x4 = +X22, y4 = +Y22, z2 = +Z2, m2 = hypot(x4, y4, z2);
|
|
33660
33743
|
if (m2 < epsilon22) {
|
|
33661
33744
|
x4 = X1, y4 = Y1, z2 = Z1;
|
|
@@ -34839,28 +34922,28 @@ function appendRound2(digits) {
|
|
|
34839
34922
|
// ../../node_modules/d3-geo/src/path/index.js
|
|
34840
34923
|
function path_default(projection3, context) {
|
|
34841
34924
|
let digits = 3, pointRadius = 4.5, projectionStream, contextStream;
|
|
34842
|
-
function path2(
|
|
34843
|
-
if (
|
|
34925
|
+
function path2(object) {
|
|
34926
|
+
if (object) {
|
|
34844
34927
|
if (typeof pointRadius === "function")
|
|
34845
34928
|
contextStream.pointRadius(+pointRadius.apply(this, arguments));
|
|
34846
|
-
stream_default(
|
|
34929
|
+
stream_default(object, projectionStream(contextStream));
|
|
34847
34930
|
}
|
|
34848
34931
|
return contextStream.result();
|
|
34849
34932
|
}
|
|
34850
|
-
path2.area = function(
|
|
34851
|
-
stream_default(
|
|
34933
|
+
path2.area = function(object) {
|
|
34934
|
+
stream_default(object, projectionStream(area_default2));
|
|
34852
34935
|
return area_default2.result();
|
|
34853
34936
|
};
|
|
34854
|
-
path2.measure = function(
|
|
34855
|
-
stream_default(
|
|
34937
|
+
path2.measure = function(object) {
|
|
34938
|
+
stream_default(object, projectionStream(measure_default));
|
|
34856
34939
|
return measure_default.result();
|
|
34857
34940
|
};
|
|
34858
|
-
path2.bounds = function(
|
|
34859
|
-
stream_default(
|
|
34941
|
+
path2.bounds = function(object) {
|
|
34942
|
+
stream_default(object, projectionStream(bounds_default));
|
|
34860
34943
|
return bounds_default.result();
|
|
34861
34944
|
};
|
|
34862
|
-
path2.centroid = function(
|
|
34863
|
-
stream_default(
|
|
34945
|
+
path2.centroid = function(object) {
|
|
34946
|
+
stream_default(object, projectionStream(centroid_default2));
|
|
34864
34947
|
return centroid_default2.result();
|
|
34865
34948
|
};
|
|
34866
34949
|
path2.projection = function(_2) {
|
|
@@ -34941,37 +35024,37 @@ TransformStream.prototype = {
|
|
|
34941
35024
|
};
|
|
34942
35025
|
|
|
34943
35026
|
// ../../node_modules/d3-geo/src/projection/fit.js
|
|
34944
|
-
function fit(projection3, fitBounds,
|
|
35027
|
+
function fit(projection3, fitBounds, object) {
|
|
34945
35028
|
var clip = projection3.clipExtent && projection3.clipExtent();
|
|
34946
35029
|
projection3.scale(150).translate([0, 0]);
|
|
34947
35030
|
if (clip != null)
|
|
34948
35031
|
projection3.clipExtent(null);
|
|
34949
|
-
stream_default(
|
|
35032
|
+
stream_default(object, projection3.stream(bounds_default));
|
|
34950
35033
|
fitBounds(bounds_default.result());
|
|
34951
35034
|
if (clip != null)
|
|
34952
35035
|
projection3.clipExtent(clip);
|
|
34953
35036
|
return projection3;
|
|
34954
35037
|
}
|
|
34955
|
-
function fitExtent(projection3, extent4,
|
|
35038
|
+
function fitExtent(projection3, extent4, object) {
|
|
34956
35039
|
return fit(projection3, function(b2) {
|
|
34957
35040
|
var w = extent4[1][0] - extent4[0][0], h2 = extent4[1][1] - extent4[0][1], k3 = Math.min(w / (b2[1][0] - b2[0][0]), h2 / (b2[1][1] - b2[0][1])), x4 = +extent4[0][0] + (w - k3 * (b2[1][0] + b2[0][0])) / 2, y4 = +extent4[0][1] + (h2 - k3 * (b2[1][1] + b2[0][1])) / 2;
|
|
34958
35041
|
projection3.scale(150 * k3).translate([x4, y4]);
|
|
34959
|
-
},
|
|
35042
|
+
}, object);
|
|
34960
35043
|
}
|
|
34961
|
-
function fitSize(projection3, size,
|
|
34962
|
-
return fitExtent(projection3, [[0, 0], size],
|
|
35044
|
+
function fitSize(projection3, size, object) {
|
|
35045
|
+
return fitExtent(projection3, [[0, 0], size], object);
|
|
34963
35046
|
}
|
|
34964
|
-
function fitWidth(projection3, width2,
|
|
35047
|
+
function fitWidth(projection3, width2, object) {
|
|
34965
35048
|
return fit(projection3, function(b2) {
|
|
34966
35049
|
var w = +width2, k3 = w / (b2[1][0] - b2[0][0]), x4 = (w - k3 * (b2[1][0] + b2[0][0])) / 2, y4 = -k3 * b2[0][1];
|
|
34967
35050
|
projection3.scale(150 * k3).translate([x4, y4]);
|
|
34968
|
-
},
|
|
35051
|
+
}, object);
|
|
34969
35052
|
}
|
|
34970
|
-
function fitHeight(projection3, height2,
|
|
35053
|
+
function fitHeight(projection3, height2, object) {
|
|
34971
35054
|
return fit(projection3, function(b2) {
|
|
34972
35055
|
var h2 = +height2, k3 = h2 / (b2[1][1] - b2[0][1]), x4 = -k3 * b2[0][0], y4 = (h2 - k3 * (b2[1][1] + b2[0][1])) / 2;
|
|
34973
35056
|
projection3.scale(150 * k3).translate([x4, y4]);
|
|
34974
|
-
},
|
|
35057
|
+
}, object);
|
|
34975
35058
|
}
|
|
34976
35059
|
|
|
34977
35060
|
// ../../node_modules/d3-geo/src/projection/resample.js
|
|
@@ -35143,17 +35226,17 @@ function projectionMutator(projectAt) {
|
|
|
35143
35226
|
projection3.precision = function(_2) {
|
|
35144
35227
|
return arguments.length ? (projectResample = resample_default(projectTransform, delta2 = _2 * _2), reset()) : sqrt(delta2);
|
|
35145
35228
|
};
|
|
35146
|
-
projection3.fitExtent = function(extent4,
|
|
35147
|
-
return fitExtent(projection3, extent4,
|
|
35229
|
+
projection3.fitExtent = function(extent4, object) {
|
|
35230
|
+
return fitExtent(projection3, extent4, object);
|
|
35148
35231
|
};
|
|
35149
|
-
projection3.fitSize = function(size,
|
|
35150
|
-
return fitSize(projection3, size,
|
|
35232
|
+
projection3.fitSize = function(size, object) {
|
|
35233
|
+
return fitSize(projection3, size, object);
|
|
35151
35234
|
};
|
|
35152
|
-
projection3.fitWidth = function(width2,
|
|
35153
|
-
return fitWidth(projection3, width2,
|
|
35235
|
+
projection3.fitWidth = function(width2, object) {
|
|
35236
|
+
return fitWidth(projection3, width2, object);
|
|
35154
35237
|
};
|
|
35155
|
-
projection3.fitHeight = function(height2,
|
|
35156
|
-
return fitHeight(projection3, height2,
|
|
35238
|
+
projection3.fitHeight = function(height2, object) {
|
|
35239
|
+
return fitHeight(projection3, height2, object);
|
|
35157
35240
|
};
|
|
35158
35241
|
function recenter() {
|
|
35159
35242
|
var center2 = scaleTranslateRotate(k3, 0, 0, sx, sy, alpha).apply(null, project2(lambda, phi)), transform3 = scaleTranslateRotate(k3, x4 - center2[0], y4 - center2[1], sx, sy, alpha);
|
|
@@ -35294,17 +35377,17 @@ function albersUsa_default() {
|
|
|
35294
35377
|
hawaiiPoint = hawaii.translate([x4 - 0.205 * k3, y4 + 0.212 * k3]).clipExtent([[x4 - 0.214 * k3 + epsilon6, y4 + 0.166 * k3 + epsilon6], [x4 - 0.115 * k3 - epsilon6, y4 + 0.234 * k3 - epsilon6]]).stream(pointStream);
|
|
35295
35378
|
return reset();
|
|
35296
35379
|
};
|
|
35297
|
-
albersUsa.fitExtent = function(extent4,
|
|
35298
|
-
return fitExtent(albersUsa, extent4,
|
|
35380
|
+
albersUsa.fitExtent = function(extent4, object) {
|
|
35381
|
+
return fitExtent(albersUsa, extent4, object);
|
|
35299
35382
|
};
|
|
35300
|
-
albersUsa.fitSize = function(size,
|
|
35301
|
-
return fitSize(albersUsa, size,
|
|
35383
|
+
albersUsa.fitSize = function(size, object) {
|
|
35384
|
+
return fitSize(albersUsa, size, object);
|
|
35302
35385
|
};
|
|
35303
|
-
albersUsa.fitWidth = function(width2,
|
|
35304
|
-
return fitWidth(albersUsa, width2,
|
|
35386
|
+
albersUsa.fitWidth = function(width2, object) {
|
|
35387
|
+
return fitWidth(albersUsa, width2, object);
|
|
35305
35388
|
};
|
|
35306
|
-
albersUsa.fitHeight = function(height2,
|
|
35307
|
-
return fitHeight(albersUsa, height2,
|
|
35389
|
+
albersUsa.fitHeight = function(height2, object) {
|
|
35390
|
+
return fitHeight(albersUsa, height2, object);
|
|
35308
35391
|
};
|
|
35309
35392
|
function reset() {
|
|
35310
35393
|
cache = cacheStream = null;
|
|
@@ -41897,21 +41980,30 @@ function createProjection({
|
|
|
41897
41980
|
if (k3 > 0) {
|
|
41898
41981
|
tx -= (k3 * (x06 + x12) - dx) / 2;
|
|
41899
41982
|
ty -= (k3 * (y06 + y12) - dy) / 2;
|
|
41900
|
-
transform3 =
|
|
41901
|
-
|
|
41902
|
-
|
|
41903
|
-
|
|
41904
|
-
|
|
41983
|
+
transform3 = Object.assign(
|
|
41984
|
+
transform_default({
|
|
41985
|
+
point(x4, y4) {
|
|
41986
|
+
this.stream.point(x4 * k3 + tx, y4 * k3 + ty);
|
|
41987
|
+
}
|
|
41988
|
+
}),
|
|
41989
|
+
{ invert: ([x4, y4]) => [(x4 - tx) / k3, (y4 - ty) / k3] }
|
|
41990
|
+
);
|
|
41905
41991
|
} else {
|
|
41906
41992
|
warn(`Warning: the projection could not be fit to the specified domain; using the default scale.`);
|
|
41907
41993
|
}
|
|
41908
41994
|
}
|
|
41909
|
-
transform3 ??= tx === 0 && ty === 0 ? identity8() :
|
|
41910
|
-
|
|
41911
|
-
|
|
41912
|
-
|
|
41913
|
-
|
|
41914
|
-
|
|
41995
|
+
transform3 ??= tx === 0 && ty === 0 ? identity8() : Object.assign(
|
|
41996
|
+
transform_default({
|
|
41997
|
+
point(x4, y4) {
|
|
41998
|
+
this.stream.point(x4 + tx, y4 + ty);
|
|
41999
|
+
}
|
|
42000
|
+
}),
|
|
42001
|
+
{ invert: ([x4, y4]) => [x4 - tx, y4 - ty] }
|
|
42002
|
+
);
|
|
42003
|
+
return {
|
|
42004
|
+
stream: (s2) => projection3.stream(transform3.stream(clip(s2))),
|
|
42005
|
+
invert: (p2) => projection3.invert(transform3.invert(p2))
|
|
42006
|
+
};
|
|
41915
42007
|
}
|
|
41916
42008
|
function namedProjection(projection3) {
|
|
41917
42009
|
switch (`${projection3}`.toLowerCase()) {
|
|
@@ -41997,13 +42089,19 @@ function conicProjection2(createProjection2, kx2, ky2) {
|
|
|
41997
42089
|
aspectRatio: aspectRatio2
|
|
41998
42090
|
};
|
|
41999
42091
|
}
|
|
42000
|
-
var identity8 = constant({
|
|
42092
|
+
var identity8 = constant({
|
|
42093
|
+
stream: (stream) => stream,
|
|
42094
|
+
invert: (p2) => p2
|
|
42095
|
+
});
|
|
42001
42096
|
var reflectY = constant(
|
|
42002
|
-
|
|
42003
|
-
|
|
42004
|
-
|
|
42005
|
-
|
|
42006
|
-
|
|
42097
|
+
Object.assign(
|
|
42098
|
+
transform_default({
|
|
42099
|
+
point(x4, y4) {
|
|
42100
|
+
this.stream.point(x4, -y4);
|
|
42101
|
+
}
|
|
42102
|
+
}),
|
|
42103
|
+
{ invert: ([x4, y4]) => [x4, -y4] }
|
|
42104
|
+
)
|
|
42007
42105
|
);
|
|
42008
42106
|
function project(cx, cy, values2, projection3) {
|
|
42009
42107
|
const x4 = values2[cx];
|
|
@@ -42082,8 +42180,8 @@ function getGeometryChannels(channel) {
|
|
|
42082
42180
|
sphere() {
|
|
42083
42181
|
}
|
|
42084
42182
|
};
|
|
42085
|
-
for (const
|
|
42086
|
-
stream_default(
|
|
42183
|
+
for (const object of channel.value)
|
|
42184
|
+
stream_default(object, sink);
|
|
42087
42185
|
return [x4, y4];
|
|
42088
42186
|
}
|
|
42089
42187
|
|
|
@@ -46166,6 +46264,7 @@ function plot(options = {}) {
|
|
|
46166
46264
|
}
|
|
46167
46265
|
figure.scale = exposeScales(scales2.scales);
|
|
46168
46266
|
figure.legend = exposeLegends(scaleDescriptors, context, options);
|
|
46267
|
+
figure.projection = context.projection;
|
|
46169
46268
|
const w = consumeWarnings();
|
|
46170
46269
|
if (w > 0) {
|
|
46171
46270
|
select_default2(svg).append("text").attr("x", width2).attr("y", 20).attr("dy", "-1em").attr("text-anchor", "end").attr("font-family", "initial").text("\u26A0\uFE0F").append("title").text(`${w.toLocaleString("en-US")} warning${w === 1 ? "" : "s"}. Please check the console.`);
|
|
@@ -51551,13 +51650,13 @@ var attributeMap = /* @__PURE__ */ new Map([
|
|
|
51551
51650
|
["projectionInsetBottom", "projection.insetBottom"],
|
|
51552
51651
|
["projectionClip", "projection.clip"]
|
|
51553
51652
|
]);
|
|
51554
|
-
function setProperty(
|
|
51653
|
+
function setProperty(object, path2, value) {
|
|
51555
51654
|
for (let i = 0; i < path2.length; ++i) {
|
|
51556
51655
|
const key = path2[i];
|
|
51557
51656
|
if (i === path2.length - 1) {
|
|
51558
|
-
|
|
51657
|
+
object[key] = value;
|
|
51559
51658
|
} else {
|
|
51560
|
-
|
|
51659
|
+
object = object[key] || (object[key] = {});
|
|
51561
51660
|
}
|
|
51562
51661
|
}
|
|
51563
51662
|
}
|
|
@@ -51627,16 +51726,16 @@ function setSymbolAttributes(plot3, svg, attributes2, symbols3) {
|
|
|
51627
51726
|
}
|
|
51628
51727
|
function inferLabels(spec, plot3) {
|
|
51629
51728
|
const { marks: marks2 } = plot3;
|
|
51630
|
-
inferLabel("x", spec, marks2
|
|
51631
|
-
inferLabel("y", spec, marks2
|
|
51729
|
+
inferLabel("x", spec, marks2);
|
|
51730
|
+
inferLabel("y", spec, marks2);
|
|
51632
51731
|
inferLabel("fx", spec, marks2);
|
|
51633
51732
|
inferLabel("fy", spec, marks2);
|
|
51634
51733
|
}
|
|
51635
|
-
function inferLabel(key, spec, marks2
|
|
51734
|
+
function inferLabel(key, spec, marks2) {
|
|
51636
51735
|
const scale3 = spec[key] || {};
|
|
51637
51736
|
if (scale3.axis === null || scale3.label !== void 0)
|
|
51638
51737
|
return;
|
|
51639
|
-
const fields = marks2.map((mark2) => mark2.channelField(
|
|
51738
|
+
const fields = marks2.map((mark2) => mark2.channelField(key)?.field);
|
|
51640
51739
|
if (fields.every((x4) => x4 == null))
|
|
51641
51740
|
return;
|
|
51642
51741
|
let candCol;
|
|
@@ -51649,7 +51748,7 @@ function inferLabel(key, spec, marks2, channels = [key]) {
|
|
|
51649
51748
|
} else if (candCol === void 0 && candLabel === void 0) {
|
|
51650
51749
|
candCol = column3;
|
|
51651
51750
|
candLabel = label2;
|
|
51652
|
-
type2 = getType(marks2[i].data,
|
|
51751
|
+
type2 = getType(marks2[i].data, key) || "number";
|
|
51653
51752
|
} else if (candLabel !== label2) {
|
|
51654
51753
|
candLabel = void 0;
|
|
51655
51754
|
} else if (candCol !== column3) {
|
|
@@ -51691,13 +51790,11 @@ function annotateMarks(svg, indices) {
|
|
|
51691
51790
|
}
|
|
51692
51791
|
}
|
|
51693
51792
|
}
|
|
51694
|
-
function getType(data,
|
|
51793
|
+
function getType(data, channel) {
|
|
51695
51794
|
for (const row of data) {
|
|
51696
|
-
|
|
51697
|
-
|
|
51698
|
-
|
|
51699
|
-
return v3 instanceof Date ? "date" : typeof v3;
|
|
51700
|
-
}
|
|
51795
|
+
const v3 = row[channel] ?? row[channel + "1"] ?? row[channel + "2"];
|
|
51796
|
+
if (v3 != null) {
|
|
51797
|
+
return v3 instanceof Date ? "date" : typeof v3;
|
|
51701
51798
|
}
|
|
51702
51799
|
}
|
|
51703
51800
|
}
|
|
@@ -51900,49 +51997,6 @@ function isSymbol2(value) {
|
|
|
51900
51997
|
return symbols2.has(`${value}`.toLowerCase());
|
|
51901
51998
|
}
|
|
51902
51999
|
|
|
51903
|
-
// ../plot/src/marks/util/arrow.js
|
|
51904
|
-
var INTEGER = 2;
|
|
51905
|
-
var FLOAT = 3;
|
|
51906
|
-
var DECIMAL = 7;
|
|
51907
|
-
var TIMESTAMP = 10;
|
|
51908
|
-
function isArrowTable(values2) {
|
|
51909
|
-
return typeof values2?.getChild === "function";
|
|
51910
|
-
}
|
|
51911
|
-
function convertArrowType(type2) {
|
|
51912
|
-
switch (type2.typeId) {
|
|
51913
|
-
case INTEGER:
|
|
51914
|
-
case FLOAT:
|
|
51915
|
-
case DECIMAL:
|
|
51916
|
-
return Float64Array;
|
|
51917
|
-
default:
|
|
51918
|
-
return Array;
|
|
51919
|
-
}
|
|
51920
|
-
}
|
|
51921
|
-
function convertArrow(type2) {
|
|
51922
|
-
const { typeId } = type2;
|
|
51923
|
-
if (typeId === TIMESTAMP) {
|
|
51924
|
-
return (v3) => v3 == null ? v3 : new Date(v3);
|
|
51925
|
-
}
|
|
51926
|
-
if (typeId === INTEGER && type2.bitWidth >= 64) {
|
|
51927
|
-
return (v3) => v3 == null ? v3 : Number(v3);
|
|
51928
|
-
}
|
|
51929
|
-
return (v3) => v3;
|
|
51930
|
-
}
|
|
51931
|
-
function convertArrowColumn(column3) {
|
|
51932
|
-
const { type: type2 } = column3;
|
|
51933
|
-
const { typeId } = type2;
|
|
51934
|
-
if (typeId === INTEGER && type2.bitWidth >= 64) {
|
|
51935
|
-
const size = column3.length;
|
|
51936
|
-
const array3 = new Float64Array(size);
|
|
51937
|
-
for (let row = 0; row < size; ++row) {
|
|
51938
|
-
const v3 = column3.get(row);
|
|
51939
|
-
array3[row] = v3 == null ? NaN : Number(v3);
|
|
51940
|
-
}
|
|
51941
|
-
return array3;
|
|
51942
|
-
}
|
|
51943
|
-
return column3.toArray();
|
|
51944
|
-
}
|
|
51945
|
-
|
|
51946
52000
|
// ../plot/src/marks/util/to-data-array.js
|
|
51947
52001
|
function toDataArray(data) {
|
|
51948
52002
|
return isArrowTable(data) ? arrowToObjects(data) : data;
|
|
@@ -51958,7 +52012,7 @@ function arrowToObjects(data) {
|
|
|
51958
52012
|
for (let j2 = 0; j2 < numCols; ++j2) {
|
|
51959
52013
|
const child = batch.getChildAt(j2);
|
|
51960
52014
|
const { name: name2, type: type2 } = schema.fields[j2];
|
|
51961
|
-
const valueOf =
|
|
52015
|
+
const valueOf = convertArrowValue(type2);
|
|
51962
52016
|
for (let o = k3, i = 0; i < numRows; ++i, ++o) {
|
|
51963
52017
|
objects[o][name2] = valueOf(child.get(i));
|
|
51964
52018
|
}
|
|
@@ -52043,17 +52097,15 @@ var Mark2 = class extends MosaicClient {
|
|
|
52043
52097
|
hasOwnData() {
|
|
52044
52098
|
return this.source == null || isDataArray(this.source);
|
|
52045
52099
|
}
|
|
52100
|
+
hasFieldInfo() {
|
|
52101
|
+
return !!this._fieldInfo;
|
|
52102
|
+
}
|
|
52046
52103
|
channel(channel) {
|
|
52047
52104
|
return this.channels.find((c4) => c4.channel === channel);
|
|
52048
52105
|
}
|
|
52049
|
-
channelField(
|
|
52050
|
-
const
|
|
52051
|
-
|
|
52052
|
-
const c4 = this.channel(channel);
|
|
52053
|
-
if (c4?.field)
|
|
52054
|
-
return c4;
|
|
52055
|
-
}
|
|
52056
|
-
return null;
|
|
52106
|
+
channelField(channel, { exact } = {}) {
|
|
52107
|
+
const c4 = exact ? this.channel(channel) : this.channels.find((c5) => c5.channel.startsWith(channel));
|
|
52108
|
+
return c4?.field ? c4 : null;
|
|
52057
52109
|
}
|
|
52058
52110
|
fields() {
|
|
52059
52111
|
if (this.hasOwnData())
|
|
@@ -52061,26 +52113,25 @@ var Mark2 = class extends MosaicClient {
|
|
|
52061
52113
|
const { source: { table: table3 }, channels, reqs } = this;
|
|
52062
52114
|
const fields = /* @__PURE__ */ new Map();
|
|
52063
52115
|
for (const { channel, field: field2 } of channels) {
|
|
52064
|
-
|
|
52065
|
-
if (!column3) {
|
|
52116
|
+
if (!field2)
|
|
52066
52117
|
continue;
|
|
52067
|
-
|
|
52068
|
-
|
|
52069
|
-
|
|
52070
|
-
|
|
52071
|
-
|
|
52072
|
-
field2.stats?.forEach((s2) => entry.add(s2));
|
|
52073
|
-
}
|
|
52118
|
+
const stats = field2.stats?.stats || [];
|
|
52119
|
+
const key = field2.stats?.column ?? field2;
|
|
52120
|
+
const entry = fields.get(key) ?? fields.set(key, /* @__PURE__ */ new Set()).get(key);
|
|
52121
|
+
stats.forEach((s2) => entry.add(s2));
|
|
52122
|
+
reqs[channel]?.forEach((s2) => entry.add(s2));
|
|
52074
52123
|
}
|
|
52075
|
-
return Array.from(fields, ([
|
|
52076
|
-
return { table: table3, column: column3, stats: Array.from(stats) };
|
|
52077
|
-
});
|
|
52124
|
+
return Array.from(fields, ([c4, s2]) => ({ table: table3, column: c4, stats: s2 }));
|
|
52078
52125
|
}
|
|
52079
52126
|
fieldInfo(info) {
|
|
52080
|
-
|
|
52081
|
-
|
|
52082
|
-
|
|
52083
|
-
|
|
52127
|
+
const lookup = Object.fromEntries(info.map((x4) => [x4.column, x4]));
|
|
52128
|
+
for (const entry of this.channels) {
|
|
52129
|
+
const { field: field2 } = entry;
|
|
52130
|
+
if (field2) {
|
|
52131
|
+
Object.assign(entry, lookup[field2.stats?.column ?? field2]);
|
|
52132
|
+
}
|
|
52133
|
+
}
|
|
52134
|
+
this._fieldInfo = true;
|
|
52084
52135
|
return this;
|
|
52085
52136
|
}
|
|
52086
52137
|
query(filter3 = []) {
|
|
@@ -52148,8 +52199,7 @@ function channelScale(mark2, channel) {
|
|
|
52148
52199
|
const { plot: plot3 } = mark2;
|
|
52149
52200
|
let scaleType = plot3.getAttribute(`${channel}Scale`);
|
|
52150
52201
|
if (!scaleType) {
|
|
52151
|
-
const {
|
|
52152
|
-
const { type: type2 } = mark2.stats[field2.column];
|
|
52202
|
+
const { type: type2 } = mark2.channelField(channel);
|
|
52153
52203
|
scaleType = type2 === "date" ? "time" : "linear";
|
|
52154
52204
|
}
|
|
52155
52205
|
const options = { type: scaleType };
|
|
@@ -52187,15 +52237,13 @@ var xext = { x: ["min", "max"] };
|
|
|
52187
52237
|
var yext = { y: ["min", "max"] };
|
|
52188
52238
|
var xyext = { ...xext, ...yext };
|
|
52189
52239
|
function plotExtent(mark2, filter3, channel, domainAttr, niceAttr) {
|
|
52190
|
-
const { plot: plot3
|
|
52240
|
+
const { plot: plot3 } = mark2;
|
|
52191
52241
|
const domain = plot3.getAttribute(domainAttr);
|
|
52192
52242
|
const nice3 = plot3.getAttribute(niceAttr);
|
|
52193
52243
|
if (Array.isArray(domain) && !domain[Transient]) {
|
|
52194
52244
|
return domain;
|
|
52195
52245
|
} else {
|
|
52196
|
-
const {
|
|
52197
|
-
const { column: column3 } = field2;
|
|
52198
|
-
const { min: min5, max: max4 } = stats[column3];
|
|
52246
|
+
const { column: column3, min: min5, max: max4 } = mark2.channelField(channel);
|
|
52199
52247
|
const dom = filteredExtent(filter3, column3) || (nice3 ? linear2().domain([min5, max4]).nice().domain() : [min5, max4]);
|
|
52200
52248
|
if (domain !== Fixed)
|
|
52201
52249
|
dom[Transient] = true;
|
|
@@ -52215,7 +52263,7 @@ function filteredExtent(filter3, column3) {
|
|
|
52215
52263
|
let lo;
|
|
52216
52264
|
let hi;
|
|
52217
52265
|
const visitor = (type2, clause) => {
|
|
52218
|
-
if (type2 === "BETWEEN" && clause.field
|
|
52266
|
+
if (type2 === "BETWEEN" && `${clause.field}` === column3) {
|
|
52219
52267
|
const { range: range3 } = clause;
|
|
52220
52268
|
if (range3 && (lo == null || range3[0] < lo))
|
|
52221
52269
|
lo = range3[0];
|
|
@@ -52235,26 +52283,23 @@ function filteredExtent(filter3, column3) {
|
|
|
52235
52283
|
var ConnectedMark = class extends Mark2 {
|
|
52236
52284
|
constructor(type2, source, encodings) {
|
|
52237
52285
|
const dim = type2.endsWith("X") ? "y" : type2.endsWith("Y") ? "x" : null;
|
|
52238
|
-
const req = { [dim]: ["min", "max"] };
|
|
52286
|
+
const req = dim ? { [dim]: ["min", "max"] } : void 0;
|
|
52239
52287
|
super(type2, source, encodings, req);
|
|
52240
52288
|
this.dim = dim;
|
|
52241
52289
|
}
|
|
52242
52290
|
query(filter3 = []) {
|
|
52243
|
-
const { plot: plot3, dim, source
|
|
52291
|
+
const { plot: plot3, dim, source } = this;
|
|
52244
52292
|
const { optimize = true } = source.options || {};
|
|
52245
52293
|
const q2 = super.query(filter3);
|
|
52246
52294
|
if (!dim)
|
|
52247
52295
|
return q2;
|
|
52248
52296
|
const ortho = dim === "x" ? "y" : "x";
|
|
52249
|
-
const value = this.channelField(ortho)?.as;
|
|
52250
|
-
const { field: field2, as } = this.channelField(dim);
|
|
52251
|
-
const { type: type2 } = stats[field2.column];
|
|
52297
|
+
const value = this.channelField(ortho, { exact: true })?.as;
|
|
52298
|
+
const { field: field2, as, type: type2, min: min5, max: max4 } = this.channelField(dim);
|
|
52252
52299
|
const isContinuous = type2 === "date" || type2 === "number";
|
|
52253
52300
|
if (optimize && isContinuous && value) {
|
|
52254
|
-
const { column: column3 } = field2;
|
|
52255
|
-
const { max: max4, min: min5 } = stats[column3];
|
|
52256
52301
|
const size = dim === "x" ? plot3.innerWidth() : plot3.innerHeight();
|
|
52257
|
-
const [lo, hi] = filteredExtent(filter3,
|
|
52302
|
+
const [lo, hi] = filteredExtent(filter3, field2) || [min5, max4];
|
|
52258
52303
|
const [expr] = binExpr(this, dim, size, [lo, hi], 1, as);
|
|
52259
52304
|
const cols = q2.select().map((c4) => c4.as).filter((c4) => c4 !== as && c4 !== value);
|
|
52260
52305
|
return m4(q2, expr, as, value, cols);
|
|
@@ -52276,17 +52321,10 @@ function m4(input3, bin3, x4, y4, cols = []) {
|
|
|
52276
52321
|
|
|
52277
52322
|
// ../plot/src/marks/util/grid.js
|
|
52278
52323
|
function arrayType(values2, name2 = "density") {
|
|
52279
|
-
|
|
52280
|
-
return convertArrowType(values2.getChild(name2).type);
|
|
52281
|
-
} else {
|
|
52282
|
-
return typeof values2[0][name2] === "number" ? Float64Array : Array;
|
|
52283
|
-
}
|
|
52284
|
-
}
|
|
52285
|
-
function grid1d(n, values2) {
|
|
52286
|
-
const Type5 = arrayType(values2);
|
|
52287
|
-
return valuesToGrid(new Type5(n), values2);
|
|
52324
|
+
return isArrowTable(values2) ? convertArrowArrayType(values2.getChild(name2).type) : typeof values2[0]?.[name2] === "number" ? Float64Array : Array;
|
|
52288
52325
|
}
|
|
52289
|
-
function
|
|
52326
|
+
function grid1d(n, values2, name2 = "density") {
|
|
52327
|
+
const grid2 = new (arrayType(values2))(n);
|
|
52290
52328
|
if (isArrowTable(values2)) {
|
|
52291
52329
|
const numRows = values2.numRows;
|
|
52292
52330
|
if (numRows === 0)
|
|
@@ -52785,7 +52823,7 @@ var Grid2DMark = class extends Mark2 {
|
|
|
52785
52823
|
}
|
|
52786
52824
|
setPlot(plot3, index2) {
|
|
52787
52825
|
const update2 = () => {
|
|
52788
|
-
if (this.
|
|
52826
|
+
if (this.hasFieldInfo())
|
|
52789
52827
|
this.requestUpdate();
|
|
52790
52828
|
};
|
|
52791
52829
|
plot3.addAttributeListener("domainX", update2);
|
|
@@ -53130,7 +53168,7 @@ var RasterMark = class extends Grid2DMark {
|
|
|
53130
53168
|
}
|
|
53131
53169
|
setPlot(plot3, index2) {
|
|
53132
53170
|
const update2 = () => {
|
|
53133
|
-
if (this.
|
|
53171
|
+
if (this.hasFieldInfo())
|
|
53134
53172
|
this.rasterize();
|
|
53135
53173
|
};
|
|
53136
53174
|
plot3.addAttributeListener("schemeColor", update2);
|
|
@@ -53331,9 +53369,12 @@ var DenseLineMark = class extends RasterMark {
|
|
|
53331
53369
|
function stripXY(mark2, filter3) {
|
|
53332
53370
|
if (Array.isArray(filter3) && !filter3.length)
|
|
53333
53371
|
return filter3;
|
|
53334
|
-
const xc = mark2.channelField("x")
|
|
53335
|
-
const yc = mark2.channelField("y")
|
|
53336
|
-
const test = (p2) =>
|
|
53372
|
+
const { column: xc } = mark2.channelField("x");
|
|
53373
|
+
const { column: yc } = mark2.channelField("y");
|
|
53374
|
+
const test = (p2) => {
|
|
53375
|
+
const col = `${p2.field}`;
|
|
53376
|
+
return p2.op !== "BETWEEN" || col !== xc && col !== yc;
|
|
53377
|
+
};
|
|
53337
53378
|
const filterAnd = (p2) => p2.op === "AND" ? and(p2.children.filter((c4) => test(c4))) : p2;
|
|
53338
53379
|
return Array.isArray(filter3) ? filter3.filter((p2) => test(p2)).map((p2) => filterAnd(p2)) : filterAnd(filter3);
|
|
53339
53380
|
}
|
|
@@ -53622,7 +53663,7 @@ var RasterTileMark = class extends Grid2DMark {
|
|
|
53622
53663
|
}
|
|
53623
53664
|
setPlot(plot3, index2) {
|
|
53624
53665
|
const update2 = () => {
|
|
53625
|
-
if (this.
|
|
53666
|
+
if (this.hasFieldInfo())
|
|
53626
53667
|
this.rasterize();
|
|
53627
53668
|
};
|
|
53628
53669
|
plot3.addAttributeListener("schemeColor", update2);
|
|
@@ -54171,8 +54212,8 @@ function closeTo(a3, b2) {
|
|
|
54171
54212
|
}
|
|
54172
54213
|
|
|
54173
54214
|
// ../plot/src/interactors/util/get-field.js
|
|
54174
|
-
function getField(mark2,
|
|
54175
|
-
const field2 = mark2.channelField(
|
|
54215
|
+
function getField(mark2, channel) {
|
|
54216
|
+
const field2 = mark2.channelField(channel)?.field;
|
|
54176
54217
|
return field2?.basis || field2;
|
|
54177
54218
|
}
|
|
54178
54219
|
|
|
@@ -54206,7 +54247,7 @@ var Interval1D = class {
|
|
|
54206
54247
|
this.pixelSize = pixelSize || 1;
|
|
54207
54248
|
this.selection = selection2;
|
|
54208
54249
|
this.peers = peers;
|
|
54209
|
-
this.field = field2 || getField(mark2,
|
|
54250
|
+
this.field = field2 || getField(mark2, channel);
|
|
54210
54251
|
this.style = style2 && sanitizeStyles(style2);
|
|
54211
54252
|
this.brush = channel === "y" ? brushY2() : brushX2();
|
|
54212
54253
|
this.brush.on("brush end", ({ selection: selection3 }) => this.publish(selection3));
|
|
@@ -54274,8 +54315,8 @@ var Interval2D = class {
|
|
|
54274
54315
|
this.pixelSize = pixelSize || 1;
|
|
54275
54316
|
this.selection = selection2;
|
|
54276
54317
|
this.peers = peers;
|
|
54277
|
-
this.xfield = xfield || getField(mark2,
|
|
54278
|
-
this.yfield = yfield || getField(mark2,
|
|
54318
|
+
this.xfield = xfield || getField(mark2, "x");
|
|
54319
|
+
this.yfield = yfield || getField(mark2, "y");
|
|
54279
54320
|
this.style = style2 && sanitizeStyles(style2);
|
|
54280
54321
|
this.brush = brush2();
|
|
54281
54322
|
this.brush.on("brush end", ({ selection: selection3 }) => this.publish(selection3));
|
|
@@ -54411,8 +54452,8 @@ var PanZoom = class {
|
|
|
54411
54452
|
this.mark = mark2;
|
|
54412
54453
|
this.xsel = x4;
|
|
54413
54454
|
this.ysel = y4;
|
|
54414
|
-
this.xfield = xfield || getField(mark2,
|
|
54415
|
-
this.yfield = yfield || getField(mark2,
|
|
54455
|
+
this.xfield = xfield || getField(mark2, "x");
|
|
54456
|
+
this.yfield = yfield || getField(mark2, "y");
|
|
54416
54457
|
this.zoom = extent3(zoom2, [0, Infinity], [1, 1]);
|
|
54417
54458
|
this.panx = this.xsel && panx;
|
|
54418
54459
|
this.pany = this.ysel && pany;
|
|
@@ -54641,8 +54682,10 @@ function findMark({ marks: marks2 }, channel) {
|
|
|
54641
54682
|
if (channels == null)
|
|
54642
54683
|
return null;
|
|
54643
54684
|
for (let i = marks2.length - 1; i > -1; --i) {
|
|
54644
|
-
|
|
54645
|
-
|
|
54685
|
+
for (const channel2 of channels) {
|
|
54686
|
+
if (marks2[i].channelField(channel2, { exact: true })) {
|
|
54687
|
+
return marks2[i];
|
|
54688
|
+
}
|
|
54646
54689
|
}
|
|
54647
54690
|
}
|
|
54648
54691
|
return null;
|
|
@@ -54671,7 +54714,7 @@ function binField(mark2, channel, column3, options) {
|
|
|
54671
54714
|
column: column3,
|
|
54672
54715
|
label: column3,
|
|
54673
54716
|
get stats() {
|
|
54674
|
-
return ["min", "max"];
|
|
54717
|
+
return { column: column3, stats: ["min", "max"] };
|
|
54675
54718
|
},
|
|
54676
54719
|
get columns() {
|
|
54677
54720
|
return [column3];
|
|
@@ -54681,7 +54724,7 @@ function binField(mark2, channel, column3, options) {
|
|
|
54681
54724
|
},
|
|
54682
54725
|
toString() {
|
|
54683
54726
|
const { apply: apply2, sqlApply, sqlInvert } = channelScale(mark2, channel);
|
|
54684
|
-
const { min: min5, max: max4 } = mark2.
|
|
54727
|
+
const { min: min5, max: max4 } = mark2.channelField(channel);
|
|
54685
54728
|
const b2 = bins(apply2(min5), apply2(max4), options);
|
|
54686
54729
|
const col = sqlApply(column3);
|
|
54687
54730
|
const base = b2.min === 0 ? col : `(${col} - ${b2.min})`;
|
|
@@ -55550,8 +55593,8 @@ function attributes(values2) {
|
|
|
55550
55593
|
}
|
|
55551
55594
|
};
|
|
55552
55595
|
}
|
|
55553
|
-
function margins(
|
|
55554
|
-
const { top: top2, bottom: bottom2, left: left2, right: right2 } =
|
|
55596
|
+
function margins(object) {
|
|
55597
|
+
const { top: top2, bottom: bottom2, left: left2, right: right2 } = object;
|
|
55555
55598
|
const attr = {};
|
|
55556
55599
|
if (top2 !== void 0)
|
|
55557
55600
|
attr.marginTop = top2;
|