@milaboratories/milaboratories.ui-examples.model 1.0.40 → 1.0.42

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
@@ -53,7 +53,7 @@
53
53
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
54
54
  }
55
55
  util2.joinValues = joinValues;
56
- util2.jsonStringifyReplacer = (_2, value) => {
56
+ util2.jsonStringifyReplacer = (_, value) => {
57
57
  if (typeof value === "bigint") {
58
58
  return value.toString();
59
59
  }
@@ -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 || !f : !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
@@ -3946,96 +3946,94 @@
3946
3946
  z.object({
3947
3947
  __isRef: z.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
3948
3948
  blockId: z.string().describe("Upstream block id"),
3949
- name: z.string().describe(
3950
- "Name of the output provided to the upstream block's output context"
3951
- )
3949
+ name: z.string().describe("Name of the output provided to the upstream block's output context")
3952
3950
  }).describe(
3953
3951
  "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."
3954
3952
  ).strict().readonly();
3955
3953
  function r(n) {
3956
3954
  return n.kind === "PColumn";
3957
3955
  }
3958
- function x(n) {
3956
+ function w(n) {
3959
3957
  return r(n.spec);
3960
3958
  }
3961
- function B(n) {
3962
- if (!x(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
3959
+ function O$1(n) {
3960
+ if (!w(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
3963
3961
  return n;
3964
3962
  }
3965
- function L(n, t) {
3963
+ function J(n, t) {
3966
3964
  return n === void 0 ? void 0 : {
3967
3965
  ...n,
3968
3966
  data: t(n.data)
3969
3967
  };
3970
3968
  }
3971
- function O$1(n, t) {
3969
+ function W(n, t) {
3972
3970
  return n.ok ? { ok: true, value: t(n.value) } : n;
3973
3971
  }
3974
- var ct = Object.defineProperty;
3975
- var dt = (e, t, n) => t in e ? ct(e, t, { enumerable: true, configurable: true, writable: true, value: n }) : e[t] = n;
3976
- var _ = (e, t, n) => dt(e, typeof t != "symbol" ? t + "" : t, n);
3977
- function k(e) {
3978
- return { type: "Immediate", value: e };
3972
+ var ce = Object.defineProperty;
3973
+ var de = (t, e, n) => e in t ? ce(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
3974
+ var v = (t, e, n) => de(t, typeof e != "symbol" ? e + "" : e, n);
3975
+ function k(t) {
3976
+ return { type: "Immediate", value: t };
3979
3977
  }
3980
- function _t() {
3978
+ function _e() {
3981
3979
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
3982
3980
  }
3983
- function rt(e) {
3984
- if (e && typeof globalThis.getPlatforma == "function")
3985
- return globalThis.getPlatforma(e);
3981
+ function re(t) {
3982
+ if (t && typeof globalThis.getPlatforma == "function")
3983
+ return globalThis.getPlatforma(t);
3986
3984
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
3987
3985
  throw new Error("Can't get platforma instance.");
3988
3986
  }
3989
- function vt() {
3987
+ function ve() {
3990
3988
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
3991
3989
  }
3992
3990
  function u() {
3993
3991
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
3994
3992
  throw new Error("Not in config rendering context");
3995
3993
  }
3996
- function O(e, t) {
3997
- const n = vt();
3994
+ function O(t, e) {
3995
+ const n = ve();
3998
3996
  if (n === void 0) return false;
3999
- if (e in n.callbackRegistry) throw new Error(`Callback with key ${e} already registered.`);
4000
- return n.callbackRegistry[e] = t, true;
3997
+ if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
3998
+ return n.callbackRegistry[t] = e, true;
4001
3999
  }
4002
4000
  const N = /* @__PURE__ */ new Map();
4003
- function wt(e, t) {
4004
- e in u().callbackRegistry || (u().callbackRegistry[e] = (n) => {
4005
- for (const r2 of N.get(e))
4001
+ function we(t, e) {
4002
+ t in u().callbackRegistry || (u().callbackRegistry[t] = (n) => {
4003
+ for (const r2 of N.get(t))
4006
4004
  r2(n);
4007
- }, N.set(e, [])), N.get(e).push(t);
4005
+ }, N.set(t, [])), N.get(t).push(e);
4008
4006
  }
4009
4007
  class g {
4010
- constructor(t, n = (r2) => r2) {
4011
- _(this, "isResolved", false);
4012
- _(this, "resolvedValue");
4013
- this.handle = t, this.postProcess = n, wt(t, (r2) => {
4008
+ constructor(e, n = (r2) => r2) {
4009
+ v(this, "isResolved", false);
4010
+ v(this, "resolvedValue");
4011
+ this.handle = e, this.postProcess = n, we(e, (r2) => {
4014
4012
  this.resolvedValue = n(r2), this.isResolved = true;
4015
4013
  });
4016
4014
  }
4017
- map(t) {
4018
- return new g(this.handle, (n) => t(this.postProcess(n)));
4015
+ map(e) {
4016
+ return new g(this.handle, (n) => e(this.postProcess(n)));
4019
4017
  }
4020
- mapDefined(t) {
4018
+ mapDefined(e) {
4021
4019
  return new g(this.handle, (n) => {
4022
4020
  const r2 = this.postProcess(n);
4023
- return r2 ? t(r2) : void 0;
4021
+ return r2 ? e(r2) : void 0;
4024
4022
  });
4025
4023
  }
4026
4024
  toJSON() {
4027
4025
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4028
4026
  }
4029
4027
  }
4030
- function X(e) {
4031
- return e === void 0 ? void 0 : new w(e);
4028
+ function X(t) {
4029
+ return t === void 0 ? void 0 : new S(t);
4032
4030
  }
4033
- class w {
4034
- constructor(t) {
4035
- this.handle = t;
4031
+ class S {
4032
+ constructor(e) {
4033
+ this.handle = e;
4036
4034
  }
4037
- resolve(...t) {
4038
- const n = t.map(
4035
+ resolve(...e) {
4036
+ const n = e.map(
4039
4037
  (r2) => ({
4040
4038
  assertFieldType: "Input",
4041
4039
  ...typeof r2 == "string" ? { field: r2 } : r2
@@ -4043,8 +4041,8 @@
4043
4041
  );
4044
4042
  return this.resolveWithCommon({}, ...n);
4045
4043
  }
4046
- resolveOutput(...t) {
4047
- const n = t.map(
4044
+ resolveOutput(...e) {
4045
+ const n = e.map(
4048
4046
  (r2) => ({
4049
4047
  assertFieldType: "Output",
4050
4048
  ...typeof r2 == "string" ? { field: r2 } : r2
@@ -4052,8 +4050,8 @@
4052
4050
  );
4053
4051
  return this.resolveWithCommon({}, ...n);
4054
4052
  }
4055
- resolveInput(...t) {
4056
- const n = t.map(
4053
+ resolveInput(...e) {
4054
+ const n = e.map(
4057
4055
  (r2) => ({
4058
4056
  assertFieldType: "Input",
4059
4057
  ...typeof r2 == "string" ? { field: r2 } : r2
@@ -4061,11 +4059,11 @@
4061
4059
  );
4062
4060
  return this.resolveWithCommon({}, ...n);
4063
4061
  }
4064
- resolveAny(...t) {
4065
- return this.resolveWithCommon({}, ...t);
4062
+ resolveAny(...e) {
4063
+ return this.resolveWithCommon({}, ...e);
4066
4064
  }
4067
- resolveWithCommon(t, ...n) {
4068
- return X(u().resolveWithCommon(this.handle, t, ...n));
4065
+ resolveWithCommon(e, ...n) {
4066
+ return X(u().resolveWithCommon(this.handle, e, ...n));
4069
4067
  }
4070
4068
  get resourceType() {
4071
4069
  return u().getResourceType(this.handle);
@@ -4094,14 +4092,14 @@
4094
4092
  listDynamicFields() {
4095
4093
  return u().listDynamicFields(this.handle);
4096
4094
  }
4097
- getKeyValueBase64(t) {
4098
- return u().getKeyValueBase64(this.handle, t);
4095
+ getKeyValueBase64(e) {
4096
+ return u().getKeyValueBase64(this.handle, e);
4099
4097
  }
4100
- getKeyValueAsString(t) {
4101
- return u().getKeyValueAsString(this.handle, t);
4098
+ getKeyValueAsString(e) {
4099
+ return u().getKeyValueAsString(this.handle, e);
4102
4100
  }
4103
- getKeyValueAsJson(t) {
4104
- const n = this.getKeyValueAsString(t);
4101
+ getKeyValueAsJson(e) {
4102
+ const n = this.getKeyValueAsString(e);
4105
4103
  if (n == null) throw new Error("Resource has no content.");
4106
4104
  return JSON.parse(n);
4107
4105
  }
@@ -4112,33 +4110,33 @@
4112
4110
  return u().getDataAsString(this.handle);
4113
4111
  }
4114
4112
  getDataAsJson() {
4115
- const t = this.getDataAsString();
4116
- if (t == null) throw new Error("Resource has no content.");
4117
- return JSON.parse(t);
4113
+ const e = this.getDataAsString();
4114
+ if (e == null) throw new Error("Resource has no content.");
4115
+ return JSON.parse(e);
4118
4116
  }
4119
4117
  /**
4120
4118
  *
4121
4119
  */
4122
- getPColumns(t = false, n = "") {
4123
- const r2 = this.parsePObjectCollection(t, n);
4120
+ getPColumns(e = false, n = "") {
4121
+ const r2 = this.parsePObjectCollection(e, n);
4124
4122
  return r2 === void 0 ? void 0 : Object.entries(r2).map(([, i2]) => {
4125
- if (!x(i2)) throw new Error(`not a PColumn (kind = ${i2.spec.kind})`);
4123
+ if (!w(i2)) throw new Error(`not a PColumn (kind = ${i2.spec.kind})`);
4126
4124
  return i2;
4127
4125
  });
4128
4126
  }
4129
4127
  /**
4130
4128
  *
4131
4129
  */
4132
- parsePObjectCollection(t = false, n = "") {
4130
+ parsePObjectCollection(e = false, n = "") {
4133
4131
  const r2 = u().parsePObjectCollection(
4134
4132
  this.handle,
4135
- t,
4133
+ e,
4136
4134
  n
4137
4135
  );
4138
4136
  if (r2 === void 0) return;
4139
4137
  const s = {};
4140
4138
  for (const [i2, o] of Object.entries(r2))
4141
- s[i2] = L(o, (a) => new w(a));
4139
+ s[i2] = J(o, (a) => new S(a));
4142
4140
  return s;
4143
4141
  }
4144
4142
  getFileContentAsBase64() {
@@ -4150,7 +4148,7 @@
4150
4148
  getFileContentAsJson() {
4151
4149
  return new g(
4152
4150
  u().getBlobContentAsString(this.handle)
4153
- ).mapDefined((t) => JSON.parse(t));
4151
+ ).mapDefined((e) => JSON.parse(e));
4154
4152
  }
4155
4153
  /**
4156
4154
  * @deprecated use getFileContentAsBase64
@@ -4191,17 +4189,17 @@
4191
4189
  getImportProgress() {
4192
4190
  return new g(u().getImportProgress(this.handle));
4193
4191
  }
4194
- getLastLogs(t) {
4195
- return new g(u().getLastLogs(this.handle, t));
4192
+ getLastLogs(e) {
4193
+ return new g(u().getLastLogs(this.handle, e));
4196
4194
  }
4197
- getProgressLog(t) {
4198
- return new g(u().getProgressLog(this.handle, t));
4195
+ getProgressLog(e) {
4196
+ return new g(u().getProgressLog(this.handle, e));
4199
4197
  }
4200
4198
  getLogHandle() {
4201
4199
  return new g(u().getLogHandle(this.handle));
4202
4200
  }
4203
- allFieldsResolved(t = "Input") {
4204
- switch (t) {
4201
+ allFieldsResolved(e = "Input") {
4202
+ switch (e) {
4205
4203
  case "Input":
4206
4204
  return this.getInputsLocked() && this.listInputFields().every(
4207
4205
  (n) => this.resolve({ field: n, assertFieldType: "Input" }) !== void 0
@@ -4212,13 +4210,13 @@
4212
4210
  );
4213
4211
  }
4214
4212
  }
4215
- mapFields(t, n) {
4213
+ mapFields(e, n) {
4216
4214
  const { fieldType: r2, requireLocked: s, skipUnresolved: i2 } = {
4217
4215
  fieldType: "Input",
4218
4216
  requireLocked: true,
4219
4217
  skipUnresolved: false,
4220
4218
  ...n
4221
- }, o = t;
4219
+ }, o = e;
4222
4220
  if (s && (r2 === "Input" && !this.getInputsLocked() || r2 === "Output" && !this.getOutputsLocked()))
4223
4221
  return;
4224
4222
  let l = (r2 === "Input" ? this.listInputFields() : r2 === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
@@ -4227,41 +4225,44 @@
4227
4225
  return i2 && (l = l.filter((c2) => c2[1] !== void 0)), l.map(([c2, f]) => o(c2, f));
4228
4226
  }
4229
4227
  }
4230
- const st = "staging", it = "main";
4231
- const At = "pl7.app/label", Pt = "pl7.app/trace", It = z.object({
4228
+ const se = "staging", ie = "main";
4229
+ const Ae = "pl7.app/label", Pe = "pl7.app/trace", Ie = z.object({
4232
4230
  type: z.string(),
4233
4231
  importance: z.number().optional(),
4234
4232
  id: z.string().optional(),
4235
4233
  label: z.string()
4236
- }), Ct = z.array(It), Tt = 1e-3, Rt = "__LABEL__", Q = "__LABEL__@1";
4237
- function Ft(e, t, n = {}) {
4238
- const r2 = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i2 = e.map((d) => {
4234
+ }), Ce = z.array(Ie), Re = 1e-3, Te = "__LABEL__", Q = "__LABEL__@1";
4235
+ function Fe(t, e, n = {}) {
4236
+ const r2 = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i2 = t.map((d) => {
4239
4237
  var z2, Y;
4240
- const m = t(d), y = (z2 = m.annotations) == null ? void 0 : z2[At], F = (Y = m.annotations) == null ? void 0 : Y[Pt], b = (F ? Ct.safeParse(JSON.parse(F)).data : void 0) ?? [];
4241
- y && b.splice(0, 0, { label: y, type: Rt, importance: -2 });
4242
- const V = [], q = /* @__PURE__ */ new Map();
4243
- for (let S = b.length - 1; S >= 0; --S) {
4244
- const { type: E } = b[S], ut = b[S].importance ?? 0, j = (q.get(E) ?? 0) + 1;
4245
- q.set(E, j);
4246
- const I = `${E}@${j}`;
4238
+ const m = e(d), y = (z2 = m.annotations) == null ? void 0 : z2[Ae], F = (Y = m.annotations) == null ? void 0 : Y[Pe], b = (F ? Ce.safeParse(JSON.parse(F)).data : void 0) ?? [];
4239
+ if (y) {
4240
+ const _ = { label: y, type: Te, importance: -2 };
4241
+ n.addLabelAsSuffix ? b.push(_) : b.splice(0, 0, _);
4242
+ }
4243
+ const E = [], q = /* @__PURE__ */ new Map();
4244
+ for (let _ = b.length - 1; _ >= 0; --_) {
4245
+ const { type: V } = b[_], ue = b[_].importance ?? 0, j = (q.get(V) ?? 0) + 1;
4246
+ q.set(V, j);
4247
+ const I = `${V}@${j}`;
4247
4248
  s.set(I, (s.get(I) ?? 0) + 1), r2.set(
4248
4249
  I,
4249
4250
  Math.max(
4250
4251
  r2.get(I) ?? Number.NEGATIVE_INFINITY,
4251
- ut - (b.length - S) * Tt
4252
+ ue - (b.length - _) * Re
4252
4253
  )
4253
- ), V.push({ ...b[S], fullType: I, occurenceIndex: j });
4254
+ ), E.push({ ...b[_], fullType: I, occurenceIndex: j });
4254
4255
  }
4255
- return V.reverse(), {
4256
+ return E.reverse(), {
4256
4257
  value: d,
4257
4258
  spec: m,
4258
4259
  label: y,
4259
- fullTrace: V
4260
+ fullTrace: E
4260
4261
  };
4261
4262
  }), o = [], a = [], l = [...r2];
4262
4263
  l.sort(([, d], [, m]) => m - d);
4263
4264
  for (const [d] of l)
4264
- d.endsWith("@1") || s.get(d) === e.length ? o.push(d) : a.push(d);
4265
+ d.endsWith("@1") || s.get(d) === t.length ? o.push(d) : a.push(d);
4265
4266
  const c2 = (d) => i2.map((m) => {
4266
4267
  const y = m.fullTrace.filter((b) => d.has(b.fullType)).map((b) => b.label), F = n.separator ?? " / ";
4267
4268
  return {
@@ -4273,35 +4274,35 @@
4273
4274
  if (a.length !== 0) throw new Error("Assertion error.");
4274
4275
  return c2(new Set(Q));
4275
4276
  }
4276
- let f = 0, v = 0;
4277
+ let f = 0, w2 = 0;
4277
4278
  for (; f < o.length; ) {
4278
4279
  const d = /* @__PURE__ */ new Set();
4280
+ n.includeNativeLabel && d.add(Q);
4279
4281
  for (let y = 0; y < f; ++y) d.add(o[y]);
4280
- d.add(o[v]);
4282
+ d.add(o[w2]);
4281
4283
  const m = c2(d);
4282
- if (new Set(m.map((y) => y.label)).size === e.length)
4283
- return n.includeNativeLabel ? (d.add(Q), c2(d)) : m;
4284
- v++, v == o.length && (f++, v = f);
4284
+ if (new Set(m.map((y) => y.label)).size === t.length) return m;
4285
+ w2++, w2 == o.length && (f++, w2 = f);
4285
4286
  }
4286
4287
  return c2(/* @__PURE__ */ new Set([...o, ...a]));
4287
4288
  }
4288
- class Ot {
4289
+ class Oe {
4289
4290
  constructor() {
4290
- _(this, "ctx", u());
4291
- _(this, "defaultLabelFn", (t, n) => {
4291
+ v(this, "ctx", u());
4292
+ v(this, "defaultLabelFn", (e, n) => {
4292
4293
  var r2;
4293
- return ((r2 = t.annotations) == null ? void 0 : r2["pl7.app/label"]) ?? "Unlabelled";
4294
+ return ((r2 = e.annotations) == null ? void 0 : r2["pl7.app/label"]) ?? "Unlabelled";
4294
4295
  });
4295
4296
  }
4296
4297
  /**
4297
4298
  * @deprecated use getOptions()
4298
4299
  */
4299
- calculateOptions(t) {
4300
- return this.ctx.calculateOptions(t);
4300
+ calculateOptions(e) {
4301
+ return this.ctx.calculateOptions(e);
4301
4302
  }
4302
- getOptions(t, n) {
4303
- const r2 = this.getSpecs().entries.filter((s) => t(s.obj));
4304
- return typeof n == "object" || typeof n > "u" ? Ft(r2, (s) => s.obj, n ?? {}).map(
4303
+ getOptions(e, n) {
4304
+ const r2 = this.getSpecs().entries.filter((s) => e(s.obj));
4305
+ return typeof n == "object" || typeof n > "u" ? Fe(r2, (s) => s.obj, n ?? {}).map(
4305
4306
  ({ value: { ref: s }, label: i2 }) => ({
4306
4307
  ref: s,
4307
4308
  label: i2
@@ -4318,14 +4319,14 @@
4318
4319
  return this.getData();
4319
4320
  }
4320
4321
  getData() {
4321
- const t = this.ctx.getDataFromResultPool();
4322
+ const e = this.ctx.getDataFromResultPool();
4322
4323
  return {
4323
- isComplete: t.isComplete,
4324
- entries: t.entries.map((n) => ({
4324
+ isComplete: e.isComplete,
4325
+ entries: e.entries.map((n) => ({
4325
4326
  ref: n.ref,
4326
4327
  obj: {
4327
4328
  ...n.obj,
4328
- data: new w(n.obj.data)
4329
+ data: new S(n.obj.data)
4329
4330
  }
4330
4331
  }))
4331
4332
  };
@@ -4337,14 +4338,14 @@
4337
4338
  return this.getDataWithErrors();
4338
4339
  }
4339
4340
  getDataWithErrors() {
4340
- const t = this.ctx.getDataWithErrorsFromResultPool();
4341
+ const e = this.ctx.getDataWithErrorsFromResultPool();
4341
4342
  return {
4342
- isComplete: t.isComplete,
4343
- entries: t.entries.map((n) => ({
4343
+ isComplete: e.isComplete,
4344
+ entries: e.entries.map((n) => ({
4344
4345
  ref: n.ref,
4345
4346
  obj: {
4346
4347
  ...n.obj,
4347
- data: O$1(n.obj.data, (r2) => new w(r2))
4348
+ data: W(n.obj.data, (r2) => new S(r2))
4348
4349
  }
4349
4350
  }))
4350
4351
  };
@@ -4362,13 +4363,13 @@
4362
4363
  * @param ref a Ref
4363
4364
  * @returns data associated with the ref
4364
4365
  */
4365
- getDataByRef(t) {
4366
+ getDataByRef(e) {
4366
4367
  var n;
4367
4368
  return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (n = this.getData().entries.find(
4368
- (r2) => r2.ref.blockId === t.blockId && r2.ref.name === t.name
4369
- )) == null ? void 0 : n.obj : L(
4370
- this.ctx.getDataFromResultPoolByRef(t.blockId, t.name),
4371
- (r2) => new w(r2)
4369
+ (r2) => r2.ref.blockId === e.blockId && r2.ref.name === e.name
4370
+ )) == null ? void 0 : n.obj : J(
4371
+ this.ctx.getDataFromResultPoolByRef(e.blockId, e.name),
4372
+ (r2) => new S(r2)
4372
4373
  );
4373
4374
  }
4374
4375
  /**
@@ -4376,37 +4377,37 @@
4376
4377
  * @param ref a Ref
4377
4378
  * @returns p-column associated with the ref
4378
4379
  */
4379
- getPColumnByRef(t) {
4380
- const n = this.getDataByRef(t);
4380
+ getPColumnByRef(e) {
4381
+ const n = this.getDataByRef(e);
4381
4382
  if (n)
4382
- return B(n);
4383
+ return O$1(n);
4383
4384
  }
4384
4385
  /**
4385
4386
  * @param ref a Ref
4386
4387
  * @returns object spec associated with the ref
4387
4388
  */
4388
- getSpecByRef(t) {
4389
+ getSpecByRef(e) {
4389
4390
  var n;
4390
4391
  return typeof this.ctx.getSpecFromResultPoolByRef > "u" ? (n = this.getSpecs().entries.find(
4391
- (r2) => r2.ref.blockId === t.blockId && r2.ref.name === t.name
4392
- )) == null ? void 0 : n.obj : this.ctx.getSpecFromResultPoolByRef(t.blockId, t.name);
4392
+ (r2) => r2.ref.blockId === e.blockId && r2.ref.name === e.name
4393
+ )) == null ? void 0 : n.obj : this.ctx.getSpecFromResultPoolByRef(e.blockId, e.name);
4393
4394
  }
4394
4395
  /**
4395
4396
  * @param spec object specification
4396
4397
  * @returns array of data objects with compatible specs
4397
4398
  * @deprecated delete this method after Jan 1, 2025
4398
4399
  */
4399
- findDataWithCompatibleSpec(t) {
4400
+ findDataWithCompatibleSpec(e) {
4400
4401
  const n = [];
4401
- t: for (const r$1 of this.getData().entries) {
4402
+ e: for (const r$1 of this.getData().entries) {
4402
4403
  if (!r(r$1.obj.spec))
4403
4404
  continue;
4404
4405
  const s = r$1.obj.spec;
4405
- if (t.name === s.name && t.valueType === s.valueType && t.axesSpec.length === s.axesSpec.length && K(t.domain, s.domain)) {
4406
- for (let i2 = 0; i2 < t.axesSpec.length; ++i2) {
4407
- const o = t.axesSpec[i2], a = s.axesSpec[i2];
4406
+ if (e.name === s.name && e.valueType === s.valueType && e.axesSpec.length === s.axesSpec.length && K(e.domain, s.domain)) {
4407
+ for (let i2 = 0; i2 < e.axesSpec.length; ++i2) {
4408
+ const o = e.axesSpec[i2], a = s.axesSpec[i2];
4408
4409
  if (o.name !== a.name || o.type !== a.type || !K(o.domain, a.domain))
4409
- continue t;
4410
+ continue e;
4410
4411
  }
4411
4412
  n.push(r$1.obj);
4412
4413
  }
@@ -4414,27 +4415,27 @@
4414
4415
  return n;
4415
4416
  }
4416
4417
  }
4417
- function K(e, t) {
4418
- if (e === void 0) return t === void 0;
4419
- if (t === void 0) return true;
4420
- for (const n in t)
4421
- if (e[n] !== t[n]) return false;
4418
+ function K(t, e) {
4419
+ if (t === void 0) return e === void 0;
4420
+ if (e === void 0) return true;
4421
+ for (const n in e)
4422
+ if (t[n] !== e[n]) return false;
4422
4423
  return true;
4423
4424
  }
4424
4425
  class D {
4425
4426
  constructor() {
4426
- _(this, "ctx");
4427
- _(this, "args");
4428
- _(this, "uiState");
4429
- _(this, "resultPool", new Ot());
4427
+ v(this, "ctx");
4428
+ v(this, "args");
4429
+ v(this, "uiState");
4430
+ v(this, "resultPool", new Oe());
4430
4431
  this.ctx = u(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : void 0;
4431
4432
  }
4432
- getNamedAccessor(t) {
4433
- const n = this.ctx.getAccessorHandleByName(t);
4434
- return n ? new w(n) : void 0;
4433
+ getNamedAccessor(e) {
4434
+ const n = this.ctx.getAccessorHandleByName(e);
4435
+ return n ? new S(n) : void 0;
4435
4436
  }
4436
4437
  get prerun() {
4437
- return this.getNamedAccessor(st);
4438
+ return this.getNamedAccessor(se);
4438
4439
  }
4439
4440
  /**
4440
4441
  * @deprecated use prerun
@@ -4449,7 +4450,7 @@
4449
4450
  return this.precalc;
4450
4451
  }
4451
4452
  get outputs() {
4452
- return this.getNamedAccessor(it);
4453
+ return this.getNamedAccessor(ie);
4453
4454
  }
4454
4455
  /**
4455
4456
  * @deprecated use outputs
@@ -4461,12 +4462,12 @@
4461
4462
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
4462
4463
  * @returns a map of axis value => label
4463
4464
  */
4464
- findLabels(t) {
4465
+ findLabels(e) {
4465
4466
  const n = this.resultPool.getData();
4466
4467
  for (const r2 of n.entries) {
4467
- if (!x(r2.obj)) continue;
4468
+ if (!w(r2.obj)) continue;
4468
4469
  const s = r2.obj.spec;
4469
- if (s.name === "pl7.app/label" && s.axesSpec.length === 1 && s.axesSpec[0].name === t.name && s.axesSpec[0].type === t.type && K(t.domain, s.axesSpec[0].domain)) {
4470
+ if (s.name === "pl7.app/label" && s.axesSpec.length === 1 && s.axesSpec[0].name === e.name && s.axesSpec[0].type === e.type && K(e.domain, s.axesSpec[0].domain)) {
4470
4471
  if (r2.obj.data.resourceType.name !== "PColumnData/Json")
4471
4472
  throw Error(`Expected JSON column for labels, got: ${r2.obj.data.resourceType.name}`);
4472
4473
  return new Map(
@@ -4477,44 +4478,44 @@
4477
4478
  }
4478
4479
  }
4479
4480
  }
4480
- createPFrame(t) {
4481
- return this.ctx.createPFrame(t.map((n) => L(n, (r2) => r2.handle)));
4481
+ createPFrame(e) {
4482
+ return this.ctx.createPFrame(e.map((n) => J(n, (r2) => r2.handle)));
4482
4483
  }
4483
- createPTable(t) {
4484
+ createPTable(e) {
4484
4485
  var n;
4485
- return "columns" in t ? n = {
4486
+ return "columns" in e ? n = {
4486
4487
  src: {
4487
4488
  type: "full",
4488
- entries: t.columns.map((r2) => ({ type: "column", column: r2 }))
4489
+ entries: e.columns.map((r2) => ({ type: "column", column: r2 }))
4489
4490
  },
4490
- filters: t.filters ?? [],
4491
- sorting: t.sorting ?? []
4492
- } : n = t, this.ctx.createPTable(D$1(n, (r2) => L(r2, (s) => s.handle)));
4491
+ filters: e.filters ?? [],
4492
+ sorting: e.sorting ?? []
4493
+ } : n = e, this.ctx.createPTable(D$1(n, (r2) => J(r2, (s) => s.handle)));
4493
4494
  }
4494
4495
  /** @deprecated scheduled for removal from SDK */
4495
- getBlockLabel(t) {
4496
- return this.ctx.getBlockLabel(t);
4496
+ getBlockLabel(e) {
4497
+ return this.ctx.getBlockLabel(e);
4497
4498
  }
4498
4499
  getCurrentUnstableMarker() {
4499
4500
  if (!(typeof this.ctx.getCurrentUnstableMarker > "u"))
4500
4501
  return this.ctx.getCurrentUnstableMarker();
4501
4502
  }
4502
4503
  }
4503
- const C = "1.13.0";
4504
- function kt(e) {
4505
- return e.__renderLambda === true;
4504
+ const C = "1.13.5";
4505
+ function ke(t) {
4506
+ return t.__renderLambda === true;
4506
4507
  }
4507
- function U(e) {
4508
- if (e !== void 0)
4509
- return kt(e) ? e.handle : e;
4508
+ function U(t) {
4509
+ if (t !== void 0)
4510
+ return ke(t) ? t.handle : t;
4510
4511
  }
4511
4512
  class h {
4512
- constructor(t, n, r2, s, i2, o, a) {
4513
- this._renderingMode = t, this._initialArgs = n, this._initialUiState = r2, this._outputs = s, this._inputsValid = i2, this._sections = o, this._title = a;
4513
+ constructor(e, n, r2, s, i2, o, a) {
4514
+ this._renderingMode = e, this._initialArgs = n, this._initialUiState = r2, this._outputs = s, this._inputsValid = i2, this._sections = o, this._title = a;
4514
4515
  }
4515
- static create(t = "Heavy") {
4516
+ static create(e = "Heavy") {
4516
4517
  return new h(
4517
- t,
4518
+ e,
4518
4519
  void 0,
4519
4520
  {},
4520
4521
  {},
@@ -4523,16 +4524,16 @@
4523
4524
  void 0
4524
4525
  );
4525
4526
  }
4526
- output(t, n, r2 = {}) {
4527
+ output(e, n, r2 = {}) {
4527
4528
  if (typeof n == "function") {
4528
- const s = `output#${t}`;
4529
+ const s = `output#${e}`;
4529
4530
  return O(s, () => n(new D())), new h(
4530
4531
  this._renderingMode,
4531
4532
  this._initialArgs,
4532
4533
  this._initialUiState,
4533
4534
  {
4534
4535
  ...this._outputs,
4535
- [t]: {
4536
+ [e]: {
4536
4537
  __renderLambda: true,
4537
4538
  handle: s,
4538
4539
  ...r2
@@ -4549,7 +4550,7 @@
4549
4550
  this._initialUiState,
4550
4551
  {
4551
4552
  ...this._outputs,
4552
- [t]: n
4553
+ [e]: n
4553
4554
  },
4554
4555
  this._inputsValid,
4555
4556
  this._sections,
@@ -4557,15 +4558,15 @@
4557
4558
  );
4558
4559
  }
4559
4560
  /** Shortcut for {@link output} with retentive flag set to true. */
4560
- retentiveOutput(t, n) {
4561
- return this.output(t, n, { retentive: true });
4561
+ retentiveOutput(e, n) {
4562
+ return this.output(e, n, { retentive: true });
4562
4563
  }
4563
4564
  /** @deprecated */
4564
- canRun(t) {
4565
- return this.inputsValid(t);
4565
+ canRun(e) {
4566
+ return this.inputsValid(e);
4566
4567
  }
4567
- argsValid(t) {
4568
- return typeof t == "function" ? (O("inputsValid", () => t(new D())), new h(
4568
+ argsValid(e) {
4569
+ return typeof e == "function" ? (O("inputsValid", () => e(new D())), new h(
4569
4570
  this._renderingMode,
4570
4571
  this._initialArgs,
4571
4572
  this._initialUiState,
@@ -4581,16 +4582,16 @@
4581
4582
  this._initialArgs,
4582
4583
  this._initialUiState,
4583
4584
  this._outputs,
4584
- t,
4585
+ e,
4585
4586
  this._sections,
4586
4587
  this._title
4587
4588
  );
4588
4589
  }
4589
- inputsValid(t) {
4590
- return this.argsValid(t);
4590
+ inputsValid(e) {
4591
+ return this.argsValid(e);
4591
4592
  }
4592
- sections(t) {
4593
- return Array.isArray(t) ? this.sections(k(t)) : typeof t == "function" ? (O("sections", () => t(new D())), new h(
4593
+ sections(e) {
4594
+ return Array.isArray(e) ? this.sections(k(e)) : typeof e == "function" ? (O("sections", () => e(new D())), new h(
4594
4595
  this._renderingMode,
4595
4596
  this._initialArgs,
4596
4597
  this._initialUiState,
@@ -4604,12 +4605,12 @@
4604
4605
  this._initialUiState,
4605
4606
  this._outputs,
4606
4607
  this._inputsValid,
4607
- t,
4608
+ e,
4608
4609
  this._title
4609
4610
  );
4610
4611
  }
4611
- title(t) {
4612
- return O("title", () => t(new D())), new h(
4612
+ title(e) {
4613
+ return O("title", () => e(new D())), new h(
4613
4614
  this._renderingMode,
4614
4615
  this._initialArgs,
4615
4616
  this._initialUiState,
@@ -4623,10 +4624,10 @@
4623
4624
  * Sets initial args for the block, this value must be specified.
4624
4625
  * @deprecated use {@link withArgs}
4625
4626
  * */
4626
- initialArgs(t) {
4627
+ initialArgs(e) {
4627
4628
  return new h(
4628
4629
  this._renderingMode,
4629
- t,
4630
+ e,
4630
4631
  this._initialUiState,
4631
4632
  this._outputs,
4632
4633
  this._inputsValid,
@@ -4635,10 +4636,10 @@
4635
4636
  );
4636
4637
  }
4637
4638
  /** Sets initial args for the block, this value must be specified. */
4638
- withArgs(t) {
4639
+ withArgs(e) {
4639
4640
  return new h(
4640
4641
  this._renderingMode,
4641
- t,
4642
+ e,
4642
4643
  this._initialUiState,
4643
4644
  this._outputs,
4644
4645
  this._inputsValid,
@@ -4647,11 +4648,11 @@
4647
4648
  );
4648
4649
  }
4649
4650
  /** Defines type and sets initial value for block UiState. */
4650
- withUiState(t) {
4651
+ withUiState(e) {
4651
4652
  return new h(
4652
4653
  this._renderingMode,
4653
4654
  this._initialArgs,
4654
- t,
4655
+ e,
4655
4656
  this._outputs,
4656
4657
  this._inputsValid,
4657
4658
  this._sections,
@@ -4663,7 +4664,7 @@
4663
4664
  * other features provided by the platforma to the block. */
4664
4665
  done() {
4665
4666
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
4666
- const t = {
4667
+ const e = {
4667
4668
  v3: {
4668
4669
  sdkVersion: C,
4669
4670
  renderingMode: this._renderingMode,
@@ -4684,7 +4685,7 @@
4684
4685
  Object.entries(this._outputs).map(([n, r2]) => [n, U(r2)])
4685
4686
  )
4686
4687
  };
4687
- return _t() ? rt({ sdkVersion: C }) : { config: t };
4688
+ return _e() ? re({ sdkVersion: C }) : { config: e };
4688
4689
  }
4689
4690
  }
4690
4691
  const $BlockArgs = z.object({
@@ -4697,30 +4698,30 @@
4697
4698
  const collection = ctx.resultPool.getData();
4698
4699
  if (collection === void 0 || !collection.isComplete) return void 0;
4699
4700
  const valueTypes = ["Int", "Long", "Float", "Double", "String", "Bytes"];
4700
- const columns = collection.entries.map(({ obj }) => obj).filter(x).filter((column) => valueTypes.find((valueType) => valueType === column.spec.valueType));
4701
+ const columns = collection.entries.map(({ obj }) => obj).filter(w).filter((column) => valueTypes.find((valueType) => valueType === column.spec.valueType));
4701
4702
  try {
4702
4703
  return ctx.createPFrame(columns);
4703
4704
  } catch (err) {
4704
4705
  return void 0;
4705
4706
  }
4706
4707
  }).output("pTable", (ctx) => {
4707
- var _a, _b, _c, _d, _e, _f, _g;
4708
+ var _a, _b, _c, _d, _e2, _f, _g;
4708
4709
  const join = (_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.join;
4709
4710
  if (!join) return void 0;
4710
4711
  const collection = ctx.resultPool.getData();
4711
4712
  if (!collection || !collection.isComplete) return void 0;
4712
- const columns = collection.entries.map(({ obj }) => obj).filter(x);
4713
+ const columns = collection.entries.map(({ obj }) => obj).filter(w);
4713
4714
  if (columns.length === 0) return void 0;
4714
4715
  let columnMissing = false;
4715
4716
  const src = i(join, (idAndSpec) => {
4716
- const column = columns.find((it2) => it2.id === idAndSpec.columnId);
4717
+ const column = columns.find((it) => it.id === idAndSpec.columnId);
4717
4718
  if (!column) columnMissing = true;
4718
4719
  return column;
4719
4720
  });
4720
4721
  if (columnMissing) return void 0;
4721
4722
  return ctx.createPTable({
4722
4723
  src,
4723
- filters: ((_e = (_d = ctx.uiState.dataTableState) == null ? void 0 : _d.tableState.pTableParams) == null ? void 0 : _e.filters) ?? [],
4724
+ filters: ((_e2 = (_d = ctx.uiState.dataTableState) == null ? void 0 : _d.tableState.pTableParams) == null ? void 0 : _e2.filters) ?? [],
4724
4725
  sorting: ((_g = (_f = ctx.uiState.dataTableState) == null ? void 0 : _f.tableState.pTableParams) == null ? void 0 : _g.sorting) ?? []
4725
4726
  });
4726
4727
  }).sections((ctx) => {