@milaboratories/milaboratories.ui-examples.model 1.1.34 → 1.1.36

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
@@ -443,12 +443,12 @@
443
443
  }
444
444
  static mergeArray(status, results) {
445
445
  const arrayValue = [];
446
- for (const s of results) {
447
- if (s.status === "aborted")
446
+ for (const s2 of results) {
447
+ if (s2.status === "aborted")
448
448
  return INVALID;
449
- if (s.status === "dirty")
449
+ if (s2.status === "dirty")
450
450
  status.dirty();
451
- arrayValue.push(s.value);
451
+ arrayValue.push(s2.value);
452
452
  }
453
453
  return { status: status.value, value: arrayValue };
454
454
  }
@@ -3949,15 +3949,15 @@
3949
3949
  ZodError
3950
3950
  });
3951
3951
  var $ = Object.defineProperty;
3952
- var L = (n, t, e) => t in n ? $(n, t, { enumerable: true, configurable: true, writable: true, value: e }) : n[t] = e;
3953
- var p = (n, t, e) => L(n, typeof t != "symbol" ? t + "" : t, e);
3954
- function w(n) {
3955
- throw new Error("Unexpected object: " + n);
3952
+ var L = (n2, t, e) => t in n2 ? $(n2, t, { enumerable: true, configurable: true, writable: true, value: e }) : n2[t] = e;
3953
+ var p$1 = (n2, t, e) => L(n2, typeof t != "symbol" ? t + "" : t, e);
3954
+ function w(n2) {
3955
+ throw new Error("Unexpected object: " + n2);
3956
3956
  }
3957
- function dn(n) {
3958
- if (!n || typeof n != "object")
3957
+ function dn(n2) {
3958
+ if (!n2 || typeof n2 != "object")
3959
3959
  return false;
3960
- const t = n;
3960
+ const t = n2;
3961
3961
  if (!("type" in t))
3962
3962
  return false;
3963
3963
  switch (t.type) {
@@ -3971,119 +3971,126 @@
3971
3971
  return false;
3972
3972
  }
3973
3973
  }
3974
- function pn(n, t) {
3975
- if (n !== void 0)
3976
- switch (n.type) {
3974
+ function pn(n2, t) {
3975
+ if (n2 !== void 0)
3976
+ switch (n2.type) {
3977
3977
  case "Json":
3978
- return n;
3978
+ return n2;
3979
3979
  case "JsonPartitioned": {
3980
3980
  const e = {};
3981
- for (const [r, o] of Object.entries(n.parts))
3981
+ for (const [r, o] of Object.entries(n2.parts))
3982
3982
  e[r] = t(o);
3983
3983
  return {
3984
- ...n,
3984
+ ...n2,
3985
3985
  parts: e
3986
3986
  };
3987
3987
  }
3988
3988
  case "BinaryPartitioned": {
3989
3989
  const e = {};
3990
- for (const [r, o] of Object.entries(n.parts))
3990
+ for (const [r, o] of Object.entries(n2.parts))
3991
3991
  e[r] = {
3992
3992
  index: t(o.index),
3993
3993
  values: t(o.values)
3994
3994
  };
3995
3995
  return {
3996
- ...n,
3996
+ ...n2,
3997
3997
  parts: e
3998
3998
  };
3999
3999
  }
4000
4000
  }
4001
4001
  }
4002
- function ln(n) {
4003
- switch (n.type) {
4002
+ function ln(n2) {
4003
+ switch (n2.type) {
4004
4004
  case "Json": {
4005
4005
  const t = {};
4006
- for (const e of n.data)
4006
+ for (const e of n2.data)
4007
4007
  t[JSON.stringify(e.key)] = e.value;
4008
4008
  return {
4009
4009
  type: "Json",
4010
- keyLength: n.keyLength,
4010
+ keyLength: n2.keyLength,
4011
4011
  data: t
4012
4012
  };
4013
4013
  }
4014
4014
  case "JsonPartitioned": {
4015
4015
  const t = {};
4016
- for (const e of n.parts)
4016
+ for (const e of n2.parts)
4017
4017
  t[JSON.stringify(e.key)] = e.value;
4018
4018
  return {
4019
4019
  type: "JsonPartitioned",
4020
- partitionKeyLength: n.partitionKeyLength,
4020
+ partitionKeyLength: n2.partitionKeyLength,
4021
4021
  parts: t
4022
4022
  };
4023
4023
  }
4024
4024
  case "BinaryPartitioned": {
4025
4025
  const t = {};
4026
- for (const e of n.parts)
4026
+ for (const e of n2.parts)
4027
4027
  t[JSON.stringify(e.key)] = e.value;
4028
4028
  return {
4029
4029
  type: "BinaryPartitioned",
4030
- partitionKeyLength: n.partitionKeyLength,
4030
+ partitionKeyLength: n2.partitionKeyLength,
4031
4031
  parts: t
4032
4032
  };
4033
4033
  }
4034
4034
  }
4035
4035
  }
4036
- function m(n) {
4037
- const { type: t, name: e, domain: r } = n;
4036
+ function y(n2) {
4037
+ const { type: t, name: e, domain: r } = n2;
4038
4038
  return { type: t, name: e, ...r && { domain: r } };
4039
4039
  }
4040
- function Sn(n) {
4041
- return g(m(n));
4040
+ function Sn(n2) {
4041
+ return g(y(n2));
4042
4042
  }
4043
- function W(n, t) {
4044
- if (n === void 0) return t === void 0;
4043
+ function W(n2, t) {
4044
+ if (n2 === void 0) return t === void 0;
4045
4045
  if (t === void 0) return true;
4046
4046
  for (const e in t)
4047
- if (n[e] !== t[e]) return false;
4047
+ if (n2[e] !== t[e]) return false;
4048
4048
  return true;
4049
4049
  }
4050
- function X(n, t) {
4051
- return n.name === t.name && W(n.domain, t.domain);
4050
+ function X(n2, t) {
4051
+ return n2.name === t.name && W(n2.domain, t.domain);
4052
4052
  }
4053
- function En(n, t) {
4054
- return { ...n, src: l(n.src, t) };
4053
+ function En(n2, t) {
4054
+ return { ...n2, src: l$1(n2.src, t) };
4055
4055
  }
4056
- function l(n, t) {
4057
- switch (n.type) {
4056
+ function l$1(n2, t) {
4057
+ switch (n2.type) {
4058
4058
  case "column":
4059
4059
  return {
4060
4060
  type: "column",
4061
- column: t(n.column)
4061
+ column: t(n2.column)
4062
+ };
4063
+ case "slicedColumn":
4064
+ return {
4065
+ type: "slicedColumn",
4066
+ column: t(n2.column),
4067
+ newId: n2.newId,
4068
+ axisFilters: n2.axisFilters
4062
4069
  };
4063
4070
  case "inner":
4064
4071
  case "full":
4065
4072
  return {
4066
- type: n.type,
4067
- entries: n.entries.map((e) => l(e, t))
4073
+ type: n2.type,
4074
+ entries: n2.entries.map((e) => l$1(e, t))
4068
4075
  };
4069
4076
  case "outer":
4070
4077
  return {
4071
4078
  type: "outer",
4072
- primary: l(n.primary, t),
4073
- secondary: n.secondary.map((e) => l(e, t))
4079
+ primary: l$1(n2.primary, t),
4080
+ secondary: n2.secondary.map((e) => l$1(e, t))
4074
4081
  };
4075
4082
  default:
4076
- w(n);
4083
+ w(n2);
4077
4084
  }
4078
4085
  }
4079
- function z$1(n) {
4080
- return g(n);
4086
+ function z$1(n2) {
4087
+ return g(n2);
4081
4088
  }
4082
- function P(n) {
4083
- return g(m(n));
4089
+ function P(n2) {
4090
+ return g(y(n2));
4084
4091
  }
4085
- function x(n, t) {
4086
- return JSON.stringify([n, t]);
4092
+ function x(n2, t) {
4093
+ return JSON.stringify([n2, t]);
4087
4094
  }
4088
4095
  class On {
4089
4096
  /**
@@ -4091,24 +4098,24 @@
4091
4098
  * @param anchors Record of anchor column specifications indexed by anchor ID
4092
4099
  */
4093
4100
  constructor(t) {
4094
- p(this, "domains", /* @__PURE__ */ new Map());
4095
- p(this, "axes", /* @__PURE__ */ new Map());
4096
- p(this, "domainPacks", []);
4097
- p(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
4101
+ p$1(this, "domains", /* @__PURE__ */ new Map());
4102
+ p$1(this, "axes", /* @__PURE__ */ new Map());
4103
+ p$1(this, "domainPacks", []);
4104
+ p$1(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
4098
4105
  this.anchors = t;
4099
4106
  const e = Object.entries(t);
4100
4107
  e.sort((r, o) => r[0].localeCompare(o[0]));
4101
4108
  for (const [r, o] of e) {
4102
4109
  for (let i = 0; i < o.axesSpec.length; i++) {
4103
- const s = o.axesSpec[i], a = P(s);
4104
- this.axes.set(a, { anchor: r, idx: i });
4110
+ const a = o.axesSpec[i], s2 = P(a);
4111
+ this.axes.set(s2, { anchor: r, idx: i });
4105
4112
  }
4106
4113
  if (o.domain !== void 0) {
4107
4114
  const i = Object.entries(o.domain);
4108
- i.sort((s, a) => s[0].localeCompare(a[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([s]) => s));
4109
- for (const [s, a] of i) {
4110
- const c = x(s, a);
4111
- this.domains.set(c, r);
4115
+ i.sort((a, s2) => a[0].localeCompare(s2[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([a]) => a));
4116
+ for (const [a, s2] of i) {
4117
+ const u2 = x(a, s2);
4118
+ this.domains.set(u2, r);
4112
4119
  }
4113
4120
  }
4114
4121
  }
@@ -4124,47 +4131,47 @@
4124
4131
  let o;
4125
4132
  if (t.domain !== void 0)
4126
4133
  n:
4127
- for (const s of this.domainPacks) {
4128
- const a = [];
4129
- for (const u of s) {
4130
- const d = t.domain[u];
4134
+ for (const a of this.domainPacks) {
4135
+ const s2 = [];
4136
+ for (const c2 of a) {
4137
+ const d = t.domain[c2];
4131
4138
  if (d !== void 0)
4132
- a.push([u, d]);
4139
+ s2.push([c2, d]);
4133
4140
  else
4134
4141
  break n;
4135
4142
  }
4136
- const c = this.domainPackToAnchor.get(JSON.stringify(a));
4137
- if (c !== void 0) {
4138
- r.domainAnchor = c, o = new Set(s);
4143
+ const u2 = this.domainPackToAnchor.get(JSON.stringify(s2));
4144
+ if (u2 !== void 0) {
4145
+ r.domainAnchor = u2, o = new Set(a);
4139
4146
  break;
4140
4147
  }
4141
4148
  }
4142
- for (const [s, a] of Object.entries(t.domain ?? {})) {
4143
- if (o !== void 0 && o.has(s))
4149
+ for (const [a, s2] of Object.entries(t.domain ?? {})) {
4150
+ if (o !== void 0 && o.has(a))
4144
4151
  continue;
4145
- const c = x(s, a), u = this.domains.get(c);
4146
- r.domain ?? (r.domain = {}), r.domain[s] = u ? { anchor: u } : a;
4152
+ const u2 = x(a, s2), c2 = this.domains.get(u2);
4153
+ r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : s2;
4147
4154
  }
4148
- if (r.axes = t.axesSpec.map((s) => {
4149
- const a = P(s);
4150
- return this.axes.get(a) ?? s;
4155
+ if (r.axes = t.axesSpec.map((a) => {
4156
+ const s2 = P(a);
4157
+ return this.axes.get(s2) ?? a;
4151
4158
  }), !e || e.length === 0)
4152
4159
  return r;
4153
4160
  const i = [];
4154
- for (const s of e) {
4155
- const [a, c] = s;
4156
- if (typeof a == "number") {
4157
- if (a < 0 || a >= t.axesSpec.length)
4158
- throw new Error(`Axis index ${a} is out of bounds (0-${t.axesSpec.length - 1})`);
4159
- i.push([a, c]);
4161
+ for (const a of e) {
4162
+ const [s2, u2] = a;
4163
+ if (typeof s2 == "number") {
4164
+ if (s2 < 0 || s2 >= t.axesSpec.length)
4165
+ throw new Error(`Axis index ${s2} is out of bounds (0-${t.axesSpec.length - 1})`);
4166
+ i.push([s2, u2]);
4160
4167
  } else {
4161
- const u = t.axesSpec.findIndex((d) => d.name === a);
4162
- if (u === -1)
4163
- throw new Error(`Axis with name "${a}" not found in the column specification`);
4164
- i.push([u, c]);
4168
+ const c2 = t.axesSpec.findIndex((d) => d.name === s2);
4169
+ if (c2 === -1)
4170
+ throw new Error(`Axis with name "${s2}" not found in the column specification`);
4171
+ i.push([c2, u2]);
4165
4172
  }
4166
4173
  }
4167
- return i.sort((s, a) => s[0] - a[0]), {
4174
+ return i.sort((a, s2) => a[0] - s2[0]), {
4168
4175
  source: r,
4169
4176
  axisFilters: i
4170
4177
  };
@@ -4179,10 +4186,10 @@
4179
4186
  return z$1(this.derive(t, e));
4180
4187
  }
4181
4188
  }
4182
- function Jn(n, t) {
4189
+ function Jn(n2, t) {
4183
4190
  const e = { ...t };
4184
4191
  if (e.domainAnchor !== void 0) {
4185
- const r = n[e.domainAnchor];
4192
+ const r = n2[e.domainAnchor];
4186
4193
  if (!r)
4187
4194
  throw new Error(`Anchor "${e.domainAnchor}" not found`);
4188
4195
  const o = r.domain || {};
@@ -4194,21 +4201,21 @@
4194
4201
  if (typeof i == "string")
4195
4202
  r[o] = i;
4196
4203
  else {
4197
- const s = n[i.anchor];
4198
- if (!s)
4204
+ const a = n2[i.anchor];
4205
+ if (!a)
4199
4206
  throw new Error(`Anchor "${i.anchor}" not found for domain key "${o}"`);
4200
- if (!s.domain || s.domain[o] === void 0)
4207
+ if (!a.domain || a.domain[o] === void 0)
4201
4208
  throw new Error(`Domain key "${o}" not found in anchor "${i.anchor}"`);
4202
- r[o] = s.domain[o];
4209
+ r[o] = a.domain[o];
4203
4210
  }
4204
4211
  e.domain = r;
4205
4212
  }
4206
- return e.axes && (e.axes = e.axes.map((r) => G(n, r))), e;
4213
+ return e.axes && (e.axes = e.axes.map((r) => G(n2, r))), e;
4207
4214
  }
4208
- function G(n, t) {
4215
+ function G(n2, t) {
4209
4216
  if (!Q$1(t))
4210
4217
  return t;
4211
- const e = t.anchor, r = n[e];
4218
+ const e = t.anchor, r = n2[e];
4212
4219
  if (!r)
4213
4220
  throw new Error(`Anchor "${e}" not found for axis reference`);
4214
4221
  if ("idx" in t) {
@@ -4223,7 +4230,7 @@
4223
4230
  throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);
4224
4231
  return o[0];
4225
4232
  } else if ("id" in t) {
4226
- const o = r.axesSpec.filter((i) => X(t.id, m(i)));
4233
+ const o = r.axesSpec.filter((i) => X(t.id, y(i)));
4227
4234
  if (o.length > 1)
4228
4235
  throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);
4229
4236
  if (o.length === 0)
@@ -4232,31 +4239,34 @@
4232
4239
  }
4233
4240
  throw new Error("Unsupported axis reference type");
4234
4241
  }
4235
- function Q$1(n) {
4236
- return typeof n == "object" && "anchor" in n;
4242
+ function Q$1(n2) {
4243
+ return typeof n2 == "object" && "anchor" in n2;
4237
4244
  }
4238
- function f(n) {
4239
- return n.kind === "PColumn";
4245
+ function f(n2) {
4246
+ return n2.kind === "PColumn";
4240
4247
  }
4241
- function Y$1(n) {
4242
- return f(n.spec);
4248
+ function Y$1(n2) {
4249
+ return f(n2.spec);
4243
4250
  }
4244
- function Dn(n) {
4245
- if (!Y$1(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
4246
- return n;
4251
+ function Dn(n2) {
4252
+ if (!Y$1(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4253
+ return n2;
4247
4254
  }
4248
- function jn(n, t) {
4249
- return n === void 0 ? void 0 : {
4250
- ...n,
4251
- data: t(n.data)
4255
+ function In(n2, t) {
4256
+ return n2 === void 0 ? void 0 : {
4257
+ ...n2,
4258
+ data: t(n2.data)
4252
4259
  };
4253
4260
  }
4254
- function Bn(n) {
4261
+ function jn(n2) {
4255
4262
  const t = /* @__PURE__ */ new Map(), e = (r) => {
4256
4263
  switch (r.type) {
4257
4264
  case "column":
4258
4265
  t.set(r.column.id, r.column);
4259
4266
  return;
4267
+ case "slicedColumn":
4268
+ t.set(r.column.id, r.column);
4269
+ return;
4260
4270
  case "full":
4261
4271
  case "inner":
4262
4272
  for (const o of r.entries) e(o);
@@ -4269,44 +4279,44 @@
4269
4279
  w(r);
4270
4280
  }
4271
4281
  };
4272
- return e(n), [...t.values()];
4282
+ return e(n2), [...t.values()];
4273
4283
  }
4274
- function k(n, t) {
4275
- if (n.name !== void 0 && n.name !== t.name)
4284
+ function k(n2, t) {
4285
+ if (n2.name !== void 0 && n2.name !== t.name)
4276
4286
  return false;
4277
- if (n.type !== void 0) {
4278
- if (Array.isArray(n.type)) {
4279
- if (!n.type.includes(t.type))
4287
+ if (n2.type !== void 0) {
4288
+ if (Array.isArray(n2.type)) {
4289
+ if (!n2.type.includes(t.type))
4280
4290
  return false;
4281
- } else if (n.type !== t.type)
4291
+ } else if (n2.type !== t.type)
4282
4292
  return false;
4283
4293
  }
4284
- if (n.domain !== void 0) {
4294
+ if (n2.domain !== void 0) {
4285
4295
  const e = t.domain || {};
4286
- for (const [r, o] of Object.entries(n.domain))
4296
+ for (const [r, o] of Object.entries(n2.domain))
4287
4297
  if (e[r] !== o)
4288
4298
  return false;
4289
4299
  }
4290
4300
  return true;
4291
4301
  }
4292
- function N$1(n, t) {
4293
- if (t.name !== void 0 && n.name !== t.name || t.namePattern !== void 0 && !new RegExp(t.namePattern).test(n.name))
4302
+ function N$1(n2, t) {
4303
+ if (t.name !== void 0 && n2.name !== t.name || t.namePattern !== void 0 && !new RegExp(t.namePattern).test(n2.name))
4294
4304
  return false;
4295
4305
  if (t.type !== void 0) {
4296
4306
  if (Array.isArray(t.type)) {
4297
- if (!t.type.includes(n.valueType))
4307
+ if (!t.type.includes(n2.valueType))
4298
4308
  return false;
4299
- } else if (t.type !== n.valueType)
4309
+ } else if (t.type !== n2.valueType)
4300
4310
  return false;
4301
4311
  }
4302
4312
  if (t.domain !== void 0) {
4303
- const e = n.domain || {};
4313
+ const e = n2.domain || {};
4304
4314
  for (const [r, o] of Object.entries(t.domain))
4305
4315
  if (e[r] !== o)
4306
4316
  return false;
4307
4317
  }
4308
4318
  if (t.axes !== void 0) {
4309
- const e = n.axesSpec.map(m);
4319
+ const e = n2.axesSpec.map(y);
4310
4320
  if (t.partialAxesMatch) {
4311
4321
  for (const r of t.axes)
4312
4322
  if (!e.some((o) => k(r, o)))
@@ -4320,13 +4330,13 @@
4320
4330
  }
4321
4331
  }
4322
4332
  if (t.annotations !== void 0) {
4323
- const e = n.annotations || {};
4333
+ const e = n2.annotations || {};
4324
4334
  for (const [r, o] of Object.entries(t.annotations))
4325
4335
  if (e[r] !== o)
4326
4336
  return false;
4327
4337
  }
4328
4338
  if (t.annotationPatterns !== void 0) {
4329
- const e = n.annotations || {};
4339
+ const e = n2.annotations || {};
4330
4340
  for (const [r, o] of Object.entries(t.annotationPatterns)) {
4331
4341
  const i = e[r];
4332
4342
  if (i === void 0 || !new RegExp(o).test(i))
@@ -4335,8 +4345,8 @@
4335
4345
  }
4336
4346
  return true;
4337
4347
  }
4338
- function In(n) {
4339
- return Array.isArray(n) ? (t) => n.some((e) => f(t) && N$1(t, e)) : (t) => f(t) && N$1(t, n);
4348
+ function Bn(n2) {
4349
+ return Array.isArray(n2) ? (t) => n2.some((e) => f(t) && N$1(t, e)) : (t) => f(t) && N$1(t, n2);
4340
4350
  }
4341
4351
  z$2.object({
4342
4352
  __isRef: z$2.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
@@ -4345,17 +4355,69 @@
4345
4355
  }).describe(
4346
4356
  "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."
4347
4357
  ).strict().readonly();
4348
- function Kn(n) {
4349
- return typeof n == "object" && n !== null && "__isRef" in n && n.__isRef === true && "blockId" in n && "name" in n;
4358
+ function Kn(n2) {
4359
+ return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
4350
4360
  }
4351
- function Mn(n, t) {
4352
- return n.ok ? { ok: true, value: t(n.value) } : n;
4361
+ function Mn(n2, t) {
4362
+ return n2.ok ? { ok: true, value: t(n2.value) } : n2;
4353
4363
  }
4354
4364
  const rn = 24;
4355
4365
  z$2.string().length(rn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4366
+ var stringify = { exports: {} };
4367
+ (function(module2, exports3) {
4368
+ exports3 = module2.exports = stringify2;
4369
+ exports3.getSerialize = serializer;
4370
+ function stringify2(obj, replacer, spaces, cycleReplacer) {
4371
+ return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
4372
+ }
4373
+ function serializer(replacer, cycleReplacer) {
4374
+ var stack = [], keys = [];
4375
+ if (cycleReplacer == null) cycleReplacer = function(key, value) {
4376
+ if (stack[0] === value) return "[Circular ~]";
4377
+ return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
4378
+ };
4379
+ return function(key, value) {
4380
+ if (stack.length > 0) {
4381
+ var thisPos = stack.indexOf(this);
4382
+ ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
4383
+ ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
4384
+ if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value);
4385
+ } else stack.push(value);
4386
+ return replacer == null ? value : replacer.call(this, key, value);
4387
+ };
4388
+ }
4389
+ })(stringify, stringify.exports);
4390
+ const l = z$2.object({
4391
+ type: z$2.literal("PlError"),
4392
+ name: z$2.string(),
4393
+ message: z$2.string(),
4394
+ /** The message with all details needed for SDK developers. */
4395
+ fullMessage: z$2.string().optional(),
4396
+ stack: z$2.string().optional()
4397
+ }), c = l.extend({
4398
+ cause: z$2.lazy(() => s).optional(),
4399
+ errors: z$2.lazy(() => s.array()).optional()
4400
+ }), m = z$2.object({
4401
+ type: z$2.literal("StandardError"),
4402
+ name: z$2.string(),
4403
+ message: z$2.string(),
4404
+ stack: z$2.string().optional()
4405
+ }), p = m.extend({
4406
+ cause: z$2.lazy(() => s).optional(),
4407
+ errors: z$2.lazy(() => s.array()).optional()
4408
+ }), s = z$2.union([p, c]);
4409
+ const u = z$2.object({
4410
+ name: z$2.string(),
4411
+ message: z$2.string(),
4412
+ fullMessage: z$2.string().optional(),
4413
+ stack: z$2.string().optional()
4414
+ }), n = u.extend({
4415
+ cause: z$2.lazy(() => n).optional(),
4416
+ errors: z$2.lazy(() => n.array()).optional()
4417
+ });
4356
4418
  var _e = Object.defineProperty;
4357
- var Ie = (t, e, n) => e in t ? _e(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
4358
- var T = (t, e, n) => Ie(t, typeof e != "symbol" ? e + "" : e, n);
4419
+ var Ie = (t, e, n2) => e in t ? _e(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4420
+ var T = (t, e, n2) => Ie(t, typeof e != "symbol" ? e + "" : e, n2);
4359
4421
  function Y(t) {
4360
4422
  return { type: "Immediate", value: t };
4361
4423
  }
@@ -4376,32 +4438,32 @@
4376
4438
  throw new Error("Not in config rendering context");
4377
4439
  }
4378
4440
  function q(t, e) {
4379
- const n = $e();
4380
- if (n === void 0) return false;
4381
- if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4382
- return n.callbackRegistry[t] = e, true;
4441
+ const n2 = $e();
4442
+ if (n2 === void 0) return false;
4443
+ if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4444
+ return n2.callbackRegistry[t] = e, true;
4383
4445
  }
4384
4446
  const ne = /* @__PURE__ */ new Map();
4385
4447
  function Je(t, e) {
4386
- t in h().callbackRegistry || (h().callbackRegistry[t] = (n) => {
4448
+ t in h().callbackRegistry || (h().callbackRegistry[t] = (n2) => {
4387
4449
  for (const r of ne.get(t))
4388
- r(n);
4450
+ r(n2);
4389
4451
  }, ne.set(t, [])), ne.get(t).push(e);
4390
4452
  }
4391
4453
  class S {
4392
- constructor(e, n = (r) => r) {
4454
+ constructor(e, n2 = (r) => r) {
4393
4455
  T(this, "isResolved", false);
4394
4456
  T(this, "resolvedValue");
4395
- this.handle = e, this.postProcess = n, Je(e, (r) => {
4396
- this.resolvedValue = n(r), this.isResolved = true;
4457
+ this.handle = e, this.postProcess = n2, Je(e, (r) => {
4458
+ this.resolvedValue = n2(r), this.isResolved = true;
4397
4459
  });
4398
4460
  }
4399
4461
  map(e) {
4400
- return new S(this.handle, (n) => e(this.postProcess(n)));
4462
+ return new S(this.handle, (n2) => e(this.postProcess(n2)));
4401
4463
  }
4402
4464
  mapDefined(e) {
4403
- return new S(this.handle, (n) => {
4404
- const r = this.postProcess(n);
4465
+ return new S(this.handle, (n2) => {
4466
+ const r = this.postProcess(n2);
4405
4467
  return r ? e(r) : void 0;
4406
4468
  });
4407
4469
  }
@@ -4413,46 +4475,46 @@
4413
4475
  return t === void 0 ? void 0 : e(t);
4414
4476
  }
4415
4477
  class I {
4416
- constructor(e, n) {
4417
- this.handle = e, this.resolvePath = n;
4478
+ constructor(e, n2) {
4479
+ this.handle = e, this.resolvePath = n2;
4418
4480
  }
4419
4481
  resolve(...e) {
4420
- const n = e.map(
4482
+ const n2 = e.map(
4421
4483
  (r) => ({
4422
4484
  assertFieldType: "Input",
4423
4485
  ...typeof r == "string" ? { field: r } : r
4424
4486
  })
4425
4487
  );
4426
- return this.resolveWithCommon({}, ...n);
4488
+ return this.resolveWithCommon({}, ...n2);
4427
4489
  }
4428
4490
  resolveOutput(...e) {
4429
- const n = e.map(
4491
+ const n2 = e.map(
4430
4492
  (r) => ({
4431
4493
  assertFieldType: "Output",
4432
4494
  ...typeof r == "string" ? { field: r } : r
4433
4495
  })
4434
4496
  );
4435
- return this.resolveWithCommon({}, ...n);
4497
+ return this.resolveWithCommon({}, ...n2);
4436
4498
  }
4437
4499
  resolveInput(...e) {
4438
- const n = e.map(
4500
+ const n2 = e.map(
4439
4501
  (r) => ({
4440
4502
  assertFieldType: "Input",
4441
4503
  ...typeof r == "string" ? { field: r } : r
4442
4504
  })
4443
4505
  );
4444
- return this.resolveWithCommon({}, ...n);
4506
+ return this.resolveWithCommon({}, ...n2);
4445
4507
  }
4446
4508
  resolveAny(...e) {
4447
4509
  return this.resolveWithCommon({}, ...e);
4448
4510
  }
4449
- resolveWithCommon(e, ...n) {
4511
+ resolveWithCommon(e, ...n2) {
4450
4512
  const r = [
4451
4513
  ...this.resolvePath,
4452
- ...n.map((i) => typeof i == "string" ? i : i.field)
4514
+ ...n2.map((i) => typeof i == "string" ? i : i.field)
4453
4515
  ];
4454
4516
  return ie(
4455
- h().resolveWithCommon(this.handle, e, ...n),
4517
+ h().resolveWithCommon(this.handle, e, ...n2),
4456
4518
  (i) => new I(i, r)
4457
4519
  );
4458
4520
  }
@@ -4475,7 +4537,7 @@
4475
4537
  const e = [...this.resolvePath, "error"];
4476
4538
  return ie(
4477
4539
  h().getError(this.handle),
4478
- (n) => new I(n, e)
4540
+ (n2) => new I(n2, e)
4479
4541
  );
4480
4542
  }
4481
4543
  listInputFields() {
@@ -4494,9 +4556,9 @@
4494
4556
  return h().getKeyValueAsString(this.handle, e);
4495
4557
  }
4496
4558
  getKeyValueAsJson(e) {
4497
- const n = this.getKeyValueAsString(e);
4498
- if (n == null) throw new Error("Resource has no content.");
4499
- return JSON.parse(n);
4559
+ const n2 = this.getKeyValueAsString(e);
4560
+ if (n2 == null) throw new Error("Resource has no content.");
4561
+ return JSON.parse(n2);
4500
4562
  }
4501
4563
  getDataBase64() {
4502
4564
  return h().getDataBase64(this.handle);
@@ -4512,28 +4574,28 @@
4512
4574
  /**
4513
4575
  *
4514
4576
  */
4515
- getPColumns(e = false, n = "") {
4516
- const r = this.parsePObjectCollection(e, n);
4517
- return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
4518
- if (!Y$1(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
4519
- return s;
4577
+ getPColumns(e = false, n2 = "") {
4578
+ const r = this.parsePObjectCollection(e, n2);
4579
+ return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
4580
+ if (!Y$1(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
4581
+ return s2;
4520
4582
  });
4521
4583
  }
4522
4584
  /**
4523
4585
  *
4524
4586
  */
4525
- parsePObjectCollection(e = false, n = "") {
4587
+ parsePObjectCollection(e = false, n2 = "") {
4526
4588
  const r = h().parsePObjectCollection(
4527
4589
  this.handle,
4528
4590
  e,
4529
- n,
4591
+ n2,
4530
4592
  ...this.resolvePath
4531
4593
  );
4532
4594
  if (r === void 0) return;
4533
4595
  const i = {};
4534
- for (const [s, o] of Object.entries(r)) {
4535
- const a = [...this.resolvePath, s];
4536
- i[s] = jn(o, (c) => new I(c, a));
4596
+ for (const [s2, o] of Object.entries(r)) {
4597
+ const a = [...this.resolvePath, s2];
4598
+ i[s2] = In(o, (c2) => new I(c2, a));
4537
4599
  }
4538
4600
  return i;
4539
4601
  }
@@ -4609,27 +4671,27 @@
4609
4671
  switch (e) {
4610
4672
  case "Input":
4611
4673
  return this.getInputsLocked() && this.listInputFields().every(
4612
- (n) => this.resolve({ field: n, assertFieldType: "Input" }) !== void 0
4674
+ (n2) => this.resolve({ field: n2, assertFieldType: "Input" }) !== void 0
4613
4675
  );
4614
4676
  case "Output":
4615
4677
  return this.getOutputsLocked() && this.listOutputFields().every(
4616
- (n) => this.resolve({ field: n, assertFieldType: "Output" }) !== void 0
4678
+ (n2) => this.resolve({ field: n2, assertFieldType: "Output" }) !== void 0
4617
4679
  );
4618
4680
  }
4619
4681
  }
4620
- mapFields(e, n) {
4621
- const { fieldType: r, requireLocked: i, skipUnresolved: s } = {
4682
+ mapFields(e, n2) {
4683
+ const { fieldType: r, requireLocked: i, skipUnresolved: s2 } = {
4622
4684
  fieldType: "Input",
4623
4685
  requireLocked: true,
4624
4686
  skipUnresolved: false,
4625
- ...n
4687
+ ...n2
4626
4688
  }, o = e;
4627
4689
  if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
4628
4690
  return;
4629
- let c = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4691
+ let c2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4630
4692
  (l2) => [l2, this.resolve({ field: l2, assertFieldType: r })]
4631
4693
  );
4632
- return s && (c = c.filter((l2) => l2[1] !== void 0)), c.map(([l2, m2]) => o(l2, m2));
4694
+ return s2 && (c2 = c2.filter((l2) => l2[1] !== void 0)), c2.map(([l2, m2]) => o(l2, m2));
4633
4695
  }
4634
4696
  }
4635
4697
  const ve = "staging", we = "main";
@@ -4639,20 +4701,20 @@
4639
4701
  id: z$2.string().optional(),
4640
4702
  label: z$2.string()
4641
4703
  }), We = z$2.array(Ge), He = 1e-3, qe = "__LABEL__", pe = "__LABEL__@1";
4642
- function de(t, e, n = {}) {
4643
- const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((f2) => {
4704
+ function de(t, e, n2 = {}) {
4705
+ const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((f2) => {
4644
4706
  var R, k2;
4645
4707
  const p2 = e(f2);
4646
- let d, y, g2;
4647
- "spec" in p2 && typeof p2.spec == "object" ? (d = p2.spec, y = p2.prefixTrace, g2 = p2.suffixTrace) : d = p2;
4708
+ let d, y2, g2;
4709
+ "spec" in p2 && typeof p2.spec == "object" ? (d = p2.spec, y2 = p2.prefixTrace, g2 = p2.suffixTrace) : d = p2;
4648
4710
  const v = (R = d.annotations) == null ? void 0 : R[Ue], w2 = (k2 = d.annotations) == null ? void 0 : k2[Me], x2 = (w2 ? We.safeParse(JSON.parse(w2)).data : void 0) ?? [], C = [
4649
- ...y ?? [],
4711
+ ...y2 ?? [],
4650
4712
  ...x2,
4651
4713
  ...g2 ?? []
4652
4714
  ];
4653
4715
  if (v) {
4654
4716
  const A = { label: v, type: qe, importance: -2 };
4655
- n.addLabelAsSuffix ? C.push(A) : C.splice(0, 0, A);
4717
+ n2.addLabelAsSuffix ? C.push(A) : C.splice(0, 0, A);
4656
4718
  }
4657
4719
  const P2 = [], F = /* @__PURE__ */ new Map();
4658
4720
  for (let A = C.length - 1; A >= 0; --A) {
@@ -4673,14 +4735,14 @@
4673
4735
  label: v,
4674
4736
  fullTrace: P2
4675
4737
  };
4676
- }), o = [], a = [], c = [...r];
4677
- c.sort(([, f2], [, p2]) => p2 - f2);
4678
- for (const [f2] of c)
4738
+ }), o = [], a = [], c2 = [...r];
4739
+ c2.sort(([, f2], [, p2]) => p2 - f2);
4740
+ for (const [f2] of c2)
4679
4741
  f2.endsWith("@1") || i.get(f2) === t.length ? o.push(f2) : a.push(f2);
4680
- const l2 = (f2) => s.map((p2) => {
4681
- const d = p2.fullTrace.filter((g2) => f2.has(g2.fullType)).map((g2) => g2.label), y = n.separator ?? " / ";
4742
+ const l2 = (f2) => s2.map((p2) => {
4743
+ const d = p2.fullTrace.filter((g2) => f2.has(g2.fullType)).map((g2) => g2.label), y2 = n2.separator ?? " / ";
4682
4744
  return {
4683
- label: d.join(y),
4745
+ label: d.join(y2),
4684
4746
  value: p2.value
4685
4747
  };
4686
4748
  });
@@ -4688,19 +4750,19 @@
4688
4750
  if (a.length !== 0) throw new Error("Assertion error.");
4689
4751
  return l2(new Set(pe));
4690
4752
  }
4691
- let m2 = 0, u = 0;
4753
+ let m2 = 0, u2 = 0;
4692
4754
  for (; m2 < o.length; ) {
4693
4755
  const f2 = /* @__PURE__ */ new Set();
4694
- n.includeNativeLabel && f2.add(pe);
4756
+ n2.includeNativeLabel && f2.add(pe);
4695
4757
  for (let d = 0; d < m2; ++d) f2.add(o[d]);
4696
- f2.add(o[u]);
4758
+ f2.add(o[u2]);
4697
4759
  const p2 = l2(f2);
4698
4760
  if (new Set(p2.map((d) => d.label)).size === t.length) return p2;
4699
- u++, u == o.length && (m2++, u = m2);
4761
+ u2++, u2 == o.length && (m2++, u2 = m2);
4700
4762
  }
4701
4763
  return l2(/* @__PURE__ */ new Set([...o, ...a]));
4702
4764
  }
4703
- const H = "PColumnData/", Q = H + "ResourceMap", Z = H + "Partitioned/ResourceMap", N = H + "JsonPartitioned", O = H + "BinaryPartitioned", Ae = H + "Partitioned/", ee = Ae + "JsonPartitioned", B = Ae + "BinaryPartitioned";
4765
+ const H = "PColumnData/", Q = H + "ResourceMap", Z = H + "Partitioned/ResourceMap", N = H + "JsonPartitioned", E = H + "BinaryPartitioned", Ae = H + "Partitioned/", ee = Ae + "JsonPartitioned", B = Ae + "BinaryPartitioned";
4704
4766
  const ae = (t) => {
4705
4767
  if (t.endsWith(".index"))
4706
4768
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
@@ -4710,43 +4772,43 @@
4710
4772
  };
4711
4773
  function ze(t) {
4712
4774
  if (!t) return;
4713
- const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
4775
+ const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
4714
4776
  let i = 0;
4715
4777
  switch (e) {
4716
4778
  case Q:
4717
- i = n.keyLength;
4779
+ i = n2.keyLength;
4718
4780
  break;
4719
4781
  case Z:
4720
- i = n.partitionKeyLength + n.keyLength;
4782
+ i = n2.partitionKeyLength + n2.keyLength;
4721
4783
  break;
4722
4784
  case N:
4723
- case O:
4724
- i = n.partitionKeyLength;
4785
+ case E:
4786
+ i = n2.partitionKeyLength;
4725
4787
  break;
4726
4788
  case B:
4727
4789
  case ee:
4728
- i = n.superPartitionKeyLength + n.partitionKeyLength;
4790
+ i = n2.superPartitionKeyLength + n2.partitionKeyLength;
4729
4791
  break;
4730
4792
  }
4731
4793
  switch (e) {
4732
4794
  case Q:
4733
4795
  case N:
4734
- case O:
4735
- for (let s of t.listInputFields()) {
4736
- e === O && (s = ae(s).baseKey);
4737
- const o = [...JSON.parse(s)];
4796
+ case E:
4797
+ for (let s2 of t.listInputFields()) {
4798
+ e === E && (s2 = ae(s2).baseKey);
4799
+ const o = [...JSON.parse(s2)];
4738
4800
  r.push(o);
4739
4801
  }
4740
4802
  break;
4741
4803
  case Z:
4742
4804
  case B:
4743
4805
  case ee:
4744
- for (const s of t.listInputFields()) {
4745
- const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
4806
+ for (const s2 of t.listInputFields()) {
4807
+ const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
4746
4808
  if (a !== void 0)
4747
- for (let c of a.listInputFields()) {
4748
- e === B && (c = ae(c).baseKey);
4749
- const l2 = [...o, ...JSON.parse(c)];
4809
+ for (let c2 of a.listInputFields()) {
4810
+ e === B && (c2 = ae(c2).baseKey);
4811
+ const l2 = [...o, ...JSON.parse(c2)];
4750
4812
  r.push(l2);
4751
4813
  }
4752
4814
  }
@@ -4757,34 +4819,34 @@
4757
4819
  function Ye(t) {
4758
4820
  const e = ze(t);
4759
4821
  if (!e) return;
4760
- const { data: n, keyLength: r } = e, i = [];
4761
- for (let s = 0; s < r; ++s)
4822
+ const { data: n2, keyLength: r } = e, i = [];
4823
+ for (let s2 = 0; s2 < r; ++s2)
4762
4824
  i.push(/* @__PURE__ */ new Set());
4763
- for (const s of n) {
4764
- if (s.length !== r)
4825
+ for (const s2 of n2) {
4826
+ if (s2.length !== r)
4765
4827
  throw new Error("key length does not match partition length");
4766
4828
  for (let o = 0; o < r; ++o)
4767
- i[o].add(s[o]);
4829
+ i[o].add(s2[o]);
4768
4830
  }
4769
- return i.map((s) => Array.from(s.values()));
4831
+ return i.map((s2) => Array.from(s2.values()));
4770
4832
  }
4771
4833
  function le(t, e = []) {
4772
4834
  if (t === void 0) return;
4773
- const n = t.resourceType.name, r = t.getDataAsJson();
4774
- if (e.length > 0 && (n === ee || n === B))
4775
- throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
4776
- switch (n) {
4835
+ const n2 = t.resourceType.name, r = t.getDataAsJson();
4836
+ if (e.length > 0 && (n2 === ee || n2 === B))
4837
+ throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
4838
+ switch (n2) {
4777
4839
  case Q:
4778
4840
  case Z:
4779
- throw new Error(`Only data columns are supported, got: ${n}`);
4841
+ throw new Error(`Only data columns are supported, got: ${n2}`);
4780
4842
  case N: {
4781
4843
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4782
- throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
4844
+ throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
4783
4845
  const i = [];
4784
- for (const s of t.listInputFields()) {
4785
- const o = t.resolve({ field: s, assertFieldType: "Input" });
4846
+ for (const s2 of t.listInputFields()) {
4847
+ const o = t.resolve({ field: s2, assertFieldType: "Input" });
4786
4848
  if (o === void 0) return;
4787
- const a = [...e, ...JSON.parse(s)];
4849
+ const a = [...e, ...JSON.parse(s2)];
4788
4850
  i.push({ key: a, value: o });
4789
4851
  }
4790
4852
  return {
@@ -4793,21 +4855,21 @@
4793
4855
  parts: i
4794
4856
  };
4795
4857
  }
4796
- case O: {
4858
+ case E: {
4797
4859
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4798
- throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
4799
- const i = [], s = /* @__PURE__ */ new Map();
4860
+ throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
4861
+ const i = [], s2 = /* @__PURE__ */ new Map();
4800
4862
  for (const o of t.listInputFields()) {
4801
- const a = ae(o), c = t.resolve({ field: o, assertFieldType: "Input" });
4802
- if (c === void 0) return;
4803
- let l2 = s.get(a.baseKey);
4804
- l2 || (l2 = {}, s.set(a.baseKey, l2)), a.type === "index" ? l2.index = c : l2.values = c;
4863
+ const a = ae(o), c2 = t.resolve({ field: o, assertFieldType: "Input" });
4864
+ if (c2 === void 0) return;
4865
+ let l2 = s2.get(a.baseKey);
4866
+ l2 || (l2 = {}, s2.set(a.baseKey, l2)), a.type === "index" ? l2.index = c2 : l2.values = c2;
4805
4867
  }
4806
- for (const [o, a] of s.entries()) {
4868
+ for (const [o, a] of s2.entries()) {
4807
4869
  if (!a.index || !a.values) return;
4808
- const c = [...e, ...JSON.parse(o)];
4870
+ const c2 = [...e, ...JSON.parse(o)];
4809
4871
  i.push({
4810
- key: c,
4872
+ key: c2,
4811
4873
  value: {
4812
4874
  index: a.index,
4813
4875
  values: a.values
@@ -4822,106 +4884,106 @@
4822
4884
  }
4823
4885
  case ee: {
4824
4886
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4825
- throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
4826
- const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
4887
+ throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
4888
+ const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
4827
4889
  for (const o of t.listInputFields()) {
4828
4890
  const a = t.resolve({ field: o, assertFieldType: "Input" });
4829
4891
  if (a === void 0) return;
4830
4892
  if (a.resourceType.name !== N)
4831
- throw new Error(`Expected ${N} inside ${n}, but got ${a.resourceType.name}`);
4832
- const c = le(a, JSON.parse(o));
4833
- if (c === void 0) return;
4834
- if (c.type !== "JsonPartitioned")
4835
- throw new Error(`Unexpected inner result type for ${n}: ${c.type}`);
4836
- s.push(...c.parts);
4893
+ throw new Error(`Expected ${N} inside ${n2}, but got ${a.resourceType.name}`);
4894
+ const c2 = le(a, JSON.parse(o));
4895
+ if (c2 === void 0) return;
4896
+ if (c2.type !== "JsonPartitioned")
4897
+ throw new Error(`Unexpected inner result type for ${n2}: ${c2.type}`);
4898
+ s2.push(...c2.parts);
4837
4899
  }
4838
4900
  return {
4839
4901
  type: "JsonPartitioned",
4840
4902
  partitionKeyLength: i,
4841
- parts: s
4903
+ parts: s2
4842
4904
  };
4843
4905
  }
4844
4906
  case B: {
4845
4907
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4846
- throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
4847
- const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
4908
+ throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
4909
+ const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
4848
4910
  for (const o of t.listInputFields()) {
4849
4911
  const a = t.resolve({ field: o, assertFieldType: "Input" });
4850
4912
  if (a === void 0) return;
4851
- if (a.resourceType.name !== O)
4852
- throw new Error(`Expected ${O} inside ${n}, but got ${a.resourceType.name}`);
4853
- const c = le(a, JSON.parse(o));
4854
- if (c === void 0) return;
4855
- if (c.type !== "BinaryPartitioned")
4856
- throw new Error(`Unexpected inner result type for ${n}: ${c.type}`);
4857
- s.push(...c.parts);
4913
+ if (a.resourceType.name !== E)
4914
+ throw new Error(`Expected ${E} inside ${n2}, but got ${a.resourceType.name}`);
4915
+ const c2 = le(a, JSON.parse(o));
4916
+ if (c2 === void 0) return;
4917
+ if (c2.type !== "BinaryPartitioned")
4918
+ throw new Error(`Unexpected inner result type for ${n2}: ${c2.type}`);
4919
+ s2.push(...c2.parts);
4858
4920
  }
4859
4921
  return {
4860
4922
  type: "BinaryPartitioned",
4861
4923
  partitionKeyLength: i,
4862
- parts: s
4924
+ parts: s2
4863
4925
  };
4864
4926
  }
4865
4927
  default:
4866
- throw new Error(`Unknown resource type: ${n}`);
4928
+ throw new Error(`Unknown resource type: ${n2}`);
4867
4929
  }
4868
4930
  }
4869
4931
  function Xe(t, e) {
4870
- const n = [...e].sort((s, o) => o[0] - s[0]);
4932
+ const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
4871
4933
  if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
4872
- const { partitionKeyLength: s } = t;
4934
+ const { partitionKeyLength: s2 } = t;
4873
4935
  for (const [o] of e)
4874
- if (o >= s)
4875
- throw new Error(`Can't filter on non-partitioned axis ${o}. Must be >= ${s}`);
4936
+ if (o >= s2)
4937
+ throw new Error(`Can't filter on non-partitioned axis ${o}. Must be >= ${s2}`);
4876
4938
  } else if (t.type === "Json") {
4877
- const { keyLength: s } = t;
4939
+ const { keyLength: s2 } = t;
4878
4940
  for (const [o] of e)
4879
- if (o >= s)
4880
- throw new Error(`Can't filter on non-data axis ${o}. Must be >= ${s}`);
4941
+ if (o >= s2)
4942
+ throw new Error(`Can't filter on non-data axis ${o}. Must be >= ${s2}`);
4881
4943
  }
4882
- const r = (s) => {
4883
- for (const [o, a] of n)
4884
- if (s[o] !== a)
4944
+ const r = (s2) => {
4945
+ for (const [o, a] of n2)
4946
+ if (s2[o] !== a)
4885
4947
  return false;
4886
4948
  return true;
4887
- }, i = (s) => {
4888
- const o = [...s];
4889
- for (const [a] of n)
4949
+ }, i = (s2) => {
4950
+ const o = [...s2];
4951
+ for (const [a] of n2)
4890
4952
  o.splice(a, 1);
4891
4953
  return o;
4892
4954
  };
4893
4955
  switch (t.type) {
4894
4956
  case "Json": {
4895
- const s = t.data.filter((o) => r(o.key)).map((o) => ({
4957
+ const s2 = t.data.filter((o) => r(o.key)).map((o) => ({
4896
4958
  key: i(o.key),
4897
4959
  value: o.value
4898
4960
  }));
4899
4961
  return {
4900
4962
  type: "Json",
4901
4963
  keyLength: t.keyLength - e.length,
4902
- data: s
4964
+ data: s2
4903
4965
  };
4904
4966
  }
4905
4967
  case "JsonPartitioned": {
4906
- const s = t.parts.filter((o) => r(o.key)).map((o) => ({
4968
+ const s2 = t.parts.filter((o) => r(o.key)).map((o) => ({
4907
4969
  key: i(o.key),
4908
4970
  value: o.value
4909
4971
  }));
4910
4972
  return {
4911
4973
  type: "JsonPartitioned",
4912
4974
  partitionKeyLength: t.partitionKeyLength - e.length,
4913
- parts: s
4975
+ parts: s2
4914
4976
  };
4915
4977
  }
4916
4978
  case "BinaryPartitioned": {
4917
- const s = t.parts.filter((o) => r(o.key)).map((o) => ({
4979
+ const s2 = t.parts.filter((o) => r(o.key)).map((o) => ({
4918
4980
  key: i(o.key),
4919
4981
  value: o.value
4920
4982
  }));
4921
4983
  return {
4922
4984
  type: "BinaryPartitioned",
4923
4985
  partitionKeyLength: t.partitionKeyLength - e.length,
4924
- parts: s
4986
+ parts: s2
4925
4987
  };
4926
4988
  }
4927
4989
  }
@@ -4929,12 +4991,12 @@
4929
4991
  function re(t, e) {
4930
4992
  if (t === void 0) return e === void 0;
4931
4993
  if (e === void 0) return true;
4932
- for (const n in e)
4933
- if (t[n] !== e[n]) return false;
4994
+ for (const n2 in e)
4995
+ if (t[n2] !== e[n2]) return false;
4934
4996
  return true;
4935
4997
  }
4936
4998
  function fe(t) {
4937
- return jn(t, (e) => e instanceof I ? e.handle : dn(e) ? pn(e, (n) => n.handle) : e);
4999
+ return In(t, (e) => e instanceof I ? e.handle : dn(e) ? pn(e, (n2) => n2.handle) : e);
4938
5000
  }
4939
5001
  function Qe(t) {
4940
5002
  if (t)
@@ -4959,41 +5021,41 @@
4959
5021
  calculateOptions(e) {
4960
5022
  return this.ctx.calculateOptions(e);
4961
5023
  }
4962
- getOptions(e, n) {
4963
- const r = typeof e == "function" ? e : In(e), i = this.getSpecs().entries.filter((s) => r(s.obj));
4964
- return typeof n == "object" || typeof n > "u" ? de(i, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: o }) => ({
4965
- ref: s,
5024
+ getOptions(e, n2) {
5025
+ const r = typeof e == "function" ? e : Bn(e), i = this.getSpecs().entries.filter((s2) => r(s2.obj));
5026
+ return typeof n2 == "object" || typeof n2 > "u" ? de(i, (s2) => s2.obj, n2 ?? {}).map(({ value: { ref: s2 }, label: o }) => ({
5027
+ ref: s2,
4966
5028
  label: o
4967
- })) : i.map((s) => ({
4968
- ref: s.ref,
4969
- label: n(s.obj, s.ref)
5029
+ })) : i.map((s2) => ({
5030
+ ref: s2.ref,
5031
+ label: n2(s2.obj, s2.ref)
4970
5032
  }));
4971
5033
  }
4972
5034
  /**
4973
5035
  * Internal implementation that generates UniversalPColumnEntry objects from the provided
4974
5036
  * anchors and selectors.
4975
5037
  */
4976
- getUniversalPColumnEntries(e, n, r) {
5038
+ getUniversalPColumnEntries(e, n2, r) {
4977
5039
  const i = {};
4978
5040
  if (!(e instanceof On))
4979
5041
  for (const [l2, m2] of Object.entries(e))
4980
5042
  if (Kn(m2)) {
4981
- const u = this.getPColumnSpecByRef(m2);
4982
- if (!u)
5043
+ const u2 = this.getPColumnSpecByRef(m2);
5044
+ if (!u2)
4983
5045
  return;
4984
- i[l2] = u;
5046
+ i[l2] = u2;
4985
5047
  } else
4986
5048
  i[l2] = m2;
4987
- const s = typeof n == "function" ? [n] : Array.isArray(n) ? n : [n], o = e instanceof On ? e : new On(i), a = [];
4988
- for (const l2 of s) {
4989
- const m$1 = typeof l2 == "function" ? l2 : In(Jn(i, l2)), u = this.getSpecs().entries.filter(({ obj: p2 }) => f(p2) ? m$1(p2) : false);
4990
- if (u.length === 0)
5049
+ const s2 = typeof n2 == "function" ? [n2] : Array.isArray(n2) ? n2 : [n2], o = e instanceof On ? e : new On(i), a = [];
5050
+ for (const l2 of s2) {
5051
+ const m2 = typeof l2 == "function" ? l2 : Bn(Jn(i, l2)), u2 = this.getSpecs().entries.filter(({ obj: p2 }) => f(p2) ? m2(p2) : false);
5052
+ if (u2.length === 0)
4991
5053
  continue;
4992
5054
  const f$1 = typeof l2 == "object" && "axes" in l2 && l2.axes !== void 0 && l2.partialAxesMatch === void 0 ? l2.axes.map((p2, d) => "split" in p2 && p2.split === true ? d : -1).filter((p2) => p2 !== -1) : [];
4993
5055
  if (f$1.sort((p2, d) => p2 - d), f$1.length > 0) {
4994
5056
  const p2 = f$1[f$1.length - 1];
4995
- for (const { ref: d, obj: y } of u) {
4996
- if (!f(y)) throw new Error(`Assertion failed: expected PColumnSpec, got ${y.kind}`);
5057
+ for (const { ref: d, obj: y$1 } of u2) {
5058
+ if (!f(y$1)) throw new Error(`Assertion failed: expected PColumnSpec, got ${y$1.kind}`);
4997
5059
  const g2 = this.getDataByRef(d);
4998
5060
  if (!g2) {
4999
5061
  if (r != null && r.dontWaitAllData) continue;
@@ -5006,8 +5068,8 @@
5006
5068
  return;
5007
5069
  }
5008
5070
  if (p2 >= v.length)
5009
- throw new Error(`Not enough partition keys for the requested split axes in column ${y.name}`);
5010
- const w2 = f$1.map((P2) => this.findLabels(m(y.axesSpec[P2]))), x2 = [], C = (P2, F) => {
5071
+ throw new Error(`Not enough partition keys for the requested split axes in column ${y$1.name}`);
5072
+ const w2 = f$1.map((P2) => this.findLabels(y(y$1.axesSpec[P2]))), x2 = [], C = (P2, F) => {
5011
5073
  if (F >= f$1.length) {
5012
5074
  x2.push([...P2]);
5013
5075
  return;
@@ -5019,18 +5081,18 @@
5019
5081
  C([], 0);
5020
5082
  for (const P2 of x2) {
5021
5083
  const F = P2.map((R, k2) => {
5022
- const A = f$1[k2], j = m(y.axesSpec[A]), V = w2[k2], K = (V == null ? void 0 : V[R]) ?? String(R);
5084
+ const A = f$1[k2], j = y(y$1.axesSpec[A]), V = w2[k2], K = (V == null ? void 0 : V[R]) ?? String(R);
5023
5085
  return { axisIdx: A, axisId: j, value: R, label: K };
5024
5086
  });
5025
5087
  a.push({
5026
- obj: y,
5088
+ obj: y$1,
5027
5089
  ref: d,
5028
5090
  axisFilters: F
5029
5091
  });
5030
5092
  }
5031
5093
  }
5032
5094
  } else
5033
- for (const { ref: p2, obj: d } of u)
5095
+ for (const { ref: p2, obj: d } of u2)
5034
5096
  f(d) && a.push({
5035
5097
  obj: d,
5036
5098
  ref: p2
@@ -5065,52 +5127,52 @@
5065
5127
  * @param opts - Optional configuration for label generation and data waiting
5066
5128
  * @returns A PFrameHandle for the created PFrame, or undefined if any required data is missing
5067
5129
  */
5068
- getAnchoredPColumns(e, n, r) {
5130
+ getAnchoredPColumns(e, n2, r) {
5069
5131
  const i = {
5070
5132
  ...r,
5071
5133
  labelOps: {
5072
5134
  includeNativeLabel: true,
5073
5135
  ...(r == null ? void 0 : r.labelOps) || {}
5074
5136
  }
5075
- }, s = this.getUniversalPColumnEntries(
5137
+ }, s2 = this.getUniversalPColumnEntries(
5076
5138
  e,
5077
- n,
5139
+ n2,
5078
5140
  i
5079
5141
  );
5080
- if (!s || s.length === 0) return;
5142
+ if (!s2 || s2.length === 0) return;
5081
5143
  const o = [];
5082
- for (const a of s) {
5083
- const c = this.getPColumnByRef(a.ref);
5084
- if (!c) return;
5085
- const l2 = le(c.data);
5144
+ for (const a of s2) {
5145
+ const c2 = this.getPColumnByRef(a.ref);
5146
+ if (!c2) return;
5147
+ const l2 = le(c2.data);
5086
5148
  if (!l2) return;
5087
- let m2 = l2, u = { ...c.spec };
5149
+ let m2 = l2, u2 = { ...c2.spec };
5088
5150
  if (a.axisFilters && a.axisFilters.length > 0) {
5089
5151
  const p2 = a.axisFilters.map((g2) => [
5090
5152
  g2.axisIdx,
5091
5153
  g2.value
5092
5154
  ]);
5093
5155
  m2 = Xe(l2, p2);
5094
- const d = [...a.axisFilters].map((g2) => g2.axisIdx).sort((g2, v) => v - g2), y = [...u.axesSpec];
5156
+ const d = [...a.axisFilters].map((g2) => g2.axisIdx).sort((g2, v) => v - g2), y2 = [...u2.axesSpec];
5095
5157
  for (const g2 of d)
5096
- y.splice(g2, 1);
5097
- u = { ...u, axesSpec: y };
5158
+ y2.splice(g2, 1);
5159
+ u2 = { ...u2, axesSpec: y2 };
5098
5160
  }
5099
5161
  const f2 = ln(m2);
5100
- u.annotations ? u = {
5101
- ...u,
5162
+ u2.annotations ? u2 = {
5163
+ ...u2,
5102
5164
  annotations: {
5103
- ...u.annotations,
5165
+ ...u2.annotations,
5104
5166
  "pl7.app/label": a.label
5105
5167
  }
5106
- } : u = {
5107
- ...u,
5168
+ } : u2 = {
5169
+ ...u2,
5108
5170
  annotations: {
5109
5171
  "pl7.app/label": a.label
5110
5172
  }
5111
5173
  }, o.push({
5112
5174
  id: a.id,
5113
- spec: u,
5175
+ spec: u2,
5114
5176
  data: f2
5115
5177
  });
5116
5178
  }
@@ -5145,12 +5207,12 @@
5145
5207
  * @returns An array of objects with `label` (display text) and `value` (anchored ID string) properties,
5146
5208
  * or undefined if any PlRef resolution fails.
5147
5209
  */
5148
- getCanonicalOptions(e, n, r) {
5149
- const i = this.getUniversalPColumnEntries(e, n, r);
5210
+ getCanonicalOptions(e, n2, r) {
5211
+ const i = this.getUniversalPColumnEntries(e, n2, r);
5150
5212
  if (i)
5151
- return i.map((s) => ({
5152
- value: s.id,
5153
- label: s.label
5213
+ return i.map((s2) => ({
5214
+ value: s2.id,
5215
+ label: s2.label
5154
5216
  }));
5155
5217
  }
5156
5218
  /**
@@ -5163,11 +5225,11 @@
5163
5225
  const e = this.ctx.getDataFromResultPool();
5164
5226
  return {
5165
5227
  isComplete: e.isComplete,
5166
- entries: e.entries.map((n) => ({
5167
- ref: n.ref,
5228
+ entries: e.entries.map((n2) => ({
5229
+ ref: n2.ref,
5168
5230
  obj: {
5169
- ...n.obj,
5170
- data: new I(n.obj.data, [n.ref.blockId, n.ref.name])
5231
+ ...n2.obj,
5232
+ data: new I(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5171
5233
  }
5172
5234
  }))
5173
5235
  };
@@ -5182,13 +5244,13 @@
5182
5244
  const e = this.ctx.getDataWithErrorsFromResultPool();
5183
5245
  return {
5184
5246
  isComplete: e.isComplete,
5185
- entries: e.entries.map((n) => ({
5186
- ref: n.ref,
5247
+ entries: e.entries.map((n2) => ({
5248
+ ref: n2.ref,
5187
5249
  obj: {
5188
- ...n.obj,
5250
+ ...n2.obj,
5189
5251
  data: Mn(
5190
- n.obj.data,
5191
- (r) => new I(r, [n.ref.blockId, n.ref.name])
5252
+ n2.obj.data,
5253
+ (r) => new I(r, [n2.ref.blockId, n2.ref.name])
5192
5254
  )
5193
5255
  }
5194
5256
  }))
@@ -5213,10 +5275,10 @@
5213
5275
  return (r = this.getData().entries.find(
5214
5276
  (i) => i.ref.blockId === e.blockId && i.ref.name === e.name
5215
5277
  )) == null ? void 0 : r.obj;
5216
- const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
5217
- if (n)
5218
- return jn(
5219
- n,
5278
+ const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
5279
+ if (n2)
5280
+ return In(
5281
+ n2,
5220
5282
  (i) => new I(i, [e.blockId, e.name])
5221
5283
  );
5222
5284
  }
@@ -5226,9 +5288,9 @@
5226
5288
  * @returns p-column associated with the ref
5227
5289
  */
5228
5290
  getPColumnByRef(e) {
5229
- const n = this.getDataByRef(e);
5230
- if (n)
5231
- return Dn(n);
5291
+ const n2 = this.getDataByRef(e);
5292
+ if (n2)
5293
+ return Dn(n2);
5232
5294
  }
5233
5295
  /**
5234
5296
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -5236,10 +5298,10 @@
5236
5298
  * @returns p-column spec associated with the ref
5237
5299
  */
5238
5300
  getPColumnSpecByRef(e) {
5239
- const n = this.getSpecByRef(e);
5240
- if (n) {
5241
- if (!f(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
5242
- return n;
5301
+ const n2 = this.getSpecByRef(e);
5302
+ if (n2) {
5303
+ if (!f(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
5304
+ return n2;
5243
5305
  }
5244
5306
  }
5245
5307
  /**
@@ -5255,29 +5317,29 @@
5255
5317
  * @deprecated delete this method after Jan 1, 2025
5256
5318
  */
5257
5319
  findDataWithCompatibleSpec(e) {
5258
- const n = [];
5320
+ const n2 = [];
5259
5321
  e: for (const r of this.getData().entries) {
5260
5322
  if (!f(r.obj.spec))
5261
5323
  continue;
5262
5324
  const i = r.obj.spec;
5263
5325
  if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && re(e.domain, i.domain)) {
5264
- for (let s = 0; s < e.axesSpec.length; ++s) {
5265
- const o = e.axesSpec[s], a = i.axesSpec[s];
5326
+ for (let s2 = 0; s2 < e.axesSpec.length; ++s2) {
5327
+ const o = e.axesSpec[s2], a = i.axesSpec[s2];
5266
5328
  if (o.name !== a.name || o.type !== a.type || !re(o.domain, a.domain))
5267
5329
  continue e;
5268
5330
  }
5269
- n.push(r.obj);
5331
+ n2.push(r.obj);
5270
5332
  }
5271
5333
  }
5272
- return n;
5334
+ return n2;
5273
5335
  }
5274
5336
  /**
5275
5337
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
5276
5338
  * @returns a map of axis value => label
5277
5339
  */
5278
5340
  findLabels(e) {
5279
- const n = this.getData();
5280
- for (const r of n.entries) {
5341
+ const n2 = this.getData();
5342
+ for (const r of n2.entries) {
5281
5343
  if (!Y$1(r.obj)) continue;
5282
5344
  const i = r.obj.spec;
5283
5345
  if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && re(e.domain, i.axesSpec[0].domain)) {
@@ -5317,7 +5379,7 @@
5317
5379
  getNamedAccessor(e) {
5318
5380
  return ie(
5319
5381
  this.ctx.getAccessorHandleByName(e),
5320
- (n) => new I(n, [e])
5382
+ (n2) => new I(n2, [e])
5321
5383
  );
5322
5384
  }
5323
5385
  get prerun() {
@@ -5336,25 +5398,25 @@
5336
5398
  }
5337
5399
  verifyInlineAndExplicitColumnsSupport(e) {
5338
5400
  var i;
5339
- const n = e.some((s) => !(s.data instanceof I) || dn(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5340
- if (n && !r) throw Error("Inline or explicit columns not supported");
5401
+ const n2 = e.some((s2) => !(s2.data instanceof I) || dn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5402
+ if (n2 && !r) throw Error("Inline or explicit columns not supported");
5341
5403
  }
5342
5404
  createPFrame(e) {
5343
5405
  return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
5344
- e.map((n) => fe(n))
5406
+ e.map((n2) => fe(n2))
5345
5407
  );
5346
5408
  }
5347
5409
  createPTable(e) {
5348
- let n;
5349
- return "columns" in e ? n = {
5410
+ let n2;
5411
+ return "columns" in e ? n2 = {
5350
5412
  src: {
5351
5413
  type: "full",
5352
5414
  entries: e.columns.map((r) => ({ type: "column", column: r }))
5353
5415
  },
5354
5416
  filters: e.filters ?? [],
5355
5417
  sorting: e.sorting ?? []
5356
- } : n = e, this.verifyInlineAndExplicitColumnsSupport(Bn(n.src)), this.ctx.createPTable(
5357
- En(n, (r) => fe(r))
5418
+ } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(jn(n2.src)), this.ctx.createPTable(
5419
+ En(n2, (r) => fe(r))
5358
5420
  );
5359
5421
  }
5360
5422
  /** @deprecated scheduled for removal from SDK */
@@ -5366,7 +5428,7 @@
5366
5428
  return this.ctx.getCurrentUnstableMarker();
5367
5429
  }
5368
5430
  }
5369
- const U = "1.27.6";
5431
+ const U = "1.27.10";
5370
5432
  function tt(t) {
5371
5433
  return t.__renderLambda === true;
5372
5434
  }
@@ -5375,8 +5437,8 @@
5375
5437
  return tt(t) ? t.handle : t;
5376
5438
  }
5377
5439
  class _ {
5378
- constructor(e, n, r, i, s, o, a) {
5379
- this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a;
5440
+ constructor(e, n2, r, i, s2, o, a) {
5441
+ this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a;
5380
5442
  }
5381
5443
  static create(e = "Heavy") {
5382
5444
  return new _(
@@ -5389,10 +5451,10 @@
5389
5451
  void 0
5390
5452
  );
5391
5453
  }
5392
- output(e, n, r = {}) {
5393
- if (typeof n == "function") {
5454
+ output(e, n2, r = {}) {
5455
+ if (typeof n2 == "function") {
5394
5456
  const i = `output#${e}`;
5395
- return q(i, () => n(new z())), new _(
5457
+ return q(i, () => n2(new z())), new _(
5396
5458
  this._renderingMode,
5397
5459
  this._initialArgs,
5398
5460
  this._initialUiState,
@@ -5415,7 +5477,7 @@
5415
5477
  this._initialUiState,
5416
5478
  {
5417
5479
  ...this._outputs,
5418
- [e]: n
5480
+ [e]: n2
5419
5481
  },
5420
5482
  this._inputsValid,
5421
5483
  this._sections,
@@ -5423,8 +5485,8 @@
5423
5485
  );
5424
5486
  }
5425
5487
  /** Shortcut for {@link output} with retentive flag set to true. */
5426
- retentiveOutput(e, n) {
5427
- return this.output(e, n, { retentive: true });
5488
+ retentiveOutput(e, n2) {
5489
+ return this.output(e, n2, { retentive: true });
5428
5490
  }
5429
5491
  argsValid(e) {
5430
5492
  return typeof e == "function" ? (q("inputsValid", () => e(new z())), new _(
@@ -5541,66 +5603,66 @@
5541
5603
  inputsValid: se(this._inputsValid),
5542
5604
  sections: se(this._sections),
5543
5605
  outputs: Object.fromEntries(
5544
- Object.entries(this._outputs).map(([n, r]) => [n, se(r)])
5606
+ Object.entries(this._outputs).map(([n2, r]) => [n2, se(r)])
5545
5607
  )
5546
5608
  };
5547
5609
  return Ke() ? be({ sdkVersion: U }) : { config: e };
5548
5610
  }
5549
5611
  }
5550
- function Gt(t, e, n, r) {
5551
- var l2, m$1;
5612
+ function Wt(t, e, n2, r) {
5613
+ var l2, m2;
5552
5614
  Array.isArray(r) && (r = { filters: r });
5553
- const i = t.resultPool.getData().entries.map((u) => u.obj).filter(Y$1).filter((u) => u.spec.name === "pl7.app/label" && u.spec.axesSpec.length === 1), s = (u, f2) => {
5554
- let p2 = u.toString();
5615
+ const i = t.resultPool.getData().entries.map((u2) => u2.obj).filter(Y$1).filter((u2) => u2.spec.name === "pl7.app/label" && u2.spec.axesSpec.length === 1), s2 = (u2, f2) => {
5616
+ let p2 = u2.toString();
5555
5617
  if (f2)
5556
5618
  for (const d in f2)
5557
5619
  p2 += d, p2 += f2[d];
5558
5620
  return p2;
5559
5621
  }, o = /* @__PURE__ */ new Map();
5560
- for (const u of e)
5561
- for (const f2 of u.spec.axesSpec) {
5562
- const p2 = m(f2);
5622
+ for (const u2 of e)
5623
+ for (const f2 of u2.spec.axesSpec) {
5624
+ const p2 = y(f2);
5563
5625
  for (const d of i) {
5564
- const y = d.spec.axesSpec[0], g2 = m(d.spec.axesSpec[0]);
5626
+ const y$1 = d.spec.axesSpec[0], g2 = y(d.spec.axesSpec[0]);
5565
5627
  if (X(p2, g2)) {
5566
5628
  const v = Object.keys(p2.domain ?? {}).length, w2 = Object.keys(g2.domain ?? {}).length;
5567
5629
  if (v > w2) {
5568
- const x2 = s(d.id, p2.domain);
5630
+ const x2 = s2(d.id, p2.domain);
5569
5631
  o.set(x2, {
5570
5632
  id: x2,
5571
5633
  spec: {
5572
5634
  ...d.spec,
5573
- axesSpec: [{ ...p2, annotations: y.annotations }]
5635
+ axesSpec: [{ ...p2, annotations: y$1.annotations }]
5574
5636
  },
5575
5637
  data: d.data
5576
5638
  });
5577
5639
  } else
5578
- o.set(s(d.id), d);
5640
+ o.set(s2(d.id), d);
5579
5641
  }
5580
5642
  }
5581
5643
  }
5582
5644
  if ([...e, ...o.values()].some(
5583
- (u) => u.data instanceof I && !u.data.getIsReadyOrError()
5645
+ (u2) => u2.data instanceof I && !u2.data.getIsReadyOrError()
5584
5646
  ))
5585
5647
  return;
5586
5648
  let a = e;
5587
- const c = [];
5649
+ const c2 = [];
5588
5650
  if (r != null && r.coreColumnPredicate) {
5589
5651
  a = [];
5590
- for (const u of e)
5591
- r.coreColumnPredicate(u.spec) ? a.push(u) : c.push(u);
5652
+ for (const u2 of e)
5653
+ r.coreColumnPredicate(u2.spec) ? a.push(u2) : c2.push(u2);
5592
5654
  }
5593
- return c.push(...o.values()), t.createPTable({
5655
+ return c2.push(...o.values()), t.createPTable({
5594
5656
  src: {
5595
5657
  type: "outer",
5596
5658
  primary: {
5597
5659
  type: (r == null ? void 0 : r.coreJoinType) ?? "full",
5598
- entries: a.map((u) => ({ type: "column", column: u }))
5660
+ entries: a.map((u2) => ({ type: "column", column: u2 }))
5599
5661
  },
5600
- secondary: c.map((u) => ({ type: "column", column: u }))
5662
+ secondary: c2.map((u2) => ({ type: "column", column: u2 }))
5601
5663
  },
5602
- filters: [...(r == null ? void 0 : r.filters) ?? [], ...((l2 = n == null ? void 0 : n.pTableParams) == null ? void 0 : l2.filters) ?? []],
5603
- sorting: ((m$1 = n == null ? void 0 : n.pTableParams) == null ? void 0 : m$1.sorting) ?? []
5664
+ filters: [...(r == null ? void 0 : r.filters) ?? [], ...((l2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : l2.filters) ?? []],
5665
+ sorting: ((m2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : m2.sorting) ?? []
5604
5666
  });
5605
5667
  }
5606
5668
  const ImportFileHandleSchema = z$2.string().optional().refine(
@@ -5618,8 +5680,8 @@
5618
5680
  }
5619
5681
  return lst;
5620
5682
  }
5621
- function times(n, cb) {
5622
- return toList(range(0, n)).map(cb);
5683
+ function times(n2, cb) {
5684
+ return toList(range(0, n2)).map(cb);
5623
5685
  }
5624
5686
  const $BlockArgs = z$2.object({
5625
5687
  tableNumRows: z$2.number().default(100),
@@ -5649,7 +5711,7 @@
5649
5711
  val: v.toString()
5650
5712
  };
5651
5713
  });
5652
- return Gt(
5714
+ return Wt(
5653
5715
  ctx,
5654
5716
  [
5655
5717
  {