@milaboratories/milaboratories.pool-explorer.model 1.0.26 → 1.0.28

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 Pe = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
38
+ const ve = /* @__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 = (_2, value) => {
90
+ util2.jsonStringifyReplacer = (_, value) => {
91
91
  if (typeof value === "bigint") {
92
92
  return value.toString();
93
93
  }
@@ -3949,8 +3949,8 @@
3949
3949
  ZodError
3950
3950
  });
3951
3951
  var $ = Object.defineProperty;
3952
- var L$1 = (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$1(n2, typeof t != "symbol" ? t + "" : t, e);
3952
+ var D = (n2, t, e) => t in n2 ? $(n2, t, { enumerable: true, configurable: true, writable: true, value: e }) : n2[t] = e;
3953
+ var m$2 = (n2, t, e) => D(n2, typeof t != "symbol" ? t + "" : t, e);
3954
3954
  function w(n2) {
3955
3955
  throw new Error("Unexpected object: " + n2);
3956
3956
  }
@@ -4081,12 +4081,12 @@
4081
4081
  }
4082
4082
  }
4083
4083
  }
4084
- function y(n2) {
4084
+ function p$1(n2) {
4085
4085
  const { type: t, name: e, domain: r } = n2;
4086
4086
  return { type: t, name: e, ...r && { domain: r } };
4087
4087
  }
4088
- function En(n2) {
4089
- return Pe(y(n2));
4088
+ function Cn(n2) {
4089
+ return ve(p$1(n2));
4090
4090
  }
4091
4091
  function X$1(n2, t) {
4092
4092
  if (n2 === void 0) return t === void 0;
@@ -4098,7 +4098,7 @@
4098
4098
  function z(n2, t) {
4099
4099
  return n2.name === t.name && X$1(n2.domain, t.domain);
4100
4100
  }
4101
- function Cn(n2, t) {
4101
+ function Jn(n2, t) {
4102
4102
  return { ...n2, src: l$1(n2.src, t) };
4103
4103
  }
4104
4104
  function l$1(n2, t) {
@@ -4132,37 +4132,37 @@
4132
4132
  }
4133
4133
  }
4134
4134
  function G(n2) {
4135
- return Pe(n2);
4135
+ return ve(n2);
4136
4136
  }
4137
4137
  function A(n2) {
4138
- return Pe(y(n2));
4138
+ return ve(p$1(n2));
4139
4139
  }
4140
4140
  function x(n2, t) {
4141
4141
  return JSON.stringify([n2, t]);
4142
4142
  }
4143
- class On {
4143
+ class $n {
4144
4144
  /**
4145
4145
  * Creates a new anchor context from a set of anchor column specifications
4146
4146
  * @param anchors Record of anchor column specifications indexed by anchor ID
4147
4147
  */
4148
4148
  constructor(t) {
4149
- p$1(this, "domains", /* @__PURE__ */ new Map());
4150
- p$1(this, "axes", /* @__PURE__ */ new Map());
4151
- p$1(this, "domainPacks", []);
4152
- p$1(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
4149
+ m$2(this, "domains", /* @__PURE__ */ new Map());
4150
+ m$2(this, "axes", /* @__PURE__ */ new Map());
4151
+ m$2(this, "domainPacks", []);
4152
+ m$2(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
4153
4153
  this.anchors = t;
4154
4154
  const e = Object.entries(t);
4155
4155
  e.sort((r, o) => r[0].localeCompare(o[0]));
4156
4156
  for (const [r, o] of e) {
4157
- for (let i = 0; i < o.axesSpec.length; i++) {
4158
- const a = o.axesSpec[i], s2 = A(a);
4159
- this.axes.set(s2, { anchor: r, idx: i });
4157
+ for (let s2 = 0; s2 < o.axesSpec.length; s2++) {
4158
+ const a = o.axesSpec[s2], i = A(a);
4159
+ this.axes.set(i, { anchor: r, idx: s2 });
4160
4160
  }
4161
4161
  if (o.domain !== void 0) {
4162
- const i = Object.entries(o.domain);
4163
- i.sort((a, s2) => a[0].localeCompare(s2[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([a]) => a));
4164
- for (const [a, s2] of i) {
4165
- const u2 = x(a, s2);
4162
+ const s2 = Object.entries(o.domain);
4163
+ s2.sort((a, i) => a[0].localeCompare(i[0])), this.domainPackToAnchor.set(JSON.stringify(s2), r), this.domainPacks.push(s2.map(([a]) => a));
4164
+ for (const [a, i] of s2) {
4165
+ const u2 = x(a, i);
4166
4166
  this.domains.set(u2, r);
4167
4167
  }
4168
4168
  }
@@ -4180,48 +4180,48 @@
4180
4180
  if (t.domain !== void 0)
4181
4181
  n:
4182
4182
  for (const a of this.domainPacks) {
4183
- const s2 = [];
4183
+ const i = [];
4184
4184
  for (const c2 of a) {
4185
4185
  const d = t.domain[c2];
4186
4186
  if (d !== void 0)
4187
- s2.push([c2, d]);
4187
+ i.push([c2, d]);
4188
4188
  else
4189
4189
  break n;
4190
4190
  }
4191
- const u2 = this.domainPackToAnchor.get(JSON.stringify(s2));
4191
+ const u2 = this.domainPackToAnchor.get(JSON.stringify(i));
4192
4192
  if (u2 !== void 0) {
4193
4193
  r.domainAnchor = u2, o = new Set(a);
4194
4194
  break;
4195
4195
  }
4196
4196
  }
4197
- for (const [a, s2] of Object.entries(t.domain ?? {})) {
4197
+ for (const [a, i] of Object.entries(t.domain ?? {})) {
4198
4198
  if (o !== void 0 && o.has(a))
4199
4199
  continue;
4200
- const u2 = x(a, s2), c2 = this.domains.get(u2);
4201
- r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : s2;
4200
+ const u2 = x(a, i), c2 = this.domains.get(u2);
4201
+ r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : i;
4202
4202
  }
4203
4203
  if (r.axes = t.axesSpec.map((a) => {
4204
- const s2 = A(a);
4205
- return this.axes.get(s2) ?? a;
4204
+ const i = A(a), u2 = this.axes.get(i);
4205
+ return u2 === void 0 ? p$1(a) : u2;
4206
4206
  }), !e || e.length === 0)
4207
4207
  return r;
4208
- const i = [];
4208
+ const s2 = [];
4209
4209
  for (const a of e) {
4210
- const [s2, u2] = a;
4211
- if (typeof s2 == "number") {
4212
- if (s2 < 0 || s2 >= t.axesSpec.length)
4213
- throw new Error(`Axis index ${s2} is out of bounds (0-${t.axesSpec.length - 1})`);
4214
- i.push([s2, u2]);
4210
+ const [i, u2] = a;
4211
+ if (typeof i == "number") {
4212
+ if (i < 0 || i >= t.axesSpec.length)
4213
+ throw new Error(`Axis index ${i} is out of bounds (0-${t.axesSpec.length - 1})`);
4214
+ s2.push([i, u2]);
4215
4215
  } else {
4216
- const c2 = t.axesSpec.findIndex((d) => d.name === s2);
4216
+ const c2 = t.axesSpec.findIndex((d) => d.name === i);
4217
4217
  if (c2 === -1)
4218
- throw new Error(`Axis with name "${s2}" not found in the column specification`);
4219
- i.push([c2, u2]);
4218
+ throw new Error(`Axis with name "${i}" not found in the column specification`);
4219
+ s2.push([c2, u2]);
4220
4220
  }
4221
4221
  }
4222
- return i.sort((a, s2) => a[0] - s2[0]), {
4222
+ return s2.sort((a, i) => a[0] - i[0]), {
4223
4223
  source: r,
4224
- axisFilters: i
4224
+ axisFilters: s2
4225
4225
  };
4226
4226
  }
4227
4227
  /**
@@ -4234,31 +4234,34 @@
4234
4234
  return G(this.derive(t, e));
4235
4235
  }
4236
4236
  }
4237
- function $n(n2, t) {
4238
- const e = { ...t };
4239
- if (e.domainAnchor !== void 0) {
4240
- const r = n2[e.domainAnchor];
4241
- if (!r)
4242
- throw new Error(`Anchor "${e.domainAnchor}" not found`);
4243
- const o = r.domain || {};
4244
- e.domain = { ...o, ...e.domain }, delete e.domainAnchor;
4245
- }
4246
- if (e.domain) {
4247
- const r = {};
4248
- for (const [o, i] of Object.entries(e.domain))
4237
+ function Dn(n2, t, e) {
4238
+ const r = { ...t }, o = (e == null ? void 0 : e.ignoreMissingDomains) ?? false;
4239
+ if (r.domainAnchor !== void 0) {
4240
+ const s2 = n2[r.domainAnchor];
4241
+ if (!s2)
4242
+ throw new Error(`Anchor "${r.domainAnchor}" not found`);
4243
+ const a = s2.domain || {};
4244
+ r.domain = { ...a, ...r.domain }, delete r.domainAnchor;
4245
+ }
4246
+ if (r.domain) {
4247
+ const s2 = {};
4248
+ for (const [a, i] of Object.entries(r.domain))
4249
4249
  if (typeof i == "string")
4250
- r[o] = i;
4250
+ s2[a] = i;
4251
4251
  else {
4252
- const a = n2[i.anchor];
4253
- if (!a)
4254
- throw new Error(`Anchor "${i.anchor}" not found for domain key "${o}"`);
4255
- if (!a.domain || a.domain[o] === void 0)
4256
- throw new Error(`Domain key "${o}" not found in anchor "${i.anchor}"`);
4257
- r[o] = a.domain[o];
4252
+ const u2 = n2[i.anchor];
4253
+ if (!u2)
4254
+ throw new Error(`Anchor "${i.anchor}" not found for domain key "${a}"`);
4255
+ if (!u2.domain || u2.domain[a] === void 0) {
4256
+ if (!o)
4257
+ throw new Error(`Domain key "${a}" not found in anchor "${i.anchor}"`);
4258
+ continue;
4259
+ }
4260
+ s2[a] = u2.domain[a];
4258
4261
  }
4259
- e.domain = r;
4262
+ r.domain = s2;
4260
4263
  }
4261
- return e.axes && (e.axes = e.axes.map((r) => Q(n2, r))), e;
4264
+ return r.axes && (r.axes = r.axes.map((s2) => Q(n2, s2))), r;
4262
4265
  }
4263
4266
  function Q(n2, t) {
4264
4267
  if (!Y$1(t))
@@ -4271,14 +4274,14 @@
4271
4274
  throw new Error(`Axis index ${t.idx} out of bounds for anchor "${e}"`);
4272
4275
  return r.axesSpec[t.idx];
4273
4276
  } else if ("name" in t) {
4274
- const o = r.axesSpec.filter((i) => i.name === t.name);
4277
+ const o = r.axesSpec.filter((s2) => s2.name === t.name);
4275
4278
  if (o.length > 1)
4276
4279
  throw new Error(`Multiple axes with name "${t.name}" found in anchor "${e}"`);
4277
4280
  if (o.length === 0)
4278
4281
  throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);
4279
4282
  return o[0];
4280
4283
  } else if ("id" in t) {
4281
- const o = r.axesSpec.filter((i) => z(t.id, y(i)));
4284
+ const o = r.axesSpec.filter((s2) => z(t.id, p$1(s2)));
4282
4285
  if (o.length > 1)
4283
4286
  throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);
4284
4287
  if (o.length === 0)
@@ -4296,17 +4299,17 @@
4296
4299
  function Z$1(n2) {
4297
4300
  return f(n2.spec);
4298
4301
  }
4299
- function In(n2) {
4302
+ function Bn(n2) {
4300
4303
  if (!Z$1(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4301
4304
  return n2;
4302
4305
  }
4303
- function Bn(n2, t) {
4306
+ function jn(n2, t) {
4304
4307
  return n2 === void 0 ? void 0 : {
4305
4308
  ...n2,
4306
4309
  data: t(n2.data)
4307
4310
  };
4308
4311
  }
4309
- function jn(n2) {
4312
+ function Fn(n2) {
4310
4313
  const t = /* @__PURE__ */ new Map(), e = (r) => {
4311
4314
  switch (r.type) {
4312
4315
  case "column":
@@ -4364,7 +4367,7 @@
4364
4367
  return false;
4365
4368
  }
4366
4369
  if (t.axes !== void 0) {
4367
- const e = n2.axesSpec.map(y);
4370
+ const e = n2.axesSpec.map(p$1);
4368
4371
  if (t.partialAxesMatch) {
4369
4372
  for (const r of t.axes)
4370
4373
  if (!e.some((o) => k(r, o)))
@@ -4386,14 +4389,14 @@
4386
4389
  if (t.annotationPatterns !== void 0) {
4387
4390
  const e = n2.annotations || {};
4388
4391
  for (const [r, o] of Object.entries(t.annotationPatterns)) {
4389
- const i = e[r];
4390
- if (i === void 0 || !new RegExp(o).test(i))
4392
+ const s2 = e[r];
4393
+ if (s2 === void 0 || !new RegExp(o).test(s2))
4391
4394
  return false;
4392
4395
  }
4393
4396
  }
4394
4397
  return true;
4395
4398
  }
4396
- function Fn(n2) {
4399
+ function Un(n2) {
4397
4400
  return Array.isArray(n2) ? (t) => n2.some((e) => f(t) && N(t, e)) : (t) => f(t) && N(t, n2);
4398
4401
  }
4399
4402
  z$1.object({
@@ -4403,10 +4406,10 @@
4403
4406
  }).describe(
4404
4407
  "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."
4405
4408
  ).strict().readonly();
4406
- function Rn(n2) {
4409
+ function Mn(n2) {
4407
4410
  return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
4408
4411
  }
4409
- function _n(n2, t) {
4412
+ function Hn(n2, t) {
4410
4413
  return n2.ok ? { ok: true, value: t(n2.value) } : n2;
4411
4414
  }
4412
4415
  const on = 24;
@@ -4463,13 +4466,13 @@
4463
4466
  cause: z$1.lazy(() => n).optional(),
4464
4467
  errors: z$1.lazy(() => n.array()).optional()
4465
4468
  });
4466
- var je = Object.defineProperty;
4467
- var Ke = (t, e, n2) => e in t ? je(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4468
- var L = (t, e, n2) => Ke(t, typeof e != "symbol" ? e + "" : e, n2);
4469
+ var Ne = Object.defineProperty;
4470
+ var Ue = (t, e, n2) => e in t ? Ne(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4471
+ var L = (t, e, n2) => Ue(t, typeof e != "symbol" ? e + "" : e, n2);
4469
4472
  function Z(t) {
4470
4473
  return { type: "Immediate", value: t };
4471
4474
  }
4472
- function Xe() {
4475
+ function nt() {
4473
4476
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4474
4477
  }
4475
4478
  function _e(t) {
@@ -4478,7 +4481,7 @@
4478
4481
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
4479
4482
  throw new Error("Can't get platforma instance.");
4480
4483
  }
4481
- function Qe() {
4484
+ function rt() {
4482
4485
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4483
4486
  }
4484
4487
  function m() {
@@ -4486,31 +4489,31 @@
4486
4489
  throw new Error("Not in config rendering context");
4487
4490
  }
4488
4491
  function Y(t, e) {
4489
- const n2 = Qe();
4492
+ const n2 = rt();
4490
4493
  if (n2 === void 0) return false;
4491
4494
  if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4492
4495
  return n2.callbackRegistry[t] = e, true;
4493
4496
  }
4494
- const ae = /* @__PURE__ */ new Map();
4495
- function Ze(t, e) {
4497
+ const oe = /* @__PURE__ */ new Map();
4498
+ function it(t, e) {
4496
4499
  t in m().callbackRegistry || (m().callbackRegistry[t] = (n2) => {
4497
- for (const r of ae.get(t))
4500
+ for (const r of oe.get(t))
4498
4501
  r(n2);
4499
- }, ae.set(t, [])), ae.get(t).push(e);
4502
+ }, oe.set(t, [])), oe.get(t).push(e);
4500
4503
  }
4501
- class C {
4504
+ class S {
4502
4505
  constructor(e, n2 = (r) => r) {
4503
4506
  L(this, "isResolved", false);
4504
4507
  L(this, "resolvedValue");
4505
- this.handle = e, this.postProcess = n2, Ze(e, (r) => {
4508
+ this.handle = e, this.postProcess = n2, it(e, (r) => {
4506
4509
  this.resolvedValue = n2(r), this.isResolved = true;
4507
4510
  });
4508
4511
  }
4509
4512
  map(e) {
4510
- return new C(this.handle, (n2) => e(this.postProcess(n2)));
4513
+ return new S(this.handle, (n2) => e(this.postProcess(n2)));
4511
4514
  }
4512
4515
  mapDefined(e) {
4513
- return new C(this.handle, (n2) => {
4516
+ return new S(this.handle, (n2) => {
4514
4517
  const r = this.postProcess(n2);
4515
4518
  return r ? e(r) : void 0;
4516
4519
  });
@@ -4519,10 +4522,10 @@
4519
4522
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4520
4523
  }
4521
4524
  }
4522
- function pe(t, e) {
4525
+ function ce(t, e) {
4523
4526
  return t === void 0 ? void 0 : e(t);
4524
4527
  }
4525
- class _ {
4528
+ class I {
4526
4529
  constructor(e, n2) {
4527
4530
  this.handle = e, this.resolvePath = n2;
4528
4531
  }
@@ -4561,9 +4564,9 @@
4561
4564
  ...this.resolvePath,
4562
4565
  ...n2.map((i) => typeof i == "string" ? i : i.field)
4563
4566
  ];
4564
- return pe(
4567
+ return ce(
4565
4568
  m().resolveWithCommon(this.handle, e, ...n2),
4566
- (i) => new _(i, r)
4569
+ (i) => new I(i, r)
4567
4570
  );
4568
4571
  }
4569
4572
  get resourceType() {
@@ -4583,9 +4586,9 @@
4583
4586
  }
4584
4587
  getError() {
4585
4588
  const e = [...this.resolvePath, "error"];
4586
- return pe(
4589
+ return ce(
4587
4590
  m().getError(this.handle),
4588
- (n2) => new _(n2, e)
4591
+ (n2) => new I(n2, e)
4589
4592
  );
4590
4593
  }
4591
4594
  listInputFields() {
@@ -4643,18 +4646,18 @@
4643
4646
  const i = {};
4644
4647
  for (const [s2, o] of Object.entries(r)) {
4645
4648
  const a = [...this.resolvePath, s2];
4646
- i[s2] = Bn(o, (l2) => new _(l2, a));
4649
+ i[s2] = jn(o, (l2) => new I(l2, a));
4647
4650
  }
4648
4651
  return i;
4649
4652
  }
4650
4653
  getFileContentAsBase64() {
4651
- return new C(m().getBlobContentAsBase64(this.handle));
4654
+ return new S(m().getBlobContentAsBase64(this.handle));
4652
4655
  }
4653
4656
  getFileContentAsString() {
4654
- return new C(m().getBlobContentAsString(this.handle));
4657
+ return new S(m().getBlobContentAsString(this.handle));
4655
4658
  }
4656
4659
  getFileContentAsJson() {
4657
- return new C(
4660
+ return new S(
4658
4661
  m().getBlobContentAsString(this.handle)
4659
4662
  ).mapDefined((e) => JSON.parse(e));
4660
4663
  }
@@ -4674,7 +4677,7 @@
4674
4677
  * @returns downloaded file handle
4675
4678
  */
4676
4679
  getFileHandle() {
4677
- return new C(m().getDownloadedBlobContentHandle(this.handle));
4680
+ return new S(m().getDownloadedBlobContentHandle(this.handle));
4678
4681
  }
4679
4682
  /**
4680
4683
  * @deprecated use getFileHandle
@@ -4686,7 +4689,7 @@
4686
4689
  * @returns downloaded file handle
4687
4690
  */
4688
4691
  getRemoteFileHandle() {
4689
- return new C(m().getOnDemandBlobContentHandle(this.handle));
4692
+ return new S(m().getOnDemandBlobContentHandle(this.handle));
4690
4693
  }
4691
4694
  /**
4692
4695
  * @deprecated use getRemoteFileHandle
@@ -4698,22 +4701,22 @@
4698
4701
  * @returns the url to the extracted folder
4699
4702
  */
4700
4703
  extractArchiveAndGetURL(e) {
4701
- return new C(m().extractArchiveAndGetURL(this.handle, e));
4704
+ return new S(m().extractArchiveAndGetURL(this.handle, e));
4702
4705
  }
4703
4706
  getImportProgress() {
4704
- return new C(m().getImportProgress(this.handle));
4707
+ return new S(m().getImportProgress(this.handle));
4705
4708
  }
4706
4709
  getLastLogs(e) {
4707
- return new C(m().getLastLogs(this.handle, e));
4710
+ return new S(m().getLastLogs(this.handle, e));
4708
4711
  }
4709
4712
  getProgressLog(e) {
4710
- return new C(m().getProgressLog(this.handle, e));
4713
+ return new S(m().getProgressLog(this.handle, e));
4711
4714
  }
4712
4715
  getProgressLogWithInfo(e) {
4713
- return new C(m().getProgressLogWithInfo(this.handle, e));
4716
+ return new S(m().getProgressLogWithInfo(this.handle, e));
4714
4717
  }
4715
4718
  getLogHandle() {
4716
- return new C(m().getLogHandle(this.handle));
4719
+ return new S(m().getLogHandle(this.handle));
4717
4720
  }
4718
4721
  allFieldsResolved(e = "Input") {
4719
4722
  switch (e) {
@@ -4739,97 +4742,97 @@
4739
4742
  let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4740
4743
  (u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
4741
4744
  );
4742
- return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, S]) => o(u2, S));
4745
+ return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, w2]) => o(u2, w2));
4743
4746
  }
4744
4747
  }
4745
- const Ie = "staging", Le = "main";
4746
- const nt = "pl7.app/label", rt = "pl7.app/trace", it = z$1.object({
4748
+ const Le = "staging", Te = "main";
4749
+ const at = "pl7.app/label", lt = "pl7.app/trace", ut = z$1.object({
4747
4750
  type: z$1.string(),
4748
4751
  importance: z$1.number().optional(),
4749
4752
  id: z$1.string().optional(),
4750
4753
  label: z$1.string()
4751
- }), st = z$1.array(it), ot = 1e-3, at = "__LABEL__", ve = "__LABEL__@1";
4752
- function Ee(t, e, n2 = {}) {
4753
- const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((p2) => {
4754
+ }), ct = z$1.array(ut), pt = 1e-3, dt = "__LABEL__", we = "__LABEL__@1";
4755
+ function Fe(t, e, n2 = {}) {
4756
+ const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((d) => {
4754
4757
  var q, F;
4755
- const c2 = e(p2);
4756
- let h, A2, y2;
4757
- "spec" in c2 && typeof c2.spec == "object" ? (h = c2.spec, A2 = c2.prefixTrace, y2 = c2.suffixTrace) : h = c2;
4758
- const v = (q = h.annotations) == null ? void 0 : q[nt], g = (F = h.annotations) == null ? void 0 : F[rt], P = (g ? st.safeParse(JSON.parse(g)).data : void 0) ?? [], b = [
4759
- ...A2 ?? [],
4760
- ...P,
4761
- ...y2 ?? []
4758
+ const h = e(d);
4759
+ let f2, x2, c2;
4760
+ "spec" in h && typeof h.spec == "object" ? (f2 = h.spec, x2 = h.prefixTrace, c2 = h.suffixTrace) : f2 = h;
4761
+ const y = (q = f2.annotations) == null ? void 0 : q[at], g = (F = f2.annotations) == null ? void 0 : F[lt], v = (g ? ct.safeParse(JSON.parse(g)).data : void 0) ?? [], A2 = [
4762
+ ...x2 ?? [],
4763
+ ...v,
4764
+ ...c2 ?? []
4762
4765
  ];
4763
- if (v) {
4764
- const I = { label: v, type: at, importance: -2 };
4765
- n2.addLabelAsSuffix ? b.push(I) : b.splice(0, 0, I);
4766
+ if (y) {
4767
+ const _ = { label: y, type: dt, importance: -2 };
4768
+ n2.addLabelAsSuffix ? A2.push(_) : A2.splice(0, 0, _);
4766
4769
  }
4767
- const k2 = [], $2 = /* @__PURE__ */ new Map();
4768
- for (let I = b.length - 1; I >= 0; --I) {
4769
- const { type: R } = b[I], se = b[I].importance ?? 0, J = ($2.get(R) ?? 0) + 1;
4770
+ const D2 = [], $2 = /* @__PURE__ */ new Map();
4771
+ for (let _ = A2.length - 1; _ >= 0; --_) {
4772
+ const { type: R } = A2[_], ie = A2[_].importance ?? 0, J = ($2.get(R) ?? 0) + 1;
4770
4773
  $2.set(R, J);
4771
- const w2 = `${R}@${J}`;
4772
- i.set(w2, (i.get(w2) ?? 0) + 1), r.set(
4773
- w2,
4774
+ const P = `${R}@${J}`;
4775
+ i.set(P, (i.get(P) ?? 0) + 1), r.set(
4776
+ P,
4774
4777
  Math.max(
4775
- r.get(w2) ?? Number.NEGATIVE_INFINITY,
4776
- se - (b.length - I) * ot
4778
+ r.get(P) ?? Number.NEGATIVE_INFINITY,
4779
+ ie - (A2.length - _) * pt
4777
4780
  )
4778
- ), k2.push({ ...b[I], fullType: w2, occurenceIndex: J });
4781
+ ), D2.push({ ...A2[_], fullType: P, occurenceIndex: J });
4779
4782
  }
4780
- return k2.reverse(), {
4781
- value: p2,
4782
- spec: h,
4783
- label: v,
4784
- fullTrace: k2
4783
+ return D2.reverse(), {
4784
+ value: d,
4785
+ spec: f2,
4786
+ label: y,
4787
+ fullTrace: D2
4785
4788
  };
4786
4789
  }), o = [], a = [], l2 = [...r];
4787
- l2.sort(([, p2], [, c2]) => c2 - p2);
4788
- for (const [p2] of l2)
4789
- p2.endsWith("@1") || i.get(p2) === t.length ? o.push(p2) : a.push(p2);
4790
- const u2 = (p2) => {
4791
- const c2 = [];
4792
- for (let h = 0; h < s2.length; h++) {
4793
- const A2 = s2[h], y2 = A2.fullTrace.filter((P) => p2.has(P.fullType));
4794
- if (y2.length === 0)
4790
+ l2.sort(([, d], [, h]) => h - d);
4791
+ for (const [d] of l2)
4792
+ d.endsWith("@1") || i.get(d) === t.length ? o.push(d) : a.push(d);
4793
+ const u2 = (d) => {
4794
+ const h = [];
4795
+ for (let f2 = 0; f2 < s2.length; f2++) {
4796
+ const x2 = s2[f2], c2 = x2.fullTrace.filter((v) => d.has(v.fullType));
4797
+ if (c2.length === 0)
4795
4798
  return;
4796
- const v = y2.map((P) => P.label), g = n2.separator ?? " / ";
4797
- c2.push({
4798
- label: v.join(g),
4799
- value: A2.value
4799
+ const y = c2.map((v) => v.label), g = n2.separator ?? " / ";
4800
+ h.push({
4801
+ label: y.join(g),
4802
+ value: x2.value
4800
4803
  });
4801
4804
  }
4802
- return c2;
4805
+ return h;
4803
4806
  };
4804
4807
  if (o.length === 0) {
4805
4808
  if (a.length !== 0) throw new Error("Assertion error.");
4806
- const p2 = u2(new Set(ve));
4807
- if (p2 === void 0) throw new Error("Assertion error.");
4808
- return p2;
4809
- }
4810
- let S = 0, d = 0;
4811
- for (; S < o.length; ) {
4812
- const p2 = /* @__PURE__ */ new Set();
4813
- n2.includeNativeLabel && p2.add(ve);
4814
- for (let h = 0; h < S; ++h) p2.add(o[h]);
4815
- p2.add(o[d]);
4816
- const c2 = u2(p2);
4817
- if (c2 !== void 0 && new Set(c2.map((h) => h.label)).size === t.length) return c2;
4818
- d++, d >= o.length && (S++, d = S);
4819
- }
4820
- const f2 = u2(/* @__PURE__ */ new Set([...o, ...a]));
4821
- if (f2 === void 0) throw new Error("Assertion error.");
4822
- return f2;
4809
+ const d = u2(new Set(we));
4810
+ if (d === void 0) throw new Error("Assertion error.");
4811
+ return d;
4812
+ }
4813
+ let w2 = 0, b = 0;
4814
+ for (; w2 < o.length; ) {
4815
+ const d = /* @__PURE__ */ new Set();
4816
+ n2.includeNativeLabel && d.add(we);
4817
+ for (let f2 = 0; f2 < w2; ++f2) d.add(o[f2]);
4818
+ d.add(o[b]);
4819
+ const h = u2(d);
4820
+ if (h !== void 0 && new Set(h.map((f2) => f2.label)).size === t.length) return h;
4821
+ b++, b >= o.length && (w2++, b = w2);
4822
+ }
4823
+ const p2 = u2(/* @__PURE__ */ new Set([...o, ...a]));
4824
+ if (p2 === void 0) throw new Error("Assertion error.");
4825
+ return p2;
4823
4826
  }
4824
- const H = "PColumnData/", te = H + "ResourceMap", ne = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned", V = H + "BinaryPartitioned", Fe = H + "Partitioned/", re = Fe + "JsonPartitioned", B = Fe + "BinaryPartitioned";
4825
- const fe = (t) => {
4827
+ const H = "PColumnData/", te = H + "ResourceMap", ne = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned", K = H + "BinaryPartitioned", De = H + "Partitioned/", re = De + "JsonPartitioned", B = De + "BinaryPartitioned";
4828
+ const de = (t) => {
4826
4829
  if (t.endsWith(".index"))
4827
4830
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
4828
4831
  if (t.endsWith(".values"))
4829
4832
  return { baseKey: t.substring(0, t.length - 7), type: "values" };
4830
4833
  throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
4831
4834
  };
4832
- function lt(t) {
4835
+ function ft(t) {
4833
4836
  if (!t) return;
4834
4837
  const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
4835
4838
  let i = 0;
@@ -4841,7 +4844,7 @@
4841
4844
  i = n2.partitionKeyLength + n2.keyLength;
4842
4845
  break;
4843
4846
  case U:
4844
- case V:
4847
+ case K:
4845
4848
  i = n2.partitionKeyLength;
4846
4849
  break;
4847
4850
  case B:
@@ -4852,9 +4855,9 @@
4852
4855
  switch (e) {
4853
4856
  case te:
4854
4857
  case U:
4855
- case V:
4858
+ case K:
4856
4859
  for (let s2 of t.listInputFields()) {
4857
- e === V && (s2 = fe(s2).baseKey);
4860
+ e === K && (s2 = de(s2).baseKey);
4858
4861
  const o = [...JSON.parse(s2)];
4859
4862
  r.push(o);
4860
4863
  }
@@ -4866,7 +4869,7 @@
4866
4869
  const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
4867
4870
  if (a !== void 0)
4868
4871
  for (let l2 of a.listInputFields()) {
4869
- e === B && (l2 = fe(l2).baseKey);
4872
+ e === B && (l2 = de(l2).baseKey);
4870
4873
  const u2 = [...o, ...JSON.parse(l2)];
4871
4874
  r.push(u2);
4872
4875
  }
@@ -4875,7 +4878,7 @@
4875
4878
  }
4876
4879
  return { data: r, keyLength: i };
4877
4880
  }
4878
- function ut(t) {
4881
+ function ht(t) {
4879
4882
  if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
4880
4883
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
4881
4884
  const { parts: e, partitionKeyLength: n2 } = t, r = [];
@@ -4894,11 +4897,11 @@
4894
4897
  }
4895
4898
  return r.map((i) => Array.from(i.values()));
4896
4899
  }
4897
- function ct(t) {
4900
+ function gt(t) {
4898
4901
  if (t === void 0) return;
4899
4902
  if (j(t))
4900
- return ut(t);
4901
- const e = lt(t);
4903
+ return ht(t);
4904
+ const e = ft(t);
4902
4905
  if (!e) return;
4903
4906
  const { data: n2, keyLength: r } = e, i = [];
4904
4907
  for (let s2 = 0; s2 < r; ++s2)
@@ -4911,7 +4914,7 @@
4911
4914
  }
4912
4915
  return i.map((s2) => Array.from(s2.values()));
4913
4916
  }
4914
- function he(t, e = []) {
4917
+ function fe(t, e = []) {
4915
4918
  if (t === void 0 || !t.getIsReadyOrError()) return;
4916
4919
  const n2 = t.resourceType.name, r = t.getDataAsJson();
4917
4920
  if (e.length > 0 && (n2 === re || n2 === B))
@@ -4936,12 +4939,12 @@
4936
4939
  parts: i
4937
4940
  };
4938
4941
  }
4939
- case V: {
4942
+ case K: {
4940
4943
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4941
4944
  throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
4942
4945
  const i = [], s2 = /* @__PURE__ */ new Map();
4943
4946
  for (const o of t.listInputFields()) {
4944
- const a = fe(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
4947
+ const a = de(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
4945
4948
  if (l2 === void 0) return;
4946
4949
  let u2 = s2.get(a.baseKey);
4947
4950
  u2 || (u2 = {}, s2.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
@@ -4972,7 +4975,7 @@
4972
4975
  if (a === void 0) return;
4973
4976
  if (a.resourceType.name !== U)
4974
4977
  throw new Error(`Expected ${U} inside ${n2}, but got ${a.resourceType.name}`);
4975
- const l2 = he(a, JSON.parse(o));
4978
+ const l2 = fe(a, JSON.parse(o));
4976
4979
  if (l2 === void 0) return;
4977
4980
  if (l2.type !== "JsonPartitioned")
4978
4981
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -4991,9 +4994,9 @@
4991
4994
  for (const o of t.listInputFields()) {
4992
4995
  const a = t.resolve({ field: o, assertFieldType: "Input" });
4993
4996
  if (a === void 0) return;
4994
- if (a.resourceType.name !== V)
4995
- throw new Error(`Expected ${V} inside ${n2}, but got ${a.resourceType.name}`);
4996
- const l2 = he(a, JSON.parse(o));
4997
+ if (a.resourceType.name !== K)
4998
+ throw new Error(`Expected ${K} inside ${n2}, but got ${a.resourceType.name}`);
4999
+ const l2 = fe(a, JSON.parse(o));
4997
5000
  if (l2 === void 0) return;
4998
5001
  if (l2.type !== "BinaryPartitioned")
4999
5002
  throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
@@ -5009,15 +5012,15 @@
5009
5012
  throw new Error(`Unknown resource type: ${n2}`);
5010
5013
  }
5011
5014
  }
5012
- function pt(t) {
5015
+ function mt(t) {
5013
5016
  if (t !== void 0) {
5014
5017
  if (j(t)) return t;
5015
5018
  if (pn(t)) return ln(t);
5016
- if (t instanceof _) return he(t);
5019
+ if (t instanceof I) return fe(t);
5017
5020
  throw new Error(`Unexpected input type: ${typeof t}`);
5018
5021
  }
5019
5022
  }
5020
- function dt(t, e) {
5023
+ function yt(t, e) {
5021
5024
  const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
5022
5025
  if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
5023
5026
  const { partitionKeyLength: s2 } = t;
@@ -5077,39 +5080,39 @@
5077
5080
  }
5078
5081
  }
5079
5082
  }
5080
- class ft {
5083
+ class vt {
5081
5084
  constructor(e) {
5082
5085
  this.columns = e;
5083
5086
  }
5084
5087
  selectColumns(e) {
5085
- const n2 = typeof e == "function" ? e : Fn(e);
5088
+ const n2 = typeof e == "function" ? e : Un(e);
5086
5089
  return this.columns.filter((r) => n2(r.spec));
5087
5090
  }
5088
5091
  }
5089
- function ht(t) {
5092
+ function bt(t) {
5090
5093
  if (t)
5091
5094
  return t.map((e) => ({
5092
- type: `split:${En(e.axisId)}`,
5095
+ type: `split:${Cn(e.axisId)}`,
5093
5096
  label: e.label,
5094
5097
  importance: 1e6
5095
5098
  // High importance for split filters in labels
5096
5099
  }));
5097
5100
  }
5098
- function gt(t) {
5101
+ function wt(t) {
5099
5102
  if (t)
5100
5103
  return t.map((e) => [e.axisIdx, e.value]);
5101
5104
  }
5102
- function mt(t, e) {
5105
+ function At(t, e) {
5103
5106
  if (!e || e.length === 0) return t;
5104
5107
  const n2 = [...e].sort((r, i) => r[0] - i[0]);
5105
- return Pe({ id: t, axisFilters: n2 });
5108
+ return ve({ id: t, axisFilters: n2 });
5106
5109
  }
5107
- function yt(t) {
5110
+ function Pt(t) {
5108
5111
  if (!t || typeof t != "object") return false;
5109
5112
  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);
5110
5113
  return !!e.domainAnchor || n2 || r;
5111
5114
  }
5112
- function vt(t) {
5115
+ function xt(t) {
5113
5116
  if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
5114
5117
  return [];
5115
5118
  const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
@@ -5117,10 +5120,10 @@
5117
5120
  throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
5118
5121
  return e.sort((n2, r) => n2 - r), e;
5119
5122
  }
5120
- class be {
5123
+ class he {
5121
5124
  constructor() {
5122
5125
  L(this, "defaultProviderStore", []);
5123
- L(this, "providers", [new ft(this.defaultProviderStore)]);
5126
+ L(this, "providers", [new vt(this.defaultProviderStore)]);
5124
5127
  L(this, "axisLabelProviders", []);
5125
5128
  }
5126
5129
  addColumnProvider(e) {
@@ -5147,73 +5150,73 @@
5147
5150
  ...o && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
5148
5151
  ...i ?? {}
5149
5152
  }, l2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u2 = [];
5150
- for (const f$1 of l2) {
5151
- const p2 = yt(f$1);
5152
- let c2;
5153
- if (p2) {
5153
+ for (const p2 of l2) {
5154
+ const d = Pt(p2);
5155
+ let h;
5156
+ if (d) {
5154
5157
  if (!r)
5155
5158
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
5156
- c2 = $n(r.anchors, f$1);
5159
+ h = Dn(r.anchors, p2, n2);
5157
5160
  } else
5158
- c2 = f$1;
5159
- const h = /* @__PURE__ */ new Set(), A2 = [];
5161
+ h = p2;
5162
+ const f$1 = /* @__PURE__ */ new Set(), x2 = [];
5160
5163
  for (const g of this.providers) {
5161
- const P = g.selectColumns(c2);
5162
- for (const b of P) {
5163
- if (h.has(b.id)) throw new Error(`Duplicate column id ${b.id} in provider ${g.constructor.name}`);
5164
- h.add(b.id), A2.push(b);
5164
+ const v = g.selectColumns(h);
5165
+ for (const A2 of v) {
5166
+ if (f$1.has(A2.id)) throw new Error(`Duplicate column id ${A2.id} in provider ${g.constructor.name}`);
5167
+ f$1.add(A2.id), x2.push(A2);
5165
5168
  }
5166
5169
  }
5167
- if (A2.length === 0) continue;
5168
- const y$1 = vt(f$1), v = y$1.length > 0;
5169
- for (const g of A2) {
5170
+ if (x2.length === 0) continue;
5171
+ const c2 = xt(p2), y = c2.length > 0;
5172
+ for (const g of x2) {
5170
5173
  if (!f(g.spec)) continue;
5171
- const P = g.spec;
5172
- if (v) {
5173
- const b = pt(g.data);
5174
- if (!b) {
5174
+ const v = g.spec;
5175
+ if (y) {
5176
+ const A2 = mt(g.data);
5177
+ if (!A2) {
5175
5178
  if (s2) continue;
5176
5179
  return;
5177
5180
  }
5178
- if (!yn(b))
5179
- throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${b.type} for column ${g.id}`);
5180
- const k2 = ct(b), $2 = y$1[y$1.length - 1];
5181
- if ($2 >= b.partitionKeyLength)
5182
- throw new Error(`Not enough partition keys (${b.partitionKeyLength}) for requested split axes (max index ${$2}) in column ${P.name}`);
5183
- const q = y$1.map((w2) => this.findLabels(y(P.axesSpec[w2]))), F = [], I = (w2, N2) => {
5184
- if (N2 >= y$1.length) {
5185
- if (F.push([...w2]), F.length > 1e4)
5181
+ if (!yn(A2))
5182
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${A2.type} for column ${g.id}`);
5183
+ const D2 = gt(A2), $2 = c2[c2.length - 1];
5184
+ if ($2 >= A2.partitionKeyLength)
5185
+ throw new Error(`Not enough partition keys (${A2.partitionKeyLength}) for requested split axes (max index ${$2}) in column ${v.name}`);
5186
+ const q = c2.map((P) => this.findLabels(p$1(v.axesSpec[P]))), F = [], _ = (P, N2) => {
5187
+ if (N2 >= c2.length) {
5188
+ if (F.push([...P]), F.length > 1e4)
5186
5189
  throw new Error("Too many key combinations, aborting.");
5187
5190
  return;
5188
5191
  }
5189
- const D = y$1[N2];
5190
- if (D >= k2.length)
5191
- throw new Error(`Axis index ${D} out of bounds for unique keys array (length ${k2.length}) during split key generation for column ${g.id}`);
5192
- const O = k2[D];
5193
- if (!O || O.length === 0) {
5192
+ const O = c2[N2];
5193
+ if (O >= D2.length)
5194
+ throw new Error(`Axis index ${O} out of bounds for unique keys array (length ${D2.length}) during split key generation for column ${g.id}`);
5195
+ const k2 = D2[O];
5196
+ if (!k2 || k2.length === 0) {
5194
5197
  F.length = 0;
5195
5198
  return;
5196
5199
  }
5197
- for (const z2 of O)
5198
- w2.push(z2), I(w2, N2 + 1), w2.pop();
5200
+ for (const z2 of k2)
5201
+ P.push(z2), _(P, N2 + 1), P.pop();
5199
5202
  };
5200
- if (I([], 0), F.length === 0)
5203
+ if (_([], 0), F.length === 0)
5201
5204
  continue;
5202
- const R = [...P.axesSpec], se = y$1.map((w2) => w2);
5203
- for (let w2 = y$1.length - 1; w2 >= 0; w2--)
5204
- R.splice(y$1[w2], 1);
5205
- const J = { ...P, axesSpec: R };
5206
- for (const w2 of F) {
5207
- const N2 = w2.map((D, O) => {
5208
- const z2 = se[O], Re = y(P.axesSpec[z2]), oe = q[O], Oe = (oe == null ? void 0 : oe[D]) ?? String(D);
5209
- return { axisIdx: z2, axisId: Re, value: D, label: Oe };
5205
+ const R = [...v.axesSpec], ie = c2.map((P) => P);
5206
+ for (let P = c2.length - 1; P >= 0; P--)
5207
+ R.splice(c2[P], 1);
5208
+ const J = { ...v, axesSpec: R };
5209
+ for (const P of F) {
5210
+ const N2 = P.map((O, k2) => {
5211
+ const z2 = ie[k2], $e = p$1(v.axesSpec[z2]), se = q[k2], Je = (se == null ? void 0 : se[O]) ?? String(O);
5212
+ return { axisIdx: z2, axisId: $e, value: O, label: Je };
5210
5213
  });
5211
5214
  u2.push({
5212
5215
  type: "split",
5213
5216
  originalColumn: g,
5214
- spec: P,
5217
+ spec: v,
5215
5218
  adjustedSpec: J,
5216
- dataEntries: b,
5219
+ dataEntries: A2,
5217
5220
  axisFilters: N2
5218
5221
  });
5219
5222
  }
@@ -5221,39 +5224,39 @@
5221
5224
  u2.push({
5222
5225
  type: "direct",
5223
5226
  originalColumn: g,
5224
- spec: P,
5225
- adjustedSpec: P
5227
+ spec: v,
5228
+ adjustedSpec: v
5226
5229
  });
5227
5230
  }
5228
5231
  }
5229
5232
  if (u2.length === 0) return [];
5230
- const S = Ee(
5233
+ const w2 = Fe(
5231
5234
  u2,
5232
- (f2) => ({
5233
- spec: f2.spec,
5234
- suffixTrace: f2.type === "split" ? ht(f2.axisFilters) : void 0
5235
+ (p2) => ({
5236
+ spec: p2.spec,
5237
+ suffixTrace: p2.type === "split" ? bt(p2.axisFilters) : void 0
5235
5238
  }),
5236
5239
  a
5237
- ), d = [];
5238
- for (const { value: f2, label: p2 } of S) {
5239
- const { originalColumn: c2, spec: h } = f2, A2 = f2.type === "split" ? f2.axisFilters : void 0, y2 = gt(A2);
5240
- let v;
5241
- r ? v = r.deriveS(h, y2) : v = mt(c2.id, y2);
5242
- let g = { ...f2.adjustedSpec };
5240
+ ), b = [];
5241
+ for (const { value: p2, label: d } of w2) {
5242
+ const { originalColumn: h, spec: f2 } = p2, x2 = p2.type === "split" ? p2.axisFilters : void 0, c2 = wt(x2);
5243
+ let y;
5244
+ r ? y = r.deriveS(f2, c2) : y = At(h.id, c2);
5245
+ let g = { ...p2.adjustedSpec };
5243
5246
  o && (g = {
5244
5247
  ...g,
5245
5248
  annotations: {
5246
5249
  ...g.annotations ?? {},
5247
- "pl7.app/label": p2
5250
+ "pl7.app/label": d
5248
5251
  }
5249
- }), d.push({
5250
- id: v,
5252
+ }), b.push({
5253
+ id: y,
5251
5254
  spec: g,
5252
- data: () => f2.type === "split" ? hn(dt(f2.dataEntries, y2)) : f2.originalColumn.data,
5253
- label: p2
5255
+ data: () => p2.type === "split" ? hn(yt(p2.dataEntries, c2)) : p2.originalColumn.data,
5256
+ label: d
5254
5257
  });
5255
5258
  }
5256
- return d;
5259
+ return b;
5257
5260
  }
5258
5261
  getColumns(e, n2) {
5259
5262
  const r = this.getUniversalEntries(e, {
@@ -5278,17 +5281,17 @@
5278
5281
  return i;
5279
5282
  }
5280
5283
  }
5281
- function le(t, e) {
5284
+ function ae(t, e) {
5282
5285
  if (t === void 0) return e === void 0;
5283
5286
  if (e === void 0) return true;
5284
5287
  for (const n2 in e)
5285
5288
  if (t[n2] !== e[n2]) return false;
5286
5289
  return true;
5287
5290
  }
5288
- function we(t) {
5289
- return Bn(t, (e) => e instanceof _ ? e.handle : pn(e) ? mn(e, (n2) => n2.handle) : e);
5291
+ function Ae(t) {
5292
+ return jn(t, (e) => e instanceof I ? e.handle : pn(e) ? mn(e, (n2) => n2.handle) : e);
5290
5293
  }
5291
- class bt {
5294
+ class Ct {
5292
5295
  constructor() {
5293
5296
  L(this, "ctx", m());
5294
5297
  }
@@ -5299,8 +5302,8 @@
5299
5302
  return this.ctx.calculateOptions(e);
5300
5303
  }
5301
5304
  getOptions(e, n2) {
5302
- const r = typeof e == "function" ? e : Fn(e), i = this.getSpecs().entries.filter((s2) => r(s2.obj));
5303
- return typeof n2 == "object" || typeof n2 > "u" ? Ee(i, (s2) => s2.obj, n2 ?? {}).map(({ value: { ref: s2 }, label: o }) => ({
5305
+ const r = typeof e == "function" ? e : Un(e), i = this.getSpecs().entries.filter((s2) => r(s2.obj));
5306
+ return typeof n2 == "object" || typeof n2 > "u" ? Fe(i, (s2) => s2.obj, n2 ?? {}).map(({ value: { ref: s2 }, label: o }) => ({
5304
5307
  ref: s2,
5305
5308
  label: o
5306
5309
  })) : i.map((s2) => ({
@@ -5309,17 +5312,17 @@
5309
5312
  }));
5310
5313
  }
5311
5314
  resolveAnchorCtx(e) {
5312
- if (e instanceof On) return e;
5315
+ if (e instanceof $n) return e;
5313
5316
  const n2 = {};
5314
5317
  for (const [r, i] of Object.entries(e))
5315
- if (Rn(i)) {
5318
+ if (Mn(i)) {
5316
5319
  const s2 = this.getPColumnSpecByRef(i);
5317
5320
  if (!s2)
5318
5321
  return;
5319
5322
  n2[r] = s2;
5320
5323
  } else
5321
5324
  n2[r] = i;
5322
- return new On(n2);
5325
+ return new $n(n2);
5323
5326
  }
5324
5327
  /**
5325
5328
  * Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
@@ -5332,7 +5335,7 @@
5332
5335
  getAnchoredPColumns(e, n2, r) {
5333
5336
  const i = this.resolveAnchorCtx(e);
5334
5337
  if (i)
5335
- return new be().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5338
+ return new he().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
5336
5339
  ...r,
5337
5340
  anchorCtx: i
5338
5341
  });
@@ -5369,7 +5372,7 @@
5369
5372
  getCanonicalOptions(e, n2, r) {
5370
5373
  const i = this.resolveAnchorCtx(e);
5371
5374
  if (!i) return;
5372
- const s2 = new be().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5375
+ const s2 = new he().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
5373
5376
  ...r,
5374
5377
  anchorCtx: i
5375
5378
  });
@@ -5393,7 +5396,7 @@
5393
5396
  ref: n2.ref,
5394
5397
  obj: {
5395
5398
  ...n2.obj,
5396
- data: new _(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5399
+ data: new I(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5397
5400
  }
5398
5401
  }))
5399
5402
  };
@@ -5412,9 +5415,9 @@
5412
5415
  ref: n2.ref,
5413
5416
  obj: {
5414
5417
  ...n2.obj,
5415
- data: _n(
5418
+ data: Hn(
5416
5419
  n2.obj.data,
5417
- (r) => new _(r, [n2.ref.blockId, n2.ref.name])
5420
+ (r) => new I(r, [n2.ref.blockId, n2.ref.name])
5418
5421
  )
5419
5422
  }
5420
5423
  }))
@@ -5441,9 +5444,9 @@
5441
5444
  )) == null ? void 0 : r.obj;
5442
5445
  const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
5443
5446
  if (n2)
5444
- return Bn(
5447
+ return jn(
5445
5448
  n2,
5446
- (i) => new _(i, [e.blockId, e.name])
5449
+ (i) => new I(i, [e.blockId, e.name])
5447
5450
  );
5448
5451
  }
5449
5452
  /**
@@ -5454,7 +5457,7 @@
5454
5457
  getPColumnByRef(e) {
5455
5458
  const n2 = this.getDataByRef(e);
5456
5459
  if (n2)
5457
- return In(n2);
5460
+ return Bn(n2);
5458
5461
  }
5459
5462
  /**
5460
5463
  * Returns spec associated with the ref ensuring that it is a p-column spec.
@@ -5486,10 +5489,10 @@
5486
5489
  if (!f(r.obj.spec))
5487
5490
  continue;
5488
5491
  const i = r.obj.spec;
5489
- if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && le(e.domain, i.domain)) {
5492
+ if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ae(e.domain, i.domain)) {
5490
5493
  for (let s2 = 0; s2 < e.axesSpec.length; ++s2) {
5491
5494
  const o = e.axesSpec[s2], a = i.axesSpec[s2];
5492
- if (o.name !== a.name || o.type !== a.type || !le(o.domain, a.domain))
5495
+ if (o.name !== a.name || o.type !== a.type || !ae(o.domain, a.domain))
5493
5496
  continue e;
5494
5497
  }
5495
5498
  n2.push(r.obj);
@@ -5506,7 +5509,7 @@
5506
5509
  for (const r of n2.entries) {
5507
5510
  if (!Z$1(r.obj)) continue;
5508
5511
  const i = r.obj.spec;
5509
- 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)) {
5512
+ if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ae(e.domain, i.axesSpec[0].domain)) {
5510
5513
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
5511
5514
  throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
5512
5515
  return Object.fromEntries(
@@ -5525,13 +5528,13 @@
5525
5528
  * @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
5526
5529
  */
5527
5530
  selectColumns(e) {
5528
- const n2 = typeof e == "function" ? e : Fn(e);
5531
+ const n2 = typeof e == "function" ? e : Un(e);
5529
5532
  return this.getSpecs().entries.filter(({ obj: i }) => f(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
5530
5533
  const o = s2;
5531
5534
  let a = null;
5532
5535
  const l2 = this;
5533
5536
  return {
5534
- id: Pe(i),
5537
+ id: ve(i),
5535
5538
  spec: o,
5536
5539
  get data() {
5537
5540
  var u2;
@@ -5562,7 +5565,7 @@
5562
5565
  L(this, "args");
5563
5566
  L(this, "uiState");
5564
5567
  L(this, "_activeArgsCache");
5565
- L(this, "resultPool", new bt());
5568
+ L(this, "resultPool", new Ct());
5566
5569
  this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5567
5570
  }
5568
5571
  /**
@@ -5579,16 +5582,16 @@
5579
5582
  // return this.ctx.featureFlags;
5580
5583
  // }
5581
5584
  getNamedAccessor(e) {
5582
- return pe(
5585
+ return ce(
5583
5586
  this.ctx.getAccessorHandleByName(e),
5584
- (n2) => new _(n2, [e])
5587
+ (n2) => new I(n2, [e])
5585
5588
  );
5586
5589
  }
5587
5590
  get prerun() {
5588
- return this.getNamedAccessor(Ie);
5591
+ return this.getNamedAccessor(Le);
5589
5592
  }
5590
5593
  get outputs() {
5591
- return this.getNamedAccessor(Le);
5594
+ return this.getNamedAccessor(Te);
5592
5595
  }
5593
5596
  /**
5594
5597
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
@@ -5600,13 +5603,13 @@
5600
5603
  }
5601
5604
  verifyInlineAndExplicitColumnsSupport(e) {
5602
5605
  var i;
5603
- const n2 = e.some((s2) => !(s2.data instanceof _) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5606
+ const n2 = e.some((s2) => !(s2.data instanceof I) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5604
5607
  if (n2 && !r) throw Error("Inline or explicit columns not supported");
5605
5608
  }
5606
5609
  // TODO remove all non-PColumn fields
5607
5610
  createPFrame(e) {
5608
5611
  return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
5609
- e.map((n2) => we(n2))
5612
+ e.map((n2) => Ae(n2))
5610
5613
  );
5611
5614
  }
5612
5615
  createPTable(e) {
@@ -5618,8 +5621,8 @@
5618
5621
  },
5619
5622
  filters: e.filters ?? [],
5620
5623
  sorting: e.sorting ?? []
5621
- } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(jn(n2.src)), this.ctx.createPTable(
5622
- Cn(n2, (r) => we(r))
5624
+ } : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Fn(n2.src)), this.ctx.createPTable(
5625
+ Jn(n2, (r) => Ae(r))
5623
5626
  );
5624
5627
  }
5625
5628
  /** @deprecated scheduled for removal from SDK */
@@ -5631,13 +5634,13 @@
5631
5634
  return this.ctx.getCurrentUnstableMarker();
5632
5635
  }
5633
5636
  }
5634
- const M = "1.29.0";
5635
- function wt(t) {
5637
+ const M = "1.29.12";
5638
+ function St(t) {
5636
5639
  return t.__renderLambda === true;
5637
5640
  }
5638
- function ue(t) {
5641
+ function le(t) {
5639
5642
  if (t !== void 0)
5640
- return wt(t) ? t.handle : t;
5643
+ return St(t) ? t.handle : t;
5641
5644
  }
5642
5645
  class T {
5643
5646
  constructor(e, n2, r, i, s2, o, a) {
@@ -5803,13 +5806,13 @@
5803
5806
  sdkVersion: M,
5804
5807
  renderingMode: this._renderingMode,
5805
5808
  initialArgs: this._initialArgs,
5806
- inputsValid: ue(this._inputsValid),
5807
- sections: ue(this._sections),
5809
+ inputsValid: le(this._inputsValid),
5810
+ sections: le(this._sections),
5808
5811
  outputs: Object.fromEntries(
5809
- Object.entries(this._outputs).map(([n2, r]) => [n2, ue(r)])
5812
+ Object.entries(this._outputs).map(([n2, r]) => [n2, le(r)])
5810
5813
  )
5811
5814
  };
5812
- return Xe() ? _e({ sdkVersion: M }) : { config: e };
5815
+ return nt() ? _e({ sdkVersion: M }) : { config: e };
5813
5816
  }
5814
5817
  }
5815
5818
  const platforma = T.create("Heavy").withArgs({ titleArg: "The title" }).output("allSpecs", (ctx) => ctx.resultPool.getSpecs()).sections((ctx) => {