@platforma-open/milaboratories.repertoire-diversity-2.model 1.2.0 → 1.3.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/.turbo/turbo-build.log +13 -13
- package/CHANGELOG.md +6 -0
- package/dist/bundle.js +816 -688
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +4 -4
- package/src/index.ts +18 -5
package/dist/bundle.js
CHANGED
|
@@ -2,48 +2,6 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.model = {}));
|
|
3
3
|
})(this, function(exports2) {
|
|
4
4
|
"use strict";
|
|
5
|
-
function getDefaultExportFromCjs(x2) {
|
|
6
|
-
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
7
|
-
}
|
|
8
|
-
var canonicalize;
|
|
9
|
-
var hasRequiredCanonicalize;
|
|
10
|
-
function requireCanonicalize() {
|
|
11
|
-
if (hasRequiredCanonicalize) return canonicalize;
|
|
12
|
-
hasRequiredCanonicalize = 1;
|
|
13
|
-
canonicalize = function serialize(object) {
|
|
14
|
-
if (typeof object === "number" && isNaN(object)) {
|
|
15
|
-
throw new Error("NaN is not allowed");
|
|
16
|
-
}
|
|
17
|
-
if (typeof object === "number" && !isFinite(object)) {
|
|
18
|
-
throw new Error("Infinity is not allowed");
|
|
19
|
-
}
|
|
20
|
-
if (object === null || typeof object !== "object") {
|
|
21
|
-
return JSON.stringify(object);
|
|
22
|
-
}
|
|
23
|
-
if (object.toJSON instanceof Function) {
|
|
24
|
-
return serialize(object.toJSON());
|
|
25
|
-
}
|
|
26
|
-
if (Array.isArray(object)) {
|
|
27
|
-
const values2 = object.reduce((t, cv, ci) => {
|
|
28
|
-
const comma = ci === 0 ? "" : ",";
|
|
29
|
-
const value = cv === void 0 || typeof cv === "symbol" ? null : cv;
|
|
30
|
-
return `${t}${comma}${serialize(value)}`;
|
|
31
|
-
}, "");
|
|
32
|
-
return `[${values2}]`;
|
|
33
|
-
}
|
|
34
|
-
const values = Object.keys(object).sort().reduce((t, cv) => {
|
|
35
|
-
if (object[cv] === void 0 || typeof object[cv] === "symbol") {
|
|
36
|
-
return t;
|
|
37
|
-
}
|
|
38
|
-
const comma = t.length === 0 ? "" : ",";
|
|
39
|
-
return `${t}${comma}${serialize(cv)}:${serialize(object[cv])}`;
|
|
40
|
-
}, "");
|
|
41
|
-
return `{${values}}`;
|
|
42
|
-
};
|
|
43
|
-
return canonicalize;
|
|
44
|
-
}
|
|
45
|
-
var canonicalizeExports = requireCanonicalize();
|
|
46
|
-
const _e = /* @__PURE__ */ getDefaultExportFromCjs(canonicalizeExports);
|
|
47
5
|
var util;
|
|
48
6
|
(function(util2) {
|
|
49
7
|
util2.assertEqual = (val) => val;
|
|
@@ -95,7 +53,7 @@
|
|
|
95
53
|
return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
|
|
96
54
|
}
|
|
97
55
|
util2.joinValues = joinValues;
|
|
98
|
-
util2.jsonStringifyReplacer = (
|
|
56
|
+
util2.jsonStringifyReplacer = (_2, value) => {
|
|
99
57
|
if (typeof value === "bigint") {
|
|
100
58
|
return value.toString();
|
|
101
59
|
}
|
|
@@ -433,7 +391,7 @@
|
|
|
433
391
|
overrideMap,
|
|
434
392
|
overrideMap === errorMap ? void 0 : errorMap
|
|
435
393
|
// then global default map
|
|
436
|
-
].filter((
|
|
394
|
+
].filter((x) => !!x)
|
|
437
395
|
});
|
|
438
396
|
ctx.common.issues.push(issue);
|
|
439
397
|
}
|
|
@@ -496,10 +454,10 @@
|
|
|
496
454
|
});
|
|
497
455
|
const DIRTY = (value) => ({ status: "dirty", value });
|
|
498
456
|
const OK = (value) => ({ status: "valid", value });
|
|
499
|
-
const isAborted = (
|
|
500
|
-
const isDirty = (
|
|
501
|
-
const isValid = (
|
|
502
|
-
const isAsync = (
|
|
457
|
+
const isAborted = (x) => x.status === "aborted";
|
|
458
|
+
const isDirty = (x) => x.status === "dirty";
|
|
459
|
+
const isValid = (x) => x.status === "valid";
|
|
460
|
+
const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
503
461
|
function __classPrivateFieldGet(receiver, state, kind, f2) {
|
|
504
462
|
if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
505
463
|
return state.get(receiver);
|
|
@@ -2829,7 +2787,7 @@
|
|
|
2829
2787
|
if (!schema)
|
|
2830
2788
|
return null;
|
|
2831
2789
|
return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
|
|
2832
|
-
}).filter((
|
|
2790
|
+
}).filter((x) => !!x);
|
|
2833
2791
|
if (ctx.common.async) {
|
|
2834
2792
|
return Promise.all(items).then((results) => {
|
|
2835
2793
|
return ParseStatus.mergeArray(status, results);
|
|
@@ -3087,7 +3045,7 @@
|
|
|
3087
3045
|
ctx.schemaErrorMap,
|
|
3088
3046
|
getErrorMap(),
|
|
3089
3047
|
errorMap
|
|
3090
|
-
].filter((
|
|
3048
|
+
].filter((x) => !!x),
|
|
3091
3049
|
issueData: {
|
|
3092
3050
|
code: ZodIssueCode.invalid_arguments,
|
|
3093
3051
|
argumentsError: error
|
|
@@ -3103,7 +3061,7 @@
|
|
|
3103
3061
|
ctx.schemaErrorMap,
|
|
3104
3062
|
getErrorMap(),
|
|
3105
3063
|
errorMap
|
|
3106
|
-
].filter((
|
|
3064
|
+
].filter((x) => !!x),
|
|
3107
3065
|
issueData: {
|
|
3108
3066
|
code: ZodIssueCode.invalid_return_type,
|
|
3109
3067
|
returnTypeError: error
|
|
@@ -3111,31 +3069,31 @@
|
|
|
3111
3069
|
});
|
|
3112
3070
|
}
|
|
3113
3071
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
3114
|
-
const
|
|
3072
|
+
const fn2 = ctx.data;
|
|
3115
3073
|
if (this._def.returns instanceof ZodPromise) {
|
|
3116
|
-
const
|
|
3074
|
+
const me2 = this;
|
|
3117
3075
|
return OK(async function(...args) {
|
|
3118
3076
|
const error = new ZodError([]);
|
|
3119
|
-
const parsedArgs = await
|
|
3077
|
+
const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e) => {
|
|
3120
3078
|
error.addIssue(makeArgsIssue(args, e));
|
|
3121
3079
|
throw error;
|
|
3122
3080
|
});
|
|
3123
|
-
const result = await Reflect.apply(
|
|
3124
|
-
const parsedReturns = await
|
|
3081
|
+
const result = await Reflect.apply(fn2, this, parsedArgs);
|
|
3082
|
+
const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
3125
3083
|
error.addIssue(makeReturnsIssue(result, e));
|
|
3126
3084
|
throw error;
|
|
3127
3085
|
});
|
|
3128
3086
|
return parsedReturns;
|
|
3129
3087
|
});
|
|
3130
3088
|
} else {
|
|
3131
|
-
const
|
|
3089
|
+
const me2 = this;
|
|
3132
3090
|
return OK(function(...args) {
|
|
3133
|
-
const parsedArgs =
|
|
3091
|
+
const parsedArgs = me2._def.args.safeParse(args, params);
|
|
3134
3092
|
if (!parsedArgs.success) {
|
|
3135
3093
|
throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
3136
3094
|
}
|
|
3137
|
-
const result = Reflect.apply(
|
|
3138
|
-
const parsedReturns =
|
|
3095
|
+
const result = Reflect.apply(fn2, this, parsedArgs.data);
|
|
3096
|
+
const parsedReturns = me2._def.returns.safeParse(result, params);
|
|
3139
3097
|
if (!parsedReturns.success) {
|
|
3140
3098
|
throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
|
3141
3099
|
}
|
|
@@ -3956,240 +3914,280 @@
|
|
|
3956
3914
|
quotelessJson,
|
|
3957
3915
|
ZodError
|
|
3958
3916
|
});
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3917
|
+
function getDefaultExportFromCjs(x) {
|
|
3918
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
3919
|
+
}
|
|
3920
|
+
var canonicalize;
|
|
3921
|
+
var hasRequiredCanonicalize;
|
|
3922
|
+
function requireCanonicalize() {
|
|
3923
|
+
if (hasRequiredCanonicalize) return canonicalize;
|
|
3924
|
+
hasRequiredCanonicalize = 1;
|
|
3925
|
+
canonicalize = function serialize(object) {
|
|
3926
|
+
if (typeof object === "number" && isNaN(object)) {
|
|
3927
|
+
throw new Error("NaN is not allowed");
|
|
3928
|
+
}
|
|
3929
|
+
if (typeof object === "number" && !isFinite(object)) {
|
|
3930
|
+
throw new Error("Infinity is not allowed");
|
|
3931
|
+
}
|
|
3932
|
+
if (object === null || typeof object !== "object") {
|
|
3933
|
+
return JSON.stringify(object);
|
|
3934
|
+
}
|
|
3935
|
+
if (object.toJSON instanceof Function) {
|
|
3936
|
+
return serialize(object.toJSON());
|
|
3937
|
+
}
|
|
3938
|
+
if (Array.isArray(object)) {
|
|
3939
|
+
const values2 = object.reduce((t, cv, ci) => {
|
|
3940
|
+
const comma = ci === 0 ? "" : ",";
|
|
3941
|
+
const value = cv === void 0 || typeof cv === "symbol" ? null : cv;
|
|
3942
|
+
return `${t}${comma}${serialize(value)}`;
|
|
3943
|
+
}, "");
|
|
3944
|
+
return `[${values2}]`;
|
|
3945
|
+
}
|
|
3946
|
+
const values = Object.keys(object).sort().reduce((t, cv) => {
|
|
3947
|
+
if (object[cv] === void 0 || typeof object[cv] === "symbol") {
|
|
3948
|
+
return t;
|
|
3949
|
+
}
|
|
3950
|
+
const comma = t.length === 0 ? "" : ",";
|
|
3951
|
+
return `${t}${comma}${serialize(cv)}:${serialize(object[cv])}`;
|
|
3952
|
+
}, "");
|
|
3953
|
+
return `{${values}}`;
|
|
3954
|
+
};
|
|
3955
|
+
return canonicalize;
|
|
3956
|
+
}
|
|
3957
|
+
var canonicalizeExports = requireCanonicalize();
|
|
3958
|
+
const ke = /* @__PURE__ */ getDefaultExportFromCjs(canonicalizeExports);
|
|
3959
|
+
var B$1 = Object.defineProperty;
|
|
3960
|
+
var j = (n2, e, t) => e in n2 ? B$1(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
|
|
3961
|
+
var l$1 = (n2, e, t) => j(n2, typeof e != "symbol" ? e + "" : e, t);
|
|
3962
|
+
z$1.object({
|
|
3963
|
+
/** Included left border. */
|
|
3964
|
+
from: z$1.number(),
|
|
3965
|
+
/** Excluded right border. */
|
|
3966
|
+
to: z$1.number()
|
|
3967
|
+
});
|
|
3962
3968
|
function w(n2) {
|
|
3963
3969
|
throw new Error("Unexpected object: " + n2);
|
|
3964
3970
|
}
|
|
3965
|
-
function
|
|
3971
|
+
function En(n2) {
|
|
3966
3972
|
if (!n2 || typeof n2 != "object")
|
|
3967
3973
|
return false;
|
|
3968
|
-
const
|
|
3969
|
-
if (!("type" in
|
|
3974
|
+
const e = n2;
|
|
3975
|
+
if (!("type" in e))
|
|
3970
3976
|
return false;
|
|
3971
|
-
switch (
|
|
3977
|
+
switch (e.type) {
|
|
3972
3978
|
case "Json":
|
|
3973
|
-
return typeof
|
|
3979
|
+
return typeof e.keyLength == "number" && e.data !== void 0 && typeof e.data == "object";
|
|
3974
3980
|
case "JsonPartitioned":
|
|
3975
|
-
return typeof
|
|
3981
|
+
return typeof e.partitionKeyLength == "number" && e.parts !== void 0 && typeof e.parts == "object";
|
|
3976
3982
|
case "BinaryPartitioned":
|
|
3977
|
-
return typeof
|
|
3983
|
+
return typeof e.partitionKeyLength == "number" && e.parts !== void 0 && typeof e.parts == "object";
|
|
3978
3984
|
default:
|
|
3979
3985
|
return false;
|
|
3980
3986
|
}
|
|
3981
3987
|
}
|
|
3982
|
-
function
|
|
3988
|
+
function Nn(n2, e) {
|
|
3983
3989
|
if (n2 !== void 0)
|
|
3984
3990
|
switch (n2.type) {
|
|
3985
3991
|
case "Json":
|
|
3986
3992
|
return n2;
|
|
3987
3993
|
case "JsonPartitioned": {
|
|
3988
|
-
const
|
|
3994
|
+
const t = {};
|
|
3989
3995
|
for (const [r, o] of Object.entries(n2.parts))
|
|
3990
|
-
|
|
3996
|
+
t[r] = e(o);
|
|
3991
3997
|
return {
|
|
3992
3998
|
...n2,
|
|
3993
|
-
parts:
|
|
3999
|
+
parts: t
|
|
3994
4000
|
};
|
|
3995
4001
|
}
|
|
3996
4002
|
case "BinaryPartitioned": {
|
|
3997
|
-
const
|
|
4003
|
+
const t = {};
|
|
3998
4004
|
for (const [r, o] of Object.entries(n2.parts))
|
|
3999
|
-
|
|
4000
|
-
index:
|
|
4001
|
-
values:
|
|
4005
|
+
t[r] = {
|
|
4006
|
+
index: e(o.index),
|
|
4007
|
+
values: e(o.values)
|
|
4002
4008
|
};
|
|
4003
4009
|
return {
|
|
4004
4010
|
...n2,
|
|
4005
|
-
parts:
|
|
4011
|
+
parts: t
|
|
4006
4012
|
};
|
|
4007
4013
|
}
|
|
4008
4014
|
}
|
|
4009
4015
|
}
|
|
4010
|
-
function
|
|
4016
|
+
function K(n2) {
|
|
4011
4017
|
if (!n2 || typeof n2 != "object")
|
|
4012
4018
|
return false;
|
|
4013
|
-
const
|
|
4014
|
-
if (!("type" in
|
|
4019
|
+
const e = n2;
|
|
4020
|
+
if (!("type" in e))
|
|
4015
4021
|
return false;
|
|
4016
|
-
switch (
|
|
4022
|
+
switch (e.type) {
|
|
4017
4023
|
case "Json":
|
|
4018
|
-
return typeof
|
|
4024
|
+
return typeof e.keyLength == "number" && Array.isArray(e.data);
|
|
4019
4025
|
case "JsonPartitioned":
|
|
4020
|
-
return typeof
|
|
4026
|
+
return typeof e.partitionKeyLength == "number" && Array.isArray(e.parts);
|
|
4021
4027
|
case "BinaryPartitioned":
|
|
4022
|
-
return typeof
|
|
4028
|
+
return typeof e.partitionKeyLength == "number" && Array.isArray(e.parts);
|
|
4023
4029
|
default:
|
|
4024
4030
|
return false;
|
|
4025
4031
|
}
|
|
4026
4032
|
}
|
|
4027
|
-
function
|
|
4028
|
-
return
|
|
4033
|
+
function Sn(n2) {
|
|
4034
|
+
return K(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
|
|
4029
4035
|
}
|
|
4030
|
-
function
|
|
4036
|
+
function Cn(n2) {
|
|
4031
4037
|
switch (n2.type) {
|
|
4032
4038
|
case "Json": {
|
|
4033
|
-
const
|
|
4039
|
+
const e = Object.entries(n2.data).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
|
|
4034
4040
|
return {
|
|
4035
4041
|
type: "Json",
|
|
4036
4042
|
keyLength: n2.keyLength,
|
|
4037
|
-
data:
|
|
4043
|
+
data: e
|
|
4038
4044
|
};
|
|
4039
4045
|
}
|
|
4040
4046
|
case "JsonPartitioned": {
|
|
4041
|
-
const
|
|
4047
|
+
const e = Object.entries(n2.parts).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
|
|
4042
4048
|
return {
|
|
4043
4049
|
type: "JsonPartitioned",
|
|
4044
4050
|
partitionKeyLength: n2.partitionKeyLength,
|
|
4045
|
-
parts:
|
|
4051
|
+
parts: e
|
|
4046
4052
|
};
|
|
4047
4053
|
}
|
|
4048
4054
|
case "BinaryPartitioned": {
|
|
4049
|
-
const
|
|
4055
|
+
const e = Object.entries(n2.parts).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
|
|
4050
4056
|
return {
|
|
4051
4057
|
type: "BinaryPartitioned",
|
|
4052
4058
|
partitionKeyLength: n2.partitionKeyLength,
|
|
4053
|
-
parts:
|
|
4059
|
+
parts: e
|
|
4054
4060
|
};
|
|
4055
4061
|
}
|
|
4056
4062
|
}
|
|
4057
4063
|
}
|
|
4058
|
-
function
|
|
4064
|
+
function Jn(n2) {
|
|
4059
4065
|
switch (n2.type) {
|
|
4060
4066
|
case "Json": {
|
|
4061
|
-
const
|
|
4062
|
-
for (const
|
|
4063
|
-
|
|
4067
|
+
const e = {};
|
|
4068
|
+
for (const t of n2.data)
|
|
4069
|
+
e[JSON.stringify(t.key)] = t.value;
|
|
4064
4070
|
return {
|
|
4065
4071
|
type: "Json",
|
|
4066
4072
|
keyLength: n2.keyLength,
|
|
4067
|
-
data:
|
|
4073
|
+
data: e
|
|
4068
4074
|
};
|
|
4069
4075
|
}
|
|
4070
4076
|
case "JsonPartitioned": {
|
|
4071
|
-
const
|
|
4072
|
-
for (const
|
|
4073
|
-
|
|
4077
|
+
const e = {};
|
|
4078
|
+
for (const t of n2.parts)
|
|
4079
|
+
e[JSON.stringify(t.key)] = t.value;
|
|
4074
4080
|
return {
|
|
4075
4081
|
type: "JsonPartitioned",
|
|
4076
4082
|
partitionKeyLength: n2.partitionKeyLength,
|
|
4077
|
-
parts:
|
|
4083
|
+
parts: e
|
|
4078
4084
|
};
|
|
4079
4085
|
}
|
|
4080
4086
|
case "BinaryPartitioned": {
|
|
4081
|
-
const
|
|
4082
|
-
for (const
|
|
4083
|
-
|
|
4087
|
+
const e = {};
|
|
4088
|
+
for (const t of n2.parts)
|
|
4089
|
+
e[JSON.stringify(t.key)] = t.value;
|
|
4084
4090
|
return {
|
|
4085
4091
|
type: "BinaryPartitioned",
|
|
4086
4092
|
partitionKeyLength: n2.partitionKeyLength,
|
|
4087
|
-
parts:
|
|
4093
|
+
parts: e
|
|
4088
4094
|
};
|
|
4089
4095
|
}
|
|
4090
4096
|
}
|
|
4091
4097
|
}
|
|
4092
|
-
function
|
|
4093
|
-
return {
|
|
4094
|
-
kind: n2.kind,
|
|
4095
|
-
valueType: n2.valueType,
|
|
4096
|
-
name: n2.name,
|
|
4097
|
-
domain: n2.domain,
|
|
4098
|
-
parentAxes: n2.parentAxes,
|
|
4099
|
-
axesId: z(n2.axesSpec)
|
|
4100
|
-
};
|
|
4101
|
-
}
|
|
4102
|
-
function Cn$1(n2) {
|
|
4098
|
+
function Fn(n2) {
|
|
4103
4099
|
return {
|
|
4104
4100
|
columnId: n2.id,
|
|
4105
4101
|
spec: n2.spec
|
|
4106
4102
|
};
|
|
4107
4103
|
}
|
|
4108
4104
|
function p$1(n2) {
|
|
4109
|
-
const { type:
|
|
4110
|
-
return
|
|
4105
|
+
const { type: e, name: t, domain: r } = n2, o = { type: e, name: t };
|
|
4106
|
+
return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
|
|
4111
4107
|
}
|
|
4112
|
-
function
|
|
4108
|
+
function J(n2) {
|
|
4113
4109
|
return n2.map(p$1);
|
|
4114
4110
|
}
|
|
4115
|
-
function
|
|
4116
|
-
return
|
|
4111
|
+
function Rn(n2) {
|
|
4112
|
+
return ke(p$1(n2));
|
|
4117
4113
|
}
|
|
4118
|
-
function
|
|
4119
|
-
if (n2 === void 0) return
|
|
4120
|
-
if (
|
|
4121
|
-
for (const
|
|
4122
|
-
if (n2[
|
|
4114
|
+
function Y$1(n2, e) {
|
|
4115
|
+
if (n2 === void 0) return e === void 0;
|
|
4116
|
+
if (e === void 0) return true;
|
|
4117
|
+
for (const t in e)
|
|
4118
|
+
if (n2[t] !== e[t]) return false;
|
|
4123
4119
|
return true;
|
|
4124
4120
|
}
|
|
4125
|
-
function
|
|
4126
|
-
return n2.name ===
|
|
4121
|
+
function Z$1(n2, e) {
|
|
4122
|
+
return n2.name === e.name && Y$1(n2.domain, e.domain);
|
|
4127
4123
|
}
|
|
4128
|
-
function
|
|
4129
|
-
return { ...n2, src:
|
|
4124
|
+
function Un(n2, e) {
|
|
4125
|
+
return { ...n2, src: h(n2.src, e) };
|
|
4130
4126
|
}
|
|
4131
|
-
function
|
|
4127
|
+
function h(n2, e) {
|
|
4132
4128
|
switch (n2.type) {
|
|
4133
4129
|
case "column":
|
|
4134
4130
|
return {
|
|
4135
4131
|
type: "column",
|
|
4136
|
-
column:
|
|
4132
|
+
column: e(n2.column)
|
|
4137
4133
|
};
|
|
4138
4134
|
case "slicedColumn":
|
|
4139
4135
|
return {
|
|
4140
4136
|
type: "slicedColumn",
|
|
4141
|
-
column:
|
|
4137
|
+
column: e(n2.column),
|
|
4142
4138
|
newId: n2.newId,
|
|
4143
4139
|
axisFilters: n2.axisFilters
|
|
4144
4140
|
};
|
|
4141
|
+
case "inlineColumn":
|
|
4142
|
+
return n2;
|
|
4145
4143
|
case "inner":
|
|
4146
4144
|
case "full":
|
|
4147
4145
|
return {
|
|
4148
4146
|
type: n2.type,
|
|
4149
|
-
entries: n2.entries.map((
|
|
4147
|
+
entries: n2.entries.map((t) => h(t, e))
|
|
4150
4148
|
};
|
|
4151
4149
|
case "outer":
|
|
4152
4150
|
return {
|
|
4153
4151
|
type: "outer",
|
|
4154
|
-
primary:
|
|
4155
|
-
secondary: n2.secondary.map((
|
|
4152
|
+
primary: h(n2.primary, e),
|
|
4153
|
+
secondary: n2.secondary.map((t) => h(t, e))
|
|
4156
4154
|
};
|
|
4157
4155
|
default:
|
|
4158
4156
|
w(n2);
|
|
4159
4157
|
}
|
|
4160
4158
|
}
|
|
4161
|
-
function
|
|
4162
|
-
return
|
|
4159
|
+
function nn(n2) {
|
|
4160
|
+
return ke(n2);
|
|
4163
4161
|
}
|
|
4164
|
-
function
|
|
4165
|
-
return
|
|
4162
|
+
function P(n2) {
|
|
4163
|
+
return ke(p$1(n2));
|
|
4166
4164
|
}
|
|
4167
|
-
function
|
|
4168
|
-
return JSON.stringify([n2,
|
|
4165
|
+
function k(n2, e) {
|
|
4166
|
+
return JSON.stringify([n2, e]);
|
|
4169
4167
|
}
|
|
4170
|
-
class
|
|
4168
|
+
class _n {
|
|
4171
4169
|
/**
|
|
4172
4170
|
* Creates a new anchor context from a set of anchor column specifications
|
|
4173
4171
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
4174
4172
|
*/
|
|
4175
|
-
constructor(
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
this.anchors =
|
|
4181
|
-
const
|
|
4182
|
-
|
|
4183
|
-
for (const [r, o] of
|
|
4173
|
+
constructor(e) {
|
|
4174
|
+
l$1(this, "domains", /* @__PURE__ */ new Map());
|
|
4175
|
+
l$1(this, "axes", /* @__PURE__ */ new Map());
|
|
4176
|
+
l$1(this, "domainPacks", []);
|
|
4177
|
+
l$1(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
|
|
4178
|
+
this.anchors = e;
|
|
4179
|
+
const t = Object.entries(e);
|
|
4180
|
+
t.sort((r, o) => r[0].localeCompare(o[0]));
|
|
4181
|
+
for (const [r, o] of t) {
|
|
4184
4182
|
for (let s2 = 0; s2 < o.axesSpec.length; s2++) {
|
|
4185
|
-
const a = o.axesSpec[s2], i =
|
|
4183
|
+
const a = o.axesSpec[s2], i = P(a);
|
|
4186
4184
|
this.axes.set(i, { anchor: r, idx: s2 });
|
|
4187
4185
|
}
|
|
4188
4186
|
if (o.domain !== void 0) {
|
|
4189
4187
|
const s2 = Object.entries(o.domain);
|
|
4190
4188
|
s2.sort((a, i) => a[0].localeCompare(i[0])), this.domainPackToAnchor.set(JSON.stringify(s2), r), this.domainPacks.push(s2.map(([a]) => a));
|
|
4191
4189
|
for (const [a, i] of s2) {
|
|
4192
|
-
const u2 =
|
|
4190
|
+
const u2 = k(a, i);
|
|
4193
4191
|
this.domains.set(u2, r);
|
|
4194
4192
|
}
|
|
4195
4193
|
}
|
|
@@ -4198,20 +4196,20 @@
|
|
|
4198
4196
|
/**
|
|
4199
4197
|
* Implementation of derive method
|
|
4200
4198
|
*/
|
|
4201
|
-
derive(
|
|
4199
|
+
derive(e, t) {
|
|
4202
4200
|
const r = {
|
|
4203
|
-
name:
|
|
4201
|
+
name: e.name,
|
|
4204
4202
|
axes: []
|
|
4205
4203
|
};
|
|
4206
4204
|
let o;
|
|
4207
|
-
if (
|
|
4205
|
+
if (e.domain !== void 0)
|
|
4208
4206
|
n:
|
|
4209
4207
|
for (const a of this.domainPacks) {
|
|
4210
4208
|
const i = [];
|
|
4211
4209
|
for (const c2 of a) {
|
|
4212
|
-
const
|
|
4213
|
-
if (
|
|
4214
|
-
i.push([c2,
|
|
4210
|
+
const m2 = e.domain[c2];
|
|
4211
|
+
if (m2 !== void 0)
|
|
4212
|
+
i.push([c2, m2]);
|
|
4215
4213
|
else
|
|
4216
4214
|
break n;
|
|
4217
4215
|
}
|
|
@@ -4221,26 +4219,26 @@
|
|
|
4221
4219
|
break;
|
|
4222
4220
|
}
|
|
4223
4221
|
}
|
|
4224
|
-
for (const [a, i] of Object.entries(
|
|
4222
|
+
for (const [a, i] of Object.entries(e.domain ?? {})) {
|
|
4225
4223
|
if (o !== void 0 && o.has(a))
|
|
4226
4224
|
continue;
|
|
4227
|
-
const u2 =
|
|
4225
|
+
const u2 = k(a, i), c2 = this.domains.get(u2);
|
|
4228
4226
|
r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : i;
|
|
4229
4227
|
}
|
|
4230
|
-
if (r.axes =
|
|
4231
|
-
const i =
|
|
4228
|
+
if (r.axes = e.axesSpec.map((a) => {
|
|
4229
|
+
const i = P(a), u2 = this.axes.get(i);
|
|
4232
4230
|
return u2 === void 0 ? p$1(a) : u2;
|
|
4233
|
-
}), !
|
|
4231
|
+
}), !t || t.length === 0)
|
|
4234
4232
|
return r;
|
|
4235
4233
|
const s2 = [];
|
|
4236
|
-
for (const a of
|
|
4234
|
+
for (const a of t) {
|
|
4237
4235
|
const [i, u2] = a;
|
|
4238
4236
|
if (typeof i == "number") {
|
|
4239
|
-
if (i < 0 || i >=
|
|
4240
|
-
throw new Error(`Axis index ${i} is out of bounds (0-${
|
|
4237
|
+
if (i < 0 || i >= e.axesSpec.length)
|
|
4238
|
+
throw new Error(`Axis index ${i} is out of bounds (0-${e.axesSpec.length - 1})`);
|
|
4241
4239
|
s2.push([i, u2]);
|
|
4242
4240
|
} else {
|
|
4243
|
-
const c2 =
|
|
4241
|
+
const c2 = e.axesSpec.findIndex((m2) => m2.name === i);
|
|
4244
4242
|
if (c2 === -1)
|
|
4245
4243
|
throw new Error(`Axis with name "${i}" not found in the column specification`);
|
|
4246
4244
|
s2.push([c2, u2]);
|
|
@@ -4257,12 +4255,12 @@
|
|
|
4257
4255
|
* @param axisFilters Optional axis filters to apply to the column
|
|
4258
4256
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
4259
4257
|
*/
|
|
4260
|
-
deriveS(
|
|
4261
|
-
return
|
|
4258
|
+
deriveS(e, t) {
|
|
4259
|
+
return nn(this.derive(e, t));
|
|
4262
4260
|
}
|
|
4263
4261
|
}
|
|
4264
|
-
function
|
|
4265
|
-
const r = { ...
|
|
4262
|
+
function Mn(n2, e, t) {
|
|
4263
|
+
const r = { ...e }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? false;
|
|
4266
4264
|
if (r.domainAnchor !== void 0) {
|
|
4267
4265
|
const s2 = n2[r.domainAnchor];
|
|
4268
4266
|
if (!s2)
|
|
@@ -4288,161 +4286,185 @@
|
|
|
4288
4286
|
}
|
|
4289
4287
|
r.domain = s2;
|
|
4290
4288
|
}
|
|
4291
|
-
return r.axes && (r.axes = r.axes.map((s2) =>
|
|
4289
|
+
return r.axes && (r.axes = r.axes.map((s2) => en(n2, s2))), r;
|
|
4292
4290
|
}
|
|
4293
|
-
function
|
|
4294
|
-
if (!
|
|
4295
|
-
return
|
|
4296
|
-
const
|
|
4291
|
+
function en(n2, e) {
|
|
4292
|
+
if (!tn(e))
|
|
4293
|
+
return e;
|
|
4294
|
+
const t = e.anchor, r = n2[t];
|
|
4297
4295
|
if (!r)
|
|
4298
|
-
throw new Error(`Anchor "${
|
|
4299
|
-
if ("idx" in
|
|
4300
|
-
if (
|
|
4301
|
-
throw new Error(`Axis index ${
|
|
4302
|
-
return r.axesSpec[
|
|
4303
|
-
} else if ("name" in
|
|
4304
|
-
const o = r.axesSpec.filter((s2) => s2.name ===
|
|
4296
|
+
throw new Error(`Anchor "${t}" not found for axis reference`);
|
|
4297
|
+
if ("idx" in e) {
|
|
4298
|
+
if (e.idx < 0 || e.idx >= r.axesSpec.length)
|
|
4299
|
+
throw new Error(`Axis index ${e.idx} out of bounds for anchor "${t}"`);
|
|
4300
|
+
return r.axesSpec[e.idx];
|
|
4301
|
+
} else if ("name" in e) {
|
|
4302
|
+
const o = r.axesSpec.filter((s2) => s2.name === e.name);
|
|
4305
4303
|
if (o.length > 1)
|
|
4306
|
-
throw new Error(`Multiple axes with name "${
|
|
4304
|
+
throw new Error(`Multiple axes with name "${e.name}" found in anchor "${t}"`);
|
|
4307
4305
|
if (o.length === 0)
|
|
4308
|
-
throw new Error(`Axis with name "${
|
|
4306
|
+
throw new Error(`Axis with name "${e.name}" not found in anchor "${t}"`);
|
|
4309
4307
|
return o[0];
|
|
4310
|
-
} else if ("id" in
|
|
4311
|
-
const o = r.axesSpec.filter((s2) =>
|
|
4308
|
+
} else if ("id" in e) {
|
|
4309
|
+
const o = r.axesSpec.filter((s2) => Z$1(e.id, p$1(s2)));
|
|
4312
4310
|
if (o.length > 1)
|
|
4313
|
-
throw new Error(`Multiple matching axes found for matcher in anchor "${
|
|
4311
|
+
throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
|
|
4314
4312
|
if (o.length === 0)
|
|
4315
|
-
throw new Error(`No matching axis found for matcher in anchor "${
|
|
4313
|
+
throw new Error(`No matching axis found for matcher in anchor "${t}"`);
|
|
4316
4314
|
return o[0];
|
|
4317
4315
|
}
|
|
4318
4316
|
throw new Error("Unsupported axis reference type");
|
|
4319
4317
|
}
|
|
4320
|
-
function
|
|
4318
|
+
function tn(n2) {
|
|
4321
4319
|
return typeof n2 == "object" && "anchor" in n2;
|
|
4322
4320
|
}
|
|
4323
4321
|
function f(n2) {
|
|
4324
4322
|
return n2.kind === "PColumn";
|
|
4325
4323
|
}
|
|
4326
|
-
function
|
|
4324
|
+
function rn(n2) {
|
|
4327
4325
|
return f(n2.spec);
|
|
4328
4326
|
}
|
|
4329
|
-
function
|
|
4330
|
-
if (!
|
|
4327
|
+
function qn(n2) {
|
|
4328
|
+
if (!rn(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
|
|
4331
4329
|
return n2;
|
|
4332
4330
|
}
|
|
4333
|
-
function
|
|
4331
|
+
function Wn(n2, e) {
|
|
4334
4332
|
return n2 === void 0 ? void 0 : {
|
|
4335
4333
|
...n2,
|
|
4336
|
-
data:
|
|
4334
|
+
data: e(n2.data)
|
|
4337
4335
|
};
|
|
4338
4336
|
}
|
|
4339
|
-
function
|
|
4340
|
-
const
|
|
4337
|
+
function Xn(n2) {
|
|
4338
|
+
const e = /* @__PURE__ */ new Map(), t = (r) => {
|
|
4341
4339
|
switch (r.type) {
|
|
4342
4340
|
case "column":
|
|
4343
|
-
|
|
4341
|
+
e.set(r.column.id, r.column);
|
|
4344
4342
|
return;
|
|
4345
4343
|
case "slicedColumn":
|
|
4346
|
-
|
|
4344
|
+
e.set(r.column.id, r.column);
|
|
4345
|
+
return;
|
|
4346
|
+
case "inlineColumn":
|
|
4347
4347
|
return;
|
|
4348
4348
|
case "full":
|
|
4349
4349
|
case "inner":
|
|
4350
|
-
for (const o of r.entries)
|
|
4350
|
+
for (const o of r.entries) t(o);
|
|
4351
4351
|
return;
|
|
4352
4352
|
case "outer":
|
|
4353
|
-
|
|
4354
|
-
for (const o of r.secondary)
|
|
4353
|
+
t(r.primary);
|
|
4354
|
+
for (const o of r.secondary) t(o);
|
|
4355
4355
|
return;
|
|
4356
4356
|
default:
|
|
4357
4357
|
w(r);
|
|
4358
4358
|
}
|
|
4359
4359
|
};
|
|
4360
|
-
return
|
|
4360
|
+
return t(n2), [...e.values()];
|
|
4361
4361
|
}
|
|
4362
|
-
function
|
|
4363
|
-
if (n2.name !== void 0 && n2.name !==
|
|
4362
|
+
function E$1(n2, e) {
|
|
4363
|
+
if (n2.name !== void 0 && n2.name !== e.name)
|
|
4364
4364
|
return false;
|
|
4365
4365
|
if (n2.type !== void 0) {
|
|
4366
4366
|
if (Array.isArray(n2.type)) {
|
|
4367
|
-
if (!n2.type.includes(
|
|
4367
|
+
if (!n2.type.includes(e.type))
|
|
4368
4368
|
return false;
|
|
4369
|
-
} else if (n2.type !==
|
|
4369
|
+
} else if (n2.type !== e.type)
|
|
4370
4370
|
return false;
|
|
4371
4371
|
}
|
|
4372
4372
|
if (n2.domain !== void 0) {
|
|
4373
|
-
const
|
|
4373
|
+
const t = e.domain || {};
|
|
4374
4374
|
for (const [r, o] of Object.entries(n2.domain))
|
|
4375
|
-
if (
|
|
4375
|
+
if (t[r] !== o)
|
|
4376
4376
|
return false;
|
|
4377
4377
|
}
|
|
4378
4378
|
return true;
|
|
4379
4379
|
}
|
|
4380
|
-
function N(n2,
|
|
4381
|
-
if (
|
|
4380
|
+
function N(n2, e) {
|
|
4381
|
+
if (e.name !== void 0 && n2.name !== e.name || e.namePattern !== void 0 && !new RegExp(e.namePattern).test(n2.name))
|
|
4382
4382
|
return false;
|
|
4383
|
-
if (
|
|
4384
|
-
if (Array.isArray(
|
|
4385
|
-
if (!
|
|
4383
|
+
if (e.type !== void 0) {
|
|
4384
|
+
if (Array.isArray(e.type)) {
|
|
4385
|
+
if (!e.type.includes(n2.valueType))
|
|
4386
4386
|
return false;
|
|
4387
|
-
} else if (
|
|
4387
|
+
} else if (e.type !== n2.valueType)
|
|
4388
4388
|
return false;
|
|
4389
4389
|
}
|
|
4390
|
-
if (
|
|
4391
|
-
const
|
|
4392
|
-
for (const [r, o] of Object.entries(
|
|
4393
|
-
if (
|
|
4390
|
+
if (e.domain !== void 0) {
|
|
4391
|
+
const t = n2.domain || {};
|
|
4392
|
+
for (const [r, o] of Object.entries(e.domain))
|
|
4393
|
+
if (t[r] !== o)
|
|
4394
4394
|
return false;
|
|
4395
4395
|
}
|
|
4396
|
-
if (
|
|
4397
|
-
const
|
|
4398
|
-
if (
|
|
4399
|
-
for (const r of
|
|
4400
|
-
if (!
|
|
4396
|
+
if (e.axes !== void 0) {
|
|
4397
|
+
const t = n2.axesSpec.map(p$1);
|
|
4398
|
+
if (e.partialAxesMatch) {
|
|
4399
|
+
for (const r of e.axes)
|
|
4400
|
+
if (!t.some((o) => E$1(r, o)))
|
|
4401
4401
|
return false;
|
|
4402
4402
|
} else {
|
|
4403
|
-
if (
|
|
4403
|
+
if (t.length !== e.axes.length)
|
|
4404
4404
|
return false;
|
|
4405
|
-
for (let r = 0; r <
|
|
4406
|
-
if (!
|
|
4405
|
+
for (let r = 0; r < e.axes.length; r++)
|
|
4406
|
+
if (!E$1(e.axes[r], t[r]))
|
|
4407
4407
|
return false;
|
|
4408
4408
|
}
|
|
4409
4409
|
}
|
|
4410
|
-
if (
|
|
4411
|
-
const
|
|
4412
|
-
for (const [r, o] of Object.entries(
|
|
4413
|
-
if (
|
|
4410
|
+
if (e.annotations !== void 0) {
|
|
4411
|
+
const t = n2.annotations || {};
|
|
4412
|
+
for (const [r, o] of Object.entries(e.annotations))
|
|
4413
|
+
if (t[r] !== o)
|
|
4414
4414
|
return false;
|
|
4415
4415
|
}
|
|
4416
|
-
if (
|
|
4417
|
-
const
|
|
4418
|
-
for (const [r, o] of Object.entries(
|
|
4419
|
-
const s2 =
|
|
4416
|
+
if (e.annotationPatterns !== void 0) {
|
|
4417
|
+
const t = n2.annotations || {};
|
|
4418
|
+
for (const [r, o] of Object.entries(e.annotationPatterns)) {
|
|
4419
|
+
const s2 = t[r];
|
|
4420
4420
|
if (s2 === void 0 || !new RegExp(o).test(s2))
|
|
4421
4421
|
return false;
|
|
4422
4422
|
}
|
|
4423
4423
|
}
|
|
4424
4424
|
return true;
|
|
4425
4425
|
}
|
|
4426
|
-
function
|
|
4427
|
-
return Array.isArray(n2) ? (
|
|
4426
|
+
function Gn(n2) {
|
|
4427
|
+
return Array.isArray(n2) ? (e) => n2.some((t) => f(e) && N(e, t)) : (e) => f(e) && N(e, n2);
|
|
4428
|
+
}
|
|
4429
|
+
function Qn(n2) {
|
|
4430
|
+
const e = {
|
|
4431
|
+
kind: n2.kind,
|
|
4432
|
+
name: n2.name
|
|
4433
|
+
};
|
|
4434
|
+
return n2.domain !== void 0 && (e.domain = n2.domain), f(n2) && (e.axesSpec = J(n2.axesSpec)), ke(e);
|
|
4428
4435
|
}
|
|
4429
4436
|
z$1.object({
|
|
4430
4437
|
__isRef: z$1.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
4431
4438
|
blockId: z$1.string().describe("Upstream block id"),
|
|
4432
|
-
name: z$1.string().describe("Name of the output provided to the upstream block's output context")
|
|
4439
|
+
name: z$1.string().describe("Name of the output provided to the upstream block's output context"),
|
|
4440
|
+
requireEnrichments: z$1.literal(true).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")
|
|
4433
4441
|
}).describe(
|
|
4434
4442
|
"Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
|
|
4435
|
-
).
|
|
4436
|
-
function
|
|
4443
|
+
).readonly();
|
|
4444
|
+
function ne(n2) {
|
|
4437
4445
|
return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
|
|
4438
4446
|
}
|
|
4439
|
-
function
|
|
4440
|
-
|
|
4447
|
+
function te$1(n2, e = true) {
|
|
4448
|
+
if (e)
|
|
4449
|
+
return {
|
|
4450
|
+
...n2,
|
|
4451
|
+
requireEnrichments: true
|
|
4452
|
+
};
|
|
4453
|
+
{
|
|
4454
|
+
const { requireEnrichments: t, ...r } = n2;
|
|
4455
|
+
return r;
|
|
4456
|
+
}
|
|
4457
|
+
}
|
|
4458
|
+
function oe$1(n2, e) {
|
|
4459
|
+
return n2.ok ? { ok: true, value: e(n2.value) } : n2;
|
|
4441
4460
|
}
|
|
4442
|
-
const
|
|
4443
|
-
z$1.string().length(
|
|
4444
|
-
function
|
|
4445
|
-
return
|
|
4461
|
+
const fn = 24;
|
|
4462
|
+
z$1.string().length(fn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
4463
|
+
function ue(n2) {
|
|
4464
|
+
return ke(n2);
|
|
4465
|
+
}
|
|
4466
|
+
function ce$1(n2) {
|
|
4467
|
+
return JSON.parse(n2);
|
|
4446
4468
|
}
|
|
4447
4469
|
var stringify = { exports: {} };
|
|
4448
4470
|
var hasRequiredStringify;
|
|
@@ -4503,54 +4525,54 @@
|
|
|
4503
4525
|
cause: z$1.lazy(() => n).optional(),
|
|
4504
4526
|
errors: z$1.lazy(() => n.array()).optional()
|
|
4505
4527
|
});
|
|
4506
|
-
var
|
|
4507
|
-
var
|
|
4508
|
-
var
|
|
4509
|
-
function
|
|
4528
|
+
var qe = Object.defineProperty;
|
|
4529
|
+
var ze = (t, e, n2) => e in t ? qe(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
|
|
4530
|
+
var O = (t, e, n2) => ze(t, typeof e != "symbol" ? e + "" : e, n2);
|
|
4531
|
+
function re(t) {
|
|
4510
4532
|
return { type: "Immediate", value: t };
|
|
4511
4533
|
}
|
|
4512
|
-
function
|
|
4534
|
+
function pt() {
|
|
4513
4535
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
4514
4536
|
}
|
|
4515
|
-
function
|
|
4537
|
+
function De(t) {
|
|
4516
4538
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
4517
4539
|
return globalThis.getPlatforma(t);
|
|
4518
4540
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
4519
4541
|
throw new Error("Can't get platforma instance.");
|
|
4520
4542
|
}
|
|
4521
|
-
function
|
|
4543
|
+
function ft() {
|
|
4522
4544
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4523
4545
|
}
|
|
4524
4546
|
function m() {
|
|
4525
4547
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4526
4548
|
throw new Error("Not in config rendering context");
|
|
4527
4549
|
}
|
|
4528
|
-
function
|
|
4529
|
-
const n2 =
|
|
4550
|
+
function H(t, e) {
|
|
4551
|
+
const n2 = ft();
|
|
4530
4552
|
if (n2 === void 0) return false;
|
|
4531
4553
|
if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
4532
4554
|
return n2.callbackRegistry[t] = e, true;
|
|
4533
4555
|
}
|
|
4534
|
-
const
|
|
4535
|
-
function
|
|
4556
|
+
const ce = /* @__PURE__ */ new Map();
|
|
4557
|
+
function ht(t, e) {
|
|
4536
4558
|
t in m().callbackRegistry || (m().callbackRegistry[t] = (n2) => {
|
|
4537
|
-
for (const r of
|
|
4559
|
+
for (const r of ce.get(t))
|
|
4538
4560
|
r(n2);
|
|
4539
|
-
},
|
|
4561
|
+
}, ce.set(t, [])), ce.get(t).push(e);
|
|
4540
4562
|
}
|
|
4541
|
-
class
|
|
4563
|
+
class _ {
|
|
4542
4564
|
constructor(e, n2 = (r) => r) {
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
this.handle = e, this.postProcess = n2,
|
|
4565
|
+
O(this, "isResolved", false);
|
|
4566
|
+
O(this, "resolvedValue");
|
|
4567
|
+
this.handle = e, this.postProcess = n2, ht(e, (r) => {
|
|
4546
4568
|
this.resolvedValue = n2(r), this.isResolved = true;
|
|
4547
4569
|
});
|
|
4548
4570
|
}
|
|
4549
4571
|
map(e) {
|
|
4550
|
-
return new
|
|
4572
|
+
return new _(this.handle, (n2) => e(this.postProcess(n2)));
|
|
4551
4573
|
}
|
|
4552
4574
|
mapDefined(e) {
|
|
4553
|
-
return new
|
|
4575
|
+
return new _(this.handle, (n2) => {
|
|
4554
4576
|
const r = this.postProcess(n2);
|
|
4555
4577
|
return r ? e(r) : void 0;
|
|
4556
4578
|
});
|
|
@@ -4559,10 +4581,10 @@
|
|
|
4559
4581
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
4560
4582
|
}
|
|
4561
4583
|
}
|
|
4562
|
-
function
|
|
4584
|
+
function he(t, e) {
|
|
4563
4585
|
return t === void 0 ? void 0 : e(t);
|
|
4564
4586
|
}
|
|
4565
|
-
class
|
|
4587
|
+
class E {
|
|
4566
4588
|
constructor(e, n2) {
|
|
4567
4589
|
this.handle = e, this.resolvePath = n2;
|
|
4568
4590
|
}
|
|
@@ -4601,9 +4623,9 @@
|
|
|
4601
4623
|
...this.resolvePath,
|
|
4602
4624
|
...n2.map((i) => typeof i == "string" ? i : i.field)
|
|
4603
4625
|
];
|
|
4604
|
-
return
|
|
4626
|
+
return he(
|
|
4605
4627
|
m().resolveWithCommon(this.handle, e, ...n2),
|
|
4606
|
-
(i) => new
|
|
4628
|
+
(i) => new E(i, r)
|
|
4607
4629
|
);
|
|
4608
4630
|
}
|
|
4609
4631
|
get resourceType() {
|
|
@@ -4623,9 +4645,9 @@
|
|
|
4623
4645
|
}
|
|
4624
4646
|
getError() {
|
|
4625
4647
|
const e = [...this.resolvePath, "error"];
|
|
4626
|
-
return
|
|
4648
|
+
return he(
|
|
4627
4649
|
m().getError(this.handle),
|
|
4628
|
-
(n2) => new
|
|
4650
|
+
(n2) => new E(n2, e)
|
|
4629
4651
|
);
|
|
4630
4652
|
}
|
|
4631
4653
|
listInputFields() {
|
|
@@ -4665,7 +4687,7 @@
|
|
|
4665
4687
|
getPColumns(e = false, n2 = "") {
|
|
4666
4688
|
const r = this.parsePObjectCollection(e, n2);
|
|
4667
4689
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
|
|
4668
|
-
if (!
|
|
4690
|
+
if (!rn(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
|
|
4669
4691
|
return s2;
|
|
4670
4692
|
});
|
|
4671
4693
|
}
|
|
@@ -4683,20 +4705,20 @@
|
|
|
4683
4705
|
const i = {};
|
|
4684
4706
|
for (const [s2, o] of Object.entries(r)) {
|
|
4685
4707
|
const a = [...this.resolvePath, s2];
|
|
4686
|
-
i[s2] =
|
|
4708
|
+
i[s2] = Wn(o, (l2) => new E(l2, a));
|
|
4687
4709
|
}
|
|
4688
4710
|
return i;
|
|
4689
4711
|
}
|
|
4690
|
-
getFileContentAsBase64() {
|
|
4691
|
-
return new
|
|
4712
|
+
getFileContentAsBase64(e) {
|
|
4713
|
+
return new _(m().getBlobContentAsBase64(this.handle, e));
|
|
4692
4714
|
}
|
|
4693
|
-
getFileContentAsString() {
|
|
4694
|
-
return new
|
|
4715
|
+
getFileContentAsString(e) {
|
|
4716
|
+
return new _(m().getBlobContentAsString(this.handle, e));
|
|
4695
4717
|
}
|
|
4696
|
-
getFileContentAsJson() {
|
|
4697
|
-
return new
|
|
4698
|
-
m().getBlobContentAsString(this.handle)
|
|
4699
|
-
).mapDefined((
|
|
4718
|
+
getFileContentAsJson(e) {
|
|
4719
|
+
return new _(
|
|
4720
|
+
m().getBlobContentAsString(this.handle, e)
|
|
4721
|
+
).mapDefined((n2) => JSON.parse(n2));
|
|
4700
4722
|
}
|
|
4701
4723
|
/**
|
|
4702
4724
|
* @deprecated use getFileContentAsBase64
|
|
@@ -4714,7 +4736,7 @@
|
|
|
4714
4736
|
* @returns downloaded file handle
|
|
4715
4737
|
*/
|
|
4716
4738
|
getFileHandle() {
|
|
4717
|
-
return new
|
|
4739
|
+
return new _(m().getDownloadedBlobContentHandle(this.handle));
|
|
4718
4740
|
}
|
|
4719
4741
|
/**
|
|
4720
4742
|
* @deprecated use getFileHandle
|
|
@@ -4726,7 +4748,7 @@
|
|
|
4726
4748
|
* @returns downloaded file handle
|
|
4727
4749
|
*/
|
|
4728
4750
|
getRemoteFileHandle() {
|
|
4729
|
-
return new
|
|
4751
|
+
return new _(m().getOnDemandBlobContentHandle(this.handle));
|
|
4730
4752
|
}
|
|
4731
4753
|
/**
|
|
4732
4754
|
* @deprecated use getRemoteFileHandle
|
|
@@ -4738,22 +4760,22 @@
|
|
|
4738
4760
|
* @returns the url to the extracted folder
|
|
4739
4761
|
*/
|
|
4740
4762
|
extractArchiveAndGetURL(e) {
|
|
4741
|
-
return new
|
|
4763
|
+
return new _(m().extractArchiveAndGetURL(this.handle, e));
|
|
4742
4764
|
}
|
|
4743
4765
|
getImportProgress() {
|
|
4744
|
-
return new
|
|
4766
|
+
return new _(m().getImportProgress(this.handle));
|
|
4745
4767
|
}
|
|
4746
4768
|
getLastLogs(e) {
|
|
4747
|
-
return new
|
|
4769
|
+
return new _(m().getLastLogs(this.handle, e));
|
|
4748
4770
|
}
|
|
4749
4771
|
getProgressLog(e) {
|
|
4750
|
-
return new
|
|
4772
|
+
return new _(m().getProgressLog(this.handle, e));
|
|
4751
4773
|
}
|
|
4752
4774
|
getProgressLogWithInfo(e) {
|
|
4753
|
-
return new
|
|
4775
|
+
return new _(m().getProgressLogWithInfo(this.handle, e));
|
|
4754
4776
|
}
|
|
4755
4777
|
getLogHandle() {
|
|
4756
|
-
return new
|
|
4778
|
+
return new _(m().getLogHandle(this.handle));
|
|
4757
4779
|
}
|
|
4758
4780
|
allFieldsResolved(e = "Input") {
|
|
4759
4781
|
switch (e) {
|
|
@@ -4779,134 +4801,135 @@
|
|
|
4779
4801
|
let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4780
4802
|
(u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
|
|
4781
4803
|
);
|
|
4782
|
-
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2,
|
|
4804
|
+
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, c2]) => o(u2, c2));
|
|
4783
4805
|
}
|
|
4784
4806
|
}
|
|
4785
|
-
const
|
|
4786
|
-
const
|
|
4807
|
+
const Re = "staging", Fe = "main";
|
|
4808
|
+
const yt = "pl7.app/label", vt = "pl7.app/trace", bt = z$1.object({
|
|
4787
4809
|
type: z$1.string(),
|
|
4788
4810
|
importance: z$1.number().optional(),
|
|
4789
4811
|
id: z$1.string().optional(),
|
|
4790
4812
|
label: z$1.string()
|
|
4791
|
-
}),
|
|
4792
|
-
function
|
|
4793
|
-
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(),
|
|
4794
|
-
var
|
|
4795
|
-
const
|
|
4796
|
-
let
|
|
4797
|
-
"spec" in
|
|
4798
|
-
const
|
|
4799
|
-
...
|
|
4800
|
-
...
|
|
4801
|
-
...
|
|
4813
|
+
}), wt = z$1.array(bt), At = 1e-3, xt = "__LABEL__", Pe = "__LABEL__@1";
|
|
4814
|
+
function je(t, e, n2 = {}) {
|
|
4815
|
+
const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, s2 = /* @__PURE__ */ new Map(), o = t.map((f2) => {
|
|
4816
|
+
var P2, R;
|
|
4817
|
+
const w2 = e(f2);
|
|
4818
|
+
let p2, g, b;
|
|
4819
|
+
"spec" in w2 && typeof w2.spec == "object" ? (p2 = w2.spec, g = w2.prefixTrace, b = w2.suffixTrace) : p2 = w2;
|
|
4820
|
+
const h2 = (P2 = p2.annotations) == null ? void 0 : P2[yt], I = (R = p2.annotations) == null ? void 0 : R[vt], x = (I ? wt.safeParse(JSON.parse(I)).data : void 0) ?? [], v = [
|
|
4821
|
+
...g ?? [],
|
|
4822
|
+
...x,
|
|
4823
|
+
...b ?? []
|
|
4802
4824
|
];
|
|
4803
|
-
if (
|
|
4804
|
-
const
|
|
4805
|
-
n2.addLabelAsSuffix ?
|
|
4806
|
-
}
|
|
4807
|
-
const
|
|
4808
|
-
for (let
|
|
4809
|
-
const { type:
|
|
4810
|
-
|
|
4811
|
-
const
|
|
4812
|
-
|
|
4813
|
-
|
|
4825
|
+
if (h2 !== void 0) {
|
|
4826
|
+
const k2 = { label: h2, type: xt, importance: -2 };
|
|
4827
|
+
n2.addLabelAsSuffix ? v.push(k2) : v.splice(0, 0, k2);
|
|
4828
|
+
}
|
|
4829
|
+
const A = [], L = /* @__PURE__ */ new Map();
|
|
4830
|
+
for (let k2 = v.length - 1; k2 >= 0; --k2) {
|
|
4831
|
+
const { type: W } = v[k2], j2 = v[k2].importance ?? 0, $ = (L.get(W) ?? 0) + 1;
|
|
4832
|
+
L.set(W, $);
|
|
4833
|
+
const F = `${W}@${$}`;
|
|
4834
|
+
s2.set(F, (s2.get(F) ?? 0) + 1), r.set(
|
|
4835
|
+
F,
|
|
4814
4836
|
Math.max(
|
|
4815
|
-
r.get(
|
|
4816
|
-
|
|
4837
|
+
r.get(F) ?? Number.NEGATIVE_INFINITY,
|
|
4838
|
+
j2 - (v.length - k2) * At
|
|
4817
4839
|
)
|
|
4818
|
-
),
|
|
4840
|
+
), A.push({ ...v[k2], fullType: F, occurrenceIndex: $ });
|
|
4819
4841
|
}
|
|
4820
|
-
return
|
|
4842
|
+
return A.reverse(), {
|
|
4821
4843
|
value: f2,
|
|
4822
|
-
spec:
|
|
4823
|
-
label:
|
|
4824
|
-
fullTrace:
|
|
4844
|
+
spec: p2,
|
|
4845
|
+
label: h2,
|
|
4846
|
+
fullTrace: A
|
|
4825
4847
|
};
|
|
4826
|
-
}),
|
|
4827
|
-
|
|
4828
|
-
for (const [f2] of
|
|
4829
|
-
f2.endsWith("@1") ||
|
|
4830
|
-
const
|
|
4831
|
-
const
|
|
4832
|
-
for (let
|
|
4833
|
-
const
|
|
4834
|
-
if (
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4848
|
+
}), a = [], l2 = [], u2 = [...r];
|
|
4849
|
+
u2.sort(([, f2], [, w2]) => w2 - f2);
|
|
4850
|
+
for (const [f2] of u2)
|
|
4851
|
+
f2.endsWith("@1") || s2.get(f2) === t.length ? a.push(f2) : l2.push(f2);
|
|
4852
|
+
const c2 = (f2, w2 = false) => {
|
|
4853
|
+
const p2 = [];
|
|
4854
|
+
for (let g = 0; g < o.length; g++) {
|
|
4855
|
+
const b = o[g], h2 = b.fullTrace.filter((v) => f2.has(v.fullType) || i && i.has(v.type));
|
|
4856
|
+
if (h2.length === 0)
|
|
4857
|
+
if (w2)
|
|
4858
|
+
p2.push({
|
|
4859
|
+
label: "Unlabeled",
|
|
4860
|
+
value: b.value
|
|
4861
|
+
});
|
|
4862
|
+
else return;
|
|
4863
|
+
const I = h2.map((v) => v.label), x = n2.separator ?? " / ";
|
|
4864
|
+
p2.push({
|
|
4865
|
+
label: I.join(x),
|
|
4866
|
+
value: b.value
|
|
4840
4867
|
});
|
|
4841
4868
|
}
|
|
4842
|
-
return
|
|
4869
|
+
return p2;
|
|
4843
4870
|
};
|
|
4844
|
-
if (
|
|
4845
|
-
if (
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
let y = 0, w2 = 0;
|
|
4851
|
-
for (; y < o.length; ) {
|
|
4871
|
+
if (a.length === 0) {
|
|
4872
|
+
if (l2.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
4873
|
+
return c2(new Set(Pe), true);
|
|
4874
|
+
}
|
|
4875
|
+
let d = 0, y = -1;
|
|
4876
|
+
for (; d < a.length; ) {
|
|
4852
4877
|
const f2 = /* @__PURE__ */ new Set();
|
|
4853
|
-
n2.includeNativeLabel && f2.add(
|
|
4854
|
-
for (let
|
|
4855
|
-
f2.add(
|
|
4856
|
-
const
|
|
4857
|
-
if (
|
|
4858
|
-
|
|
4859
|
-
}
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
const H = "PColumnData/", ne = H + "ResourceMap", re = H + "Partitioned/ResourceMap", B = H + "JsonPartitioned", K = H + "BinaryPartitioned", Re = H + "Partitioned/", ie = Re + "JsonPartitioned", U = Re + "BinaryPartitioned";
|
|
4865
|
-
const fe = (t) => {
|
|
4878
|
+
n2.includeNativeLabel && f2.add(Pe);
|
|
4879
|
+
for (let p2 = 0; p2 < d; ++p2) f2.add(a[p2]);
|
|
4880
|
+
y >= 0 && f2.add(a[y]);
|
|
4881
|
+
const w2 = c2(f2);
|
|
4882
|
+
if (w2 !== void 0 && new Set(w2.map((p2) => p2.label)).size === t.length) return w2;
|
|
4883
|
+
y++, y >= a.length && (d++, y = d);
|
|
4884
|
+
}
|
|
4885
|
+
return c2(/* @__PURE__ */ new Set([...a, ...l2]), true);
|
|
4886
|
+
}
|
|
4887
|
+
const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", Ve = Z + "Partitioned/", ae = Ve + "JsonPartitioned", z = Ve + "BinaryPartitioned";
|
|
4888
|
+
const me = (t) => {
|
|
4866
4889
|
if (t.endsWith(".index"))
|
|
4867
4890
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
4868
4891
|
if (t.endsWith(".values"))
|
|
4869
4892
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
4870
4893
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
4871
4894
|
};
|
|
4872
|
-
function
|
|
4895
|
+
function Ct(t) {
|
|
4873
4896
|
if (!t) return;
|
|
4874
4897
|
const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
|
|
4875
4898
|
let i = 0;
|
|
4876
4899
|
switch (e) {
|
|
4877
|
-
case
|
|
4900
|
+
case se:
|
|
4878
4901
|
i = n2.keyLength;
|
|
4879
4902
|
break;
|
|
4880
|
-
case
|
|
4903
|
+
case oe:
|
|
4881
4904
|
i = n2.partitionKeyLength + n2.keyLength;
|
|
4882
4905
|
break;
|
|
4906
|
+
case q:
|
|
4883
4907
|
case B:
|
|
4884
|
-
case K:
|
|
4885
4908
|
i = n2.partitionKeyLength;
|
|
4886
4909
|
break;
|
|
4887
|
-
case
|
|
4888
|
-
case
|
|
4910
|
+
case z:
|
|
4911
|
+
case ae:
|
|
4889
4912
|
i = n2.superPartitionKeyLength + n2.partitionKeyLength;
|
|
4890
4913
|
break;
|
|
4891
4914
|
}
|
|
4892
4915
|
switch (e) {
|
|
4893
|
-
case
|
|
4916
|
+
case se:
|
|
4917
|
+
case q:
|
|
4894
4918
|
case B:
|
|
4895
|
-
case K:
|
|
4896
4919
|
for (let s2 of t.listInputFields()) {
|
|
4897
|
-
e ===
|
|
4920
|
+
e === B && (s2 = me(s2).baseKey);
|
|
4898
4921
|
const o = [...JSON.parse(s2)];
|
|
4899
4922
|
r.push(o);
|
|
4900
4923
|
}
|
|
4901
4924
|
break;
|
|
4902
|
-
case
|
|
4903
|
-
case
|
|
4904
|
-
case
|
|
4925
|
+
case oe:
|
|
4926
|
+
case z:
|
|
4927
|
+
case ae:
|
|
4905
4928
|
for (const s2 of t.listInputFields()) {
|
|
4906
4929
|
const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
|
|
4907
4930
|
if (a !== void 0)
|
|
4908
4931
|
for (let l2 of a.listInputFields()) {
|
|
4909
|
-
e ===
|
|
4932
|
+
e === z && (l2 = me(l2).baseKey);
|
|
4910
4933
|
const u2 = [...o, ...JSON.parse(l2)];
|
|
4911
4934
|
r.push(u2);
|
|
4912
4935
|
}
|
|
@@ -4915,7 +4938,7 @@
|
|
|
4915
4938
|
}
|
|
4916
4939
|
return { data: r, keyLength: i };
|
|
4917
4940
|
}
|
|
4918
|
-
function
|
|
4941
|
+
function Pt(t) {
|
|
4919
4942
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
4920
4943
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
4921
4944
|
const { parts: e, partitionKeyLength: n2 } = t, r = [];
|
|
@@ -4934,11 +4957,11 @@
|
|
|
4934
4957
|
}
|
|
4935
4958
|
return r.map((i) => Array.from(i.values()));
|
|
4936
4959
|
}
|
|
4937
|
-
function
|
|
4960
|
+
function St(t) {
|
|
4938
4961
|
if (t === void 0) return;
|
|
4939
|
-
if (
|
|
4940
|
-
return
|
|
4941
|
-
const e =
|
|
4962
|
+
if (K(t))
|
|
4963
|
+
return Pt(t);
|
|
4964
|
+
const e = Ct(t);
|
|
4942
4965
|
if (!e) return;
|
|
4943
4966
|
const { data: n2, keyLength: r } = e, i = [];
|
|
4944
4967
|
for (let s2 = 0; s2 < r; ++s2)
|
|
@@ -4951,16 +4974,16 @@
|
|
|
4951
4974
|
}
|
|
4952
4975
|
return i.map((s2) => Array.from(s2.values()));
|
|
4953
4976
|
}
|
|
4954
|
-
function
|
|
4977
|
+
function ye(t, e = []) {
|
|
4955
4978
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
4956
4979
|
const n2 = t.resourceType.name, r = t.getDataAsJson();
|
|
4957
|
-
if (e.length > 0 && (n2 ===
|
|
4980
|
+
if (e.length > 0 && (n2 === ae || n2 === z))
|
|
4958
4981
|
throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
|
|
4959
4982
|
switch (n2) {
|
|
4960
|
-
case
|
|
4961
|
-
case
|
|
4983
|
+
case se:
|
|
4984
|
+
case oe:
|
|
4962
4985
|
throw new Error(`Only data columns are supported, got: ${n2}`);
|
|
4963
|
-
case
|
|
4986
|
+
case q: {
|
|
4964
4987
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4965
4988
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4966
4989
|
const i = [];
|
|
@@ -4976,12 +4999,12 @@
|
|
|
4976
4999
|
parts: i
|
|
4977
5000
|
};
|
|
4978
5001
|
}
|
|
4979
|
-
case
|
|
5002
|
+
case B: {
|
|
4980
5003
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4981
5004
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4982
5005
|
const i = [], s2 = /* @__PURE__ */ new Map();
|
|
4983
5006
|
for (const o of t.listInputFields()) {
|
|
4984
|
-
const a =
|
|
5007
|
+
const a = me(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4985
5008
|
if (l2 === void 0) return;
|
|
4986
5009
|
let u2 = s2.get(a.baseKey);
|
|
4987
5010
|
u2 || (u2 = {}, s2.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
|
|
@@ -5003,16 +5026,16 @@
|
|
|
5003
5026
|
parts: i
|
|
5004
5027
|
};
|
|
5005
5028
|
}
|
|
5006
|
-
case
|
|
5029
|
+
case ae: {
|
|
5007
5030
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
5008
5031
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
5009
5032
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
5010
5033
|
for (const o of t.listInputFields()) {
|
|
5011
5034
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
5012
5035
|
if (a === void 0) return;
|
|
5013
|
-
if (a.resourceType.name !==
|
|
5014
|
-
throw new Error(`Expected ${
|
|
5015
|
-
const l2 =
|
|
5036
|
+
if (a.resourceType.name !== q)
|
|
5037
|
+
throw new Error(`Expected ${q} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5038
|
+
const l2 = ye(a, JSON.parse(o));
|
|
5016
5039
|
if (l2 === void 0) return;
|
|
5017
5040
|
if (l2.type !== "JsonPartitioned")
|
|
5018
5041
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5024,16 +5047,16 @@
|
|
|
5024
5047
|
parts: s2
|
|
5025
5048
|
};
|
|
5026
5049
|
}
|
|
5027
|
-
case
|
|
5050
|
+
case z: {
|
|
5028
5051
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
5029
5052
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
5030
5053
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
5031
5054
|
for (const o of t.listInputFields()) {
|
|
5032
5055
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
5033
5056
|
if (a === void 0) return;
|
|
5034
|
-
if (a.resourceType.name !==
|
|
5035
|
-
throw new Error(`Expected ${
|
|
5036
|
-
const l2 =
|
|
5057
|
+
if (a.resourceType.name !== B)
|
|
5058
|
+
throw new Error(`Expected ${B} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5059
|
+
const l2 = ye(a, JSON.parse(o));
|
|
5037
5060
|
if (l2 === void 0) return;
|
|
5038
5061
|
if (l2.type !== "BinaryPartitioned")
|
|
5039
5062
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5049,15 +5072,15 @@
|
|
|
5049
5072
|
throw new Error(`Unknown resource type: ${n2}`);
|
|
5050
5073
|
}
|
|
5051
5074
|
}
|
|
5052
|
-
function
|
|
5075
|
+
function _t(t) {
|
|
5053
5076
|
if (t !== void 0) {
|
|
5054
|
-
if (
|
|
5055
|
-
if (
|
|
5056
|
-
if (t instanceof
|
|
5077
|
+
if (K(t)) return t;
|
|
5078
|
+
if (En(t)) return Cn(t);
|
|
5079
|
+
if (t instanceof E) return ye(t);
|
|
5057
5080
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
5058
5081
|
}
|
|
5059
5082
|
}
|
|
5060
|
-
function
|
|
5083
|
+
function It(t, e) {
|
|
5061
5084
|
const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
|
|
5062
5085
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
5063
5086
|
const { partitionKeyLength: s2 } = t;
|
|
@@ -5117,39 +5140,45 @@
|
|
|
5117
5140
|
}
|
|
5118
5141
|
}
|
|
5119
5142
|
}
|
|
5120
|
-
|
|
5143
|
+
function Lt(t) {
|
|
5144
|
+
if (!Array.isArray(t)) return false;
|
|
5145
|
+
if (t.length === 0) return true;
|
|
5146
|
+
const e = t[0];
|
|
5147
|
+
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
5148
|
+
}
|
|
5149
|
+
class Tt {
|
|
5121
5150
|
constructor(e) {
|
|
5122
5151
|
this.columns = e;
|
|
5123
5152
|
}
|
|
5124
5153
|
selectColumns(e) {
|
|
5125
|
-
const n2 = typeof e == "function" ? e :
|
|
5154
|
+
const n2 = typeof e == "function" ? e : Gn(e);
|
|
5126
5155
|
return this.columns.filter((r) => n2(r.spec));
|
|
5127
5156
|
}
|
|
5128
5157
|
}
|
|
5129
|
-
function
|
|
5158
|
+
function Et(t) {
|
|
5130
5159
|
if (t)
|
|
5131
5160
|
return t.map((e) => ({
|
|
5132
|
-
type: `split:${
|
|
5161
|
+
type: `split:${Rn(e.axisId)}`,
|
|
5133
5162
|
label: e.label,
|
|
5134
5163
|
importance: 1e6
|
|
5135
5164
|
// High importance for split filters in labels
|
|
5136
5165
|
}));
|
|
5137
5166
|
}
|
|
5138
|
-
function
|
|
5167
|
+
function kt(t) {
|
|
5139
5168
|
if (t)
|
|
5140
5169
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
5141
5170
|
}
|
|
5142
|
-
function
|
|
5171
|
+
function Ot(t, e) {
|
|
5143
5172
|
if (!e || e.length === 0) return t;
|
|
5144
5173
|
const n2 = [...e].sort((r, i) => r[0] - i[0]);
|
|
5145
|
-
return
|
|
5174
|
+
return ke({ id: t, axisFilters: n2 });
|
|
5146
5175
|
}
|
|
5147
|
-
function
|
|
5176
|
+
function Se(t) {
|
|
5148
5177
|
if (!t || typeof t != "object") return false;
|
|
5149
5178
|
const e = t, n2 = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
|
|
5150
5179
|
return !!e.domainAnchor || n2 || r;
|
|
5151
5180
|
}
|
|
5152
|
-
function
|
|
5181
|
+
function Dt(t) {
|
|
5153
5182
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
5154
5183
|
return [];
|
|
5155
5184
|
const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
|
|
@@ -5157,11 +5186,11 @@
|
|
|
5157
5186
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
5158
5187
|
return e.sort((n2, r) => n2 - r), e;
|
|
5159
5188
|
}
|
|
5160
|
-
class
|
|
5189
|
+
class le {
|
|
5161
5190
|
constructor() {
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5191
|
+
O(this, "defaultProviderStore", []);
|
|
5192
|
+
O(this, "providers", [new Tt(this.defaultProviderStore)]);
|
|
5193
|
+
O(this, "axisLabelProviders", []);
|
|
5165
5194
|
}
|
|
5166
5195
|
addColumnProvider(e) {
|
|
5167
5196
|
return this.providers.push(e), this;
|
|
@@ -5183,114 +5212,132 @@
|
|
|
5183
5212
|
}
|
|
5184
5213
|
}
|
|
5185
5214
|
getUniversalEntries(e, n2) {
|
|
5186
|
-
const { anchorCtx: r, labelOps: i, dontWaitAllData: s2 = false, overrideLabelAnnotation: o = false } = n2 ?? {},
|
|
5215
|
+
const { anchorCtx: r, labelOps: i, dontWaitAllData: s2 = false, overrideLabelAnnotation: o = false, exclude: a } = n2 ?? {}, l2 = {
|
|
5187
5216
|
...o && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
|
|
5188
5217
|
...i ?? {}
|
|
5189
|
-
}
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5218
|
+
};
|
|
5219
|
+
let u2 = () => false;
|
|
5220
|
+
if (a) {
|
|
5221
|
+
const p2 = (Array.isArray(a) ? a : [a]).map((g) => {
|
|
5222
|
+
if (Se(g)) {
|
|
5223
|
+
if (!r)
|
|
5224
|
+
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
5225
|
+
return Gn(Mn(r.anchors, g, n2));
|
|
5226
|
+
} else
|
|
5227
|
+
return Gn(g);
|
|
5228
|
+
});
|
|
5229
|
+
u2 = (g) => p2.some((b) => b(g));
|
|
5230
|
+
}
|
|
5231
|
+
const c2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], d = [], y = /* @__PURE__ */ new Set();
|
|
5232
|
+
for (const p2 of c2) {
|
|
5233
|
+
const g = Se(p2);
|
|
5234
|
+
let b;
|
|
5235
|
+
if (g) {
|
|
5194
5236
|
if (!r)
|
|
5195
5237
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
5196
|
-
|
|
5238
|
+
b = Mn(r.anchors, p2, n2);
|
|
5197
5239
|
} else
|
|
5198
|
-
|
|
5199
|
-
const
|
|
5200
|
-
for (const
|
|
5201
|
-
const
|
|
5202
|
-
for (const
|
|
5203
|
-
if (
|
|
5204
|
-
|
|
5240
|
+
b = p2;
|
|
5241
|
+
const h2 = /* @__PURE__ */ new Set(), I = [];
|
|
5242
|
+
for (const A of this.providers) {
|
|
5243
|
+
const L = A.selectColumns(b);
|
|
5244
|
+
for (const P2 of L) {
|
|
5245
|
+
if (u2(P2.spec)) continue;
|
|
5246
|
+
if (h2.has(P2.id))
|
|
5247
|
+
throw new Error(`Duplicate column id ${P2.id} in provider ${A.constructor.name}`);
|
|
5248
|
+
const R = Qn(P2.spec);
|
|
5249
|
+
y.has(R) || (h2.add(P2.id), y.add(R), I.push(P2));
|
|
5205
5250
|
}
|
|
5206
5251
|
}
|
|
5207
|
-
if (
|
|
5208
|
-
const
|
|
5209
|
-
for (const
|
|
5210
|
-
if (!f(
|
|
5211
|
-
const
|
|
5252
|
+
if (I.length === 0) continue;
|
|
5253
|
+
const x = Dt(p2), v = x.length > 0;
|
|
5254
|
+
for (const A of I) {
|
|
5255
|
+
if (!f(A.spec)) continue;
|
|
5256
|
+
const L = A.spec;
|
|
5212
5257
|
if (v) {
|
|
5213
|
-
|
|
5214
|
-
|
|
5258
|
+
if (Lt(A.data))
|
|
5259
|
+
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${A.id}`);
|
|
5260
|
+
const P2 = _t(A.data);
|
|
5261
|
+
if (!P2) {
|
|
5215
5262
|
if (s2) continue;
|
|
5216
5263
|
return;
|
|
5217
5264
|
}
|
|
5218
|
-
if (!
|
|
5219
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
5220
|
-
const
|
|
5221
|
-
if (
|
|
5222
|
-
throw new Error(`Not enough partition keys (${
|
|
5223
|
-
const
|
|
5224
|
-
if (
|
|
5225
|
-
if (
|
|
5265
|
+
if (!Sn(P2))
|
|
5266
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${P2.type} for column ${A.id}`);
|
|
5267
|
+
const R = St(P2), k2 = x[x.length - 1];
|
|
5268
|
+
if (k2 >= P2.partitionKeyLength)
|
|
5269
|
+
throw new Error(`Not enough partition keys (${P2.partitionKeyLength}) for requested split axes (max index ${k2}) in column ${L.name}`);
|
|
5270
|
+
const W = x.map((S) => this.findLabels(p$1(L.axesSpec[S]))), j2 = [], $ = (S, G) => {
|
|
5271
|
+
if (G >= x.length) {
|
|
5272
|
+
if (j2.push([...S]), j2.length > 1e4)
|
|
5226
5273
|
throw new Error("Too many key combinations, aborting.");
|
|
5227
5274
|
return;
|
|
5228
5275
|
}
|
|
5229
|
-
const
|
|
5230
|
-
if (
|
|
5231
|
-
throw new Error(`Axis index ${
|
|
5232
|
-
const
|
|
5233
|
-
if (!
|
|
5234
|
-
|
|
5276
|
+
const V = x[G];
|
|
5277
|
+
if (V >= R.length)
|
|
5278
|
+
throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${R.length}) during split key generation for column ${A.id}`);
|
|
5279
|
+
const N2 = R[V];
|
|
5280
|
+
if (!N2 || N2.length === 0) {
|
|
5281
|
+
j2.length = 0;
|
|
5235
5282
|
return;
|
|
5236
5283
|
}
|
|
5237
|
-
for (const
|
|
5238
|
-
|
|
5284
|
+
for (const ee of N2)
|
|
5285
|
+
S.push(ee), $(S, G + 1), S.pop();
|
|
5239
5286
|
};
|
|
5240
|
-
if (
|
|
5287
|
+
if ($([], 0), j2.length === 0)
|
|
5241
5288
|
continue;
|
|
5242
|
-
const
|
|
5243
|
-
for (let
|
|
5244
|
-
|
|
5245
|
-
const
|
|
5246
|
-
for (const
|
|
5247
|
-
const
|
|
5248
|
-
const
|
|
5249
|
-
return { axisIdx:
|
|
5289
|
+
const F = [...L.axesSpec], Be = x.map((S) => S);
|
|
5290
|
+
for (let S = x.length - 1; S >= 0; S--)
|
|
5291
|
+
F.splice(x[S], 1);
|
|
5292
|
+
const We = { ...L, axesSpec: F };
|
|
5293
|
+
for (const S of j2) {
|
|
5294
|
+
const G = S.map((V, N2) => {
|
|
5295
|
+
const ee = Be[N2], Ge = p$1(L.axesSpec[ee]), ue2 = W[N2], He = (ue2 == null ? void 0 : ue2[V]) ?? String(V);
|
|
5296
|
+
return { axisIdx: ee, axisId: Ge, value: V, label: He };
|
|
5250
5297
|
});
|
|
5251
|
-
|
|
5298
|
+
d.push({
|
|
5252
5299
|
type: "split",
|
|
5253
|
-
originalColumn:
|
|
5254
|
-
spec:
|
|
5255
|
-
adjustedSpec:
|
|
5256
|
-
dataEntries:
|
|
5257
|
-
axisFilters:
|
|
5300
|
+
originalColumn: A,
|
|
5301
|
+
spec: L,
|
|
5302
|
+
adjustedSpec: We,
|
|
5303
|
+
dataEntries: P2,
|
|
5304
|
+
axisFilters: G
|
|
5258
5305
|
});
|
|
5259
5306
|
}
|
|
5260
5307
|
} else
|
|
5261
|
-
|
|
5308
|
+
d.push({
|
|
5262
5309
|
type: "direct",
|
|
5263
|
-
originalColumn:
|
|
5264
|
-
spec:
|
|
5265
|
-
adjustedSpec:
|
|
5310
|
+
originalColumn: A,
|
|
5311
|
+
spec: L,
|
|
5312
|
+
adjustedSpec: L
|
|
5266
5313
|
});
|
|
5267
5314
|
}
|
|
5268
5315
|
}
|
|
5269
|
-
if (
|
|
5270
|
-
const
|
|
5271
|
-
|
|
5316
|
+
if (d.length === 0) return [];
|
|
5317
|
+
const f$1 = je(
|
|
5318
|
+
d,
|
|
5272
5319
|
(p2) => ({
|
|
5273
5320
|
spec: p2.spec,
|
|
5274
|
-
suffixTrace: p2.type === "split" ?
|
|
5321
|
+
suffixTrace: p2.type === "split" ? Et(p2.axisFilters) : void 0
|
|
5275
5322
|
}),
|
|
5276
|
-
|
|
5323
|
+
l2
|
|
5277
5324
|
), w2 = [];
|
|
5278
|
-
for (const { value: p2, label:
|
|
5279
|
-
const { originalColumn:
|
|
5325
|
+
for (const { value: p2, label: g } of f$1) {
|
|
5326
|
+
const { originalColumn: b, spec: h2 } = p2, I = p2.type === "split" ? p2.axisFilters : void 0, x = kt(I);
|
|
5280
5327
|
let v;
|
|
5281
|
-
r ? v = r.deriveS(
|
|
5282
|
-
let
|
|
5283
|
-
o && (
|
|
5284
|
-
...
|
|
5328
|
+
r ? v = r.deriveS(h2, x) : v = Ot(b.id, x);
|
|
5329
|
+
let A = { ...p2.adjustedSpec };
|
|
5330
|
+
o && (A = {
|
|
5331
|
+
...A,
|
|
5285
5332
|
annotations: {
|
|
5286
|
-
...
|
|
5287
|
-
"pl7.app/label":
|
|
5333
|
+
...A.annotations ?? {},
|
|
5334
|
+
"pl7.app/label": g
|
|
5288
5335
|
}
|
|
5289
5336
|
}), w2.push({
|
|
5290
5337
|
id: v,
|
|
5291
|
-
spec:
|
|
5292
|
-
data: () => p2.type === "split" ?
|
|
5293
|
-
label:
|
|
5338
|
+
spec: A,
|
|
5339
|
+
data: () => p2.type === "split" ? Jn(It(p2.dataEntries, x)) : p2.originalColumn.data,
|
|
5340
|
+
label: g
|
|
5294
5341
|
});
|
|
5295
5342
|
}
|
|
5296
5343
|
return w2;
|
|
@@ -5318,19 +5365,19 @@
|
|
|
5318
5365
|
return i;
|
|
5319
5366
|
}
|
|
5320
5367
|
}
|
|
5321
|
-
function
|
|
5368
|
+
function de(t, e) {
|
|
5322
5369
|
if (t === void 0) return e === void 0;
|
|
5323
5370
|
if (e === void 0) return true;
|
|
5324
5371
|
for (const n2 in e)
|
|
5325
5372
|
if (t[n2] !== e[n2]) return false;
|
|
5326
5373
|
return true;
|
|
5327
5374
|
}
|
|
5328
|
-
function
|
|
5329
|
-
return
|
|
5375
|
+
function _e(t) {
|
|
5376
|
+
return Wn(t, (e) => e instanceof E ? e.handle : En(e) ? Nn(e, (n2) => n2.handle) : e);
|
|
5330
5377
|
}
|
|
5331
|
-
class
|
|
5378
|
+
class Rt {
|
|
5332
5379
|
constructor() {
|
|
5333
|
-
|
|
5380
|
+
O(this, "ctx", m());
|
|
5334
5381
|
}
|
|
5335
5382
|
/**
|
|
5336
5383
|
* @deprecated use getOptions()
|
|
@@ -5339,27 +5386,28 @@
|
|
|
5339
5386
|
return this.ctx.calculateOptions(e);
|
|
5340
5387
|
}
|
|
5341
5388
|
getOptions(e, n2) {
|
|
5342
|
-
const r = typeof e == "function" ? e :
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5389
|
+
const r = typeof e == "function" ? e : Gn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
5390
|
+
let s2 = {}, o = false;
|
|
5391
|
+
return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ? je(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
|
|
5392
|
+
ref: te$1(a, o),
|
|
5393
|
+
label: l2
|
|
5394
|
+
})) : i.map(({ ref: a, obj: l2 }) => ({
|
|
5395
|
+
ref: te$1(a, o),
|
|
5396
|
+
label: s2(l2, a)
|
|
5349
5397
|
}));
|
|
5350
5398
|
}
|
|
5351
5399
|
resolveAnchorCtx(e) {
|
|
5352
|
-
if (e instanceof
|
|
5400
|
+
if (e instanceof _n) return e;
|
|
5353
5401
|
const n2 = {};
|
|
5354
5402
|
for (const [r, i] of Object.entries(e))
|
|
5355
|
-
if (
|
|
5403
|
+
if (ne(i)) {
|
|
5356
5404
|
const s2 = this.getPColumnSpecByRef(i);
|
|
5357
5405
|
if (!s2)
|
|
5358
5406
|
return;
|
|
5359
5407
|
n2[r] = s2;
|
|
5360
5408
|
} else
|
|
5361
5409
|
n2[r] = i;
|
|
5362
|
-
return new
|
|
5410
|
+
return new _n(n2);
|
|
5363
5411
|
}
|
|
5364
5412
|
/**
|
|
5365
5413
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -5372,7 +5420,7 @@
|
|
|
5372
5420
|
getAnchoredPColumns(e, n2, r) {
|
|
5373
5421
|
const i = this.resolveAnchorCtx(e);
|
|
5374
5422
|
if (i)
|
|
5375
|
-
return new
|
|
5423
|
+
return new le().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
|
|
5376
5424
|
...r,
|
|
5377
5425
|
anchorCtx: i
|
|
5378
5426
|
});
|
|
@@ -5409,7 +5457,7 @@
|
|
|
5409
5457
|
getCanonicalOptions(e, n2, r) {
|
|
5410
5458
|
const i = this.resolveAnchorCtx(e);
|
|
5411
5459
|
if (!i) return;
|
|
5412
|
-
const s2 = new
|
|
5460
|
+
const s2 = new le().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
|
|
5413
5461
|
...r,
|
|
5414
5462
|
anchorCtx: i
|
|
5415
5463
|
});
|
|
@@ -5433,7 +5481,7 @@
|
|
|
5433
5481
|
ref: n2.ref,
|
|
5434
5482
|
obj: {
|
|
5435
5483
|
...n2.obj,
|
|
5436
|
-
data: new
|
|
5484
|
+
data: new E(n2.obj.data, [n2.ref.blockId, n2.ref.name])
|
|
5437
5485
|
}
|
|
5438
5486
|
}))
|
|
5439
5487
|
};
|
|
@@ -5452,9 +5500,9 @@
|
|
|
5452
5500
|
ref: n2.ref,
|
|
5453
5501
|
obj: {
|
|
5454
5502
|
...n2.obj,
|
|
5455
|
-
data:
|
|
5503
|
+
data: oe$1(
|
|
5456
5504
|
n2.obj.data,
|
|
5457
|
-
(r) => new
|
|
5505
|
+
(r) => new E(r, [n2.ref.blockId, n2.ref.name])
|
|
5458
5506
|
)
|
|
5459
5507
|
}
|
|
5460
5508
|
}))
|
|
@@ -5481,9 +5529,9 @@
|
|
|
5481
5529
|
)) == null ? void 0 : r.obj;
|
|
5482
5530
|
const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
5483
5531
|
if (n2)
|
|
5484
|
-
return
|
|
5532
|
+
return Wn(
|
|
5485
5533
|
n2,
|
|
5486
|
-
(i) => new
|
|
5534
|
+
(i) => new E(i, [e.blockId, e.name])
|
|
5487
5535
|
);
|
|
5488
5536
|
}
|
|
5489
5537
|
/**
|
|
@@ -5494,7 +5542,7 @@
|
|
|
5494
5542
|
getPColumnByRef(e) {
|
|
5495
5543
|
const n2 = this.getDataByRef(e);
|
|
5496
5544
|
if (n2)
|
|
5497
|
-
return
|
|
5545
|
+
return qn(n2);
|
|
5498
5546
|
}
|
|
5499
5547
|
/**
|
|
5500
5548
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -5526,10 +5574,10 @@
|
|
|
5526
5574
|
if (!f(r.obj.spec))
|
|
5527
5575
|
continue;
|
|
5528
5576
|
const i = r.obj.spec;
|
|
5529
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
5577
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && de(e.domain, i.domain)) {
|
|
5530
5578
|
for (let s2 = 0; s2 < e.axesSpec.length; ++s2) {
|
|
5531
5579
|
const o = e.axesSpec[s2], a = i.axesSpec[s2];
|
|
5532
|
-
if (o.name !== a.name || o.type !== a.type || !
|
|
5580
|
+
if (o.name !== a.name || o.type !== a.type || !de(o.domain, a.domain))
|
|
5533
5581
|
continue e;
|
|
5534
5582
|
}
|
|
5535
5583
|
n2.push(r.obj);
|
|
@@ -5544,9 +5592,9 @@
|
|
|
5544
5592
|
findLabels(e) {
|
|
5545
5593
|
const n2 = this.getData();
|
|
5546
5594
|
for (const r of n2.entries) {
|
|
5547
|
-
if (!
|
|
5595
|
+
if (!rn(r.obj)) continue;
|
|
5548
5596
|
const i = r.obj.spec;
|
|
5549
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
5597
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && de(e.domain, i.axesSpec[0].domain)) {
|
|
5550
5598
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
5551
5599
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
5552
5600
|
return Object.fromEntries(
|
|
@@ -5565,13 +5613,13 @@
|
|
|
5565
5613
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
5566
5614
|
*/
|
|
5567
5615
|
selectColumns(e) {
|
|
5568
|
-
const n2 = typeof e == "function" ? e :
|
|
5616
|
+
const n2 = typeof e == "function" ? e : Gn(e);
|
|
5569
5617
|
return this.getSpecs().entries.filter(({ obj: i }) => f(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
|
|
5570
5618
|
const o = s2;
|
|
5571
5619
|
let a = null;
|
|
5572
5620
|
const l2 = this;
|
|
5573
5621
|
return {
|
|
5574
|
-
id:
|
|
5622
|
+
id: ke(i),
|
|
5575
5623
|
spec: o,
|
|
5576
5624
|
get data() {
|
|
5577
5625
|
var u2;
|
|
@@ -5596,13 +5644,13 @@
|
|
|
5596
5644
|
return r;
|
|
5597
5645
|
}
|
|
5598
5646
|
}
|
|
5599
|
-
class
|
|
5647
|
+
class te {
|
|
5600
5648
|
constructor() {
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5649
|
+
O(this, "ctx");
|
|
5650
|
+
O(this, "args");
|
|
5651
|
+
O(this, "uiState");
|
|
5652
|
+
O(this, "_activeArgsCache");
|
|
5653
|
+
O(this, "resultPool", new Rt());
|
|
5606
5654
|
this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
5607
5655
|
}
|
|
5608
5656
|
/**
|
|
@@ -5619,13 +5667,13 @@
|
|
|
5619
5667
|
// return this.ctx.featureFlags;
|
|
5620
5668
|
// }
|
|
5621
5669
|
getNamedAccessor(e) {
|
|
5622
|
-
return
|
|
5670
|
+
return he(
|
|
5623
5671
|
this.ctx.getAccessorHandleByName(e),
|
|
5624
|
-
(n2) => new
|
|
5672
|
+
(n2) => new E(n2, [e])
|
|
5625
5673
|
);
|
|
5626
5674
|
}
|
|
5627
5675
|
get prerun() {
|
|
5628
|
-
return this.getNamedAccessor(
|
|
5676
|
+
return this.getNamedAccessor(Re);
|
|
5629
5677
|
}
|
|
5630
5678
|
get outputs() {
|
|
5631
5679
|
return this.getNamedAccessor(Fe);
|
|
@@ -5640,13 +5688,13 @@
|
|
|
5640
5688
|
}
|
|
5641
5689
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
5642
5690
|
var i;
|
|
5643
|
-
const n2 = e.some((s2) => !(s2.data instanceof
|
|
5691
|
+
const n2 = e.some((s2) => !(s2.data instanceof E) || En(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
|
|
5644
5692
|
if (n2 && !r) throw Error("Inline or explicit columns not supported");
|
|
5645
5693
|
}
|
|
5646
5694
|
// TODO remove all non-PColumn fields
|
|
5647
5695
|
createPFrame(e) {
|
|
5648
5696
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
5649
|
-
e.map((n2) =>
|
|
5697
|
+
e.map((n2) => _e(n2))
|
|
5650
5698
|
);
|
|
5651
5699
|
}
|
|
5652
5700
|
createPTable(e) {
|
|
@@ -5658,8 +5706,8 @@
|
|
|
5658
5706
|
},
|
|
5659
5707
|
filters: e.filters ?? [],
|
|
5660
5708
|
sorting: e.sorting ?? []
|
|
5661
|
-
} : n2 = e, this.verifyInlineAndExplicitColumnsSupport(
|
|
5662
|
-
|
|
5709
|
+
} : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Xn(n2.src)), this.ctx.createPTable(
|
|
5710
|
+
Un(n2, (r) => _e(r))
|
|
5663
5711
|
);
|
|
5664
5712
|
}
|
|
5665
5713
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -5667,21 +5715,29 @@
|
|
|
5667
5715
|
return this.ctx.getBlockLabel(e);
|
|
5668
5716
|
}
|
|
5669
5717
|
getCurrentUnstableMarker() {
|
|
5670
|
-
|
|
5671
|
-
|
|
5718
|
+
return this.ctx.getCurrentUnstableMarker();
|
|
5719
|
+
}
|
|
5720
|
+
logInfo(e) {
|
|
5721
|
+
this.ctx.logInfo(e);
|
|
5722
|
+
}
|
|
5723
|
+
logWarn(e) {
|
|
5724
|
+
this.ctx.logWarn(e);
|
|
5725
|
+
}
|
|
5726
|
+
logError(e) {
|
|
5727
|
+
this.ctx.logError(e);
|
|
5672
5728
|
}
|
|
5673
5729
|
}
|
|
5674
|
-
const
|
|
5675
|
-
function
|
|
5730
|
+
const Y = "1.34.8";
|
|
5731
|
+
function Ft(t) {
|
|
5676
5732
|
return t.__renderLambda === true;
|
|
5677
5733
|
}
|
|
5678
|
-
function
|
|
5734
|
+
function pe(t) {
|
|
5679
5735
|
if (t !== void 0)
|
|
5680
|
-
return
|
|
5736
|
+
return Ft(t) ? t.handle : t;
|
|
5681
5737
|
}
|
|
5682
5738
|
class T {
|
|
5683
|
-
constructor(e, n2, r, i, s2, o, a) {
|
|
5684
|
-
this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a;
|
|
5739
|
+
constructor(e, n2, r, i, s2, o, a, l2) {
|
|
5740
|
+
this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a, this._enrichmentTargets = l2;
|
|
5685
5741
|
}
|
|
5686
5742
|
static create(e = "Heavy") {
|
|
5687
5743
|
return new T(
|
|
@@ -5689,15 +5745,16 @@
|
|
|
5689
5745
|
void 0,
|
|
5690
5746
|
{},
|
|
5691
5747
|
{},
|
|
5692
|
-
|
|
5693
|
-
|
|
5748
|
+
re(true),
|
|
5749
|
+
re([]),
|
|
5750
|
+
void 0,
|
|
5694
5751
|
void 0
|
|
5695
5752
|
);
|
|
5696
5753
|
}
|
|
5697
5754
|
output(e, n2, r = {}) {
|
|
5698
5755
|
if (typeof n2 == "function") {
|
|
5699
5756
|
const i = `output#${e}`;
|
|
5700
|
-
return
|
|
5757
|
+
return H(i, () => n2(new te())), new T(
|
|
5701
5758
|
this._renderingMode,
|
|
5702
5759
|
this._initialArgs,
|
|
5703
5760
|
this._initialUiState,
|
|
@@ -5711,7 +5768,8 @@
|
|
|
5711
5768
|
},
|
|
5712
5769
|
this._inputsValid,
|
|
5713
5770
|
this._sections,
|
|
5714
|
-
this._title
|
|
5771
|
+
this._title,
|
|
5772
|
+
this._enrichmentTargets
|
|
5715
5773
|
);
|
|
5716
5774
|
} else
|
|
5717
5775
|
return new T(
|
|
@@ -5724,7 +5782,8 @@
|
|
|
5724
5782
|
},
|
|
5725
5783
|
this._inputsValid,
|
|
5726
5784
|
this._sections,
|
|
5727
|
-
this._title
|
|
5785
|
+
this._title,
|
|
5786
|
+
this._enrichmentTargets
|
|
5728
5787
|
);
|
|
5729
5788
|
}
|
|
5730
5789
|
/** Shortcut for {@link output} with retentive flag set to true. */
|
|
@@ -5732,7 +5791,7 @@
|
|
|
5732
5791
|
return this.output(e, n2, { retentive: true });
|
|
5733
5792
|
}
|
|
5734
5793
|
argsValid(e) {
|
|
5735
|
-
return typeof e == "function" ? (
|
|
5794
|
+
return typeof e == "function" ? (H("inputsValid", () => e(new te())), new T(
|
|
5736
5795
|
this._renderingMode,
|
|
5737
5796
|
this._initialArgs,
|
|
5738
5797
|
this._initialUiState,
|
|
@@ -5742,7 +5801,8 @@
|
|
|
5742
5801
|
handle: "inputsValid"
|
|
5743
5802
|
},
|
|
5744
5803
|
this._sections,
|
|
5745
|
-
this._title
|
|
5804
|
+
this._title,
|
|
5805
|
+
this._enrichmentTargets
|
|
5746
5806
|
)) : new T(
|
|
5747
5807
|
this._renderingMode,
|
|
5748
5808
|
this._initialArgs,
|
|
@@ -5750,18 +5810,20 @@
|
|
|
5750
5810
|
this._outputs,
|
|
5751
5811
|
e,
|
|
5752
5812
|
this._sections,
|
|
5753
|
-
this._title
|
|
5813
|
+
this._title,
|
|
5814
|
+
this._enrichmentTargets
|
|
5754
5815
|
);
|
|
5755
5816
|
}
|
|
5756
5817
|
sections(e) {
|
|
5757
|
-
return Array.isArray(e) ? this.sections(
|
|
5818
|
+
return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new T(
|
|
5758
5819
|
this._renderingMode,
|
|
5759
5820
|
this._initialArgs,
|
|
5760
5821
|
this._initialUiState,
|
|
5761
5822
|
this._outputs,
|
|
5762
5823
|
this._inputsValid,
|
|
5763
5824
|
{ __renderLambda: true, handle: "sections" },
|
|
5764
|
-
this._title
|
|
5825
|
+
this._title,
|
|
5826
|
+
this._enrichmentTargets
|
|
5765
5827
|
)) : new T(
|
|
5766
5828
|
this._renderingMode,
|
|
5767
5829
|
this._initialArgs,
|
|
@@ -5769,19 +5831,21 @@
|
|
|
5769
5831
|
this._outputs,
|
|
5770
5832
|
this._inputsValid,
|
|
5771
5833
|
e,
|
|
5772
|
-
this._title
|
|
5834
|
+
this._title,
|
|
5835
|
+
this._enrichmentTargets
|
|
5773
5836
|
);
|
|
5774
5837
|
}
|
|
5775
5838
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
5776
5839
|
title(e) {
|
|
5777
|
-
return
|
|
5840
|
+
return H("title", () => e(new te())), new T(
|
|
5778
5841
|
this._renderingMode,
|
|
5779
5842
|
this._initialArgs,
|
|
5780
5843
|
this._initialUiState,
|
|
5781
5844
|
this._outputs,
|
|
5782
5845
|
this._inputsValid,
|
|
5783
5846
|
this._sections,
|
|
5784
|
-
{ __renderLambda: true, handle: "title" }
|
|
5847
|
+
{ __renderLambda: true, handle: "title" },
|
|
5848
|
+
this._enrichmentTargets
|
|
5785
5849
|
);
|
|
5786
5850
|
}
|
|
5787
5851
|
/**
|
|
@@ -5796,7 +5860,8 @@
|
|
|
5796
5860
|
this._outputs,
|
|
5797
5861
|
this._inputsValid,
|
|
5798
5862
|
this._sections,
|
|
5799
|
-
this._title
|
|
5863
|
+
this._title,
|
|
5864
|
+
this._enrichmentTargets
|
|
5800
5865
|
);
|
|
5801
5866
|
}
|
|
5802
5867
|
/** Sets initial args for the block, this value must be specified. */
|
|
@@ -5808,7 +5873,8 @@
|
|
|
5808
5873
|
this._outputs,
|
|
5809
5874
|
this._inputsValid,
|
|
5810
5875
|
this._sections,
|
|
5811
|
-
this._title
|
|
5876
|
+
this._title,
|
|
5877
|
+
this._enrichmentTargets
|
|
5812
5878
|
);
|
|
5813
5879
|
}
|
|
5814
5880
|
/** Defines type and sets initial value for block UiState. */
|
|
@@ -5820,7 +5886,24 @@
|
|
|
5820
5886
|
this._outputs,
|
|
5821
5887
|
this._inputsValid,
|
|
5822
5888
|
this._sections,
|
|
5823
|
-
this._title
|
|
5889
|
+
this._title,
|
|
5890
|
+
this._enrichmentTargets
|
|
5891
|
+
);
|
|
5892
|
+
}
|
|
5893
|
+
/**
|
|
5894
|
+
* Defines how to derive list of upstream references this block is meant to enrich with its exports from block args.
|
|
5895
|
+
* Influences dependency graph construction.
|
|
5896
|
+
*/
|
|
5897
|
+
enriches(e) {
|
|
5898
|
+
return H("enrichmentTargets", e), new T(
|
|
5899
|
+
this._renderingMode,
|
|
5900
|
+
this._initialArgs,
|
|
5901
|
+
this._initialUiState,
|
|
5902
|
+
this._outputs,
|
|
5903
|
+
this._inputsValid,
|
|
5904
|
+
this._sections,
|
|
5905
|
+
this._title,
|
|
5906
|
+
{ __renderLambda: true, handle: "enrichmentTargets" }
|
|
5824
5907
|
);
|
|
5825
5908
|
}
|
|
5826
5909
|
/** Renders all provided block settings into a pre-configured platforma API
|
|
@@ -5830,69 +5913,78 @@
|
|
|
5830
5913
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
5831
5914
|
const e = {
|
|
5832
5915
|
v3: {
|
|
5833
|
-
sdkVersion:
|
|
5916
|
+
sdkVersion: Y,
|
|
5834
5917
|
renderingMode: this._renderingMode,
|
|
5835
5918
|
initialArgs: this._initialArgs,
|
|
5836
5919
|
initialUiState: this._initialUiState,
|
|
5837
5920
|
inputsValid: this._inputsValid,
|
|
5838
5921
|
sections: this._sections,
|
|
5839
5922
|
title: this._title,
|
|
5840
|
-
outputs: this._outputs
|
|
5923
|
+
outputs: this._outputs,
|
|
5924
|
+
enrichmentTargets: this._enrichmentTargets
|
|
5841
5925
|
},
|
|
5842
5926
|
// fields below are added to allow previous desktop versions read generated configs
|
|
5843
|
-
sdkVersion:
|
|
5927
|
+
sdkVersion: Y,
|
|
5844
5928
|
renderingMode: this._renderingMode,
|
|
5845
5929
|
initialArgs: this._initialArgs,
|
|
5846
|
-
inputsValid:
|
|
5847
|
-
sections:
|
|
5930
|
+
inputsValid: pe(this._inputsValid),
|
|
5931
|
+
sections: pe(this._sections),
|
|
5848
5932
|
outputs: Object.fromEntries(
|
|
5849
|
-
Object.entries(this._outputs).map(([n2, r]) => [n2,
|
|
5933
|
+
Object.entries(this._outputs).map(([n2, r]) => [n2, pe(r)])
|
|
5850
5934
|
)
|
|
5851
5935
|
};
|
|
5852
|
-
return
|
|
5936
|
+
return pt() ? De({ sdkVersion: Y }) : { config: e };
|
|
5853
5937
|
}
|
|
5854
5938
|
}
|
|
5855
|
-
function
|
|
5856
|
-
return
|
|
5939
|
+
function ve(t) {
|
|
5940
|
+
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
5941
|
+
}
|
|
5942
|
+
function Ne(t) {
|
|
5943
|
+
return new le().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
5857
5944
|
name: "pl7.app/label",
|
|
5858
5945
|
axes: [{}]
|
|
5859
5946
|
// exactly one axis
|
|
5860
5947
|
}, { dontWaitAllData: true });
|
|
5861
5948
|
}
|
|
5862
|
-
function
|
|
5863
|
-
const n2 =
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5949
|
+
function Je(t, e) {
|
|
5950
|
+
const n2 = [], r = [];
|
|
5951
|
+
for (const a of t)
|
|
5952
|
+
ve(a.spec) ? n2.push(a) : r.push(a);
|
|
5953
|
+
const i = [];
|
|
5954
|
+
for (const a of r)
|
|
5955
|
+
for (const l2 of a.spec.axesSpec) {
|
|
5956
|
+
const u2 = p$1(l2);
|
|
5957
|
+
i.some((c2) => Z$1(c2, u2)) || i.push(u2);
|
|
5958
|
+
}
|
|
5959
|
+
for (const a of n2) {
|
|
5960
|
+
const l2 = p$1(a.spec.axesSpec[0]), u2 = i.findIndex((c2) => Z$1(c2, l2));
|
|
5961
|
+
u2 !== -1 && i.splice(u2, 1);
|
|
5962
|
+
}
|
|
5963
|
+
const s2 = (a, l2) => {
|
|
5964
|
+
let u2 = a.toString();
|
|
5965
|
+
if (l2)
|
|
5966
|
+
for (const c2 in l2)
|
|
5967
|
+
u2 += c2, u2 += l2[c2];
|
|
5968
|
+
return u2;
|
|
5969
|
+
}, o = [];
|
|
5970
|
+
for (const a of e) {
|
|
5971
|
+
const l2 = a.spec.axesSpec[0], u2 = p$1(l2), c2 = i.findIndex((d) => Z$1(d, u2));
|
|
5972
|
+
if (c2 !== -1) {
|
|
5973
|
+
const d = i[c2], y = Object.keys(d.domain ?? {}).length, f2 = Object.keys(l2.domain ?? {}).length;
|
|
5974
|
+
y > f2 ? o.push({
|
|
5975
|
+
id: s2(a.id, d.domain),
|
|
5976
|
+
spec: {
|
|
5977
|
+
...a.spec,
|
|
5978
|
+
axesSpec: [{ ...d, annotations: l2.annotations }]
|
|
5979
|
+
},
|
|
5980
|
+
data: a.data
|
|
5981
|
+
}) : o.push(a), i.splice(c2, 1);
|
|
5891
5982
|
}
|
|
5892
|
-
|
|
5983
|
+
}
|
|
5984
|
+
return o;
|
|
5893
5985
|
}
|
|
5894
|
-
function
|
|
5895
|
-
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof
|
|
5986
|
+
function Me(t) {
|
|
5987
|
+
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
|
|
5896
5988
|
return t.map((i) => i.data).every((i) => {
|
|
5897
5989
|
if (e(i))
|
|
5898
5990
|
return true;
|
|
@@ -5911,7 +6003,7 @@
|
|
|
5911
6003
|
throw Error(`unsupported column data type: ${i}`);
|
|
5912
6004
|
});
|
|
5913
6005
|
}
|
|
5914
|
-
function
|
|
6006
|
+
function Ue(t, e, n2, r, i, s2) {
|
|
5915
6007
|
let o = t;
|
|
5916
6008
|
const a = [];
|
|
5917
6009
|
if (s2) {
|
|
@@ -5932,18 +6024,18 @@
|
|
|
5932
6024
|
sorting: i
|
|
5933
6025
|
};
|
|
5934
6026
|
}
|
|
5935
|
-
function
|
|
5936
|
-
var u2,
|
|
6027
|
+
function Dn(t, e, n2, r) {
|
|
6028
|
+
var u2, c2;
|
|
5937
6029
|
Array.isArray(r) && (r = { filters: r });
|
|
5938
|
-
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s2 = [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []], o = ((
|
|
6030
|
+
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s2 = [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []], o = ((c2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : c2.sorting) ?? [], a = Ne(t.resultPool);
|
|
5939
6031
|
if (!a) return;
|
|
5940
|
-
const l2 =
|
|
5941
|
-
if (
|
|
6032
|
+
const l2 = Je(e.map(Fn), a);
|
|
6033
|
+
if (Me([...e, ...l2]))
|
|
5942
6034
|
return t.createPTable(
|
|
5943
|
-
|
|
6035
|
+
Ue(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
5944
6036
|
);
|
|
5945
6037
|
}
|
|
5946
|
-
const
|
|
6038
|
+
const Vt = (t, e) => {
|
|
5947
6039
|
let n2 = t.toString();
|
|
5948
6040
|
return e == null || e.forEach((r) => {
|
|
5949
6041
|
if (r)
|
|
@@ -5951,7 +6043,7 @@
|
|
|
5951
6043
|
n2 += i, n2 += s2;
|
|
5952
6044
|
}), n2;
|
|
5953
6045
|
};
|
|
5954
|
-
function
|
|
6046
|
+
function $t(t) {
|
|
5955
6047
|
if (!t.length)
|
|
5956
6048
|
return [];
|
|
5957
6049
|
let e = [[]];
|
|
@@ -5962,107 +6054,131 @@
|
|
|
5962
6054
|
}), e = r;
|
|
5963
6055
|
}), e;
|
|
5964
6056
|
}
|
|
5965
|
-
function
|
|
5966
|
-
|
|
5967
|
-
return
|
|
6057
|
+
function Nt(t) {
|
|
6058
|
+
var e;
|
|
6059
|
+
return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[Mt]) === "true";
|
|
6060
|
+
}
|
|
6061
|
+
const Jt = "pl7.app/graph/isVirtual", Ie = "pl7.app/label", Mt = "pl7.app/isLinkerColumn";
|
|
6062
|
+
function Ut(t) {
|
|
6063
|
+
var n2, r;
|
|
6064
|
+
const e = /* @__PURE__ */ new Map();
|
|
6065
|
+
for (const { spec: i } of t) {
|
|
6066
|
+
const s2 = i.axesSpec.map(p$1).map(ue);
|
|
6067
|
+
s2.forEach((o) => {
|
|
6068
|
+
e.has(o) || e.set(o, /* @__PURE__ */ new Set());
|
|
6069
|
+
});
|
|
6070
|
+
for (let o = 0; o < s2.length - 1; o++)
|
|
6071
|
+
for (let a = o + 1; a < s2.length; a++) {
|
|
6072
|
+
const l2 = s2[o], u2 = s2[a];
|
|
6073
|
+
(n2 = e.get(l2)) == null || n2.add(u2), (r = e.get(u2)) == null || r.add(l2);
|
|
6074
|
+
}
|
|
6075
|
+
}
|
|
6076
|
+
return e;
|
|
5968
6077
|
}
|
|
5969
|
-
function
|
|
5970
|
-
const n2 = t.
|
|
5971
|
-
|
|
6078
|
+
function Bt(t, e) {
|
|
6079
|
+
const n2 = Ut(t), r = [...n2.keys()].map(ce$1), i = [];
|
|
6080
|
+
for (const l2 of e.values()) {
|
|
6081
|
+
const u2 = r.find((c2) => Z$1(l2, c2));
|
|
6082
|
+
u2 && i.push(ue(u2));
|
|
6083
|
+
}
|
|
6084
|
+
const s2 = new Set(i), o = /* @__PURE__ */ new Map();
|
|
6085
|
+
let a = [...i];
|
|
6086
|
+
for (; a.length; ) {
|
|
6087
|
+
const l2 = [];
|
|
6088
|
+
for (const u2 of a)
|
|
6089
|
+
for (const c2 of n2.get(u2) ?? [])
|
|
6090
|
+
s2.has(c2) || (l2.push(c2), s2.add(c2), o.set(c2, ce$1(c2)));
|
|
6091
|
+
a = l2;
|
|
6092
|
+
}
|
|
6093
|
+
return o;
|
|
6094
|
+
}
|
|
6095
|
+
function Wt(t, e) {
|
|
6096
|
+
const n2 = [];
|
|
6097
|
+
return e.forEach((r) => {
|
|
6098
|
+
n2.push(...Gt(t, r));
|
|
6099
|
+
}), n2;
|
|
5972
6100
|
}
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
6101
|
+
function Gt(t, e) {
|
|
6102
|
+
const n2 = e.spec.axesSpec.map(p$1);
|
|
6103
|
+
if (n2.every((u2) => t.has(ue(u2))))
|
|
6104
|
+
return [e];
|
|
6105
|
+
const r = n2.map((u2) => {
|
|
6106
|
+
const c2 = [];
|
|
6107
|
+
for (const [d, y] of t)
|
|
6108
|
+
Z$1(y, u2) && !Z$1(u2, y) && c2.push(y);
|
|
6109
|
+
return c2;
|
|
6110
|
+
}), i = $t(r), s2 = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), a = i.map((u2) => {
|
|
6111
|
+
const c2 = /* @__PURE__ */ new Set();
|
|
6112
|
+
return u2.map((d, y) => {
|
|
6113
|
+
const f2 = e.spec.axesSpec[y].domain, w2 = d.domain;
|
|
6114
|
+
return Object.entries(w2 ?? {}).forEach(([p2, g]) => {
|
|
6115
|
+
if ((f2 == null ? void 0 : f2[p2]) === void 0) {
|
|
6116
|
+
const b = JSON.stringify([p2, g]);
|
|
6117
|
+
c2.add(b), s2.add(b);
|
|
5988
6118
|
}
|
|
5989
6119
|
}), {
|
|
5990
|
-
...
|
|
5991
|
-
annotations: e.spec.axesSpec[
|
|
6120
|
+
...d,
|
|
6121
|
+
annotations: e.spec.axesSpec[y].annotations
|
|
5992
6122
|
};
|
|
5993
|
-
}),
|
|
6123
|
+
}), c2;
|
|
6124
|
+
});
|
|
6125
|
+
[...s2].forEach((u2) => {
|
|
6126
|
+
a.some((c2) => !c2.has(u2)) && o.add(u2);
|
|
5994
6127
|
});
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
return (g = JSON.parse(v)) == null ? void 0 : g[1];
|
|
6002
|
-
}).join(" / "), x2 = {
|
|
6128
|
+
const l2 = i.map((u2, c2) => {
|
|
6129
|
+
var p2;
|
|
6130
|
+
const d = Vt(e.id, u2.map((g) => g.domain)), y = ((p2 = e.spec.annotations) == null ? void 0 : p2[Ie]) ?? "", f2 = [...a[c2]].filter((g) => o.has(g)).sort().map((g) => {
|
|
6131
|
+
var b;
|
|
6132
|
+
return (b = JSON.parse(g)) == null ? void 0 : b[1];
|
|
6133
|
+
}).join(" / "), w2 = {
|
|
6003
6134
|
...e.spec.annotations,
|
|
6004
|
-
[
|
|
6135
|
+
[Jt]: "true"
|
|
6005
6136
|
};
|
|
6006
|
-
return (
|
|
6007
|
-
id:
|
|
6137
|
+
return (y || f2) && (w2[Ie] = y && f2 ? y + " / " + f2 : y + f2), {
|
|
6138
|
+
id: d,
|
|
6008
6139
|
spec: {
|
|
6009
6140
|
...e.spec,
|
|
6010
|
-
axesSpec:
|
|
6011
|
-
...
|
|
6012
|
-
annotations: e.spec.axesSpec[
|
|
6141
|
+
axesSpec: u2.map((g, b) => ({
|
|
6142
|
+
...g,
|
|
6143
|
+
annotations: e.spec.axesSpec[b].annotations
|
|
6013
6144
|
})),
|
|
6014
|
-
annotations:
|
|
6145
|
+
annotations: w2
|
|
6015
6146
|
},
|
|
6016
6147
|
data: e.data
|
|
6017
6148
|
};
|
|
6018
6149
|
});
|
|
6150
|
+
return [e, ...l2];
|
|
6019
6151
|
}
|
|
6020
|
-
function
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
);
|
|
6029
|
-
}
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
const
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
});
|
|
6037
|
-
const
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
}
|
|
6049
|
-
return [...r.values(), ...i.values()];
|
|
6050
|
-
}
|
|
6051
|
-
const jt = [
|
|
6052
|
-
"Int",
|
|
6053
|
-
"Long",
|
|
6054
|
-
"Float",
|
|
6055
|
-
"Double",
|
|
6056
|
-
"String",
|
|
6057
|
-
"Bytes"
|
|
6058
|
-
];
|
|
6059
|
-
function _n(t, e) {
|
|
6060
|
-
if (e === void 0) return;
|
|
6061
|
-
const n2 = t.resultPool.getData().entries.map((s2) => s2.obj).filter(q).filter((s2) => jt.includes(s2.spec.valueType)), r = kt(e, n2), i = [...r, ...Rt(r)];
|
|
6062
|
-
if (!i.some(
|
|
6063
|
-
(s2) => s2.data instanceof I && !s2.data.getIsReadyOrError()
|
|
6152
|
+
function Kn(t, e) {
|
|
6153
|
+
if (!e) return;
|
|
6154
|
+
const n2 = new le();
|
|
6155
|
+
n2.addColumnProvider(t.resultPool), n2.addColumns(e);
|
|
6156
|
+
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
6157
|
+
for (const d of e)
|
|
6158
|
+
for (const y of d.spec.axesSpec) {
|
|
6159
|
+
const f2 = p$1(y);
|
|
6160
|
+
r.set(ue(f2), f2), i.set(ue(f2), f2);
|
|
6161
|
+
}
|
|
6162
|
+
const s2 = n2.getColumns((d) => Nt(d)) ?? [], o = Bt(s2, r);
|
|
6163
|
+
for (const d of o)
|
|
6164
|
+
r.set(...d), i.set(...d);
|
|
6165
|
+
const a = (n2.getColumns([...r.values()].map((d) => ({
|
|
6166
|
+
axes: [d],
|
|
6167
|
+
partialAxesMatch: true
|
|
6168
|
+
})), { dontWaitAllData: true, overrideLabelAnnotation: false }) ?? []).filter((d) => !ve(d.spec));
|
|
6169
|
+
for (const d of a)
|
|
6170
|
+
for (const y of d.spec.axesSpec) {
|
|
6171
|
+
const f2 = p$1(y);
|
|
6172
|
+
i.set(ue(f2), f2);
|
|
6173
|
+
}
|
|
6174
|
+
const l2 = (n2.getColumns([...i.values()].map((d) => ({
|
|
6175
|
+
axes: [d],
|
|
6176
|
+
partialAxesMatch: true
|
|
6177
|
+
})), { dontWaitAllData: true, overrideLabelAnnotation: false }) ?? []).filter((d) => ve(d.spec)), u2 = [...a, ...l2], c2 = Wt(r, u2);
|
|
6178
|
+
if (!c2.some(
|
|
6179
|
+
(d) => d.data instanceof E && !d.data.getIsReadyOrError()
|
|
6064
6180
|
))
|
|
6065
|
-
return t.createPFrame(
|
|
6181
|
+
return t.createPFrame(c2);
|
|
6066
6182
|
}
|
|
6067
6183
|
const model = T.create().withArgs({
|
|
6068
6184
|
metrics: [
|
|
@@ -6137,21 +6253,33 @@
|
|
|
6137
6253
|
if (pCols === void 0) {
|
|
6138
6254
|
return void 0;
|
|
6139
6255
|
}
|
|
6140
|
-
return
|
|
6256
|
+
return Dn(ctx, pCols, (_c = ctx.uiState) == null ? void 0 : _c.tableState);
|
|
6141
6257
|
}).output("pf", (ctx) => {
|
|
6142
6258
|
var _a, _b;
|
|
6143
6259
|
const pCols = (_b = (_a = ctx.outputs) == null ? void 0 : _a.resolve("pf")) == null ? void 0 : _b.getPColumns();
|
|
6144
6260
|
if (pCols === void 0) {
|
|
6145
6261
|
return void 0;
|
|
6146
6262
|
}
|
|
6147
|
-
return
|
|
6263
|
+
return Kn(ctx, pCols);
|
|
6264
|
+
}).output("pcols", (ctx) => {
|
|
6265
|
+
var _a, _b;
|
|
6266
|
+
const pCols = (_b = (_a = ctx.outputs) == null ? void 0 : _a.resolve("pf")) == null ? void 0 : _b.getPColumns();
|
|
6267
|
+
if (pCols === void 0 || pCols.length === 0) {
|
|
6268
|
+
return void 0;
|
|
6269
|
+
}
|
|
6270
|
+
return pCols.map(
|
|
6271
|
+
(c2) => ({
|
|
6272
|
+
columnId: c2.id,
|
|
6273
|
+
spec: c2.spec
|
|
6274
|
+
})
|
|
6275
|
+
);
|
|
6148
6276
|
}).output("isRunning", (ctx) => {
|
|
6149
6277
|
var _a;
|
|
6150
6278
|
return ((_a = ctx.outputs) == null ? void 0 : _a.getIsReadyOrError()) === false;
|
|
6151
6279
|
}).title((ctx) => {
|
|
6152
6280
|
var _a;
|
|
6153
6281
|
return ((_a = ctx.uiState) == null ? void 0 : _a.blockTitle) ?? "Repertoire Diversity";
|
|
6154
|
-
}).sections((
|
|
6282
|
+
}).sections((_2) => [
|
|
6155
6283
|
{ type: "link", href: "/", label: "Main" },
|
|
6156
6284
|
{ type: "link", href: "/diversityGraph", label: "Diversity Graph" }
|
|
6157
6285
|
]).done();
|