@milaboratories/milaboratories.ui-examples.model 1.1.38 → 1.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -4258,10 +4258,10 @@
4258
4258
  }
4259
4259
  e.domain = r;
4260
4260
  }
4261
- return e.axes && (e.axes = e.axes.map((r) => Q$1(n2, r))), e;
4261
+ return e.axes && (e.axes = e.axes.map((r) => Q(n2, r))), e;
4262
4262
  }
4263
- function Q$1(n2, t) {
4264
- if (!Y(t))
4263
+ function Q(n2, t) {
4264
+ if (!Y$1(t))
4265
4265
  return t;
4266
4266
  const e = t.anchor, r = n2[e];
4267
4267
  if (!r)
@@ -4287,17 +4287,17 @@
4287
4287
  }
4288
4288
  throw new Error("Unsupported axis reference type");
4289
4289
  }
4290
- function Y(n2) {
4290
+ function Y$1(n2) {
4291
4291
  return typeof n2 == "object" && "anchor" in n2;
4292
4292
  }
4293
4293
  function f(n2) {
4294
4294
  return n2.kind === "PColumn";
4295
4295
  }
4296
- function Z(n2) {
4296
+ function Z$1(n2) {
4297
4297
  return f(n2.spec);
4298
4298
  }
4299
4299
  function In(n2) {
4300
- if (!Z(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4300
+ if (!Z$1(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
4301
4301
  return n2;
4302
4302
  }
4303
4303
  function Bn(n2, t) {
@@ -4445,12 +4445,12 @@
4445
4445
  }), c = l.extend({
4446
4446
  cause: z$1.lazy(() => s).optional(),
4447
4447
  errors: z$1.lazy(() => s.array()).optional()
4448
- }), m = z$1.object({
4448
+ }), m$1 = z$1.object({
4449
4449
  type: z$1.literal("StandardError"),
4450
4450
  name: z$1.string(),
4451
4451
  message: z$1.string(),
4452
4452
  stack: z$1.string().optional()
4453
- }), p = m.extend({
4453
+ }), p = m$1.extend({
4454
4454
  cause: z$1.lazy(() => s).optional(),
4455
4455
  errors: z$1.lazy(() => s.array()).optional()
4456
4456
  }), s = z$1.union([p, c]);
@@ -4466,7 +4466,7 @@
4466
4466
  var je = Object.defineProperty;
4467
4467
  var Ke = (t, e, n2) => e in t ? je(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
4468
4468
  var L = (t, e, n2) => Ke(t, typeof e != "symbol" ? e + "" : e, n2);
4469
- function ee(t) {
4469
+ function Z(t) {
4470
4470
  return { type: "Immediate", value: t };
4471
4471
  }
4472
4472
  function Xe() {
@@ -4481,11 +4481,11 @@
4481
4481
  function Qe() {
4482
4482
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4483
4483
  }
4484
- function h() {
4484
+ function m() {
4485
4485
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4486
4486
  throw new Error("Not in config rendering context");
4487
4487
  }
4488
- function X(t, e) {
4488
+ function Y(t, e) {
4489
4489
  const n2 = Qe();
4490
4490
  if (n2 === void 0) return false;
4491
4491
  if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
@@ -4493,12 +4493,12 @@
4493
4493
  }
4494
4494
  const ae = /* @__PURE__ */ new Map();
4495
4495
  function Ze(t, e) {
4496
- t in h().callbackRegistry || (h().callbackRegistry[t] = (n2) => {
4496
+ t in m().callbackRegistry || (m().callbackRegistry[t] = (n2) => {
4497
4497
  for (const r of ae.get(t))
4498
4498
  r(n2);
4499
4499
  }, ae.set(t, [])), ae.get(t).push(e);
4500
4500
  }
4501
- class _ {
4501
+ class C {
4502
4502
  constructor(e, n2 = (r) => r) {
4503
4503
  L(this, "isResolved", false);
4504
4504
  L(this, "resolvedValue");
@@ -4507,10 +4507,10 @@
4507
4507
  });
4508
4508
  }
4509
4509
  map(e) {
4510
- return new _(this.handle, (n2) => e(this.postProcess(n2)));
4510
+ return new C(this.handle, (n2) => e(this.postProcess(n2)));
4511
4511
  }
4512
4512
  mapDefined(e) {
4513
- return new _(this.handle, (n2) => {
4513
+ return new C(this.handle, (n2) => {
4514
4514
  const r = this.postProcess(n2);
4515
4515
  return r ? e(r) : void 0;
4516
4516
  });
@@ -4522,7 +4522,7 @@
4522
4522
  function pe(t, e) {
4523
4523
  return t === void 0 ? void 0 : e(t);
4524
4524
  }
4525
- class I {
4525
+ class _ {
4526
4526
  constructor(e, n2) {
4527
4527
  this.handle = e, this.resolvePath = n2;
4528
4528
  }
@@ -4562,46 +4562,46 @@
4562
4562
  ...n2.map((i) => typeof i == "string" ? i : i.field)
4563
4563
  ];
4564
4564
  return pe(
4565
- h().resolveWithCommon(this.handle, e, ...n2),
4566
- (i) => new I(i, r)
4565
+ m().resolveWithCommon(this.handle, e, ...n2),
4566
+ (i) => new _(i, r)
4567
4567
  );
4568
4568
  }
4569
4569
  get resourceType() {
4570
- return h().getResourceType(this.handle);
4570
+ return m().getResourceType(this.handle);
4571
4571
  }
4572
4572
  getInputsLocked() {
4573
- return h().getInputsLocked(this.handle);
4573
+ return m().getInputsLocked(this.handle);
4574
4574
  }
4575
4575
  getOutputsLocked() {
4576
- return h().getOutputsLocked(this.handle);
4576
+ return m().getOutputsLocked(this.handle);
4577
4577
  }
4578
4578
  getIsReadyOrError() {
4579
- return h().getIsReadyOrError(this.handle);
4579
+ return m().getIsReadyOrError(this.handle);
4580
4580
  }
4581
4581
  getIsFinal() {
4582
- return h().getIsFinal(this.handle);
4582
+ return m().getIsFinal(this.handle);
4583
4583
  }
4584
4584
  getError() {
4585
4585
  const e = [...this.resolvePath, "error"];
4586
4586
  return pe(
4587
- h().getError(this.handle),
4588
- (n2) => new I(n2, e)
4587
+ m().getError(this.handle),
4588
+ (n2) => new _(n2, e)
4589
4589
  );
4590
4590
  }
4591
4591
  listInputFields() {
4592
- return h().listInputFields(this.handle);
4592
+ return m().listInputFields(this.handle);
4593
4593
  }
4594
4594
  listOutputFields() {
4595
- return h().listOutputFields(this.handle);
4595
+ return m().listOutputFields(this.handle);
4596
4596
  }
4597
4597
  listDynamicFields() {
4598
- return h().listDynamicFields(this.handle);
4598
+ return m().listDynamicFields(this.handle);
4599
4599
  }
4600
4600
  getKeyValueBase64(e) {
4601
- return h().getKeyValueBase64(this.handle, e);
4601
+ return m().getKeyValueBase64(this.handle, e);
4602
4602
  }
4603
4603
  getKeyValueAsString(e) {
4604
- return h().getKeyValueAsString(this.handle, e);
4604
+ return m().getKeyValueAsString(this.handle, e);
4605
4605
  }
4606
4606
  getKeyValueAsJson(e) {
4607
4607
  const n2 = this.getKeyValueAsString(e);
@@ -4609,10 +4609,10 @@
4609
4609
  return JSON.parse(n2);
4610
4610
  }
4611
4611
  getDataBase64() {
4612
- return h().getDataBase64(this.handle);
4612
+ return m().getDataBase64(this.handle);
4613
4613
  }
4614
4614
  getDataAsString() {
4615
- return h().getDataAsString(this.handle);
4615
+ return m().getDataAsString(this.handle);
4616
4616
  }
4617
4617
  getDataAsJson() {
4618
4618
  const e = this.getDataAsString();
@@ -4625,7 +4625,7 @@
4625
4625
  getPColumns(e = false, n2 = "") {
4626
4626
  const r = this.parsePObjectCollection(e, n2);
4627
4627
  return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
4628
- if (!Z(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
4628
+ if (!Z$1(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
4629
4629
  return s2;
4630
4630
  });
4631
4631
  }
@@ -4633,7 +4633,7 @@
4633
4633
  *
4634
4634
  */
4635
4635
  parsePObjectCollection(e = false, n2 = "") {
4636
- const r = h().parsePObjectCollection(
4636
+ const r = m().parsePObjectCollection(
4637
4637
  this.handle,
4638
4638
  e,
4639
4639
  n2,
@@ -4643,19 +4643,19 @@
4643
4643
  const i = {};
4644
4644
  for (const [s2, o] of Object.entries(r)) {
4645
4645
  const a = [...this.resolvePath, s2];
4646
- i[s2] = Bn(o, (l2) => new I(l2, a));
4646
+ i[s2] = Bn(o, (l2) => new _(l2, a));
4647
4647
  }
4648
4648
  return i;
4649
4649
  }
4650
4650
  getFileContentAsBase64() {
4651
- return new _(h().getBlobContentAsBase64(this.handle));
4651
+ return new C(m().getBlobContentAsBase64(this.handle));
4652
4652
  }
4653
4653
  getFileContentAsString() {
4654
- return new _(h().getBlobContentAsString(this.handle));
4654
+ return new C(m().getBlobContentAsString(this.handle));
4655
4655
  }
4656
4656
  getFileContentAsJson() {
4657
- return new _(
4658
- h().getBlobContentAsString(this.handle)
4657
+ return new C(
4658
+ m().getBlobContentAsString(this.handle)
4659
4659
  ).mapDefined((e) => JSON.parse(e));
4660
4660
  }
4661
4661
  /**
@@ -4674,7 +4674,7 @@
4674
4674
  * @returns downloaded file handle
4675
4675
  */
4676
4676
  getFileHandle() {
4677
- return new _(h().getDownloadedBlobContentHandle(this.handle));
4677
+ return new C(m().getDownloadedBlobContentHandle(this.handle));
4678
4678
  }
4679
4679
  /**
4680
4680
  * @deprecated use getFileHandle
@@ -4686,7 +4686,7 @@
4686
4686
  * @returns downloaded file handle
4687
4687
  */
4688
4688
  getRemoteFileHandle() {
4689
- return new _(h().getOnDemandBlobContentHandle(this.handle));
4689
+ return new C(m().getOnDemandBlobContentHandle(this.handle));
4690
4690
  }
4691
4691
  /**
4692
4692
  * @deprecated use getRemoteFileHandle
@@ -4698,22 +4698,22 @@
4698
4698
  * @returns the url to the extracted folder
4699
4699
  */
4700
4700
  extractArchiveAndGetURL(e) {
4701
- return new _(h().extractArchiveAndGetURL(this.handle, e));
4701
+ return new C(m().extractArchiveAndGetURL(this.handle, e));
4702
4702
  }
4703
4703
  getImportProgress() {
4704
- return new _(h().getImportProgress(this.handle));
4704
+ return new C(m().getImportProgress(this.handle));
4705
4705
  }
4706
4706
  getLastLogs(e) {
4707
- return new _(h().getLastLogs(this.handle, e));
4707
+ return new C(m().getLastLogs(this.handle, e));
4708
4708
  }
4709
4709
  getProgressLog(e) {
4710
- return new _(h().getProgressLog(this.handle, e));
4710
+ return new C(m().getProgressLog(this.handle, e));
4711
4711
  }
4712
4712
  getProgressLogWithInfo(e) {
4713
- return new _(h().getProgressLogWithInfo(this.handle, e));
4713
+ return new C(m().getProgressLogWithInfo(this.handle, e));
4714
4714
  }
4715
4715
  getLogHandle() {
4716
- return new _(h().getLogHandle(this.handle));
4716
+ return new C(m().getLogHandle(this.handle));
4717
4717
  }
4718
4718
  allFieldsResolved(e = "Input") {
4719
4719
  switch (e) {
@@ -4737,9 +4737,9 @@
4737
4737
  if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
4738
4738
  return;
4739
4739
  let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4740
- (c2) => [c2, this.resolve({ field: c2, assertFieldType: r })]
4740
+ (u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
4741
4741
  );
4742
- return s2 && (l2 = l2.filter((c2) => c2[1] !== void 0)), l2.map(([c2, w2]) => o(c2, w2));
4742
+ return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, S]) => o(u2, S));
4743
4743
  }
4744
4744
  }
4745
4745
  const Ie = "staging", Le = "main";
@@ -4749,68 +4749,81 @@
4749
4749
  id: z$1.string().optional(),
4750
4750
  label: z$1.string()
4751
4751
  }), st = z$1.array(it), ot = 1e-3, at = "__LABEL__", ve = "__LABEL__@1";
4752
- function Fe(t, e, n2 = {}) {
4753
- const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((u2) => {
4754
- var $2, q;
4755
- const f2 = e(u2);
4756
- let p2, y2, v;
4757
- "spec" in f2 && typeof f2.spec == "object" ? (p2 = f2.spec, y2 = f2.prefixTrace, v = f2.suffixTrace) : p2 = f2;
4758
- const m2 = ($2 = p2.annotations) == null ? void 0 : $2[nt], b = (q = p2.annotations) == null ? void 0 : q[rt], g = (b ? st.safeParse(JSON.parse(b)).data : void 0) ?? [], A2 = [
4759
- ...y2 ?? [],
4760
- ...g,
4761
- ...v ?? []
4752
+ function Ee(t, e, n2 = {}) {
4753
+ const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((p2) => {
4754
+ var q, D;
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 = (D = h.annotations) == null ? void 0 : D[rt], P = (g ? st.safeParse(JSON.parse(g)).data : void 0) ?? [], b = [
4759
+ ...A2 ?? [],
4760
+ ...P,
4761
+ ...y2 ?? []
4762
4762
  ];
4763
- if (m2) {
4764
- const P = { label: m2, type: at, importance: -2 };
4765
- n2.addLabelAsSuffix ? A2.push(P) : A2.splice(0, 0, P);
4766
- }
4767
- const x2 = [], k2 = /* @__PURE__ */ new Map();
4768
- for (let P = A2.length - 1; P >= 0; --P) {
4769
- const { type: R } = A2[P], z2 = A2[P].importance ?? 0, J = (k2.get(R) ?? 0) + 1;
4770
- k2.set(R, J);
4771
- const E = `${R}@${J}`;
4772
- i.set(E, (i.get(E) ?? 0) + 1), r.set(
4773
- E,
4763
+ if (v) {
4764
+ const I = { label: v, type: at, importance: -2 };
4765
+ n2.addLabelAsSuffix ? b.push(I) : b.splice(0, 0, I);
4766
+ }
4767
+ const F = [], $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
+ $2.set(R, J);
4771
+ const w2 = `${R}@${J}`;
4772
+ i.set(w2, (i.get(w2) ?? 0) + 1), r.set(
4773
+ w2,
4774
4774
  Math.max(
4775
- r.get(E) ?? Number.NEGATIVE_INFINITY,
4776
- z2 - (A2.length - P) * ot
4775
+ r.get(w2) ?? Number.NEGATIVE_INFINITY,
4776
+ se - (b.length - I) * ot
4777
4777
  )
4778
- ), x2.push({ ...A2[P], fullType: E, occurenceIndex: J });
4778
+ ), F.push({ ...b[I], fullType: w2, occurenceIndex: J });
4779
4779
  }
4780
- return x2.reverse(), {
4781
- value: u2,
4782
- spec: p2,
4783
- label: m2,
4784
- fullTrace: x2
4780
+ return F.reverse(), {
4781
+ value: p2,
4782
+ spec: h,
4783
+ label: v,
4784
+ fullTrace: F
4785
4785
  };
4786
4786
  }), o = [], a = [], l2 = [...r];
4787
- l2.sort(([, u2], [, f2]) => f2 - u2);
4788
- for (const [u2] of l2)
4789
- u2.endsWith("@1") || i.get(u2) === t.length ? o.push(u2) : a.push(u2);
4790
- const c2 = (u2) => s2.map((f2) => {
4791
- const p2 = f2.fullTrace.filter((v) => u2.has(v.fullType)).map((v) => v.label), y2 = n2.separator ?? " / ";
4792
- return {
4793
- label: p2.join(y2),
4794
- value: f2.value
4795
- };
4796
- });
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)
4795
+ return;
4796
+ const v = y2.map((P) => P.label), g = n2.separator ?? " / ";
4797
+ c2.push({
4798
+ label: v.join(g),
4799
+ value: A2.value
4800
+ });
4801
+ }
4802
+ return c2;
4803
+ };
4797
4804
  if (o.length === 0) {
4798
4805
  if (a.length !== 0) throw new Error("Assertion error.");
4799
- return c2(new Set(ve));
4800
- }
4801
- let w2 = 0, d = 0;
4802
- for (; w2 < o.length; ) {
4803
- const u2 = /* @__PURE__ */ new Set();
4804
- n2.includeNativeLabel && u2.add(ve);
4805
- for (let p2 = 0; p2 < w2; ++p2) u2.add(o[p2]);
4806
- u2.add(o[d]);
4807
- const f2 = c2(u2);
4808
- if (new Set(f2.map((p2) => p2.label)).size === t.length) return f2;
4809
- d++, d == o.length && (w2++, d = w2);
4810
- }
4811
- return c2(/* @__PURE__ */ new Set([...o, ...a]));
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) {
4818
+ if (new Set(c2.map((h) => h.label)).size === t.length) return c2;
4819
+ d++, d == o.length && (S++, d = S);
4820
+ }
4821
+ }
4822
+ const f2 = u2(/* @__PURE__ */ new Set([...o, ...a]));
4823
+ if (f2 === void 0) throw new Error("Assertion error.");
4824
+ return f2;
4812
4825
  }
4813
- const H = "PColumnData/", ne = H + "ResourceMap", re = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned", V = H + "BinaryPartitioned", Ee = H + "Partitioned/", ie = Ee + "JsonPartitioned", B = Ee + "BinaryPartitioned";
4826
+ 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";
4814
4827
  const fe = (t) => {
4815
4828
  if (t.endsWith(".index"))
4816
4829
  return { baseKey: t.substring(0, t.length - 6), type: "index" };
@@ -4823,10 +4836,10 @@
4823
4836
  const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
4824
4837
  let i = 0;
4825
4838
  switch (e) {
4826
- case ne:
4839
+ case te:
4827
4840
  i = n2.keyLength;
4828
4841
  break;
4829
- case re:
4842
+ case ne:
4830
4843
  i = n2.partitionKeyLength + n2.keyLength;
4831
4844
  break;
4832
4845
  case U:
@@ -4834,12 +4847,12 @@
4834
4847
  i = n2.partitionKeyLength;
4835
4848
  break;
4836
4849
  case B:
4837
- case ie:
4850
+ case re:
4838
4851
  i = n2.superPartitionKeyLength + n2.partitionKeyLength;
4839
4852
  break;
4840
4853
  }
4841
4854
  switch (e) {
4842
- case ne:
4855
+ case te:
4843
4856
  case U:
4844
4857
  case V:
4845
4858
  for (let s2 of t.listInputFields()) {
@@ -4848,16 +4861,16 @@
4848
4861
  r.push(o);
4849
4862
  }
4850
4863
  break;
4851
- case re:
4864
+ case ne:
4852
4865
  case B:
4853
- case ie:
4866
+ case re:
4854
4867
  for (const s2 of t.listInputFields()) {
4855
4868
  const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
4856
4869
  if (a !== void 0)
4857
4870
  for (let l2 of a.listInputFields()) {
4858
4871
  e === B && (l2 = fe(l2).baseKey);
4859
- const c2 = [...o, ...JSON.parse(l2)];
4860
- r.push(c2);
4872
+ const u2 = [...o, ...JSON.parse(l2)];
4873
+ r.push(u2);
4861
4874
  }
4862
4875
  }
4863
4876
  break;
@@ -4903,11 +4916,11 @@
4903
4916
  function he(t, e = []) {
4904
4917
  if (t === void 0 || !t.getIsReadyOrError()) return;
4905
4918
  const n2 = t.resourceType.name, r = t.getDataAsJson();
4906
- if (e.length > 0 && (n2 === ie || n2 === B))
4919
+ if (e.length > 0 && (n2 === re || n2 === B))
4907
4920
  throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
4908
4921
  switch (n2) {
4922
+ case te:
4909
4923
  case ne:
4910
- case re:
4911
4924
  throw new Error(`Only data columns are supported, got: ${n2}`);
4912
4925
  case U: {
4913
4926
  if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
@@ -4932,8 +4945,8 @@
4932
4945
  for (const o of t.listInputFields()) {
4933
4946
  const a = fe(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
4934
4947
  if (l2 === void 0) return;
4935
- let c2 = s2.get(a.baseKey);
4936
- c2 || (c2 = {}, s2.set(a.baseKey, c2)), a.type === "index" ? c2.index = l2 : c2.values = l2;
4948
+ let u2 = s2.get(a.baseKey);
4949
+ u2 || (u2 = {}, s2.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
4937
4950
  }
4938
4951
  for (const [o, a] of s2.entries()) {
4939
4952
  if (!a.index || !a.values) return;
@@ -4952,7 +4965,7 @@
4952
4965
  parts: i
4953
4966
  };
4954
4967
  }
4955
- case ie: {
4968
+ case re: {
4956
4969
  if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
4957
4970
  throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
4958
4971
  const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
@@ -5002,7 +5015,7 @@
5002
5015
  if (t !== void 0) {
5003
5016
  if (j(t)) return t;
5004
5017
  if (pn(t)) return ln(t);
5005
- if (t instanceof I) return he(t);
5018
+ if (t instanceof _) return he(t);
5006
5019
  throw new Error(`Unexpected input type: ${typeof t}`);
5007
5020
  }
5008
5021
  }
@@ -5135,110 +5148,110 @@
5135
5148
  const { anchorCtx: r, labelOps: i, dontWaitAllData: s2 = false, overrideLabelAnnotation: o = false } = n2 ?? {}, a = {
5136
5149
  ...o && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
5137
5150
  ...i ?? {}
5138
- }, l2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], c2 = [];
5139
- for (const u2 of l2) {
5140
- const f$1 = yt(u2);
5141
- let p2;
5142
- if (f$1) {
5151
+ }, l2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u2 = [];
5152
+ for (const f$1 of l2) {
5153
+ const p2 = yt(f$1);
5154
+ let c2;
5155
+ if (p2) {
5143
5156
  if (!r)
5144
5157
  throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
5145
- p2 = $n(r.anchors, u2);
5158
+ c2 = $n(r.anchors, f$1);
5146
5159
  } else
5147
- p2 = u2;
5148
- const y$1 = /* @__PURE__ */ new Set(), v = [];
5160
+ c2 = f$1;
5161
+ const h = /* @__PURE__ */ new Set(), A2 = [];
5149
5162
  for (const g of this.providers) {
5150
- const A2 = g.selectColumns(p2);
5151
- for (const x2 of A2) {
5152
- if (y$1.has(x2.id)) throw new Error(`Duplicate column id ${x2.id} in provider ${g.constructor.name}`);
5153
- y$1.add(x2.id), v.push(x2);
5163
+ const P = g.selectColumns(c2);
5164
+ for (const b of P) {
5165
+ if (h.has(b.id)) throw new Error(`Duplicate column id ${b.id} in provider ${g.constructor.name}`);
5166
+ h.add(b.id), A2.push(b);
5154
5167
  }
5155
5168
  }
5156
- if (v.length === 0) continue;
5157
- const m2 = vt(u2), b = m2.length > 0;
5158
- for (const g of v) {
5169
+ if (A2.length === 0) continue;
5170
+ const y$1 = vt(f$1), v = y$1.length > 0;
5171
+ for (const g of A2) {
5159
5172
  if (!f(g.spec)) continue;
5160
- const A2 = g.spec;
5161
- if (b) {
5162
- const x2 = pt(g.data);
5163
- if (!x2) {
5173
+ const P = g.spec;
5174
+ if (v) {
5175
+ const b = pt(g.data);
5176
+ if (!b) {
5164
5177
  if (s2) continue;
5165
5178
  return;
5166
5179
  }
5167
- if (!yn(x2))
5168
- throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${x2.type} for column ${g.id}`);
5169
- const k2 = ct(x2), $2 = m2[m2.length - 1];
5170
- if ($2 >= x2.partitionKeyLength)
5171
- throw new Error(`Not enough partition keys (${x2.partitionKeyLength}) for requested split axes (max index ${$2}) in column ${A2.name}`);
5172
- const q = m2.map((C) => this.findLabels(y(A2.axesSpec[C]))), P = [], R = (C, N2) => {
5173
- if (N2 >= m2.length) {
5174
- P.push([...C]);
5180
+ if (!yn(b))
5181
+ throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${b.type} for column ${g.id}`);
5182
+ const F = ct(b), $2 = y$1[y$1.length - 1];
5183
+ if ($2 >= b.partitionKeyLength)
5184
+ throw new Error(`Not enough partition keys (${b.partitionKeyLength}) for requested split axes (max index ${$2}) in column ${P.name}`);
5185
+ const q = y$1.map((w2) => this.findLabels(y(P.axesSpec[w2]))), D = [], I = (w2, N2) => {
5186
+ if (N2 >= y$1.length) {
5187
+ D.push([...w2]);
5175
5188
  return;
5176
5189
  }
5177
- const D = m2[N2];
5178
- if (D >= k2.length)
5179
- throw new Error(`Axis index ${D} out of bounds for unique keys array (length ${k2.length}) during split key generation for column ${g.id}`);
5180
- const O = k2[D];
5190
+ const k2 = y$1[N2];
5191
+ if (k2 >= F.length)
5192
+ throw new Error(`Axis index ${k2} out of bounds for unique keys array (length ${F.length}) during split key generation for column ${g.id}`);
5193
+ const O = F[k2];
5181
5194
  if (!O || O.length === 0) {
5182
- P.length = 0;
5195
+ D.length = 0;
5183
5196
  return;
5184
5197
  }
5185
- for (const Y2 of O)
5186
- C.push(Y2), R(C, N2 + 1), C.pop();
5198
+ for (const z2 of O)
5199
+ w2.push(z2), I(w2, N2 + 1), w2.pop();
5187
5200
  };
5188
- if (R([], 0), P.length === 0)
5201
+ if (I([], 0), D.length === 0)
5189
5202
  continue;
5190
- const z2 = [...A2.axesSpec], J = m2.map((C) => C);
5191
- for (let C = m2.length - 1; C >= 0; C--)
5192
- z2.splice(m2[C], 1);
5193
- const E = { ...A2, axesSpec: z2 };
5194
- for (const C of P) {
5195
- const N2 = C.map((D, O) => {
5196
- const Y2 = J[O], Re = y(A2.axesSpec[Y2]), oe = q[O], Oe = (oe == null ? void 0 : oe[D]) ?? String(D);
5197
- return { axisIdx: Y2, axisId: Re, value: D, label: Oe };
5203
+ const R = [...P.axesSpec], se = y$1.map((w2) => w2);
5204
+ for (let w2 = y$1.length - 1; w2 >= 0; w2--)
5205
+ R.splice(y$1[w2], 1);
5206
+ const J = { ...P, axesSpec: R };
5207
+ for (const w2 of D) {
5208
+ const N2 = w2.map((k2, O) => {
5209
+ const z2 = se[O], Re = y(P.axesSpec[z2]), oe = q[O], Oe = (oe == null ? void 0 : oe[k2]) ?? String(k2);
5210
+ return { axisIdx: z2, axisId: Re, value: k2, label: Oe };
5198
5211
  });
5199
- c2.push({
5212
+ u2.push({
5200
5213
  type: "split",
5201
5214
  originalColumn: g,
5202
- spec: A2,
5203
- adjustedSpec: E,
5204
- dataEntries: x2,
5215
+ spec: P,
5216
+ adjustedSpec: J,
5217
+ dataEntries: b,
5205
5218
  axisFilters: N2
5206
5219
  });
5207
5220
  }
5208
5221
  } else
5209
- c2.push({
5222
+ u2.push({
5210
5223
  type: "direct",
5211
5224
  originalColumn: g,
5212
- spec: A2,
5213
- adjustedSpec: A2
5225
+ spec: P,
5226
+ adjustedSpec: P
5214
5227
  });
5215
5228
  }
5216
5229
  }
5217
- if (c2.length === 0) return [];
5218
- const w2 = Fe(
5219
- c2,
5220
- (u2) => ({
5221
- spec: u2.spec,
5222
- suffixTrace: u2.type === "split" ? ht(u2.axisFilters) : void 0
5230
+ if (u2.length === 0) return [];
5231
+ const S = Ee(
5232
+ u2,
5233
+ (f2) => ({
5234
+ spec: f2.spec,
5235
+ suffixTrace: f2.type === "split" ? ht(f2.axisFilters) : void 0
5223
5236
  }),
5224
5237
  a
5225
5238
  ), d = [];
5226
- for (const { value: u2, label: f2 } of w2) {
5227
- const { originalColumn: p2, spec: y2 } = u2, v = u2.type === "split" ? u2.axisFilters : void 0, m2 = gt(v);
5228
- let b;
5229
- r ? b = r.deriveS(y2, m2) : b = mt(p2.id, m2);
5230
- let g = { ...u2.adjustedSpec };
5239
+ for (const { value: f2, label: p2 } of S) {
5240
+ const { originalColumn: c2, spec: h } = f2, A2 = f2.type === "split" ? f2.axisFilters : void 0, y2 = gt(A2);
5241
+ let v;
5242
+ r ? v = r.deriveS(h, y2) : v = mt(c2.id, y2);
5243
+ let g = { ...f2.adjustedSpec };
5231
5244
  o && (g = {
5232
5245
  ...g,
5233
5246
  annotations: {
5234
5247
  ...g.annotations ?? {},
5235
- "pl7.app/label": f2
5248
+ "pl7.app/label": p2
5236
5249
  }
5237
5250
  }), d.push({
5238
- id: b,
5251
+ id: v,
5239
5252
  spec: g,
5240
- data: () => u2.type === "split" ? hn(dt(u2.dataEntries, m2)) : u2.originalColumn.data,
5241
- label: f2
5253
+ data: () => f2.type === "split" ? hn(dt(f2.dataEntries, y2)) : f2.originalColumn.data,
5254
+ label: p2
5242
5255
  });
5243
5256
  }
5244
5257
  return d;
@@ -5274,11 +5287,11 @@
5274
5287
  return true;
5275
5288
  }
5276
5289
  function we(t) {
5277
- return Bn(t, (e) => e instanceof I ? e.handle : pn(e) ? mn(e, (n2) => n2.handle) : e);
5290
+ return Bn(t, (e) => e instanceof _ ? e.handle : pn(e) ? mn(e, (n2) => n2.handle) : e);
5278
5291
  }
5279
5292
  class bt {
5280
5293
  constructor() {
5281
- L(this, "ctx", h());
5294
+ L(this, "ctx", m());
5282
5295
  }
5283
5296
  /**
5284
5297
  * @deprecated use getOptions()
@@ -5288,7 +5301,7 @@
5288
5301
  }
5289
5302
  getOptions(e, n2) {
5290
5303
  const r = typeof e == "function" ? e : Fn(e), i = this.getSpecs().entries.filter((s2) => r(s2.obj));
5291
- return typeof n2 == "object" || typeof n2 > "u" ? Fe(i, (s2) => s2.obj, n2 ?? {}).map(({ value: { ref: s2 }, label: o }) => ({
5304
+ return typeof n2 == "object" || typeof n2 > "u" ? Ee(i, (s2) => s2.obj, n2 ?? {}).map(({ value: { ref: s2 }, label: o }) => ({
5292
5305
  ref: s2,
5293
5306
  label: o
5294
5307
  })) : i.map((s2) => ({
@@ -5381,7 +5394,7 @@
5381
5394
  ref: n2.ref,
5382
5395
  obj: {
5383
5396
  ...n2.obj,
5384
- data: new I(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5397
+ data: new _(n2.obj.data, [n2.ref.blockId, n2.ref.name])
5385
5398
  }
5386
5399
  }))
5387
5400
  };
@@ -5402,7 +5415,7 @@
5402
5415
  ...n2.obj,
5403
5416
  data: _n(
5404
5417
  n2.obj.data,
5405
- (r) => new I(r, [n2.ref.blockId, n2.ref.name])
5418
+ (r) => new _(r, [n2.ref.blockId, n2.ref.name])
5406
5419
  )
5407
5420
  }
5408
5421
  }))
@@ -5431,7 +5444,7 @@
5431
5444
  if (n2)
5432
5445
  return Bn(
5433
5446
  n2,
5434
- (i) => new I(i, [e.blockId, e.name])
5447
+ (i) => new _(i, [e.blockId, e.name])
5435
5448
  );
5436
5449
  }
5437
5450
  /**
@@ -5492,7 +5505,7 @@
5492
5505
  findLabels(e) {
5493
5506
  const n2 = this.getData();
5494
5507
  for (const r of n2.entries) {
5495
- if (!Z(r.obj)) continue;
5508
+ if (!Z$1(r.obj)) continue;
5496
5509
  const i = r.obj.spec;
5497
5510
  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)) {
5498
5511
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
@@ -5522,8 +5535,8 @@
5522
5535
  id: Pe(i),
5523
5536
  spec: o,
5524
5537
  get data() {
5525
- var c2;
5526
- return a !== null || (a = (c2 = l2.getPColumnByRef(i)) == null ? void 0 : c2.data), a;
5538
+ var u2;
5539
+ return a !== null || (a = (u2 = l2.getPColumnByRef(i)) == null ? void 0 : u2.data), a;
5527
5540
  }
5528
5541
  };
5529
5542
  });
@@ -5541,14 +5554,14 @@
5541
5554
  }));
5542
5555
  }
5543
5556
  }
5544
- class Q {
5557
+ class X {
5545
5558
  constructor() {
5546
5559
  L(this, "ctx");
5547
5560
  L(this, "args");
5548
5561
  L(this, "uiState");
5549
5562
  L(this, "_activeArgsCache");
5550
5563
  L(this, "resultPool", new bt());
5551
- this.ctx = h(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5564
+ this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
5552
5565
  }
5553
5566
  /**
5554
5567
  * Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
@@ -5566,7 +5579,7 @@
5566
5579
  getNamedAccessor(e) {
5567
5580
  return pe(
5568
5581
  this.ctx.getAccessorHandleByName(e),
5569
- (n2) => new I(n2, [e])
5582
+ (n2) => new _(n2, [e])
5570
5583
  );
5571
5584
  }
5572
5585
  get prerun() {
@@ -5585,7 +5598,7 @@
5585
5598
  }
5586
5599
  verifyInlineAndExplicitColumnsSupport(e) {
5587
5600
  var i;
5588
- const n2 = e.some((s2) => !(s2.data instanceof I) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5601
+ const n2 = e.some((s2) => !(s2.data instanceof _) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
5589
5602
  if (n2 && !r) throw Error("Inline or explicit columns not supported");
5590
5603
  }
5591
5604
  // TODO remove all non-PColumn fields
@@ -5616,7 +5629,7 @@
5616
5629
  return this.ctx.getCurrentUnstableMarker();
5617
5630
  }
5618
5631
  }
5619
- const M = "1.28.0";
5632
+ const M = "1.28.1";
5620
5633
  function wt(t) {
5621
5634
  return t.__renderLambda === true;
5622
5635
  }
@@ -5634,15 +5647,15 @@
5634
5647
  void 0,
5635
5648
  {},
5636
5649
  {},
5637
- ee(true),
5638
- ee([]),
5650
+ Z(true),
5651
+ Z([]),
5639
5652
  void 0
5640
5653
  );
5641
5654
  }
5642
5655
  output(e, n2, r = {}) {
5643
5656
  if (typeof n2 == "function") {
5644
5657
  const i = `output#${e}`;
5645
- return X(i, () => n2(new Q())), new T(
5658
+ return Y(i, () => n2(new X())), new T(
5646
5659
  this._renderingMode,
5647
5660
  this._initialArgs,
5648
5661
  this._initialUiState,
@@ -5677,7 +5690,7 @@
5677
5690
  return this.output(e, n2, { retentive: true });
5678
5691
  }
5679
5692
  argsValid(e) {
5680
- return typeof e == "function" ? (X("inputsValid", () => e(new Q())), new T(
5693
+ return typeof e == "function" ? (Y("inputsValid", () => e(new X())), new T(
5681
5694
  this._renderingMode,
5682
5695
  this._initialArgs,
5683
5696
  this._initialUiState,
@@ -5699,7 +5712,7 @@
5699
5712
  );
5700
5713
  }
5701
5714
  sections(e) {
5702
- return Array.isArray(e) ? this.sections(ee(e)) : typeof e == "function" ? (X("sections", () => e(new Q())), new T(
5715
+ return Array.isArray(e) ? this.sections(Z(e)) : typeof e == "function" ? (Y("sections", () => e(new X())), new T(
5703
5716
  this._renderingMode,
5704
5717
  this._initialArgs,
5705
5718
  this._initialUiState,
@@ -5719,7 +5732,7 @@
5719
5732
  }
5720
5733
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
5721
5734
  title(e) {
5722
- return X("title", () => e(new Q())), new T(
5735
+ return Y("title", () => e(new X())), new T(
5723
5736
  this._renderingMode,
5724
5737
  this._initialArgs,
5725
5738
  this._initialUiState,
@@ -5798,39 +5811,39 @@
5798
5811
  }
5799
5812
  }
5800
5813
  function fn(t, e, n2, r) {
5801
- var c2, w2;
5814
+ var u2, S;
5802
5815
  Array.isArray(r) && (r = { filters: r });
5803
- const i = t.resultPool.getData().entries.map((d) => d.obj).filter(Z).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), s2 = (d, u2) => {
5804
- let f2 = d.toString();
5805
- if (u2)
5806
- for (const p2 in u2)
5807
- f2 += p2, f2 += u2[p2];
5808
- return f2;
5816
+ const i = t.resultPool.getData().entries.map((d) => d.obj).filter(Z$1).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), s2 = (d, f2) => {
5817
+ let p2 = d.toString();
5818
+ if (f2)
5819
+ for (const c2 in f2)
5820
+ p2 += c2, p2 += f2[c2];
5821
+ return p2;
5809
5822
  }, o = /* @__PURE__ */ new Map();
5810
5823
  for (const d of e)
5811
- for (const u2 of d.spec.axesSpec) {
5812
- const f2 = y(u2);
5813
- for (const p2 of i) {
5814
- const y$1 = p2.spec.axesSpec[0], v = y(p2.spec.axesSpec[0]);
5815
- if (z(f2, v)) {
5816
- const m2 = Object.keys(f2.domain ?? {}).length, b = Object.keys(v.domain ?? {}).length;
5817
- if (m2 > b) {
5818
- const g = s2(p2.id, f2.domain);
5824
+ for (const f2 of d.spec.axesSpec) {
5825
+ const p2 = y(f2);
5826
+ for (const c2 of i) {
5827
+ const h = c2.spec.axesSpec[0], A2 = y(c2.spec.axesSpec[0]);
5828
+ if (z(p2, A2)) {
5829
+ const y2 = Object.keys(p2.domain ?? {}).length, v = Object.keys(A2.domain ?? {}).length;
5830
+ if (y2 > v) {
5831
+ const g = s2(c2.id, p2.domain);
5819
5832
  o.set(g, {
5820
5833
  id: g,
5821
5834
  spec: {
5822
- ...p2.spec,
5823
- axesSpec: [{ ...f2, annotations: y$1.annotations }]
5835
+ ...c2.spec,
5836
+ axesSpec: [{ ...p2, annotations: h.annotations }]
5824
5837
  },
5825
- data: p2.data
5838
+ data: c2.data
5826
5839
  });
5827
5840
  } else
5828
- o.set(s2(p2.id), p2);
5841
+ o.set(s2(c2.id), c2);
5829
5842
  }
5830
5843
  }
5831
5844
  }
5832
5845
  if ([...e, ...o.values()].some(
5833
- (d) => d.data instanceof I && !d.data.getIsReadyOrError()
5846
+ (d) => d.data instanceof _ && !d.data.getIsReadyOrError()
5834
5847
  ))
5835
5848
  return;
5836
5849
  let a = e;
@@ -5849,8 +5862,8 @@
5849
5862
  },
5850
5863
  secondary: l2.map((d) => ({ type: "column", column: d }))
5851
5864
  },
5852
- filters: [...(r == null ? void 0 : r.filters) ?? [], ...((c2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : c2.filters) ?? []],
5853
- sorting: ((w2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : w2.sorting) ?? []
5865
+ filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []],
5866
+ sorting: ((S = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : S.sorting) ?? []
5854
5867
  });
5855
5868
  }
5856
5869
  const ImportFileHandleSchema = z$1.string().optional().refine(