@milaboratories/milaboratories.ui-examples.model 1.2.22 → 1.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -20,10 +20,10 @@
20
20
  return obj;
21
21
  };
22
22
  util2.getValidEnumValues = (obj) => {
23
- const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
23
+ const validKeys = util2.objectKeys(obj).filter((k2) => typeof obj[obj[k2]] !== "number");
24
24
  const filtered = {};
25
- for (const k of validKeys) {
26
- filtered[k] = obj[k];
25
+ for (const k2 of validKeys) {
26
+ filtered[k2] = obj[k2];
27
27
  }
28
28
  return util2.objectValues(filtered);
29
29
  };
@@ -391,7 +391,7 @@
391
391
  overrideMap,
392
392
  overrideMap === errorMap ? void 0 : errorMap
393
393
  // then global default map
394
- ].filter((x2) => !!x2)
394
+ ].filter((x) => !!x)
395
395
  });
396
396
  ctx.common.issues.push(issue);
397
397
  }
@@ -454,10 +454,10 @@
454
454
  });
455
455
  const DIRTY = (value) => ({ status: "dirty", value });
456
456
  const OK = (value) => ({ status: "valid", value });
457
- const isAborted = (x2) => x2.status === "aborted";
458
- const isDirty = (x2) => x2.status === "dirty";
459
- const isValid = (x2) => x2.status === "valid";
460
- const isAsync = (x2) => typeof Promise !== "undefined" && x2 instanceof Promise;
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;
461
461
  function __classPrivateFieldGet(receiver, state, kind, f) {
462
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");
463
463
  return state.get(receiver);
@@ -2787,7 +2787,7 @@
2787
2787
  if (!schema)
2788
2788
  return null;
2789
2789
  return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
2790
- }).filter((x2) => !!x2);
2790
+ }).filter((x) => !!x);
2791
2791
  if (ctx.common.async) {
2792
2792
  return Promise.all(items).then((results) => {
2793
2793
  return ParseStatus.mergeArray(status, results);
@@ -3045,7 +3045,7 @@
3045
3045
  ctx.schemaErrorMap,
3046
3046
  getErrorMap(),
3047
3047
  errorMap
3048
- ].filter((x2) => !!x2),
3048
+ ].filter((x) => !!x),
3049
3049
  issueData: {
3050
3050
  code: ZodIssueCode.invalid_arguments,
3051
3051
  argumentsError: error
@@ -3061,7 +3061,7 @@
3061
3061
  ctx.schemaErrorMap,
3062
3062
  getErrorMap(),
3063
3063
  errorMap
3064
- ].filter((x2) => !!x2),
3064
+ ].filter((x) => !!x),
3065
3065
  issueData: {
3066
3066
  code: ZodIssueCode.invalid_return_type,
3067
3067
  returnTypeError: error
@@ -3069,7 +3069,7 @@
3069
3069
  });
3070
3070
  }
3071
3071
  const params = { errorMap: ctx.common.contextualErrorMap };
3072
- const fn2 = ctx.data;
3072
+ const fn = ctx.data;
3073
3073
  if (this._def.returns instanceof ZodPromise) {
3074
3074
  const me2 = this;
3075
3075
  return OK(async function(...args) {
@@ -3078,7 +3078,7 @@
3078
3078
  error.addIssue(makeArgsIssue(args, e));
3079
3079
  throw error;
3080
3080
  });
3081
- const result = await Reflect.apply(fn2, this, parsedArgs);
3081
+ const result = await Reflect.apply(fn, this, parsedArgs);
3082
3082
  const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e) => {
3083
3083
  error.addIssue(makeReturnsIssue(result, e));
3084
3084
  throw error;
@@ -3092,7 +3092,7 @@
3092
3092
  if (!parsedArgs.success) {
3093
3093
  throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
3094
3094
  }
3095
- const result = Reflect.apply(fn2, this, parsedArgs.data);
3095
+ const result = Reflect.apply(fn, this, parsedArgs.data);
3096
3096
  const parsedReturns = me2._def.returns.safeParse(result, params);
3097
3097
  if (!parsedReturns.success) {
3098
3098
  throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
@@ -3798,7 +3798,7 @@
3798
3798
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3799
3799
  };
3800
3800
  const NEVER = INVALID;
3801
- var z$1 = /* @__PURE__ */ Object.freeze({
3801
+ var z$2 = /* @__PURE__ */ Object.freeze({
3802
3802
  __proto__: null,
3803
3803
  defaultErrorMap: errorMap,
3804
3804
  setErrorMap,
@@ -3914,8 +3914,8 @@
3914
3914
  quotelessJson,
3915
3915
  ZodError
3916
3916
  });
3917
- function getDefaultExportFromCjs(x2) {
3918
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
3917
+ function getDefaultExportFromCjs(x) {
3918
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
3919
3919
  }
3920
3920
  var canonicalize;
3921
3921
  var hasRequiredCanonicalize;
@@ -3955,20 +3955,20 @@
3955
3955
  return canonicalize;
3956
3956
  }
3957
3957
  var canonicalizeExports = requireCanonicalize();
3958
- const Be$1 = /* @__PURE__ */ getDefaultExportFromCjs(canonicalizeExports);
3959
- var V$1 = Object.defineProperty;
3960
- var T = (e, n2, r) => n2 in e ? V$1(e, n2, { enumerable: true, configurable: true, writable: true, value: r }) : e[n2] = r;
3961
- var d = (e, n2, r) => T(e, typeof n2 != "symbol" ? n2 + "" : n2, r);
3962
- z$1.object({
3958
+ const We = /* @__PURE__ */ getDefaultExportFromCjs(canonicalizeExports);
3959
+ var te = Object.defineProperty;
3960
+ var re = (e, n2, t) => n2 in e ? te(e, n2, { enumerable: true, configurable: true, writable: true, value: t }) : e[n2] = t;
3961
+ var b = (e, n2, t) => re(e, typeof n2 != "symbol" ? n2 + "" : n2, t);
3962
+ z$2.object({
3963
3963
  /** Included left border. */
3964
- from: z$1.number(),
3964
+ from: z$2.number(),
3965
3965
  /** Excluded right border. */
3966
- to: z$1.number()
3966
+ to: z$2.number()
3967
3967
  });
3968
- function g(e) {
3968
+ function k$1(e) {
3969
3969
  throw new Error("Unexpected object: " + e);
3970
3970
  }
3971
- function Se$1(e) {
3971
+ function Qe$1(e) {
3972
3972
  if (!e || typeof e != "object")
3973
3973
  return false;
3974
3974
  const n2 = e;
@@ -3978,42 +3978,51 @@
3978
3978
  case "Json":
3979
3979
  return typeof n2.keyLength == "number" && n2.data !== void 0 && typeof n2.data == "object";
3980
3980
  case "JsonPartitioned":
3981
- return typeof n2.partitionKeyLength == "number" && n2.parts !== void 0 && typeof n2.parts == "object";
3982
3981
  case "BinaryPartitioned":
3982
+ case "ParquetPartitioned":
3983
3983
  return typeof n2.partitionKeyLength == "number" && n2.parts !== void 0 && typeof n2.parts == "object";
3984
3984
  default:
3985
3985
  return false;
3986
3986
  }
3987
3987
  }
3988
- function Oe$1(e, n2) {
3988
+ function Xe$1(e, n2) {
3989
3989
  if (e !== void 0)
3990
3990
  switch (e.type) {
3991
3991
  case "Json":
3992
3992
  return e;
3993
3993
  case "JsonPartitioned": {
3994
- const r = {};
3995
- for (const [t, o] of Object.entries(e.parts))
3996
- r[t] = n2(o);
3994
+ const t = {};
3995
+ for (const [r, o] of Object.entries(e.parts))
3996
+ t[r] = n2(o);
3997
3997
  return {
3998
3998
  ...e,
3999
- parts: r
3999
+ parts: t
4000
4000
  };
4001
4001
  }
4002
4002
  case "BinaryPartitioned": {
4003
- const r = {};
4004
- for (const [t, o] of Object.entries(e.parts))
4005
- r[t] = {
4003
+ const t = {};
4004
+ for (const [r, o] of Object.entries(e.parts))
4005
+ t[r] = {
4006
4006
  index: n2(o.index),
4007
4007
  values: n2(o.values)
4008
4008
  };
4009
4009
  return {
4010
4010
  ...e,
4011
- parts: r
4011
+ parts: t
4012
+ };
4013
+ }
4014
+ case "ParquetPartitioned": {
4015
+ const t = {};
4016
+ for (const [r, o] of Object.entries(e.parts))
4017
+ t[r] = n2(o);
4018
+ return {
4019
+ ...e,
4020
+ parts: t
4012
4021
  };
4013
4022
  }
4014
4023
  }
4015
4024
  }
4016
- function _(e) {
4025
+ function ue$1(e) {
4017
4026
  if (!e || typeof e != "object")
4018
4027
  return false;
4019
4028
  const n2 = e;
@@ -4023,108 +4032,226 @@
4023
4032
  case "Json":
4024
4033
  return typeof n2.keyLength == "number" && Array.isArray(n2.data);
4025
4034
  case "JsonPartitioned":
4026
- return typeof n2.partitionKeyLength == "number" && Array.isArray(n2.parts);
4027
4035
  case "BinaryPartitioned":
4036
+ case "ParquetPartitioned":
4028
4037
  return typeof n2.partitionKeyLength == "number" && Array.isArray(n2.parts);
4029
4038
  default:
4030
4039
  return false;
4031
4040
  }
4032
4041
  }
4033
- function Fe(e) {
4034
- return _(e) ? e.type === "JsonPartitioned" || e.type === "BinaryPartitioned" : false;
4042
+ function Ze$1(e) {
4043
+ if (!ue$1(e)) return false;
4044
+ switch (e.type) {
4045
+ case "JsonPartitioned":
4046
+ case "BinaryPartitioned":
4047
+ case "ParquetPartitioned":
4048
+ return true;
4049
+ default:
4050
+ return false;
4051
+ }
4035
4052
  }
4036
- function je(e) {
4053
+ function en$1(e) {
4037
4054
  switch (e.type) {
4038
- case "Json": {
4039
- const n2 = Object.entries(e.data).map(([r, t]) => ({ key: JSON.parse(r), value: t }));
4055
+ case "Json":
4040
4056
  return {
4041
4057
  type: "Json",
4042
4058
  keyLength: e.keyLength,
4043
- data: n2
4059
+ data: Object.entries(e.data).map(([n2, t]) => ({ key: JSON.parse(n2), value: t }))
4044
4060
  };
4045
- }
4046
- case "JsonPartitioned": {
4047
- const n2 = Object.entries(e.parts).map(([r, t]) => ({ key: JSON.parse(r), value: t }));
4061
+ case "JsonPartitioned":
4048
4062
  return {
4049
4063
  type: "JsonPartitioned",
4050
4064
  partitionKeyLength: e.partitionKeyLength,
4051
- parts: n2
4065
+ parts: Object.entries(e.parts).map(([n2, t]) => ({ key: JSON.parse(n2), value: t }))
4052
4066
  };
4053
- }
4054
- case "BinaryPartitioned": {
4055
- const n2 = Object.entries(e.parts).map(([r, t]) => ({ key: JSON.parse(r), value: t }));
4067
+ case "BinaryPartitioned":
4056
4068
  return {
4057
4069
  type: "BinaryPartitioned",
4058
4070
  partitionKeyLength: e.partitionKeyLength,
4059
- parts: n2
4071
+ parts: Object.entries(e.parts).map(([n2, t]) => ({ key: JSON.parse(n2), value: t }))
4060
4072
  };
4061
- }
4073
+ case "ParquetPartitioned":
4074
+ return {
4075
+ type: "ParquetPartitioned",
4076
+ partitionKeyLength: e.partitionKeyLength,
4077
+ parts: Object.entries(e.parts).map(([n2, t]) => ({ key: JSON.parse(n2), value: t }))
4078
+ };
4079
+ default:
4080
+ k$1(e);
4062
4081
  }
4063
4082
  }
4064
- function Ie(e) {
4083
+ function nn$1(e) {
4065
4084
  switch (e.type) {
4066
- case "Json": {
4067
- const n2 = {};
4068
- for (const r of e.data)
4069
- n2[JSON.stringify(r.key)] = r.value;
4085
+ case "Json":
4070
4086
  return {
4071
4087
  type: "Json",
4072
4088
  keyLength: e.keyLength,
4073
- data: n2
4089
+ data: Object.fromEntries(
4090
+ e.data.map(({ key: n2, value: t }) => [JSON.stringify(n2), t])
4091
+ )
4074
4092
  };
4075
- }
4076
- case "JsonPartitioned": {
4077
- const n2 = {};
4078
- for (const r of e.parts)
4079
- n2[JSON.stringify(r.key)] = r.value;
4093
+ case "JsonPartitioned":
4080
4094
  return {
4081
4095
  type: "JsonPartitioned",
4082
4096
  partitionKeyLength: e.partitionKeyLength,
4083
- parts: n2
4097
+ parts: Object.fromEntries(
4098
+ e.parts.map(({ key: n2, value: t }) => [JSON.stringify(n2), t])
4099
+ )
4084
4100
  };
4085
- }
4086
- case "BinaryPartitioned": {
4087
- const n2 = {};
4088
- for (const r of e.parts)
4089
- n2[JSON.stringify(r.key)] = r.value;
4101
+ case "BinaryPartitioned":
4090
4102
  return {
4091
4103
  type: "BinaryPartitioned",
4092
4104
  partitionKeyLength: e.partitionKeyLength,
4093
- parts: n2
4105
+ parts: Object.fromEntries(
4106
+ e.parts.map(({ key: n2, value: t }) => [JSON.stringify(n2), t])
4107
+ )
4094
4108
  };
4109
+ case "ParquetPartitioned":
4110
+ return {
4111
+ type: "ParquetPartitioned",
4112
+ partitionKeyLength: e.partitionKeyLength,
4113
+ parts: Object.fromEntries(
4114
+ e.parts.map(({ key: n2, value: t }) => [JSON.stringify(n2), t])
4115
+ )
4116
+ };
4117
+ default:
4118
+ k$1(e);
4119
+ }
4120
+ }
4121
+ function de(e) {
4122
+ if (typeof e == "string")
4123
+ return `String value was thrown: ${e}`;
4124
+ if (e && typeof e == "object")
4125
+ try {
4126
+ return `Plain object was thrown: ${JSON.stringify(e)}`;
4127
+ } catch (n2) {
4128
+ return `Non-serializable object was thrown (JSON.stringify failed: ${n2 instanceof Error ? n2.message : String(n2)}): ${String(e)}`;
4095
4129
  }
4130
+ return `Non-Error value (${typeof e}) was thrown: ${e}`;
4131
+ }
4132
+ function C(e) {
4133
+ return e instanceof Error ? e : new Error(de(e));
4134
+ }
4135
+ function hn(e) {
4136
+ return JSON.stringify(e);
4137
+ }
4138
+ function m$1(e) {
4139
+ return We(e);
4140
+ }
4141
+ function me$1(e) {
4142
+ return JSON.parse(e);
4143
+ }
4144
+ const g = {
4145
+ Int: "Int",
4146
+ Long: "Long",
4147
+ Float: "Float",
4148
+ Double: "Double",
4149
+ String: "String",
4150
+ Bytes: "Bytes"
4151
+ };
4152
+ function I(e, n2) {
4153
+ return e == null ? void 0 : e[n2];
4154
+ }
4155
+ function j(e, n2, t, r = "readMetadataJsonOrThrow") {
4156
+ const o = I(e, t);
4157
+ if (o === void 0) return;
4158
+ const i = n2[t];
4159
+ try {
4160
+ const a = JSON.parse(o);
4161
+ return i.parse(a);
4162
+ } catch (a) {
4163
+ throw new Error(
4164
+ `${r} failed, key: ${String(t)}, value: ${o}, error: ${C(a)}`
4165
+ );
4166
+ }
4167
+ }
4168
+ function U(e, n2, t) {
4169
+ try {
4170
+ return j(e, n2, t);
4171
+ } catch {
4172
+ return;
4096
4173
  }
4097
4174
  }
4098
- function Ve$1(e) {
4175
+ const y = {
4176
+ DiscreteValues: "pl7.app/discreteValues",
4177
+ Graph: {
4178
+ IsVirtual: "pl7.app/graph/isVirtual"
4179
+ },
4180
+ HideDataFromUi: "pl7.app/hideDataFromUi",
4181
+ IsLinkerColumn: "pl7.app/isLinkerColumn",
4182
+ Label: "pl7.app/label",
4183
+ Max: "pl7.app/max",
4184
+ Min: "pl7.app/min",
4185
+ Parents: "pl7.app/parents",
4186
+ Sequence: {
4187
+ Annotation: {
4188
+ Mapping: "pl7.app/sequence/annotation/mapping"
4189
+ },
4190
+ IsAnnotation: "pl7.app/sequence/isAnnotation"
4191
+ },
4192
+ Table: {
4193
+ OrderPriority: "pl7.app/table/orderPriority",
4194
+ Visibility: "pl7.app/table/visibility"
4195
+ },
4196
+ Trace: "pl7.app/trace"
4197
+ }, he = z$2.object({
4198
+ type: z$2.nativeEnum(g),
4199
+ name: z$2.string(),
4200
+ domain: z$2.record(z$2.string(), z$2.string()).optional(),
4201
+ annotations: z$2.record(z$2.string(), z$2.string()).optional(),
4202
+ parentAxes: z$2.array(z$2.number()).optional()
4203
+ }).passthrough(), W = {
4204
+ [y.DiscreteValues]: z$2.array(z$2.string()).or(z$2.array(z$2.number())),
4205
+ [y.Graph.IsVirtual]: z$2.boolean(),
4206
+ [y.HideDataFromUi]: z$2.boolean(),
4207
+ [y.IsLinkerColumn]: z$2.boolean(),
4208
+ [y.Max]: z$2.number(),
4209
+ [y.Min]: z$2.number(),
4210
+ [y.Parents]: z$2.array(he),
4211
+ [y.Sequence.Annotation.Mapping]: z$2.record(z$2.string(), z$2.string()),
4212
+ [y.Sequence.IsAnnotation]: z$2.boolean(),
4213
+ [y.Table.OrderPriority]: z$2.number(),
4214
+ [y.Trace]: z$2.record(z$2.string(), z$2.unknown())
4215
+ };
4216
+ function wn(e, n2) {
4217
+ return I(e == null ? void 0 : e.annotations, n2);
4218
+ }
4219
+ function z$1(e, n2) {
4220
+ return U(e == null ? void 0 : e.annotations, W, n2);
4221
+ }
4222
+ const Pn = {
4223
+ Label: "pl7.app/label"
4224
+ };
4225
+ function En(e) {
4099
4226
  return {
4100
4227
  columnId: e.id,
4101
4228
  spec: e.spec
4102
4229
  };
4103
4230
  }
4104
- function h(e) {
4105
- const { type: n2, name: r, domain: t } = e, o = { type: n2, name: r };
4106
- return t && Object.entries(t).length > 0 && Object.assign(o, { domain: t }), o;
4231
+ function p$1(e) {
4232
+ const { type: n2, name: t, domain: r } = e, o = { type: n2, name: t };
4233
+ return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
4107
4234
  }
4108
- function I(e) {
4109
- return e.map(h);
4235
+ function _(e) {
4236
+ return e.map(p$1);
4110
4237
  }
4111
- function Te$1(e) {
4112
- return Be$1(h(e));
4238
+ function On(e) {
4239
+ return m$1(p$1(e));
4113
4240
  }
4114
- function G$1(e, n2) {
4241
+ function Ae$1(e, n2) {
4115
4242
  if (e === void 0) return n2 === void 0;
4116
4243
  if (n2 === void 0) return true;
4117
- for (const r in n2)
4118
- if (e[r] !== n2[r]) return false;
4244
+ for (const t in n2)
4245
+ if (e[t] !== n2[t]) return false;
4119
4246
  return true;
4120
4247
  }
4121
- function X$1(e, n2) {
4122
- return e.name === n2.name && G$1(e.domain, n2.domain);
4248
+ function we$1(e, n2) {
4249
+ return e.name === n2.name && Ae$1(e.domain, n2.domain);
4123
4250
  }
4124
- function Be(e, n2) {
4125
- return { ...e, src: b$1(e.src, n2) };
4251
+ function In(e, n2) {
4252
+ return { ...e, src: E(e.src, n2) };
4126
4253
  }
4127
- function b$1(e, n2) {
4254
+ function E(e, n2) {
4128
4255
  switch (e.type) {
4129
4256
  case "column":
4130
4257
  return {
@@ -4144,51 +4271,51 @@
4144
4271
  case "full":
4145
4272
  return {
4146
4273
  type: e.type,
4147
- entries: e.entries.map((r) => b$1(r, n2))
4274
+ entries: e.entries.map((t) => E(t, n2))
4148
4275
  };
4149
4276
  case "outer":
4150
4277
  return {
4151
4278
  type: "outer",
4152
- primary: b$1(e.primary, n2),
4153
- secondary: e.secondary.map((r) => b$1(r, n2))
4279
+ primary: E(e.primary, n2),
4280
+ secondary: e.secondary.map((t) => E(t, n2))
4154
4281
  };
4155
4282
  default:
4156
- g(e);
4283
+ k$1(e);
4157
4284
  }
4158
4285
  }
4159
- function Q$1(e) {
4160
- return Be$1(e);
4286
+ function Se$1(e) {
4287
+ return We(e);
4161
4288
  }
4162
- function A(e) {
4163
- return Be$1(h(e));
4289
+ function N(e) {
4290
+ return We(p$1(e));
4164
4291
  }
4165
- function x(e, n2) {
4292
+ function R(e, n2) {
4166
4293
  return JSON.stringify([e, n2]);
4167
4294
  }
4168
- class Me {
4295
+ class Nn {
4169
4296
  /**
4170
4297
  * Creates a new anchor context from a set of anchor column specifications
4171
4298
  * @param anchors Record of anchor column specifications indexed by anchor ID
4172
4299
  */
4173
4300
  constructor(n2) {
4174
- d(this, "domains", /* @__PURE__ */ new Map());
4175
- d(this, "axes", /* @__PURE__ */ new Map());
4176
- d(this, "domainPacks", []);
4177
- d(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
4301
+ b(this, "domains", /* @__PURE__ */ new Map());
4302
+ b(this, "axes", /* @__PURE__ */ new Map());
4303
+ b(this, "domainPacks", []);
4304
+ b(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
4178
4305
  this.anchors = n2;
4179
- const r = Object.entries(n2);
4180
- r.sort((t, o) => t[0].localeCompare(o[0]));
4181
- for (const [t, o] of r) {
4306
+ const t = Object.entries(n2);
4307
+ t.sort((r, o) => r[0].localeCompare(o[0]));
4308
+ for (const [r, o] of t) {
4182
4309
  for (let i = 0; i < o.axesSpec.length; i++) {
4183
- const s2 = o.axesSpec[i], a = A(s2);
4184
- this.axes.set(a, { anchor: t, idx: i });
4310
+ const a = o.axesSpec[i], s2 = N(a);
4311
+ this.axes.set(s2, { anchor: r, idx: i });
4185
4312
  }
4186
4313
  if (o.domain !== void 0) {
4187
4314
  const i = Object.entries(o.domain);
4188
- i.sort((s2, a) => s2[0].localeCompare(a[0])), this.domainPackToAnchor.set(JSON.stringify(i), t), this.domainPacks.push(i.map(([s2]) => s2));
4189
- for (const [s2, a] of i) {
4190
- const u2 = x(s2, a);
4191
- this.domains.set(u2, t);
4315
+ i.sort((a, s2) => a[0].localeCompare(s2[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([a]) => a));
4316
+ for (const [a, s2] of i) {
4317
+ const u2 = R(a, s2);
4318
+ this.domains.set(u2, r);
4192
4319
  }
4193
4320
  }
4194
4321
  }
@@ -4196,56 +4323,56 @@
4196
4323
  /**
4197
4324
  * Implementation of derive method
4198
4325
  */
4199
- derive(n2, r) {
4200
- const t = {
4326
+ derive(n2, t) {
4327
+ const r = {
4201
4328
  name: n2.name,
4202
4329
  axes: []
4203
4330
  };
4204
4331
  let o;
4205
4332
  if (n2.domain !== void 0)
4206
4333
  e:
4207
- for (const s2 of this.domainPacks) {
4208
- const a = [];
4209
- for (const c2 of s2) {
4210
- const f = n2.domain[c2];
4211
- if (f !== void 0)
4212
- a.push([c2, f]);
4334
+ for (const a of this.domainPacks) {
4335
+ const s2 = [];
4336
+ for (const c2 of a) {
4337
+ const d = n2.domain[c2];
4338
+ if (d !== void 0)
4339
+ s2.push([c2, d]);
4213
4340
  else
4214
4341
  break e;
4215
4342
  }
4216
- const u2 = this.domainPackToAnchor.get(JSON.stringify(a));
4343
+ const u2 = this.domainPackToAnchor.get(JSON.stringify(s2));
4217
4344
  if (u2 !== void 0) {
4218
- t.domainAnchor = u2, o = new Set(s2);
4345
+ r.domainAnchor = u2, o = new Set(a);
4219
4346
  break;
4220
4347
  }
4221
4348
  }
4222
- for (const [s2, a] of Object.entries(n2.domain ?? {})) {
4223
- if (o !== void 0 && o.has(s2))
4349
+ for (const [a, s2] of Object.entries(n2.domain ?? {})) {
4350
+ if (o !== void 0 && o.has(a))
4224
4351
  continue;
4225
- const u2 = x(s2, a), c2 = this.domains.get(u2);
4226
- t.domain ?? (t.domain = {}), t.domain[s2] = c2 ? { anchor: c2 } : a;
4227
- }
4228
- if (t.axes = n2.axesSpec.map((s2) => {
4229
- const a = A(s2), u2 = this.axes.get(a);
4230
- return u2 === void 0 ? h(s2) : u2;
4231
- }), !r || r.length === 0)
4232
- return t;
4352
+ const u2 = R(a, s2), c2 = this.domains.get(u2);
4353
+ r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : s2;
4354
+ }
4355
+ if (r.axes = n2.axesSpec.map((a) => {
4356
+ const s2 = N(a), u2 = this.axes.get(s2);
4357
+ return u2 === void 0 ? p$1(a) : u2;
4358
+ }), !t || t.length === 0)
4359
+ return r;
4233
4360
  const i = [];
4234
- for (const s2 of r) {
4235
- const [a, u2] = s2;
4236
- if (typeof a == "number") {
4237
- if (a < 0 || a >= n2.axesSpec.length)
4238
- throw new Error(`Axis index ${a} is out of bounds (0-${n2.axesSpec.length - 1})`);
4239
- i.push([a, u2]);
4361
+ for (const a of t) {
4362
+ const [s2, u2] = a;
4363
+ if (typeof s2 == "number") {
4364
+ if (s2 < 0 || s2 >= n2.axesSpec.length)
4365
+ throw new Error(`Axis index ${s2} is out of bounds (0-${n2.axesSpec.length - 1})`);
4366
+ i.push([s2, u2]);
4240
4367
  } else {
4241
- const c2 = n2.axesSpec.findIndex((f) => f.name === a);
4368
+ const c2 = n2.axesSpec.findIndex((d) => d.name === s2);
4242
4369
  if (c2 === -1)
4243
- throw new Error(`Axis with name "${a}" not found in the column specification`);
4370
+ throw new Error(`Axis with name "${s2}" not found in the column specification`);
4244
4371
  i.push([c2, u2]);
4245
4372
  }
4246
4373
  }
4247
- return i.sort((s2, a) => s2[0] - a[0]), {
4248
- source: t,
4374
+ return i.sort((a, s2) => a[0] - s2[0]), {
4375
+ source: r,
4249
4376
  axisFilters: i
4250
4377
  };
4251
4378
  }
@@ -4255,111 +4382,111 @@
4255
4382
  * @param axisFilters Optional axis filters to apply to the column
4256
4383
  * @returns A canonicalized string representation of the anchored column identifier
4257
4384
  */
4258
- deriveS(n2, r) {
4259
- return Q$1(this.derive(n2, r));
4385
+ deriveS(n2, t) {
4386
+ return Se$1(this.derive(n2, t));
4260
4387
  }
4261
4388
  }
4262
- function _e(e, n2, r) {
4263
- const t = { ...n2 }, o = (r == null ? void 0 : r.ignoreMissingDomains) ?? false;
4264
- if (t.domainAnchor !== void 0) {
4265
- const i = e[t.domainAnchor];
4389
+ function Rn(e, n2, t) {
4390
+ const r = { ...n2 }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? false;
4391
+ if (r.domainAnchor !== void 0) {
4392
+ const i = e[r.domainAnchor];
4266
4393
  if (!i)
4267
- throw new Error(`Anchor "${t.domainAnchor}" not found`);
4268
- const s2 = i.domain || {};
4269
- t.domain = { ...s2, ...t.domain }, delete t.domainAnchor;
4394
+ throw new Error(`Anchor "${r.domainAnchor}" not found`);
4395
+ const a = i.domain || {};
4396
+ r.domain = { ...a, ...r.domain }, delete r.domainAnchor;
4270
4397
  }
4271
- if (t.domain) {
4398
+ if (r.domain) {
4272
4399
  const i = {};
4273
- for (const [s2, a] of Object.entries(t.domain))
4274
- if (typeof a == "string")
4275
- i[s2] = a;
4400
+ for (const [a, s2] of Object.entries(r.domain))
4401
+ if (typeof s2 == "string")
4402
+ i[a] = s2;
4276
4403
  else {
4277
- const u2 = e[a.anchor];
4404
+ const u2 = e[s2.anchor];
4278
4405
  if (!u2)
4279
- throw new Error(`Anchor "${a.anchor}" not found for domain key "${s2}"`);
4280
- if (!u2.domain || u2.domain[s2] === void 0) {
4406
+ throw new Error(`Anchor "${s2.anchor}" not found for domain key "${a}"`);
4407
+ if (!u2.domain || u2.domain[a] === void 0) {
4281
4408
  if (!o)
4282
- throw new Error(`Domain key "${s2}" not found in anchor "${a.anchor}"`);
4409
+ throw new Error(`Domain key "${a}" not found in anchor "${s2.anchor}"`);
4283
4410
  continue;
4284
4411
  }
4285
- i[s2] = u2.domain[s2];
4412
+ i[a] = u2.domain[a];
4286
4413
  }
4287
- t.domain = i;
4414
+ r.domain = i;
4288
4415
  }
4289
- return t.axes && (t.axes = t.axes.map((i) => Y(e, i))), t;
4416
+ return r.axes && (r.axes = r.axes.map((i) => Ee(e, i))), r;
4290
4417
  }
4291
- function Y(e, n2) {
4292
- if (!Z(n2))
4418
+ function Ee(e, n2) {
4419
+ if (!Oe$1(n2))
4293
4420
  return n2;
4294
- const r = n2.anchor, t = e[r];
4295
- if (!t)
4296
- throw new Error(`Anchor "${r}" not found for axis reference`);
4421
+ const t = n2.anchor, r = e[t];
4422
+ if (!r)
4423
+ throw new Error(`Anchor "${t}" not found for axis reference`);
4297
4424
  if ("idx" in n2) {
4298
- if (n2.idx < 0 || n2.idx >= t.axesSpec.length)
4299
- throw new Error(`Axis index ${n2.idx} out of bounds for anchor "${r}"`);
4300
- return t.axesSpec[n2.idx];
4425
+ if (n2.idx < 0 || n2.idx >= r.axesSpec.length)
4426
+ throw new Error(`Axis index ${n2.idx} out of bounds for anchor "${t}"`);
4427
+ return r.axesSpec[n2.idx];
4301
4428
  } else if ("name" in n2) {
4302
- const o = t.axesSpec.filter((i) => i.name === n2.name);
4429
+ const o = r.axesSpec.filter((i) => i.name === n2.name);
4303
4430
  if (o.length > 1)
4304
- throw new Error(`Multiple axes with name "${n2.name}" found in anchor "${r}"`);
4431
+ throw new Error(`Multiple axes with name "${n2.name}" found in anchor "${t}"`);
4305
4432
  if (o.length === 0)
4306
- throw new Error(`Axis with name "${n2.name}" not found in anchor "${r}"`);
4433
+ throw new Error(`Axis with name "${n2.name}" not found in anchor "${t}"`);
4307
4434
  return o[0];
4308
4435
  } else if ("id" in n2) {
4309
- const o = t.axesSpec.filter((i) => X$1(n2.id, h(i)));
4436
+ const o = r.axesSpec.filter((i) => we$1(n2.id, p$1(i)));
4310
4437
  if (o.length > 1)
4311
- throw new Error(`Multiple matching axes found for matcher in anchor "${r}"`);
4438
+ throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
4312
4439
  if (o.length === 0)
4313
- throw new Error(`No matching axis found for matcher in anchor "${r}"`);
4440
+ throw new Error(`No matching axis found for matcher in anchor "${t}"`);
4314
4441
  return o[0];
4315
4442
  }
4316
4443
  throw new Error("Unsupported axis reference type");
4317
4444
  }
4318
- function Z(e) {
4445
+ function Oe$1(e) {
4319
4446
  return typeof e == "object" && "anchor" in e;
4320
4447
  }
4321
- function l$1(e) {
4448
+ function w$1(e) {
4322
4449
  return e.kind === "PColumn";
4323
4450
  }
4324
- function ee$1(e) {
4325
- return l$1(e.spec);
4451
+ function Fe$1(e) {
4452
+ return w$1(e.spec);
4326
4453
  }
4327
- function We$1(e) {
4328
- if (!ee$1(e)) throw new Error(`not a PColumn (kind = ${e.spec.kind})`);
4454
+ function Vn(e) {
4455
+ if (!Fe$1(e)) throw new Error(`not a PColumn (kind = ${e.spec.kind})`);
4329
4456
  return e;
4330
4457
  }
4331
- function Ge$1(e, n2) {
4458
+ function Bn(e, n2) {
4332
4459
  return e === void 0 ? void 0 : {
4333
4460
  ...e,
4334
4461
  data: n2(e.data)
4335
4462
  };
4336
4463
  }
4337
- function Xe$1(e) {
4338
- const n2 = /* @__PURE__ */ new Map(), r = (t) => {
4339
- switch (t.type) {
4464
+ function Mn(e) {
4465
+ const n2 = /* @__PURE__ */ new Map(), t = (r) => {
4466
+ switch (r.type) {
4340
4467
  case "column":
4341
- n2.set(t.column.id, t.column);
4468
+ n2.set(r.column.id, r.column);
4342
4469
  return;
4343
4470
  case "slicedColumn":
4344
- n2.set(t.column.id, t.column);
4471
+ n2.set(r.column.id, r.column);
4345
4472
  return;
4346
4473
  case "inlineColumn":
4347
4474
  return;
4348
4475
  case "full":
4349
4476
  case "inner":
4350
- for (const o of t.entries) r(o);
4477
+ for (const o of r.entries) t(o);
4351
4478
  return;
4352
4479
  case "outer":
4353
- r(t.primary);
4354
- for (const o of t.secondary) r(o);
4480
+ t(r.primary);
4481
+ for (const o of r.secondary) t(o);
4355
4482
  return;
4356
4483
  default:
4357
- g(t);
4484
+ k$1(r);
4358
4485
  }
4359
4486
  };
4360
- return r(e), [...n2.values()];
4487
+ return t(e), [...n2.values()];
4361
4488
  }
4362
- function P(e, n2) {
4489
+ function T(e, n2) {
4363
4490
  if (e.name !== void 0 && e.name !== n2.name)
4364
4491
  return false;
4365
4492
  if (e.type !== void 0) {
@@ -4370,14 +4497,14 @@
4370
4497
  return false;
4371
4498
  }
4372
4499
  if (e.domain !== void 0) {
4373
- const r = n2.domain || {};
4374
- for (const [t, o] of Object.entries(e.domain))
4375
- if (r[t] !== o)
4500
+ const t = n2.domain || {};
4501
+ for (const [r, o] of Object.entries(e.domain))
4502
+ if (t[r] !== o)
4376
4503
  return false;
4377
4504
  }
4378
4505
  return true;
4379
4506
  }
4380
- function E(e, n2) {
4507
+ function $$1(e, n2) {
4381
4508
  if (n2.name !== void 0 && e.name !== n2.name || n2.namePattern !== void 0 && !new RegExp(n2.namePattern).test(e.name))
4382
4509
  return false;
4383
4510
  if (n2.type !== void 0) {
@@ -4388,81 +4515,78 @@
4388
4515
  return false;
4389
4516
  }
4390
4517
  if (n2.domain !== void 0) {
4391
- const r = e.domain || {};
4392
- for (const [t, o] of Object.entries(n2.domain))
4393
- if (r[t] !== o)
4518
+ const t = e.domain || {};
4519
+ for (const [r, o] of Object.entries(n2.domain))
4520
+ if (t[r] !== o)
4394
4521
  return false;
4395
4522
  }
4396
4523
  if (n2.axes !== void 0) {
4397
- const r = e.axesSpec.map(h);
4524
+ const t = e.axesSpec.map(p$1);
4398
4525
  if (n2.partialAxesMatch) {
4399
- for (const t of n2.axes)
4400
- if (!r.some((o) => P(t, o)))
4526
+ for (const r of n2.axes)
4527
+ if (!t.some((o) => T(r, o)))
4401
4528
  return false;
4402
4529
  } else {
4403
- if (r.length !== n2.axes.length)
4530
+ if (t.length !== n2.axes.length)
4404
4531
  return false;
4405
- for (let t = 0; t < n2.axes.length; t++)
4406
- if (!P(n2.axes[t], r[t]))
4532
+ for (let r = 0; r < n2.axes.length; r++)
4533
+ if (!T(n2.axes[r], t[r]))
4407
4534
  return false;
4408
4535
  }
4409
4536
  }
4410
4537
  if (n2.annotations !== void 0) {
4411
- const r = e.annotations || {};
4412
- for (const [t, o] of Object.entries(n2.annotations))
4413
- if (r[t] !== o)
4538
+ const t = e.annotations || {};
4539
+ for (const [r, o] of Object.entries(n2.annotations))
4540
+ if (t[r] !== o)
4414
4541
  return false;
4415
4542
  }
4416
4543
  if (n2.annotationPatterns !== void 0) {
4417
- const r = e.annotations || {};
4418
- for (const [t, o] of Object.entries(n2.annotationPatterns)) {
4419
- const i = r[t];
4544
+ const t = e.annotations || {};
4545
+ for (const [r, o] of Object.entries(n2.annotationPatterns)) {
4546
+ const i = t[r];
4420
4547
  if (i === void 0 || !new RegExp(o).test(i))
4421
4548
  return false;
4422
4549
  }
4423
4550
  }
4424
4551
  return true;
4425
4552
  }
4426
- function Qe$1(e) {
4427
- return Array.isArray(e) ? (n2) => e.some((r) => l$1(n2) && E(n2, r)) : (n2) => l$1(n2) && E(n2, e);
4553
+ function Un(e) {
4554
+ return Array.isArray(e) ? (n2) => e.some((t) => w$1(n2) && $$1(n2, t)) : (n2) => w$1(n2) && $$1(n2, e);
4428
4555
  }
4429
- function Ye(e) {
4556
+ function qn(e) {
4430
4557
  const n2 = {
4431
4558
  kind: e.kind,
4432
4559
  name: e.name
4433
4560
  };
4434
- return e.domain !== void 0 && (n2.domain = e.domain), l$1(e) && (n2.axesSpec = I(e.axesSpec)), Be$1(n2);
4561
+ return e.domain !== void 0 && (n2.domain = e.domain), w$1(e) && (n2.axesSpec = _(e.axesSpec)), We(n2);
4435
4562
  }
4436
- z$1.object({
4437
- __isRef: z$1.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
4438
- blockId: z$1.string().describe("Upstream block id"),
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")
4563
+ z$2.object({
4564
+ __isRef: z$2.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
4565
+ blockId: z$2.string().describe("Upstream block id"),
4566
+ name: z$2.string().describe("Name of the output provided to the upstream block's output context"),
4567
+ requireEnrichments: z$2.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")
4441
4568
  }).describe(
4442
4569
  "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."
4443
4570
  ).readonly();
4444
- function nn$1(e) {
4571
+ function Hn(e) {
4445
4572
  return typeof e == "object" && e !== null && "__isRef" in e && e.__isRef === true && "blockId" in e && "name" in e;
4446
4573
  }
4447
- function tn(e, n2 = true) {
4574
+ function _n(e, n2 = true) {
4448
4575
  if (n2)
4449
4576
  return {
4450
4577
  ...e,
4451
4578
  requireEnrichments: true
4452
4579
  };
4453
4580
  {
4454
- const { requireEnrichments: r, ...t } = e;
4455
- return t;
4581
+ const { requireEnrichments: t, ...r } = e;
4582
+ return r;
4456
4583
  }
4457
4584
  }
4458
- function an(e, n2) {
4585
+ function Xn$1(e, n2) {
4459
4586
  return e.ok ? { ok: true, value: n2(e.value) } : e;
4460
4587
  }
4461
- const ae = 24;
4462
- z$1.string().length(ae).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4463
- function fn(e) {
4464
- return Be$1(e);
4465
- }
4588
+ const De$1 = 24;
4589
+ z$2.string().length(De$1).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4466
4590
  var stringify = { exports: {} };
4467
4591
  var hasRequiredStringify;
4468
4592
  function requireStringify() {
@@ -4494,74 +4618,74 @@
4494
4618
  return stringify.exports;
4495
4619
  }
4496
4620
  requireStringify();
4497
- const l = z$1.object({
4498
- type: z$1.literal("PlError"),
4499
- name: z$1.string(),
4500
- message: z$1.string(),
4621
+ const l = z$2.object({
4622
+ type: z$2.literal("PlError"),
4623
+ name: z$2.string(),
4624
+ message: z$2.string(),
4501
4625
  /** The message with all details needed for SDK developers. */
4502
- fullMessage: z$1.string().optional(),
4503
- stack: z$1.string().optional()
4626
+ fullMessage: z$2.string().optional(),
4627
+ stack: z$2.string().optional()
4504
4628
  }), c = l.extend({
4505
- cause: z$1.lazy(() => s).optional(),
4506
- errors: z$1.lazy(() => s.array()).optional()
4507
- }), m = z$1.object({
4508
- type: z$1.literal("StandardError"),
4509
- name: z$1.string(),
4510
- message: z$1.string(),
4511
- stack: z$1.string().optional()
4629
+ cause: z$2.lazy(() => s).optional(),
4630
+ errors: z$2.lazy(() => s.array()).optional()
4631
+ }), m = z$2.object({
4632
+ type: z$2.literal("StandardError"),
4633
+ name: z$2.string(),
4634
+ message: z$2.string(),
4635
+ stack: z$2.string().optional()
4512
4636
  }), p = m.extend({
4513
- cause: z$1.lazy(() => s).optional(),
4514
- errors: z$1.lazy(() => s.array()).optional()
4515
- }), s = z$1.union([p, c]);
4516
- const u = z$1.object({
4517
- name: z$1.string(),
4518
- message: z$1.string(),
4519
- fullMessage: z$1.string().optional(),
4520
- stack: z$1.string().optional()
4637
+ cause: z$2.lazy(() => s).optional(),
4638
+ errors: z$2.lazy(() => s.array()).optional()
4639
+ }), s = z$2.union([p, c]);
4640
+ const u = z$2.object({
4641
+ name: z$2.string(),
4642
+ message: z$2.string(),
4643
+ fullMessage: z$2.string().optional(),
4644
+ stack: z$2.string().optional()
4521
4645
  }), n = u.extend({
4522
- cause: z$1.lazy(() => n).optional(),
4523
- errors: z$1.lazy(() => n.array()).optional()
4646
+ cause: z$2.lazy(() => n).optional(),
4647
+ errors: z$2.lazy(() => n.array()).optional()
4524
4648
  });
4525
- var it = Object.defineProperty;
4526
- var ot = (t, e, n2) => e in t ? it(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4527
- var V = (t, e, n2) => ot(t, typeof e != "symbol" ? e + "" : e, n2);
4649
+ var at = Object.defineProperty;
4650
+ var lt = (t, e, n2) => e in t ? at(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4651
+ var V = (t, e, n2) => lt(t, typeof e != "symbol" ? e + "" : e, n2);
4528
4652
  function se(t) {
4529
4653
  return { type: "Immediate", value: t };
4530
4654
  }
4531
- function Pt() {
4655
+ function Vt() {
4532
4656
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4533
4657
  }
4534
- function $e(t) {
4658
+ function He(t) {
4535
4659
  if (t && typeof globalThis.getPlatforma == "function")
4536
4660
  return globalThis.getPlatforma(t);
4537
4661
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4538
4662
  throw new Error("Can't get platforma instance.");
4539
4663
  }
4540
- function At() {
4664
+ function kt() {
4541
4665
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4542
4666
  }
4543
- function b() {
4667
+ function v() {
4544
4668
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4545
4669
  throw new Error("Not in config rendering context");
4546
4670
  }
4547
4671
  function G(t, e) {
4548
- const n2 = At();
4672
+ const n2 = kt();
4549
4673
  if (n2 === void 0) return false;
4550
4674
  if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4551
4675
  return n2.callbackRegistry[t] = e, true;
4552
4676
  }
4553
- const fe = /* @__PURE__ */ new Map();
4554
- function wt(t, e) {
4555
- t in b().callbackRegistry || (b().callbackRegistry[t] = (n2) => {
4556
- for (const r of fe.get(t))
4677
+ const me = /* @__PURE__ */ new Map();
4678
+ function Dt(t, e) {
4679
+ t in v().callbackRegistry || (v().callbackRegistry[t] = (n2) => {
4680
+ for (const r of me.get(t))
4557
4681
  r(n2);
4558
- }, fe.set(t, [])), fe.get(t).push(e);
4682
+ }, me.set(t, [])), me.get(t).push(e);
4559
4683
  }
4560
4684
  class L {
4561
4685
  constructor(e, n2 = (r) => r) {
4562
4686
  V(this, "isResolved", false);
4563
4687
  V(this, "resolvedValue");
4564
- this.handle = e, this.postProcess = n2, wt(e, (r) => {
4688
+ this.handle = e, this.postProcess = n2, Dt(e, (r) => {
4565
4689
  this.resolvedValue = n2(r), this.isResolved = true;
4566
4690
  });
4567
4691
  }
@@ -4578,10 +4702,10 @@
4578
4702
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4579
4703
  }
4580
4704
  }
4581
- function ye(t, e) {
4705
+ function Ce(t, e) {
4582
4706
  return t === void 0 ? void 0 : e(t);
4583
4707
  }
4584
- class O {
4708
+ class k {
4585
4709
  constructor(e, n2) {
4586
4710
  this.handle = e, this.resolvePath = n2;
4587
4711
  }
@@ -4620,47 +4744,47 @@
4620
4744
  ...this.resolvePath,
4621
4745
  ...n2.map((i) => typeof i == "string" ? i : i.field)
4622
4746
  ];
4623
- return ye(
4624
- b().resolveWithCommon(this.handle, e, ...n2),
4625
- (i) => new O(i, r)
4747
+ return Ce(
4748
+ v().resolveWithCommon(this.handle, e, ...n2),
4749
+ (i) => new k(i, r)
4626
4750
  );
4627
4751
  }
4628
4752
  get resourceType() {
4629
- return b().getResourceType(this.handle);
4753
+ return v().getResourceType(this.handle);
4630
4754
  }
4631
4755
  getInputsLocked() {
4632
- return b().getInputsLocked(this.handle);
4756
+ return v().getInputsLocked(this.handle);
4633
4757
  }
4634
4758
  getOutputsLocked() {
4635
- return b().getOutputsLocked(this.handle);
4759
+ return v().getOutputsLocked(this.handle);
4636
4760
  }
4637
4761
  getIsReadyOrError() {
4638
- return b().getIsReadyOrError(this.handle);
4762
+ return v().getIsReadyOrError(this.handle);
4639
4763
  }
4640
4764
  getIsFinal() {
4641
- return b().getIsFinal(this.handle);
4765
+ return v().getIsFinal(this.handle);
4642
4766
  }
4643
4767
  getError() {
4644
4768
  const e = [...this.resolvePath, "error"];
4645
- return ye(
4646
- b().getError(this.handle),
4647
- (n2) => new O(n2, e)
4769
+ return Ce(
4770
+ v().getError(this.handle),
4771
+ (n2) => new k(n2, e)
4648
4772
  );
4649
4773
  }
4650
4774
  listInputFields() {
4651
- return b().listInputFields(this.handle);
4775
+ return v().listInputFields(this.handle);
4652
4776
  }
4653
4777
  listOutputFields() {
4654
- return b().listOutputFields(this.handle);
4778
+ return v().listOutputFields(this.handle);
4655
4779
  }
4656
4780
  listDynamicFields() {
4657
- return b().listDynamicFields(this.handle);
4781
+ return v().listDynamicFields(this.handle);
4658
4782
  }
4659
4783
  getKeyValueBase64(e) {
4660
- return b().getKeyValueBase64(this.handle, e);
4784
+ return v().getKeyValueBase64(this.handle, e);
4661
4785
  }
4662
4786
  getKeyValueAsString(e) {
4663
- return b().getKeyValueAsString(this.handle, e);
4787
+ return v().getKeyValueAsString(this.handle, e);
4664
4788
  }
4665
4789
  getKeyValueAsJson(e) {
4666
4790
  const n2 = this.getKeyValueAsString(e);
@@ -4668,10 +4792,10 @@
4668
4792
  return JSON.parse(n2);
4669
4793
  }
4670
4794
  getDataBase64() {
4671
- return b().getDataBase64(this.handle);
4795
+ return v().getDataBase64(this.handle);
4672
4796
  }
4673
4797
  getDataAsString() {
4674
- return b().getDataAsString(this.handle);
4798
+ return v().getDataAsString(this.handle);
4675
4799
  }
4676
4800
  getDataAsJson() {
4677
4801
  const e = this.getDataAsString();
@@ -4684,7 +4808,7 @@
4684
4808
  getPColumns(e = false, n2 = "") {
4685
4809
  const r = this.parsePObjectCollection(e, n2);
4686
4810
  return r === void 0 ? void 0 : Object.entries(r).map(([, o]) => {
4687
- if (!ee$1(o)) throw new Error(`not a PColumn (kind = ${o.spec.kind})`);
4811
+ if (!Fe$1(o)) throw new Error(`not a PColumn (kind = ${o.spec.kind})`);
4688
4812
  return o;
4689
4813
  });
4690
4814
  }
@@ -4692,7 +4816,7 @@
4692
4816
  *
4693
4817
  */
4694
4818
  parsePObjectCollection(e = false, n2 = "") {
4695
- const r = b().parsePObjectCollection(
4819
+ const r = v().parsePObjectCollection(
4696
4820
  this.handle,
4697
4821
  e,
4698
4822
  n2,
@@ -4702,19 +4826,19 @@
4702
4826
  const i = {};
4703
4827
  for (const [o, s2] of Object.entries(r)) {
4704
4828
  const a = [...this.resolvePath, o];
4705
- i[o] = Ge$1(s2, (l2) => new O(l2, a));
4829
+ i[o] = Bn(s2, (l2) => new k(l2, a));
4706
4830
  }
4707
4831
  return i;
4708
4832
  }
4709
4833
  getFileContentAsBase64(e) {
4710
- return new L(b().getBlobContentAsBase64(this.handle, e));
4834
+ return new L(v().getBlobContentAsBase64(this.handle, e));
4711
4835
  }
4712
4836
  getFileContentAsString(e) {
4713
- return new L(b().getBlobContentAsString(this.handle, e));
4837
+ return new L(v().getBlobContentAsString(this.handle, e));
4714
4838
  }
4715
4839
  getFileContentAsJson(e) {
4716
4840
  return new L(
4717
- b().getBlobContentAsString(this.handle, e)
4841
+ v().getBlobContentAsString(this.handle, e)
4718
4842
  ).mapDefined((n2) => JSON.parse(n2));
4719
4843
  }
4720
4844
  /**
@@ -4733,7 +4857,7 @@
4733
4857
  * @returns downloaded file handle
4734
4858
  */
4735
4859
  getFileHandle() {
4736
- return new L(b().getDownloadedBlobContentHandle(this.handle));
4860
+ return new L(v().getDownloadedBlobContentHandle(this.handle));
4737
4861
  }
4738
4862
  /**
4739
4863
  * @deprecated use getFileHandle
@@ -4745,7 +4869,7 @@
4745
4869
  * @returns downloaded file handle
4746
4870
  */
4747
4871
  getRemoteFileHandle() {
4748
- return new L(b().getOnDemandBlobContentHandle(this.handle));
4872
+ return new L(v().getOnDemandBlobContentHandle(this.handle));
4749
4873
  }
4750
4874
  /**
4751
4875
  * @deprecated use getRemoteFileHandle
@@ -4757,22 +4881,22 @@
4757
4881
  * @returns the url to the extracted folder
4758
4882
  */
4759
4883
  extractArchiveAndGetURL(e) {
4760
- return new L(b().extractArchiveAndGetURL(this.handle, e));
4884
+ return new L(v().extractArchiveAndGetURL(this.handle, e));
4761
4885
  }
4762
4886
  getImportProgress() {
4763
- return new L(b().getImportProgress(this.handle));
4887
+ return new L(v().getImportProgress(this.handle));
4764
4888
  }
4765
4889
  getLastLogs(e) {
4766
- return new L(b().getLastLogs(this.handle, e));
4890
+ return new L(v().getLastLogs(this.handle, e));
4767
4891
  }
4768
4892
  getProgressLog(e) {
4769
- return new L(b().getProgressLog(this.handle, e));
4893
+ return new L(v().getProgressLog(this.handle, e));
4770
4894
  }
4771
4895
  getProgressLogWithInfo(e) {
4772
- return new L(b().getProgressLogWithInfo(this.handle, e));
4896
+ return new L(v().getProgressLogWithInfo(this.handle, e));
4773
4897
  }
4774
4898
  getLogHandle() {
4775
- return new L(b().getLogHandle(this.handle));
4899
+ return new L(v().getLogHandle(this.handle));
4776
4900
  }
4777
4901
  allFieldsResolved(e = "Input") {
4778
4902
  switch (e) {
@@ -4796,100 +4920,99 @@
4796
4920
  if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
4797
4921
  return;
4798
4922
  let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4799
- (u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
4923
+ (c2) => [c2, this.resolve({ field: c2, assertFieldType: r })]
4800
4924
  );
4801
- return o && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, h2]) => s2(u2, h2));
4802
- }
4803
- }
4804
- const We = "staging", Ge = "main";
4805
- const It = "pl7.app/label", _t = "pl7.app/trace", Lt = z$1.object({
4806
- type: z$1.string(),
4807
- importance: z$1.number().optional(),
4808
- id: z$1.string().optional(),
4809
- label: z$1.string()
4810
- }), Et = z$1.array(Lt), Vt = 1e-3, kt = "__LABEL__", Ee = "__LABEL__@1";
4811
- function ze(t, e, n2 = {}) {
4812
- const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s2 = t.map((d2) => {
4813
- var c2, v;
4814
- const y = e(d2);
4815
- let p2, g2, C;
4816
- "spec" in y && typeof y.spec == "object" ? (p2 = y.spec, g2 = y.prefixTrace, C = y.suffixTrace) : p2 = y;
4817
- const E2 = (c2 = p2.annotations) == null ? void 0 : c2[It], F = (v = p2.annotations) == null ? void 0 : v[_t], S = (F ? Et.safeParse(JSON.parse(F)).data : void 0) ?? [], P2 = [
4925
+ return o && (l2 = l2.filter((c2) => c2[1] !== void 0)), l2.map(([c2, m2]) => s2(c2, m2));
4926
+ }
4927
+ }
4928
+ const ze = "staging", Xe = "main";
4929
+ const Nt = z$2.object({
4930
+ type: z$2.string(),
4931
+ importance: z$2.number().optional(),
4932
+ id: z$2.string().optional(),
4933
+ label: z$2.string()
4934
+ }), Ut = z$2.array(Nt), Kt = 1e-3, qt = "__LABEL__", De = "__LABEL__@1";
4935
+ function Qe(t, e, n2 = {}) {
4936
+ const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s2 = t.map((f) => {
4937
+ const y$1 = e(f);
4938
+ let p2, g2, P;
4939
+ "spec" in y$1 && typeof y$1.spec == "object" ? (p2 = y$1.spec, g2 = y$1.prefixTrace, P = y$1.suffixTrace) : p2 = y$1;
4940
+ const E2 = wn(p2, y.Label), x = wn(p2, y.Trace), T2 = (x ? Ut.safeParse(me$1(x)).data : void 0) ?? [], S = [
4818
4941
  ...g2 ?? [],
4819
- ...S,
4820
- ...C ?? []
4942
+ ...T2,
4943
+ ...P ?? []
4821
4944
  ];
4822
4945
  if (E2 !== void 0) {
4823
- const I2 = { label: E2, type: kt, importance: -2 };
4824
- n2.addLabelAsSuffix ? P2.push(I2) : P2.splice(0, 0, I2);
4825
- }
4826
- const T2 = [], x2 = /* @__PURE__ */ new Map();
4827
- for (let I2 = P2.length - 1; I2 >= 0; --I2) {
4828
- const { type: $ } = P2[I2], K = P2[I2].importance ?? 0, j = (x2.get($) ?? 0) + 1;
4829
- x2.set($, j);
4830
- const N = `${$}@${j}`;
4831
- o.set(N, (o.get(N) ?? 0) + 1), r.set(
4832
- N,
4946
+ const u2 = { label: E2, type: qt, importance: -2 };
4947
+ n2.addLabelAsSuffix ? S.push(u2) : S.splice(0, 0, u2);
4948
+ }
4949
+ const C2 = [], I2 = /* @__PURE__ */ new Map();
4950
+ for (let u2 = S.length - 1; u2 >= 0; --u2) {
4951
+ const { type: b2 } = S[u2], K = S[u2].importance ?? 0, B = (I2.get(b2) ?? 0) + 1;
4952
+ I2.set(b2, B);
4953
+ const O = `${b2}@${B}`;
4954
+ o.set(O, (o.get(O) ?? 0) + 1), r.set(
4955
+ O,
4833
4956
  Math.max(
4834
- r.get(N) ?? Number.NEGATIVE_INFINITY,
4835
- K - (P2.length - I2) * Vt
4957
+ r.get(O) ?? Number.NEGATIVE_INFINITY,
4958
+ K - (S.length - u2) * Kt
4836
4959
  )
4837
- ), T2.push({ ...P2[I2], fullType: N, occurrenceIndex: j });
4960
+ ), C2.push({ ...S[u2], fullType: O, occurrenceIndex: B });
4838
4961
  }
4839
- return T2.reverse(), {
4840
- value: d2,
4962
+ return C2.reverse(), {
4963
+ value: f,
4841
4964
  spec: p2,
4842
4965
  label: E2,
4843
- fullTrace: T2
4966
+ fullTrace: C2
4844
4967
  };
4845
- }), a = [], l2 = [], u2 = [...r];
4846
- u2.sort(([, d2], [, y]) => y - d2);
4847
- for (const [d2] of u2)
4848
- d2.endsWith("@1") || o.get(d2) === t.length ? a.push(d2) : l2.push(d2);
4849
- const h2 = (d2, y = false) => {
4968
+ }), a = [], l2 = [], c2 = [...r];
4969
+ c2.sort(([, f], [, y2]) => y2 - f);
4970
+ for (const [f] of c2)
4971
+ f.endsWith("@1") || o.get(f) === t.length ? a.push(f) : l2.push(f);
4972
+ const m2 = (f, y2 = false) => {
4850
4973
  const p2 = [];
4851
4974
  for (let g2 = 0; g2 < s2.length; g2++) {
4852
- const C = s2[g2], E2 = C.fullTrace.filter((P2) => d2.has(P2.fullType) || i && i.has(P2.type));
4975
+ const P = s2[g2], E2 = P.fullTrace.filter((S) => f.has(S.fullType) || i && i.has(S.type));
4853
4976
  if (E2.length === 0)
4854
- if (y)
4977
+ if (y2)
4855
4978
  p2.push({
4856
4979
  label: "Unlabeled",
4857
- value: C.value
4980
+ value: P.value
4858
4981
  });
4859
4982
  else return;
4860
- const F = E2.map((P2) => P2.label), S = n2.separator ?? " / ";
4983
+ const x = E2.map((S) => S.label), T2 = n2.separator ?? " / ";
4861
4984
  p2.push({
4862
- label: F.join(S),
4863
- value: C.value
4985
+ label: x.join(T2),
4986
+ value: P.value
4864
4987
  });
4865
4988
  }
4866
4989
  return p2;
4867
4990
  };
4868
4991
  if (a.length === 0) {
4869
4992
  if (l2.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
4870
- return h2(new Set(Ee), true);
4871
- }
4872
- let f = 0, m2 = -1;
4873
- for (; f < a.length; ) {
4874
- const d2 = /* @__PURE__ */ new Set();
4875
- n2.includeNativeLabel && d2.add(Ee);
4876
- for (let p2 = 0; p2 < f; ++p2) d2.add(a[p2]);
4877
- m2 >= 0 && d2.add(a[m2]);
4878
- const y = h2(d2);
4879
- if (y !== void 0 && new Set(y.map((p2) => p2.label)).size === t.length) return y;
4880
- m2++, m2 >= a.length && (f++, m2 = f);
4881
- }
4882
- return h2(/* @__PURE__ */ new Set([...a, ...l2]), true);
4883
- }
4884
- const ee = "PColumnData/", le = ee + "ResourceMap", ue = ee + "Partitioned/ResourceMap", H = ee + "JsonPartitioned", J = ee + "BinaryPartitioned", Xe = ee + "Partitioned/", ce = Xe + "JsonPartitioned", z = Xe + "BinaryPartitioned";
4885
- const ve = (t) => {
4993
+ return m2(new Set(De), true);
4994
+ }
4995
+ let d = 0, h = -1;
4996
+ for (; d < a.length; ) {
4997
+ const f = /* @__PURE__ */ new Set();
4998
+ n2.includeNativeLabel && f.add(De);
4999
+ for (let p2 = 0; p2 < d; ++p2) f.add(a[p2]);
5000
+ h >= 0 && f.add(a[h]);
5001
+ const y2 = m2(f);
5002
+ if (y2 !== void 0 && new Set(y2.map((p2) => p2.label)).size === t.length) return y2;
5003
+ h++, h >= a.length && (d++, h = d);
5004
+ }
5005
+ return m2(/* @__PURE__ */ new Set([...a, ...l2]), true);
5006
+ }
5007
+ const ee = "PColumnData/", le = ee + "ResourceMap", ue = ee + "Partitioned/ResourceMap", H = ee + "JsonPartitioned", $ = ee + "BinaryPartitioned", Ze = ee + "Partitioned/", ce = Ze + "JsonPartitioned", z = Ze + "BinaryPartitioned";
5008
+ const Se = (t) => {
4886
5009
  if (t.endsWith(".index"))
4887
5010
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
4888
5011
  if (t.endsWith(".values"))
4889
5012
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
4890
5013
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
4891
5014
  };
4892
- function Ot(t) {
5015
+ function jt(t) {
4893
5016
  if (!t) return;
4894
5017
  const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
4895
5018
  let i = 0;
@@ -4901,7 +5024,7 @@
4901
5024
  i = n2.partitionKeyLength + n2.keyLength;
4902
5025
  break;
4903
5026
  case H:
4904
- case J:
5027
+ case $:
4905
5028
  i = n2.partitionKeyLength;
4906
5029
  break;
4907
5030
  case z:
@@ -4912,9 +5035,9 @@
4912
5035
  switch (e) {
4913
5036
  case le:
4914
5037
  case H:
4915
- case J:
5038
+ case $:
4916
5039
  for (let o of t.listInputFields()) {
4917
- e === J && (o = ve(o).baseKey);
5040
+ e === $ && (o = Se(o).baseKey);
4918
5041
  const s2 = [...JSON.parse(o)];
4919
5042
  r.push(s2);
4920
5043
  }
@@ -4926,16 +5049,16 @@
4926
5049
  const s2 = [...JSON.parse(o)], a = t.resolve({ field: o, assertFieldType: "Input" });
4927
5050
  if (a !== void 0)
4928
5051
  for (let l2 of a.listInputFields()) {
4929
- e === z && (l2 = ve(l2).baseKey);
4930
- const u2 = [...s2, ...JSON.parse(l2)];
4931
- r.push(u2);
5052
+ e === z && (l2 = Se(l2).baseKey);
5053
+ const c2 = [...s2, ...JSON.parse(l2)];
5054
+ r.push(c2);
4932
5055
  }
4933
5056
  }
4934
5057
  break;
4935
5058
  }
4936
5059
  return { data: r, keyLength: i };
4937
5060
  }
4938
- function Dt(t) {
5061
+ function Mt(t) {
4939
5062
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
4940
5063
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
4941
5064
  const { parts: e, partitionKeyLength: n2 } = t, r = [];
@@ -4954,11 +5077,11 @@
4954
5077
  }
4955
5078
  return r.map((i) => Array.from(i.values()));
4956
5079
  }
4957
- function Rt(t) {
5080
+ function $t(t) {
4958
5081
  if (t === void 0) return;
4959
- if (_(t))
4960
- return Dt(t);
4961
- const e = Ot(t);
5082
+ if (ue$1(t))
5083
+ return Mt(t);
5084
+ const e = jt(t);
4962
5085
  if (!e) return;
4963
5086
  const { data: n2, keyLength: r } = e, i = [];
4964
5087
  for (let o = 0; o < r; ++o)
@@ -4971,7 +5094,7 @@
4971
5094
  }
4972
5095
  return i.map((o) => Array.from(o.values()));
4973
5096
  }
4974
- function Ce(t, e = []) {
5097
+ function Pe(t, e = []) {
4975
5098
  if (t === void 0 || !t.getIsReadyOrError()) return;
4976
5099
  const n2 = t.resourceType.name, r = t.getDataAsJson();
4977
5100
  if (e.length > 0 && (n2 === ce || n2 === z))
@@ -4996,15 +5119,15 @@
4996
5119
  parts: i
4997
5120
  };
4998
5121
  }
4999
- case J: {
5122
+ case $: {
5000
5123
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
5001
5124
  throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
5002
5125
  const i = [], o = /* @__PURE__ */ new Map();
5003
5126
  for (const s2 of t.listInputFields()) {
5004
- const a = ve(s2), l2 = t.resolve({ field: s2, assertFieldType: "Input" });
5127
+ const a = Se(s2), l2 = t.resolve({ field: s2, assertFieldType: "Input" });
5005
5128
  if (l2 === void 0) return;
5006
- let u2 = o.get(a.baseKey);
5007
- u2 || (u2 = {}, o.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
5129
+ let c2 = o.get(a.baseKey);
5130
+ c2 || (c2 = {}, o.set(a.baseKey, c2)), a.type === "index" ? c2.index = l2 : c2.values = l2;
5008
5131
  }
5009
5132
  for (const [s2, a] of o.entries()) {
5010
5133
  if (!a.index || !a.values) return;
@@ -5032,7 +5155,7 @@
5032
5155
  if (a === void 0) return;
5033
5156
  if (a.resourceType.name !== H)
5034
5157
  throw new Error(`Expected ${H} inside ${n2}, but got ${a.resourceType.name}`);
5035
- const l2 = Ce(a, JSON.parse(s2));
5158
+ const l2 = Pe(a, JSON.parse(s2));
5036
5159
  if (l2 === void 0) return;
5037
5160
  if (l2.type !== "JsonPartitioned")
5038
5161
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -5051,9 +5174,9 @@
5051
5174
  for (const s2 of t.listInputFields()) {
5052
5175
  const a = t.resolve({ field: s2, assertFieldType: "Input" });
5053
5176
  if (a === void 0) return;
5054
- if (a.resourceType.name !== J)
5055
- throw new Error(`Expected ${J} inside ${n2}, but got ${a.resourceType.name}`);
5056
- const l2 = Ce(a, JSON.parse(s2));
5177
+ if (a.resourceType.name !== $)
5178
+ throw new Error(`Expected ${$} inside ${n2}, but got ${a.resourceType.name}`);
5179
+ const l2 = Pe(a, JSON.parse(s2));
5057
5180
  if (l2 === void 0) return;
5058
5181
  if (l2.type !== "BinaryPartitioned")
5059
5182
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -5069,113 +5192,125 @@
5069
5192
  throw new Error(`Unknown resource type: ${n2}`);
5070
5193
  }
5071
5194
  }
5072
- function Nt(t) {
5195
+ function Jt(t) {
5073
5196
  if (t !== void 0) {
5074
- if (_(t)) return t;
5075
- if (Se$1(t)) return je(t);
5076
- if (t instanceof O) return Ce(t);
5197
+ if (ue$1(t)) return t;
5198
+ if (Qe$1(t)) return en$1(t);
5199
+ if (t instanceof k) return Pe(t);
5077
5200
  throw new Error(`Unexpected input type: ${typeof t}`);
5078
5201
  }
5079
5202
  }
5080
- function Ut(t, e) {
5081
- const n2 = [...e].sort((o, s2) => s2[0] - o[0]);
5082
- if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
5083
- const { partitionKeyLength: o } = t;
5084
- for (const [s2] of e)
5085
- if (s2 >= o)
5086
- throw new Error(`Can't filter on non-partitioned axis ${s2}. Must be >= ${o}`);
5087
- } else if (t.type === "Json") {
5088
- const { keyLength: o } = t;
5089
- for (const [s2] of e)
5090
- if (s2 >= o)
5091
- throw new Error(`Can't filter on non-data axis ${s2}. Must be >= ${o}`);
5092
- }
5093
- const r = (o) => {
5094
- for (const [s2, a] of n2)
5095
- if (o[s2] !== a)
5203
+ function Bt(t, e) {
5204
+ const n2 = [...e].sort((s2, a) => a[0] - s2[0]), { type: r } = t;
5205
+ switch (r) {
5206
+ case "Json": {
5207
+ const { keyLength: s2 } = t;
5208
+ for (const [a] of e)
5209
+ if (a >= s2)
5210
+ throw new Error(`Can't filter on non-data axis ${a}. Must be >= ${s2}`);
5211
+ break;
5212
+ }
5213
+ case "JsonPartitioned":
5214
+ case "BinaryPartitioned":
5215
+ case "ParquetPartitioned": {
5216
+ const { partitionKeyLength: s2 } = t;
5217
+ for (const [a] of e)
5218
+ if (a >= s2)
5219
+ throw new Error(`Can't filter on non-partitioned axis ${a}. Must be >= ${s2}`);
5220
+ break;
5221
+ }
5222
+ default:
5223
+ throw new Error(`Unsupported data info type: ${r}`);
5224
+ }
5225
+ const i = (s2) => {
5226
+ for (const [a, l2] of n2)
5227
+ if (s2[a] !== l2)
5096
5228
  return false;
5097
5229
  return true;
5098
- }, i = (o) => {
5099
- const s2 = [...o];
5100
- for (const [a] of n2)
5101
- s2.splice(a, 1);
5102
- return s2;
5230
+ }, o = (s2) => {
5231
+ const a = [...s2];
5232
+ for (const [l2] of n2)
5233
+ a.splice(l2, 1);
5234
+ return a;
5103
5235
  };
5104
5236
  switch (t.type) {
5105
- case "Json": {
5106
- const o = t.data.filter((s2) => r(s2.key)).map((s2) => ({
5107
- key: i(s2.key),
5108
- value: s2.value
5109
- }));
5237
+ case "Json":
5110
5238
  return {
5111
5239
  type: "Json",
5112
5240
  keyLength: t.keyLength - e.length,
5113
- data: o
5241
+ data: t.data.filter((s2) => i(s2.key)).map((s2) => ({
5242
+ key: o(s2.key),
5243
+ value: s2.value
5244
+ }))
5114
5245
  };
5115
- }
5116
- case "JsonPartitioned": {
5117
- const o = t.parts.filter((s2) => r(s2.key)).map((s2) => ({
5118
- key: i(s2.key),
5119
- value: s2.value
5120
- }));
5246
+ case "JsonPartitioned":
5121
5247
  return {
5122
5248
  type: "JsonPartitioned",
5123
5249
  partitionKeyLength: t.partitionKeyLength - e.length,
5124
- parts: o
5250
+ parts: t.parts.filter((s2) => i(s2.key)).map((s2) => ({
5251
+ key: o(s2.key),
5252
+ value: s2.value
5253
+ }))
5125
5254
  };
5126
- }
5127
- case "BinaryPartitioned": {
5128
- const o = t.parts.filter((s2) => r(s2.key)).map((s2) => ({
5129
- key: i(s2.key),
5130
- value: s2.value
5131
- }));
5255
+ case "BinaryPartitioned":
5132
5256
  return {
5133
5257
  type: "BinaryPartitioned",
5134
5258
  partitionKeyLength: t.partitionKeyLength - e.length,
5135
- parts: o
5259
+ parts: t.parts.filter((s2) => i(s2.key)).map((s2) => ({
5260
+ key: o(s2.key),
5261
+ value: s2.value
5262
+ }))
5263
+ };
5264
+ case "ParquetPartitioned":
5265
+ return {
5266
+ type: "ParquetPartitioned",
5267
+ partitionKeyLength: t.partitionKeyLength - e.length,
5268
+ parts: t.parts.filter((s2) => i(s2.key)).map((s2) => ({
5269
+ key: o(s2.key),
5270
+ value: s2.value
5271
+ }))
5136
5272
  };
5137
- }
5138
5273
  }
5139
5274
  }
5140
- function Kt(t) {
5275
+ function Wt(t) {
5141
5276
  if (!Array.isArray(t)) return false;
5142
5277
  if (t.length === 0) return true;
5143
5278
  const e = t[0];
5144
5279
  return typeof e == "object" && e !== null && "key" in e && "val" in e;
5145
5280
  }
5146
- class Mt {
5281
+ class Gt {
5147
5282
  constructor(e) {
5148
5283
  this.columns = e;
5149
5284
  }
5150
5285
  selectColumns(e) {
5151
- const n2 = typeof e == "function" ? e : Qe$1(e);
5286
+ const n2 = typeof e == "function" ? e : Un(e);
5152
5287
  return this.columns.filter((r) => n2(r.spec));
5153
5288
  }
5154
5289
  }
5155
- function jt(t) {
5290
+ function Ht(t) {
5156
5291
  if (t)
5157
5292
  return t.map((e) => ({
5158
- type: `split:${Te$1(e.axisId)}`,
5293
+ type: `split:${On(e.axisId)}`,
5159
5294
  label: e.label,
5160
5295
  importance: 1e6
5161
5296
  // High importance for split filters in labels
5162
5297
  }));
5163
5298
  }
5164
- function qt(t) {
5299
+ function zt(t) {
5165
5300
  if (t)
5166
5301
  return t.map((e) => [e.axisIdx, e.value]);
5167
5302
  }
5168
- function Bt(t, e) {
5303
+ function Xt(t, e) {
5169
5304
  if (!e || e.length === 0) return t;
5170
5305
  const n2 = [...e].sort((r, i) => r[0] - i[0]);
5171
- return Be$1({ id: t, axisFilters: n2 });
5306
+ return We({ id: t, axisFilters: n2 });
5172
5307
  }
5173
- function Ve(t) {
5308
+ function Oe(t) {
5174
5309
  if (!t || typeof t != "object") return false;
5175
5310
  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);
5176
5311
  return !!e.domainAnchor || n2 || r;
5177
5312
  }
5178
- function Jt(t) {
5313
+ function Yt(t) {
5179
5314
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
5180
5315
  return [];
5181
5316
  const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
@@ -5186,7 +5321,7 @@
5186
5321
  class Q {
5187
5322
  constructor() {
5188
5323
  V(this, "defaultProviderStore", []);
5189
- V(this, "providers", [new Mt(this.defaultProviderStore)]);
5324
+ V(this, "providers", [new Gt(this.defaultProviderStore)]);
5190
5325
  V(this, "axisLabelProviders", []);
5191
5326
  }
5192
5327
  addColumnProvider(e) {
@@ -5213,131 +5348,131 @@
5213
5348
  ...s2 && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
5214
5349
  ...i ?? {}
5215
5350
  };
5216
- let u2 = () => false;
5351
+ let c2 = () => false;
5217
5352
  if (a) {
5218
5353
  const p2 = (Array.isArray(a) ? a : [a]).map((g2) => {
5219
- if (Ve(g2)) {
5354
+ if (Oe(g2)) {
5220
5355
  if (!r)
5221
5356
  throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
5222
- return Qe$1(_e(r.anchors, g2, n2));
5357
+ return Un(Rn(r.anchors, g2, n2));
5223
5358
  } else
5224
- return Qe$1(g2);
5359
+ return Un(g2);
5225
5360
  });
5226
- u2 = (g2) => p2.some((C) => C(g2));
5361
+ c2 = (g2) => p2.some((P) => P(g2));
5227
5362
  }
5228
- const h$1 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], f = [], m2 = /* @__PURE__ */ new Set();
5229
- for (const p2 of h$1) {
5230
- const g2 = Ve(p2);
5231
- let C;
5363
+ const m2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], d = [], h = /* @__PURE__ */ new Set();
5364
+ for (const p2 of m2) {
5365
+ const g2 = Oe(p2);
5366
+ let P;
5232
5367
  if (g2) {
5233
5368
  if (!r)
5234
5369
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
5235
- C = _e(r.anchors, p2, n2);
5370
+ P = Rn(r.anchors, p2, n2);
5236
5371
  } else
5237
- C = p2;
5238
- const E2 = /* @__PURE__ */ new Set(), F = [];
5239
- for (const T2 of this.providers) {
5240
- const x2 = T2.selectColumns(C);
5241
- for (const c2 of x2) {
5242
- if (u2(c2.spec)) continue;
5243
- if (E2.has(c2.id))
5244
- throw new Error(`Duplicate column id ${c2.id} in provider ${T2.constructor.name}`);
5245
- const v = Ye(c2.spec);
5246
- m2.has(v) || (E2.add(c2.id), m2.add(v), F.push(c2));
5372
+ P = p2;
5373
+ const E2 = /* @__PURE__ */ new Set(), x = [];
5374
+ for (const C2 of this.providers) {
5375
+ const I2 = C2.selectColumns(P);
5376
+ for (const u2 of I2) {
5377
+ if (c2(u2.spec)) continue;
5378
+ if (E2.has(u2.id))
5379
+ throw new Error(`Duplicate column id ${u2.id} in provider ${C2.constructor.name}`);
5380
+ const b2 = qn(u2.spec);
5381
+ h.has(b2) || (E2.add(u2.id), h.add(b2), x.push(u2));
5247
5382
  }
5248
5383
  }
5249
- if (F.length === 0) continue;
5250
- const S = Jt(p2), P2 = S.length > 0;
5251
- for (const T2 of F) {
5252
- if (!l$1(T2.spec)) continue;
5253
- const x2 = T2.spec;
5254
- if (P2) {
5255
- if (Kt(T2.data))
5256
- throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${T2.id}`);
5257
- const c2 = Nt(T2.data);
5258
- if (!c2) {
5384
+ if (x.length === 0) continue;
5385
+ const T2 = Yt(p2), S = T2.length > 0;
5386
+ for (const C2 of x) {
5387
+ if (!w$1(C2.spec)) continue;
5388
+ const I2 = C2.spec;
5389
+ if (S) {
5390
+ if (Wt(C2.data))
5391
+ throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${C2.id}`);
5392
+ const u2 = Jt(C2.data);
5393
+ if (!u2) {
5259
5394
  if (o) continue;
5260
5395
  return;
5261
5396
  }
5262
- if (!Fe(c2))
5263
- throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c2.type} for column ${T2.id}`);
5264
- const v = Rt(c2), I2 = S[S.length - 1];
5265
- if (I2 >= c2.partitionKeyLength)
5266
- throw new Error(`Not enough partition keys (${c2.partitionKeyLength}) for requested split axes (max index ${I2}) in column ${x2.name}`);
5267
- const $ = S.map((_2) => this.findLabels(h(x2.axesSpec[_2]))), K = [], j = (_2, W) => {
5268
- if (W >= S.length) {
5269
- if (K.push([..._2]), K.length > 1e4)
5397
+ if (!Ze$1(u2))
5398
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${u2.type} for column ${C2.id}`);
5399
+ const b2 = $t(u2), K = T2[T2.length - 1];
5400
+ if (K >= u2.partitionKeyLength)
5401
+ throw new Error(`Not enough partition keys (${u2.partitionKeyLength}) for requested split axes (max index ${K}) in column ${I2.name}`);
5402
+ const B = T2.map((_2) => this.findLabels(p$1(I2.axesSpec[_2]))), O = [], _e = (_2, W2) => {
5403
+ if (W2 >= T2.length) {
5404
+ if (O.push([..._2]), O.length > 1e4)
5270
5405
  throw new Error("Too many key combinations, aborting.");
5271
5406
  return;
5272
5407
  }
5273
- const M = S[W];
5274
- if (M >= v.length)
5275
- throw new Error(`Axis index ${M} out of bounds for unique keys array (length ${v.length}) during split key generation for column ${T2.id}`);
5276
- const q = v[M];
5277
- if (!q || q.length === 0) {
5278
- K.length = 0;
5408
+ const q = T2[W2];
5409
+ if (q >= b2.length)
5410
+ throw new Error(`Axis index ${q} out of bounds for unique keys array (length ${b2.length}) during split key generation for column ${C2.id}`);
5411
+ const j2 = b2[q];
5412
+ if (!j2 || j2.length === 0) {
5413
+ O.length = 0;
5279
5414
  return;
5280
5415
  }
5281
- for (const te of q)
5282
- _2.push(te), j(_2, W + 1), _2.pop();
5416
+ for (const te2 of j2)
5417
+ _2.push(te2), _e(_2, W2 + 1), _2.pop();
5283
5418
  };
5284
- if (j([], 0), K.length === 0)
5419
+ if (_e([], 0), O.length === 0)
5285
5420
  continue;
5286
- const N = [...x2.axesSpec], et = S.map((_2) => _2);
5287
- for (let _2 = S.length - 1; _2 >= 0; _2--)
5288
- N.splice(S[_2], 1);
5289
- const tt = { ...x2, axesSpec: N };
5290
- for (const _2 of K) {
5291
- const W = _2.map((M, q) => {
5292
- const te = et[q], nt = h(x2.axesSpec[te]), de = $[q], rt = (de == null ? void 0 : de[M]) ?? String(M);
5293
- return { axisIdx: te, axisId: nt, value: M, label: rt };
5421
+ const Le = [...I2.axesSpec], rt = T2.map((_2) => _2);
5422
+ for (let _2 = T2.length - 1; _2 >= 0; _2--)
5423
+ Le.splice(T2[_2], 1);
5424
+ const it = { ...I2, axesSpec: Le };
5425
+ for (const _2 of O) {
5426
+ const W2 = _2.map((q, j2) => {
5427
+ const te2 = rt[j2], ot = p$1(I2.axesSpec[te2]), fe = B[j2], st = (fe == null ? void 0 : fe[q]) ?? String(q);
5428
+ return { axisIdx: te2, axisId: ot, value: q, label: st };
5294
5429
  });
5295
- f.push({
5430
+ d.push({
5296
5431
  type: "split",
5297
- originalColumn: T2,
5298
- spec: x2,
5299
- adjustedSpec: tt,
5300
- dataEntries: c2,
5301
- axisFilters: W
5432
+ originalColumn: C2,
5433
+ spec: I2,
5434
+ adjustedSpec: it,
5435
+ dataEntries: u2,
5436
+ axisFilters: W2
5302
5437
  });
5303
5438
  }
5304
5439
  } else
5305
- f.push({
5440
+ d.push({
5306
5441
  type: "direct",
5307
- originalColumn: T2,
5308
- spec: x2,
5309
- adjustedSpec: x2
5442
+ originalColumn: C2,
5443
+ spec: I2,
5444
+ adjustedSpec: I2
5310
5445
  });
5311
5446
  }
5312
5447
  }
5313
- if (f.length === 0) return [];
5314
- const d2 = ze(
5315
- f,
5448
+ if (d.length === 0) return [];
5449
+ const f = Qe(
5450
+ d,
5316
5451
  (p2) => ({
5317
5452
  spec: p2.spec,
5318
- suffixTrace: p2.type === "split" ? jt(p2.axisFilters) : void 0
5453
+ suffixTrace: p2.type === "split" ? Ht(p2.axisFilters) : void 0
5319
5454
  }),
5320
5455
  l2
5321
- ), y = [];
5322
- for (const { value: p2, label: g2 } of d2) {
5323
- const { originalColumn: C, spec: E2 } = p2, F = p2.type === "split" ? p2.axisFilters : void 0, S = qt(F);
5324
- let P2;
5325
- r ? P2 = r.deriveS(E2, S) : P2 = Bt(C.id, S);
5326
- let T2 = { ...p2.adjustedSpec };
5327
- s2 && (T2 = {
5328
- ...T2,
5456
+ ), y$1 = [];
5457
+ for (const { value: p2, label: g2 } of f) {
5458
+ const { originalColumn: P, spec: E2 } = p2, x = p2.type === "split" ? p2.axisFilters : void 0, T2 = zt(x);
5459
+ let S;
5460
+ r ? S = r.deriveS(E2, T2) : S = Xt(P.id, T2);
5461
+ let C2 = { ...p2.adjustedSpec };
5462
+ s2 && (C2 = {
5463
+ ...C2,
5329
5464
  annotations: {
5330
- ...T2.annotations ?? {},
5331
- "pl7.app/label": g2
5465
+ ...C2.annotations ?? {},
5466
+ [y.Label]: g2
5332
5467
  }
5333
- }), y.push({
5334
- id: P2,
5335
- spec: T2,
5336
- data: () => p2.type === "split" ? Ie(Ut(p2.dataEntries, S)) : p2.originalColumn.data,
5468
+ }), y$1.push({
5469
+ id: S,
5470
+ spec: C2,
5471
+ data: () => p2.type === "split" ? nn$1(Bt(p2.dataEntries, T2)) : p2.originalColumn.data,
5337
5472
  label: g2
5338
5473
  });
5339
5474
  }
5340
- return y;
5475
+ return y$1;
5341
5476
  }
5342
5477
  getColumns(e, n2) {
5343
5478
  const r = this.getUniversalEntries(e, {
@@ -5362,7 +5497,7 @@
5362
5497
  return i;
5363
5498
  }
5364
5499
  }
5365
- function Te(t) {
5500
+ function Ae(t) {
5366
5501
  const e = (i) => i.operator !== "InSet" ? i : {
5367
5502
  operator: "Or",
5368
5503
  operands: i.references.map((o) => ({
@@ -5395,19 +5530,19 @@
5395
5530
  });
5396
5531
  return t.map((i) => r(i, e));
5397
5532
  }
5398
- function he(t, e) {
5533
+ function ye(t, e) {
5399
5534
  if (t === void 0) return e === void 0;
5400
5535
  if (e === void 0) return true;
5401
5536
  for (const n2 in e)
5402
5537
  if (t[n2] !== e[n2]) return false;
5403
5538
  return true;
5404
5539
  }
5405
- function ke(t) {
5406
- return Ge$1(t, (e) => e instanceof O ? e.handle : Se$1(e) ? Oe$1(e, (n2) => n2.handle) : e);
5540
+ function Re(t) {
5541
+ return Bn(t, (e) => e instanceof k ? e.handle : Qe$1(e) ? Xe$1(e, (n2) => n2.handle) : e);
5407
5542
  }
5408
- class $t {
5543
+ class Qt {
5409
5544
  constructor() {
5410
- V(this, "ctx", b());
5545
+ V(this, "ctx", v());
5411
5546
  }
5412
5547
  /**
5413
5548
  * @deprecated use getOptions()
@@ -5416,28 +5551,28 @@
5416
5551
  return this.ctx.calculateOptions(e);
5417
5552
  }
5418
5553
  getOptions(e, n2) {
5419
- const r = typeof e == "function" ? e : Qe$1(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
5554
+ const r = typeof e == "function" ? e : Un(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
5420
5555
  let o = {}, s2 = false;
5421
- return typeof n2 < "u" && (typeof n2 == "function" ? o = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? o = n2 : (n2 = n2, o = n2.label ?? {}, s2 = n2.refsWithEnrichments ?? false))), typeof o == "object" ? ze(i, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
5422
- ref: tn(a, s2),
5556
+ return typeof n2 < "u" && (typeof n2 == "function" ? o = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? o = n2 : (n2 = n2, o = n2.label ?? {}, s2 = n2.refsWithEnrichments ?? false))), typeof o == "object" ? Qe(i, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
5557
+ ref: _n(a, s2),
5423
5558
  label: l2
5424
5559
  })) : i.map(({ ref: a, obj: l2 }) => ({
5425
- ref: tn(a, s2),
5560
+ ref: _n(a, s2),
5426
5561
  label: o(l2, a)
5427
5562
  }));
5428
5563
  }
5429
5564
  resolveAnchorCtx(e) {
5430
- if (e instanceof Me) return e;
5565
+ if (e instanceof Nn) return e;
5431
5566
  const n2 = {};
5432
5567
  for (const [r, i] of Object.entries(e))
5433
- if (nn$1(i)) {
5568
+ if (Hn(i)) {
5434
5569
  const o = this.getPColumnSpecByRef(i);
5435
5570
  if (!o)
5436
5571
  return;
5437
5572
  n2[r] = o;
5438
5573
  } else
5439
5574
  n2[r] = i;
5440
- return new Me(n2);
5575
+ return new Nn(n2);
5441
5576
  }
5442
5577
  /**
5443
5578
  * Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
@@ -5511,7 +5646,7 @@
5511
5646
  ref: n2.ref,
5512
5647
  obj: {
5513
5648
  ...n2.obj,
5514
- data: new O(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5649
+ data: new k(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5515
5650
  }
5516
5651
  }))
5517
5652
  };
@@ -5530,9 +5665,9 @@
5530
5665
  ref: n2.ref,
5531
5666
  obj: {
5532
5667
  ...n2.obj,
5533
- data: an(
5668
+ data: Xn$1(
5534
5669
  n2.obj.data,
5535
- (r) => new O(r, [n2.ref.blockId, n2.ref.name])
5670
+ (r) => new k(r, [n2.ref.blockId, n2.ref.name])
5536
5671
  )
5537
5672
  }
5538
5673
  }))
@@ -5559,9 +5694,9 @@
5559
5694
  )) == null ? void 0 : r.obj;
5560
5695
  const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
5561
5696
  if (n2)
5562
- return Ge$1(
5697
+ return Bn(
5563
5698
  n2,
5564
- (i) => new O(i, [e.blockId, e.name])
5699
+ (i) => new k(i, [e.blockId, e.name])
5565
5700
  );
5566
5701
  }
5567
5702
  /**
@@ -5572,7 +5707,7 @@
5572
5707
  getPColumnByRef(e) {
5573
5708
  const n2 = this.getDataByRef(e);
5574
5709
  if (n2)
5575
- return We$1(n2);
5710
+ return Vn(n2);
5576
5711
  }
5577
5712
  /**
5578
5713
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -5582,7 +5717,7 @@
5582
5717
  getPColumnSpecByRef(e) {
5583
5718
  const n2 = this.getSpecByRef(e);
5584
5719
  if (n2) {
5585
- if (!l$1(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
5720
+ if (!w$1(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
5586
5721
  return n2;
5587
5722
  }
5588
5723
  }
@@ -5601,13 +5736,13 @@
5601
5736
  findDataWithCompatibleSpec(e) {
5602
5737
  const n2 = [];
5603
5738
  e: for (const r of this.getData().entries) {
5604
- if (!l$1(r.obj.spec))
5739
+ if (!w$1(r.obj.spec))
5605
5740
  continue;
5606
5741
  const i = r.obj.spec;
5607
- if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && he(e.domain, i.domain)) {
5742
+ if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ye(e.domain, i.domain)) {
5608
5743
  for (let o = 0; o < e.axesSpec.length; ++o) {
5609
5744
  const s2 = e.axesSpec[o], a = i.axesSpec[o];
5610
- if (s2.name !== a.name || s2.type !== a.type || !he(s2.domain, a.domain))
5745
+ if (s2.name !== a.name || s2.type !== a.type || !ye(s2.domain, a.domain))
5611
5746
  continue e;
5612
5747
  }
5613
5748
  n2.push(r.obj);
@@ -5622,9 +5757,9 @@
5622
5757
  findLabels(e) {
5623
5758
  const n2 = this.getData();
5624
5759
  for (const r of n2.entries) {
5625
- if (!ee$1(r.obj)) continue;
5760
+ if (!Fe$1(r.obj)) continue;
5626
5761
  const i = r.obj.spec;
5627
- if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && he(e.domain, i.axesSpec[0].domain)) {
5762
+ if (i.name === Pn.Label && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ye(e.domain, i.axesSpec[0].domain)) {
5628
5763
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
5629
5764
  throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
5630
5765
  return Object.fromEntries(
@@ -5643,17 +5778,17 @@
5643
5778
  * @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
5644
5779
  */
5645
5780
  selectColumns(e) {
5646
- const n2 = typeof e == "function" ? e : Qe$1(e);
5647
- return this.getSpecs().entries.filter(({ obj: i }) => l$1(i) ? n2(i) : false).map(({ ref: i, obj: o }) => {
5781
+ const n2 = typeof e == "function" ? e : Un(e);
5782
+ return this.getSpecs().entries.filter(({ obj: i }) => w$1(i) ? n2(i) : false).map(({ ref: i, obj: o }) => {
5648
5783
  const s2 = o;
5649
5784
  let a = null;
5650
5785
  const l2 = this;
5651
5786
  return {
5652
- id: Be$1(i),
5787
+ id: We(i),
5653
5788
  spec: s2,
5654
5789
  get data() {
5655
- var u2;
5656
- return a !== null || (a = (u2 = l2.getPColumnByRef(i)) == null ? void 0 : u2.data), a;
5790
+ var c2;
5791
+ return a !== null || (a = (c2 = l2.getPColumnByRef(i)) == null ? void 0 : c2.data), a;
5657
5792
  }
5658
5793
  };
5659
5794
  });
@@ -5663,13 +5798,12 @@
5663
5798
  * @returns a map of axis value => label
5664
5799
  */
5665
5800
  findLabelsForColumnAxis(e, n2) {
5666
- var o;
5667
5801
  const r = this.findLabels(e.axesSpec[n2]);
5668
5802
  if (!r) return;
5669
- const i = (o = e.annotations) == null ? void 0 : o["pl7.app/axisKeys/" + n2];
5803
+ const i = wn(e, `pl7.app/axisKeys/${n2}`);
5670
5804
  if (i !== void 0) {
5671
- const s2 = JSON.parse(i);
5672
- return Object.fromEntries(s2.map((a) => [a, r[a] ?? "Unlabelled"]));
5805
+ const o = JSON.parse(i);
5806
+ return Object.fromEntries(o.map((s2) => [s2, r[s2] ?? "Unlabelled"]));
5673
5807
  } else
5674
5808
  return r;
5675
5809
  }
@@ -5680,8 +5814,8 @@
5680
5814
  V(this, "_argsCache");
5681
5815
  V(this, "_uiStateCache");
5682
5816
  V(this, "_activeArgsCache");
5683
- V(this, "resultPool", new $t());
5684
- this.ctx = b();
5817
+ V(this, "resultPool", new Qt());
5818
+ this.ctx = v();
5685
5819
  }
5686
5820
  get args() {
5687
5821
  if (this._argsCache === void 0) {
@@ -5715,16 +5849,16 @@
5715
5849
  // return this.ctx.featureFlags;
5716
5850
  // }
5717
5851
  getNamedAccessor(e) {
5718
- return ye(
5852
+ return Ce(
5719
5853
  this.ctx.getAccessorHandleByName(e),
5720
- (n2) => new O(n2, [e])
5854
+ (n2) => new k(n2, [e])
5721
5855
  );
5722
5856
  }
5723
5857
  get prerun() {
5724
- return this.getNamedAccessor(We);
5858
+ return this.getNamedAccessor(ze);
5725
5859
  }
5726
5860
  get outputs() {
5727
- return this.getNamedAccessor(Ge);
5861
+ return this.getNamedAccessor(Xe);
5728
5862
  }
5729
5863
  /**
5730
5864
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -5736,7 +5870,7 @@
5736
5870
  }
5737
5871
  verifyInlineAndExplicitColumnsSupport(e) {
5738
5872
  var i;
5739
- const n2 = e.some((o) => !(o.data instanceof O) || Se$1(o.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5873
+ const n2 = e.some((o) => !(o.data instanceof k) || Qe$1(o.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5740
5874
  if (n2 && !r) throw Error("Inline or explicit columns not supported");
5741
5875
  }
5742
5876
  patchPTableDef(e) {
@@ -5747,14 +5881,14 @@
5747
5881
  filters: [...e.partitionFilters, ...e.filters]
5748
5882
  }), (r = this.ctx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
5749
5883
  ...e,
5750
- partitionFilters: Te(e.partitionFilters),
5751
- filters: Te(e.filters)
5884
+ partitionFilters: Ae(e.partitionFilters),
5885
+ filters: Ae(e.filters)
5752
5886
  }), e;
5753
5887
  }
5754
5888
  // TODO remove all non-PColumn fields
5755
5889
  createPFrame(e) {
5756
5890
  return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
5757
- e.map((n2) => ke(n2))
5891
+ e.map((n2) => Re(n2))
5758
5892
  );
5759
5893
  }
5760
5894
  createPTable(e) {
@@ -5767,8 +5901,8 @@
5767
5901
  partitionFilters: e.filters ?? [],
5768
5902
  filters: [],
5769
5903
  sorting: e.sorting ?? []
5770
- }) : n2 = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(Xe$1(n2.src)), this.ctx.createPTable(
5771
- Be(n2, (r) => ke(r))
5904
+ }) : n2 = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(Mn(n2.src)), this.ctx.createPTable(
5905
+ In(n2, (r) => Re(r))
5772
5906
  );
5773
5907
  }
5774
5908
  /** @deprecated scheduled for removal from SDK */
@@ -5788,17 +5922,17 @@
5788
5922
  this.ctx.logError(e);
5789
5923
  }
5790
5924
  }
5791
- const Wt = "1.42.10", X = Wt;
5792
- function Gt(t) {
5925
+ const Zt = "1.42.16", X = Zt;
5926
+ function en(t) {
5793
5927
  return t.__renderLambda === true;
5794
5928
  }
5795
- function me(t) {
5929
+ function ge(t) {
5796
5930
  if (t !== void 0)
5797
- return Gt(t) ? t.handle : t;
5931
+ return en(t) ? t.handle : t;
5798
5932
  }
5799
5933
  const w = class w2 {
5800
- constructor(e, n2, r, i, o, s2, a, l2, u2) {
5801
- this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = o, this._sections = s2, this._title = a, this._enrichmentTargets = l2, this._featureFlags = u2;
5934
+ constructor(e, n2, r, i, o, s2, a, l2, c2) {
5935
+ this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = o, this._sections = s2, this._title = a, this._enrichmentTargets = l2, this._featureFlags = c2;
5802
5936
  }
5803
5937
  static create(e = "Heavy") {
5804
5938
  return new w2(
@@ -6022,13 +6156,13 @@
6022
6156
  sdkVersion: X,
6023
6157
  renderingMode: this._renderingMode,
6024
6158
  initialArgs: this._initialArgs,
6025
- inputsValid: me(this._inputsValid),
6026
- sections: me(this._sections),
6159
+ inputsValid: ge(this._inputsValid),
6160
+ sections: ge(this._sections),
6027
6161
  outputs: Object.fromEntries(
6028
- Object.entries(this._outputs).map(([r, i]) => [r, me(i)])
6162
+ Object.entries(this._outputs).map(([r, i]) => [r, ge(i)])
6029
6163
  )
6030
6164
  };
6031
- return globalThis.platformaApiVersion = e, Pt() ? $e({ sdkVersion: X, apiVersion: platformaApiVersion }) : { config: n2 };
6165
+ return globalThis.platformaApiVersion = e, Vt() ? He({ sdkVersion: X, apiVersion: platformaApiVersion }) : { config: n2 };
6032
6166
  }
6033
6167
  };
6034
6168
  V(w, "INITIAL_BLOCK_FEATURE_FLAGS", {
@@ -6036,8 +6170,8 @@
6036
6170
  requiresUIAPIVersion: 1,
6037
6171
  requiresModelAPIVersion: 1
6038
6172
  });
6039
- let Oe = w;
6040
- function Qe() {
6173
+ let Ne = w;
6174
+ function tt() {
6041
6175
  return {
6042
6176
  sourceId: null,
6043
6177
  hiddenColIds: null,
@@ -6046,72 +6180,72 @@
6046
6180
  sorting: []
6047
6181
  };
6048
6182
  }
6049
- function De() {
6183
+ function Ue() {
6050
6184
  return {
6051
6185
  version: 4,
6052
6186
  stateCache: [],
6053
- pTableParams: Qe()
6187
+ pTableParams: tt()
6054
6188
  };
6055
6189
  }
6056
- function Ht(t) {
6057
- return "version" in t || (t = De()), t.version === 2 && (t = {
6190
+ function tn(t) {
6191
+ return "version" in t || (t = Ue()), t.version === 2 && (t = {
6058
6192
  version: 3,
6059
6193
  stateCache: t.stateCache.map((e) => ({
6060
6194
  ...e,
6061
6195
  filtersState: []
6062
6196
  })),
6063
- pTableParams: Qe()
6064
- }), t.version === 3 && (t = De()), t;
6197
+ pTableParams: tt()
6198
+ }), t.version === 3 && (t = Ue()), t;
6065
6199
  }
6066
- function Se(t) {
6067
- return t.axesSpec.length === 1 && t.name === "pl7.app/label";
6200
+ function we(t) {
6201
+ return t.axesSpec.length === 1 && t.name === Pn.Label;
6068
6202
  }
6069
- function zt(t) {
6203
+ function nn(t) {
6070
6204
  return new Q().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
6071
- name: "pl7.app/label",
6205
+ name: Pn.Label,
6072
6206
  axes: [{}]
6073
6207
  // exactly one axis
6074
6208
  }, { dontWaitAllData: true });
6075
6209
  }
6076
- function Re(t, e) {
6210
+ function Ke(t, e) {
6077
6211
  const n2 = [], r = [];
6078
6212
  for (const a of t)
6079
- Se(a.spec) ? n2.push(a) : r.push(a);
6213
+ we(a.spec) ? n2.push(a) : r.push(a);
6080
6214
  const i = [];
6081
6215
  for (const a of r)
6082
6216
  for (const l2 of a.spec.axesSpec) {
6083
- const u2 = h(l2);
6084
- i.some((h2) => X$1(h2, u2)) || i.push(u2);
6217
+ const c2 = p$1(l2);
6218
+ i.some((m2) => we$1(m2, c2)) || i.push(c2);
6085
6219
  }
6086
6220
  for (const a of n2) {
6087
- const l2 = h(a.spec.axesSpec[0]), u2 = i.findIndex((h2) => X$1(h2, l2));
6088
- u2 !== -1 && i.splice(u2, 1);
6221
+ const l2 = p$1(a.spec.axesSpec[0]), c2 = i.findIndex((m2) => we$1(m2, l2));
6222
+ c2 !== -1 && i.splice(c2, 1);
6089
6223
  }
6090
6224
  const o = (a, l2) => {
6091
- let u2 = a.toString();
6225
+ let c2 = a.toString();
6092
6226
  if (l2)
6093
- for (const h2 in l2)
6094
- u2 += h2, u2 += l2[h2];
6095
- return u2;
6227
+ for (const m2 in l2)
6228
+ c2 += m2, c2 += l2[m2];
6229
+ return c2;
6096
6230
  }, s2 = [];
6097
6231
  for (const a of e) {
6098
- const l2 = a.spec.axesSpec[0], u2 = h(l2), h$1 = i.findIndex((f) => X$1(f, u2));
6099
- if (h$1 !== -1) {
6100
- const f = i[h$1], m2 = Object.keys(f.domain ?? {}).length, d2 = Object.keys(l2.domain ?? {}).length;
6101
- m2 > d2 ? s2.push({
6102
- id: o(a.id, f.domain),
6232
+ const l2 = a.spec.axesSpec[0], c2 = p$1(l2), m2 = i.findIndex((d) => we$1(d, c2));
6233
+ if (m2 !== -1) {
6234
+ const d = i[m2], h = Object.keys(d.domain ?? {}).length, f = Object.keys(l2.domain ?? {}).length;
6235
+ h > f ? s2.push({
6236
+ id: o(a.id, d.domain),
6103
6237
  spec: {
6104
6238
  ...a.spec,
6105
- axesSpec: [{ ...f, annotations: l2.annotations }]
6239
+ axesSpec: [{ ...d, annotations: l2.annotations }]
6106
6240
  },
6107
6241
  data: a.data
6108
- }) : s2.push(a), i.splice(h$1, 1);
6242
+ }) : s2.push(a), i.splice(m2, 1);
6109
6243
  }
6110
6244
  }
6111
6245
  return s2;
6112
6246
  }
6113
- function Xt(t) {
6114
- const e = (i) => Array.isArray(i), n2 = (i) => i instanceof O, r = (i) => typeof i == "object" && "type" in i;
6247
+ function rn(t) {
6248
+ const e = (i) => Array.isArray(i), n2 = (i) => i instanceof k, r = (i) => typeof i == "object" && "type" in i;
6115
6249
  return t.map((i) => i.data).every((i) => {
6116
6250
  if (e(i))
6117
6251
  return true;
@@ -6125,12 +6259,14 @@
6125
6259
  return Object.values(i.parts).every((s2) => s2.getIsReadyOrError());
6126
6260
  case "BinaryPartitioned":
6127
6261
  return Object.values(i.parts).every((s2) => s2.index.getIsReadyOrError() && s2.values.getIsReadyOrError());
6262
+ case "ParquetPartitioned":
6263
+ return Object.values(i.parts).every((s2) => s2.getIsReadyOrError());
6128
6264
  }
6129
6265
  else
6130
6266
  throw Error(`unsupported column data type: ${i}`);
6131
6267
  });
6132
6268
  }
6133
- function Ne(t) {
6269
+ function qe(t) {
6134
6270
  let e = t.columns;
6135
6271
  const n2 = [];
6136
6272
  if (t.coreColumnPredicate) {
@@ -6152,78 +6288,74 @@
6152
6288
  sorting: t.sorting
6153
6289
  };
6154
6290
  }
6155
- function Yt(t) {
6156
- var e;
6157
- return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
6291
+ function on(t) {
6292
+ return wn(t, y.Table.Visibility) === "hidden";
6158
6293
  }
6159
- function Qt(t) {
6160
- var e;
6161
- return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
6294
+ function sn(t) {
6295
+ return wn(t, y.Table.Visibility) === "optional";
6162
6296
  }
6163
- function ge(t, e) {
6297
+ function be(t, e) {
6164
6298
  return [...new Map(t.map((n2) => [e(n2), n2])).values()];
6165
6299
  }
6166
- function Wn(t, e, n2, r) {
6300
+ function Xn(t, e, n2, r) {
6167
6301
  if (e.length === 0) return;
6168
- const i = e.filter((c2) => Pe(c2.spec) || !Yt(c2.spec)), o = Ht(n2), s2 = zt(t.resultPool);
6302
+ const i = e.filter((u2) => Fe(u2.spec) || !on(u2.spec)), o = tn(n2), s2 = nn(t.resultPool);
6169
6303
  if (!s2) return;
6170
- const a = Re(i.map(Ve$1), s2), l2 = [...i, ...a], h$1 = [
6171
- ...ge(
6172
- [...l2.flatMap((c2) => c2.spec.axesSpec.map((v) => h(v)))],
6173
- (c2) => fn(c2)
6174
- ).map((c2) => ({ type: "axis", id: c2 })),
6175
- ...l2.map((c2) => ({ type: "column", id: c2.id }))
6176
- ], f = new Set(h$1.map((c2) => fn(c2))), m2 = (c2) => f.has(fn(c2)), d2 = "full", y = o.pTableParams.partitionFilters.filter((c2) => {
6177
- const v = m2(c2.column);
6178
- return v || t.logWarn(`Partition filter ${JSON.stringify(c2)} does not match provided columns, skipping`), v;
6179
- }), p2 = ge(
6304
+ const a = Ke(i.map(En), s2), l2 = [...i, ...a], m2 = [
6305
+ ...be(
6306
+ [...l2.flatMap((u2) => u2.spec.axesSpec.map((b2) => p$1(b2)))],
6307
+ (u2) => m$1(u2)
6308
+ ).map((u2) => ({ type: "axis", id: u2 })),
6309
+ ...l2.map((u2) => ({ type: "column", id: u2.id }))
6310
+ ], d = new Set(m2.map((u2) => m$1(u2))), h = (u2) => d.has(m$1(u2)), f = "full", y2 = o.pTableParams.partitionFilters.filter((u2) => {
6311
+ const b2 = h(u2.column);
6312
+ return b2 || t.logWarn(`Partition filter ${JSON.stringify(u2)} does not match provided columns, skipping`), b2;
6313
+ }), p2 = be(
6180
6314
  [...[], ...o.pTableParams.filters],
6181
- (c2) => fn(c2.column)
6182
- ).filter((c2) => {
6183
- const v = m2(c2.column);
6184
- return v || t.logWarn(`Filter ${JSON.stringify(c2)} does not match provided columns, skipping`), v;
6185
- }), g2 = ge(
6315
+ (u2) => m$1(u2.column)
6316
+ ).filter((u2) => {
6317
+ const b2 = h(u2.column);
6318
+ return b2 || t.logWarn(`Filter ${JSON.stringify(u2)} does not match provided columns, skipping`), b2;
6319
+ }), g2 = be(
6186
6320
  [...[], ...o.pTableParams.sorting],
6187
- (c2) => fn(c2.column)
6188
- ).filter((c2) => {
6189
- const v = m2(c2.column);
6190
- return v || t.logWarn(`Sorting ${JSON.stringify(c2)} does not match provided columns, skipping`), v;
6191
- }), C = Ne({
6321
+ (u2) => m$1(u2.column)
6322
+ ).filter((u2) => {
6323
+ const b2 = h(u2.column);
6324
+ return b2 || t.logWarn(`Sorting ${JSON.stringify(u2)} does not match provided columns, skipping`), b2;
6325
+ }), P = qe({
6192
6326
  columns: i,
6193
6327
  labelColumns: a,
6194
- coreJoinType: d2,
6195
- partitionFilters: y,
6328
+ coreJoinType: f,
6329
+ partitionFilters: y2,
6196
6330
  filters: p2,
6197
6331
  sorting: g2,
6198
6332
  coreColumnPredicate: void 0
6199
- }), E2 = t.createPTable(C), F = new Set((() => {
6200
- const c2 = o.pTableParams.hiddenColIds;
6201
- return c2 || i.filter((v) => Qt(v.spec)).map((v) => v.id);
6333
+ }), E2 = t.createPTable(P), x = new Set((() => {
6334
+ const u2 = o.pTableParams.hiddenColIds;
6335
+ return u2 || i.filter((b2) => sn(b2.spec)).map((b2) => b2.id);
6202
6336
  })());
6203
- i.filter((c2) => Pe(c2.spec)).forEach((c2) => F.delete(c2.id)), [...y.map((c2) => c2.column), ...p2.map((c2) => c2.column), ...g2.map((c2) => c2.column)].filter((c2) => c2.type === "column").forEach((c2) => F.delete(c2.id));
6204
- const S = i.filter((c2) => !F.has(c2.id)), P2 = Re(S.map(Ve$1), s2);
6205
- if (!Xt([...S, ...P2])) return;
6206
- const T2 = Ne({
6207
- columns: S,
6208
- labelColumns: P2,
6209
- coreJoinType: d2,
6210
- partitionFilters: y,
6337
+ i.filter((u2) => Fe(u2.spec)).forEach((u2) => x.delete(u2.id)), [...y2.map((u2) => u2.column), ...p2.map((u2) => u2.column), ...g2.map((u2) => u2.column)].filter((u2) => u2.type === "column").forEach((u2) => x.delete(u2.id));
6338
+ const T2 = i.filter((u2) => !x.has(u2.id)), S = Ke(T2.map(En), s2);
6339
+ if (!rn([...T2, ...S])) return;
6340
+ const C2 = qe({
6341
+ columns: T2,
6342
+ labelColumns: S,
6343
+ coreJoinType: f,
6344
+ partitionFilters: y2,
6211
6345
  filters: p2,
6212
6346
  sorting: g2,
6213
6347
  coreColumnPredicate: void 0
6214
- }), x2 = t.createPTable(T2);
6348
+ }), I2 = t.createPTable(C2);
6215
6349
  return {
6216
6350
  sourceId: o.pTableParams.sourceId,
6217
6351
  fullTableHandle: E2,
6218
- visibleTableHandle: x2
6352
+ visibleTableHandle: I2
6219
6353
  };
6220
6354
  }
6221
- function Pe(t) {
6222
- var e;
6223
- return ((e = t.annotations) == null ? void 0 : e[nn]) === "true";
6355
+ function Fe(t) {
6356
+ return !!z$1(t, y.IsLinkerColumn);
6224
6357
  }
6225
- const nn = "pl7.app/isLinkerColumn";
6226
- const ImportFileHandleSchema = z$1.string().optional().refine(
6358
+ const ImportFileHandleSchema = z$2.string().optional().refine(
6227
6359
  (_a) => true
6228
6360
  );
6229
6361
  function* range(from, to, step = 1) {
@@ -6233,23 +6365,23 @@
6233
6365
  }
6234
6366
  function toList(iterable) {
6235
6367
  const lst = [];
6236
- for (const it2 of iterable) {
6237
- lst.push(it2);
6368
+ for (const it of iterable) {
6369
+ lst.push(it);
6238
6370
  }
6239
6371
  return lst;
6240
6372
  }
6241
6373
  function times(n2, cb) {
6242
6374
  return toList(range(0, n2)).map(cb);
6243
6375
  }
6244
- const $BlockArgs = z$1.object({
6245
- numbers: z$1.array(z$1.coerce.number()),
6246
- handles: z$1.array(ImportFileHandleSchema)
6376
+ const $BlockArgs = z$2.object({
6377
+ numbers: z$2.array(z$2.coerce.number()),
6378
+ handles: z$2.array(ImportFileHandleSchema)
6247
6379
  });
6248
- const platforma = Oe.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], handles: [] }).withUiState({
6380
+ const platforma = Ne.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], handles: [] }).withUiState({
6249
6381
  dataTableV2: {
6250
6382
  sourceId: "source_1",
6251
6383
  numRows: 200,
6252
- state: De()
6384
+ state: Ue()
6253
6385
  },
6254
6386
  dynamicSections: [],
6255
6387
  datasets: []
@@ -6271,11 +6403,11 @@
6271
6403
  const sheets = [
6272
6404
  {
6273
6405
  axis: {
6274
- type: "Int",
6406
+ type: g.Int,
6275
6407
  name: "part",
6276
6408
  annotations: {
6277
- "pl7.app/label": "Partitioned axis",
6278
- "pl7.app/discreteValues": "[0,1]"
6409
+ [y.Label]: "Partitioned axis",
6410
+ [y.DiscreteValues]: hn([0, 1])
6279
6411
  }
6280
6412
  },
6281
6413
  options: [
@@ -6293,36 +6425,36 @@
6293
6425
  id: "column1",
6294
6426
  spec: {
6295
6427
  kind: "PColumn",
6296
- valueType: "String",
6428
+ valueType: g.String,
6297
6429
  name: "example",
6298
6430
  annotations: {
6299
- "pl7.app/label": "String column",
6300
- "pl7.app/discreteValues": '["up","down"]',
6301
- "pl7.app/table/orderPriority": "101"
6431
+ [y.Label]: "String column",
6432
+ [y.DiscreteValues]: hn(["up", "down"]),
6433
+ [y.Table.OrderPriority]: hn(101)
6302
6434
  },
6303
6435
  axesSpec: [
6304
6436
  {
6305
- type: "Int",
6437
+ type: g.Int,
6306
6438
  name: "part",
6307
6439
  annotations: {
6308
- "pl7.app/label": "Partitioned axis",
6309
- "pl7.app/discreteValues": "[0,1]"
6440
+ [y.Label]: "Partitioned axis",
6441
+ [y.DiscreteValues]: hn([0, 1])
6310
6442
  }
6311
6443
  },
6312
6444
  {
6313
- type: "Int",
6445
+ type: g.Int,
6314
6446
  name: "index",
6315
6447
  annotations: {
6316
- "pl7.app/label": "Int axis"
6448
+ [y.Label]: "Int axis"
6317
6449
  }
6318
6450
  }
6319
6451
  ]
6320
6452
  },
6321
6453
  data: times(rowCount, (i) => {
6322
- const v = i + 1;
6454
+ const v2 = i + 1;
6323
6455
  return {
6324
- key: [makePartitionId(rowCount, v), v],
6325
- val: v.toString()
6456
+ key: [makePartitionId(rowCount, v2), v2],
6457
+ val: v2.toString()
6326
6458
  };
6327
6459
  })
6328
6460
  },
@@ -6330,36 +6462,36 @@
6330
6462
  id: "column2",
6331
6463
  spec: {
6332
6464
  kind: "PColumn",
6333
- valueType: "Float",
6465
+ valueType: g.Float,
6334
6466
  name: "value",
6335
6467
  annotations: {
6336
- "pl7.app/label": "Float column",
6337
- "pl7.app/table/visibility": "optional",
6338
- "pl7.app/table/orderPriority": "100"
6468
+ [y.Label]: "Float column",
6469
+ [y.Table.Visibility]: "optional",
6470
+ [y.Table.OrderPriority]: hn(100)
6339
6471
  },
6340
6472
  axesSpec: [
6341
6473
  {
6342
- type: "Int",
6474
+ type: g.Int,
6343
6475
  name: "part",
6344
6476
  annotations: {
6345
- "pl7.app/label": "Partitioned axis",
6346
- "pl7.app/discreteValues": "[0,1]"
6477
+ [y.Label]: "Partitioned axis",
6478
+ [y.DiscreteValues]: hn([0, 1])
6347
6479
  }
6348
6480
  },
6349
6481
  {
6350
- type: "Int",
6482
+ type: g.Int,
6351
6483
  name: "index",
6352
6484
  annotations: {
6353
- "pl7.app/label": "Int axis"
6485
+ [y.Label]: "Int axis"
6354
6486
  }
6355
6487
  }
6356
6488
  ]
6357
6489
  },
6358
6490
  data: times(rowCount, (i) => {
6359
- const v = i + 1;
6491
+ const v2 = i + 1;
6360
6492
  return {
6361
- key: [makePartitionId(rowCount, v), v],
6362
- val: v + 0.1
6493
+ key: [makePartitionId(rowCount, v2), v2],
6494
+ val: v2 + 0.1
6363
6495
  };
6364
6496
  })
6365
6497
  },
@@ -6367,26 +6499,26 @@
6367
6499
  id: "labelColumn",
6368
6500
  spec: {
6369
6501
  kind: "PColumn",
6370
- valueType: "Int",
6371
- name: "pl7.app/label",
6502
+ valueType: g.Int,
6503
+ name: Pn.Label,
6372
6504
  annotations: {
6373
- "pl7.app/label": "Int axis labels"
6505
+ [y.Label]: "Int axis labels"
6374
6506
  },
6375
6507
  axesSpec: [
6376
6508
  {
6377
- type: "Int",
6509
+ type: g.Int,
6378
6510
  name: "index",
6379
6511
  annotations: {
6380
- "pl7.app/label": "Int axis"
6512
+ [y.Label]: "Int axis"
6381
6513
  }
6382
6514
  }
6383
6515
  ]
6384
6516
  },
6385
6517
  data: times(rowCount, (i) => {
6386
- const v = i + 1;
6518
+ const v2 = i + 1;
6387
6519
  return {
6388
- key: [v],
6389
- val: 1e5 - v
6520
+ key: [v2],
6521
+ val: 1e5 - v2
6390
6522
  };
6391
6523
  })
6392
6524
  },
@@ -6394,71 +6526,71 @@
6394
6526
  id: "linkerColumn",
6395
6527
  spec: {
6396
6528
  kind: "PColumn",
6397
- valueType: "Int",
6529
+ valueType: g.Int,
6398
6530
  name: "linker",
6399
6531
  annotations: {
6400
- "pl7.app/label": "Index axis linker",
6401
- "pl7.app/isLinkerColumn": "true",
6402
- "pl7.app/table/visibility": "hidden"
6532
+ [y.Label]: "Index axis linker",
6533
+ [y.IsLinkerColumn]: hn(true),
6534
+ [y.Table.Visibility]: "hidden"
6403
6535
  },
6404
6536
  axesSpec: [
6405
6537
  {
6406
- type: "Int",
6538
+ type: g.Int,
6407
6539
  name: "index",
6408
6540
  annotations: {
6409
- "pl7.app/label": "Int axis"
6541
+ [y.Label]: "Int axis"
6410
6542
  }
6411
6543
  },
6412
6544
  {
6413
- type: "Int",
6545
+ type: g.Int,
6414
6546
  name: "linkedIndex",
6415
6547
  annotations: {
6416
- "pl7.app/label": "Linked int axis"
6548
+ [y.Label]: "Linked int axis"
6417
6549
  }
6418
6550
  }
6419
6551
  ]
6420
6552
  },
6421
6553
  data: times(rowCount, (i) => {
6422
- const v = i + 1;
6554
+ const v2 = i + 1;
6423
6555
  return {
6424
- key: [v, v],
6556
+ key: [v2, v2],
6425
6557
  val: 1
6426
6558
  };
6427
6559
  })
6428
6560
  }
6429
6561
  ];
6430
- for (let j = 1; j < 10; ++j) {
6562
+ for (let j2 = 1; j2 < 10; ++j2) {
6431
6563
  columns.push({
6432
- id: `alphabeticalColumn${j}`,
6564
+ id: `alphabeticalColumn${j2}`,
6433
6565
  spec: {
6434
6566
  kind: "PColumn",
6435
- valueType: "String",
6567
+ valueType: g.String,
6436
6568
  name: "value",
6437
6569
  annotations: {
6438
- "pl7.app/label": `Alphabetical column ${j}`,
6439
- "pl7.app/table/visibility": "optional",
6440
- "pl7.app/table/orderPriority": (10 - j).toString()
6570
+ [y.Label]: `Alphabetical column ${j2}`,
6571
+ [y.Table.Visibility]: "optional",
6572
+ [y.Table.OrderPriority]: hn(10 - j2)
6441
6573
  },
6442
6574
  axesSpec: [
6443
6575
  {
6444
- type: "Int",
6576
+ type: g.Int,
6445
6577
  name: "linkedIndex",
6446
6578
  annotations: {
6447
- "pl7.app/label": "Linked int axis"
6579
+ [y.Label]: "Linked int axis"
6448
6580
  }
6449
6581
  }
6450
6582
  ]
6451
6583
  },
6452
6584
  data: times(rowCount, (i) => {
6453
- const v = i + 1;
6585
+ const v2 = i + 1;
6454
6586
  return {
6455
- key: [v],
6456
- val: v.toString().repeat(j)
6587
+ key: [v2],
6588
+ val: v2.toString().repeat(j2)
6457
6589
  };
6458
6590
  })
6459
6591
  });
6460
6592
  }
6461
- return Wn(
6593
+ return Xn(
6462
6594
  ctx,
6463
6595
  columns,
6464
6596
  ctx.uiState.dataTableV2.state
@@ -6469,12 +6601,12 @@
6469
6601
  }
6470
6602
  return "Ui Examples";
6471
6603
  }).sections((ctx) => {
6472
- const dynamicSections = (ctx.uiState.dynamicSections ?? []).map((it2) => ({
6604
+ const dynamicSections = (ctx.uiState.dynamicSections ?? []).map((it) => ({
6473
6605
  type: "link",
6474
- href: `/section?id=${it2.id}`,
6475
- label: it2.label
6606
+ href: `/section?id=${it.id}`,
6607
+ label: it.label
6476
6608
  }));
6477
- if (dynamicSections.some((it2) => it2.label === "Error")) {
6609
+ if (dynamicSections.some((it) => it.label === "Error")) {
6478
6610
  throw new Error("sections: test error");
6479
6611
  }
6480
6612
  return [