@milaboratories/milaboratories.ui-examples.model 1.1.50 → 1.1.52

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
@@ -35,7 +35,7 @@
35
35
  }, "");
36
36
  return `{${values}}`;
37
37
  };
38
- const _e = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
38
+ const Le = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
39
39
  var util;
40
40
  (function(util2) {
41
41
  util2.assertEqual = (val) => val;
@@ -87,7 +87,7 @@
87
87
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
88
88
  }
89
89
  util2.joinValues = joinValues;
90
- util2.jsonStringifyReplacer = (_, value) => {
90
+ util2.jsonStringifyReplacer = (_2, value) => {
91
91
  if (typeof value === "bigint") {
92
92
  return value.toString();
93
93
  }
@@ -3832,7 +3832,7 @@
3832
3832
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3833
3833
  };
3834
3834
  const NEVER = INVALID;
3835
- var z = /* @__PURE__ */ Object.freeze({
3835
+ var z$1 = /* @__PURE__ */ Object.freeze({
3836
3836
  __proto__: null,
3837
3837
  defaultErrorMap: errorMap,
3838
3838
  setErrorMap,
@@ -3948,53 +3948,53 @@
3948
3948
  quotelessJson,
3949
3949
  ZodError
3950
3950
  });
3951
- var I$1 = Object.defineProperty;
3952
- var $ = (n2, t, e) => t in n2 ? I$1(n2, t, { enumerable: true, configurable: true, writable: true, value: e }) : n2[t] = e;
3953
- var m$2 = (n2, t, e) => $(n2, typeof t != "symbol" ? t + "" : t, e);
3951
+ var $ = Object.defineProperty;
3952
+ var I$1 = (n2, e, t) => e in n2 ? $(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
3953
+ var l$1 = (n2, e, t) => I$1(n2, typeof e != "symbol" ? e + "" : e, t);
3954
3954
  function w(n2) {
3955
3955
  throw new Error("Unexpected object: " + n2);
3956
3956
  }
3957
3957
  function mn(n2) {
3958
3958
  if (!n2 || typeof n2 != "object")
3959
3959
  return false;
3960
- const t = n2;
3961
- if (!("type" in t))
3960
+ const e = n2;
3961
+ if (!("type" in e))
3962
3962
  return false;
3963
- switch (t.type) {
3963
+ switch (e.type) {
3964
3964
  case "Json":
3965
- return typeof t.keyLength == "number" && t.data !== void 0 && typeof t.data == "object";
3965
+ return typeof e.keyLength == "number" && e.data !== void 0 && typeof e.data == "object";
3966
3966
  case "JsonPartitioned":
3967
- return typeof t.partitionKeyLength == "number" && t.parts !== void 0 && typeof t.parts == "object";
3967
+ return typeof e.partitionKeyLength == "number" && e.parts !== void 0 && typeof e.parts == "object";
3968
3968
  case "BinaryPartitioned":
3969
- return typeof t.partitionKeyLength == "number" && t.parts !== void 0 && typeof t.parts == "object";
3969
+ return typeof e.partitionKeyLength == "number" && e.parts !== void 0 && typeof e.parts == "object";
3970
3970
  default:
3971
3971
  return false;
3972
3972
  }
3973
3973
  }
3974
- function yn(n2, t) {
3974
+ function ln(n2, e) {
3975
3975
  if (n2 !== void 0)
3976
3976
  switch (n2.type) {
3977
3977
  case "Json":
3978
3978
  return n2;
3979
3979
  case "JsonPartitioned": {
3980
- const e = {};
3980
+ const t = {};
3981
3981
  for (const [r, o] of Object.entries(n2.parts))
3982
- e[r] = t(o);
3982
+ t[r] = e(o);
3983
3983
  return {
3984
3984
  ...n2,
3985
- parts: e
3985
+ parts: t
3986
3986
  };
3987
3987
  }
3988
3988
  case "BinaryPartitioned": {
3989
- const e = {};
3989
+ const t = {};
3990
3990
  for (const [r, o] of Object.entries(n2.parts))
3991
- e[r] = {
3992
- index: t(o.index),
3993
- values: t(o.values)
3991
+ t[r] = {
3992
+ index: e(o.index),
3993
+ values: e(o.values)
3994
3994
  };
3995
3995
  return {
3996
3996
  ...n2,
3997
- parts: e
3997
+ parts: t
3998
3998
  };
3999
3999
  }
4000
4000
  }
@@ -4002,47 +4002,47 @@
4002
4002
  function j(n2) {
4003
4003
  if (!n2 || typeof n2 != "object")
4004
4004
  return false;
4005
- const t = n2;
4006
- if (!("type" in t))
4005
+ const e = n2;
4006
+ if (!("type" in e))
4007
4007
  return false;
4008
- switch (t.type) {
4008
+ switch (e.type) {
4009
4009
  case "Json":
4010
- return typeof t.keyLength == "number" && Array.isArray(t.data);
4010
+ return typeof e.keyLength == "number" && Array.isArray(e.data);
4011
4011
  case "JsonPartitioned":
4012
- return typeof t.partitionKeyLength == "number" && Array.isArray(t.parts);
4012
+ return typeof e.partitionKeyLength == "number" && Array.isArray(e.parts);
4013
4013
  case "BinaryPartitioned":
4014
- return typeof t.partitionKeyLength == "number" && Array.isArray(t.parts);
4014
+ return typeof e.partitionKeyLength == "number" && Array.isArray(e.parts);
4015
4015
  default:
4016
4016
  return false;
4017
4017
  }
4018
4018
  }
4019
- function ln(n2) {
4019
+ function yn(n2) {
4020
4020
  return j(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
4021
4021
  }
4022
4022
  function hn(n2) {
4023
4023
  switch (n2.type) {
4024
4024
  case "Json": {
4025
- const t = Object.entries(n2.data).map(([e, r]) => ({ key: JSON.parse(e), value: r }));
4025
+ const e = Object.entries(n2.data).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
4026
4026
  return {
4027
4027
  type: "Json",
4028
4028
  keyLength: n2.keyLength,
4029
- data: t
4029
+ data: e
4030
4030
  };
4031
4031
  }
4032
4032
  case "JsonPartitioned": {
4033
- const t = Object.entries(n2.parts).map(([e, r]) => ({ key: JSON.parse(e), value: r }));
4033
+ const e = Object.entries(n2.parts).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
4034
4034
  return {
4035
4035
  type: "JsonPartitioned",
4036
4036
  partitionKeyLength: n2.partitionKeyLength,
4037
- parts: t
4037
+ parts: e
4038
4038
  };
4039
4039
  }
4040
4040
  case "BinaryPartitioned": {
4041
- const t = Object.entries(n2.parts).map(([e, r]) => ({ key: JSON.parse(e), value: r }));
4041
+ const e = Object.entries(n2.parts).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
4042
4042
  return {
4043
4043
  type: "BinaryPartitioned",
4044
4044
  partitionKeyLength: n2.partitionKeyLength,
4045
- parts: t
4045
+ parts: e
4046
4046
  };
4047
4047
  }
4048
4048
  }
@@ -4050,33 +4050,33 @@
4050
4050
  function gn(n2) {
4051
4051
  switch (n2.type) {
4052
4052
  case "Json": {
4053
- const t = {};
4054
- for (const e of n2.data)
4055
- t[JSON.stringify(e.key)] = e.value;
4053
+ const e = {};
4054
+ for (const t of n2.data)
4055
+ e[JSON.stringify(t.key)] = t.value;
4056
4056
  return {
4057
4057
  type: "Json",
4058
4058
  keyLength: n2.keyLength,
4059
- data: t
4059
+ data: e
4060
4060
  };
4061
4061
  }
4062
4062
  case "JsonPartitioned": {
4063
- const t = {};
4064
- for (const e of n2.parts)
4065
- t[JSON.stringify(e.key)] = e.value;
4063
+ const e = {};
4064
+ for (const t of n2.parts)
4065
+ e[JSON.stringify(t.key)] = t.value;
4066
4066
  return {
4067
4067
  type: "JsonPartitioned",
4068
4068
  partitionKeyLength: n2.partitionKeyLength,
4069
- parts: t
4069
+ parts: e
4070
4070
  };
4071
4071
  }
4072
4072
  case "BinaryPartitioned": {
4073
- const t = {};
4074
- for (const e of n2.parts)
4075
- t[JSON.stringify(e.key)] = e.value;
4073
+ const e = {};
4074
+ for (const t of n2.parts)
4075
+ e[JSON.stringify(t.key)] = t.value;
4076
4076
  return {
4077
4077
  type: "BinaryPartitioned",
4078
4078
  partitionKeyLength: n2.partitionKeyLength,
4079
- parts: t
4079
+ parts: e
4080
4080
  };
4081
4081
  }
4082
4082
  }
@@ -4087,37 +4087,37 @@
4087
4087
  spec: n2.spec
4088
4088
  };
4089
4089
  }
4090
- function p$1(n2) {
4091
- const { type: t, name: e, domain: r } = n2;
4092
- return { type: t, name: e, ...r && { domain: r } };
4090
+ function m$2(n2) {
4091
+ const { type: e, name: t, domain: r } = n2;
4092
+ return { type: e, name: t, ...r && { domain: r } };
4093
4093
  }
4094
4094
  function Jn(n2) {
4095
- return _e(p$1(n2));
4095
+ return Le(m$2(n2));
4096
4096
  }
4097
- function X$1(n2, t) {
4098
- if (n2 === void 0) return t === void 0;
4099
- if (t === void 0) return true;
4100
- for (const e in t)
4101
- if (n2[e] !== t[e]) return false;
4097
+ function z(n2, e) {
4098
+ if (n2 === void 0) return e === void 0;
4099
+ if (e === void 0) return true;
4100
+ for (const t in e)
4101
+ if (n2[t] !== e[t]) return false;
4102
4102
  return true;
4103
4103
  }
4104
- function G(n2, t) {
4105
- return n2.name === t.name && X$1(n2.domain, t.domain);
4104
+ function X$1(n2, e) {
4105
+ return n2.name === e.name && z(n2.domain, e.domain);
4106
4106
  }
4107
- function On(n2, t) {
4108
- return { ...n2, src: l$1(n2.src, t) };
4107
+ function On(n2, e) {
4108
+ return { ...n2, src: y(n2.src, e) };
4109
4109
  }
4110
- function l$1(n2, t) {
4110
+ function y(n2, e) {
4111
4111
  switch (n2.type) {
4112
4112
  case "column":
4113
4113
  return {
4114
4114
  type: "column",
4115
- column: t(n2.column)
4115
+ column: e(n2.column)
4116
4116
  };
4117
4117
  case "slicedColumn":
4118
4118
  return {
4119
4119
  type: "slicedColumn",
4120
- column: t(n2.column),
4120
+ column: e(n2.column),
4121
4121
  newId: n2.newId,
4122
4122
  axisFilters: n2.axisFilters
4123
4123
  };
@@ -4125,41 +4125,41 @@
4125
4125
  case "full":
4126
4126
  return {
4127
4127
  type: n2.type,
4128
- entries: n2.entries.map((e) => l$1(e, t))
4128
+ entries: n2.entries.map((t) => y(t, e))
4129
4129
  };
4130
4130
  case "outer":
4131
4131
  return {
4132
4132
  type: "outer",
4133
- primary: l$1(n2.primary, t),
4134
- secondary: n2.secondary.map((e) => l$1(e, t))
4133
+ primary: y(n2.primary, e),
4134
+ secondary: n2.secondary.map((t) => y(t, e))
4135
4135
  };
4136
4136
  default:
4137
4137
  w(n2);
4138
4138
  }
4139
4139
  }
4140
- function Q(n2) {
4141
- return _e(n2);
4140
+ function G(n2) {
4141
+ return Le(n2);
4142
4142
  }
4143
4143
  function x(n2) {
4144
- return _e(p$1(n2));
4144
+ return Le(m$2(n2));
4145
4145
  }
4146
- function A(n2, t) {
4147
- return JSON.stringify([n2, t]);
4146
+ function A(n2, e) {
4147
+ return JSON.stringify([n2, e]);
4148
4148
  }
4149
- class $n {
4149
+ class In {
4150
4150
  /**
4151
4151
  * Creates a new anchor context from a set of anchor column specifications
4152
4152
  * @param anchors Record of anchor column specifications indexed by anchor ID
4153
4153
  */
4154
- constructor(t) {
4155
- m$2(this, "domains", /* @__PURE__ */ new Map());
4156
- m$2(this, "axes", /* @__PURE__ */ new Map());
4157
- m$2(this, "domainPacks", []);
4158
- m$2(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
4159
- this.anchors = t;
4160
- const e = Object.entries(t);
4161
- e.sort((r, o) => r[0].localeCompare(o[0]));
4162
- for (const [r, o] of e) {
4154
+ constructor(e) {
4155
+ l$1(this, "domains", /* @__PURE__ */ new Map());
4156
+ l$1(this, "axes", /* @__PURE__ */ new Map());
4157
+ l$1(this, "domainPacks", []);
4158
+ l$1(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
4159
+ this.anchors = e;
4160
+ const t = Object.entries(e);
4161
+ t.sort((r, o) => r[0].localeCompare(o[0]));
4162
+ for (const [r, o] of t) {
4163
4163
  for (let s2 = 0; s2 < o.axesSpec.length; s2++) {
4164
4164
  const a = o.axesSpec[s2], i = x(a);
4165
4165
  this.axes.set(i, { anchor: r, idx: s2 });
@@ -4177,18 +4177,18 @@
4177
4177
  /**
4178
4178
  * Implementation of derive method
4179
4179
  */
4180
- derive(t, e) {
4180
+ derive(e, t) {
4181
4181
  const r = {
4182
- name: t.name,
4182
+ name: e.name,
4183
4183
  axes: []
4184
4184
  };
4185
4185
  let o;
4186
- if (t.domain !== void 0)
4186
+ if (e.domain !== void 0)
4187
4187
  n:
4188
4188
  for (const a of this.domainPacks) {
4189
4189
  const i = [];
4190
4190
  for (const c2 of a) {
4191
- const d = t.domain[c2];
4191
+ const d = e.domain[c2];
4192
4192
  if (d !== void 0)
4193
4193
  i.push([c2, d]);
4194
4194
  else
@@ -4200,26 +4200,26 @@
4200
4200
  break;
4201
4201
  }
4202
4202
  }
4203
- for (const [a, i] of Object.entries(t.domain ?? {})) {
4203
+ for (const [a, i] of Object.entries(e.domain ?? {})) {
4204
4204
  if (o !== void 0 && o.has(a))
4205
4205
  continue;
4206
4206
  const u2 = A(a, i), c2 = this.domains.get(u2);
4207
4207
  r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : i;
4208
4208
  }
4209
- if (r.axes = t.axesSpec.map((a) => {
4209
+ if (r.axes = e.axesSpec.map((a) => {
4210
4210
  const i = x(a), u2 = this.axes.get(i);
4211
- return u2 === void 0 ? p$1(a) : u2;
4212
- }), !e || e.length === 0)
4211
+ return u2 === void 0 ? m$2(a) : u2;
4212
+ }), !t || t.length === 0)
4213
4213
  return r;
4214
4214
  const s2 = [];
4215
- for (const a of e) {
4215
+ for (const a of t) {
4216
4216
  const [i, u2] = a;
4217
4217
  if (typeof i == "number") {
4218
- if (i < 0 || i >= t.axesSpec.length)
4219
- throw new Error(`Axis index ${i} is out of bounds (0-${t.axesSpec.length - 1})`);
4218
+ if (i < 0 || i >= e.axesSpec.length)
4219
+ throw new Error(`Axis index ${i} is out of bounds (0-${e.axesSpec.length - 1})`);
4220
4220
  s2.push([i, u2]);
4221
4221
  } else {
4222
- const c2 = t.axesSpec.findIndex((d) => d.name === i);
4222
+ const c2 = e.axesSpec.findIndex((d) => d.name === i);
4223
4223
  if (c2 === -1)
4224
4224
  throw new Error(`Axis with name "${i}" not found in the column specification`);
4225
4225
  s2.push([c2, u2]);
@@ -4236,12 +4236,12 @@
4236
4236
  * @param axisFilters Optional axis filters to apply to the column
4237
4237
  * @returns A canonicalized string representation of the anchored column identifier
4238
4238
  */
4239
- deriveS(t, e) {
4240
- return Q(this.derive(t, e));
4239
+ deriveS(e, t) {
4240
+ return G(this.derive(e, t));
4241
4241
  }
4242
4242
  }
4243
- function Dn(n2, t, e) {
4244
- const r = { ...t }, o = (e == null ? void 0 : e.ignoreMissingDomains) ?? false;
4243
+ function Dn(n2, e, t) {
4244
+ const r = { ...e }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? false;
4245
4245
  if (r.domainAnchor !== void 0) {
4246
4246
  const s2 = n2[r.domainAnchor];
4247
4247
  if (!s2)
@@ -4267,135 +4267,135 @@
4267
4267
  }
4268
4268
  r.domain = s2;
4269
4269
  }
4270
- return r.axes && (r.axes = r.axes.map((s2) => Y$1(n2, s2))), r;
4270
+ return r.axes && (r.axes = r.axes.map((s2) => Q(n2, s2))), r;
4271
4271
  }
4272
- function Y$1(n2, t) {
4273
- if (!Z$1(t))
4274
- return t;
4275
- const e = t.anchor, r = n2[e];
4272
+ function Q(n2, e) {
4273
+ if (!Y(e))
4274
+ return e;
4275
+ const t = e.anchor, r = n2[t];
4276
4276
  if (!r)
4277
- throw new Error(`Anchor "${e}" not found for axis reference`);
4278
- if ("idx" in t) {
4279
- if (t.idx < 0 || t.idx >= r.axesSpec.length)
4280
- throw new Error(`Axis index ${t.idx} out of bounds for anchor "${e}"`);
4281
- return r.axesSpec[t.idx];
4282
- } else if ("name" in t) {
4283
- const o = r.axesSpec.filter((s2) => s2.name === t.name);
4277
+ throw new Error(`Anchor "${t}" not found for axis reference`);
4278
+ if ("idx" in e) {
4279
+ if (e.idx < 0 || e.idx >= r.axesSpec.length)
4280
+ throw new Error(`Axis index ${e.idx} out of bounds for anchor "${t}"`);
4281
+ return r.axesSpec[e.idx];
4282
+ } else if ("name" in e) {
4283
+ const o = r.axesSpec.filter((s2) => s2.name === e.name);
4284
4284
  if (o.length > 1)
4285
- throw new Error(`Multiple axes with name "${t.name}" found in anchor "${e}"`);
4285
+ throw new Error(`Multiple axes with name "${e.name}" found in anchor "${t}"`);
4286
4286
  if (o.length === 0)
4287
- throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);
4287
+ throw new Error(`Axis with name "${e.name}" not found in anchor "${t}"`);
4288
4288
  return o[0];
4289
- } else if ("id" in t) {
4290
- const o = r.axesSpec.filter((s2) => G(t.id, p$1(s2)));
4289
+ } else if ("id" in e) {
4290
+ const o = r.axesSpec.filter((s2) => X$1(e.id, m$2(s2)));
4291
4291
  if (o.length > 1)
4292
- throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);
4292
+ throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
4293
4293
  if (o.length === 0)
4294
- throw new Error(`No matching axis found for matcher in anchor "${e}"`);
4294
+ throw new Error(`No matching axis found for matcher in anchor "${t}"`);
4295
4295
  return o[0];
4296
4296
  }
4297
4297
  throw new Error("Unsupported axis reference type");
4298
4298
  }
4299
- function Z$1(n2) {
4299
+ function Y(n2) {
4300
4300
  return typeof n2 == "object" && "anchor" in n2;
4301
4301
  }
4302
4302
  function f(n2) {
4303
4303
  return n2.kind === "PColumn";
4304
4304
  }
4305
- function q(n2) {
4305
+ function Z$1(n2) {
4306
4306
  return f(n2.spec);
4307
4307
  }
4308
4308
  function jn(n2) {
4309
- if (!q(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4309
+ if (!Z$1(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4310
4310
  return n2;
4311
4311
  }
4312
- function Fn(n2, t) {
4312
+ function Fn(n2, e) {
4313
4313
  return n2 === void 0 ? void 0 : {
4314
4314
  ...n2,
4315
- data: t(n2.data)
4315
+ data: e(n2.data)
4316
4316
  };
4317
4317
  }
4318
4318
  function Un(n2) {
4319
- const t = /* @__PURE__ */ new Map(), e = (r) => {
4319
+ const e = /* @__PURE__ */ new Map(), t = (r) => {
4320
4320
  switch (r.type) {
4321
4321
  case "column":
4322
- t.set(r.column.id, r.column);
4322
+ e.set(r.column.id, r.column);
4323
4323
  return;
4324
4324
  case "slicedColumn":
4325
- t.set(r.column.id, r.column);
4325
+ e.set(r.column.id, r.column);
4326
4326
  return;
4327
4327
  case "full":
4328
4328
  case "inner":
4329
- for (const o of r.entries) e(o);
4329
+ for (const o of r.entries) t(o);
4330
4330
  return;
4331
4331
  case "outer":
4332
- e(r.primary);
4333
- for (const o of r.secondary) e(o);
4332
+ t(r.primary);
4333
+ for (const o of r.secondary) t(o);
4334
4334
  return;
4335
4335
  default:
4336
4336
  w(r);
4337
4337
  }
4338
4338
  };
4339
- return e(n2), [...t.values()];
4339
+ return t(n2), [...e.values()];
4340
4340
  }
4341
- function k(n2, t) {
4342
- if (n2.name !== void 0 && n2.name !== t.name)
4341
+ function k(n2, e) {
4342
+ if (n2.name !== void 0 && n2.name !== e.name)
4343
4343
  return false;
4344
4344
  if (n2.type !== void 0) {
4345
4345
  if (Array.isArray(n2.type)) {
4346
- if (!n2.type.includes(t.type))
4346
+ if (!n2.type.includes(e.type))
4347
4347
  return false;
4348
- } else if (n2.type !== t.type)
4348
+ } else if (n2.type !== e.type)
4349
4349
  return false;
4350
4350
  }
4351
4351
  if (n2.domain !== void 0) {
4352
- const e = t.domain || {};
4352
+ const t = e.domain || {};
4353
4353
  for (const [r, o] of Object.entries(n2.domain))
4354
- if (e[r] !== o)
4354
+ if (t[r] !== o)
4355
4355
  return false;
4356
4356
  }
4357
4357
  return true;
4358
4358
  }
4359
- function N(n2, t) {
4360
- if (t.name !== void 0 && n2.name !== t.name || t.namePattern !== void 0 && !new RegExp(t.namePattern).test(n2.name))
4359
+ function N(n2, e) {
4360
+ if (e.name !== void 0 && n2.name !== e.name || e.namePattern !== void 0 && !new RegExp(e.namePattern).test(n2.name))
4361
4361
  return false;
4362
- if (t.type !== void 0) {
4363
- if (Array.isArray(t.type)) {
4364
- if (!t.type.includes(n2.valueType))
4362
+ if (e.type !== void 0) {
4363
+ if (Array.isArray(e.type)) {
4364
+ if (!e.type.includes(n2.valueType))
4365
4365
  return false;
4366
- } else if (t.type !== n2.valueType)
4366
+ } else if (e.type !== n2.valueType)
4367
4367
  return false;
4368
4368
  }
4369
- if (t.domain !== void 0) {
4370
- const e = n2.domain || {};
4371
- for (const [r, o] of Object.entries(t.domain))
4372
- if (e[r] !== o)
4369
+ if (e.domain !== void 0) {
4370
+ const t = n2.domain || {};
4371
+ for (const [r, o] of Object.entries(e.domain))
4372
+ if (t[r] !== o)
4373
4373
  return false;
4374
4374
  }
4375
- if (t.axes !== void 0) {
4376
- const e = n2.axesSpec.map(p$1);
4377
- if (t.partialAxesMatch) {
4378
- for (const r of t.axes)
4379
- if (!e.some((o) => k(r, o)))
4375
+ if (e.axes !== void 0) {
4376
+ const t = n2.axesSpec.map(m$2);
4377
+ if (e.partialAxesMatch) {
4378
+ for (const r of e.axes)
4379
+ if (!t.some((o) => k(r, o)))
4380
4380
  return false;
4381
4381
  } else {
4382
- if (e.length !== t.axes.length)
4382
+ if (t.length !== e.axes.length)
4383
4383
  return false;
4384
- for (let r = 0; r < t.axes.length; r++)
4385
- if (!k(t.axes[r], e[r]))
4384
+ for (let r = 0; r < e.axes.length; r++)
4385
+ if (!k(e.axes[r], t[r]))
4386
4386
  return false;
4387
4387
  }
4388
4388
  }
4389
- if (t.annotations !== void 0) {
4390
- const e = n2.annotations || {};
4391
- for (const [r, o] of Object.entries(t.annotations))
4392
- if (e[r] !== o)
4389
+ if (e.annotations !== void 0) {
4390
+ const t = n2.annotations || {};
4391
+ for (const [r, o] of Object.entries(e.annotations))
4392
+ if (t[r] !== o)
4393
4393
  return false;
4394
4394
  }
4395
- if (t.annotationPatterns !== void 0) {
4396
- const e = n2.annotations || {};
4397
- for (const [r, o] of Object.entries(t.annotationPatterns)) {
4398
- const s2 = e[r];
4395
+ if (e.annotationPatterns !== void 0) {
4396
+ const t = n2.annotations || {};
4397
+ for (const [r, o] of Object.entries(e.annotationPatterns)) {
4398
+ const s2 = t[r];
4399
4399
  if (s2 === void 0 || !new RegExp(o).test(s2))
4400
4400
  return false;
4401
4401
  }
@@ -4403,23 +4403,35 @@
4403
4403
  return true;
4404
4404
  }
4405
4405
  function Kn(n2) {
4406
- return Array.isArray(n2) ? (t) => n2.some((e) => f(t) && N(t, e)) : (t) => f(t) && N(t, n2);
4406
+ return Array.isArray(n2) ? (e) => n2.some((t) => f(e) && N(e, t)) : (e) => f(e) && N(e, n2);
4407
4407
  }
4408
- z.object({
4409
- __isRef: z.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
4410
- blockId: z.string().describe("Upstream block id"),
4411
- name: z.string().describe("Name of the output provided to the upstream block's output context")
4408
+ z$1.object({
4409
+ __isRef: z$1.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
4410
+ blockId: z$1.string().describe("Upstream block id"),
4411
+ name: z$1.string().describe("Name of the output provided to the upstream block's output context"),
4412
+ 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")
4412
4413
  }).describe(
4413
4414
  "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."
4414
- ).strict().readonly();
4415
- function Tn(n2) {
4415
+ ).readonly();
4416
+ function Mn(n2) {
4416
4417
  return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
4417
4418
  }
4418
- function _n(n2, t) {
4419
- return n2.ok ? { ok: true, value: t(n2.value) } : n2;
4419
+ function vn(n2, e = true) {
4420
+ if (e)
4421
+ return {
4422
+ ...n2,
4423
+ requireEnrichments: true
4424
+ };
4425
+ {
4426
+ const { requireEnrichments: t, ...r } = n2;
4427
+ return r;
4428
+ }
4429
+ }
4430
+ function qn(n2, e) {
4431
+ return n2.ok ? { ok: true, value: e(n2.value) } : n2;
4420
4432
  }
4421
4433
  const sn = 24;
4422
- z.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4434
+ z$1.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4423
4435
  var stringify = { exports: {} };
4424
4436
  (function(module2, exports3) {
4425
4437
  exports3 = module2.exports = stringify2;
@@ -4444,82 +4456,82 @@
4444
4456
  };
4445
4457
  }
4446
4458
  })(stringify, stringify.exports);
4447
- const l = z.object({
4448
- type: z.literal("PlError"),
4449
- name: z.string(),
4450
- message: z.string(),
4459
+ const l = z$1.object({
4460
+ type: z$1.literal("PlError"),
4461
+ name: z$1.string(),
4462
+ message: z$1.string(),
4451
4463
  /** The message with all details needed for SDK developers. */
4452
- fullMessage: z.string().optional(),
4453
- stack: z.string().optional()
4464
+ fullMessage: z$1.string().optional(),
4465
+ stack: z$1.string().optional()
4454
4466
  }), c = l.extend({
4455
- cause: z.lazy(() => s).optional(),
4456
- errors: z.lazy(() => s.array()).optional()
4457
- }), m$1 = z.object({
4458
- type: z.literal("StandardError"),
4459
- name: z.string(),
4460
- message: z.string(),
4461
- stack: z.string().optional()
4467
+ cause: z$1.lazy(() => s).optional(),
4468
+ errors: z$1.lazy(() => s.array()).optional()
4469
+ }), m$1 = z$1.object({
4470
+ type: z$1.literal("StandardError"),
4471
+ name: z$1.string(),
4472
+ message: z$1.string(),
4473
+ stack: z$1.string().optional()
4462
4474
  }), p = m$1.extend({
4463
- cause: z.lazy(() => s).optional(),
4464
- errors: z.lazy(() => s.array()).optional()
4465
- }), s = z.union([p, c]);
4466
- const u = z.object({
4467
- name: z.string(),
4468
- message: z.string(),
4469
- fullMessage: z.string().optional(),
4470
- stack: z.string().optional()
4475
+ cause: z$1.lazy(() => s).optional(),
4476
+ errors: z$1.lazy(() => s.array()).optional()
4477
+ }), s = z$1.union([p, c]);
4478
+ const u = z$1.object({
4479
+ name: z$1.string(),
4480
+ message: z$1.string(),
4481
+ fullMessage: z$1.string().optional(),
4482
+ stack: z$1.string().optional()
4471
4483
  }), n = u.extend({
4472
- cause: z.lazy(() => n).optional(),
4473
- errors: z.lazy(() => n.array()).optional()
4484
+ cause: z$1.lazy(() => n).optional(),
4485
+ errors: z$1.lazy(() => n.array()).optional()
4474
4486
  });
4475
- var Ue = Object.defineProperty;
4476
- var Me = (t, e, n2) => e in t ? Ue(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4477
- var L = (t, e, n2) => Me(t, typeof e != "symbol" ? e + "" : e, n2);
4487
+ var Me = Object.defineProperty;
4488
+ var We = (t, e, n2) => e in t ? Me(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4489
+ var T = (t, e, n2) => We(t, typeof e != "symbol" ? e + "" : e, n2);
4478
4490
  function Z(t) {
4479
4491
  return { type: "Immediate", value: t };
4480
4492
  }
4481
- function it() {
4493
+ function st() {
4482
4494
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4483
4495
  }
4484
- function Te(t) {
4496
+ function Ee(t) {
4485
4497
  if (t && typeof globalThis.getPlatforma == "function")
4486
4498
  return globalThis.getPlatforma(t);
4487
4499
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4488
4500
  throw new Error("Can't get platforma instance.");
4489
4501
  }
4490
- function st() {
4502
+ function ot() {
4491
4503
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4492
4504
  }
4493
4505
  function m() {
4494
4506
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4495
4507
  throw new Error("Not in config rendering context");
4496
4508
  }
4497
- function Y(t, e) {
4498
- const n2 = st();
4509
+ function U(t, e) {
4510
+ const n2 = ot();
4499
4511
  if (n2 === void 0) return false;
4500
4512
  if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4501
4513
  return n2.callbackRegistry[t] = e, true;
4502
4514
  }
4503
4515
  const ae = /* @__PURE__ */ new Map();
4504
- function ot(t, e) {
4516
+ function at(t, e) {
4505
4517
  t in m().callbackRegistry || (m().callbackRegistry[t] = (n2) => {
4506
4518
  for (const r of ae.get(t))
4507
4519
  r(n2);
4508
4520
  }, ae.set(t, [])), ae.get(t).push(e);
4509
4521
  }
4510
- class S {
4522
+ class C {
4511
4523
  constructor(e, n2 = (r) => r) {
4512
- L(this, "isResolved", false);
4513
- L(this, "resolvedValue");
4514
- this.handle = e, this.postProcess = n2, ot(e, (r) => {
4524
+ T(this, "isResolved", false);
4525
+ T(this, "resolvedValue");
4526
+ this.handle = e, this.postProcess = n2, at(e, (r) => {
4515
4527
  this.resolvedValue = n2(r), this.isResolved = true;
4516
4528
  });
4517
4529
  }
4518
4530
  map(e) {
4519
- return new S(this.handle, (n2) => e(this.postProcess(n2)));
4531
+ return new C(this.handle, (n2) => e(this.postProcess(n2)));
4520
4532
  }
4521
4533
  mapDefined(e) {
4522
- return new S(this.handle, (n2) => {
4534
+ return new C(this.handle, (n2) => {
4523
4535
  const r = this.postProcess(n2);
4524
4536
  return r ? e(r) : void 0;
4525
4537
  });
@@ -4528,7 +4540,7 @@
4528
4540
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4529
4541
  }
4530
4542
  }
4531
- function pe(t, e) {
4543
+ function de(t, e) {
4532
4544
  return t === void 0 ? void 0 : e(t);
4533
4545
  }
4534
4546
  class I {
@@ -4570,7 +4582,7 @@
4570
4582
  ...this.resolvePath,
4571
4583
  ...n2.map((i) => typeof i == "string" ? i : i.field)
4572
4584
  ];
4573
- return pe(
4585
+ return de(
4574
4586
  m().resolveWithCommon(this.handle, e, ...n2),
4575
4587
  (i) => new I(i, r)
4576
4588
  );
@@ -4592,7 +4604,7 @@
4592
4604
  }
4593
4605
  getError() {
4594
4606
  const e = [...this.resolvePath, "error"];
4595
- return pe(
4607
+ return de(
4596
4608
  m().getError(this.handle),
4597
4609
  (n2) => new I(n2, e)
4598
4610
  );
@@ -4634,7 +4646,7 @@
4634
4646
  getPColumns(e = false, n2 = "") {
4635
4647
  const r = this.parsePObjectCollection(e, n2);
4636
4648
  return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
4637
- if (!q(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
4649
+ if (!Z$1(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
4638
4650
  return s2;
4639
4651
  });
4640
4652
  }
@@ -4657,13 +4669,13 @@
4657
4669
  return i;
4658
4670
  }
4659
4671
  getFileContentAsBase64() {
4660
- return new S(m().getBlobContentAsBase64(this.handle));
4672
+ return new C(m().getBlobContentAsBase64(this.handle));
4661
4673
  }
4662
4674
  getFileContentAsString() {
4663
- return new S(m().getBlobContentAsString(this.handle));
4675
+ return new C(m().getBlobContentAsString(this.handle));
4664
4676
  }
4665
4677
  getFileContentAsJson() {
4666
- return new S(
4678
+ return new C(
4667
4679
  m().getBlobContentAsString(this.handle)
4668
4680
  ).mapDefined((e) => JSON.parse(e));
4669
4681
  }
@@ -4683,7 +4695,7 @@
4683
4695
  * @returns downloaded file handle
4684
4696
  */
4685
4697
  getFileHandle() {
4686
- return new S(m().getDownloadedBlobContentHandle(this.handle));
4698
+ return new C(m().getDownloadedBlobContentHandle(this.handle));
4687
4699
  }
4688
4700
  /**
4689
4701
  * @deprecated use getFileHandle
@@ -4695,7 +4707,7 @@
4695
4707
  * @returns downloaded file handle
4696
4708
  */
4697
4709
  getRemoteFileHandle() {
4698
- return new S(m().getOnDemandBlobContentHandle(this.handle));
4710
+ return new C(m().getOnDemandBlobContentHandle(this.handle));
4699
4711
  }
4700
4712
  /**
4701
4713
  * @deprecated use getRemoteFileHandle
@@ -4707,22 +4719,22 @@
4707
4719
  * @returns the url to the extracted folder
4708
4720
  */
4709
4721
  extractArchiveAndGetURL(e) {
4710
- return new S(m().extractArchiveAndGetURL(this.handle, e));
4722
+ return new C(m().extractArchiveAndGetURL(this.handle, e));
4711
4723
  }
4712
4724
  getImportProgress() {
4713
- return new S(m().getImportProgress(this.handle));
4725
+ return new C(m().getImportProgress(this.handle));
4714
4726
  }
4715
4727
  getLastLogs(e) {
4716
- return new S(m().getLastLogs(this.handle, e));
4728
+ return new C(m().getLastLogs(this.handle, e));
4717
4729
  }
4718
4730
  getProgressLog(e) {
4719
- return new S(m().getProgressLog(this.handle, e));
4731
+ return new C(m().getProgressLog(this.handle, e));
4720
4732
  }
4721
4733
  getProgressLogWithInfo(e) {
4722
- return new S(m().getProgressLogWithInfo(this.handle, e));
4734
+ return new C(m().getProgressLogWithInfo(this.handle, e));
4723
4735
  }
4724
4736
  getLogHandle() {
4725
- return new S(m().getLogHandle(this.handle));
4737
+ return new C(m().getLogHandle(this.handle));
4726
4738
  }
4727
4739
  allFieldsResolved(e = "Input") {
4728
4740
  switch (e) {
@@ -4748,47 +4760,47 @@
4748
4760
  let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4749
4761
  (u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
4750
4762
  );
4751
- return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, y]) => o(u2, y));
4763
+ return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, y2]) => o(u2, y2));
4752
4764
  }
4753
4765
  }
4754
- const Ee = "staging", Fe = "main";
4755
- const ut = "pl7.app/label", ct = "pl7.app/trace", pt = z.object({
4756
- type: z.string(),
4757
- importance: z.number().optional(),
4758
- id: z.string().optional(),
4759
- label: z.string()
4760
- }), dt = z.array(pt), ft = 1e-3, ht = "__LABEL__", Ae = "__LABEL__@1";
4761
- function Oe(t, e, n2 = {}) {
4766
+ const Fe = "staging", De = "main";
4767
+ const ct = "pl7.app/label", dt = "pl7.app/trace", pt = z$1.object({
4768
+ type: z$1.string(),
4769
+ importance: z$1.number().optional(),
4770
+ id: z$1.string().optional(),
4771
+ label: z$1.string()
4772
+ }), ft = z$1.array(pt), ht = 1e-3, gt = "__LABEL__", Pe = "__LABEL__@1";
4773
+ function Re(t, e, n2 = {}) {
4762
4774
  const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((f2) => {
4763
- var q2, F;
4775
+ var z2, F;
4764
4776
  const h = e(f2);
4765
- let d, x2, c2;
4766
- "spec" in h && typeof h.spec == "object" ? (d = h.spec, x2 = h.prefixTrace, c2 = h.suffixTrace) : d = h;
4767
- const v = (q2 = d.annotations) == null ? void 0 : q2[ut], g = (F = d.annotations) == null ? void 0 : F[ct], b = (g ? dt.safeParse(JSON.parse(g)).data : void 0) ?? [], A2 = [
4777
+ let p2, x2, c2;
4778
+ "spec" in h && typeof h.spec == "object" ? (p2 = h.spec, x2 = h.prefixTrace, c2 = h.suffixTrace) : p2 = h;
4779
+ const v = (z2 = p2.annotations) == null ? void 0 : z2[ct], g = (F = p2.annotations) == null ? void 0 : F[dt], b = (g ? ft.safeParse(JSON.parse(g)).data : void 0) ?? [], A2 = [
4768
4780
  ...x2 ?? [],
4769
4781
  ...b,
4770
4782
  ...c2 ?? []
4771
4783
  ];
4772
4784
  if (v) {
4773
- const _ = { label: v, type: ht, importance: -2 };
4774
- n2.addLabelAsSuffix ? A2.push(_) : A2.splice(0, 0, _);
4785
+ const L = { label: v, type: gt, importance: -2 };
4786
+ n2.addLabelAsSuffix ? A2.push(L) : A2.splice(0, 0, L);
4775
4787
  }
4776
4788
  const D = [], $2 = /* @__PURE__ */ new Map();
4777
- for (let _ = A2.length - 1; _ >= 0; --_) {
4778
- const { type: R } = A2[_], se = A2[_].importance ?? 0, J = ($2.get(R) ?? 0) + 1;
4789
+ for (let L = A2.length - 1; L >= 0; --L) {
4790
+ const { type: R } = A2[L], se = A2[L].importance ?? 0, J = ($2.get(R) ?? 0) + 1;
4779
4791
  $2.set(R, J);
4780
4792
  const P = `${R}@${J}`;
4781
4793
  i.set(P, (i.get(P) ?? 0) + 1), r.set(
4782
4794
  P,
4783
4795
  Math.max(
4784
4796
  r.get(P) ?? Number.NEGATIVE_INFINITY,
4785
- se - (A2.length - _) * ft
4797
+ se - (A2.length - L) * ht
4786
4798
  )
4787
- ), D.push({ ...A2[_], fullType: P, occurenceIndex: J });
4799
+ ), D.push({ ...A2[L], fullType: P, occurenceIndex: J });
4788
4800
  }
4789
4801
  return D.reverse(), {
4790
4802
  value: f2,
4791
- spec: d,
4803
+ spec: p2,
4792
4804
  label: v,
4793
4805
  fullTrace: D
4794
4806
  };
@@ -4798,8 +4810,8 @@
4798
4810
  f2.endsWith("@1") || i.get(f2) === t.length ? o.push(f2) : a.push(f2);
4799
4811
  const u2 = (f2) => {
4800
4812
  const h = [];
4801
- for (let d = 0; d < s2.length; d++) {
4802
- const x2 = s2[d], c2 = x2.fullTrace.filter((b) => f2.has(b.fullType));
4813
+ for (let p2 = 0; p2 < s2.length; p2++) {
4814
+ const x2 = s2[p2], c2 = x2.fullTrace.filter((b) => f2.has(b.fullType));
4803
4815
  if (c2.length === 0)
4804
4816
  return;
4805
4817
  const v = c2.map((b) => b.label), g = n2.separator ?? " / ";
@@ -4812,25 +4824,25 @@
4812
4824
  };
4813
4825
  if (o.length === 0) {
4814
4826
  if (a.length !== 0) throw new Error("Assertion error.");
4815
- const f2 = u2(new Set(Ae));
4827
+ const f2 = u2(new Set(Pe));
4816
4828
  if (f2 === void 0) throw new Error("Assertion error.");
4817
4829
  return f2;
4818
4830
  }
4819
- let y = 0, w2 = 0;
4820
- for (; y < o.length; ) {
4831
+ let y2 = 0, w2 = 0;
4832
+ for (; y2 < o.length; ) {
4821
4833
  const f2 = /* @__PURE__ */ new Set();
4822
- n2.includeNativeLabel && f2.add(Ae);
4823
- for (let d = 0; d < y; ++d) f2.add(o[d]);
4834
+ n2.includeNativeLabel && f2.add(Pe);
4835
+ for (let p2 = 0; p2 < y2; ++p2) f2.add(o[p2]);
4824
4836
  f2.add(o[w2]);
4825
4837
  const h = u2(f2);
4826
- if (h !== void 0 && new Set(h.map((d) => d.label)).size === t.length) return h;
4827
- w2++, w2 >= o.length && (y++, w2 = y);
4838
+ if (h !== void 0 && new Set(h.map((p2) => p2.label)).size === t.length) return h;
4839
+ w2++, w2 >= o.length && (y2++, w2 = y2);
4828
4840
  }
4829
- const p2 = u2(/* @__PURE__ */ new Set([...o, ...a]));
4830
- if (p2 === void 0) throw new Error("Assertion error.");
4831
- return p2;
4841
+ const d = u2(/* @__PURE__ */ new Set([...o, ...a]));
4842
+ if (d === void 0) throw new Error("Assertion error.");
4843
+ return d;
4832
4844
  }
4833
- const H = "PColumnData/", ne = H + "ResourceMap", re = H + "Partitioned/ResourceMap", B = H + "JsonPartitioned", K = H + "BinaryPartitioned", Re = H + "Partitioned/", ie = Re + "JsonPartitioned", U = Re + "BinaryPartitioned";
4845
+ const q = "PColumnData/", ne = q + "ResourceMap", re = q + "Partitioned/ResourceMap", B = q + "JsonPartitioned", K = q + "BinaryPartitioned", ke = q + "Partitioned/", ie = ke + "JsonPartitioned", M = ke + "BinaryPartitioned";
4834
4846
  const fe = (t) => {
4835
4847
  if (t.endsWith(".index"))
4836
4848
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
@@ -4838,7 +4850,7 @@
4838
4850
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
4839
4851
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
4840
4852
  };
4841
- function gt(t) {
4853
+ function mt(t) {
4842
4854
  if (!t) return;
4843
4855
  const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
4844
4856
  let i = 0;
@@ -4853,7 +4865,7 @@
4853
4865
  case K:
4854
4866
  i = n2.partitionKeyLength;
4855
4867
  break;
4856
- case U:
4868
+ case M:
4857
4869
  case ie:
4858
4870
  i = n2.superPartitionKeyLength + n2.partitionKeyLength;
4859
4871
  break;
@@ -4869,13 +4881,13 @@
4869
4881
  }
4870
4882
  break;
4871
4883
  case re:
4872
- case U:
4884
+ case M:
4873
4885
  case ie:
4874
4886
  for (const s2 of t.listInputFields()) {
4875
4887
  const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
4876
4888
  if (a !== void 0)
4877
4889
  for (let l2 of a.listInputFields()) {
4878
- e === U && (l2 = fe(l2).baseKey);
4890
+ e === M && (l2 = fe(l2).baseKey);
4879
4891
  const u2 = [...o, ...JSON.parse(l2)];
4880
4892
  r.push(u2);
4881
4893
  }
@@ -4884,7 +4896,7 @@
4884
4896
  }
4885
4897
  return { data: r, keyLength: i };
4886
4898
  }
4887
- function mt(t) {
4899
+ function yt(t) {
4888
4900
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
4889
4901
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
4890
4902
  const { parts: e, partitionKeyLength: n2 } = t, r = [];
@@ -4903,11 +4915,11 @@
4903
4915
  }
4904
4916
  return r.map((i) => Array.from(i.values()));
4905
4917
  }
4906
- function yt(t) {
4918
+ function vt(t) {
4907
4919
  if (t === void 0) return;
4908
4920
  if (j(t))
4909
- return mt(t);
4910
- const e = gt(t);
4921
+ return yt(t);
4922
+ const e = mt(t);
4911
4923
  if (!e) return;
4912
4924
  const { data: n2, keyLength: r } = e, i = [];
4913
4925
  for (let s2 = 0; s2 < r; ++s2)
@@ -4923,7 +4935,7 @@
4923
4935
  function he(t, e = []) {
4924
4936
  if (t === void 0 || !t.getIsReadyOrError()) return;
4925
4937
  const n2 = t.resourceType.name, r = t.getDataAsJson();
4926
- if (e.length > 0 && (n2 === ie || n2 === U))
4938
+ if (e.length > 0 && (n2 === ie || n2 === M))
4927
4939
  throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
4928
4940
  switch (n2) {
4929
4941
  case ne:
@@ -4993,7 +5005,7 @@
4993
5005
  parts: s2
4994
5006
  };
4995
5007
  }
4996
- case U: {
5008
+ case M: {
4997
5009
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4998
5010
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
4999
5011
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
@@ -5018,7 +5030,7 @@
5018
5030
  throw new Error(`Unknown resource type: ${n2}`);
5019
5031
  }
5020
5032
  }
5021
- function vt(t) {
5033
+ function bt(t) {
5022
5034
  if (t !== void 0) {
5023
5035
  if (j(t)) return t;
5024
5036
  if (mn(t)) return hn(t);
@@ -5026,7 +5038,7 @@
5026
5038
  throw new Error(`Unexpected input type: ${typeof t}`);
5027
5039
  }
5028
5040
  }
5029
- function bt(t, e) {
5041
+ function wt(t, e) {
5030
5042
  const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
5031
5043
  if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
5032
5044
  const { partitionKeyLength: s2 } = t;
@@ -5086,7 +5098,7 @@
5086
5098
  }
5087
5099
  }
5088
5100
  }
5089
- class wt {
5101
+ class At {
5090
5102
  constructor(e) {
5091
5103
  this.columns = e;
5092
5104
  }
@@ -5095,7 +5107,7 @@
5095
5107
  return this.columns.filter((r) => n2(r.spec));
5096
5108
  }
5097
5109
  }
5098
- function At(t) {
5110
+ function Pt(t) {
5099
5111
  if (t)
5100
5112
  return t.map((e) => ({
5101
5113
  type: `split:${Jn(e.axisId)}`,
@@ -5104,21 +5116,21 @@
5104
5116
  // High importance for split filters in labels
5105
5117
  }));
5106
5118
  }
5107
- function Pt(t) {
5119
+ function xt(t) {
5108
5120
  if (t)
5109
5121
  return t.map((e) => [e.axisIdx, e.value]);
5110
5122
  }
5111
- function xt(t, e) {
5123
+ function St(t, e) {
5112
5124
  if (!e || e.length === 0) return t;
5113
5125
  const n2 = [...e].sort((r, i) => r[0] - i[0]);
5114
- return _e({ id: t, axisFilters: n2 });
5126
+ return Le({ id: t, axisFilters: n2 });
5115
5127
  }
5116
5128
  function Ct(t) {
5117
5129
  if (!t || typeof t != "object") return false;
5118
5130
  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);
5119
5131
  return !!e.domainAnchor || n2 || r;
5120
5132
  }
5121
- function St(t) {
5133
+ function _t(t) {
5122
5134
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
5123
5135
  return [];
5124
5136
  const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
@@ -5128,9 +5140,9 @@
5128
5140
  }
5129
5141
  class ge {
5130
5142
  constructor() {
5131
- L(this, "defaultProviderStore", []);
5132
- L(this, "providers", [new wt(this.defaultProviderStore)]);
5133
- L(this, "axisLabelProviders", []);
5143
+ T(this, "defaultProviderStore", []);
5144
+ T(this, "providers", [new At(this.defaultProviderStore)]);
5145
+ T(this, "axisLabelProviders", []);
5134
5146
  }
5135
5147
  addColumnProvider(e) {
5136
5148
  return this.providers.push(e), this;
@@ -5156,40 +5168,40 @@
5156
5168
  ...o && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
5157
5169
  ...i ?? {}
5158
5170
  }, l2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u2 = [];
5159
- for (const p2 of l2) {
5160
- const f$1 = Ct(p2);
5171
+ for (const d of l2) {
5172
+ const f$1 = Ct(d);
5161
5173
  let h;
5162
5174
  if (f$1) {
5163
5175
  if (!r)
5164
5176
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
5165
- h = Dn(r.anchors, p2, n2);
5177
+ h = Dn(r.anchors, d, n2);
5166
5178
  } else
5167
- h = p2;
5168
- const d = /* @__PURE__ */ new Set(), x2 = [];
5179
+ h = d;
5180
+ const p2 = /* @__PURE__ */ new Set(), x2 = [];
5169
5181
  for (const g of this.providers) {
5170
5182
  const b = g.selectColumns(h);
5171
5183
  for (const A2 of b) {
5172
- if (d.has(A2.id)) throw new Error(`Duplicate column id ${A2.id} in provider ${g.constructor.name}`);
5173
- d.add(A2.id), x2.push(A2);
5184
+ if (p2.has(A2.id)) throw new Error(`Duplicate column id ${A2.id} in provider ${g.constructor.name}`);
5185
+ p2.add(A2.id), x2.push(A2);
5174
5186
  }
5175
5187
  }
5176
5188
  if (x2.length === 0) continue;
5177
- const c2 = St(p2), v = c2.length > 0;
5189
+ const c2 = _t(d), v = c2.length > 0;
5178
5190
  for (const g of x2) {
5179
5191
  if (!f(g.spec)) continue;
5180
5192
  const b = g.spec;
5181
5193
  if (v) {
5182
- const A2 = vt(g.data);
5194
+ const A2 = bt(g.data);
5183
5195
  if (!A2) {
5184
5196
  if (s2) continue;
5185
5197
  return;
5186
5198
  }
5187
- if (!ln(A2))
5199
+ if (!yn(A2))
5188
5200
  throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${A2.type} for column ${g.id}`);
5189
- const D = yt(A2), $2 = c2[c2.length - 1];
5201
+ const D = vt(A2), $2 = c2[c2.length - 1];
5190
5202
  if ($2 >= A2.partitionKeyLength)
5191
5203
  throw new Error(`Not enough partition keys (${A2.partitionKeyLength}) for requested split axes (max index ${$2}) in column ${b.name}`);
5192
- const q2 = c2.map((P) => this.findLabels(p$1(b.axesSpec[P]))), F = [], _ = (P, N2) => {
5204
+ const z2 = c2.map((P) => this.findLabels(m$2(b.axesSpec[P]))), F = [], L = (P, N2) => {
5193
5205
  if (N2 >= c2.length) {
5194
5206
  if (F.push([...P]), F.length > 1e4)
5195
5207
  throw new Error("Too many key combinations, aborting.");
@@ -5203,10 +5215,10 @@
5203
5215
  F.length = 0;
5204
5216
  return;
5205
5217
  }
5206
- for (const z2 of k2)
5207
- P.push(z2), _(P, N2 + 1), P.pop();
5218
+ for (const Y2 of k2)
5219
+ P.push(Y2), L(P, N2 + 1), P.pop();
5208
5220
  };
5209
- if (_([], 0), F.length === 0)
5221
+ if (L([], 0), F.length === 0)
5210
5222
  continue;
5211
5223
  const R = [...b.axesSpec], se = c2.map((P) => P);
5212
5224
  for (let P = c2.length - 1; P >= 0; P--)
@@ -5214,8 +5226,8 @@
5214
5226
  const J = { ...b, axesSpec: R };
5215
5227
  for (const P of F) {
5216
5228
  const N2 = P.map((O, k2) => {
5217
- const z2 = se[k2], Ne = p$1(b.axesSpec[z2]), oe = q2[k2], Be = (oe == null ? void 0 : oe[O]) ?? String(O);
5218
- return { axisIdx: z2, axisId: Ne, value: O, label: Be };
5229
+ const Y2 = se[k2], Ue = m$2(b.axesSpec[Y2]), oe = z2[k2], Be = (oe == null ? void 0 : oe[O]) ?? String(O);
5230
+ return { axisIdx: Y2, axisId: Ue, value: O, label: Be };
5219
5231
  });
5220
5232
  u2.push({
5221
5233
  type: "split",
@@ -5236,19 +5248,19 @@
5236
5248
  }
5237
5249
  }
5238
5250
  if (u2.length === 0) return [];
5239
- const y = Oe(
5251
+ const y2 = Re(
5240
5252
  u2,
5241
- (p2) => ({
5242
- spec: p2.spec,
5243
- suffixTrace: p2.type === "split" ? At(p2.axisFilters) : void 0
5253
+ (d) => ({
5254
+ spec: d.spec,
5255
+ suffixTrace: d.type === "split" ? Pt(d.axisFilters) : void 0
5244
5256
  }),
5245
5257
  a
5246
5258
  ), w2 = [];
5247
- for (const { value: p2, label: f2 } of y) {
5248
- const { originalColumn: h, spec: d } = p2, x2 = p2.type === "split" ? p2.axisFilters : void 0, c2 = Pt(x2);
5259
+ for (const { value: d, label: f2 } of y2) {
5260
+ const { originalColumn: h, spec: p2 } = d, x2 = d.type === "split" ? d.axisFilters : void 0, c2 = xt(x2);
5249
5261
  let v;
5250
- r ? v = r.deriveS(d, c2) : v = xt(h.id, c2);
5251
- let g = { ...p2.adjustedSpec };
5262
+ r ? v = r.deriveS(p2, c2) : v = St(h.id, c2);
5263
+ let g = { ...d.adjustedSpec };
5252
5264
  o && (g = {
5253
5265
  ...g,
5254
5266
  annotations: {
@@ -5258,7 +5270,7 @@
5258
5270
  }), w2.push({
5259
5271
  id: v,
5260
5272
  spec: g,
5261
- data: () => p2.type === "split" ? gn(bt(p2.dataEntries, c2)) : p2.originalColumn.data,
5273
+ data: () => d.type === "split" ? gn(wt(d.dataEntries, c2)) : d.originalColumn.data,
5262
5274
  label: f2
5263
5275
  });
5264
5276
  }
@@ -5294,12 +5306,12 @@
5294
5306
  if (t[n2] !== e[n2]) return false;
5295
5307
  return true;
5296
5308
  }
5297
- function Pe(t) {
5298
- return Fn(t, (e) => e instanceof I ? e.handle : mn(e) ? yn(e, (n2) => n2.handle) : e);
5309
+ function xe(t) {
5310
+ return Fn(t, (e) => e instanceof I ? e.handle : mn(e) ? ln(e, (n2) => n2.handle) : e);
5299
5311
  }
5300
5312
  class It {
5301
5313
  constructor() {
5302
- L(this, "ctx", m());
5314
+ T(this, "ctx", m());
5303
5315
  }
5304
5316
  /**
5305
5317
  * @deprecated use getOptions()
@@ -5308,27 +5320,28 @@
5308
5320
  return this.ctx.calculateOptions(e);
5309
5321
  }
5310
5322
  getOptions(e, n2) {
5311
- const r = typeof e == "function" ? e : Kn(e), i = this.getSpecs().entries.filter((s2) => r(s2.obj));
5312
- return typeof n2 == "object" || typeof n2 > "u" ? Oe(i, (s2) => s2.obj, n2 ?? {}).map(({ value: { ref: s2 }, label: o }) => ({
5313
- ref: s2,
5314
- label: o
5315
- })) : i.map((s2) => ({
5316
- ref: s2.ref,
5317
- label: n2(s2.obj, s2.ref)
5323
+ const r = typeof e == "function" ? e : Kn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
5324
+ let s2 = {}, o = false;
5325
+ return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.requireEnrichments ?? false))), typeof s2 == "object" ? Re(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
5326
+ ref: vn(a, o),
5327
+ label: l2
5328
+ })) : i.map(({ ref: a, obj: l2 }) => ({
5329
+ ref: vn(a, o),
5330
+ label: s2(l2, a)
5318
5331
  }));
5319
5332
  }
5320
5333
  resolveAnchorCtx(e) {
5321
- if (e instanceof $n) return e;
5334
+ if (e instanceof In) return e;
5322
5335
  const n2 = {};
5323
5336
  for (const [r, i] of Object.entries(e))
5324
- if (Tn(i)) {
5337
+ if (Mn(i)) {
5325
5338
  const s2 = this.getPColumnSpecByRef(i);
5326
5339
  if (!s2)
5327
5340
  return;
5328
5341
  n2[r] = s2;
5329
5342
  } else
5330
5343
  n2[r] = i;
5331
- return new $n(n2);
5344
+ return new In(n2);
5332
5345
  }
5333
5346
  /**
5334
5347
  * Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
@@ -5421,7 +5434,7 @@
5421
5434
  ref: n2.ref,
5422
5435
  obj: {
5423
5436
  ...n2.obj,
5424
- data: _n(
5437
+ data: qn(
5425
5438
  n2.obj.data,
5426
5439
  (r) => new I(r, [n2.ref.blockId, n2.ref.name])
5427
5440
  )
@@ -5513,7 +5526,7 @@
5513
5526
  findLabels(e) {
5514
5527
  const n2 = this.getData();
5515
5528
  for (const r of n2.entries) {
5516
- if (!q(r.obj)) continue;
5529
+ if (!Z$1(r.obj)) continue;
5517
5530
  const i = r.obj.spec;
5518
5531
  if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && le(e.domain, i.axesSpec[0].domain)) {
5519
5532
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
@@ -5540,7 +5553,7 @@
5540
5553
  let a = null;
5541
5554
  const l2 = this;
5542
5555
  return {
5543
- id: _e(i),
5556
+ id: Le(i),
5544
5557
  spec: o,
5545
5558
  get data() {
5546
5559
  var u2;
@@ -5567,11 +5580,11 @@
5567
5580
  }
5568
5581
  class X {
5569
5582
  constructor() {
5570
- L(this, "ctx");
5571
- L(this, "args");
5572
- L(this, "uiState");
5573
- L(this, "_activeArgsCache");
5574
- L(this, "resultPool", new It());
5583
+ T(this, "ctx");
5584
+ T(this, "args");
5585
+ T(this, "uiState");
5586
+ T(this, "_activeArgsCache");
5587
+ T(this, "resultPool", new It());
5575
5588
  this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5576
5589
  }
5577
5590
  /**
@@ -5588,16 +5601,16 @@
5588
5601
  // return this.ctx.featureFlags;
5589
5602
  // }
5590
5603
  getNamedAccessor(e) {
5591
- return pe(
5604
+ return de(
5592
5605
  this.ctx.getAccessorHandleByName(e),
5593
5606
  (n2) => new I(n2, [e])
5594
5607
  );
5595
5608
  }
5596
5609
  get prerun() {
5597
- return this.getNamedAccessor(Ee);
5610
+ return this.getNamedAccessor(Fe);
5598
5611
  }
5599
5612
  get outputs() {
5600
- return this.getNamedAccessor(Fe);
5613
+ return this.getNamedAccessor(De);
5601
5614
  }
5602
5615
  /**
5603
5616
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -5615,7 +5628,7 @@
5615
5628
  // TODO remove all non-PColumn fields
5616
5629
  createPFrame(e) {
5617
5630
  return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
5618
- e.map((n2) => Pe(n2))
5631
+ e.map((n2) => xe(n2))
5619
5632
  );
5620
5633
  }
5621
5634
  createPTable(e) {
@@ -5628,7 +5641,7 @@
5628
5641
  filters: e.filters ?? [],
5629
5642
  sorting: e.sorting ?? []
5630
5643
  } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Un(n2.src)), this.ctx.createPTable(
5631
- On(n2, (r) => Pe(r))
5644
+ On(n2, (r) => xe(r))
5632
5645
  );
5633
5646
  }
5634
5647
  /** @deprecated scheduled for removal from SDK */
@@ -5636,37 +5649,37 @@
5636
5649
  return this.ctx.getBlockLabel(e);
5637
5650
  }
5638
5651
  getCurrentUnstableMarker() {
5639
- if (!(typeof this.ctx.getCurrentUnstableMarker > "u"))
5640
- return this.ctx.getCurrentUnstableMarker();
5652
+ return this.ctx.getCurrentUnstableMarker();
5641
5653
  }
5642
5654
  }
5643
- const M = "1.29.22";
5644
- function _t(t) {
5655
+ const W = "1.30.0";
5656
+ function Lt(t) {
5645
5657
  return t.__renderLambda === true;
5646
5658
  }
5647
5659
  function ue(t) {
5648
5660
  if (t !== void 0)
5649
- return _t(t) ? t.handle : t;
5661
+ return Lt(t) ? t.handle : t;
5650
5662
  }
5651
- class T {
5652
- constructor(e, n2, r, i, s2, o, a) {
5653
- this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a;
5663
+ class _ {
5664
+ constructor(e, n2, r, i, s2, o, a, l2) {
5665
+ this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a, this._enrichmentTargets = l2;
5654
5666
  }
5655
5667
  static create(e = "Heavy") {
5656
- return new T(
5668
+ return new _(
5657
5669
  e,
5658
5670
  void 0,
5659
5671
  {},
5660
5672
  {},
5661
5673
  Z(true),
5662
5674
  Z([]),
5675
+ void 0,
5663
5676
  void 0
5664
5677
  );
5665
5678
  }
5666
5679
  output(e, n2, r = {}) {
5667
5680
  if (typeof n2 == "function") {
5668
5681
  const i = `output#${e}`;
5669
- return Y(i, () => n2(new X())), new T(
5682
+ return U(i, () => n2(new X())), new _(
5670
5683
  this._renderingMode,
5671
5684
  this._initialArgs,
5672
5685
  this._initialUiState,
@@ -5680,10 +5693,11 @@
5680
5693
  },
5681
5694
  this._inputsValid,
5682
5695
  this._sections,
5683
- this._title
5696
+ this._title,
5697
+ this._enrichmentTargets
5684
5698
  );
5685
5699
  } else
5686
- return new T(
5700
+ return new _(
5687
5701
  this._renderingMode,
5688
5702
  this._initialArgs,
5689
5703
  this._initialUiState,
@@ -5693,7 +5707,8 @@
5693
5707
  },
5694
5708
  this._inputsValid,
5695
5709
  this._sections,
5696
- this._title
5710
+ this._title,
5711
+ this._enrichmentTargets
5697
5712
  );
5698
5713
  }
5699
5714
  /** Shortcut for {@link output} with retentive flag set to true. */
@@ -5701,7 +5716,7 @@
5701
5716
  return this.output(e, n2, { retentive: true });
5702
5717
  }
5703
5718
  argsValid(e) {
5704
- return typeof e == "function" ? (Y("inputsValid", () => e(new X())), new T(
5719
+ return typeof e == "function" ? (U("inputsValid", () => e(new X())), new _(
5705
5720
  this._renderingMode,
5706
5721
  this._initialArgs,
5707
5722
  this._initialUiState,
@@ -5711,46 +5726,51 @@
5711
5726
  handle: "inputsValid"
5712
5727
  },
5713
5728
  this._sections,
5714
- this._title
5715
- )) : new T(
5729
+ this._title,
5730
+ this._enrichmentTargets
5731
+ )) : new _(
5716
5732
  this._renderingMode,
5717
5733
  this._initialArgs,
5718
5734
  this._initialUiState,
5719
5735
  this._outputs,
5720
5736
  e,
5721
5737
  this._sections,
5722
- this._title
5738
+ this._title,
5739
+ this._enrichmentTargets
5723
5740
  );
5724
5741
  }
5725
5742
  sections(e) {
5726
- return Array.isArray(e) ? this.sections(Z(e)) : typeof e == "function" ? (Y("sections", () => e(new X())), new T(
5743
+ return Array.isArray(e) ? this.sections(Z(e)) : typeof e == "function" ? (U("sections", () => e(new X())), new _(
5727
5744
  this._renderingMode,
5728
5745
  this._initialArgs,
5729
5746
  this._initialUiState,
5730
5747
  this._outputs,
5731
5748
  this._inputsValid,
5732
5749
  { __renderLambda: true, handle: "sections" },
5733
- this._title
5734
- )) : new T(
5750
+ this._title,
5751
+ this._enrichmentTargets
5752
+ )) : new _(
5735
5753
  this._renderingMode,
5736
5754
  this._initialArgs,
5737
5755
  this._initialUiState,
5738
5756
  this._outputs,
5739
5757
  this._inputsValid,
5740
5758
  e,
5741
- this._title
5759
+ this._title,
5760
+ this._enrichmentTargets
5742
5761
  );
5743
5762
  }
5744
5763
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
5745
5764
  title(e) {
5746
- return Y("title", () => e(new X())), new T(
5765
+ return U("title", () => e(new X())), new _(
5747
5766
  this._renderingMode,
5748
5767
  this._initialArgs,
5749
5768
  this._initialUiState,
5750
5769
  this._outputs,
5751
5770
  this._inputsValid,
5752
5771
  this._sections,
5753
- { __renderLambda: true, handle: "title" }
5772
+ { __renderLambda: true, handle: "title" },
5773
+ this._enrichmentTargets
5754
5774
  );
5755
5775
  }
5756
5776
  /**
@@ -5758,38 +5778,57 @@
5758
5778
  * @deprecated use {@link withArgs}
5759
5779
  * */
5760
5780
  initialArgs(e) {
5761
- return new T(
5781
+ return new _(
5762
5782
  this._renderingMode,
5763
5783
  e,
5764
5784
  this._initialUiState,
5765
5785
  this._outputs,
5766
5786
  this._inputsValid,
5767
5787
  this._sections,
5768
- this._title
5788
+ this._title,
5789
+ this._enrichmentTargets
5769
5790
  );
5770
5791
  }
5771
5792
  /** Sets initial args for the block, this value must be specified. */
5772
5793
  withArgs(e) {
5773
- return new T(
5794
+ return new _(
5774
5795
  this._renderingMode,
5775
5796
  e,
5776
5797
  this._initialUiState,
5777
5798
  this._outputs,
5778
5799
  this._inputsValid,
5779
5800
  this._sections,
5780
- this._title
5801
+ this._title,
5802
+ this._enrichmentTargets
5781
5803
  );
5782
5804
  }
5783
5805
  /** Defines type and sets initial value for block UiState. */
5784
5806
  withUiState(e) {
5785
- return new T(
5807
+ return new _(
5786
5808
  this._renderingMode,
5787
5809
  this._initialArgs,
5788
5810
  e,
5789
5811
  this._outputs,
5790
5812
  this._inputsValid,
5791
5813
  this._sections,
5792
- this._title
5814
+ this._title,
5815
+ this._enrichmentTargets
5816
+ );
5817
+ }
5818
+ /**
5819
+ * Defines how to derive list of upstream references this block is meant to enrich with its exports from block args.
5820
+ * Influences dependency graph construction.
5821
+ */
5822
+ enriches(e) {
5823
+ return U("enrichmentTargets", e), new _(
5824
+ this._renderingMode,
5825
+ this._initialArgs,
5826
+ this._initialUiState,
5827
+ this._outputs,
5828
+ this._inputsValid,
5829
+ this._sections,
5830
+ this._title,
5831
+ { __renderLambda: true, handle: "enrichmentTargets" }
5793
5832
  );
5794
5833
  }
5795
5834
  /** Renders all provided block settings into a pre-configured platforma API
@@ -5799,17 +5838,18 @@
5799
5838
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
5800
5839
  const e = {
5801
5840
  v3: {
5802
- sdkVersion: M,
5841
+ sdkVersion: W,
5803
5842
  renderingMode: this._renderingMode,
5804
5843
  initialArgs: this._initialArgs,
5805
5844
  initialUiState: this._initialUiState,
5806
5845
  inputsValid: this._inputsValid,
5807
5846
  sections: this._sections,
5808
5847
  title: this._title,
5809
- outputs: this._outputs
5848
+ outputs: this._outputs,
5849
+ enrichmentTargets: this._enrichmentTargets
5810
5850
  },
5811
5851
  // fields below are added to allow previous desktop versions read generated configs
5812
- sdkVersion: M,
5852
+ sdkVersion: W,
5813
5853
  renderingMode: this._renderingMode,
5814
5854
  initialArgs: this._initialArgs,
5815
5855
  inputsValid: ue(this._inputsValid),
@@ -5818,17 +5858,20 @@
5818
5858
  Object.entries(this._outputs).map(([n2, r]) => [n2, ue(r)])
5819
5859
  )
5820
5860
  };
5821
- return it() ? Te({ sdkVersion: M }) : { config: e };
5861
+ return st() ? Ee({ sdkVersion: W }) : { config: e };
5822
5862
  }
5823
5863
  }
5824
- function je(t) {
5864
+ function Tt(t) {
5865
+ return JSON.parse(t);
5866
+ }
5867
+ function Ve(t) {
5825
5868
  return new ge().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
5826
5869
  name: "pl7.app/label",
5827
5870
  axes: [{}]
5828
5871
  // exactly one axis
5829
5872
  }, { dontWaitAllData: true });
5830
5873
  }
5831
- function Ve(t, e) {
5874
+ function Ke(t, e) {
5832
5875
  const n2 = (i, s2) => {
5833
5876
  let o = i.toString();
5834
5877
  if (s2)
@@ -5838,15 +5881,15 @@
5838
5881
  }, r = /* @__PURE__ */ new Map();
5839
5882
  for (const i of t)
5840
5883
  for (const s2 of i.spec.axesSpec) {
5841
- const o = p$1(s2);
5884
+ const o = m$2(s2);
5842
5885
  for (const a of e) {
5843
- const l2 = a.spec.axesSpec[0], u2 = p$1(a.spec.axesSpec[0]);
5844
- if (G(o, u2)) {
5845
- const y = Object.keys(o.domain ?? {}).length, w2 = Object.keys(u2.domain ?? {}).length;
5846
- if (y > w2) {
5847
- const p2 = n2(a.id, o.domain);
5848
- r.set(p2, {
5849
- id: p2,
5886
+ const l2 = a.spec.axesSpec[0], u2 = m$2(a.spec.axesSpec[0]);
5887
+ if (X$1(o, u2)) {
5888
+ const y2 = Object.keys(o.domain ?? {}).length, w2 = Object.keys(u2.domain ?? {}).length;
5889
+ if (y2 > w2) {
5890
+ const d = n2(a.id, o.domain);
5891
+ r.set(d, {
5892
+ id: d,
5850
5893
  spec: {
5851
5894
  ...a.spec,
5852
5895
  axesSpec: [{ ...o, annotations: l2.annotations }]
@@ -5860,7 +5903,7 @@
5860
5903
  }
5861
5904
  return [...r.values()];
5862
5905
  }
5863
- function Ke(t) {
5906
+ function $e(t) {
5864
5907
  const e = (i) => Array.isArray(i), n2 = (i) => i instanceof I, r = (i) => typeof i == "object" && "type" in i;
5865
5908
  return t.map((i) => i.data).every((i) => {
5866
5909
  if (e(i))
@@ -5880,7 +5923,7 @@
5880
5923
  throw Error(`unsupported column data type: ${i}`);
5881
5924
  });
5882
5925
  }
5883
- function $e(t, e, n2, r, i, s2) {
5926
+ function Je(t, e, n2, r, i, s2) {
5884
5927
  let o = t;
5885
5928
  const a = [];
5886
5929
  if (s2) {
@@ -5902,17 +5945,55 @@
5902
5945
  };
5903
5946
  }
5904
5947
  function Cn(t, e, n2, r) {
5905
- var u2, y;
5948
+ var u2, y2;
5906
5949
  Array.isArray(r) && (r = { filters: r });
5907
- const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s2 = [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []], o = ((y = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : y.sorting) ?? [], a = je(t.resultPool);
5950
+ const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s2 = [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []], o = ((y2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : y2.sorting) ?? [], a = Ve(t.resultPool);
5908
5951
  if (!a) return;
5909
- const l2 = Ve(e.map(Cn$1), a);
5910
- if (Ke([...e, ...l2]))
5952
+ const l2 = Ke(e.map(Cn$1), a);
5953
+ if ($e([...e, ...l2]))
5911
5954
  return t.createPTable(
5912
- $e(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
5955
+ Je(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
5913
5956
  );
5914
5957
  }
5915
- const ImportFileHandleSchema = z.string().optional().refine(
5958
+ function Et(t) {
5959
+ var e;
5960
+ return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
5961
+ }
5962
+ function _n(t, e, n2, r, i) {
5963
+ var p2, x2;
5964
+ const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((p2 = r == null ? void 0 : r.pTableParams) == null ? void 0 : p2.filters) ?? []], a = ((x2 = r == null ? void 0 : r.pTableParams) == null ? void 0 : x2.sorting) ?? [], l2 = e.find((c2) => n2(c2.spec));
5965
+ if (!l2) return;
5966
+ const u2 = Ve(t.resultPool);
5967
+ if (!u2) return;
5968
+ const y2 = new Set((() => {
5969
+ var v, g;
5970
+ if (s2 === "inner") return [];
5971
+ const c2 = (g = (v = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : v.hiddenColIds) == null ? void 0 : g.map(Tt).filter((b) => b.type === "column").map((b) => b.id);
5972
+ return c2 || e.filter((b) => Et(b.spec)).map((b) => b.id);
5973
+ })());
5974
+ y2.delete(l2.id), [...o.map((c2) => c2.column), ...a.map((c2) => c2.column)].filter((c2) => c2.type === "column").map((c2) => y2.delete(c2.id));
5975
+ const w2 = e.filter((c2) => !y2.has(c2.id)), d = Ke(w2.map(Cn$1), u2), f2 = [
5976
+ ...l2.spec.axesSpec.map((c2) => ({
5977
+ type: "axis",
5978
+ id: m$2(c2),
5979
+ spec: c2
5980
+ })),
5981
+ ...[...e, ...d].map((c2) => ({
5982
+ type: "column",
5983
+ id: c2.id,
5984
+ spec: c2.spec
5985
+ }))
5986
+ ];
5987
+ if (!$e([...w2, ...d])) return;
5988
+ const h = t.createPTable(
5989
+ Je(e, d, s2, o, a, i == null ? void 0 : i.coreColumnPredicate)
5990
+ );
5991
+ return {
5992
+ tableSpec: f2,
5993
+ tableHandle: h
5994
+ };
5995
+ }
5996
+ const ImportFileHandleSchema = z$1.string().optional().refine(
5916
5997
  (_a) => true
5917
5998
  );
5918
5999
  function* range(from, to, step = 1) {
@@ -5922,20 +6003,20 @@
5922
6003
  }
5923
6004
  function toList(iterable) {
5924
6005
  const lst = [];
5925
- for (const it2 of iterable) {
5926
- lst.push(it2);
6006
+ for (const it of iterable) {
6007
+ lst.push(it);
5927
6008
  }
5928
6009
  return lst;
5929
6010
  }
5930
6011
  function times(n2, cb) {
5931
6012
  return toList(range(0, n2)).map(cb);
5932
6013
  }
5933
- const $BlockArgs = z.object({
5934
- tableNumRows: z.number().default(100),
5935
- numbers: z.array(z.coerce.number()),
5936
- handles: z.array(ImportFileHandleSchema)
6014
+ const $BlockArgs = z$1.object({
6015
+ tableNumRows: z$1.number().default(100),
6016
+ numbers: z$1.array(z$1.coerce.number()),
6017
+ handles: z$1.array(ImportFileHandleSchema)
5937
6018
  });
5938
- const platforma = T.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
6019
+ const platforma = _.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
5939
6020
  if (ctx.args.numbers.length === 5) {
5940
6021
  throw new Error("argsValid: test error");
5941
6022
  }
@@ -5949,7 +6030,7 @@
5949
6030
  const progresses = m2 == null ? void 0 : m2.mapFields((name, val) => [name, val == null ? void 0 : val.getImportProgress()]);
5950
6031
  return Object.fromEntries(progresses ?? []);
5951
6032
  }).output("pt", (ctx) => {
5952
- var _a, _b, _c, _d, _e2;
6033
+ var _a, _b, _c, _d, _e;
5953
6034
  if (!((_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.filters)) return void 0;
5954
6035
  const data = times(ctx.args.tableNumRows ?? 0, (i) => {
5955
6036
  const v = i + 1;
@@ -5997,7 +6078,63 @@
5997
6078
  {
5998
6079
  filters: [
5999
6080
  ...((_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters) ?? [],
6000
- ...((_e2 = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e2.filters) ?? []
6081
+ ...((_e = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e.filters) ?? []
6082
+ ]
6083
+ }
6084
+ );
6085
+ }).output("ptV2", (ctx) => {
6086
+ var _a, _b, _c, _d, _e;
6087
+ if (!((_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.filters)) return void 0;
6088
+ const data = times(ctx.args.tableNumRows ?? 0, (i) => {
6089
+ const v = i + 1;
6090
+ return {
6091
+ key: [v, v + 0.1],
6092
+ val: v.toString()
6093
+ };
6094
+ });
6095
+ return _n(
6096
+ ctx,
6097
+ [
6098
+ {
6099
+ id: "example",
6100
+ spec: {
6101
+ kind: "PColumn",
6102
+ valueType: "String",
6103
+ name: "example",
6104
+ annotations: {
6105
+ "pl7.app/label": "String column",
6106
+ "pl7.app/discreteValues": '["up","down"]'
6107
+ },
6108
+ axesSpec: [
6109
+ {
6110
+ type: "Int",
6111
+ name: "index",
6112
+ annotations: {
6113
+ "pl7.app/label": "Int axis",
6114
+ "pl7.app/discreteValues": "[1,2]"
6115
+ }
6116
+ },
6117
+ {
6118
+ type: "Float",
6119
+ name: "value",
6120
+ annotations: {
6121
+ "pl7.app/label": "Float axis",
6122
+ "pl7.app/table/visibility": "optional"
6123
+ }
6124
+ }
6125
+ ]
6126
+ },
6127
+ data
6128
+ }
6129
+ ],
6130
+ Kn({
6131
+ name: "example"
6132
+ }),
6133
+ ctx.uiState.dataTableState.tableState,
6134
+ {
6135
+ filters: [
6136
+ ...((_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters) ?? [],
6137
+ ...((_e = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e.filters) ?? []
6001
6138
  ]
6002
6139
  }
6003
6140
  );
@@ -6007,12 +6144,12 @@
6007
6144
  }
6008
6145
  return "Ui Examples";
6009
6146
  }).sections((ctx) => {
6010
- const dynamicSections = (ctx.uiState.dynamicSections ?? []).map((it2) => ({
6147
+ const dynamicSections = (ctx.uiState.dynamicSections ?? []).map((it) => ({
6011
6148
  type: "link",
6012
- href: `/section?id=${it2.id}`,
6013
- label: it2.label
6149
+ href: `/section?id=${it.id}`,
6150
+ label: it.label
6014
6151
  }));
6015
- if (dynamicSections.some((it2) => it2.label === "Error")) {
6152
+ if (dynamicSections.some((it) => it.label === "Error")) {
6016
6153
  throw new Error("sections: test error");
6017
6154
  }
6018
6155
  return [
@@ -6029,6 +6166,7 @@
6029
6166
  { type: "link", href: "/ag-grid-vue", label: "AgGridVue" },
6030
6167
  { type: "link", href: "/ag-grid-vue-with-builder", label: "AgGridVue with builder" },
6031
6168
  { type: "link", href: "/pl-ag-data-table", label: "PlAgDataTable" },
6169
+ { type: "link", href: "/pl-ag-data-table-v2", label: "PlAgDataTableV2" },
6032
6170
  { type: "link", href: "/pl-splash-page", label: "PlSplashPage" },
6033
6171
  { type: "link", href: "/errors", label: "Errors" },
6034
6172
  { type: "link", href: "/text-fields", label: "PlTextField" },