@platforma-sdk/ui-vue 1.40.6 → 1.41.0

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.
Files changed (98) hide show
  1. package/.turbo/turbo-build.log +49 -22
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +12 -0
  4. package/dist/AgGridVue/useAgGridOptions.js +54 -53
  5. package/dist/AgGridVue/useAgGridOptions.js.map +1 -1
  6. package/dist/components/BlockLayout.vue.d.ts.map +1 -1
  7. package/dist/components/BlockLayout.vue.js +7 -50
  8. package/dist/components/BlockLayout.vue.js.map +1 -1
  9. package/dist/components/BlockLayout.vue2.js +53 -2
  10. package/dist/components/BlockLayout.vue2.js.map +1 -1
  11. package/dist/components/BlockLayout.vue3.js +9 -0
  12. package/dist/components/BlockLayout.vue3.js.map +1 -0
  13. package/dist/components/NotFound.vue.d.ts.map +1 -1
  14. package/dist/components/NotFound.vue.js +12 -14
  15. package/dist/components/NotFound.vue.js.map +1 -1
  16. package/dist/components/PlAgDataTable/PlAgRowCount.vue.js +7 -6
  17. package/dist/components/PlAgDataTable/PlAgRowCount.vue.js.map +1 -1
  18. package/dist/components/PlAgDataTable/sources/table-source-v2.js +12 -12
  19. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js +10 -9
  20. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js.map +1 -1
  21. package/dist/components/PlAgRowNumHeader.vue.js +3 -2
  22. package/dist/components/PlAgRowNumHeader.vue.js.map +1 -1
  23. package/dist/components/PlAnnotations/components/DynamicForm.vue2.js +10 -10
  24. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.d.ts +1 -1
  25. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.d.ts.map +1 -1
  26. package/dist/components/PlMultiSequenceAlignment/data.js +51 -51
  27. package/dist/composition/fileContent.js +16 -16
  28. package/dist/defineApp.d.ts +19 -6
  29. package/dist/defineApp.d.ts.map +1 -1
  30. package/dist/defineApp.js +50 -30
  31. package/dist/defineApp.js.map +1 -1
  32. package/dist/internal/UpdateSerializer.d.ts +26 -0
  33. package/dist/internal/UpdateSerializer.d.ts.map +1 -0
  34. package/dist/internal/UpdateSerializer.js +65 -0
  35. package/dist/internal/UpdateSerializer.js.map +1 -0
  36. package/dist/internal/createAppModel.d.ts +1 -1
  37. package/dist/internal/createAppModel.d.ts.map +1 -1
  38. package/dist/internal/createAppModel.js +43 -51
  39. package/dist/internal/createAppModel.js.map +1 -1
  40. package/dist/internal/{createApp.d.ts → createAppV1.d.ts} +4 -4
  41. package/dist/internal/createAppV1.d.ts.map +1 -0
  42. package/dist/internal/{createApp.js → createAppV1.js} +17 -18
  43. package/dist/internal/createAppV1.js.map +1 -0
  44. package/dist/internal/createAppV2.d.ts +56 -0
  45. package/dist/internal/createAppV2.d.ts.map +1 -0
  46. package/dist/internal/createAppV2.js +158 -0
  47. package/dist/internal/createAppV2.js.map +1 -0
  48. package/dist/internal/test-helpers/BlockMock.d.ts +28 -0
  49. package/dist/internal/test-helpers/BlockMock.d.ts.map +1 -0
  50. package/dist/internal/test-helpers/createMockApi.d.ts +4 -0
  51. package/dist/internal/test-helpers/createMockApi.d.ts.map +1 -0
  52. package/dist/internal/test-helpers/utils.d.ts +4 -0
  53. package/dist/internal/test-helpers/utils.d.ts.map +1 -0
  54. package/dist/{types.static-test.d.ts → internal/v1.static-test.d.ts} +3 -3
  55. package/dist/internal/v1.static-test.d.ts.map +1 -0
  56. package/dist/internal/v2.static-test.d.ts +7 -0
  57. package/dist/internal/v2.static-test.d.ts.map +1 -0
  58. package/dist/lib/model/common/dist/index.js +214 -199
  59. package/dist/lib/model/common/dist/index.js.map +1 -1
  60. package/dist/lib/ui/uikit/dist/components/PlAccordion/{ExpandTransition.vue.js → ExpandTransition.vue2.js} +1 -1
  61. package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue2.js.map +1 -0
  62. package/dist/lib/ui/uikit/dist/components/PlAccordion/PlAccordionSection.vue2.js +1 -1
  63. package/dist/lib/ui/uikit/dist/lib/model/common/dist/index.js +8 -8
  64. package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js +64 -43
  65. package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js.map +1 -1
  66. package/dist/lib/util/helpers/dist/index.js +67 -56
  67. package/dist/lib/util/helpers/dist/index.js.map +1 -1
  68. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/index.js +29 -0
  69. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/index.js.map +1 -0
  70. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/core.js +208 -0
  71. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/core.js.map +1 -0
  72. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/duplex.js +95 -0
  73. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/duplex.js.map +1 -0
  74. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/helpers.js +112 -0
  75. package/dist/node_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/helpers.js.map +1 -0
  76. package/dist/sdk/model/dist/index.js +151 -131
  77. package/dist/sdk/model/dist/index.js.map +1 -1
  78. package/dist/types.d.ts +2 -2
  79. package/dist/types.d.ts.map +1 -1
  80. package/package.json +8 -5
  81. package/src/components/BlockLayout.vue +9 -1
  82. package/src/components/NotFound.vue +1 -3
  83. package/src/defineApp.ts +134 -36
  84. package/src/internal/UpdateSerializer.ts +112 -0
  85. package/src/internal/createAppModel.ts +7 -20
  86. package/src/internal/{createApp.ts → createAppV1.ts} +10 -6
  87. package/src/internal/createAppV2.test.ts +158 -0
  88. package/src/internal/createAppV2.ts +309 -0
  89. package/src/internal/test-helpers/BlockMock.ts +144 -0
  90. package/src/internal/test-helpers/createMockApi.ts +92 -0
  91. package/src/internal/test-helpers/utils.ts +65 -0
  92. package/src/{types.static-test.ts → internal/v1.static-test.ts} +5 -9
  93. package/src/internal/v2.static-test.ts +98 -0
  94. package/src/types.ts +2 -2
  95. package/dist/internal/createApp.d.ts.map +0 -1
  96. package/dist/internal/createApp.js.map +0 -1
  97. package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue.js.map +0 -1
  98. package/dist/types.static-test.d.ts.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import f from "../../../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.js";
2
2
  import p from "../../../../_virtual/canonicalize.js";
3
- var P = Object.defineProperty, k = (e, t, r) => t in e ? P(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, m = (e, t, r) => k(e, typeof t != "symbol" ? t + "" : t, r);
3
+ var k = Object.defineProperty, E = (e, t, n) => t in e ? k(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, m = (e, t, n) => E(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  f.object({
5
5
  /** Included left border. */
6
6
  from: f.number(),
@@ -10,7 +10,7 @@ f.object({
10
10
  function A(e) {
11
11
  throw new Error("Unexpected object: " + e);
12
12
  }
13
- function Y(e) {
13
+ function W(e) {
14
14
  if (!e || typeof e != "object")
15
15
  return !1;
16
16
  const t = e;
@@ -27,35 +27,35 @@ function Y(e) {
27
27
  return !1;
28
28
  }
29
29
  }
30
- function Z(e, t) {
30
+ function ee(e, t) {
31
31
  if (e !== void 0)
32
32
  switch (e.type) {
33
33
  case "Json":
34
34
  return e;
35
35
  case "JsonPartitioned": {
36
- const r = {};
37
- for (const [n, o] of Object.entries(e.parts))
38
- r[n] = t(o);
36
+ const n = {};
37
+ for (const [r, o] of Object.entries(e.parts))
38
+ n[r] = t(o);
39
39
  return {
40
40
  ...e,
41
- parts: r
41
+ parts: n
42
42
  };
43
43
  }
44
44
  case "BinaryPartitioned": {
45
- const r = {};
46
- for (const [n, o] of Object.entries(e.parts))
47
- r[n] = {
45
+ const n = {};
46
+ for (const [r, o] of Object.entries(e.parts))
47
+ n[r] = {
48
48
  index: t(o.index),
49
49
  values: t(o.values)
50
50
  };
51
51
  return {
52
52
  ...e,
53
- parts: r
53
+ parts: n
54
54
  };
55
55
  }
56
56
  }
57
57
  }
58
- function E(e) {
58
+ function S(e) {
59
59
  if (!e || typeof e != "object")
60
60
  return !1;
61
61
  const t = e;
@@ -72,13 +72,13 @@ function E(e) {
72
72
  return !1;
73
73
  }
74
74
  }
75
- function W(e) {
76
- return E(e) ? e.type === "JsonPartitioned" || e.type === "BinaryPartitioned" : !1;
75
+ function te(e) {
76
+ return S(e) ? e.type === "JsonPartitioned" || e.type === "BinaryPartitioned" : !1;
77
77
  }
78
- function ee(e) {
78
+ function ne(e) {
79
79
  switch (e.type) {
80
80
  case "Json": {
81
- const t = Object.entries(e.data).map(([r, n]) => ({ key: JSON.parse(r), value: n }));
81
+ const t = Object.entries(e.data).map(([n, r]) => ({ key: JSON.parse(n), value: r }));
82
82
  return {
83
83
  type: "Json",
84
84
  keyLength: e.keyLength,
@@ -86,7 +86,7 @@ function ee(e) {
86
86
  };
87
87
  }
88
88
  case "JsonPartitioned": {
89
- const t = Object.entries(e.parts).map(([r, n]) => ({ key: JSON.parse(r), value: n }));
89
+ const t = Object.entries(e.parts).map(([n, r]) => ({ key: JSON.parse(n), value: r }));
90
90
  return {
91
91
  type: "JsonPartitioned",
92
92
  partitionKeyLength: e.partitionKeyLength,
@@ -94,7 +94,7 @@ function ee(e) {
94
94
  };
95
95
  }
96
96
  case "BinaryPartitioned": {
97
- const t = Object.entries(e.parts).map(([r, n]) => ({ key: JSON.parse(r), value: n }));
97
+ const t = Object.entries(e.parts).map(([n, r]) => ({ key: JSON.parse(n), value: r }));
98
98
  return {
99
99
  type: "BinaryPartitioned",
100
100
  partitionKeyLength: e.partitionKeyLength,
@@ -103,12 +103,12 @@ function ee(e) {
103
103
  }
104
104
  }
105
105
  }
106
- function te(e) {
106
+ function re(e) {
107
107
  switch (e.type) {
108
108
  case "Json": {
109
109
  const t = {};
110
- for (const r of e.data)
111
- t[JSON.stringify(r.key)] = r.value;
110
+ for (const n of e.data)
111
+ t[JSON.stringify(n.key)] = n.value;
112
112
  return {
113
113
  type: "Json",
114
114
  keyLength: e.keyLength,
@@ -117,8 +117,8 @@ function te(e) {
117
117
  }
118
118
  case "JsonPartitioned": {
119
119
  const t = {};
120
- for (const r of e.parts)
121
- t[JSON.stringify(r.key)] = r.value;
120
+ for (const n of e.parts)
121
+ t[JSON.stringify(n.key)] = n.value;
122
122
  return {
123
123
  type: "JsonPartitioned",
124
124
  partitionKeyLength: e.partitionKeyLength,
@@ -127,8 +127,8 @@ function te(e) {
127
127
  }
128
128
  case "BinaryPartitioned": {
129
129
  const t = {};
130
- for (const r of e.parts)
131
- t[JSON.stringify(r.key)] = r.value;
130
+ for (const n of e.parts)
131
+ t[JSON.stringify(n.key)] = n.value;
132
132
  return {
133
133
  type: "BinaryPartitioned",
134
134
  partitionKeyLength: e.partitionKeyLength,
@@ -137,11 +137,11 @@ function te(e) {
137
137
  }
138
138
  }
139
139
  }
140
- const S = -2147483648, b = -9007199254740991n, I = null, N = null;
141
- function J(e, t) {
140
+ const N = -2147483648, b = -9007199254740991n, I = null, J = null;
141
+ function O(e, t) {
142
142
  switch (t) {
143
143
  case "Int":
144
- return e === S;
144
+ return e === N;
145
145
  case "Long":
146
146
  return e === Number(b) || e === b;
147
147
  case "Float":
@@ -151,35 +151,35 @@ function J(e, t) {
151
151
  case "String":
152
152
  return e === I;
153
153
  case "Bytes":
154
- return e === N;
154
+ return e === J;
155
155
  default:
156
156
  throw Error(`unsupported data type: ${t}`);
157
157
  }
158
158
  }
159
- function O(e, t) {
160
- const r = Math.floor(t / 8), n = 1 << 7 - t % 8;
161
- return (e[r] & n) > 0;
159
+ function j(e, t) {
160
+ const n = Math.floor(t / 8), r = 1 << 7 - t % 8;
161
+ return (e[n] & r) > 0;
162
162
  }
163
- const j = { type: "absent" }, C = null;
164
- function ne(e) {
163
+ const C = { type: "absent" }, L = null;
164
+ function oe(e) {
165
165
  return typeof e == "object" && e !== null && e.type === "absent";
166
166
  }
167
- function re(e, t, r = {}) {
168
- if (O(e.absent, t))
169
- return r.absent === void 0 ? j : r.absent;
170
- const n = e.data[t], o = e.type;
171
- if (J(n, o)) return r.na === void 0 ? C : r.na;
167
+ function ae(e, t, n = {}) {
168
+ if (j(e.absent, t))
169
+ return n.absent === void 0 ? C : n.absent;
170
+ const r = e.data[t], o = e.type;
171
+ if (O(r, o)) return n.na === void 0 ? L : n.na;
172
172
  switch (o) {
173
173
  case "Int":
174
- return n;
174
+ return r;
175
175
  case "Long":
176
- return Number(n);
176
+ return Number(r);
177
177
  case "Float":
178
- return n;
178
+ return r;
179
179
  case "Double":
180
- return n;
180
+ return r;
181
181
  case "String":
182
- return n;
182
+ return r;
183
183
  case "Bytes":
184
184
  throw Error("Bytes not yet supported");
185
185
  default:
@@ -187,26 +187,26 @@ function re(e, t, r = {}) {
187
187
  }
188
188
  }
189
189
  function l(e) {
190
- const { type: t, name: r, domain: n } = e, o = { type: t, name: r };
191
- return n && Object.entries(n).length > 0 && Object.assign(o, { domain: n }), o;
190
+ const { type: t, name: n, domain: r } = e, o = { type: t, name: n };
191
+ return r && Object.entries(r).length > 0 && Object.assign(o, { domain: r }), o;
192
192
  }
193
- function L(e) {
193
+ function $(e) {
194
194
  return e.map(l);
195
195
  }
196
- function oe(e) {
196
+ function ie(e) {
197
197
  return p(l(e));
198
198
  }
199
- function $(e, t) {
199
+ function T(e, t) {
200
200
  if (e === void 0) return t === void 0;
201
201
  if (t === void 0) return !0;
202
- for (const r in t)
203
- if (e[r] !== t[r]) return !1;
202
+ for (const n in t)
203
+ if (e[n] !== t[n]) return !1;
204
204
  return !0;
205
205
  }
206
- function T(e, t) {
207
- return e.name === t.name && $(e.domain, t.domain);
206
+ function B(e, t) {
207
+ return e.name === t.name && T(e.domain, t.domain);
208
208
  }
209
- function ae(e, t) {
209
+ function se(e, t) {
210
210
  return { ...e, src: y(e.src, t) };
211
211
  }
212
212
  function y(e, t) {
@@ -229,19 +229,19 @@ function y(e, t) {
229
229
  case "full":
230
230
  return {
231
231
  type: e.type,
232
- entries: e.entries.map((r) => y(r, t))
232
+ entries: e.entries.map((n) => y(n, t))
233
233
  };
234
234
  case "outer":
235
235
  return {
236
236
  type: "outer",
237
237
  primary: y(e.primary, t),
238
- secondary: e.secondary.map((r) => y(r, t))
238
+ secondary: e.secondary.map((n) => y(n, t))
239
239
  };
240
240
  default:
241
241
  A(e);
242
242
  }
243
243
  }
244
- function ie(e) {
244
+ function ce(e) {
245
245
  switch (e.type) {
246
246
  case "axis":
247
247
  return {
@@ -255,7 +255,7 @@ function ie(e) {
255
255
  };
256
256
  }
257
257
  }
258
- function B(e) {
258
+ function D(e) {
259
259
  return p(e);
260
260
  }
261
261
  function g(e) {
@@ -264,26 +264,26 @@ function g(e) {
264
264
  function w(e, t) {
265
265
  return JSON.stringify([e, t]);
266
266
  }
267
- class se {
267
+ class ue {
268
268
  /**
269
269
  * Creates a new anchor context from a set of anchor column specifications
270
270
  * @param anchors Record of anchor column specifications indexed by anchor ID
271
271
  */
272
272
  constructor(t) {
273
273
  m(this, "domains", /* @__PURE__ */ new Map()), m(this, "axes", /* @__PURE__ */ new Map()), m(this, "domainPacks", []), m(this, "domainPackToAnchor", /* @__PURE__ */ new Map()), this.anchors = t;
274
- const r = Object.entries(t);
275
- r.sort((n, o) => n[0].localeCompare(o[0]));
276
- for (const [n, o] of r) {
274
+ const n = Object.entries(t);
275
+ n.sort((r, o) => r[0].localeCompare(o[0]));
276
+ for (const [r, o] of n) {
277
277
  for (let s = 0; s < o.axesSpec.length; s++) {
278
278
  const i = o.axesSpec[s], a = g(i);
279
- this.axes.set(a, { anchor: n, idx: s });
279
+ this.axes.set(a, { anchor: r, idx: s });
280
280
  }
281
281
  if (o.domain !== void 0) {
282
282
  const s = Object.entries(o.domain);
283
- s.sort((i, a) => i[0].localeCompare(a[0])), this.domainPackToAnchor.set(JSON.stringify(s), n), this.domainPacks.push(s.map(([i]) => i));
283
+ s.sort((i, a) => i[0].localeCompare(a[0])), this.domainPackToAnchor.set(JSON.stringify(s), r), this.domainPacks.push(s.map(([i]) => i));
284
284
  for (const [i, a] of s) {
285
285
  const c = w(i, a);
286
- this.domains.set(c, n);
286
+ this.domains.set(c, r);
287
287
  }
288
288
  }
289
289
  }
@@ -291,8 +291,8 @@ class se {
291
291
  /**
292
292
  * Implementation of derive method
293
293
  */
294
- derive(t, r) {
295
- const n = {
294
+ derive(t, n) {
295
+ const r = {
296
296
  name: t.name,
297
297
  axes: []
298
298
  };
@@ -310,7 +310,7 @@ class se {
310
310
  }
311
311
  const c = this.domainPackToAnchor.get(JSON.stringify(a));
312
312
  if (c !== void 0) {
313
- n.domainAnchor = c, o = new Set(i);
313
+ r.domainAnchor = c, o = new Set(i);
314
314
  break;
315
315
  }
316
316
  }
@@ -318,15 +318,15 @@ class se {
318
318
  if (o !== void 0 && o.has(i))
319
319
  continue;
320
320
  const c = w(i, a), u = this.domains.get(c);
321
- n.domain ?? (n.domain = {}), n.domain[i] = u ? { anchor: u } : a;
321
+ r.domain ?? (r.domain = {}), r.domain[i] = u ? { anchor: u } : a;
322
322
  }
323
- if (n.axes = t.axesSpec.map((i) => {
323
+ if (r.axes = t.axesSpec.map((i) => {
324
324
  const a = g(i), c = this.axes.get(a);
325
325
  return c === void 0 ? l(i) : c;
326
- }), !r || r.length === 0)
327
- return n;
326
+ }), !n || n.length === 0)
327
+ return r;
328
328
  const s = [];
329
- for (const i of r) {
329
+ for (const i of n) {
330
330
  const [a, c] = i;
331
331
  if (typeof a == "number") {
332
332
  if (a < 0 || a >= t.axesSpec.length)
@@ -340,7 +340,7 @@ class se {
340
340
  }
341
341
  }
342
342
  return s.sort((i, a) => i[0] - a[0]), {
343
- source: n,
343
+ source: r,
344
344
  axisFilters: s
345
345
  };
346
346
  }
@@ -350,22 +350,22 @@ class se {
350
350
  * @param axisFilters Optional axis filters to apply to the column
351
351
  * @returns A canonicalized string representation of the anchored column identifier
352
352
  */
353
- deriveS(t, r) {
354
- return B(this.derive(t, r));
353
+ deriveS(t, n) {
354
+ return D(this.derive(t, n));
355
355
  }
356
356
  }
357
- function ce(e, t, r) {
358
- const n = { ...t }, o = (r == null ? void 0 : r.ignoreMissingDomains) ?? !1;
359
- if (n.domainAnchor !== void 0) {
360
- const s = e[n.domainAnchor];
357
+ function fe(e, t, n) {
358
+ const r = { ...t }, o = (n == null ? void 0 : n.ignoreMissingDomains) ?? !1;
359
+ if (r.domainAnchor !== void 0) {
360
+ const s = e[r.domainAnchor];
361
361
  if (!s)
362
- throw new Error(`Anchor "${n.domainAnchor}" not found`);
362
+ throw new Error(`Anchor "${r.domainAnchor}" not found`);
363
363
  const i = s.domain || {};
364
- n.domain = { ...i, ...n.domain }, delete n.domainAnchor;
364
+ r.domain = { ...i, ...r.domain }, delete r.domainAnchor;
365
365
  }
366
- if (n.domain) {
366
+ if (r.domain) {
367
367
  const s = {};
368
- for (const [i, a] of Object.entries(n.domain))
368
+ for (const [i, a] of Object.entries(r.domain))
369
369
  if (typeof a == "string")
370
370
  s[i] = a;
371
371
  else {
@@ -379,33 +379,33 @@ function ce(e, t, r) {
379
379
  }
380
380
  s[i] = c.domain[i];
381
381
  }
382
- n.domain = s;
382
+ r.domain = s;
383
383
  }
384
- return n.axes && (n.axes = n.axes.map((s) => D(e, s))), n;
384
+ return r.axes && (r.axes = r.axes.map((s) => R(e, s))), r;
385
385
  }
386
- function D(e, t) {
386
+ function R(e, t) {
387
387
  if (!V(t))
388
388
  return t;
389
- const r = t.anchor, n = e[r];
390
- if (!n)
391
- throw new Error(`Anchor "${r}" not found for axis reference`);
389
+ const n = t.anchor, r = e[n];
390
+ if (!r)
391
+ throw new Error(`Anchor "${n}" not found for axis reference`);
392
392
  if ("idx" in t) {
393
- if (t.idx < 0 || t.idx >= n.axesSpec.length)
394
- throw new Error(`Axis index ${t.idx} out of bounds for anchor "${r}"`);
395
- return n.axesSpec[t.idx];
393
+ if (t.idx < 0 || t.idx >= r.axesSpec.length)
394
+ throw new Error(`Axis index ${t.idx} out of bounds for anchor "${n}"`);
395
+ return r.axesSpec[t.idx];
396
396
  } else if ("name" in t) {
397
- const o = n.axesSpec.filter((s) => s.name === t.name);
397
+ const o = r.axesSpec.filter((s) => s.name === t.name);
398
398
  if (o.length > 1)
399
- throw new Error(`Multiple axes with name "${t.name}" found in anchor "${r}"`);
399
+ throw new Error(`Multiple axes with name "${t.name}" found in anchor "${n}"`);
400
400
  if (o.length === 0)
401
- throw new Error(`Axis with name "${t.name}" not found in anchor "${r}"`);
401
+ throw new Error(`Axis with name "${t.name}" not found in anchor "${n}"`);
402
402
  return o[0];
403
403
  } else if ("id" in t) {
404
- const o = n.axesSpec.filter((s) => T(t.id, l(s)));
404
+ const o = r.axesSpec.filter((s) => B(t.id, l(s)));
405
405
  if (o.length > 1)
406
- throw new Error(`Multiple matching axes found for matcher in anchor "${r}"`);
406
+ throw new Error(`Multiple matching axes found for matcher in anchor "${n}"`);
407
407
  if (o.length === 0)
408
- throw new Error(`No matching axis found for matcher in anchor "${r}"`);
408
+ throw new Error(`No matching axis found for matcher in anchor "${n}"`);
409
409
  return o[0];
410
410
  }
411
411
  throw new Error("Unsupported axis reference type");
@@ -419,42 +419,42 @@ function h(e) {
419
419
  function K(e) {
420
420
  return h(e.spec);
421
421
  }
422
- function ue(e) {
422
+ function de(e) {
423
423
  if (!K(e)) throw new Error(`not a PColumn (kind = ${e.spec.kind})`);
424
424
  return e;
425
425
  }
426
- function fe(e, t) {
426
+ function le(e, t) {
427
427
  return e === void 0 ? void 0 : {
428
428
  ...e,
429
429
  data: t(e.data)
430
430
  };
431
431
  }
432
- function de(e) {
433
- const t = /* @__PURE__ */ new Map(), r = (n) => {
434
- switch (n.type) {
432
+ function pe(e) {
433
+ const t = /* @__PURE__ */ new Map(), n = (r) => {
434
+ switch (r.type) {
435
435
  case "column":
436
- t.set(n.column.id, n.column);
436
+ t.set(r.column.id, r.column);
437
437
  return;
438
438
  case "slicedColumn":
439
- t.set(n.column.id, n.column);
439
+ t.set(r.column.id, r.column);
440
440
  return;
441
441
  case "inlineColumn":
442
442
  return;
443
443
  case "full":
444
444
  case "inner":
445
- for (const o of n.entries) r(o);
445
+ for (const o of r.entries) n(o);
446
446
  return;
447
447
  case "outer":
448
- r(n.primary);
449
- for (const o of n.secondary) r(o);
448
+ n(r.primary);
449
+ for (const o of r.secondary) n(o);
450
450
  return;
451
451
  default:
452
- A(n);
452
+ A(r);
453
453
  }
454
454
  };
455
- return r(e), [...t.values()];
455
+ return n(e), [...t.values()];
456
456
  }
457
- function x(e, t) {
457
+ function v(e, t) {
458
458
  if (e.name !== void 0 && e.name !== t.name)
459
459
  return !1;
460
460
  if (e.type !== void 0) {
@@ -465,14 +465,14 @@ function x(e, t) {
465
465
  return !1;
466
466
  }
467
467
  if (e.domain !== void 0) {
468
- const r = t.domain || {};
469
- for (const [n, o] of Object.entries(e.domain))
470
- if (r[n] !== o)
468
+ const n = t.domain || {};
469
+ for (const [r, o] of Object.entries(e.domain))
470
+ if (n[r] !== o)
471
471
  return !1;
472
472
  }
473
473
  return !0;
474
474
  }
475
- function v(e, t) {
475
+ function x(e, t) {
476
476
  if (t.name !== void 0 && e.name !== t.name || t.namePattern !== void 0 && !new RegExp(t.namePattern).test(e.name))
477
477
  return !1;
478
478
  if (t.type !== void 0) {
@@ -483,50 +483,50 @@ function v(e, t) {
483
483
  return !1;
484
484
  }
485
485
  if (t.domain !== void 0) {
486
- const r = e.domain || {};
487
- for (const [n, o] of Object.entries(t.domain))
488
- if (r[n] !== o)
486
+ const n = e.domain || {};
487
+ for (const [r, o] of Object.entries(t.domain))
488
+ if (n[r] !== o)
489
489
  return !1;
490
490
  }
491
491
  if (t.axes !== void 0) {
492
- const r = e.axesSpec.map(l);
492
+ const n = e.axesSpec.map(l);
493
493
  if (t.partialAxesMatch) {
494
- for (const n of t.axes)
495
- if (!r.some((o) => x(n, o)))
494
+ for (const r of t.axes)
495
+ if (!n.some((o) => v(r, o)))
496
496
  return !1;
497
497
  } else {
498
- if (r.length !== t.axes.length)
498
+ if (n.length !== t.axes.length)
499
499
  return !1;
500
- for (let n = 0; n < t.axes.length; n++)
501
- if (!x(t.axes[n], r[n]))
500
+ for (let r = 0; r < t.axes.length; r++)
501
+ if (!v(t.axes[r], n[r]))
502
502
  return !1;
503
503
  }
504
504
  }
505
505
  if (t.annotations !== void 0) {
506
- const r = e.annotations || {};
507
- for (const [n, o] of Object.entries(t.annotations))
508
- if (r[n] !== o)
506
+ const n = e.annotations || {};
507
+ for (const [r, o] of Object.entries(t.annotations))
508
+ if (n[r] !== o)
509
509
  return !1;
510
510
  }
511
511
  if (t.annotationPatterns !== void 0) {
512
- const r = e.annotations || {};
513
- for (const [n, o] of Object.entries(t.annotationPatterns)) {
514
- const s = r[n];
512
+ const n = e.annotations || {};
513
+ for (const [r, o] of Object.entries(t.annotationPatterns)) {
514
+ const s = n[r];
515
515
  if (s === void 0 || !new RegExp(o).test(s))
516
516
  return !1;
517
517
  }
518
518
  }
519
519
  return !0;
520
520
  }
521
- function le(e) {
522
- return Array.isArray(e) ? (t) => e.some((r) => h(t) && v(t, r)) : (t) => h(t) && v(t, e);
521
+ function me(e) {
522
+ return Array.isArray(e) ? (t) => e.some((n) => h(t) && x(t, n)) : (t) => h(t) && x(t, e);
523
523
  }
524
- function pe(e) {
524
+ function ye(e) {
525
525
  const t = {
526
526
  kind: e.kind,
527
527
  name: e.name
528
528
  };
529
- return e.domain !== void 0 && (t.domain = e.domain), h(e) && (t.axesSpec = L(e.axesSpec)), p(t);
529
+ return e.domain !== void 0 && (t.domain = e.domain), h(e) && (t.axesSpec = $(e.axesSpec)), p(t);
530
530
  }
531
531
  f.object({
532
532
  __isRef: f.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
@@ -536,24 +536,24 @@ f.object({
536
536
  }).describe(
537
537
  "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."
538
538
  ).readonly();
539
- function me(e) {
539
+ function he(e) {
540
540
  return typeof e == "object" && e !== null && "__isRef" in e && e.__isRef === !0 && "blockId" in e && "name" in e;
541
541
  }
542
- function ye(e, t = !0) {
542
+ function be(e, t = !0) {
543
543
  if (t)
544
544
  return {
545
545
  ...e,
546
546
  requireEnrichments: !0
547
547
  };
548
548
  {
549
- const { requireEnrichments: r, ...n } = e;
550
- return n;
549
+ const { requireEnrichments: n, ...r } = e;
550
+ return r;
551
551
  }
552
552
  }
553
- function he(e, t) {
553
+ function ge(e, t) {
554
554
  return e.ok ? { ok: !0, value: t(e.value) } : e;
555
555
  }
556
- function R(e) {
556
+ function F(e) {
557
557
  if (e instanceof Int8Array || e instanceof Uint8Array || e instanceof Uint8ClampedArray)
558
558
  return new DataView(e.buffer, e.byteOffset, e.byteLength);
559
559
  if (e instanceof ArrayBuffer) return new DataView(e);
@@ -561,46 +561,49 @@ function R(e) {
561
561
  "Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray"
562
562
  );
563
563
  }
564
- const F = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", M = "0123456789ABCDEFGHIJKLMNOPQRSTUV", U = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
565
- function _(e, t, r) {
566
- r = r || {};
567
- let n, o;
564
+ const M = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", U = "0123456789ABCDEFGHIJKLMNOPQRSTUV", _ = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
565
+ function z(e, t, n) {
566
+ n = n || {};
567
+ let r, o;
568
568
  switch (t) {
569
569
  case "RFC3548":
570
570
  case "RFC4648":
571
- n = F, o = !0;
571
+ r = M, o = !0;
572
572
  break;
573
573
  case "RFC4648-HEX":
574
- n = M, o = !0;
574
+ r = U, o = !0;
575
575
  break;
576
576
  case "Crockford":
577
- n = U, o = !1;
577
+ r = _, o = !1;
578
578
  break;
579
579
  default:
580
580
  throw new Error("Unknown base32 variant: " + String(t));
581
581
  }
582
- const s = r.padding !== void 0 ? r.padding : o, i = R(e);
582
+ const s = n.padding !== void 0 ? n.padding : o, i = F(e);
583
583
  let a = 0, c = 0, u = "";
584
584
  for (let d = 0; d < i.byteLength; d++)
585
585
  for (c = c << 8 | i.getUint8(d), a += 8; a >= 5; )
586
- u += n[c >>> a - 5 & 31], a -= 5;
587
- if (a > 0 && (u += n[c << 5 - a & 31]), s)
586
+ u += r[c >>> a - 5 & 31], a -= 5;
587
+ if (a > 0 && (u += r[c << 5 - a & 31]), s)
588
588
  for (; u.length % 8 !== 0; )
589
589
  u += "=";
590
590
  return u;
591
591
  }
592
- const z = 15, q = 24, H = f.string().length(q).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
593
- function be() {
594
- const e = new Uint8Array(z);
595
- return crypto.getRandomValues(e), H.parse(_(e, "RFC4648"));
592
+ const q = 15, H = 24, G = f.string().length(H).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
593
+ function we() {
594
+ const e = new Uint8Array(q);
595
+ return crypto.getRandomValues(e), G.parse(z(e, "RFC4648"));
596
596
  }
597
- function ge(e) {
597
+ function ve(e) {
598
598
  return p(e);
599
599
  }
600
- function we(e) {
600
+ function xe(e) {
601
601
  return JSON.parse(e);
602
602
  }
603
- function G(e) {
603
+ function Q(e) {
604
+ return e instanceof Error ? e.name === "AbortError" || Q(e.cause) : !1;
605
+ }
606
+ function X(e) {
604
607
  if (typeof e == "string")
605
608
  return `String value was thrown: ${e}`;
606
609
  if (e && typeof e == "object")
@@ -611,54 +614,66 @@ function G(e) {
611
614
  }
612
615
  return `Non-Error value (${typeof e}) was thrown: ${e}`;
613
616
  }
614
- function xe(e) {
615
- return e instanceof Error ? e : new Error(G(e));
617
+ function Ae(e) {
618
+ return e instanceof Error ? e : new Error(X(e));
619
+ }
620
+ function P(e) {
621
+ const t = e.cause ? P(e.cause) : void 0, n = new Error(e.message, t !== void 0 ? { cause: t } : void 0);
622
+ return n.name = e.name || "Error", n.stack = e.stack, n;
623
+ }
624
+ function Pe(e) {
625
+ if (e.error)
626
+ throw e.error instanceof Error ? e.error : P(e.error);
627
+ return e.value;
616
628
  }
617
629
  export {
618
- se as AnchoredIdDeriver,
619
- j as PTableAbsent,
620
- C as PTableNA,
621
- N as PValueBytesNA,
622
- S as PValueIntNA,
630
+ ue as AnchoredIdDeriver,
631
+ C as PTableAbsent,
632
+ L as PTableNA,
633
+ J as PValueBytesNA,
634
+ N as PValueIntNA,
623
635
  b as PValueLongNA,
624
636
  I as PValueStringNA,
625
- H as PlId,
626
- z as PlIdBytes,
627
- q as PlIdLength,
628
- oe as canonicalizeAxisId,
629
- ge as canonicalizeJson,
630
- ee as dataInfoToEntries,
631
- pe as deriveNativeId,
632
- xe as ensureError,
633
- ue as ensurePColumn,
634
- te as entriesToDataInfo,
635
- de as extractAllColumns,
636
- L as getAxesId,
637
+ G as PlId,
638
+ q as PlIdBytes,
639
+ H as PlIdLength,
640
+ ie as canonicalizeAxisId,
641
+ ve as canonicalizeJson,
642
+ ne as dataInfoToEntries,
643
+ ye as deriveNativeId,
644
+ P as deserializeError,
645
+ Ae as ensureError,
646
+ de as ensurePColumn,
647
+ re as entriesToDataInfo,
648
+ pe as extractAllColumns,
649
+ $ as getAxesId,
637
650
  l as getAxisId,
638
- ie as getPTableColumnId,
639
- Y as isDataInfo,
640
- E as isDataInfoEntries,
651
+ ce as getPTableColumnId,
652
+ Q as hasAbortError,
653
+ W as isDataInfo,
654
+ S as isDataInfoEntries,
641
655
  K as isPColumn,
642
656
  h as isPColumnSpec,
643
- ne as isPTableAbsent,
644
- W as isPartitionedDataInfoEntries,
645
- me as isPlRef,
646
- O as isValueAbsent,
647
- J as isValueNA,
648
- Z as mapDataInfo,
657
+ oe as isPTableAbsent,
658
+ te as isPartitionedDataInfoEntries,
659
+ he as isPlRef,
660
+ j as isValueAbsent,
661
+ O as isValueNA,
662
+ ee as mapDataInfo,
649
663
  y as mapJoinEntry,
650
- fe as mapPObjectData,
651
- ae as mapPTableDef,
652
- he as mapValueInVOE,
653
- x as matchAxis,
654
- T as matchAxisId,
655
- v as matchPColumn,
656
- re as pTableValue,
657
- we as parseJson,
658
- ce as resolveAnchors,
659
- le as selectorsToPredicate,
660
- B as stringifyColumnId,
661
- be as uniquePlId,
662
- ye as withEnrichments
664
+ le as mapPObjectData,
665
+ se as mapPTableDef,
666
+ ge as mapValueInVOE,
667
+ v as matchAxis,
668
+ B as matchAxisId,
669
+ x as matchPColumn,
670
+ ae as pTableValue,
671
+ xe as parseJson,
672
+ fe as resolveAnchors,
673
+ me as selectorsToPredicate,
674
+ D as stringifyColumnId,
675
+ we as uniquePlId,
676
+ Pe as unwrapResult,
677
+ be as withEnrichments
663
678
  };
664
679
  //# sourceMappingURL=index.js.map