@milaboratories/milaboratories.ui-examples.model 1.0.38 → 1.0.39

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
@@ -368,7 +368,7 @@
368
368
  };
369
369
  }
370
370
  let errorMessage = "";
371
- const maps = errorMaps.filter((m2) => !!m2).slice().reverse();
371
+ const maps = errorMaps.filter((m) => !!m).slice().reverse();
372
372
  for (const map of maps) {
373
373
  errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
374
374
  }
@@ -2659,17 +2659,17 @@
2659
2659
  });
2660
2660
  }
2661
2661
  }
2662
- function mergeValues(a, b2) {
2662
+ function mergeValues(a, b) {
2663
2663
  const aType = getParsedType(a);
2664
- const bType = getParsedType(b2);
2665
- if (a === b2) {
2664
+ const bType = getParsedType(b);
2665
+ if (a === b) {
2666
2666
  return { valid: true, data: a };
2667
2667
  } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
2668
- const bKeys = util.objectKeys(b2);
2668
+ const bKeys = util.objectKeys(b);
2669
2669
  const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
2670
- const newObj = { ...a, ...b2 };
2670
+ const newObj = { ...a, ...b };
2671
2671
  for (const key of sharedKeys) {
2672
- const sharedValue = mergeValues(a[key], b2[key]);
2672
+ const sharedValue = mergeValues(a[key], b[key]);
2673
2673
  if (!sharedValue.valid) {
2674
2674
  return { valid: false };
2675
2675
  }
@@ -2677,13 +2677,13 @@
2677
2677
  }
2678
2678
  return { valid: true, data: newObj };
2679
2679
  } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
2680
- if (a.length !== b2.length) {
2680
+ if (a.length !== b.length) {
2681
2681
  return { valid: false };
2682
2682
  }
2683
2683
  const newArray = [];
2684
2684
  for (let index = 0; index < a.length; index++) {
2685
2685
  const itemA = a[index];
2686
- const itemB = b2[index];
2686
+ const itemB = b[index];
2687
2687
  const sharedValue = mergeValues(itemA, itemB);
2688
2688
  if (!sharedValue.valid) {
2689
2689
  return { valid: false };
@@ -2691,7 +2691,7 @@
2691
2691
  newArray.push(sharedValue.data);
2692
2692
  }
2693
2693
  return { valid: true, data: newArray };
2694
- } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b2) {
2694
+ } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
2695
2695
  return { valid: true, data: a };
2696
2696
  } else {
2697
2697
  return { valid: false };
@@ -3662,10 +3662,10 @@
3662
3662
  }
3663
3663
  }
3664
3664
  }
3665
- static create(a, b2) {
3665
+ static create(a, b) {
3666
3666
  return new ZodPipeline({
3667
3667
  in: a,
3668
- out: b2,
3668
+ out: b,
3669
3669
  typeName: ZodFirstPartyTypeKind.ZodPipeline
3670
3670
  });
3671
3671
  }
@@ -3697,10 +3697,10 @@
3697
3697
  return ZodAny.create().superRefine((data, ctx) => {
3698
3698
  var _a, _b;
3699
3699
  if (!check(data)) {
3700
- const p2 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
3701
- const _fatal = (_b = (_a = p2.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
3702
- const p22 = typeof p2 === "string" ? { message: p2 } : p2;
3703
- ctx.addIssue({ code: "custom", ...p22, fatal: _fatal });
3700
+ const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
3701
+ const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
3702
+ const p2 = typeof p === "string" ? { message: p } : p;
3703
+ ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
3704
3704
  }
3705
3705
  });
3706
3706
  return ZodAny.create();
@@ -3955,66 +3955,66 @@
3955
3955
  function r(n) {
3956
3956
  return n.kind === "PColumn";
3957
3957
  }
3958
- function x$1(n) {
3958
+ function x(n) {
3959
3959
  return r(n.spec);
3960
3960
  }
3961
- function L$1(n, t) {
3961
+ function L(n, t) {
3962
3962
  return n === void 0 ? void 0 : {
3963
3963
  ...n,
3964
3964
  data: t(n.data)
3965
3965
  };
3966
3966
  }
3967
- function O(n, t) {
3967
+ function O$1(n, t) {
3968
3968
  return n.ok ? { ok: true, value: t(n.value) } : n;
3969
3969
  }
3970
- var M = Object.defineProperty;
3971
- var U = (e, t, n) => t in e ? M(e, t, { enumerable: true, configurable: true, writable: true, value: n }) : e[t] = n;
3972
- var f = (e, t, n) => U(e, typeof t != "symbol" ? t + "" : t, n);
3973
- function C(e) {
3970
+ var et = Object.defineProperty;
3971
+ var nt = (e, t, n) => t in e ? et(e, t, { enumerable: true, configurable: true, writable: true, value: n }) : e[t] = n;
3972
+ var _ = (e, t, n) => nt(e, typeof t != "symbol" ? t + "" : t, n);
3973
+ function V(e) {
3974
3974
  return { type: "Immediate", value: e };
3975
3975
  }
3976
- function K() {
3976
+ function ut() {
3977
3977
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
3978
3978
  }
3979
- function x(e) {
3979
+ function q(e) {
3980
3980
  if (e && typeof globalThis.getPlatforma == "function")
3981
3981
  return globalThis.getPlatforma(e);
3982
3982
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
3983
3983
  throw new Error("Can't get platforma instance.");
3984
3984
  }
3985
- function W() {
3985
+ function ct() {
3986
3986
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
3987
3987
  }
3988
- function o() {
3988
+ function l() {
3989
3989
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
3990
3990
  throw new Error("Not in config rendering context");
3991
3991
  }
3992
- function _(e, t) {
3993
- const n = W();
3992
+ function P(e, t) {
3993
+ const n = ct();
3994
3994
  if (n === void 0) return false;
3995
3995
  if (e in n.callbackRegistry) throw new Error(`Callback with key ${e} already registered.`);
3996
3996
  return n.callbackRegistry[e] = t, true;
3997
3997
  }
3998
- const F = /* @__PURE__ */ new Map();
3999
- function q(e, t) {
4000
- e in o().callbackRegistry || (o().callbackRegistry[e] = (n) => {
4001
- for (const i2 of F.get(e))
3998
+ const E = /* @__PURE__ */ new Map();
3999
+ function dt(e, t) {
4000
+ e in l().callbackRegistry || (l().callbackRegistry[e] = (n) => {
4001
+ for (const i2 of E.get(e))
4002
4002
  i2(n);
4003
- }, F.set(e, [])), F.get(e).push(t);
4003
+ }, E.set(e, [])), E.get(e).push(t);
4004
4004
  }
4005
- class h {
4005
+ class g {
4006
4006
  constructor(t, n = (i2) => i2) {
4007
- f(this, "isResolved", false);
4008
- f(this, "resolvedValue");
4009
- this.handle = t, this.postProcess = n, q(t, (i2) => {
4007
+ _(this, "isResolved", false);
4008
+ _(this, "resolvedValue");
4009
+ this.handle = t, this.postProcess = n, dt(t, (i2) => {
4010
4010
  this.resolvedValue = n(i2), this.isResolved = true;
4011
4011
  });
4012
4012
  }
4013
4013
  map(t) {
4014
- return new h(this.handle, (n) => t(this.postProcess(n)));
4014
+ return new g(this.handle, (n) => t(this.postProcess(n)));
4015
4015
  }
4016
4016
  mapDefined(t) {
4017
- return new h(this.handle, (n) => {
4017
+ return new g(this.handle, (n) => {
4018
4018
  const i2 = this.postProcess(n);
4019
4019
  return i2 ? t(i2) : void 0;
4020
4020
  });
@@ -4023,10 +4023,10 @@
4023
4023
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4024
4024
  }
4025
4025
  }
4026
- function V(e) {
4027
- return e === void 0 ? void 0 : new m(e);
4026
+ function G(e) {
4027
+ return e === void 0 ? void 0 : new v(e);
4028
4028
  }
4029
- class m {
4029
+ class v {
4030
4030
  constructor(t) {
4031
4031
  this.handle = t;
4032
4032
  }
@@ -4061,40 +4061,40 @@
4061
4061
  return this.resolveWithCommon({}, ...t);
4062
4062
  }
4063
4063
  resolveWithCommon(t, ...n) {
4064
- return V(o().resolveWithCommon(this.handle, t, ...n));
4064
+ return G(l().resolveWithCommon(this.handle, t, ...n));
4065
4065
  }
4066
4066
  get resourceType() {
4067
- return o().getResourceType(this.handle);
4067
+ return l().getResourceType(this.handle);
4068
4068
  }
4069
4069
  getInputsLocked() {
4070
- return o().getInputsLocked(this.handle);
4070
+ return l().getInputsLocked(this.handle);
4071
4071
  }
4072
4072
  getOutputsLocked() {
4073
- return o().getOutputsLocked(this.handle);
4073
+ return l().getOutputsLocked(this.handle);
4074
4074
  }
4075
4075
  getIsReadyOrError() {
4076
- return o().getIsReadyOrError(this.handle);
4076
+ return l().getIsReadyOrError(this.handle);
4077
4077
  }
4078
4078
  getIsFinal() {
4079
- return o().getIsFinal(this.handle);
4079
+ return l().getIsFinal(this.handle);
4080
4080
  }
4081
4081
  getError() {
4082
- return V(o().getError(this.handle));
4082
+ return G(l().getError(this.handle));
4083
4083
  }
4084
4084
  listInputFields() {
4085
- return o().listInputFields(this.handle);
4085
+ return l().listInputFields(this.handle);
4086
4086
  }
4087
4087
  listOutputFields() {
4088
- return o().listOutputFields(this.handle);
4088
+ return l().listOutputFields(this.handle);
4089
4089
  }
4090
4090
  listDynamicFields() {
4091
- return o().listDynamicFields(this.handle);
4091
+ return l().listDynamicFields(this.handle);
4092
4092
  }
4093
4093
  getKeyValueBase64(t) {
4094
- return o().getKeyValueBase64(this.handle, t);
4094
+ return l().getKeyValueBase64(this.handle, t);
4095
4095
  }
4096
4096
  getKeyValueAsString(t) {
4097
- return o().getKeyValueAsString(this.handle, t);
4097
+ return l().getKeyValueAsString(this.handle, t);
4098
4098
  }
4099
4099
  getKeyValueAsJson(t) {
4100
4100
  const n = this.getKeyValueAsString(t);
@@ -4102,10 +4102,10 @@
4102
4102
  return JSON.parse(n);
4103
4103
  }
4104
4104
  getDataBase64() {
4105
- return o().getDataBase64(this.handle);
4105
+ return l().getDataBase64(this.handle);
4106
4106
  }
4107
4107
  getDataAsString() {
4108
- return o().getDataAsString(this.handle);
4108
+ return l().getDataAsString(this.handle);
4109
4109
  }
4110
4110
  getDataAsJson() {
4111
4111
  const t = this.getDataAsString();
@@ -4118,7 +4118,7 @@
4118
4118
  getPColumns(t = false, n = "") {
4119
4119
  const i2 = this.parsePObjectCollection(t, n);
4120
4120
  return i2 === void 0 ? void 0 : Object.entries(i2).map(([, s]) => {
4121
- if (!x$1(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
4121
+ if (!x(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
4122
4122
  return s;
4123
4123
  });
4124
4124
  }
@@ -4126,26 +4126,26 @@
4126
4126
  *
4127
4127
  */
4128
4128
  parsePObjectCollection(t = false, n = "") {
4129
- const i2 = o().parsePObjectCollection(
4129
+ const i2 = l().parsePObjectCollection(
4130
4130
  this.handle,
4131
4131
  t,
4132
4132
  n
4133
4133
  );
4134
4134
  if (i2 === void 0) return;
4135
4135
  const r2 = {};
4136
- for (const [s, u] of Object.entries(i2))
4137
- r2[s] = L$1(u, (a) => new m(a));
4136
+ for (const [s, o] of Object.entries(i2))
4137
+ r2[s] = L(o, (a) => new v(a));
4138
4138
  return r2;
4139
4139
  }
4140
4140
  getFileContentAsBase64() {
4141
- return new h(o().getBlobContentAsBase64(this.handle));
4141
+ return new g(l().getBlobContentAsBase64(this.handle));
4142
4142
  }
4143
4143
  getFileContentAsString() {
4144
- return new h(o().getBlobContentAsString(this.handle));
4144
+ return new g(l().getBlobContentAsString(this.handle));
4145
4145
  }
4146
4146
  getFileContentAsJson() {
4147
- return new h(
4148
- o().getBlobContentAsString(this.handle)
4147
+ return new g(
4148
+ l().getBlobContentAsString(this.handle)
4149
4149
  ).mapDefined((t) => JSON.parse(t));
4150
4150
  }
4151
4151
  /**
@@ -4164,7 +4164,7 @@
4164
4164
  * @returns downloaded file handle
4165
4165
  */
4166
4166
  getFileHandle() {
4167
- return new h(o().getDownloadedBlobContentHandle(this.handle));
4167
+ return new g(l().getDownloadedBlobContentHandle(this.handle));
4168
4168
  }
4169
4169
  /**
4170
4170
  * @deprecated use getFileHandle
@@ -4176,7 +4176,7 @@
4176
4176
  * @returns downloaded file handle
4177
4177
  */
4178
4178
  getRemoteFileHandle() {
4179
- return new h(o().getOnDemandBlobContentHandle(this.handle));
4179
+ return new g(l().getOnDemandBlobContentHandle(this.handle));
4180
4180
  }
4181
4181
  /**
4182
4182
  * @deprecated use getRemoteFileHandle
@@ -4185,16 +4185,16 @@
4185
4185
  return this.getRemoteFileHandle();
4186
4186
  }
4187
4187
  getImportProgress() {
4188
- return new h(o().getImportProgress(this.handle));
4188
+ return new g(l().getImportProgress(this.handle));
4189
4189
  }
4190
4190
  getLastLogs(t) {
4191
- return new h(o().getLastLogs(this.handle, t));
4191
+ return new g(l().getLastLogs(this.handle, t));
4192
4192
  }
4193
4193
  getProgressLog(t) {
4194
- return new h(o().getProgressLog(this.handle, t));
4194
+ return new g(l().getProgressLog(this.handle, t));
4195
4195
  }
4196
4196
  getLogHandle() {
4197
- return new h(o().getLogHandle(this.handle));
4197
+ return new g(l().getLogHandle(this.handle));
4198
4198
  }
4199
4199
  allFieldsResolved(t = "Input") {
4200
4200
  switch (t) {
@@ -4214,20 +4214,77 @@
4214
4214
  requireLocked: true,
4215
4215
  skipUnresolved: false,
4216
4216
  ...n
4217
- }, u = t;
4217
+ }, o = t;
4218
4218
  if (r2 && (i2 === "Input" && !this.getInputsLocked() || i2 === "Output" && !this.getOutputsLocked()))
4219
4219
  return;
4220
- let d = (i2 === "Input" ? this.listInputFields() : i2 === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4221
- (l) => [l, this.resolve({ field: l, assertFieldType: i2 })]
4220
+ let c2 = (i2 === "Input" ? this.listInputFields() : i2 === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4221
+ (u) => [u, this.resolve({ field: u, assertFieldType: i2 })]
4222
4222
  );
4223
- return s && (d = d.filter((l) => l[1] !== void 0)), d.map(([l, g]) => u(l, g));
4223
+ return s && (c2 = c2.filter((u) => u[1] !== void 0)), c2.map(([u, h]) => o(u, h));
4224
4224
  }
4225
4225
  }
4226
- const L = "staging", T = "main";
4227
- class Q {
4226
+ const Y = "staging", Q = "main";
4227
+ const ht = "pl7.app/label", ft = "pl7.app/trace", gt = z.object({
4228
+ type: z.string(),
4229
+ importance: z.number().optional(),
4230
+ id: z.string().optional(),
4231
+ label: z.string()
4232
+ }), mt = z.array(gt), yt = 1e-3, bt = "__LABEL__", H = "__LABEL__@1";
4233
+ function _t(e, t, n = {}) {
4234
+ const i2 = /* @__PURE__ */ new Map(), r2 = /* @__PURE__ */ new Map(), s = e.map((d) => {
4235
+ var N, $;
4236
+ const m = t(d), y = (N = m.annotations) == null ? void 0 : N[ht], R = ($ = m.annotations) == null ? void 0 : $[ft], b = (R ? mt.safeParse(JSON.parse(R)).data : void 0) ?? [];
4237
+ y && b.splice(0, 0, { label: y, type: bt, importance: -2 });
4238
+ const k = [], U = /* @__PURE__ */ new Map();
4239
+ for (let w = b.length - 1; w >= 0; --w) {
4240
+ const { type: x2 } = b[w], tt = b[w].importance ?? 0, j = (U.get(x2) ?? 0) + 1;
4241
+ U.set(x2, j);
4242
+ const C = `${x2}@${j}`;
4243
+ r2.set(C, (r2.get(C) ?? 0) + 1), i2.set(
4244
+ C,
4245
+ Math.max(
4246
+ i2.get(C) ?? Number.NEGATIVE_INFINITY,
4247
+ tt - (b.length - w) * yt
4248
+ )
4249
+ ), k.push({ ...b[w], fullType: C, occurenceIndex: j });
4250
+ }
4251
+ return k.reverse(), {
4252
+ value: d,
4253
+ spec: m,
4254
+ label: y,
4255
+ fullTrace: k
4256
+ };
4257
+ }), o = [], a = [], c2 = [...i2];
4258
+ c2.sort(([, d], [, m]) => m - d);
4259
+ for (const [d] of c2)
4260
+ d.endsWith("@1") || r2.get(d) === e.length ? o.push(d) : a.push(d);
4261
+ const u = (d) => s.map((m) => {
4262
+ const y = m.fullTrace.filter((b) => d.has(b.fullType)).map((b) => b.label), R = n.separator ?? " / ";
4263
+ return {
4264
+ label: y.join(R),
4265
+ value: m.value
4266
+ };
4267
+ });
4268
+ if (o.length === 0) {
4269
+ if (a.length !== 0) throw new Error("Assertion error.");
4270
+ return u(new Set(H));
4271
+ }
4272
+ let h = 0, T = 0;
4273
+ for (; h < o.length; ) {
4274
+ const d = /* @__PURE__ */ new Set();
4275
+ for (let y = 0; y < h; ++y) d.add(o[y]);
4276
+ d.add(o[T]);
4277
+ const m = u(d);
4278
+ if (new Set(m.map((y) => y.label)).size === e.length)
4279
+ return n.includeNativeLabel ? (d.add(H), u(d)) : m;
4280
+ T++, T == o.length && (h++, T = h);
4281
+ }
4282
+ return u(/* @__PURE__ */ new Set([...o, ...a]));
4283
+ }
4284
+ class vt {
4228
4285
  constructor() {
4229
- f(this, "ctx", o());
4230
- f(this, "defaultLabelFn", (t, n) => {
4286
+ _(this, "ctx", l());
4287
+ _(this, "defaultLabelFn", (t, n) => {
4231
4288
  var i2;
4232
4289
  return ((i2 = t.annotations) == null ? void 0 : i2["pl7.app/label"]) ?? "Unlabelled";
4233
4290
  });
@@ -4238,10 +4295,16 @@
4238
4295
  calculateOptions(t) {
4239
4296
  return this.ctx.calculateOptions(t);
4240
4297
  }
4241
- getOptions(t, n = this.defaultLabelFn) {
4242
- return this.getSpecs().entries.filter((i2) => t(i2.obj)).map((i2) => ({
4243
- ref: i2.ref,
4244
- label: n(i2.obj, i2.ref)
4298
+ getOptions(t, n) {
4299
+ const i2 = this.getSpecs().entries.filter((r2) => t(r2.obj));
4300
+ return typeof n == "object" || typeof n > "u" ? _t(i2, (r2) => r2.obj, n ?? {}).map(
4301
+ ({ value: { ref: r2 }, label: s }) => ({
4302
+ ref: r2,
4303
+ label: s
4304
+ })
4305
+ ) : i2.map((r2) => ({
4306
+ ref: r2.ref,
4307
+ label: n(r2.obj, r2.ref)
4245
4308
  }));
4246
4309
  }
4247
4310
  /**
@@ -4258,7 +4321,7 @@
4258
4321
  ref: n.ref,
4259
4322
  obj: {
4260
4323
  ...n.obj,
4261
- data: new m(n.obj.data)
4324
+ data: new v(n.obj.data)
4262
4325
  }
4263
4326
  }))
4264
4327
  };
@@ -4277,7 +4340,7 @@
4277
4340
  ref: n.ref,
4278
4341
  obj: {
4279
4342
  ...n.obj,
4280
- data: O(n.obj.data, (i2) => new m(i2))
4343
+ data: O$1(n.obj.data, (i2) => new v(i2))
4281
4344
  }
4282
4345
  }))
4283
4346
  };
@@ -4299,9 +4362,9 @@
4299
4362
  var n;
4300
4363
  return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (n = this.getData().entries.find(
4301
4364
  (i2) => i2.ref.blockId === t.blockId && i2.ref.name === t.name
4302
- )) == null ? void 0 : n.obj : L$1(
4365
+ )) == null ? void 0 : n.obj : L(
4303
4366
  this.ctx.getDataFromResultPoolByRef(t.blockId, t.name),
4304
- (i2) => new m(i2)
4367
+ (i2) => new v(i2)
4305
4368
  );
4306
4369
  }
4307
4370
  /**
@@ -4324,10 +4387,10 @@
4324
4387
  if (!r(i2.obj.spec))
4325
4388
  continue;
4326
4389
  const r$1 = i2.obj.spec;
4327
- if (t.name === r$1.name && t.valueType === r$1.valueType && t.axesSpec.length === r$1.axesSpec.length && P(t.domain, r$1.domain)) {
4390
+ if (t.name === r$1.name && t.valueType === r$1.valueType && t.axesSpec.length === r$1.axesSpec.length && W(t.domain, r$1.domain)) {
4328
4391
  for (let s = 0; s < t.axesSpec.length; ++s) {
4329
- const u = t.axesSpec[s], a = r$1.axesSpec[s];
4330
- if (u.name !== a.name || u.type !== a.type || !P(u.domain, a.domain))
4392
+ const o = t.axesSpec[s], a = r$1.axesSpec[s];
4393
+ if (o.name !== a.name || o.type !== a.type || !W(o.domain, a.domain))
4331
4394
  continue t;
4332
4395
  }
4333
4396
  n.push(i2.obj);
@@ -4336,27 +4399,27 @@
4336
4399
  return n;
4337
4400
  }
4338
4401
  }
4339
- function P(e, t) {
4402
+ function W(e, t) {
4340
4403
  if (e === void 0) return t === void 0;
4341
4404
  if (t === void 0) return true;
4342
4405
  for (const n in t)
4343
4406
  if (e[n] !== t[n]) return false;
4344
4407
  return true;
4345
4408
  }
4346
- class w {
4409
+ class O {
4347
4410
  constructor() {
4348
- f(this, "ctx");
4349
- f(this, "args");
4350
- f(this, "uiState");
4351
- f(this, "resultPool", new Q());
4352
- this.ctx = o(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : void 0;
4411
+ _(this, "ctx");
4412
+ _(this, "args");
4413
+ _(this, "uiState");
4414
+ _(this, "resultPool", new vt());
4415
+ this.ctx = l(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : void 0;
4353
4416
  }
4354
4417
  getNamedAccessor(t) {
4355
4418
  const n = this.ctx.getAccessorHandleByName(t);
4356
- return n ? new m(n) : void 0;
4419
+ return n ? new v(n) : void 0;
4357
4420
  }
4358
4421
  get prerun() {
4359
- return this.getNamedAccessor(L);
4422
+ return this.getNamedAccessor(Y);
4360
4423
  }
4361
4424
  /**
4362
4425
  * @deprecated use prerun
@@ -4371,7 +4434,7 @@
4371
4434
  return this.precalc;
4372
4435
  }
4373
4436
  get outputs() {
4374
- return this.getNamedAccessor(T);
4437
+ return this.getNamedAccessor(Q);
4375
4438
  }
4376
4439
  /**
4377
4440
  * @deprecated use outputs
@@ -4380,7 +4443,7 @@
4380
4443
  return this.outputs;
4381
4444
  }
4382
4445
  createPFrame(t) {
4383
- return this.ctx.createPFrame(t.map((n) => L$1(n, (i2) => i2.handle)));
4446
+ return this.ctx.createPFrame(t.map((n) => L(n, (i2) => i2.handle)));
4384
4447
  }
4385
4448
  createPTable(t) {
4386
4449
  var n;
@@ -4391,7 +4454,7 @@
4391
4454
  },
4392
4455
  filters: t.filters ?? [],
4393
4456
  sorting: t.sorting ?? []
4394
- } : n = t, this.ctx.createPTable(D(n, (i2) => L$1(i2, (r2) => r2.handle)));
4457
+ } : n = t, this.ctx.createPTable(D(n, (i2) => L(i2, (r2) => r2.handle)));
4395
4458
  }
4396
4459
  /** @deprecated scheduled for removal from SDK */
4397
4460
  getBlockLabel(t) {
@@ -4402,33 +4465,33 @@
4402
4465
  return this.ctx.getCurrentUnstableMarker();
4403
4466
  }
4404
4467
  }
4405
- const b = "1.10.12";
4406
- function Z(e) {
4468
+ const F = "1.12.0";
4469
+ function At(e) {
4407
4470
  return e.__renderLambda === true;
4408
4471
  }
4409
- function I(e) {
4472
+ function M(e) {
4410
4473
  if (e !== void 0)
4411
- return Z(e) ? e.handle : e;
4474
+ return At(e) ? e.handle : e;
4412
4475
  }
4413
- class p {
4414
- constructor(t, n, i2, r2, s, u, a) {
4415
- this._renderingMode = t, this._initialArgs = n, this._initialUiState = i2, this._outputs = r2, this._inputsValid = s, this._sections = u, this._title = a;
4476
+ class f {
4477
+ constructor(t, n, i2, r2, s, o, a) {
4478
+ this._renderingMode = t, this._initialArgs = n, this._initialUiState = i2, this._outputs = r2, this._inputsValid = s, this._sections = o, this._title = a;
4416
4479
  }
4417
4480
  static create(t = "Heavy") {
4418
- return new p(
4481
+ return new f(
4419
4482
  t,
4420
4483
  void 0,
4421
4484
  {},
4422
4485
  {},
4423
- C(true),
4424
- C([]),
4486
+ V(true),
4487
+ V([]),
4425
4488
  void 0
4426
4489
  );
4427
4490
  }
4428
4491
  output(t, n, i2 = {}) {
4429
4492
  if (typeof n == "function") {
4430
4493
  const r2 = `output#${t}`;
4431
- return _(r2, () => n(new w())), new p(
4494
+ return P(r2, () => n(new O())), new f(
4432
4495
  this._renderingMode,
4433
4496
  this._initialArgs,
4434
4497
  this._initialUiState,
@@ -4445,7 +4508,7 @@
4445
4508
  this._title
4446
4509
  );
4447
4510
  } else
4448
- return new p(
4511
+ return new f(
4449
4512
  this._renderingMode,
4450
4513
  this._initialArgs,
4451
4514
  this._initialUiState,
@@ -4467,7 +4530,7 @@
4467
4530
  return this.inputsValid(t);
4468
4531
  }
4469
4532
  argsValid(t) {
4470
- return typeof t == "function" ? (_("inputsValid", () => t(new w())), new p(
4533
+ return typeof t == "function" ? (P("inputsValid", () => t(new O())), new f(
4471
4534
  this._renderingMode,
4472
4535
  this._initialArgs,
4473
4536
  this._initialUiState,
@@ -4478,7 +4541,7 @@
4478
4541
  },
4479
4542
  this._sections,
4480
4543
  this._title
4481
- )) : new p(
4544
+ )) : new f(
4482
4545
  this._renderingMode,
4483
4546
  this._initialArgs,
4484
4547
  this._initialUiState,
@@ -4492,7 +4555,7 @@
4492
4555
  return this.argsValid(t);
4493
4556
  }
4494
4557
  sections(t) {
4495
- return Array.isArray(t) ? this.sections(C(t)) : typeof t == "function" ? (_("sections", () => t(new w())), new p(
4558
+ return Array.isArray(t) ? this.sections(V(t)) : typeof t == "function" ? (P("sections", () => t(new O())), new f(
4496
4559
  this._renderingMode,
4497
4560
  this._initialArgs,
4498
4561
  this._initialUiState,
@@ -4500,7 +4563,7 @@
4500
4563
  this._inputsValid,
4501
4564
  { __renderLambda: true, handle: "sections" },
4502
4565
  this._title
4503
- )) : new p(
4566
+ )) : new f(
4504
4567
  this._renderingMode,
4505
4568
  this._initialArgs,
4506
4569
  this._initialUiState,
@@ -4511,7 +4574,7 @@
4511
4574
  );
4512
4575
  }
4513
4576
  title(t) {
4514
- return _("title", () => t(new w())), new p(
4577
+ return P("title", () => t(new O())), new f(
4515
4578
  this._renderingMode,
4516
4579
  this._initialArgs,
4517
4580
  this._initialUiState,
@@ -4526,7 +4589,7 @@
4526
4589
  * @deprecated use {@link withArgs}
4527
4590
  * */
4528
4591
  initialArgs(t) {
4529
- return new p(
4592
+ return new f(
4530
4593
  this._renderingMode,
4531
4594
  t,
4532
4595
  this._initialUiState,
@@ -4538,7 +4601,7 @@
4538
4601
  }
4539
4602
  /** Sets initial args for the block, this value must be specified. */
4540
4603
  withArgs(t) {
4541
- return new p(
4604
+ return new f(
4542
4605
  this._renderingMode,
4543
4606
  t,
4544
4607
  this._initialUiState,
@@ -4550,7 +4613,7 @@
4550
4613
  }
4551
4614
  /** Defines type and sets initial value for block UiState. */
4552
4615
  withUiState(t) {
4553
- return new p(
4616
+ return new f(
4554
4617
  this._renderingMode,
4555
4618
  this._initialArgs,
4556
4619
  t,
@@ -4567,7 +4630,7 @@
4567
4630
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
4568
4631
  const t = {
4569
4632
  v3: {
4570
- sdkVersion: b,
4633
+ sdkVersion: F,
4571
4634
  renderingMode: this._renderingMode,
4572
4635
  initialArgs: this._initialArgs,
4573
4636
  initialUiState: this._initialUiState,
@@ -4577,29 +4640,29 @@
4577
4640
  outputs: this._outputs
4578
4641
  },
4579
4642
  // fields below are added to allow previous desktop versions read generated configs
4580
- sdkVersion: b,
4643
+ sdkVersion: F,
4581
4644
  renderingMode: this._renderingMode,
4582
4645
  initialArgs: this._initialArgs,
4583
- inputsValid: I(this._inputsValid),
4584
- sections: I(this._sections),
4646
+ inputsValid: M(this._inputsValid),
4647
+ sections: M(this._sections),
4585
4648
  outputs: Object.fromEntries(
4586
- Object.entries(this._outputs).map(([n, i2]) => [n, I(i2)])
4649
+ Object.entries(this._outputs).map(([n, i2]) => [n, M(i2)])
4587
4650
  )
4588
4651
  };
4589
- return K() ? x({ sdkVersion: b }) : { config: t };
4652
+ return ut() ? q({ sdkVersion: F }) : { config: t };
4590
4653
  }
4591
4654
  }
4592
4655
  const $BlockArgs = z.object({
4593
4656
  numbers: z.array(z.coerce.number())
4594
4657
  });
4595
- const platforma = p.create("Heavy").withArgs({ numbers: [1, 2, 3] }).withUiState({ dataTableState: void 0 }).output("numbers", (ctx) => {
4658
+ const platforma = f.create("Heavy").withArgs({ numbers: [1, 2, 3] }).withUiState({ dataTableState: void 0 }).output("numbers", (ctx) => {
4596
4659
  var _a, _b;
4597
4660
  return (_b = (_a = ctx.outputs) == null ? void 0 : _a.resolve("numbers")) == null ? void 0 : _b.getDataAsJson();
4598
4661
  }).output("pFrame", (ctx) => {
4599
4662
  const collection = ctx.resultPool.getData();
4600
4663
  if (collection === void 0 || !collection.isComplete) return void 0;
4601
4664
  const valueTypes = ["Int", "Long", "Float", "Double", "String", "Bytes"];
4602
- const columns = collection.entries.map(({ obj }) => obj).filter(x$1).filter((column) => valueTypes.find((valueType) => valueType === column.spec.valueType));
4665
+ const columns = collection.entries.map(({ obj }) => obj).filter(x).filter((column) => valueTypes.find((valueType) => valueType === column.spec.valueType));
4603
4666
  try {
4604
4667
  return ctx.createPFrame(columns);
4605
4668
  } catch (err) {
@@ -4611,7 +4674,7 @@
4611
4674
  if (!join) return void 0;
4612
4675
  const collection = ctx.resultPool.getData();
4613
4676
  if (!collection || !collection.isComplete) return void 0;
4614
- const columns = collection.entries.map(({ obj }) => obj).filter(x$1);
4677
+ const columns = collection.entries.map(({ obj }) => obj).filter(x);
4615
4678
  if (columns.length === 0) return void 0;
4616
4679
  let columnMissing = false;
4617
4680
  const src = i(join, (idAndSpec) => {