@platforma-sdk/model 1.20.6 → 1.20.11

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/index.mjs CHANGED
@@ -1,282 +1,282 @@
1
- var pt = Object.defineProperty;
2
- var dt = (e, t, n) => t in e ? pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var w = (e, t, n) => dt(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { isPColumn as H, mapPObjectData as L, mapValueInVOE as ft, ensurePColumn as ht, isPColumnSpec as Y, extractAllColumns as gt, mapPTableDef as mt, getAxisId as X, matchAxisId as yt } from "@milaboratories/pl-model-common";
1
+ var de = Object.defineProperty;
2
+ var pe = (t, e, n) => e in t ? de(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var S = (t, e, n) => pe(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { isPColumn as H, mapPObjectData as x, mapValueInVOE as fe, ensurePColumn as he, isPColumnSpec as Y, extractAllColumns as ge, mapPTableDef as me, getAxisId as X, matchAxisId as ye } from "@milaboratories/pl-model-common";
5
5
  export * from "@milaboratories/pl-model-common";
6
- import { z as A } from "zod";
7
- class bt extends Error {
8
- constructor(t, n) {
9
- super(`${t.length}${n ? "+" : ""} errors, first error: ` + t[0]), this.errors = t, this.moreErrors = n;
6
+ import { z as P } from "zod";
7
+ class be extends Error {
8
+ constructor(e, n) {
9
+ super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0]), this.errors = e, this.moreErrors = n;
10
10
  }
11
11
  }
12
- function _t(e) {
13
- if (!e.ok) throw new bt(e.errors, e.moreErrors);
14
- return e.value;
12
+ function _e(t) {
13
+ if (!t.ok) throw new be(t.errors, t.moreErrors);
14
+ return t.value;
15
15
  }
16
- function Bt(e) {
17
- return new Proxy(e, {
18
- get(t, n) {
19
- return _t(t[n]);
16
+ function Be(t) {
17
+ return new Proxy(t, {
18
+ get(e, n) {
19
+ return _e(e[n]);
20
20
  }
21
21
  });
22
22
  }
23
- function d(e) {
24
- return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null ? D(e) : e;
23
+ function f(t) {
24
+ return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? L(t) : t;
25
25
  }
26
- function R(e) {
27
- return { type: "GetFromCtx", variable: e };
26
+ function T(t) {
27
+ return { type: "GetFromCtx", variable: t };
28
28
  }
29
- function Mt(e) {
29
+ function Me(t) {
30
30
  return {
31
31
  type: "Isolate",
32
- cfg: e
32
+ cfg: t
33
33
  };
34
34
  }
35
- const Ut = R("$args"), Jt = R("$it"), $t = R("$prod"), Kt = R("$staging"), Gt = R("$ui");
36
- function D(e) {
37
- return { type: "Immediate", value: e };
35
+ const Ue = T("$args"), Je = T("$it"), $e = T("$prod"), Ke = T("$staging"), Ge = T("$ui");
36
+ function L(t) {
37
+ return { type: "Immediate", value: t };
38
38
  }
39
- function rt(e) {
40
- const t = {};
41
- for (const [n, r] of Object.entries(e)) t[n] = d(r);
39
+ function se(t) {
40
+ const e = {};
41
+ for (const [n, s] of Object.entries(t)) e[n] = f(s);
42
42
  return {
43
43
  type: "MakeObject",
44
- template: t
44
+ template: e
45
45
  };
46
46
  }
47
- function Ht(...e) {
48
- const t = [];
49
- for (const n of e) t.push(d(n));
47
+ function He(...t) {
48
+ const e = [];
49
+ for (const n of t) e.push(f(n));
50
50
  return {
51
51
  type: "MakeArray",
52
- template: t
52
+ template: e
53
53
  };
54
54
  }
55
- function x(e, t) {
55
+ function E(t, e) {
56
56
  return {
57
57
  type: "GetJsonField",
58
- source: d(e),
59
- field: d(t)
58
+ source: f(t),
59
+ field: f(e)
60
60
  };
61
61
  }
62
- function Wt(e, t, n = "$it") {
62
+ function We(t, e, n = "$it") {
63
63
  return {
64
64
  type: "MapRecordValues",
65
- source: e,
66
- mapping: t,
65
+ source: t,
66
+ mapping: e,
67
67
  itVar: n
68
68
  };
69
69
  }
70
- function qt(e, t, n = "$it") {
70
+ function qe(t, e, n = "$it") {
71
71
  return {
72
72
  type: "MapArrayValues",
73
- source: e,
74
- mapping: t,
73
+ source: t,
74
+ mapping: e,
75
75
  itVar: n
76
76
  };
77
77
  }
78
- function zt(e) {
78
+ function ze(t) {
79
79
  return {
80
80
  type: "Flatten",
81
- source: e
81
+ source: t
82
82
  };
83
83
  }
84
- function Yt(e) {
84
+ function Ye(t) {
85
85
  return {
86
86
  type: "IsEmpty",
87
- arg: e
87
+ arg: t
88
88
  };
89
89
  }
90
- function Xt(e) {
90
+ function Xe(t) {
91
91
  return {
92
92
  type: "Not",
93
- operand: e
93
+ operand: t
94
94
  };
95
95
  }
96
- function Qt(e, t) {
96
+ function Qe(t, e) {
97
97
  return {
98
98
  type: "And",
99
- operand1: e,
100
- operand2: t
99
+ operand1: t,
100
+ operand2: e
101
101
  };
102
102
  }
103
- function Zt(e, t) {
103
+ function Ze(t, e) {
104
104
  return {
105
105
  type: "Or",
106
- operand1: e,
107
- operand2: t
106
+ operand1: t,
107
+ operand2: e
108
108
  };
109
109
  }
110
- function te(e, t) {
110
+ function et(t, e) {
111
111
  return {
112
112
  type: "GetResourceField",
113
- source: d(e),
114
- field: d(t)
113
+ source: f(t),
114
+ field: f(e)
115
115
  };
116
116
  }
117
- function ee() {
118
- return function(e) {
117
+ function tt() {
118
+ return function(t) {
119
119
  return {
120
120
  type: "GetResourceValueAsJson",
121
- source: d(e)
121
+ source: f(t)
122
122
  };
123
123
  };
124
124
  }
125
- function ne(e, t, n = "$it") {
125
+ function nt(t, e, n = "$it") {
126
126
  return {
127
127
  type: "MapResourceFields",
128
- source: e,
129
- mapping: t,
128
+ source: t,
129
+ mapping: e,
130
130
  itVar: n
131
131
  };
132
132
  }
133
- function re(e) {
133
+ function st(t) {
134
134
  return {
135
135
  type: "GetBlobContent",
136
- source: d(e)
136
+ source: f(t)
137
137
  };
138
138
  }
139
- function se(e) {
139
+ function it(t) {
140
140
  return {
141
141
  type: "GetBlobContentAsString",
142
- source: d(e)
142
+ source: f(t)
143
143
  };
144
144
  }
145
- function ie() {
146
- return function(e) {
145
+ function rt() {
146
+ return function(t) {
147
147
  return {
148
148
  type: "GetBlobContentAsJson",
149
- source: d(e)
149
+ source: f(t)
150
150
  };
151
151
  };
152
152
  }
153
- function oe(e) {
153
+ function ot(t) {
154
154
  return {
155
155
  type: "GetDownloadedBlobContent",
156
- source: d(e)
156
+ source: f(t)
157
157
  };
158
158
  }
159
- function ae(e) {
159
+ function at(t) {
160
160
  return {
161
161
  type: "GetOnDemandBlobContent",
162
- source: d(e)
162
+ source: f(t)
163
163
  };
164
164
  }
165
- function le(e) {
165
+ function lt(t) {
166
166
  return {
167
167
  type: "GetImportProgress",
168
- source: d(e)
168
+ source: f(t)
169
169
  };
170
170
  }
171
- function ue(e, t) {
171
+ function ut(t, e) {
172
172
  return {
173
173
  type: "GetLastLogs",
174
- source: d(e),
175
- lines: t
174
+ source: f(t),
175
+ lines: e
176
176
  };
177
177
  }
178
- function ce(e, t) {
178
+ function ct(t, e) {
179
179
  return {
180
180
  type: "GetProgressLog",
181
- source: d(e),
182
- patternToSearch: t
181
+ source: f(t),
182
+ patternToSearch: e
183
183
  };
184
184
  }
185
- function pe(e) {
185
+ function dt(t) {
186
186
  return {
187
187
  type: "GetLogHandle",
188
- source: d(e)
188
+ source: f(t)
189
189
  };
190
190
  }
191
- function vt() {
191
+ function ve() {
192
192
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
193
193
  }
194
- function st(e) {
195
- if (e && typeof globalThis.getPlatforma == "function")
196
- return globalThis.getPlatforma(e);
194
+ function ie(t) {
195
+ if (t && typeof globalThis.getPlatforma == "function")
196
+ return globalThis.getPlatforma(t);
197
197
  if (typeof globalThis.platforma < "u") return globalThis.platforma;
198
198
  throw new Error("Can't get platforma instance.");
199
199
  }
200
- function wt() {
200
+ function we() {
201
201
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
202
202
  }
203
203
  function u() {
204
204
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
205
205
  throw new Error("Not in config rendering context");
206
206
  }
207
- function O(e, t) {
208
- const n = wt();
207
+ function k(t, e) {
208
+ const n = we();
209
209
  if (n === void 0) return !1;
210
- if (e in n.callbackRegistry) throw new Error(`Callback with key ${e} already registered.`);
211
- return n.callbackRegistry[e] = t, !0;
210
+ if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
211
+ return n.callbackRegistry[t] = e, !0;
212
212
  }
213
213
  const N = /* @__PURE__ */ new Map();
214
- function St(e, t) {
215
- e in u().callbackRegistry || (u().callbackRegistry[e] = (n) => {
216
- for (const r of N.get(e))
217
- r(n);
218
- }, N.set(e, [])), N.get(e).push(t);
214
+ function Se(t, e) {
215
+ t in u().callbackRegistry || (u().callbackRegistry[t] = (n) => {
216
+ for (const s of N.get(t))
217
+ s(n);
218
+ }, N.set(t, [])), N.get(t).push(e);
219
219
  }
220
- class g {
221
- constructor(t, n = (r) => r) {
222
- w(this, "isResolved", !1);
223
- w(this, "resolvedValue");
224
- this.handle = t, this.postProcess = n, St(t, (r) => {
225
- this.resolvedValue = n(r), this.isResolved = !0;
220
+ class _ {
221
+ constructor(e, n = (s) => s) {
222
+ S(this, "isResolved", !1);
223
+ S(this, "resolvedValue");
224
+ this.handle = e, this.postProcess = n, Se(e, (s) => {
225
+ this.resolvedValue = n(s), this.isResolved = !0;
226
226
  });
227
227
  }
228
- map(t) {
229
- return new g(this.handle, (n) => t(this.postProcess(n)));
228
+ map(e) {
229
+ return new _(this.handle, (n) => e(this.postProcess(n)));
230
230
  }
231
- mapDefined(t) {
232
- return new g(this.handle, (n) => {
233
- const r = this.postProcess(n);
234
- return r ? t(r) : void 0;
231
+ mapDefined(e) {
232
+ return new _(this.handle, (n) => {
233
+ const s = this.postProcess(n);
234
+ return s ? e(s) : void 0;
235
235
  });
236
236
  }
237
237
  toJSON() {
238
238
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
239
239
  }
240
240
  }
241
- function Q(e) {
242
- return e === void 0 ? void 0 : new _(e);
241
+ function Q(t) {
242
+ return t === void 0 ? void 0 : new v(t);
243
243
  }
244
- class _ {
245
- constructor(t) {
246
- this.handle = t;
244
+ class v {
245
+ constructor(e) {
246
+ this.handle = e;
247
247
  }
248
- resolve(...t) {
249
- const n = t.map(
250
- (r) => ({
248
+ resolve(...e) {
249
+ const n = e.map(
250
+ (s) => ({
251
251
  assertFieldType: "Input",
252
- ...typeof r == "string" ? { field: r } : r
252
+ ...typeof s == "string" ? { field: s } : s
253
253
  })
254
254
  );
255
255
  return this.resolveWithCommon({}, ...n);
256
256
  }
257
- resolveOutput(...t) {
258
- const n = t.map(
259
- (r) => ({
257
+ resolveOutput(...e) {
258
+ const n = e.map(
259
+ (s) => ({
260
260
  assertFieldType: "Output",
261
- ...typeof r == "string" ? { field: r } : r
261
+ ...typeof s == "string" ? { field: s } : s
262
262
  })
263
263
  );
264
264
  return this.resolveWithCommon({}, ...n);
265
265
  }
266
- resolveInput(...t) {
267
- const n = t.map(
268
- (r) => ({
266
+ resolveInput(...e) {
267
+ const n = e.map(
268
+ (s) => ({
269
269
  assertFieldType: "Input",
270
- ...typeof r == "string" ? { field: r } : r
270
+ ...typeof s == "string" ? { field: s } : s
271
271
  })
272
272
  );
273
273
  return this.resolveWithCommon({}, ...n);
274
274
  }
275
- resolveAny(...t) {
276
- return this.resolveWithCommon({}, ...t);
275
+ resolveAny(...e) {
276
+ return this.resolveWithCommon({}, ...e);
277
277
  }
278
- resolveWithCommon(t, ...n) {
279
- return Q(u().resolveWithCommon(this.handle, t, ...n));
278
+ resolveWithCommon(e, ...n) {
279
+ return Q(u().resolveWithCommon(this.handle, e, ...n));
280
280
  }
281
281
  get resourceType() {
282
282
  return u().getResourceType(this.handle);
@@ -305,14 +305,14 @@ class _ {
305
305
  listDynamicFields() {
306
306
  return u().listDynamicFields(this.handle);
307
307
  }
308
- getKeyValueBase64(t) {
309
- return u().getKeyValueBase64(this.handle, t);
308
+ getKeyValueBase64(e) {
309
+ return u().getKeyValueBase64(this.handle, e);
310
310
  }
311
- getKeyValueAsString(t) {
312
- return u().getKeyValueAsString(this.handle, t);
311
+ getKeyValueAsString(e) {
312
+ return u().getKeyValueAsString(this.handle, e);
313
313
  }
314
- getKeyValueAsJson(t) {
315
- const n = this.getKeyValueAsString(t);
314
+ getKeyValueAsJson(e) {
315
+ const n = this.getKeyValueAsString(e);
316
316
  if (n == null) throw new Error("Resource has no content.");
317
317
  return JSON.parse(n);
318
318
  }
@@ -323,45 +323,45 @@ class _ {
323
323
  return u().getDataAsString(this.handle);
324
324
  }
325
325
  getDataAsJson() {
326
- const t = this.getDataAsString();
327
- if (t == null) throw new Error("Resource has no content.");
328
- return JSON.parse(t);
326
+ const e = this.getDataAsString();
327
+ if (e == null) throw new Error("Resource has no content.");
328
+ return JSON.parse(e);
329
329
  }
330
330
  /**
331
331
  *
332
332
  */
333
- getPColumns(t = !1, n = "") {
334
- const r = this.parsePObjectCollection(t, n);
335
- return r === void 0 ? void 0 : Object.entries(r).map(([, i]) => {
336
- if (!H(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
337
- return i;
333
+ getPColumns(e = !1, n = "") {
334
+ const s = this.parsePObjectCollection(e, n);
335
+ return s === void 0 ? void 0 : Object.entries(s).map(([, r]) => {
336
+ if (!H(r)) throw new Error(`not a PColumn (kind = ${r.spec.kind})`);
337
+ return r;
338
338
  });
339
339
  }
340
340
  /**
341
341
  *
342
342
  */
343
- parsePObjectCollection(t = !1, n = "") {
344
- const r = u().parsePObjectCollection(
343
+ parsePObjectCollection(e = !1, n = "") {
344
+ const s = u().parsePObjectCollection(
345
345
  this.handle,
346
- t,
346
+ e,
347
347
  n
348
348
  );
349
- if (r === void 0) return;
350
- const s = {};
351
- for (const [i, o] of Object.entries(r))
352
- s[i] = L(o, (l) => new _(l));
353
- return s;
349
+ if (s === void 0) return;
350
+ const i = {};
351
+ for (const [r, o] of Object.entries(s))
352
+ i[r] = x(o, (l) => new v(l));
353
+ return i;
354
354
  }
355
355
  getFileContentAsBase64() {
356
- return new g(u().getBlobContentAsBase64(this.handle));
356
+ return new _(u().getBlobContentAsBase64(this.handle));
357
357
  }
358
358
  getFileContentAsString() {
359
- return new g(u().getBlobContentAsString(this.handle));
359
+ return new _(u().getBlobContentAsString(this.handle));
360
360
  }
361
361
  getFileContentAsJson() {
362
- return new g(
362
+ return new _(
363
363
  u().getBlobContentAsString(this.handle)
364
- ).mapDefined((t) => JSON.parse(t));
364
+ ).mapDefined((e) => JSON.parse(e));
365
365
  }
366
366
  /**
367
367
  * @deprecated use getFileContentAsBase64
@@ -379,7 +379,7 @@ class _ {
379
379
  * @returns downloaded file handle
380
380
  */
381
381
  getFileHandle() {
382
- return new g(u().getDownloadedBlobContentHandle(this.handle));
382
+ return new _(u().getDownloadedBlobContentHandle(this.handle));
383
383
  }
384
384
  /**
385
385
  * @deprecated use getFileHandle
@@ -391,7 +391,7 @@ class _ {
391
391
  * @returns downloaded file handle
392
392
  */
393
393
  getRemoteFileHandle() {
394
- return new g(u().getOnDemandBlobContentHandle(this.handle));
394
+ return new _(u().getOnDemandBlobContentHandle(this.handle));
395
395
  }
396
396
  /**
397
397
  * @deprecated use getRemoteFileHandle
@@ -400,19 +400,19 @@ class _ {
400
400
  return this.getRemoteFileHandle();
401
401
  }
402
402
  getImportProgress() {
403
- return new g(u().getImportProgress(this.handle));
403
+ return new _(u().getImportProgress(this.handle));
404
404
  }
405
- getLastLogs(t) {
406
- return new g(u().getLastLogs(this.handle, t));
405
+ getLastLogs(e) {
406
+ return new _(u().getLastLogs(this.handle, e));
407
407
  }
408
- getProgressLog(t) {
409
- return new g(u().getProgressLog(this.handle, t));
408
+ getProgressLog(e) {
409
+ return new _(u().getProgressLog(this.handle, e));
410
410
  }
411
411
  getLogHandle() {
412
- return new g(u().getLogHandle(this.handle));
412
+ return new _(u().getLogHandle(this.handle));
413
413
  }
414
- allFieldsResolved(t = "Input") {
415
- switch (t) {
414
+ allFieldsResolved(e = "Input") {
415
+ switch (e) {
416
416
  case "Input":
417
417
  return this.getInputsLocked() && this.listInputFields().every(
418
418
  (n) => this.resolve({ field: n, assertFieldType: "Input" }) !== void 0
@@ -423,130 +423,130 @@ class _ {
423
423
  );
424
424
  }
425
425
  }
426
- mapFields(t, n) {
427
- const { fieldType: r, requireLocked: s, skipUnresolved: i } = {
426
+ mapFields(e, n) {
427
+ const { fieldType: s, requireLocked: i, skipUnresolved: r } = {
428
428
  fieldType: "Input",
429
429
  requireLocked: !0,
430
430
  skipUnresolved: !1,
431
431
  ...n
432
- }, o = t;
433
- if (s && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
432
+ }, o = e;
433
+ if (i && (s === "Input" && !this.getInputsLocked() || s === "Output" && !this.getOutputsLocked()))
434
434
  return;
435
- let a = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
436
- (c) => [c, this.resolve({ field: c, assertFieldType: r })]
435
+ let d = (s === "Input" ? this.listInputFields() : s === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
436
+ (a) => [a, this.resolve({ field: a, assertFieldType: s })]
437
437
  );
438
- return i && (a = a.filter((c) => c[1] !== void 0)), a.map(([c, f]) => o(c, f));
438
+ return r && (d = d.filter((a) => a[1] !== void 0)), d.map(([a, p]) => o(a, p));
439
439
  }
440
440
  }
441
- const it = "staging", ot = "main", Ct = {
441
+ const re = "staging", oe = "main", Ae = {
442
442
  inlineColumnsSupport: !0
443
443
  };
444
- function at(e) {
445
- return typeof e == "object" && e !== null && "__awaited_futures__" in e;
444
+ function ae(t) {
445
+ return typeof t == "object" && t !== null && "__awaited_futures__" in t;
446
446
  }
447
- function J(e, t, n) {
448
- if (t.has(n)) return;
449
- if (t.add(n), typeof n === "object")
450
- if (at(n)) n.__awaited_futures__.forEach((s) => e.add(s));
447
+ function J(t, e, n) {
448
+ if (e.has(n)) return;
449
+ if (e.add(n), typeof n === "object")
450
+ if (ae(n)) n.__awaited_futures__.forEach((i) => t.add(i));
451
451
  else if (Array.isArray(n))
452
- for (const s of n) J(e, t, s);
452
+ for (const i of n) J(t, e, i);
453
453
  else
454
- for (const [, s] of Object.entries(n))
455
- s !== n && J(e, t, s);
454
+ for (const [, i] of Object.entries(n))
455
+ i !== n && J(t, e, i);
456
456
  }
457
- function At(e) {
458
- const t = /* @__PURE__ */ new Set();
459
- return J(t, /* @__PURE__ */ new Set(), e), t;
457
+ function Ce(t) {
458
+ const e = /* @__PURE__ */ new Set();
459
+ return J(e, /* @__PURE__ */ new Set(), t), e;
460
460
  }
461
- const de = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
461
+ const pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
462
462
  __proto__: null,
463
- GlobalCfgRenderCtxFeatureFlags: Ct,
464
- MainAccessorName: ot,
465
- StagingAccessorName: it,
466
- getAllFutureAwaits: At,
467
- isFutureAwait: at
468
- }, Symbol.toStringTag, { value: "Module" })), It = "pl7.app/label", Pt = "pl7.app/trace", Rt = A.object({
469
- type: A.string(),
470
- importance: A.number().optional(),
471
- id: A.string().optional(),
472
- label: A.string()
473
- }), Ft = A.array(Rt), Tt = 1e-3, Ot = "__LABEL__", Z = "__LABEL__@1";
474
- function kt(e, t, n = {}) {
475
- const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i = e.map((p) => {
463
+ GlobalCfgRenderCtxFeatureFlags: Ae,
464
+ MainAccessorName: oe,
465
+ StagingAccessorName: re,
466
+ getAllFutureAwaits: Ce,
467
+ isFutureAwait: ae
468
+ }, Symbol.toStringTag, { value: "Module" })), Ie = "pl7.app/label", Pe = "pl7.app/trace", Re = P.object({
469
+ type: P.string(),
470
+ importance: P.number().optional(),
471
+ id: P.string().optional(),
472
+ label: P.string()
473
+ }), Fe = P.array(Re), Te = 1e-3, Oe = "__LABEL__", Z = "__LABEL__@1";
474
+ function ke(t, e, n = {}) {
475
+ const s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), r = t.map((c) => {
476
476
  var q, z;
477
- const m = t(p), y = (q = m.annotations) == null ? void 0 : q[It], T = (z = m.annotations) == null ? void 0 : z[Pt], b = (T ? Ft.safeParse(JSON.parse(T)).data : void 0) ?? [];
478
- if (y) {
479
- const v = { label: y, type: Ot, importance: -2 };
480
- n.addLabelAsSuffix ? b.push(v) : b.splice(0, 0, v);
477
+ const m = e(c), h = (q = m.annotations) == null ? void 0 : q[Ie], A = (z = m.annotations) == null ? void 0 : z[Pe], y = (A ? Fe.safeParse(JSON.parse(A)).data : void 0) ?? [];
478
+ if (h) {
479
+ const w = { label: h, type: Oe, importance: -2 };
480
+ n.addLabelAsSuffix ? y.push(w) : y.splice(0, 0, w);
481
481
  }
482
- const E = [], W = /* @__PURE__ */ new Map();
483
- for (let v = b.length - 1; v >= 0; --v) {
484
- const { type: V } = b[v], ct = b[v].importance ?? 0, j = (W.get(V) ?? 0) + 1;
482
+ const C = [], W = /* @__PURE__ */ new Map();
483
+ for (let w = y.length - 1; w >= 0; --w) {
484
+ const { type: V } = y[w], ce = y[w].importance ?? 0, j = (W.get(V) ?? 0) + 1;
485
485
  W.set(V, j);
486
- const I = `${V}@${j}`;
487
- s.set(I, (s.get(I) ?? 0) + 1), r.set(
488
- I,
486
+ const R = `${V}@${j}`;
487
+ i.set(R, (i.get(R) ?? 0) + 1), s.set(
488
+ R,
489
489
  Math.max(
490
- r.get(I) ?? Number.NEGATIVE_INFINITY,
491
- ct - (b.length - v) * Tt
490
+ s.get(R) ?? Number.NEGATIVE_INFINITY,
491
+ ce - (y.length - w) * Te
492
492
  )
493
- ), E.push({ ...b[v], fullType: I, occurenceIndex: j });
493
+ ), C.push({ ...y[w], fullType: R, occurenceIndex: j });
494
494
  }
495
- return E.reverse(), {
496
- value: p,
495
+ return C.reverse(), {
496
+ value: c,
497
497
  spec: m,
498
- label: y,
499
- fullTrace: E
498
+ label: h,
499
+ fullTrace: C
500
500
  };
501
- }), o = [], l = [], a = [...r];
502
- a.sort(([, p], [, m]) => m - p);
503
- for (const [p] of a)
504
- p.endsWith("@1") || s.get(p) === e.length ? o.push(p) : l.push(p);
505
- const c = (p) => i.map((m) => {
506
- const y = m.fullTrace.filter((b) => p.has(b.fullType)).map((b) => b.label), T = n.separator ?? " / ";
501
+ }), o = [], l = [], d = [...s];
502
+ d.sort(([, c], [, m]) => m - c);
503
+ for (const [c] of d)
504
+ c.endsWith("@1") || i.get(c) === t.length ? o.push(c) : l.push(c);
505
+ const a = (c) => r.map((m) => {
506
+ const h = m.fullTrace.filter((y) => c.has(y.fullType)).map((y) => y.label), A = n.separator ?? " / ";
507
507
  return {
508
- label: y.join(T),
508
+ label: h.join(A),
509
509
  value: m.value
510
510
  };
511
511
  });
512
512
  if (o.length === 0) {
513
513
  if (l.length !== 0) throw new Error("Assertion error.");
514
- return c(new Set(Z));
515
- }
516
- let f = 0, S = 0;
517
- for (; f < o.length; ) {
518
- const p = /* @__PURE__ */ new Set();
519
- n.includeNativeLabel && p.add(Z);
520
- for (let y = 0; y < f; ++y) p.add(o[y]);
521
- p.add(o[S]);
522
- const m = c(p);
523
- if (new Set(m.map((y) => y.label)).size === e.length) return m;
524
- S++, S == o.length && (f++, S = f);
525
- }
526
- return c(/* @__PURE__ */ new Set([...o, ...l]));
514
+ return a(new Set(Z));
515
+ }
516
+ let p = 0, g = 0;
517
+ for (; p < o.length; ) {
518
+ const c = /* @__PURE__ */ new Set();
519
+ n.includeNativeLabel && c.add(Z);
520
+ for (let h = 0; h < p; ++h) c.add(o[h]);
521
+ c.add(o[g]);
522
+ const m = a(c);
523
+ if (new Set(m.map((h) => h.label)).size === t.length) return m;
524
+ g++, g == o.length && (p++, g = p);
525
+ }
526
+ return a(/* @__PURE__ */ new Set([...o, ...l]));
527
527
  }
528
- class Dt {
528
+ class De {
529
529
  constructor() {
530
- w(this, "ctx", u());
531
- w(this, "defaultLabelFn", (t, n) => {
532
- var r;
533
- return ((r = t.annotations) == null ? void 0 : r["pl7.app/label"]) ?? "Unlabelled";
530
+ S(this, "ctx", u());
531
+ S(this, "defaultLabelFn", (e, n) => {
532
+ var s;
533
+ return ((s = e.annotations) == null ? void 0 : s["pl7.app/label"]) ?? "Unlabelled";
534
534
  });
535
535
  }
536
536
  /**
537
537
  * @deprecated use getOptions()
538
538
  */
539
- calculateOptions(t) {
540
- return this.ctx.calculateOptions(t);
541
- }
542
- getOptions(t, n) {
543
- const r = this.getSpecs().entries.filter((s) => t(s.obj));
544
- return typeof n == "object" || typeof n > "u" ? kt(r, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: i }) => ({
545
- ref: s,
546
- label: i
547
- })) : r.map((s) => ({
548
- ref: s.ref,
549
- label: n(s.obj, s.ref)
539
+ calculateOptions(e) {
540
+ return this.ctx.calculateOptions(e);
541
+ }
542
+ getOptions(e, n) {
543
+ const s = this.getSpecs().entries.filter((i) => e(i.obj));
544
+ return typeof n == "object" || typeof n > "u" ? ke(s, (i) => i.obj, n ?? {}).map(({ value: { ref: i }, label: r }) => ({
545
+ ref: i,
546
+ label: r
547
+ })) : s.map((i) => ({
548
+ ref: i.ref,
549
+ label: n(i.obj, i.ref)
550
550
  }));
551
551
  }
552
552
  /**
@@ -556,14 +556,14 @@ class Dt {
556
556
  return this.getData();
557
557
  }
558
558
  getData() {
559
- const t = this.ctx.getDataFromResultPool();
559
+ const e = this.ctx.getDataFromResultPool();
560
560
  return {
561
- isComplete: t.isComplete,
562
- entries: t.entries.map((n) => ({
561
+ isComplete: e.isComplete,
562
+ entries: e.entries.map((n) => ({
563
563
  ref: n.ref,
564
564
  obj: {
565
565
  ...n.obj,
566
- data: new _(n.obj.data)
566
+ data: new v(n.obj.data)
567
567
  }
568
568
  }))
569
569
  };
@@ -575,14 +575,14 @@ class Dt {
575
575
  return this.getDataWithErrors();
576
576
  }
577
577
  getDataWithErrors() {
578
- const t = this.ctx.getDataWithErrorsFromResultPool();
578
+ const e = this.ctx.getDataWithErrorsFromResultPool();
579
579
  return {
580
- isComplete: t.isComplete,
581
- entries: t.entries.map((n) => ({
580
+ isComplete: e.isComplete,
581
+ entries: e.entries.map((n) => ({
582
582
  ref: n.ref,
583
583
  obj: {
584
584
  ...n.obj,
585
- data: ft(n.obj.data, (r) => new _(r))
585
+ data: fe(n.obj.data, (s) => new v(s))
586
586
  }
587
587
  }))
588
588
  };
@@ -600,13 +600,13 @@ class Dt {
600
600
  * @param ref a Ref
601
601
  * @returns data associated with the ref
602
602
  */
603
- getDataByRef(t) {
603
+ getDataByRef(e) {
604
604
  var n;
605
605
  return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (n = this.getData().entries.find(
606
- (r) => r.ref.blockId === t.blockId && r.ref.name === t.name
607
- )) == null ? void 0 : n.obj : L(
608
- this.ctx.getDataFromResultPoolByRef(t.blockId, t.name),
609
- (r) => new _(r)
606
+ (s) => s.ref.blockId === e.blockId && s.ref.name === e.name
607
+ )) == null ? void 0 : n.obj : x(
608
+ this.ctx.getDataFromResultPoolByRef(e.blockId, e.name),
609
+ (s) => new v(s)
610
610
  );
611
611
  }
612
612
  /**
@@ -614,18 +614,18 @@ class Dt {
614
614
  * @param ref a Ref
615
615
  * @returns p-column associated with the ref
616
616
  */
617
- getPColumnByRef(t) {
618
- const n = this.getDataByRef(t);
617
+ getPColumnByRef(e) {
618
+ const n = this.getDataByRef(e);
619
619
  if (n)
620
- return ht(n);
620
+ return he(n);
621
621
  }
622
622
  /**
623
623
  * Returns spec associated with the ref ensuring that it is a p-column spec.
624
624
  * @param ref a Ref
625
625
  * @returns p-column spec associated with the ref
626
626
  */
627
- getPColumnSpecByRef(t) {
628
- const n = this.getSpecByRef(t);
627
+ getPColumnSpecByRef(e) {
628
+ const n = this.getSpecByRef(e);
629
629
  if (n) {
630
630
  if (!Y(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
631
631
  return n;
@@ -635,56 +635,56 @@ class Dt {
635
635
  * @param ref a Ref
636
636
  * @returns object spec associated with the ref
637
637
  */
638
- getSpecByRef(t) {
638
+ getSpecByRef(e) {
639
639
  var n;
640
640
  return typeof this.ctx.getSpecFromResultPoolByRef > "u" ? (n = this.getSpecs().entries.find(
641
- (r) => r.ref.blockId === t.blockId && r.ref.name === t.name
642
- )) == null ? void 0 : n.obj : this.ctx.getSpecFromResultPoolByRef(t.blockId, t.name);
641
+ (s) => s.ref.blockId === e.blockId && s.ref.name === e.name
642
+ )) == null ? void 0 : n.obj : this.ctx.getSpecFromResultPoolByRef(e.blockId, e.name);
643
643
  }
644
644
  /**
645
645
  * @param spec object specification
646
646
  * @returns array of data objects with compatible specs
647
647
  * @deprecated delete this method after Jan 1, 2025
648
648
  */
649
- findDataWithCompatibleSpec(t) {
649
+ findDataWithCompatibleSpec(e) {
650
650
  const n = [];
651
- t: for (const r of this.getData().entries) {
652
- if (!Y(r.obj.spec))
651
+ e: for (const s of this.getData().entries) {
652
+ if (!Y(s.obj.spec))
653
653
  continue;
654
- const s = r.obj.spec;
655
- if (t.name === s.name && t.valueType === s.valueType && t.axesSpec.length === s.axesSpec.length && $(t.domain, s.domain)) {
656
- for (let i = 0; i < t.axesSpec.length; ++i) {
657
- const o = t.axesSpec[i], l = s.axesSpec[i];
654
+ const i = s.obj.spec;
655
+ if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && $(e.domain, i.domain)) {
656
+ for (let r = 0; r < e.axesSpec.length; ++r) {
657
+ const o = e.axesSpec[r], l = i.axesSpec[r];
658
658
  if (o.name !== l.name || o.type !== l.type || !$(o.domain, l.domain))
659
- continue t;
659
+ continue e;
660
660
  }
661
- n.push(r.obj);
661
+ n.push(s.obj);
662
662
  }
663
663
  }
664
664
  return n;
665
665
  }
666
666
  }
667
- function $(e, t) {
668
- if (e === void 0) return t === void 0;
669
- if (t === void 0) return !0;
670
- for (const n in t)
671
- if (e[n] !== t[n]) return !1;
667
+ function $(t, e) {
668
+ if (t === void 0) return e === void 0;
669
+ if (e === void 0) return !0;
670
+ for (const n in e)
671
+ if (t[n] !== e[n]) return !1;
672
672
  return !0;
673
673
  }
674
- class k {
674
+ class D {
675
675
  constructor() {
676
- w(this, "ctx");
677
- w(this, "args");
678
- w(this, "uiState");
679
- w(this, "resultPool", new Dt());
676
+ S(this, "ctx");
677
+ S(this, "args");
678
+ S(this, "uiState");
679
+ S(this, "resultPool", new De());
680
680
  this.ctx = u(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : void 0;
681
681
  }
682
- getNamedAccessor(t) {
683
- const n = this.ctx.getAccessorHandleByName(t);
684
- return n ? new _(n) : void 0;
682
+ getNamedAccessor(e) {
683
+ const n = this.ctx.getAccessorHandleByName(e);
684
+ return n ? new v(n) : void 0;
685
685
  }
686
686
  get prerun() {
687
- return this.getNamedAccessor(it);
687
+ return this.getNamedAccessor(re);
688
688
  }
689
689
  /**
690
690
  * @deprecated use prerun
@@ -699,7 +699,7 @@ class k {
699
699
  return this.precalc;
700
700
  }
701
701
  get outputs() {
702
- return this.getNamedAccessor(ot);
702
+ return this.getNamedAccessor(oe);
703
703
  }
704
704
  /**
705
705
  * @deprecated use outputs
@@ -711,275 +711,275 @@ class k {
711
711
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
712
712
  * @returns a map of axis value => label
713
713
  */
714
- findLabels(t) {
714
+ findLabels(e) {
715
715
  const n = this.resultPool.getData();
716
- for (const r of n.entries) {
717
- if (!H(r.obj)) continue;
718
- const s = r.obj.spec;
719
- if (s.name === "pl7.app/label" && s.axesSpec.length === 1 && s.axesSpec[0].name === t.name && s.axesSpec[0].type === t.type && $(t.domain, s.axesSpec[0].domain)) {
720
- if (r.obj.data.resourceType.name !== "PColumnData/Json")
721
- throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
716
+ for (const s of n.entries) {
717
+ if (!H(s.obj)) continue;
718
+ const i = s.obj.spec;
719
+ if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && $(e.domain, i.axesSpec[0].domain)) {
720
+ if (s.obj.data.resourceType.name !== "PColumnData/Json")
721
+ throw Error(`Expected JSON column for labels, got: ${s.obj.data.resourceType.name}`);
722
722
  return Object.fromEntries(
723
723
  Object.entries(
724
- r.obj.data.getDataAsJson().data
724
+ s.obj.data.getDataAsJson().data
725
725
  ).map((o) => [JSON.parse(o[0])[0], o[1]])
726
726
  );
727
727
  }
728
728
  }
729
729
  }
730
- verifyInlineColumnsSupport(t) {
731
- var s;
732
- const n = t.some((i) => !(i.data instanceof _)), r = ((s = this.ctx.featureFlags) == null ? void 0 : s.inlineColumnsSupport) === !0;
733
- if (n && !r) throw Error("inline columns not supported");
730
+ verifyInlineColumnsSupport(e) {
731
+ var i;
732
+ const n = e.some((r) => !(r.data instanceof v)), s = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
733
+ if (n && !s) throw Error("inline columns not supported");
734
734
  }
735
- createPFrame(t) {
736
- return this.verifyInlineColumnsSupport(t), this.ctx.createPFrame(t.map((n) => L(
735
+ createPFrame(e) {
736
+ return this.verifyInlineColumnsSupport(e), this.ctx.createPFrame(e.map((n) => x(
737
737
  n,
738
- (r) => r instanceof _ ? r.handle : r
738
+ (s) => s instanceof v ? s.handle : s
739
739
  )));
740
740
  }
741
- createPTable(t) {
741
+ createPTable(e) {
742
742
  var n;
743
- return "columns" in t ? n = {
743
+ return "columns" in e ? n = {
744
744
  src: {
745
745
  type: "full",
746
- entries: t.columns.map((r) => ({ type: "column", column: r }))
746
+ entries: e.columns.map((s) => ({ type: "column", column: s }))
747
747
  },
748
- filters: t.filters ?? [],
749
- sorting: t.sorting ?? []
750
- } : n = t, this.verifyInlineColumnsSupport(gt(n.src)), this.ctx.createPTable(mt(n, (r) => L(
751
- r,
752
- (s) => s instanceof _ ? s.handle : s
748
+ filters: e.filters ?? [],
749
+ sorting: e.sorting ?? []
750
+ } : n = e, this.verifyInlineColumnsSupport(ge(n.src)), this.ctx.createPTable(me(n, (s) => x(
751
+ s,
752
+ (i) => i instanceof v ? i.handle : i
753
753
  )));
754
754
  }
755
755
  /** @deprecated scheduled for removal from SDK */
756
- getBlockLabel(t) {
757
- return this.ctx.getBlockLabel(t);
756
+ getBlockLabel(e) {
757
+ return this.ctx.getBlockLabel(e);
758
758
  }
759
759
  getCurrentUnstableMarker() {
760
760
  if (!(typeof this.ctx.getCurrentUnstableMarker > "u"))
761
761
  return this.ctx.getCurrentUnstableMarker();
762
762
  }
763
763
  }
764
- const F = "PColumnData/", K = F + "ResourceMap", G = F + "Partitioned/ResourceMap", tt = F + "JsonPartitioned", B = F + "BinaryPartitioned", lt = F + "Partitioned/", et = lt + "JsonPartitioned", M = lt + "BinaryPartitioned";
765
- function ut(e, t, n, r = [], s) {
766
- if (e === void 0) return !1;
767
- switch (e.resourceType.name) {
764
+ const O = "PColumnData/", K = O + "ResourceMap", G = O + "Partitioned/ResourceMap", ee = O + "JsonPartitioned", B = O + "BinaryPartitioned", le = O + "Partitioned/", te = le + "JsonPartitioned", M = le + "BinaryPartitioned";
765
+ function ue(t, e, n, s = [], i) {
766
+ if (t === void 0) return !1;
767
+ switch (t.resourceType.name) {
768
768
  case K: {
769
- let i = e.getInputsLocked();
770
- for (const o of e.listInputFields()) {
771
- const l = e.resolve({ field: o, assertFieldType: "Input" }), a = [...r, ...JSON.parse(o)], c = l === void 0 ? void 0 : t(l);
772
- c === void 0 && (i = !1), (c !== void 0 || s) && n.push({ key: a, value: c });
769
+ let r = t.getInputsLocked();
770
+ for (const o of t.listInputFields()) {
771
+ const l = t.resolve({ field: o, assertFieldType: "Input" }), d = [...s, ...JSON.parse(o)], a = l === void 0 ? void 0 : e(l);
772
+ a === void 0 && (r = !1), (a !== void 0 || i) && n.push({ key: d, value: a });
773
773
  }
774
- return i;
774
+ return r;
775
775
  }
776
776
  case G: {
777
- let i = e.getInputsLocked();
778
- for (const o of e.listInputFields()) {
779
- const l = e.resolve({ field: o, assertFieldType: "Input" });
780
- if (l === void 0) i = !1;
777
+ let r = t.getInputsLocked();
778
+ for (const o of t.listInputFields()) {
779
+ const l = t.resolve({ field: o, assertFieldType: "Input" });
780
+ if (l === void 0) r = !1;
781
781
  else {
782
- const a = [...r, ...JSON.parse(o)], c = ut(
782
+ const d = [...s, ...JSON.parse(o)], a = ue(
783
783
  l,
784
- t,
784
+ e,
785
785
  n,
786
- a,
787
- s
786
+ d,
787
+ i
788
788
  );
789
- i = i && c;
789
+ r = r && a;
790
790
  }
791
791
  }
792
- return i;
792
+ return r;
793
793
  }
794
794
  default:
795
- throw new Error(`Unknown resource type: ${e.resourceType.name}`);
795
+ throw new Error(`Unknown resource type: ${t.resourceType.name}`);
796
796
  }
797
797
  }
798
- function fe(e, t, n = !1) {
799
- const r = [];
800
- return { isComplete: ut(e, t, r, [], n), data: r };
798
+ function ft(t, e, n = !1) {
799
+ const s = [];
800
+ return { isComplete: ue(t, e, s, [], n), data: s };
801
801
  }
802
- const nt = (e) => {
803
- if (!e.endsWith(".index")) {
804
- if (e.endsWith(".values"))
805
- return e.substring(0, e.length - 7);
806
- throw Error(`key must ends on .index/.values for binary p-column, got: ${e}`);
802
+ const ne = (t) => {
803
+ if (!t.endsWith(".index")) {
804
+ if (t.endsWith(".values"))
805
+ return t.substring(0, t.length - 7);
806
+ throw Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
807
807
  }
808
808
  };
809
- function Lt(e) {
810
- if (!e) return;
811
- const t = e.resourceType.name, n = e.getDataAsJson(), r = [];
812
- let s = 0;
813
- switch (t) {
809
+ function Le(t) {
810
+ if (!t) return;
811
+ const e = t.resourceType.name, n = t.getDataAsJson(), s = [];
812
+ let i = 0;
813
+ switch (e) {
814
814
  case K:
815
- s = n.keyLength;
815
+ i = n.keyLength;
816
816
  break;
817
817
  case G:
818
- s = n.partitionKeyLength + n.keyLength;
818
+ i = n.partitionKeyLength + n.keyLength;
819
819
  break;
820
- case tt:
820
+ case ee:
821
821
  case B:
822
- s = n.partitionKeyLength;
822
+ i = n.partitionKeyLength;
823
823
  break;
824
824
  case M:
825
- case et:
826
- s = n.superPartitionKeyLength + n.partitionKeyLength;
825
+ case te:
826
+ i = n.superPartitionKeyLength + n.partitionKeyLength;
827
827
  break;
828
828
  }
829
- switch (t) {
829
+ switch (e) {
830
830
  case K:
831
- case tt:
831
+ case ee:
832
832
  case B:
833
- for (let i of e.listInputFields()) {
834
- if (t === B) {
835
- const l = nt(i);
836
- if (l) i = l;
833
+ for (let r of t.listInputFields()) {
834
+ if (e === B) {
835
+ const l = ne(r);
836
+ if (l) r = l;
837
837
  else continue;
838
838
  }
839
- const o = [...JSON.parse(i)];
840
- r.push(o);
839
+ const o = [...JSON.parse(r)];
840
+ s.push(o);
841
841
  }
842
842
  break;
843
843
  case G:
844
844
  case M:
845
- case et:
846
- for (const i of e.listInputFields()) {
847
- const o = [...JSON.parse(i)], l = e.resolve({ field: i, assertFieldType: "Input" });
845
+ case te:
846
+ for (const r of t.listInputFields()) {
847
+ const o = [...JSON.parse(r)], l = t.resolve({ field: r, assertFieldType: "Input" });
848
848
  if (l !== void 0)
849
- for (let a of l.listInputFields()) {
850
- if (t === M) {
851
- const f = nt(a);
852
- if (f) a = f;
849
+ for (let d of l.listInputFields()) {
850
+ if (e === M) {
851
+ const p = ne(d);
852
+ if (p) d = p;
853
853
  else continue;
854
854
  }
855
- const c = [...o, ...JSON.parse(a)];
856
- r.push(c);
855
+ const a = [...o, ...JSON.parse(d)];
856
+ s.push(a);
857
857
  }
858
858
  }
859
859
  break;
860
860
  }
861
- return { data: r, keyLength: s };
861
+ return { data: s, keyLength: i };
862
862
  }
863
- function he(e) {
864
- const t = Lt(e);
865
- if (!t) return;
866
- const { data: n, keyLength: r } = t, s = [];
867
- for (let i = 0; i < r; ++i)
868
- s.push(/* @__PURE__ */ new Set());
869
- for (const i of n) {
870
- if (i.length !== r)
863
+ function ht(t) {
864
+ const e = Le(t);
865
+ if (!e) return;
866
+ const { data: n, keyLength: s } = e, i = [];
867
+ for (let r = 0; r < s; ++r)
868
+ i.push(/* @__PURE__ */ new Set());
869
+ for (const r of n) {
870
+ if (r.length !== s)
871
871
  throw new Error("key length does not match partition length");
872
- for (let o = 0; o < r; ++o)
873
- s[o].add(i[o]);
872
+ for (let o = 0; o < s; ++o)
873
+ i[o].add(r[o]);
874
874
  }
875
- return s.map((i) => Array.from(i.values()));
875
+ return i.map((r) => Array.from(r.values()));
876
876
  }
877
- const P = "1.20.6";
878
- function xt(e) {
879
- return e.__renderLambda === !0;
877
+ const F = "1.20.11";
878
+ function xe(t) {
879
+ return t.__renderLambda === !0;
880
880
  }
881
- function U(e) {
882
- if (e !== void 0)
883
- return xt(e) ? e.handle : e;
881
+ function U(t) {
882
+ if (t !== void 0)
883
+ return xe(t) ? t.handle : t;
884
884
  }
885
- function C(e) {
886
- if (e !== void 0)
887
- return typeof e == "string" ? { __renderLambda: !0, handle: e, retentive: !1 } : e;
885
+ function I(t) {
886
+ if (t !== void 0)
887
+ return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
888
888
  }
889
- function ge(e) {
890
- if (e.v3 !== void 0) {
889
+ function gt(t) {
890
+ if (t.v3 !== void 0) {
891
891
  const {
892
- initialArgs: t,
892
+ initialArgs: e,
893
893
  initialUiState: n,
894
- inputsValid: r,
895
- outputs: s,
896
- renderingMode: i,
894
+ inputsValid: s,
895
+ outputs: i,
896
+ renderingMode: r,
897
897
  sdkVersion: o,
898
898
  sections: l,
899
- title: a
900
- } = e.v3, { code: c } = e;
899
+ title: d
900
+ } = t.v3, { code: a } = t;
901
901
  return {
902
- initialArgs: t,
902
+ initialArgs: e,
903
903
  initialUiState: n,
904
- inputsValid: r,
905
- outputs: s,
906
- renderingMode: i,
904
+ inputsValid: s,
905
+ outputs: i,
906
+ renderingMode: r,
907
907
  sdkVersion: o,
908
908
  sections: l,
909
- title: a,
910
- code: c
909
+ title: d,
910
+ code: a
911
911
  };
912
- } else if (e.inputsValid !== void 0) {
913
- const { sdkVersion: t, renderingMode: n, outputs: r, inputsValid: s, sections: i, initialArgs: o, code: l } = e, a = Object.keys(e);
914
- if (t === void 0 || n === void 0 || r === void 0 || s === void 0 || i === void 0 || o === void 0)
912
+ } else if (t.inputsValid !== void 0) {
913
+ const { sdkVersion: e, renderingMode: n, outputs: s, inputsValid: i, sections: r, initialArgs: o, code: l } = t, d = Object.keys(t);
914
+ if (e === void 0 || n === void 0 || s === void 0 || i === void 0 || r === void 0 || o === void 0)
915
915
  throw new Error(
916
- `Malformed config v2. SDK version ${t}; Fields = ${a.join(", ")}`
916
+ `Malformed config v2. SDK version ${e}; Fields = ${d.join(", ")}`
917
917
  );
918
918
  return {
919
- sdkVersion: t,
919
+ sdkVersion: e,
920
920
  renderingMode: n,
921
921
  initialArgs: o,
922
922
  outputs: Object.fromEntries(
923
- Object.entries(r).map(([c, f]) => [c, C(f)])
923
+ Object.entries(s).map(([a, p]) => [a, I(p)])
924
924
  ),
925
- inputsValid: C(s),
926
- sections: C(i),
925
+ inputsValid: I(i),
926
+ sections: I(r),
927
927
  initialUiState: void 0,
928
928
  code: l
929
929
  };
930
- } else if (e.renderingMode !== void 0) {
931
- const { sdkVersion: t, canRun: n, renderingMode: r, outputs: s, sections: i, initialArgs: o, code: l } = e, a = Object.keys(e);
932
- if (r === void 0 || s === void 0 || n === void 0 || i === void 0 || o === void 0)
930
+ } else if (t.renderingMode !== void 0) {
931
+ const { sdkVersion: e, canRun: n, renderingMode: s, outputs: i, sections: r, initialArgs: o, code: l } = t, d = Object.keys(t);
932
+ if (s === void 0 || i === void 0 || n === void 0 || r === void 0 || o === void 0)
933
933
  throw new Error(
934
- `Malformed config v1. SDK version ${t}; Fields = ${a.join(", ")}`
934
+ `Malformed config v1. SDK version ${e}; Fields = ${d.join(", ")}`
935
935
  );
936
936
  return {
937
- sdkVersion: t ?? "unknown",
938
- renderingMode: r,
937
+ sdkVersion: e ?? "unknown",
938
+ renderingMode: s,
939
939
  initialArgs: o,
940
940
  outputs: Object.fromEntries(
941
- Object.entries(s).map(([c, f]) => [c, C(f)])
941
+ Object.entries(i).map(([a, p]) => [a, I(p)])
942
942
  ),
943
- inputsValid: C(n),
944
- sections: C(i),
943
+ inputsValid: I(n),
944
+ sections: I(r),
945
945
  initialUiState: void 0,
946
946
  code: l
947
947
  };
948
948
  } else {
949
- const { sdkVersion: t } = e, n = Object.keys(e);
949
+ const { sdkVersion: e } = t, n = Object.keys(t);
950
950
  throw new Error(
951
- `Config format not supported: SDK = ${t}; Fields = ${n.join(", ")}`
951
+ `Config format not supported: SDK = ${e}; Fields = ${n.join(", ")}`
952
952
  );
953
953
  }
954
954
  }
955
- class h {
956
- constructor(t, n, r, s, i, o, l) {
957
- this._renderingMode = t, this._initialArgs = n, this._initialUiState = r, this._outputs = s, this._inputsValid = i, this._sections = o, this._title = l;
955
+ class b {
956
+ constructor(e, n, s, i, r, o, l) {
957
+ this._renderingMode = e, this._initialArgs = n, this._initialUiState = s, this._outputs = i, this._inputsValid = r, this._sections = o, this._title = l;
958
958
  }
959
- static create(t = "Heavy") {
960
- return new h(
961
- t,
959
+ static create(e = "Heavy") {
960
+ return new b(
961
+ e,
962
962
  void 0,
963
963
  {},
964
964
  {},
965
- D(!0),
966
- D([]),
965
+ L(!0),
966
+ L([]),
967
967
  void 0
968
968
  );
969
969
  }
970
- output(t, n, r = {}) {
970
+ output(e, n, s = {}) {
971
971
  if (typeof n == "function") {
972
- const s = `output#${t}`;
973
- return O(s, () => n(new k())), new h(
972
+ const i = `output#${e}`;
973
+ return k(i, () => n(new D())), new b(
974
974
  this._renderingMode,
975
975
  this._initialArgs,
976
976
  this._initialUiState,
977
977
  {
978
978
  ...this._outputs,
979
- [t]: {
979
+ [e]: {
980
980
  __renderLambda: !0,
981
- handle: s,
982
- ...r
981
+ handle: i,
982
+ ...s
983
983
  }
984
984
  },
985
985
  this._inputsValid,
@@ -987,13 +987,13 @@ class h {
987
987
  this._title
988
988
  );
989
989
  } else
990
- return new h(
990
+ return new b(
991
991
  this._renderingMode,
992
992
  this._initialArgs,
993
993
  this._initialUiState,
994
994
  {
995
995
  ...this._outputs,
996
- [t]: n
996
+ [e]: n
997
997
  },
998
998
  this._inputsValid,
999
999
  this._sections,
@@ -1001,15 +1001,15 @@ class h {
1001
1001
  );
1002
1002
  }
1003
1003
  /** Shortcut for {@link output} with retentive flag set to true. */
1004
- retentiveOutput(t, n) {
1005
- return this.output(t, n, { retentive: !0 });
1004
+ retentiveOutput(e, n) {
1005
+ return this.output(e, n, { retentive: !0 });
1006
1006
  }
1007
1007
  /** @deprecated */
1008
- canRun(t) {
1009
- return this.inputsValid(t);
1008
+ canRun(e) {
1009
+ return this.inputsValid(e);
1010
1010
  }
1011
- argsValid(t) {
1012
- return typeof t == "function" ? (O("inputsValid", () => t(new k())), new h(
1011
+ argsValid(e) {
1012
+ return typeof e == "function" ? (k("inputsValid", () => e(new D())), new b(
1013
1013
  this._renderingMode,
1014
1014
  this._initialArgs,
1015
1015
  this._initialUiState,
@@ -1020,21 +1020,21 @@ class h {
1020
1020
  },
1021
1021
  this._sections,
1022
1022
  this._title
1023
- )) : new h(
1023
+ )) : new b(
1024
1024
  this._renderingMode,
1025
1025
  this._initialArgs,
1026
1026
  this._initialUiState,
1027
1027
  this._outputs,
1028
- t,
1028
+ e,
1029
1029
  this._sections,
1030
1030
  this._title
1031
1031
  );
1032
1032
  }
1033
- inputsValid(t) {
1034
- return this.argsValid(t);
1033
+ inputsValid(e) {
1034
+ return this.argsValid(e);
1035
1035
  }
1036
- sections(t) {
1037
- return Array.isArray(t) ? this.sections(D(t)) : typeof t == "function" ? (O("sections", () => t(new k())), new h(
1036
+ sections(e) {
1037
+ return Array.isArray(e) ? this.sections(L(e)) : typeof e == "function" ? (k("sections", () => e(new D())), new b(
1038
1038
  this._renderingMode,
1039
1039
  this._initialArgs,
1040
1040
  this._initialUiState,
@@ -1042,18 +1042,18 @@ class h {
1042
1042
  this._inputsValid,
1043
1043
  { __renderLambda: !0, handle: "sections" },
1044
1044
  this._title
1045
- )) : new h(
1045
+ )) : new b(
1046
1046
  this._renderingMode,
1047
1047
  this._initialArgs,
1048
1048
  this._initialUiState,
1049
1049
  this._outputs,
1050
1050
  this._inputsValid,
1051
- t,
1051
+ e,
1052
1052
  this._title
1053
1053
  );
1054
1054
  }
1055
- title(t) {
1056
- return O("title", () => t(new k())), new h(
1055
+ title(e) {
1056
+ return k("title", () => e(new D())), new b(
1057
1057
  this._renderingMode,
1058
1058
  this._initialArgs,
1059
1059
  this._initialUiState,
@@ -1067,10 +1067,10 @@ class h {
1067
1067
  * Sets initial args for the block, this value must be specified.
1068
1068
  * @deprecated use {@link withArgs}
1069
1069
  * */
1070
- initialArgs(t) {
1071
- return new h(
1070
+ initialArgs(e) {
1071
+ return new b(
1072
1072
  this._renderingMode,
1073
- t,
1073
+ e,
1074
1074
  this._initialUiState,
1075
1075
  this._outputs,
1076
1076
  this._inputsValid,
@@ -1079,10 +1079,10 @@ class h {
1079
1079
  );
1080
1080
  }
1081
1081
  /** Sets initial args for the block, this value must be specified. */
1082
- withArgs(t) {
1083
- return new h(
1082
+ withArgs(e) {
1083
+ return new b(
1084
1084
  this._renderingMode,
1085
- t,
1085
+ e,
1086
1086
  this._initialUiState,
1087
1087
  this._outputs,
1088
1088
  this._inputsValid,
@@ -1091,11 +1091,11 @@ class h {
1091
1091
  );
1092
1092
  }
1093
1093
  /** Defines type and sets initial value for block UiState. */
1094
- withUiState(t) {
1095
- return new h(
1094
+ withUiState(e) {
1095
+ return new b(
1096
1096
  this._renderingMode,
1097
1097
  this._initialArgs,
1098
- t,
1098
+ e,
1099
1099
  this._outputs,
1100
1100
  this._inputsValid,
1101
1101
  this._sections,
@@ -1107,9 +1107,9 @@ class h {
1107
1107
  * other features provided by the platforma to the block. */
1108
1108
  done() {
1109
1109
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
1110
- const t = {
1110
+ const e = {
1111
1111
  v3: {
1112
- sdkVersion: P,
1112
+ sdkVersion: F,
1113
1113
  renderingMode: this._renderingMode,
1114
1114
  initialArgs: this._initialArgs,
1115
1115
  initialUiState: this._initialUiState,
@@ -1119,161 +1119,183 @@ class h {
1119
1119
  outputs: this._outputs
1120
1120
  },
1121
1121
  // fields below are added to allow previous desktop versions read generated configs
1122
- sdkVersion: P,
1122
+ sdkVersion: F,
1123
1123
  renderingMode: this._renderingMode,
1124
1124
  initialArgs: this._initialArgs,
1125
1125
  inputsValid: U(this._inputsValid),
1126
1126
  sections: U(this._sections),
1127
1127
  outputs: Object.fromEntries(
1128
- Object.entries(this._outputs).map(([n, r]) => [n, U(r)])
1128
+ Object.entries(this._outputs).map(([n, s]) => [n, U(s)])
1129
1129
  )
1130
1130
  };
1131
- return vt() ? st({ sdkVersion: P }) : { config: t };
1131
+ return ve() ? ie({ sdkVersion: F }) : { config: e };
1132
1132
  }
1133
1133
  }
1134
- function me(e, t, n, r) {
1135
- var o, l;
1136
- const s = e.resultPool.getData().entries.map((a) => a.obj).filter(H).filter((a) => a.spec.name === "pl7.app/label" && a.spec.axesSpec.length === 1), i = /* @__PURE__ */ new Map();
1137
- for (const a of t)
1138
- for (const c of a.spec.axesSpec) {
1139
- const f = X(c);
1140
- for (const S of s)
1141
- yt(f, X(S.spec.axesSpec[0])) && i.set(S.id, S);
1134
+ function mt(t, e, n, s) {
1135
+ var l, d;
1136
+ const i = t.resultPool.getData().entries.map((a) => a.obj).filter(H).filter((a) => a.spec.name === "pl7.app/label" && a.spec.axesSpec.length === 1), r = (a, p) => {
1137
+ let g = a.toString();
1138
+ if (p)
1139
+ for (const c in p)
1140
+ g += c, g += p[c];
1141
+ return g;
1142
+ }, o = /* @__PURE__ */ new Map();
1143
+ for (const a of e)
1144
+ for (const p of a.spec.axesSpec) {
1145
+ const g = X(p);
1146
+ for (const c of i) {
1147
+ const m = c.spec.axesSpec[0], h = X(c.spec.axesSpec[0]);
1148
+ if (ye(g, h)) {
1149
+ const A = Object.keys(g.domain ?? {}).length, y = Object.keys(h.domain ?? {}).length;
1150
+ if (A > y) {
1151
+ const C = r(c.id, g.domain);
1152
+ o.set(C, {
1153
+ id: C,
1154
+ spec: {
1155
+ ...c.spec,
1156
+ axesSpec: [{ ...g, annotations: m.annotations }]
1157
+ },
1158
+ data: c.data
1159
+ });
1160
+ } else
1161
+ o.set(r(c.id), c);
1162
+ }
1163
+ }
1142
1164
  }
1143
- if (![...t, ...i.values()].some(
1144
- (a) => a.data instanceof _ && !a.data.getIsReadyOrError()
1165
+ if (![...e, ...o.values()].some(
1166
+ (a) => a.data instanceof v && !a.data.getIsReadyOrError()
1145
1167
  ))
1146
- return e.createPTable({
1168
+ return t.createPTable({
1147
1169
  src: {
1148
1170
  type: "outer",
1149
1171
  primary: {
1150
1172
  type: "full",
1151
- entries: t.map((a) => ({ type: "column", column: a }))
1173
+ entries: e.map((a) => ({ type: "column", column: a }))
1152
1174
  },
1153
- secondary: [...i.values()].map((a) => ({ type: "column", column: a }))
1175
+ secondary: [...o.values()].map((a) => ({ type: "column", column: a }))
1154
1176
  },
1155
- filters: [...((o = n == null ? void 0 : n.pTableParams) == null ? void 0 : o.filters) ?? [], ...r ?? []],
1156
- sorting: ((l = n == null ? void 0 : n.pTableParams) == null ? void 0 : l.sorting) ?? []
1177
+ filters: [...((l = n == null ? void 0 : n.pTableParams) == null ? void 0 : l.filters) ?? [], ...s ?? []],
1178
+ sorting: ((d = n == null ? void 0 : n.pTableParams) == null ? void 0 : d.sorting) ?? []
1157
1179
  });
1158
1180
  }
1159
- function ye(e, t, n) {
1160
- const r = e.findLabels(t);
1181
+ function yt(t, e, n) {
1182
+ const s = t.findLabels(e);
1161
1183
  return {
1162
- axis: t,
1163
- options: n.map((s) => ({
1164
- value: s,
1165
- label: (r == null ? void 0 : r[s]) ?? s.toString()
1184
+ axis: e,
1185
+ options: n.map((i) => ({
1186
+ value: i,
1187
+ label: (s == null ? void 0 : s[i]) ?? i.toString()
1166
1188
  })),
1167
1189
  defaultValue: n[0]
1168
1190
  };
1169
1191
  }
1170
- class be {
1171
- constructor(t) {
1172
- this.handle = t;
1192
+ class bt {
1193
+ constructor(e) {
1194
+ this.handle = e;
1173
1195
  }
1174
- async findColumns(t) {
1175
- return await platforma.pFrameDriver.findColumns(this.handle, t);
1196
+ async findColumns(e) {
1197
+ return await platforma.pFrameDriver.findColumns(this.handle, e);
1176
1198
  }
1177
- async getColumnSpec(t) {
1178
- return await platforma.pFrameDriver.getColumnSpec(this.handle, t);
1199
+ async getColumnSpec(e) {
1200
+ return await platforma.pFrameDriver.getColumnSpec(this.handle, e);
1179
1201
  }
1180
1202
  async listColumns() {
1181
1203
  return await platforma.pFrameDriver.listColumns(this.handle);
1182
1204
  }
1183
- async calculateTableData(t) {
1184
- return await platforma.pFrameDriver.calculateTableData(this.handle, t);
1205
+ async calculateTableData(e) {
1206
+ return await platforma.pFrameDriver.calculateTableData(this.handle, e);
1185
1207
  }
1186
- async getUniqueValues(t) {
1187
- return await platforma.pFrameDriver.getUniqueValues(this.handle, t);
1208
+ async getUniqueValues(e) {
1209
+ return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
1188
1210
  }
1189
1211
  }
1190
- function Et(e) {
1191
- return rt({
1212
+ function Ee(t) {
1213
+ return se({
1192
1214
  __isRef: !0,
1193
- blockId: x(e, "blockId"),
1194
- name: x(e, "name")
1215
+ blockId: E(t, "blockId"),
1216
+ name: E(t, "name")
1195
1217
  });
1196
1218
  }
1197
- function _e(e) {
1198
- return rt({
1199
- ref: Et(x(e, "ref")),
1200
- label: x(e, "label")
1219
+ function _t(t) {
1220
+ return se({
1221
+ ref: Ee(E(t, "ref")),
1222
+ label: E(t, "label")
1201
1223
  });
1202
1224
  }
1203
- const ve = {
1204
- sdkVersion: P
1225
+ const vt = {
1226
+ sdkVersion: F
1205
1227
  };
1206
- function we() {
1207
- return st({ sdkVersion: P });
1228
+ function wt() {
1229
+ return ie({ sdkVersion: F });
1208
1230
  }
1209
- function Se(e) {
1231
+ function St(t) {
1210
1232
  if (typeof globalThis.getEnvironmentValue == "function")
1211
- return globalThis.getEnvironmentValue(e);
1233
+ return globalThis.getEnvironmentValue(t);
1212
1234
  }
1213
1235
  export {
1214
- Ut as Args,
1215
- h as BlockModel,
1216
- ve as CurrentSdkInfo,
1217
- g as FutureRef,
1218
- Jt as It,
1219
- de as JsRenderInternal,
1220
- $t as MainOutputs,
1221
- bt as OutputError,
1222
- It as PAnnotationLabel,
1223
- Pt as PAnnotationTrace,
1224
- be as PFrameImpl,
1236
+ Ue as Args,
1237
+ b as BlockModel,
1238
+ vt as CurrentSdkInfo,
1239
+ _ as FutureRef,
1240
+ Je as It,
1241
+ pt as JsRenderInternal,
1242
+ $e as MainOutputs,
1243
+ be as OutputError,
1244
+ Ie as PAnnotationLabel,
1245
+ Pe as PAnnotationTrace,
1246
+ bt as PFrameImpl,
1225
1247
  B as RT_BINARY_PARTITIONED,
1226
1248
  M as RT_BINARY_SUPER_PARTITIONED,
1227
- tt as RT_JSON_PARTITIONED,
1228
- et as RT_JSON_SUPER_PARTITIONED,
1249
+ ee as RT_JSON_PARTITIONED,
1250
+ te as RT_JSON_SUPER_PARTITIONED,
1229
1251
  K as RT_RESOURCE_MAP,
1230
1252
  G as RT_RESOURCE_MAP_PARTITIONED,
1231
- k as RenderCtx,
1232
- Dt as ResultPool,
1233
- Kt as StagingOutputs,
1234
- Ft as Trace,
1235
- Rt as TraceEntry,
1236
- _ as TreeNodeAccessor,
1237
- Gt as UiState,
1238
- Qt as and,
1239
- me as createPlDataTable,
1240
- ye as createPlDataTableSheet,
1241
- kt as deriveLabels,
1253
+ D as RenderCtx,
1254
+ De as ResultPool,
1255
+ Ke as StagingOutputs,
1256
+ Fe as Trace,
1257
+ Re as TraceEntry,
1258
+ v as TreeNodeAccessor,
1259
+ Ge as UiState,
1260
+ Qe as and,
1261
+ mt as createPlDataTable,
1262
+ yt as createPlDataTableSheet,
1263
+ ke as deriveLabels,
1242
1264
  U as downgradeCfgOrLambda,
1243
- ge as extractConfig,
1244
- zt as flatten,
1245
- _e as fromPlOption,
1246
- Et as fromPlRef,
1247
- re as getBlobContent,
1248
- ie as getBlobContentAsJson,
1249
- se as getBlobContentAsString,
1250
- oe as getDownloadedBlobContent,
1251
- Se as getEnvironmentValue,
1252
- R as getFromCfg,
1253
- D as getImmediate,
1254
- le as getImportProgress,
1255
- x as getJsonField,
1256
- ue as getLastLogs,
1257
- pe as getLogHandle,
1258
- ae as getOnDemandBlobContent,
1259
- Lt as getPartitionKeysList,
1260
- ce as getProgressLog,
1261
- we as getRawPlatformaInstance,
1262
- te as getResourceField,
1263
- ee as getResourceValueAsJson,
1264
- he as getUniquePartitionKeys,
1265
- xt as isConfigLambda,
1266
- Yt as isEmpty,
1267
- Mt as isolate,
1268
- Ht as makeArray,
1269
- rt as makeObject,
1270
- qt as mapArrayValues,
1271
- Wt as mapRecordValues,
1272
- ne as mapResourceFields,
1273
- Xt as not,
1274
- Zt as or,
1275
- fe as parseResourceMap,
1276
- _t as readOutput,
1277
- Bt as wrapOutputs
1265
+ gt as extractConfig,
1266
+ ze as flatten,
1267
+ _t as fromPlOption,
1268
+ Ee as fromPlRef,
1269
+ st as getBlobContent,
1270
+ rt as getBlobContentAsJson,
1271
+ it as getBlobContentAsString,
1272
+ ot as getDownloadedBlobContent,
1273
+ St as getEnvironmentValue,
1274
+ T as getFromCfg,
1275
+ L as getImmediate,
1276
+ lt as getImportProgress,
1277
+ E as getJsonField,
1278
+ ut as getLastLogs,
1279
+ dt as getLogHandle,
1280
+ at as getOnDemandBlobContent,
1281
+ Le as getPartitionKeysList,
1282
+ ct as getProgressLog,
1283
+ wt as getRawPlatformaInstance,
1284
+ et as getResourceField,
1285
+ tt as getResourceValueAsJson,
1286
+ ht as getUniquePartitionKeys,
1287
+ xe as isConfigLambda,
1288
+ Ye as isEmpty,
1289
+ Me as isolate,
1290
+ He as makeArray,
1291
+ se as makeObject,
1292
+ qe as mapArrayValues,
1293
+ We as mapRecordValues,
1294
+ nt as mapResourceFields,
1295
+ Xe as not,
1296
+ Ze as or,
1297
+ ft as parseResourceMap,
1298
+ _e as readOutput,
1299
+ Be as wrapOutputs
1278
1300
  };
1279
1301
  //# sourceMappingURL=index.mjs.map