@milaboratories/pl-middle-layer 1.25.6 → 1.26.1

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
@@ -16,7 +16,7 @@ import { tryResolve as As } from "@milaboratories/resolve-helper";
16
16
  import { resourceTypesEqual as ce, field as j, Pl as L, PlClient as Ls, isNullResourceId as He, ensureResourceIdNotNull as gt, isResource as Ns, isResourceRef as Ds, isNotNullResourceId as _t, resourceType as Le, resourceTypeToString as Bs, resourceIdToString as Br, isNotFoundError as js, isTimeoutOrCancelError as xs, toGlobalResourceId as Vs, plAddressToConfig as Us, UnauthenticatedPlClient as Kt } from "@milaboratories/pl-client";
17
17
  export * from "@milaboratories/pl-client";
18
18
  import { SynchronizedTreeState as jr, PlError as Js, isPlTreeNodeAccessor as Gs } from "@milaboratories/pl-tree";
19
- import { Computable as V, ChangeSource as Ht, PollComputablePool as Ms, WatchableValue as _s } from "@milaboratories/computable";
19
+ import { Computable as U, ChangeSource as Ht, PollComputablePool as Ms, WatchableValue as _s } from "@milaboratories/computable";
20
20
  import { randomUUID as Fe, createHash as Ne } from "node:crypto";
21
21
  import { parseTemplate as Ks, PlTemplateV1 as ne, PlTemplateOverrideV1 as Pe, PlTemplateLibV1 as Be, PlTemplateSoftwareV1 as be } from "@milaboratories/pl-model-backend";
22
22
  import xr from "denque";
@@ -109,9 +109,9 @@ class Ul {
109
109
  `${r.url}/${ue.GlobalOverviewPath}`,
110
110
  o
111
111
  )).body.json();
112
- for (const c of i) {
113
- const { organization: a, package: l, latestMeta: u, latestVersion: d } = c, f = {
114
- organization: a,
112
+ for (const a of i) {
113
+ const { organization: c, package: l, latestMeta: u, latestVersion: d } = a, f = {
114
+ organization: c,
115
115
  name: l,
116
116
  version: d
117
117
  }, h = {
@@ -120,7 +120,7 @@ class Ul {
120
120
  title: u.title ?? "No title",
121
121
  description: u.description ?? "No Description",
122
122
  organization: {
123
- name: a,
123
+ name: c,
124
124
  url: "https://unknown.com"
125
125
  }
126
126
  },
@@ -137,32 +137,32 @@ class Ul {
137
137
  [we]: h,
138
138
  [ie]: h
139
139
  },
140
- allVersions: c.allVersions.map((g) => ({ version: g, channels: [] }))
140
+ allVersions: a.allVersions.map((g) => ({ version: g, channels: [] }))
141
141
  });
142
142
  }
143
143
  return t;
144
144
  case "remote-v2":
145
145
  return (await this.v2Provider.getRegistry(r.url).listBlockPacks()).map(
146
- (c) => c.latestByChannel[ie] ? {
147
- ...c,
146
+ (a) => a.latestByChannel[ie] ? {
147
+ ...a,
148
148
  registryId: e.id
149
149
  } : {
150
- ...c,
150
+ ...a,
151
151
  latestByChannel: {
152
- ...c.latestByChannel,
153
- [ie]: ((a) => a.spec.type === "from-registry-v2" ? { ...a, spec: { ...a.spec, channel: ie } } : a)(c.latestByChannel[we])
152
+ ...a.latestByChannel,
153
+ [ie]: ((c) => c.spec.type === "from-registry-v2" ? { ...c, spec: { ...c.spec, channel: ie } } : c)(a.latestByChannel[we])
154
154
  },
155
155
  registryId: e.id
156
156
  }
157
157
  );
158
158
  case "local-dev":
159
- for (const c of await z.promises.readdir(r.path, { withFileTypes: !0 })) {
160
- if (!c.isDirectory()) continue;
161
- const a = H.join(r.path, c.name), l = await fo(
162
- H.join(a, ue.PlPackageYamlConfigFile)
159
+ for (const a of await z.promises.readdir(r.path, { withFileTypes: !0 })) {
160
+ if (!a.isDirectory()) continue;
161
+ const c = H.join(r.path, a.name), l = await fo(
162
+ H.join(c, ue.PlPackageYamlConfigFile)
163
163
  );
164
164
  if (l !== void 0) {
165
- const u = ue.PlPackageConfigData.parse(Is.parse(l)), d = await Jr(a), f = {
165
+ const u = ue.PlPackageConfigData.parse(Is.parse(l)), d = await Jr(c), f = {
166
166
  organization: u.organization,
167
167
  name: u.package,
168
168
  version: "DEV"
@@ -178,7 +178,7 @@ class Ul {
178
178
  },
179
179
  spec: {
180
180
  type: "dev-v2",
181
- folder: a,
181
+ folder: c,
182
182
  mtime: d
183
183
  }
184
184
  };
@@ -192,10 +192,10 @@ class Ul {
192
192
  allVersions: []
193
193
  });
194
194
  } else {
195
- let u = a, d = await ft(u);
195
+ let u = c, d = await ft(u);
196
196
  if (d === void 0) {
197
197
  for (const f of ["block", "meta"])
198
- if (u = H.join(a, f), d = await ft(u), d !== void 0) break;
198
+ if (u = H.join(c, f), d = await ft(u), d !== void 0) break;
199
199
  }
200
200
  if (d !== void 0) {
201
201
  const f = await $t(d), h = {
@@ -232,7 +232,7 @@ class Ul {
232
232
  }
233
233
  async getOverview(e, t, r) {
234
234
  var i;
235
- const o = (i = this.registries.find((c) => c.id === e)) == null ? void 0 : i.spec;
235
+ const o = (i = this.registries.find((a) => a.id === e)) == null ? void 0 : i.spec;
236
236
  if (!o) throw new Error(`Registry with id "${e}" not found`);
237
237
  if (o.type !== "remote-v2")
238
238
  throw new Error(
@@ -287,7 +287,7 @@ const ko = "__serviceTemplate_";
287
287
  function St(s) {
288
288
  return `${ko}${s}`;
289
289
  }
290
- function U(s, e) {
290
+ function V(s, e) {
291
291
  return `${s}-${e}`;
292
292
  }
293
293
  const Po = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
@@ -308,12 +308,12 @@ async function Fo(s, e, t, r) {
308
308
  },
309
309
  r.logger
310
310
  );
311
- return { computable: V.make((i) => {
312
- const c = i.accessor(o.entry()).node(), a = t.getValue(i);
313
- if (c === void 0) return;
311
+ return { computable: U.make((i) => {
312
+ const a = i.accessor(o.entry()).node(), c = t.getValue(i);
313
+ if (a === void 0) return;
314
314
  const l = [];
315
- for (const u of c.listDynamicFields()) {
316
- const d = c.traverse(u);
315
+ for (const u of a.listDynamicFields()) {
316
+ const d = a.traverse(u);
317
317
  if (d === void 0) continue;
318
318
  const f = B(d.getKeyValueAsJson(Ae)), h = B(d.getKeyValueAsJson(It)), g = B(d.getKeyValueAsJson(Te));
319
319
  l.push({
@@ -321,7 +321,7 @@ async function Fo(s, e, t, r) {
321
321
  rid: d.id,
322
322
  created: new Date(h),
323
323
  lastModified: new Date(g),
324
- opened: a.indexOf(d.id) >= 0,
324
+ opened: c.indexOf(d.id) >= 0,
325
325
  meta: f
326
326
  });
327
327
  }
@@ -337,8 +337,8 @@ const To = {
337
337
  };
338
338
  function Kr(s, e, t, r, o) {
339
339
  if (o.length === 0) throw new Error("Zero output names provided");
340
- const n = t ? s.createEphemeral(To) : s.createStruct(Ao), i = j(n, "template"), c = j(n, "inputs");
341
- return s.createField(i, "Input", e), s.createField(c, "Input", L.createPlMap(s, r, t)), s.lockInputs(n), L.futureRecord(s, n, o, "Output", "outputs/");
340
+ const n = t ? s.createEphemeral(To) : s.createStruct(Ao), i = j(n, "template"), a = j(n, "inputs");
341
+ return s.createField(i, "Input", e), s.createField(a, "Input", L.createPlMap(s, r, t)), s.lockInputs(n), L.futureRecord(s, n, o, "Output", "outputs/");
342
342
  }
343
343
  const Lo = { name: "BContextEnd", version: "1" }, No = { name: "BContext", version: "1" }, Do = "id", Bo = "parent/", jo = ["context", "result"];
344
344
  function zt(s, e, t) {
@@ -412,21 +412,21 @@ const Yt = {
412
412
  ne.type,
413
413
  JSON.stringify(ne.fromV2Data(s).data)
414
414
  );
415
- for (const [i, c] of Object.entries(s.libs ?? {})) {
416
- const a = ne.libField(r, i);
417
- e.createField(a, "Input"), e.setField(a, t(c, Yt));
415
+ for (const [i, a] of Object.entries(s.libs ?? {})) {
416
+ const c = ne.libField(r, i);
417
+ e.createField(c, "Input"), e.setField(c, t(a, Yt));
418
418
  }
419
- for (const [i, c] of Object.entries(s.software ?? {})) {
420
- const a = ne.swField(r, i);
421
- e.createField(a, "Input"), e.setField(a, t(c, je));
419
+ for (const [i, a] of Object.entries(s.software ?? {})) {
420
+ const c = ne.swField(r, i);
421
+ e.createField(c, "Input"), e.setField(c, t(a, je));
422
422
  }
423
- for (const [i, c] of Object.entries(s.assets ?? {})) {
424
- const a = ne.swField(r, i);
425
- e.createField(a, "Input"), e.setField(a, t(c, je));
423
+ for (const [i, a] of Object.entries(s.assets ?? {})) {
424
+ const c = ne.swField(r, i);
425
+ e.createField(c, "Input"), e.setField(c, t(a, je));
426
426
  }
427
- for (const [i, c] of Object.entries(s.templates ?? {})) {
428
- const a = ne.tplField(r, i);
429
- e.createField(a, "Input"), e.setField(a, t(c, Hr));
427
+ for (const [i, a] of Object.entries(s.templates ?? {})) {
428
+ const c = ne.tplField(r, i);
429
+ e.createField(c, "Input"), e.setField(c, t(a, Hr));
430
430
  }
431
431
  if (e.lock(r), !s.hashOverride) return r;
432
432
  const o = t(s, Jo), n = Pe.tplField(o);
@@ -437,12 +437,12 @@ function Go(s, e) {
437
437
  const t = /* @__PURE__ */ new Map(), r = (o, n) => {
438
438
  const i = Ne("sha256");
439
439
  n.hash(o, i);
440
- const c = i.digest("hex");
441
- if (!t.has(c)) {
442
- const a = n.render(o, s, r);
443
- t.set(c, a);
440
+ const a = i.digest("hex");
441
+ if (!t.has(a)) {
442
+ const c = n.render(o, s, r);
443
+ t.set(a, c);
444
444
  }
445
- return t.get(c);
445
+ return t.get(a);
446
446
  };
447
447
  return r(e, Hr);
448
448
  }
@@ -587,14 +587,14 @@ class Yo {
587
587
  throw new Error(
588
588
  `Block not found in registry (url = ${o} ; code = ${n.statusCode}): ` + JSON.stringify(e)
589
589
  );
590
- const i = new Uint8Array(await n.body.arrayBuffer()), a = await (await ae(`${r}/config.json`, t)).body.json();
590
+ const i = new Uint8Array(await n.body.arrayBuffer()), c = await (await ae(`${r}/config.json`, t)).body.json();
591
591
  return {
592
592
  type: "explicit",
593
593
  template: {
594
594
  type: "explicit",
595
595
  content: i
596
596
  },
597
- config: a,
597
+ config: c,
598
598
  frontend: {
599
599
  type: "url",
600
600
  url: `${r}/frontend.tgz`
@@ -603,14 +603,14 @@ class Yo {
603
603
  };
604
604
  }
605
605
  case "from-registry-v2": {
606
- const t = this.http !== void 0 ? { dispatcher: this.http } : {}, o = await this.v2RegistryProvider.getRegistry(e.registryUrl).getComponents(e.id), n = async () => await (await ae(o.model.url, t)).body.json(), i = async () => await (await ae(o.workflow.main.url, t)).body.arrayBuffer(), [c, a] = await Promise.all([n(), i()]);
606
+ const t = this.http !== void 0 ? { dispatcher: this.http } : {}, o = await this.v2RegistryProvider.getRegistry(e.registryUrl).getComponents(e.id), n = async () => await (await ae(o.model.url, t)).body.json(), i = async () => await (await ae(o.workflow.main.url, t)).body.arrayBuffer(), [a, c] = await Promise.all([n(), i()]);
607
607
  return {
608
608
  type: "explicit",
609
609
  template: {
610
610
  type: "explicit",
611
- content: Buffer.from(a)
611
+ content: Buffer.from(c)
612
612
  },
613
- config: c,
613
+ config: a,
614
614
  frontend: {
615
615
  type: "url",
616
616
  url: o.ui.url
@@ -697,9 +697,9 @@ class Yr {
697
697
  const n = new Set(o);
698
698
  for (; o.length > 0; ) {
699
699
  let i = [];
700
- for (const c of o) {
701
- const a = this.nodes.get(c);
702
- r(a), a[e].forEach((l) => {
700
+ for (const a of o) {
701
+ const c = this.nodes.get(a);
702
+ r(c), c[e].forEach((l) => {
703
703
  n.has(l) || (n.add(l), i.push(l));
704
704
  });
705
705
  }
@@ -724,14 +724,14 @@ function Ke(s, e) {
724
724
  for (const { id: o } of te(s)) {
725
725
  const n = e(o);
726
726
  if (n === void 0) continue;
727
- const i = en(n, r), c = {
727
+ const i = en(n, r), a = {
728
728
  id: o,
729
729
  missingReferences: i.missingReferences,
730
730
  upstream: i.upstreams,
731
731
  downstream: /* @__PURE__ */ new Set()
732
732
  // will be populated from downstream blocks
733
733
  };
734
- t.set(o, c), i.upstreams.forEach((a) => t.get(a).downstream.add(o)), r.add(o);
734
+ t.set(o, a), i.upstreams.forEach((c) => t.get(c).downstream.add(o)), r.add(o);
735
735
  }
736
736
  return new Yr(t);
737
737
  }
@@ -849,7 +849,7 @@ const sn = (s) => {
849
849
  throw new Error(`No new block info for ${s}`);
850
850
  };
851
851
  class qe {
852
- constructor(e, t, r, o, n, i, c, a, l, u, d, f) {
852
+ constructor(e, t, r, o, n, i, a, c, l, u, d, f) {
853
853
  S(this, "globalModCount", 0);
854
854
  S(this, "fieldsChanged", !1);
855
855
  //
@@ -868,7 +868,7 @@ class qe {
868
868
  S(this, "stagingGraph");
869
869
  S(this, "pendingProductionGraph");
870
870
  S(this, "actualProductionGraph");
871
- this.rid = e, this.tx = t, this.author = r, this.schema = o, this.lastModified = n, this.meta = i, this.struct = c, this.renderingState = a, this.blocksInLimbo = l, this.blockInfos = u, this.blockFrontendStates = d, this.ctxExportTplHolder = f;
871
+ this.rid = e, this.tx = t, this.author = r, this.schema = o, this.lastModified = n, this.meta = i, this.struct = a, this.renderingState = c, this.blocksInLimbo = l, this.blockInfos = u, this.blockFrontendStates = d, this.ctxExportTplHolder = f;
872
872
  }
873
873
  fixProblemsAndMigrate() {
874
874
  this.blockInfos.forEach((t) => {
@@ -920,7 +920,7 @@ class qe {
920
920
  throw new Error("block not found");
921
921
  }
922
922
  setBlockFieldObj(e, t, r) {
923
- const o = j(this.rid, U(e, t));
923
+ const o = j(this.rid, V(e, t));
924
924
  if (r.ref === void 0) throw new Error("Can't set value with empty ref");
925
925
  this.getBlockInfo(e).fields[t] === void 0 ? this.tx.createField(o, "Dynamic", r.ref) : this.tx.setField(o, r.ref), this.getBlockInfo(e).fields[t] = {
926
926
  modCount: this.globalModCount++,
@@ -935,7 +935,7 @@ class qe {
935
935
  const o = this.getBlockInfo(e);
936
936
  for (const n of t) {
937
937
  const i = o.fields;
938
- n in i && (this.tx.removeField(j(this.rid, U(e, n))), delete i[n], this.fieldsChanged = !0, r = !0);
938
+ n in i && (this.tx.removeField(j(this.rid, V(e, n))), delete i[n], this.fieldsChanged = !0, r = !0);
939
939
  }
940
940
  return r;
941
941
  }
@@ -973,8 +973,8 @@ class qe {
973
973
  JSON.parse(o);
974
974
  const i = Buffer.from(o);
975
975
  if (Buffer.compare(n.fields.currentArgs.value, i) === 0) continue;
976
- const c = this.tx.createValue(L.JsonObject, i);
977
- this.setBlockField(r, "currentArgs", c, "Ready", i), this.blocksWithChangedInputs.add(r), t.push(r);
976
+ const a = this.tx.createValue(L.JsonObject, i);
977
+ this.setBlockField(r, "currentArgs", a, "Ready", i), this.blocksWithChangedInputs.add(r), t.push(r);
978
978
  }
979
979
  this.getStagingGraph().traverse("downstream", t, ({ id: r }) => this.resetStaging(r)), t.length > 0 && this.updateLastModified();
980
980
  }
@@ -1060,12 +1060,12 @@ class qe {
1060
1060
  var u;
1061
1061
  return (u = this.blockInfos.get(l)) == null ? void 0 : u.actualProductionInputs;
1062
1062
  }
1063
- ), c = er(r, n), a = er(o, i);
1064
- for (const l of c.onlyInA) {
1063
+ ), a = er(r, n), c = er(o, i);
1064
+ for (const l of a.onlyInA) {
1065
1065
  const { fields: u } = this.getBlockInfo(l);
1066
1066
  this.deleteBlockFields(l, ...Object.keys(u)), this.blockInfos.delete(l), this.blocksInLimbo.delete(l) && (this.renderingStateChanged = !0), this.blockFrontendStates.delete(l) && this.changedBlockFrontendStates.add(l);
1067
1067
  }
1068
- for (const l of c.onlyInB) {
1068
+ for (const l of a.onlyInB) {
1069
1069
  const u = new tr(l, {});
1070
1070
  this.blockInfos.set(l, u);
1071
1071
  const d = t(l), f = Zt(this.tx, d.blockPack);
@@ -1075,10 +1075,10 @@ class qe {
1075
1075
  this.createJsonFieldValue(Gt)
1076
1076
  ), this.setBlockFieldObj(l, "currentArgs", this.createJsonFieldValueByContent(d.args)), d.uiState && (this.blockFrontendStates.set(l, d.uiState), this.changedBlockFrontendStates.add(l)), u.check();
1077
1077
  }
1078
- for (const l of c.different) this.resetStaging(l);
1079
- o.traverse("downstream", [...a.different], (l) => {
1078
+ for (const l of a.different) this.resetStaging(l);
1079
+ o.traverse("downstream", [...c.different], (l) => {
1080
1080
  this.resetOrLimboProduction(l.id);
1081
- }), (c.onlyInB.size > 0 || c.onlyInA.size > 0 || c.different.size > 0) && this.resetStagingRefreshTimestamp(), this.struct = e, this.structureChanged = !0, this.stagingGraph = void 0, this.pendingProductionGraph = void 0, this.actualProductionGraph = void 0, this.updateLastModified();
1081
+ }), (a.onlyInB.size > 0 || a.onlyInA.size > 0 || a.different.size > 0) && this.resetStagingRefreshTimestamp(), this.struct = e, this.structureChanged = !0, this.stagingGraph = void 0, this.pendingProductionGraph = void 0, this.actualProductionGraph = void 0, this.updateLastModified();
1082
1082
  }
1083
1083
  //
1084
1084
  // Structure change helpers
@@ -1090,9 +1090,9 @@ class qe {
1090
1090
  else {
1091
1091
  let n = !1;
1092
1092
  for (const i of o.groups) {
1093
- const c = i.blocks.findIndex((a) => a.id === r);
1094
- if (!(c < 0)) {
1095
- i.blocks.splice(c, 0, e), n = !0;
1093
+ const a = i.blocks.findIndex((c) => c.id === r);
1094
+ if (!(a < 0)) {
1095
+ i.blocks.splice(a, 0, e), n = !0;
1096
1096
  break;
1097
1097
  }
1098
1098
  }
@@ -1143,24 +1143,24 @@ class qe {
1143
1143
  });
1144
1144
  else
1145
1145
  for (const i of r) {
1146
- const c = o.nodes.get(i);
1147
- if (c === void 0) throw new Error(`Can't find block with id: ${i}`);
1148
- for (const a of c.upstream)
1149
- if (!r.has(a))
1146
+ const a = o.nodes.get(i);
1147
+ if (a === void 0) throw new Error(`Can't find block with id: ${i}`);
1148
+ for (const c of a.upstream)
1149
+ if (!r.has(c))
1150
1150
  throw new Error("Can't render blocks not including all upstreams.");
1151
1151
  }
1152
1152
  const n = /* @__PURE__ */ new Set();
1153
1153
  for (const i of te(this.structure)) {
1154
1154
  if (!r.has(i.id)) continue;
1155
- let c = this.getBlockInfo(i.id).requireProductionRendering || this.blocksInLimbo.has(i.id);
1156
- if (!c) {
1157
- for (const a of o.nodes.get(i.id).upstream)
1158
- if (n.has(a)) {
1159
- c = !0;
1155
+ let a = this.getBlockInfo(i.id).requireProductionRendering || this.blocksInLimbo.has(i.id);
1156
+ if (!a) {
1157
+ for (const c of o.nodes.get(i.id).upstream)
1158
+ if (n.has(c)) {
1159
+ a = !0;
1160
1160
  break;
1161
1161
  }
1162
1162
  }
1163
- c && (this.renderProductionFor(i.id), n.add(i.id));
1163
+ a && (this.renderProductionFor(i.id), n.add(i.id));
1164
1164
  }
1165
1165
  return o.traverse("downstream", [...n], (i) => {
1166
1166
  n.has(i.id) || this.resetOrLimboProduction(i.id);
@@ -1169,26 +1169,26 @@ class qe {
1169
1169
  /** Stops running blocks from the list and modify states of other blocks
1170
1170
  * accordingly */
1171
1171
  stopProduction(...e) {
1172
- var i, c;
1172
+ var i, a;
1173
1173
  const t = this.getActualProductionGraph(), r = new xr(e), o = new Set(e), n = [];
1174
1174
  for (; !r.isEmpty(); ) {
1175
- const a = r.shift(), l = this.getBlockInfo(a).fields;
1176
- if (!(((i = l.prodOutput) == null ? void 0 : i.status) === "Ready" && ((c = l.prodCtx) == null ? void 0 : c.status) === "Ready") && this.deleteBlockFields(a, "prodOutput", "prodCtx", "prodUiCtx", "prodArgs")) {
1177
- n.push(a);
1178
- for (const u of t.traverseIdsExcludingRoots("downstream", a))
1175
+ const c = r.shift(), l = this.getBlockInfo(c).fields;
1176
+ if (!(((i = l.prodOutput) == null ? void 0 : i.status) === "Ready" && ((a = l.prodCtx) == null ? void 0 : a.status) === "Ready") && this.deleteBlockFields(c, "prodOutput", "prodCtx", "prodUiCtx", "prodArgs")) {
1177
+ n.push(c);
1178
+ for (const u of t.traverseIdsExcludingRoots("downstream", c))
1179
1179
  o.has(u) || (r.push(u), o.add(u));
1180
1180
  }
1181
1181
  }
1182
- for (const a of t.traverseIdsExcludingRoots("downstream", ...n))
1183
- this.resetOrLimboProduction(a);
1182
+ for (const c of t.traverseIdsExcludingRoots("downstream", ...n))
1183
+ this.resetOrLimboProduction(c);
1184
1184
  }
1185
1185
  traverseWithStagingLag(e) {
1186
1186
  const t = /* @__PURE__ */ new Map();
1187
1187
  this.getStagingGraph().nodes.forEach((o) => {
1188
1188
  let i = this.getBlockInfo(o.id).stagingRendered ? 0 : 1;
1189
- o.upstream.forEach((c) => {
1190
- const a = t.get(c);
1191
- a !== 0 && (i = Math.max(a + 1, i));
1189
+ o.upstream.forEach((a) => {
1190
+ const c = t.get(a);
1191
+ c !== 0 && (i = Math.max(c + 1, i));
1192
1192
  }), e(o.id, i), t.set(o.id, i);
1193
1193
  });
1194
1194
  }
@@ -1251,7 +1251,7 @@ class qe {
1251
1251
  }
1252
1252
  }
1253
1253
  static async load(e, t, r) {
1254
- const o = e.getResourceData(t, !0), n = e.getKValueJson(t, Gr), i = e.getKValueJson(t, Te), c = e.getKValueJson(t, Ae), a = e.getKValueJson(t, de), l = e.getKValueJson(t, We), u = e.listKeyValuesString(t), [
1254
+ const o = e.getResourceData(t, !0), n = e.getKValueJson(t, Gr), i = e.getKValueJson(t, Te), a = e.getKValueJson(t, Ae), c = e.getKValueJson(t, de), l = e.getKValueJson(t, We), u = e.listKeyValuesString(t), [
1255
1255
  d,
1256
1256
  f,
1257
1257
  h,
@@ -1263,8 +1263,8 @@ class qe {
1263
1263
  o,
1264
1264
  n,
1265
1265
  i,
1266
- c,
1267
1266
  a,
1267
+ c,
1268
1268
  l,
1269
1269
  u
1270
1270
  ]);
@@ -1436,9 +1436,9 @@ function hn(s) {
1436
1436
  for (const o of s.listInputFields()) {
1437
1437
  const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
1438
1438
  if (i === void 0) throw new Error(`no partition keys for super key ${o}`);
1439
- for (const c of i) {
1440
- const a = JSON.stringify([...JSON.parse(o), ...JSON.parse(c)]);
1441
- r[a] = n.traverse({ field: c, errorIfFieldNotSet: !0 }).resourceInfo;
1439
+ for (const a of i) {
1440
+ const c = JSON.stringify([...JSON.parse(o), ...JSON.parse(a)]);
1441
+ r[c] = n.traverse({ field: a, errorIfFieldNotSet: !0 }).resourceInfo;
1442
1442
  }
1443
1443
  }
1444
1444
  return {
@@ -1472,22 +1472,22 @@ function hn(s) {
1472
1472
  for (const o of s.listInputFields()) {
1473
1473
  const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
1474
1474
  if (i === void 0) throw new Error(`no partition keys for super key ${o}`);
1475
- for (const c of i)
1476
- if (c.endsWith(".index")) {
1477
- const a = c.slice(0, c.length - 6), l = JSON.stringify([...JSON.parse(o), ...JSON.parse(a)]);
1475
+ for (const a of i)
1476
+ if (a.endsWith(".index")) {
1477
+ const c = a.slice(0, a.length - 6), l = JSON.stringify([...JSON.parse(o), ...JSON.parse(c)]);
1478
1478
  let u = r[l];
1479
1479
  u === void 0 && (u = {}, r[l] = u), r[l].index = n.traverse({
1480
- field: c,
1480
+ field: a,
1481
1481
  errorIfFieldNotSet: !0
1482
1482
  }).resourceInfo;
1483
- } else if (c.endsWith(".values")) {
1484
- const a = c.slice(0, c.length - 7), l = JSON.stringify([...JSON.parse(o), ...JSON.parse(a)]);
1483
+ } else if (a.endsWith(".values")) {
1484
+ const c = a.slice(0, a.length - 7), l = JSON.stringify([...JSON.parse(o), ...JSON.parse(c)]);
1485
1485
  let u = r[l];
1486
1486
  u === void 0 && (u = {}, r[l] = u), r[l].values = n.traverse({
1487
- field: c,
1487
+ field: a,
1488
1488
  errorIfFieldNotSet: !0
1489
1489
  }).resourceInfo;
1490
- } else throw new Error(`unrecognized part field name: ${c}`);
1490
+ } else throw new Error(`unrecognized part field name: ${a}`);
1491
1491
  }
1492
1492
  return {
1493
1493
  type: "BinaryPartitioned",
@@ -1521,7 +1521,7 @@ function mn(s, e) {
1521
1521
  return re({ resolvePath: s, name: e });
1522
1522
  }
1523
1523
  function Zr(s, e = !0, t = !1, r = "") {
1524
- var c, a, l;
1524
+ var a, c, l;
1525
1525
  const o = /^(?<name>.*)\.(?<type>spec|data)$/, n = /* @__PURE__ */ new Map();
1526
1526
  for (const u of s.listInputFields()) {
1527
1527
  const d = u.match(o);
@@ -1529,13 +1529,13 @@ function Zr(s, e = !0, t = !1, r = "") {
1529
1529
  if (e) throw new Error(`unexpected field name ${u}`);
1530
1530
  continue;
1531
1531
  }
1532
- let f = B((c = d.groups) == null ? void 0 : c.name);
1532
+ let f = B((a = d.groups) == null ? void 0 : a.name);
1533
1533
  if (!f.startsWith(r)) {
1534
1534
  if (e) throw new Error(`unexpected field name ${u}`);
1535
1535
  continue;
1536
1536
  }
1537
1537
  f = f.slice(r.length);
1538
- const h = B((a = d.groups) == null ? void 0 : a.type);
1538
+ const h = B((c = d.groups) == null ? void 0 : c.type);
1539
1539
  let g = n.get(f);
1540
1540
  switch (g === void 0 && (g = {}, n.set(f, g)), h) {
1541
1541
  case "spec":
@@ -1564,17 +1564,17 @@ function vn(s, e = !0, t = "", r) {
1564
1564
  const o = Zr(s, e, !1, t);
1565
1565
  Ws(o.locked);
1566
1566
  const n = {};
1567
- for (const [i, c] of o.results) {
1568
- if (c.spec === void 0) throw new Error(`no spec for key ${i}`);
1569
- if (c.hasData !== !0 || c.data === void 0)
1567
+ for (const [i, a] of o.results) {
1568
+ if (a.spec === void 0) throw new Error(`no spec for key ${i}`);
1569
+ if (a.hasData !== !0 || a.data === void 0)
1570
1570
  throw new Error(`no data for key ${i}`);
1571
- const a = c.data();
1572
- if (a === void 0) throw new Error(`no data for key ${i}`);
1573
- if (!a.ok) throw new Js(a.error);
1571
+ const c = a.data();
1572
+ if (c === void 0) throw new Error(`no data for key ${i}`);
1573
+ if (!c.ok) throw new Js(c.error);
1574
1574
  n[i] = {
1575
- id: r.length === 0 ? gn(c.spec, a.value) : mn(r, i),
1576
- spec: c.spec,
1577
- data: a.value
1575
+ id: r.length === 0 ? gn(a.spec, c.value) : mn(r, i),
1576
+ spec: a.spec,
1577
+ data: c.value
1578
1578
  };
1579
1579
  }
1580
1580
  return n;
@@ -1600,18 +1600,18 @@ class Tt {
1600
1600
  this.allSpecsAvailable = r;
1601
1601
  }
1602
1602
  getSpecByRef(e, t) {
1603
- var n, i, c, a, l, u;
1603
+ var n, i, a, c, l, u;
1604
1604
  const r = this.blocks.get(e);
1605
1605
  if (r === void 0) return;
1606
- let o = (c = (i = (n = r.prod) == null ? void 0 : n.results) == null ? void 0 : i.get(t)) == null ? void 0 : c.spec;
1607
- if (o !== void 0 || (o = (u = (l = (a = r.staging) == null ? void 0 : a.results) == null ? void 0 : l.get(t)) == null ? void 0 : u.spec, o !== void 0)) return o;
1606
+ let o = (a = (i = (n = r.prod) == null ? void 0 : n.results) == null ? void 0 : i.get(t)) == null ? void 0 : a.spec;
1607
+ if (o !== void 0 || (o = (u = (l = (c = r.staging) == null ? void 0 : c.results) == null ? void 0 : l.get(t)) == null ? void 0 : u.spec, o !== void 0)) return o;
1608
1608
  r.staging === void 0 ? this.ctx.markUnstable(`staging_not_rendered:${e}`) : r.staging.locked ? r.prod !== void 0 && !r.prod.locked && this.ctx.markUnstable(`prod_not_locked:${e}`) : this.ctx.markUnstable(`staging_not_locked:${e}`);
1609
1609
  }
1610
1610
  getDataOrErrorByRef(e, t) {
1611
- var i, c, a;
1611
+ var i, a, c;
1612
1612
  const r = this.blocks.get(e);
1613
1613
  if (r === void 0) return;
1614
- let o = (c = (i = r.prod) == null ? void 0 : i.results) == null ? void 0 : c.get(t), n = (a = o == null ? void 0 : o.data) == null ? void 0 : a.call(o);
1614
+ let o = (a = (i = r.prod) == null ? void 0 : i.results) == null ? void 0 : a.get(t), n = (c = o == null ? void 0 : o.data) == null ? void 0 : c.call(o);
1615
1615
  if (o !== void 0 && o.spec !== void 0 && n !== void 0)
1616
1616
  return Tr(n, (l) => ({
1617
1617
  id: sr(e, t),
@@ -1647,30 +1647,30 @@ class Tt {
1647
1647
  let t = !0, r;
1648
1648
  const o = (i) => {
1649
1649
  r === void 0 && (r = i), t = !1;
1650
- }, n = (i, c, a) => {
1651
- if (a.spec !== void 0 && a.hasData === !0 && a.data !== void 0) {
1652
- const l = a.data();
1650
+ }, n = (i, a, c) => {
1651
+ if (c.spec !== void 0 && c.hasData === !0 && c.data !== void 0) {
1652
+ const l = c.data();
1653
1653
  l !== void 0 ? e.push({
1654
- ref: xe(i, c),
1654
+ ref: xe(i, a),
1655
1655
  obj: {
1656
- id: l.ok ? sr(i, c) : void 0,
1657
- spec: a.spec,
1656
+ id: l.ok ? sr(i, a) : void 0,
1657
+ spec: c.spec,
1658
1658
  data: l
1659
1659
  }
1660
- }) : o(`no_data:${i}:${c}`);
1660
+ }) : o(`no_data:${i}:${a}`);
1661
1661
  }
1662
1662
  };
1663
- for (const [i, c] of this.blocks) {
1664
- const a = /* @__PURE__ */ new Set();
1665
- if (c.prod !== void 0) {
1666
- c.prod.locked || o(`prod_not_locked:${i}`);
1667
- for (const [l, u] of c.prod.results)
1668
- a.add(l), n(i, l, u);
1663
+ for (const [i, a] of this.blocks) {
1664
+ const c = /* @__PURE__ */ new Set();
1665
+ if (a.prod !== void 0) {
1666
+ a.prod.locked || o(`prod_not_locked:${i}`);
1667
+ for (const [l, u] of a.prod.results)
1668
+ c.add(l), n(i, l, u);
1669
1669
  }
1670
- if (c.staging !== void 0) {
1671
- c.staging.locked || o(`staging_not_locked:${i}`);
1672
- for (const [l, u] of c.staging.results)
1673
- a.has(l) || n(i, l, u);
1670
+ if (a.staging !== void 0) {
1671
+ a.staging.locked || o(`staging_not_locked:${i}`);
1672
+ for (const [l, u] of a.staging.results)
1673
+ c.has(l) || n(i, l, u);
1674
1674
  }
1675
1675
  }
1676
1676
  return { entries: e, isComplete: t, instabilityMarker: r };
@@ -1682,20 +1682,20 @@ class Tt {
1682
1682
  r === void 0 && (r = n), t = !1;
1683
1683
  };
1684
1684
  for (const [n, i] of this.blocks) {
1685
- const c = /* @__PURE__ */ new Set();
1685
+ const a = /* @__PURE__ */ new Set();
1686
1686
  if (i.staging !== void 0) {
1687
1687
  i.staging.locked || o(`staging_not_locked:${n}`);
1688
- for (const [a, l] of i.staging.results)
1688
+ for (const [c, l] of i.staging.results)
1689
1689
  l.spec !== void 0 && (e.push({
1690
- ref: xe(n, a),
1690
+ ref: xe(n, c),
1691
1691
  obj: l.spec
1692
- }), c.add(a));
1692
+ }), a.add(c));
1693
1693
  } else o(`staging_not_rendered:${n}`);
1694
1694
  if (i.prod !== void 0) {
1695
1695
  i.prod.locked || o(`prod_not_locked:${n}`);
1696
- for (const [a, l] of i.prod.results)
1697
- c.has(a) || l.spec !== void 0 && e.push({
1698
- ref: xe(n, a),
1696
+ for (const [c, l] of i.prod.results)
1697
+ a.has(c) || l.spec !== void 0 && e.push({
1698
+ ref: xe(n, c),
1699
1699
  obj: l.spec
1700
1700
  });
1701
1701
  }
@@ -1706,11 +1706,11 @@ class Tt {
1706
1706
  const t = [];
1707
1707
  for (const r of this.blocks.values()) {
1708
1708
  const o = /* @__PURE__ */ new Set(), n = (i) => {
1709
- for (const [c, a] of i.results)
1710
- o.has(c) || a.spec === void 0 || (o.add(c), Ss(e, a.spec) && t.push({
1711
- label: r.info.label + " / " + c,
1712
- ref: xe(r.info.id, c),
1713
- spec: a.spec
1709
+ for (const [a, c] of i.results)
1710
+ o.has(a) || c.spec === void 0 || (o.add(a), Ss(e, c.spec) && t.push({
1711
+ label: r.info.label + " / " + a,
1712
+ ref: xe(r.info.id, a),
1713
+ spec: c.spec
1714
1714
  }));
1715
1715
  };
1716
1716
  r.staging !== void 0 && n(r.staging), r.prod !== void 0 && n(r.prod);
@@ -1718,33 +1718,33 @@ class Tt {
1718
1718
  return t;
1719
1719
  }
1720
1720
  static create(e, t, r) {
1721
- const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(de)), c = Ct(n).traverseIds("upstream", r), a = /* @__PURE__ */ new Map();
1721
+ const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(de)), a = Ct(n).traverseIds("upstream", r), c = /* @__PURE__ */ new Map();
1722
1722
  for (const l of te(n)) {
1723
- if (!c.has(l.id)) continue;
1723
+ if (!a.has(l.id)) continue;
1724
1724
  const u = or(
1725
1725
  o.traverse({
1726
- field: U(l.id, "prodCtx"),
1726
+ field: V(l.id, "prodCtx"),
1727
1727
  ignoreError: !0,
1728
1728
  pureFieldErrorToUndefined: !0,
1729
1729
  stableIfNotFound: !0
1730
1730
  }) !== void 0,
1731
1731
  o.traverseOrError({
1732
- field: U(l.id, "prodUiCtx"),
1732
+ field: V(l.id, "prodUiCtx"),
1733
1733
  stableIfNotFound: !0
1734
1734
  })
1735
1735
  ), d = or(
1736
1736
  o.traverse({
1737
- field: U(l.id, "stagingCtx"),
1737
+ field: V(l.id, "stagingCtx"),
1738
1738
  ignoreError: !0,
1739
1739
  pureFieldErrorToUndefined: !0
1740
1740
  }) !== void 0,
1741
1741
  o.traverseOrError({
1742
- field: U(l.id, "stagingUiCtx")
1742
+ field: V(l.id, "stagingUiCtx")
1743
1743
  })
1744
1744
  );
1745
- a.set(l.id, { info: l, prod: u, staging: d });
1745
+ c.set(l.id, { info: l, prod: u, staging: d });
1746
1746
  }
1747
- return new Tt(e, a);
1747
+ return new Tt(e, c);
1748
1748
  }
1749
1749
  }
1750
1750
  function or(s, e) {
@@ -1755,16 +1755,23 @@ function or(s, e) {
1755
1755
  function At(s, e) {
1756
1756
  return {
1757
1757
  blockId: e,
1758
- args: (o) => B(
1759
- o.accessor(s).node().traverse({
1760
- field: U(e, "currentArgs"),
1758
+ args: (n) => B(
1759
+ n.accessor(s).node().traverse({
1760
+ field: V(e, "currentArgs"),
1761
1761
  errorIfFieldNotSet: !0
1762
1762
  }).getDataAsString()
1763
1763
  ),
1764
- uiState: (o) => o.accessor(s).node().getKeyValueAsString(vt(e)),
1765
- blockMeta: (o) => {
1766
- const n = o.accessor(s).node(), i = B(n.getKeyValueAsJson(de)), c = /* @__PURE__ */ new Map();
1767
- for (const a of te(i)) c.set(a.id, a);
1764
+ activeArgs: (n) => {
1765
+ var i;
1766
+ return (i = n.accessor(s).node().traverse({
1767
+ field: V(e, "prodArgs"),
1768
+ stableIfNotFound: !0
1769
+ })) == null ? void 0 : i.getDataAsString();
1770
+ },
1771
+ uiState: (n) => n.accessor(s).node().getKeyValueAsString(vt(e)),
1772
+ blockMeta: (n) => {
1773
+ const i = n.accessor(s).node(), a = B(i.getKeyValueAsJson(de)), c = /* @__PURE__ */ new Map();
1774
+ for (const l of te(a)) c.set(l.id, l);
1768
1775
  return c;
1769
1776
  }
1770
1777
  };
@@ -1775,7 +1782,7 @@ function es(s, e) {
1775
1782
  prod: (t) => {
1776
1783
  var r;
1777
1784
  return (r = t.accessor(s).node({ ignoreError: !0 }).traverse({
1778
- field: U(e, "prodOutput"),
1785
+ field: V(e, "prodOutput"),
1779
1786
  stableIfNotFound: !0,
1780
1787
  ignoreError: !0
1781
1788
  })) == null ? void 0 : r.persist();
@@ -1783,7 +1790,7 @@ function es(s, e) {
1783
1790
  staging: (t) => {
1784
1791
  var o;
1785
1792
  const r = (o = t.accessor(s).node({ ignoreError: !0 }).traverse({
1786
- field: U(e, "stagingOutput"),
1793
+ field: V(e, "stagingOutput"),
1787
1794
  ignoreError: !0
1788
1795
  })) == null ? void 0 : o.persist();
1789
1796
  return r === void 0 && t.markUnstable("staging_not_rendered"), r;
@@ -1916,8 +1923,8 @@ function kn(s, e) {
1916
1923
  if (r === void 0) return k(void 0);
1917
1924
  const o = {};
1918
1925
  for (const [n, i] of Object.entries(r)) {
1919
- const c = { ...s, [e.itVar]: i };
1920
- o[n] = $(c, e.mapping);
1926
+ const a = { ...s, [e.itVar]: i };
1927
+ o[n] = $(a, e.mapping);
1921
1928
  }
1922
1929
  return () => ({
1923
1930
  type: "ScheduleSubroutine",
@@ -1953,12 +1960,12 @@ function Ln(s, e) {
1953
1960
  const r = t.source;
1954
1961
  return r === void 0 ? k(void 0) : ({ cCtx: o }) => {
1955
1962
  const n = o.accessor(r).node(), i = {};
1956
- for (const c of n.listInputFields()) {
1957
- const a = n.traverse(c);
1958
- if (a === void 0) i[c] = k(void 0);
1963
+ for (const a of n.listInputFields()) {
1964
+ const c = n.traverse(a);
1965
+ if (c === void 0) i[a] = k(void 0);
1959
1966
  else {
1960
- const l = { ...s, [e.itVar]: a.persist() };
1961
- i[c] = $(l, e.mapping);
1967
+ const l = { ...s, [e.itVar]: c.persist() };
1968
+ i[a] = $(l, e.mapping);
1962
1969
  }
1963
1970
  }
1964
1971
  return {
@@ -1973,7 +1980,7 @@ const Nn = (s) => k(s), Dn = (s) => {
1973
1980
  const e = s.source;
1974
1981
  return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
1975
1982
  type: "ScheduleComputable",
1976
- computable: V.make(
1983
+ computable: U.make(
1977
1984
  (r) => t.blobDriver.getDownloadedBlob(r.accessor(e).node().resourceInfo),
1978
1985
  {
1979
1986
  postprocessValue: async (r) => {
@@ -1989,7 +1996,7 @@ const Nn = (s) => k(s), Dn = (s) => {
1989
1996
  const o = t.accessor(e).node().resourceInfo;
1990
1997
  return {
1991
1998
  type: "ScheduleComputable",
1992
- computable: V.make(() => r.blobDriver.getDownloadedBlob(o), {
1999
+ computable: U.make(() => r.blobDriver.getDownloadedBlob(o), {
1993
2000
  postprocessValue: async (n) => n === void 0 ? void 0 : (await r.blobDriver.getContent(n.handle)).toString()
1994
2001
  })
1995
2002
  };
@@ -1998,7 +2005,7 @@ const Nn = (s) => k(s), Dn = (s) => {
1998
2005
  const e = s.source;
1999
2006
  return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
2000
2007
  type: "ScheduleComputable",
2001
- computable: V.make(
2008
+ computable: U.make(
2002
2009
  (r) => t.blobDriver.getDownloadedBlob(r.accessor(e).node().resourceInfo),
2003
2010
  {
2004
2011
  postprocessValue: async (r) => {
@@ -2260,28 +2267,28 @@ function qn() {
2260
2267
  return { pendingSubroutines: /* @__PURE__ */ new Map() };
2261
2268
  }
2262
2269
  function nr(s, e, t, r) {
2263
- const o = new xr(t), n = (c, a) => {
2264
- if (Wn(c))
2265
- return e.result = a, !1;
2266
- const l = B(e.pendingSubroutines.get(c.op));
2267
- if (c.arg in l.args) throw new Error("argument already set");
2268
- return l.args[c.arg] = a, l.argCounter--, l.argCounter === 0 && (e.pendingSubroutines.delete(c.op), o.push({
2270
+ const o = new xr(t), n = (a, c) => {
2271
+ if (Wn(a))
2272
+ return e.result = c, !1;
2273
+ const l = B(e.pendingSubroutines.get(a.op));
2274
+ if (a.arg in l.args) throw new Error("argument already set");
2275
+ return l.args[a.arg] = c, l.argCounter--, l.argCounter === 0 && (e.pendingSubroutines.delete(a.op), o.push({
2269
2276
  destination: l.destination,
2270
2277
  operation: l.subroutine(l.args)
2271
2278
  })), !0;
2272
2279
  }, i = [];
2273
2280
  e: for (; o.length > 0; ) {
2274
- const c = o.shift(), a = c.operation(s);
2275
- switch (a.type) {
2281
+ const a = o.shift(), c = a.operation(s);
2282
+ switch (c.type) {
2276
2283
  case "ReturnResult":
2277
- if (!n(c.destination, a.result)) break e;
2284
+ if (!n(a.destination, c.result)) break e;
2278
2285
  break;
2279
2286
  case "ScheduleSubroutine":
2280
- const l = Symbol(), u = Object.entries(a.args), d = u.length;
2287
+ const l = Symbol(), u = Object.entries(c.args), d = u.length;
2281
2288
  if (d === 0)
2282
2289
  o.push({
2283
- destination: c.destination,
2284
- operation: a.subroutine({})
2290
+ destination: a.destination,
2291
+ operation: c.subroutine({})
2285
2292
  });
2286
2293
  else {
2287
2294
  for (const [f, h] of u)
@@ -2292,8 +2299,8 @@ function nr(s, e, t, r) {
2292
2299
  e.pendingSubroutines.set(l, {
2293
2300
  argCounter: d,
2294
2301
  args: {},
2295
- subroutine: a.subroutine,
2296
- destination: c.destination
2302
+ subroutine: c.subroutine,
2303
+ destination: a.destination
2297
2304
  });
2298
2305
  }
2299
2306
  break;
@@ -2301,12 +2308,12 @@ function nr(s, e, t, r) {
2301
2308
  if (!r)
2302
2309
  throw new Error("asynchronous operations are forbidden in this context");
2303
2310
  i.push({
2304
- destination: c.destination,
2305
- computable: a.computable
2311
+ destination: a.destination,
2312
+ computable: c.computable
2306
2313
  });
2307
2314
  break;
2308
2315
  default:
2309
- G(a);
2316
+ G(c);
2310
2317
  }
2311
2318
  }
2312
2319
  return i;
@@ -2321,13 +2328,13 @@ function ns(s, e, t, r = {}) {
2321
2328
  ),
2322
2329
  cfg: t
2323
2330
  });
2324
- return V.makeRaw(
2331
+ return U.makeRaw(
2325
2332
  (n) => {
2326
- const i = { drivers: s, cCtx: n }, c = qn();
2333
+ const i = { drivers: s, cCtx: n }, a = qn();
2327
2334
  return {
2328
2335
  ir: nr(
2329
2336
  i,
2330
- c,
2337
+ a,
2331
2338
  [
2332
2339
  {
2333
2340
  destination: Hn,
@@ -2346,10 +2353,10 @@ function ns(s, e, t, r = {}) {
2346
2353
  throw new Error("asynchronous operations are forbidden in this context");
2347
2354
  }
2348
2355
  }, f = /* @__PURE__ */ new Map();
2349
- for (const [g, E] of c.pendingSubroutines)
2356
+ for (const [g, E] of a.pendingSubroutines)
2350
2357
  f.set(g, { ...E, args: { ...E.args } });
2351
2358
  const h = {
2352
- result: c.result,
2359
+ result: a.result,
2353
2360
  pendingSubroutines: f
2354
2361
  };
2355
2362
  if (nr(d, h, u, !1), !("result" in h))
@@ -2491,10 +2498,10 @@ class Xe {
2491
2498
  parsePObjectCollection(e, t, r, ...o) {
2492
2499
  const n = this.getAccessor(e);
2493
2500
  if (!n.getIsReadyOrError()) return;
2494
- const i = vn(n, t, r, o), c = {};
2495
- for (const [a, l] of Object.entries(i))
2496
- c[a] = le(l, (u) => this.wrapAccessor(u));
2497
- return c;
2501
+ const i = vn(n, t, r, o), a = {};
2502
+ for (const [c, l] of Object.entries(i))
2503
+ a[c] = le(l, (u) => this.wrapAccessor(u));
2504
+ return a;
2498
2505
  }
2499
2506
  //
2500
2507
  // Blobs
@@ -2507,7 +2514,7 @@ class Xe {
2507
2514
  const t = this.getAccessor(e).resourceInfo;
2508
2515
  return this.registerComputable(
2509
2516
  "getBlobContentAsString",
2510
- V.make((r) => this.env.driverKit.blobDriver.getDownloadedBlob(t, r), {
2517
+ U.make((r) => this.env.driverKit.blobDriver.getDownloadedBlob(t, r), {
2511
2518
  postprocessValue: async (r) => {
2512
2519
  if (r !== void 0)
2513
2520
  return Buffer.from(await this.env.driverKit.blobDriver.getContent(r.handle)).toString(
@@ -2521,7 +2528,7 @@ class Xe {
2521
2528
  const t = this.getAccessor(e).resourceInfo;
2522
2529
  return this.registerComputable(
2523
2530
  "getBlobContentAsBase64",
2524
- V.make((r) => this.env.driverKit.blobDriver.getDownloadedBlob(t, r), {
2531
+ U.make((r) => this.env.driverKit.blobDriver.getDownloadedBlob(t, r), {
2525
2532
  postprocessValue: async (r) => {
2526
2533
  if (r !== void 0)
2527
2534
  return Buffer.from(await this.env.driverKit.blobDriver.getContent(r.handle)).toString(
@@ -2649,10 +2656,7 @@ class Xe {
2649
2656
  "can't instantiate PFrames from this context (most porbably called from the future mapper)"
2650
2657
  );
2651
2658
  return this.env.driverKit.pFrameDriver.createPFrame(
2652
- e.map((t) => le(
2653
- t,
2654
- (r) => typeof r == "string" ? this.getAccessor(r) : r
2655
- )),
2659
+ e.map((t) => le(t, (r) => typeof r == "string" ? this.getAccessor(r) : r)),
2656
2660
  this.computableCtx
2657
2661
  );
2658
2662
  }
@@ -2662,10 +2666,10 @@ class Xe {
2662
2666
  "can't instantiate PTable from this context (most porbably called from the future mapper)"
2663
2667
  );
2664
2668
  return this.env.driverKit.pFrameDriver.createPTable(
2665
- ht(e, (t) => le(
2666
- t,
2667
- (r) => typeof r == "string" ? this.getAccessor(r) : r
2668
- )),
2669
+ ht(
2670
+ e,
2671
+ (t) => le(t, (r) => typeof r == "string" ? this.getAccessor(r) : r)
2672
+ ),
2669
2673
  this.computableCtx
2670
2674
  );
2671
2675
  }
@@ -2755,85 +2759,86 @@ class Xe {
2755
2759
  }
2756
2760
  injectCtx() {
2757
2761
  mt.withScope((e) => {
2758
- const t = e.manage(this.vm.newObject()), r = this.blockCtx.args(this.computableCtx), o = this.blockCtx.uiState(this.computableCtx);
2759
- this.vm.setProp(t, "args", e.manage(this.vm.newString(r))), o !== void 0 && this.vm.setProp(t, "uiState", e.manage(this.vm.newString(o))), this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
2762
+ const t = e.manage(this.vm.newObject()), r = this.blockCtx.args(this.computableCtx), o = this.blockCtx.activeArgs(this.computableCtx), n = this.blockCtx.uiState(this.computableCtx);
2763
+ this.vm.setProp(t, "args", e.manage(this.vm.newString(r))), n !== void 0 && this.vm.setProp(t, "uiState", e.manage(this.vm.newString(n))), o !== void 0 && this.vm.setProp(t, "activeArgs", e.manage(this.vm.newString(o))), this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
2760
2764
  t,
2761
2765
  "featureFlags",
2762
2766
  this.exportObjectUniversal(bs.GlobalCfgRenderCtxFeatureFlags, e)
2763
2767
  );
2764
- const n = (i, c) => {
2765
- this.vm.newFunction(i, c).consume((a) => this.vm.setProp(t, i, a));
2768
+ const i = (a, c) => {
2769
+ this.vm.newFunction(a, c).consume((l) => this.vm.setProp(t, a, l));
2766
2770
  };
2767
- n("getAccessorHandleByName", (i) => this.exportSingleValue(
2768
- this.getAccessorHandleByName(this.vm.getString(i)),
2771
+ i("getAccessorHandleByName", (a) => this.exportSingleValue(
2772
+ this.getAccessorHandleByName(this.vm.getString(a)),
2769
2773
  void 0
2770
- )), n("resolveWithCommon", (i, c, ...a) => this.exportSingleValue(
2774
+ )), i("resolveWithCommon", (a, c, ...l) => this.exportSingleValue(
2771
2775
  this.resolveWithCommon(
2772
- this.vm.getString(i),
2776
+ this.vm.getString(a),
2773
2777
  this.importObjectViaJson(c),
2774
- ...a.map(
2775
- (l) => this.importObjectViaJson(l)
2778
+ ...l.map(
2779
+ (u) => this.importObjectViaJson(u)
2776
2780
  )
2777
2781
  ),
2778
2782
  void 0
2779
- )), n("getResourceType", (i) => this.exportObjectViaJson(this.getResourceType(this.vm.getString(i)), void 0)), n("getInputsLocked", (i) => this.exportSingleValue(this.getInputsLocked(this.vm.getString(i)), void 0)), n("getOutputsLocked", (i) => this.exportSingleValue(this.getOutputsLocked(this.vm.getString(i)), void 0)), n("getIsReadyOrError", (i) => this.exportSingleValue(this.getIsReadyOrError(this.vm.getString(i)), void 0)), n("getIsFinal", (i) => this.exportSingleValue(this.getIsFinal(this.vm.getString(i)), void 0)), n("getError", (i) => this.exportSingleValue(this.getError(this.vm.getString(i)), void 0)), n("listInputFields", (i) => this.exportObjectViaJson(this.listInputFields(this.vm.getString(i)), void 0)), n("listOutputFields", (i) => this.exportObjectViaJson(this.listInputFields(this.vm.getString(i)), void 0)), n("listDynamicFields", (i) => this.exportObjectViaJson(this.listInputFields(this.vm.getString(i)), void 0)), n("getKeyValueBase64", (i, c) => this.exportSingleValue(
2780
- this.getKeyValueBase64(this.vm.getString(i), this.vm.getString(c)),
2781
- void 0
2782
- )), n("getKeyValueAsString", (i, c) => this.exportSingleValue(
2783
- this.getKeyValueAsString(this.vm.getString(i), this.vm.getString(c)),
2783
+ )), i("getResourceType", (a) => this.exportObjectViaJson(this.getResourceType(this.vm.getString(a)), void 0)), i("getInputsLocked", (a) => this.exportSingleValue(this.getInputsLocked(this.vm.getString(a)), void 0)), i("getOutputsLocked", (a) => this.exportSingleValue(this.getOutputsLocked(this.vm.getString(a)), void 0)), i("getIsReadyOrError", (a) => this.exportSingleValue(this.getIsReadyOrError(this.vm.getString(a)), void 0)), i("getIsFinal", (a) => this.exportSingleValue(this.getIsFinal(this.vm.getString(a)), void 0)), i("getError", (a) => this.exportSingleValue(this.getError(this.vm.getString(a)), void 0)), i("listInputFields", (a) => this.exportObjectViaJson(this.listInputFields(this.vm.getString(a)), void 0)), i("listOutputFields", (a) => this.exportObjectViaJson(this.listInputFields(this.vm.getString(a)), void 0)), i("listDynamicFields", (a) => this.exportObjectViaJson(this.listInputFields(this.vm.getString(a)), void 0)), i("getKeyValueBase64", (a, c) => this.exportSingleValue(
2784
+ this.getKeyValueBase64(this.vm.getString(a), this.vm.getString(c)),
2784
2785
  void 0
2785
- )), n("getDataBase64", (i) => this.exportSingleValue(this.getDataBase64(this.vm.getString(i)), void 0)), n("getDataAsString", (i) => this.exportSingleValue(this.getDataAsString(this.vm.getString(i)), void 0)), n("parsePObjectCollection", (i, c, a, ...l) => this.exportObjectUniversal(
2786
- this.parsePObjectCollection(
2787
- this.vm.getString(i),
2788
- this.vm.dump(c),
2789
- this.vm.getString(a),
2790
- ...l.map(this.vm.getString)
2791
- ),
2786
+ )), i("getKeyValueAsString", (a, c) => this.exportSingleValue(
2787
+ this.getKeyValueAsString(this.vm.getString(a), this.vm.getString(c)),
2792
2788
  void 0
2793
- )), n("getBlobContentAsBase64", (i) => this.exportSingleValue(
2794
- this.getBlobContentAsBase64(this.vm.getString(i)),
2789
+ )), i("getDataBase64", (a) => this.exportSingleValue(this.getDataBase64(this.vm.getString(a)), void 0)), i("getDataAsString", (a) => this.exportSingleValue(this.getDataAsString(this.vm.getString(a)), void 0)), i(
2790
+ "parsePObjectCollection",
2791
+ (a, c, l, ...u) => this.exportObjectUniversal(
2792
+ this.parsePObjectCollection(
2793
+ this.vm.getString(a),
2794
+ this.vm.dump(c),
2795
+ this.vm.getString(l),
2796
+ ...u.map(this.vm.getString)
2797
+ ),
2798
+ void 0
2799
+ )
2800
+ ), i("getBlobContentAsBase64", (a) => this.exportSingleValue(
2801
+ this.getBlobContentAsBase64(this.vm.getString(a)),
2795
2802
  void 0
2796
- )), n("getBlobContentAsString", (i) => this.exportSingleValue(
2797
- this.getBlobContentAsString(this.vm.getString(i)),
2803
+ )), i("getBlobContentAsString", (a) => this.exportSingleValue(
2804
+ this.getBlobContentAsString(this.vm.getString(a)),
2798
2805
  void 0
2799
- )), n("getDownloadedBlobContentHandle", (i) => this.exportSingleValue(
2800
- this.getDownloadedBlobContentHandle(this.vm.getString(i)),
2806
+ )), i("getDownloadedBlobContentHandle", (a) => this.exportSingleValue(
2807
+ this.getDownloadedBlobContentHandle(this.vm.getString(a)),
2801
2808
  void 0
2802
- )), n("getOnDemandBlobContentHandle", (i) => this.exportSingleValue(
2803
- this.getOnDemandBlobContentHandle(this.vm.getString(i)),
2809
+ )), i("getOnDemandBlobContentHandle", (a) => this.exportSingleValue(
2810
+ this.getOnDemandBlobContentHandle(this.vm.getString(a)),
2804
2811
  void 0
2805
- )), n("getImportProgress", (i) => this.exportSingleValue(this.getImportProgress(this.vm.getString(i)), void 0)), n("getLastLogs", (i, c) => this.exportSingleValue(
2806
- this.getLastLogs(this.vm.getString(i), this.vm.getNumber(c)),
2812
+ )), i("getImportProgress", (a) => this.exportSingleValue(this.getImportProgress(this.vm.getString(a)), void 0)), i("getLastLogs", (a, c) => this.exportSingleValue(
2813
+ this.getLastLogs(this.vm.getString(a), this.vm.getNumber(c)),
2807
2814
  void 0
2808
- )), n("getProgressLog", (i, c) => this.exportSingleValue(
2809
- this.getProgressLog(this.vm.getString(i), this.vm.getString(c)),
2815
+ )), i("getProgressLog", (a, c) => this.exportSingleValue(
2816
+ this.getProgressLog(this.vm.getString(a), this.vm.getString(c)),
2810
2817
  void 0
2811
- )), n("getLogHandle", (i) => this.exportSingleValue(this.getLogHandle(this.vm.getString(i)), void 0)), n("getBlockLabel", (i) => this.exportSingleValue(this.getBlockLabel(this.vm.getString(i)), void 0)), n("getDataFromResultPool", (i) => this.exportObjectUniversal(this.getDataFromResultPool(), void 0)), n("getDataWithErrorsFromResultPool", (i) => this.exportObjectUniversal(this.getDataWithErrorsFromResultPool(), void 0)), n("getSpecsFromResultPool", (i) => this.exportObjectUniversal(this.getSpecsFromResultPool(), void 0)), n("calculateOptions", (i) => this.exportObjectUniversal(
2812
- this.calculateOptions(this.importObjectViaJson(i)),
2818
+ )), i("getLogHandle", (a) => this.exportSingleValue(this.getLogHandle(this.vm.getString(a)), void 0)), i("getBlockLabel", (a) => this.exportSingleValue(this.getBlockLabel(this.vm.getString(a)), void 0)), i("getDataFromResultPool", (a) => this.exportObjectUniversal(this.getDataFromResultPool(), void 0)), i("getDataWithErrorsFromResultPool", (a) => this.exportObjectUniversal(this.getDataWithErrorsFromResultPool(), void 0)), i("getSpecsFromResultPool", (a) => this.exportObjectUniversal(this.getSpecsFromResultPool(), void 0)), i("calculateOptions", (a) => this.exportObjectUniversal(
2819
+ this.calculateOptions(this.importObjectViaJson(a)),
2813
2820
  void 0
2814
- )), n("getSpecFromResultPoolByRef", (i, c) => this.exportObjectUniversal(
2821
+ )), i("getSpecFromResultPoolByRef", (a, c) => this.exportObjectUniversal(
2815
2822
  this.getSpecFromResultPoolByRef(
2816
- this.vm.getString(i),
2823
+ this.vm.getString(a),
2817
2824
  this.vm.getString(c)
2818
2825
  ),
2819
2826
  void 0
2820
- )), n("getDataFromResultPoolByRef", (i, c) => this.exportObjectUniversal(
2827
+ )), i("getDataFromResultPoolByRef", (a, c) => this.exportObjectUniversal(
2821
2828
  this.getDataFromResultPoolByRef(
2822
- this.vm.getString(i),
2829
+ this.vm.getString(a),
2823
2830
  this.vm.getString(c)
2824
2831
  ),
2825
2832
  void 0
2826
- )), n("createPFrame", (i) => this.exportSingleValue(
2827
- this.createPFrame(
2828
- this.importObjectViaJson(i)
2829
- ),
2833
+ )), i("createPFrame", (a) => this.exportSingleValue(
2834
+ this.createPFrame(this.importObjectViaJson(a)),
2830
2835
  void 0
2831
- )), n("createPTable", (i) => this.exportSingleValue(
2836
+ )), i("createPTable", (a) => this.exportSingleValue(
2832
2837
  this.createPTable(
2833
- this.importObjectViaJson(i)
2838
+ this.importObjectViaJson(a)
2834
2839
  ),
2835
2840
  void 0
2836
- )), n("getCurrentUnstableMarker", () => this.exportSingleValue(this.getCurrentUnstableMarker(), void 0)), this.vm.setProp(this.vm.global, "cfgRenderCtx", t);
2841
+ )), i("getCurrentUnstableMarker", () => this.exportSingleValue(this.getCurrentUnstableMarker(), void 0)), this.vm.setProp(this.vm.global, "cfgRenderCtx", t);
2837
2842
  });
2838
2843
  }
2839
2844
  }
@@ -2841,7 +2846,7 @@ function Ye(s, e) {
2841
2846
  return Oe(
2842
2847
  s.traverse(
2843
2848
  {
2844
- field: U(e, "blockPack"),
2849
+ field: V(e, "blockPack"),
2845
2850
  assertFieldType: "Dynamic",
2846
2851
  errorIfFieldNotSet: !0
2847
2852
  },
@@ -2856,12 +2861,12 @@ function Ye(s, e) {
2856
2861
  const Ue = process.env.MI_LOG_OUTPUT_STATUS;
2857
2862
  function Yn(s, e, t, r, o, n = {}) {
2858
2863
  const i = `${e.blockId}#lambda#${o}#${t.handle}`;
2859
- return n = { ...n, key: i }, n.mode === void 0 && t.retentive === !0 && (n.mode = "StableOnlyRetentive"), V.makeRaw((c) => {
2860
- const a = new mt();
2861
- c.addOnDestroy(() => a.dispose());
2862
- const l = a.manage(s.quickJs.newRuntime());
2864
+ return n = { ...n, key: i }, n.mode === void 0 && t.retentive === !0 && (n.mode = "StableOnlyRetentive"), U.makeRaw((a) => {
2865
+ const c = new mt();
2866
+ a.addOnDestroy(() => c.dispose());
2867
+ const l = c.manage(s.quickJs.newRuntime());
2863
2868
  l.setMemoryLimit(1024 * 640), l.setMaxStackSize(1024 * 320);
2864
- const u = a.manage(l.newContext()), d = new Xe(a, u, e, s, c);
2869
+ const u = c.manage(l.newContext()), d = new Xe(c, u, e, s, a);
2865
2870
  d.evaluateBundle(r.content);
2866
2871
  const f = d.runCallback(t.handle);
2867
2872
  d.resetComputableCtx();
@@ -2888,31 +2893,31 @@ function $e(s, e, t, r, o, n = {}) {
2888
2893
  } else return Xn(s.driverKit, e, t, n);
2889
2894
  }
2890
2895
  function Zn(s, e, t) {
2891
- return V.make(
2896
+ return U.make(
2892
2897
  (r) => {
2893
2898
  var g, E, F, N, _, P, se, pe;
2894
- const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson(It)), i = B(o.getKeyValueAsJson(Te)), c = B(o.getKeyValueAsJson(Ae)), a = B(o.getKeyValueAsJson(de)), l = B(
2899
+ const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson(It)), i = B(o.getKeyValueAsJson(Te)), a = B(o.getKeyValueAsJson(Ae)), c = B(o.getKeyValueAsJson(de)), l = B(
2895
2900
  o.getKeyValueAsJson(We)
2896
2901
  ), u = /* @__PURE__ */ new Map();
2897
- for (const { id: A } of te(a)) {
2902
+ for (const { id: A } of te(c)) {
2898
2903
  const q = o.traverse({
2899
- field: U(A, "currentArgs"),
2904
+ field: V(A, "currentArgs"),
2900
2905
  assertFieldType: "Dynamic",
2901
2906
  errorIfFieldNotSet: !0
2902
2907
  });
2903
2908
  let oe;
2904
2909
  const K = o.traverse({
2905
- field: U(A, "prodArgs"),
2910
+ field: V(A, "prodArgs"),
2906
2911
  assertFieldType: "Dynamic",
2907
2912
  stableIfNotFound: !0
2908
2913
  });
2909
2914
  if (K !== void 0) {
2910
2915
  const J = o.getField({
2911
- field: U(A, "prodOutput"),
2916
+ field: V(A, "prodOutput"),
2912
2917
  assertFieldType: "Dynamic",
2913
2918
  errorIfFieldNotFound: !0
2914
2919
  }), x = o.getField({
2915
- field: U(A, "prodUiCtx"),
2920
+ field: V(A, "prodUiCtx"),
2916
2921
  assertFieldType: "Dynamic",
2917
2922
  errorIfFieldNotFound: !0
2918
2923
  });
@@ -2927,7 +2932,7 @@ function Zn(s, e, t) {
2927
2932
  }
2928
2933
  u.set(A, { currentArguments: q.getDataAsJson(), prod: oe });
2929
2934
  }
2930
- const d = Ke(a, (A) => u.get(A).currentArguments), f = new Set(l.blocksInLimbo), h = [...te(a)].map(({ id: A, label: q, renderingMode: oe }) => {
2935
+ const d = Ke(c, (A) => u.get(A).currentArguments), f = new Set(l.blocksInLimbo), h = [...te(c)].map(({ id: A, label: q, renderingMode: oe }) => {
2931
2936
  var w, C, O, R, T;
2932
2937
  const K = B(u.get(A)), J = B(d.nodes.get(A));
2933
2938
  let x = "NotCalculated";
@@ -2962,7 +2967,7 @@ function Zn(s, e, t) {
2962
2967
  sdkVersion: I.sdkVersion
2963
2968
  };
2964
2969
  }) || {}, m = o.traverse({
2965
- field: U(A, "blockSettings"),
2970
+ field: V(A, "blockSettings"),
2966
2971
  assertFieldType: "Dynamic",
2967
2972
  errorIfFieldNotSet: !0
2968
2973
  }).getDataAsJson(), b = Oe(
@@ -2993,7 +2998,7 @@ function Zn(s, e, t) {
2993
2998
  };
2994
2999
  });
2995
3000
  return {
2996
- meta: c,
3001
+ meta: a,
2997
3002
  created: new Date(n),
2998
3003
  lastModified: new Date(i),
2999
3004
  authorMarker: o.getKeyValueAsJson(wt),
@@ -3008,10 +3013,10 @@ function Zn(s, e, t) {
3008
3013
  blocks: r.blocks.map((i) => {
3009
3014
  var u, d;
3010
3015
  i.inputsValid || o.add(i.id), i.stale && n.add(i.id);
3011
- const c = i.stale || i.upstreams.findIndex((f) => n.has(f)) !== -1, a = (c || i.outputErrors) && !!i.inputsValid && !i.missingReference && i.upstreams.findIndex((f) => o.has(f)) === -1, l = {
3016
+ const a = i.stale || i.upstreams.findIndex((f) => n.has(f)) !== -1, c = (a || i.outputErrors) && !!i.inputsValid && !i.missingReference && i.upstreams.findIndex((f) => o.has(f)) === -1, l = {
3012
3017
  ...i,
3013
- canRun: a,
3014
- stale: c,
3018
+ canRun: c,
3019
+ stale: a,
3015
3020
  updateSuggestions: ((u = i.updates) == null ? void 0 : u.suggestions) ?? [],
3016
3021
  updatedBlockPack: (d = i.updates) == null ? void 0 : d.mainSuggestion
3017
3022
  };
@@ -3041,7 +3046,7 @@ function ei(s, e) {
3041
3046
  }
3042
3047
  function ti(s, e) {
3043
3048
  if (s !== void 0)
3044
- return V.make(
3049
+ return U.make(
3045
3050
  (t) => ei(t.accessor(s), e),
3046
3051
  {
3047
3052
  postprocessValue: (t) => {
@@ -3055,17 +3060,17 @@ function ti(s, e) {
3055
3060
  ).withStableType();
3056
3061
  }
3057
3062
  function ri(s, e, t) {
3058
- return V.make(
3063
+ return U.make(
3059
3064
  (r) => {
3060
- var c;
3061
- const o = r.accessor(s).node(), n = Ye(o, e), i = (c = o.traverse(
3065
+ var a;
3066
+ const o = r.accessor(s).node(), n = Ye(o, e), i = (a = o.traverse(
3062
3067
  {
3063
- field: U(e, "blockPack"),
3068
+ field: V(e, "blockPack"),
3064
3069
  assertFieldType: "Dynamic"
3065
3070
  },
3066
3071
  { field: L.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
3067
3072
  { field: zr, assertFieldType: "Input" }
3068
- )) == null ? void 0 : c.persist();
3073
+ )) == null ? void 0 : a.persist();
3069
3074
  return {
3070
3075
  path: ti(i, t),
3071
3076
  sdkVersion: n == null ? void 0 : n.cfg.sdkVersion
@@ -3076,7 +3081,7 @@ function ri(s, e, t) {
3076
3081
  }
3077
3082
  function is(s, e, t) {
3078
3083
  if (t === void 0)
3079
- return V.make((i) => is(s, e, i), {
3084
+ return U.make((i) => is(s, e, i), {
3080
3085
  key: `inputs#${Br(s.rid)}#${e}`
3081
3086
  });
3082
3087
  const r = t.accessor(s).node(), o = At(s, e), n = o.uiState(t);
@@ -3087,33 +3092,33 @@ function is(s, e, t) {
3087
3092
  };
3088
3093
  }
3089
3094
  function si(s, e, t) {
3090
- return V.make(
3095
+ return U.make(
3091
3096
  (r) => {
3092
3097
  const o = r.accessor(s).node(), n = es(s, e);
3093
- return Oe(Ye(o, e), ({ cfg: i, bpId: c }) => {
3094
- const a = {};
3098
+ return Oe(Ye(o, e), ({ cfg: i, bpId: a }) => {
3099
+ const c = {};
3095
3100
  for (const [l, u] of Object.entries(i.outputs)) {
3096
- const d = $e(t, n, u, i.code, c);
3097
- a[l] = V.wrapError(d);
3101
+ const d = $e(t, n, u, i.code, a);
3102
+ c[l] = U.wrapError(d);
3098
3103
  }
3099
- return a;
3104
+ return c;
3100
3105
  });
3101
3106
  },
3102
3107
  { key: "outputs#" + Br(s.rid) + "#" + e }
3103
3108
  ).withStableType();
3104
3109
  }
3105
3110
  function oi(s, e) {
3106
- return V.make((t) => {
3111
+ return U.make((t) => {
3107
3112
  const r = t.accessor(s).node(), o = B(r.getKeyValueAsJson(de)), n = [];
3108
- for (const { id: i, renderingMode: c } of te(o)) {
3109
- const a = Ye(r, i);
3110
- if (a === void 0) continue;
3111
- const l = Object.entries(a.cfg.outputs).map(([, d]) => d).filter((d) => Qn(d)).map((d) => d);
3113
+ for (const { id: i, renderingMode: a } of te(o)) {
3114
+ const c = Ye(r, i);
3115
+ if (c === void 0) continue;
3116
+ const l = Object.entries(c.cfg.outputs).map(([, d]) => d).filter((d) => Qn(d)).map((d) => d);
3112
3117
  if (l.length === 0) continue;
3113
3118
  const u = es(r.persist(), i);
3114
3119
  for (const d of l)
3115
3120
  n.push(
3116
- V.wrapError($e(e, u, d, a.cfg.code, a.bpId))
3121
+ U.wrapError($e(e, u, d, c.cfg.code, c.bpId))
3117
3122
  );
3118
3123
  }
3119
3124
  return n;
@@ -3136,7 +3141,7 @@ class ni {
3136
3141
  return r === void 0 && (r = { state: { ...Cs }, change: new Ht() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
3137
3142
  }
3138
3143
  getState(e) {
3139
- return V.make(
3144
+ return U.make(
3140
3145
  (t) => this.readState(t, e),
3141
3146
  { key: `navigationState#${e}` }
3142
3147
  );
@@ -3193,7 +3198,7 @@ class Lt {
3193
3198
  * @return returns newly created block id
3194
3199
  * */
3195
3200
  async addBlock(e, t, r, o = void 0, n = Fe()) {
3196
- const i = await this.env.bpPreparer.prepare(t), c = await this.env.bpPreparer.getBlockConfigContainer(t), a = Ar(c);
3201
+ const i = await this.env.bpPreparer.prepare(t), a = await this.env.bpPreparer.getBlockConfigContainer(t), c = Ar(a);
3197
3202
  return await Y(
3198
3203
  this.env.pl,
3199
3204
  this.rid,
@@ -3202,11 +3207,11 @@ class Lt {
3202
3207
  {
3203
3208
  id: n,
3204
3209
  label: e,
3205
- renderingMode: a.renderingMode
3210
+ renderingMode: c.renderingMode
3206
3211
  },
3207
3212
  {
3208
- args: JSON.stringify(a.initialArgs),
3209
- uiState: JSON.stringify(a.initialUiState),
3213
+ args: JSON.stringify(c.initialArgs),
3214
+ uiState: JSON.stringify(c.initialUiState),
3210
3215
  blockPack: i
3211
3216
  },
3212
3217
  r
@@ -3223,7 +3228,7 @@ class Lt {
3223
3228
  this.env.pl,
3224
3229
  this.rid,
3225
3230
  o,
3226
- (c) => c.migrateBlockPack(
3231
+ (a) => a.migrateBlockPack(
3227
3232
  e,
3228
3233
  n,
3229
3234
  r ? JSON.stringify(i.initialArgs) : void 0
@@ -3254,10 +3259,10 @@ class Lt {
3254
3259
  {
3255
3260
  id: n.id,
3256
3261
  label: n.label,
3257
- blocks: e.map((c) => {
3258
- const a = n.blocks.find((l) => l.id === c);
3259
- if (a === void 0) throw new Error(`Can't find block: ${c}`);
3260
- return a;
3262
+ blocks: e.map((a) => {
3263
+ const c = n.blocks.find((l) => l.id === a);
3264
+ if (c === void 0) throw new Error(`Can't find block: ${a}`);
3265
+ return c;
3261
3266
  })
3262
3267
  }
3263
3268
  ]
@@ -3343,14 +3348,14 @@ class Lt {
3343
3348
  async resetBlockArgsAndUiState(e, t) {
3344
3349
  await this.env.pl.withWriteTx("BlockInputsReset", async (r) => {
3345
3350
  const o = gt(
3346
- (await r.getField(j(this.rid, U(e, "blockPack")))).value
3351
+ (await r.getField(j(this.rid, V(e, "blockPack")))).value
3347
3352
  ), n = gt(
3348
3353
  (await r.getField(j(o, L.HolderRefField))).value
3349
- ), i = await r.getResourceData(n, !1), c = JSON.parse(
3354
+ ), i = await r.getResourceData(n, !1), a = JSON.parse(
3350
3355
  Buffer.from(B(i.data)).toString("utf-8")
3351
3356
  );
3352
- await Y(r, this.rid, t, (a) => {
3353
- a.setArgs([{ blockId: e, args: JSON.stringify(c.config.initialArgs) }]), a.setUiState(e, void 0);
3357
+ await Y(r, this.rid, t, (c) => {
3358
+ c.setArgs([{ blockId: e, args: JSON.stringify(a.config.initialArgs) }]), c.setUiState(e, void 0);
3354
3359
  }), await r.commit();
3355
3360
  }), await this.projectTree.refreshState();
3356
3361
  }
@@ -3358,7 +3363,7 @@ class Lt {
3358
3363
  const t = this.blockComputables.get(e);
3359
3364
  if (t === void 0) {
3360
3365
  const r = si(this.projectTree.entry(), e, this.env), n = {
3361
- fullState: V.make(
3366
+ fullState: U.make(
3362
3367
  (i) => ({
3363
3368
  argsAndUiState: is(this.projectTree.entry(), e, i),
3364
3369
  outputs: r,
@@ -3511,7 +3516,7 @@ var Ze = gi;
3511
3516
  MAX_LENGTH: o
3512
3517
  } = Qe, n = Ze;
3513
3518
  e = s.exports = {};
3514
- const i = e.re = [], c = e.safeRe = [], a = e.src = [], l = e.t = {};
3519
+ const i = e.re = [], a = e.safeRe = [], c = e.src = [], l = e.t = {};
3515
3520
  let u = 0;
3516
3521
  const d = "[a-zA-Z0-9-]", f = [
3517
3522
  ["\\s", 1],
@@ -3523,9 +3528,9 @@ var Ze = gi;
3523
3528
  return E;
3524
3529
  }, g = (E, F, N) => {
3525
3530
  const _ = h(F), P = u++;
3526
- n(E, P, F), l[E] = P, a[P] = F, i[P] = new RegExp(F, N ? "g" : void 0), c[P] = new RegExp(_, N ? "g" : void 0);
3531
+ n(E, P, F), l[E] = P, c[P] = F, i[P] = new RegExp(F, N ? "g" : void 0), a[P] = new RegExp(_, N ? "g" : void 0);
3527
3532
  };
3528
- g("NUMERICIDENTIFIER", "0|[1-9]\\d*"), g("NUMERICIDENTIFIERLOOSE", "\\d+"), g("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${d}*`), g("MAINVERSION", `(${a[l.NUMERICIDENTIFIER]})\\.(${a[l.NUMERICIDENTIFIER]})\\.(${a[l.NUMERICIDENTIFIER]})`), g("MAINVERSIONLOOSE", `(${a[l.NUMERICIDENTIFIERLOOSE]})\\.(${a[l.NUMERICIDENTIFIERLOOSE]})\\.(${a[l.NUMERICIDENTIFIERLOOSE]})`), g("PRERELEASEIDENTIFIER", `(?:${a[l.NUMERICIDENTIFIER]}|${a[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASEIDENTIFIERLOOSE", `(?:${a[l.NUMERICIDENTIFIERLOOSE]}|${a[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASE", `(?:-(${a[l.PRERELEASEIDENTIFIER]}(?:\\.${a[l.PRERELEASEIDENTIFIER]})*))`), g("PRERELEASELOOSE", `(?:-?(${a[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[l.PRERELEASEIDENTIFIERLOOSE]})*))`), g("BUILDIDENTIFIER", `${d}+`), g("BUILD", `(?:\\+(${a[l.BUILDIDENTIFIER]}(?:\\.${a[l.BUILDIDENTIFIER]})*))`), g("FULLPLAIN", `v?${a[l.MAINVERSION]}${a[l.PRERELEASE]}?${a[l.BUILD]}?`), g("FULL", `^${a[l.FULLPLAIN]}$`), g("LOOSEPLAIN", `[v=\\s]*${a[l.MAINVERSIONLOOSE]}${a[l.PRERELEASELOOSE]}?${a[l.BUILD]}?`), g("LOOSE", `^${a[l.LOOSEPLAIN]}$`), g("GTLT", "((?:<|>)?=?)"), g("XRANGEIDENTIFIERLOOSE", `${a[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), g("XRANGEIDENTIFIER", `${a[l.NUMERICIDENTIFIER]}|x|X|\\*`), g("XRANGEPLAIN", `[v=\\s]*(${a[l.XRANGEIDENTIFIER]})(?:\\.(${a[l.XRANGEIDENTIFIER]})(?:\\.(${a[l.XRANGEIDENTIFIER]})(?:${a[l.PRERELEASE]})?${a[l.BUILD]}?)?)?`), g("XRANGEPLAINLOOSE", `[v=\\s]*(${a[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})(?:${a[l.PRERELEASELOOSE]})?${a[l.BUILD]}?)?)?`), g("XRANGE", `^${a[l.GTLT]}\\s*${a[l.XRANGEPLAIN]}$`), g("XRANGELOOSE", `^${a[l.GTLT]}\\s*${a[l.XRANGEPLAINLOOSE]}$`), g("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), g("COERCE", `${a[l.COERCEPLAIN]}(?:$|[^\\d])`), g("COERCEFULL", a[l.COERCEPLAIN] + `(?:${a[l.PRERELEASE]})?(?:${a[l.BUILD]})?(?:$|[^\\d])`), g("COERCERTL", a[l.COERCE], !0), g("COERCERTLFULL", a[l.COERCEFULL], !0), g("LONETILDE", "(?:~>?)"), g("TILDETRIM", `(\\s*)${a[l.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", g("TILDE", `^${a[l.LONETILDE]}${a[l.XRANGEPLAIN]}$`), g("TILDELOOSE", `^${a[l.LONETILDE]}${a[l.XRANGEPLAINLOOSE]}$`), g("LONECARET", "(?:\\^)"), g("CARETTRIM", `(\\s*)${a[l.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", g("CARET", `^${a[l.LONECARET]}${a[l.XRANGEPLAIN]}$`), g("CARETLOOSE", `^${a[l.LONECARET]}${a[l.XRANGEPLAINLOOSE]}$`), g("COMPARATORLOOSE", `^${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]})$|^$`), g("COMPARATOR", `^${a[l.GTLT]}\\s*(${a[l.FULLPLAIN]})$|^$`), g("COMPARATORTRIM", `(\\s*)${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]}|${a[l.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", g("HYPHENRANGE", `^\\s*(${a[l.XRANGEPLAIN]})\\s+-\\s+(${a[l.XRANGEPLAIN]})\\s*$`), g("HYPHENRANGELOOSE", `^\\s*(${a[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[l.XRANGEPLAINLOOSE]})\\s*$`), g("STAR", "(<|>)?=?\\s*\\*"), g("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), g("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
3533
+ g("NUMERICIDENTIFIER", "0|[1-9]\\d*"), g("NUMERICIDENTIFIERLOOSE", "\\d+"), g("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${d}*`), g("MAINVERSION", `(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`), g("MAINVERSIONLOOSE", `(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`), g("PRERELEASEIDENTIFIER", `(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASEIDENTIFIERLOOSE", `(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASE", `(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`), g("PRERELEASELOOSE", `(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`), g("BUILDIDENTIFIER", `${d}+`), g("BUILD", `(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`), g("FULLPLAIN", `v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`), g("FULL", `^${c[l.FULLPLAIN]}$`), g("LOOSEPLAIN", `[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`), g("LOOSE", `^${c[l.LOOSEPLAIN]}$`), g("GTLT", "((?:<|>)?=?)"), g("XRANGEIDENTIFIERLOOSE", `${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), g("XRANGEIDENTIFIER", `${c[l.NUMERICIDENTIFIER]}|x|X|\\*`), g("XRANGEPLAIN", `[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`), g("XRANGEPLAINLOOSE", `[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`), g("XRANGE", `^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`), g("XRANGELOOSE", `^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`), g("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), g("COERCE", `${c[l.COERCEPLAIN]}(?:$|[^\\d])`), g("COERCEFULL", c[l.COERCEPLAIN] + `(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`), g("COERCERTL", c[l.COERCE], !0), g("COERCERTLFULL", c[l.COERCEFULL], !0), g("LONETILDE", "(?:~>?)"), g("TILDETRIM", `(\\s*)${c[l.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", g("TILDE", `^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`), g("TILDELOOSE", `^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`), g("LONECARET", "(?:\\^)"), g("CARETTRIM", `(\\s*)${c[l.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", g("CARET", `^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`), g("CARETLOOSE", `^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`), g("COMPARATORLOOSE", `^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`), g("COMPARATOR", `^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`), g("COMPARATORTRIM", `(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", g("HYPHENRANGE", `^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`), g("HYPHENRANGELOOSE", `^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`), g("STAR", "(<|>)?=?\\s*\\*"), g("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), g("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
3529
3534
  })(Et, Et.exports);
3530
3535
  var De = Et.exports;
3531
3536
  const mi = Object.freeze({ loose: !0 }), vi = Object.freeze({}), yi = (s) => s ? typeof s != "object" ? mi : s : vi;
@@ -3716,10 +3721,10 @@ const hr = Se, Ti = (s, e) => {
3716
3721
  const t = hr(s, null, !0), r = hr(e, null, !0), o = t.compare(r);
3717
3722
  if (o === 0)
3718
3723
  return null;
3719
- const n = o > 0, i = n ? t : r, c = n ? r : t, a = !!i.prerelease.length;
3720
- if (!!c.prerelease.length && !a)
3721
- return !c.patch && !c.minor ? "major" : i.patch ? "patch" : i.minor ? "minor" : "major";
3722
- const u = a ? "pre" : "";
3724
+ const n = o > 0, i = n ? t : r, a = n ? r : t, c = !!i.prerelease.length;
3725
+ if (!!a.prerelease.length && !c)
3726
+ return !a.patch && !a.minor ? "major" : i.patch ? "patch" : i.minor ? "minor" : "major";
3727
+ const u = c ? "pre" : "";
3723
3728
  return t.major !== r.major ? u + "major" : t.minor !== r.minor ? u + "minor" : t.patch !== r.patch ? u + "patch" : "prerelease";
3724
3729
  };
3725
3730
  var Ai = Ti;
@@ -3796,16 +3801,16 @@ const Ea = M, ka = Se, { safeRe: Me, t: _e } = De, Pa = (s, e) => {
3796
3801
  if (!e.rtl)
3797
3802
  t = s.match(e.includePrerelease ? Me[_e.COERCEFULL] : Me[_e.COERCE]);
3798
3803
  else {
3799
- const a = e.includePrerelease ? Me[_e.COERCERTLFULL] : Me[_e.COERCERTL];
3804
+ const c = e.includePrerelease ? Me[_e.COERCERTLFULL] : Me[_e.COERCERTL];
3800
3805
  let l;
3801
- for (; (l = a.exec(s)) && (!t || t.index + t[0].length !== s.length); )
3802
- (!t || l.index + l[0].length !== t.index + t[0].length) && (t = l), a.lastIndex = l.index + l[1].length + l[2].length;
3803
- a.lastIndex = -1;
3806
+ for (; (l = c.exec(s)) && (!t || t.index + t[0].length !== s.length); )
3807
+ (!t || l.index + l[0].length !== t.index + t[0].length) && (t = l), c.lastIndex = l.index + l[1].length + l[2].length;
3808
+ c.lastIndex = -1;
3804
3809
  }
3805
3810
  if (t === null)
3806
3811
  return null;
3807
- const r = t[2], o = t[3] || "0", n = t[4] || "0", i = e.includePrerelease && t[5] ? `-${t[5]}` : "", c = e.includePrerelease && t[6] ? `+${t[6]}` : "";
3808
- return ka(`${r}.${o}.${n}${i}${c}`, e);
3812
+ const r = t[2], o = t[3] || "0", n = t[4] || "0", i = e.includePrerelease && t[5] ? `-${t[5]}` : "", a = e.includePrerelease && t[6] ? `+${t[6]}` : "";
3813
+ return ka(`${r}.${o}.${n}${i}${a}`, e);
3809
3814
  };
3810
3815
  var Oa = Pa;
3811
3816
  class $a {
@@ -3880,10 +3885,10 @@ function Z() {
3880
3885
  const m = ((this.options.includePrerelease && h) | (this.options.loose && g)) + ":" + p, b = r.get(m);
3881
3886
  if (b)
3882
3887
  return b;
3883
- const w = this.options.loose, C = w ? a[l.HYPHENRANGELOOSE] : a[l.HYPHENRANGE];
3884
- p = p.replace(C, X(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(a[l.COMPARATORTRIM], u), i("comparator trim", p), p = p.replace(a[l.TILDETRIM], d), i("tilde trim", p), p = p.replace(a[l.CARETTRIM], f), i("caret trim", p);
3888
+ const w = this.options.loose, C = w ? c[l.HYPHENRANGELOOSE] : c[l.HYPHENRANGE];
3889
+ p = p.replace(C, X(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(c[l.COMPARATORTRIM], u), i("comparator trim", p), p = p.replace(c[l.TILDETRIM], d), i("tilde trim", p), p = p.replace(c[l.CARETTRIM], f), i("caret trim", p);
3885
3890
  let O = p.split(" ").map((I) => _(I, this.options)).join(" ").split(/\s+/).map((I) => x(I, this.options));
3886
- w && (O = O.filter((I) => (i("loose invalid filter", I, this.options), !!I.match(a[l.COMPARATORLOOSE])))), i("range list", O);
3891
+ w && (O = O.filter((I) => (i("loose invalid filter", I, this.options), !!I.match(c[l.COMPARATORLOOSE])))), i("range list", O);
3887
3892
  const R = /* @__PURE__ */ new Map(), T = O.map((I) => new n(I, this.options));
3888
3893
  for (const I of T) {
3889
3894
  if (E(I))
@@ -3905,7 +3910,7 @@ function Z() {
3905
3910
  return !1;
3906
3911
  if (typeof p == "string")
3907
3912
  try {
3908
- p = new c(p, this.options);
3913
+ p = new a(p, this.options);
3909
3914
  } catch {
3910
3915
  return !1;
3911
3916
  }
@@ -3916,8 +3921,8 @@ function Z() {
3916
3921
  }
3917
3922
  }
3918
3923
  at = e;
3919
- const t = Ia, r = new t(), o = Nt, n = tt(), i = Ze, c = M, {
3920
- safeRe: a,
3924
+ const t = Ia, r = new t(), o = Nt, n = tt(), i = Ze, a = M, {
3925
+ safeRe: c,
3921
3926
  t: l,
3922
3927
  comparatorTrimReplace: u,
3923
3928
  tildeTrimReplace: d,
@@ -3930,7 +3935,7 @@ function Z() {
3930
3935
  y = m.every((w) => b.intersects(w, p)), b = m.pop();
3931
3936
  return y;
3932
3937
  }, _ = (v, p) => (i("comp", v, p), v = A(v, p), i("caret", v), v = se(v, p), i("tildes", v), v = oe(v, p), i("xrange", v), v = J(v, p), i("stars", v), v), P = (v) => !v || v.toLowerCase() === "x" || v === "*", se = (v, p) => v.trim().split(/\s+/).map((y) => pe(y, p)).join(" "), pe = (v, p) => {
3933
- const y = p.loose ? a[l.TILDELOOSE] : a[l.TILDE];
3938
+ const y = p.loose ? c[l.TILDELOOSE] : c[l.TILDE];
3934
3939
  return v.replace(y, (m, b, w, C, O) => {
3935
3940
  i("tilde", v, m, b, w, C, O);
3936
3941
  let R;
@@ -3938,7 +3943,7 @@ function Z() {
3938
3943
  });
3939
3944
  }, A = (v, p) => v.trim().split(/\s+/).map((y) => q(y, p)).join(" "), q = (v, p) => {
3940
3945
  i("caret", v, p);
3941
- const y = p.loose ? a[l.CARETLOOSE] : a[l.CARET], m = p.includePrerelease ? "-0" : "";
3946
+ const y = p.loose ? c[l.CARETLOOSE] : c[l.CARET], m = p.includePrerelease ? "-0" : "";
3942
3947
  return v.replace(y, (b, w, C, O, R) => {
3943
3948
  i("caret", v, b, w, C, O, R);
3944
3949
  let T;
@@ -3946,13 +3951,13 @@ function Z() {
3946
3951
  });
3947
3952
  }, oe = (v, p) => (i("replaceXRanges", v, p), v.split(/\s+/).map((y) => K(y, p)).join(" ")), K = (v, p) => {
3948
3953
  v = v.trim();
3949
- const y = p.loose ? a[l.XRANGELOOSE] : a[l.XRANGE];
3954
+ const y = p.loose ? c[l.XRANGELOOSE] : c[l.XRANGE];
3950
3955
  return v.replace(y, (m, b, w, C, O, R) => {
3951
3956
  i("xRange", v, m, b, w, C, O, R);
3952
3957
  const T = P(w), D = T || P(C), I = D || P(O), fe = I;
3953
3958
  return b === "=" && fe && (b = ""), R = p.includePrerelease ? "-0" : "", T ? b === ">" || b === "<" ? m = "<0.0.0-0" : m = "*" : b && fe ? (D && (C = 0), O = 0, b === ">" ? (b = ">=", D ? (w = +w + 1, C = 0, O = 0) : (C = +C + 1, O = 0)) : b === "<=" && (b = "<", D ? w = +w + 1 : C = +C + 1), b === "<" && (R = "-0"), m = `${b + w}.${C}.${O}${R}`) : D ? m = `>=${w}.0.0${R} <${+w + 1}.0.0-0` : I && (m = `>=${w}.${C}.0${R} <${w}.${+C + 1}.0-0`), i("xRange return", m), m;
3954
3959
  });
3955
- }, J = (v, p) => (i("replaceStars", v, p), v.trim().replace(a[l.STAR], "")), x = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(a[p.includePrerelease ? l.GTE0PRE : l.GTE0], "")), X = (v) => (p, y, m, b, w, C, O, R, T, D, I, fe) => (P(m) ? y = "" : P(b) ? y = `>=${m}.0.0${v ? "-0" : ""}` : P(w) ? y = `>=${m}.${b}.0${v ? "-0" : ""}` : C ? y = `>=${y}` : y = `>=${y}${v ? "-0" : ""}`, P(T) ? R = "" : P(D) ? R = `<${+T + 1}.0.0-0` : P(I) ? R = `<${T}.${+D + 1}.0-0` : fe ? R = `<=${T}.${D}.${I}-${fe}` : v ? R = `<${T}.${D}.${+I + 1}-0` : R = `<=${R}`, `${y} ${R}`.trim()), he = (v, p, y) => {
3960
+ }, J = (v, p) => (i("replaceStars", v, p), v.trim().replace(c[l.STAR], "")), x = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(c[p.includePrerelease ? l.GTE0PRE : l.GTE0], "")), X = (v) => (p, y, m, b, w, C, O, R, T, D, I, fe) => (P(m) ? y = "" : P(b) ? y = `>=${m}.0.0${v ? "-0" : ""}` : P(w) ? y = `>=${m}.${b}.0${v ? "-0" : ""}` : C ? y = `>=${y}` : y = `>=${y}${v ? "-0" : ""}`, P(T) ? R = "" : P(D) ? R = `<${+T + 1}.0.0-0` : P(I) ? R = `<${T}.${+D + 1}.0-0` : fe ? R = `<=${T}.${D}.${I}-${fe}` : v ? R = `<${T}.${D}.${+I + 1}-0` : R = `<=${R}`, `${y} ${R}`.trim()), he = (v, p, y) => {
3956
3961
  for (let m = 0; m < v.length; m++)
3957
3962
  if (!v[m].test(p))
3958
3963
  return !1;
@@ -3990,7 +3995,7 @@ function tt() {
3990
3995
  const d = this.options.loose ? r[o.COMPARATORLOOSE] : r[o.COMPARATOR], f = u.match(d);
3991
3996
  if (!f)
3992
3997
  throw new TypeError(`Invalid comparator: ${u}`);
3993
- this.operator = f[1] !== void 0 ? f[1] : "", this.operator === "=" && (this.operator = ""), f[2] ? this.semver = new c(f[2], this.options.loose) : this.semver = s;
3998
+ this.operator = f[1] !== void 0 ? f[1] : "", this.operator === "=" && (this.operator = ""), f[2] ? this.semver = new a(f[2], this.options.loose) : this.semver = s;
3994
3999
  }
3995
4000
  toString() {
3996
4001
  return this.value;
@@ -4000,7 +4005,7 @@ function tt() {
4000
4005
  return !0;
4001
4006
  if (typeof u == "string")
4002
4007
  try {
4003
- u = new c(u, this.options);
4008
+ u = new a(u, this.options);
4004
4009
  } catch {
4005
4010
  return !1;
4006
4011
  }
@@ -4009,11 +4014,11 @@ function tt() {
4009
4014
  intersects(u, d) {
4010
4015
  if (!(u instanceof e))
4011
4016
  throw new TypeError("a Comparator is required");
4012
- return this.operator === "" ? this.value === "" ? !0 : new a(u.value, d).test(this.value) : u.operator === "" ? u.value === "" ? !0 : new a(this.value, d).test(u.semver) : (d = t(d), d.includePrerelease && (this.value === "<0.0.0-0" || u.value === "<0.0.0-0") || !d.includePrerelease && (this.value.startsWith("<0.0.0") || u.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && u.operator.startsWith(">") || this.operator.startsWith("<") && u.operator.startsWith("<") || this.semver.version === u.semver.version && this.operator.includes("=") && u.operator.includes("=") || n(this.semver, "<", u.semver, d) && this.operator.startsWith(">") && u.operator.startsWith("<") || n(this.semver, ">", u.semver, d) && this.operator.startsWith("<") && u.operator.startsWith(">")));
4017
+ return this.operator === "" ? this.value === "" ? !0 : new c(u.value, d).test(this.value) : u.operator === "" ? u.value === "" ? !0 : new c(this.value, d).test(u.semver) : (d = t(d), d.includePrerelease && (this.value === "<0.0.0-0" || u.value === "<0.0.0-0") || !d.includePrerelease && (this.value.startsWith("<0.0.0") || u.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && u.operator.startsWith(">") || this.operator.startsWith("<") && u.operator.startsWith("<") || this.semver.version === u.semver.version && this.operator.includes("=") && u.operator.includes("=") || n(this.semver, "<", u.semver, d) && this.operator.startsWith(">") && u.operator.startsWith("<") || n(this.semver, ">", u.semver, d) && this.operator.startsWith("<") && u.operator.startsWith(">")));
4013
4018
  }
4014
4019
  }
4015
4020
  ct = e;
4016
- const t = Nt, { safeRe: r, t: o } = De, n = fs, i = Ze, c = M, a = Z();
4021
+ const t = Nt, { safeRe: r, t: o } = De, n = fs, i = Ze, a = M, c = Z();
4017
4022
  return ct;
4018
4023
  }
4019
4024
  const Fa = Z(), Ta = (s, e, t) => {
@@ -4061,13 +4066,13 @@ const lt = M, Ma = Z(), yr = et, _a = (s, e) => {
4061
4066
  const o = s.set[r];
4062
4067
  let n = null;
4063
4068
  o.forEach((i) => {
4064
- const c = new lt(i.semver.version);
4069
+ const a = new lt(i.semver.version);
4065
4070
  switch (i.operator) {
4066
4071
  case ">":
4067
- c.prerelease.length === 0 ? c.patch++ : c.prerelease.push(0), c.raw = c.format();
4072
+ a.prerelease.length === 0 ? a.patch++ : a.prerelease.push(0), a.raw = a.format();
4068
4073
  case "":
4069
4074
  case ">=":
4070
- (!n || yr(c, n)) && (n = c);
4075
+ (!n || yr(a, n)) && (n = a);
4071
4076
  break;
4072
4077
  case "<":
4073
4078
  case "<=":
@@ -4090,13 +4095,13 @@ const Ha = Z(), Wa = (s, e) => {
4090
4095
  var qa = Wa;
4091
4096
  const Xa = M, gs = tt(), { ANY: za } = gs, Ya = Z(), Qa = rt, wr = et, Sr = Bt, Za = xt, ec = jt, tc = (s, e, t, r) => {
4092
4097
  s = new Xa(s, r), e = new Ya(e, r);
4093
- let o, n, i, c, a;
4098
+ let o, n, i, a, c;
4094
4099
  switch (t) {
4095
4100
  case ">":
4096
- o = wr, n = Za, i = Sr, c = ">", a = ">=";
4101
+ o = wr, n = Za, i = Sr, a = ">", c = ">=";
4097
4102
  break;
4098
4103
  case "<":
4099
- o = Sr, n = ec, i = wr, c = "<", a = "<=";
4104
+ o = Sr, n = ec, i = wr, a = "<", c = "<=";
4100
4105
  break;
4101
4106
  default:
4102
4107
  throw new TypeError('Must provide a hilo val of "<" or ">"');
@@ -4108,9 +4113,9 @@ const Xa = M, gs = tt(), { ANY: za } = gs, Ya = Z(), Qa = rt, wr = et, Sr = Bt,
4108
4113
  let d = null, f = null;
4109
4114
  if (u.forEach((h) => {
4110
4115
  h.semver === za && (h = new gs(">=0.0.0")), d = d || h, f = f || h, o(h.semver, d.semver, r) ? d = h : i(h.semver, f.semver, r) && (f = h);
4111
- }), d.operator === c || d.operator === a || (!f.operator || f.operator === c) && n(s, f.semver))
4116
+ }), d.operator === a || d.operator === c || (!f.operator || f.operator === a) && n(s, f.semver))
4112
4117
  return !1;
4113
- if (f.operator === a && i(s, f.semver))
4118
+ if (f.operator === c && i(s, f.semver))
4114
4119
  return !1;
4115
4120
  }
4116
4121
  return !0;
@@ -4130,11 +4135,11 @@ var pc = (s, e, t) => {
4130
4135
  for (const u of i)
4131
4136
  uc(u, e, t) ? (n = u, o || (o = u)) : (n && r.push([o, n]), n = null, o = null);
4132
4137
  o && r.push([o, null]);
4133
- const c = [];
4138
+ const a = [];
4134
4139
  for (const [u, d] of r)
4135
- u === d ? c.push(u) : !d && u === i[0] ? c.push("*") : d ? u === i[0] ? c.push(`<=${d}`) : c.push(`${u} - ${d}`) : c.push(`>=${u}`);
4136
- const a = c.join(" || "), l = typeof e.raw == "string" ? e.raw : String(e);
4137
- return a.length < l.length ? a : e;
4140
+ u === d ? a.push(u) : !d && u === i[0] ? a.push("*") : d ? u === i[0] ? a.push(`<=${d}`) : a.push(`${u} - ${d}`) : a.push(`>=${u}`);
4141
+ const c = a.join(" || "), l = typeof e.raw == "string" ? e.raw : String(e);
4142
+ return c.length < l.length ? c : e;
4138
4143
  };
4139
4144
  const Cr = Z(), Ut = tt(), { ANY: ut } = Ut, Ce = rt, Jt = Q, hc = (s, e, t = {}) => {
4140
4145
  if (s === e)
@@ -4185,19 +4190,19 @@ const Cr = Z(), Ut = tt(), { ANY: ut } = Ut, Ce = rt, Jt = Q, hc = (s, e, t = {}
4185
4190
  return !1;
4186
4191
  return !0;
4187
4192
  }
4188
- let c, a, l, u, d = n && !t.includePrerelease && n.semver.prerelease.length ? n.semver : !1, f = o && !t.includePrerelease && o.semver.prerelease.length ? o.semver : !1;
4193
+ let a, c, l, u, d = n && !t.includePrerelease && n.semver.prerelease.length ? n.semver : !1, f = o && !t.includePrerelease && o.semver.prerelease.length ? o.semver : !1;
4189
4194
  d && d.prerelease.length === 1 && n.operator === "<" && d.prerelease[0] === 0 && (d = !1);
4190
4195
  for (const h of e) {
4191
4196
  if (u = u || h.operator === ">" || h.operator === ">=", l = l || h.operator === "<" || h.operator === "<=", o) {
4192
4197
  if (f && h.semver.prerelease && h.semver.prerelease.length && h.semver.major === f.major && h.semver.minor === f.minor && h.semver.patch === f.patch && (f = !1), h.operator === ">" || h.operator === ">=") {
4193
- if (c = Er(o, h, t), c === h && c !== o)
4198
+ if (a = Er(o, h, t), a === h && a !== o)
4194
4199
  return !1;
4195
4200
  } else if (o.operator === ">=" && !Ce(o.semver, String(h), t))
4196
4201
  return !1;
4197
4202
  }
4198
4203
  if (n) {
4199
4204
  if (d && h.semver.prerelease && h.semver.prerelease.length && h.semver.major === d.major && h.semver.minor === d.minor && h.semver.patch === d.patch && (d = !1), h.operator === "<" || h.operator === "<=") {
4200
- if (a = kr(n, h, t), a === h && a !== n)
4205
+ if (c = kr(n, h, t), c === h && c !== n)
4201
4206
  return !1;
4202
4207
  } else if (n.operator === "<=" && !Ce(n.semver, String(h), t))
4203
4208
  return !1;
@@ -4304,29 +4309,29 @@ class nl extends Ms {
4304
4309
  try {
4305
4310
  const i = await ft(n.folder, this.logger);
4306
4311
  if (i === void 0) return { suggestions: [] };
4307
- const c = await $t(i);
4308
- return c === n.mtime ? { suggestions: [] } : { mainSuggestion: { ...n, mtime: c }, suggestions: [] };
4312
+ const a = await $t(i);
4313
+ return a === n.mtime ? { suggestions: [] } : { mainSuggestion: { ...n, mtime: a }, suggestions: [] };
4309
4314
  } catch (i) {
4310
4315
  return this.logger.warn(i), { suggestions: [] };
4311
4316
  }
4312
4317
  case "from-registry-v2":
4313
4318
  try {
4314
- const { versionLock: i, skipVersion: c } = t.settings;
4319
+ const { versionLock: i, skipVersion: a } = t.settings;
4315
4320
  if (i === "patch") return { suggestions: [] };
4316
- const a = this.registryProvider.getRegistry(n.registryUrl);
4321
+ const c = this.registryProvider.getRegistry(n.registryUrl);
4317
4322
  let l, u = this.preferredUpdateChannel;
4318
4323
  if (u === void 0)
4319
4324
  if (n.channel === void 0)
4320
- if (await a.getLatestOverview(n.id, ie)) u = ie;
4325
+ if (await c.getLatestOverview(n.id, ie)) u = ie;
4321
4326
  else {
4322
- if (await a.getLatestOverview(n.id, we) === void 0)
4327
+ if (await c.getLatestOverview(n.id, we) === void 0)
4323
4328
  return this.logger.error(
4324
4329
  `No "any" channel record for ${Es(n.id)}`
4325
4330
  ), { suggestions: [] };
4326
4331
  u = we;
4327
4332
  }
4328
4333
  else u = n.channel;
4329
- const d = await a.getUpdateSuggestions(n.id, u);
4334
+ const d = await c.getUpdateSuggestions(n.id, u);
4330
4335
  if (d === void 0 || d.length === 0) return { suggestions: [] };
4331
4336
  d.reverse();
4332
4337
  let f;
@@ -4346,7 +4351,7 @@ class nl extends Ms {
4346
4351
  update: { ...n, id: { ...n.id, version: F } }
4347
4352
  }));
4348
4353
  if (f === void 0) return { suggestions: h };
4349
- if (c !== void 0 && rl.lte(f, c))
4354
+ if (a !== void 0 && rl.lte(f, a))
4350
4355
  return { suggestions: h };
4351
4356
  const g = {
4352
4357
  ...n,
@@ -4354,7 +4359,7 @@ class nl extends Ms {
4354
4359
  };
4355
4360
  return (async () => {
4356
4361
  try {
4357
- await a.getComponents(g.id);
4362
+ await c.getComponents(g.id);
4358
4363
  } catch (E) {
4359
4364
  this.logger.warn(E);
4360
4365
  }
@@ -4470,13 +4475,13 @@ class al {
4470
4475
  }
4471
4476
  ), this.pFrame.setDataSource(this);
4472
4477
  for (const n of o) {
4473
- for (const c of nn(n.data)) this.blobIdToResource.set(Ir(c), c);
4478
+ for (const a of nn(n.data)) this.blobIdToResource.set(Ir(a), a);
4474
4479
  const i = an(n.data, Ir);
4475
4480
  try {
4476
4481
  this.pFrame.addColumnSpec(n.id, n.spec), this.pFrame.setColumnData(n.id, i);
4477
- } catch (c) {
4482
+ } catch (a) {
4478
4483
  throw new Error(
4479
- `Adding column ${n.id} to PFrame failed: ${c}; Spec: ${JSON.stringify(n.spec)}, DataInfo: ${JSON.stringify(i)}.`
4484
+ `Adding column ${n.id} to PFrame failed: ${a}; Spec: ${JSON.stringify(n.spec)}, DataInfo: ${JSON.stringify(i)}.`
4480
4485
  );
4481
4486
  }
4482
4487
  }
@@ -4524,13 +4529,13 @@ class cl {
4524
4529
  super(), this.pFrames = n;
4525
4530
  }
4526
4531
  async createNewResource(n) {
4527
- const i = this.pFrames.getByKey(n.pFrameHandle), c = await o.run(async () => (ye().logPFrameRequests && t.info(
4532
+ const i = this.pFrames.getByKey(n.pFrameHandle), a = await o.run(async () => (ye().logPFrameRequests && t.info(
4528
4533
  `PTable creation (pTableHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n, Ee)}`
4529
4534
  ), await i.pFrame.createTable({
4530
4535
  src: Ie(n.def.src),
4531
4536
  filters: pt(n.def.filters)
4532
4537
  })));
4533
- return n.def.sorting.length !== 0 ? c.sort(n.def.sorting) : c;
4538
+ return n.def.sorting.length !== 0 ? a.sort(n.def.sorting) : a;
4534
4539
  }
4535
4540
  calculateParamsKey(n) {
4536
4541
  return ll(n);
@@ -4571,7 +4576,7 @@ class cl {
4571
4576
  async () => await this.pFrames.getByKey(e).pFrame.findColumns(r)
4572
4577
  )).hits.filter((n) => (
4573
4578
  // only exactly matching columns
4574
- n.mappingVariants.length === 0 || n.mappingVariants.some((i) => i.qualifications.forHit.length === 0 && i.qualifications.forQueries.every((c) => c.length === 0))
4579
+ n.mappingVariants.length === 0 || n.mappingVariants.some((i) => i.qualifications.forHit.length === 0 && i.qualifications.forQueries.every((a) => a.length === 0))
4575
4580
  )).map((n) => n.hit)
4576
4581
  };
4577
4582
  }
@@ -4601,9 +4606,9 @@ class cl {
4601
4606
  const o = r.getSpec(), n = await this.concurrencyLimiter.run(
4602
4607
  async () => await r.getData([...o.keys()])
4603
4608
  );
4604
- return r.dispose(), o.map((i, c) => ({
4609
+ return r.dispose(), o.map((i, a) => ({
4605
4610
  spec: i,
4606
- data: n[c]
4611
+ data: n[a]
4607
4612
  }));
4608
4613
  }
4609
4614
  async getUniqueValues(e, t) {
@@ -4668,9 +4673,9 @@ function ul(s) {
4668
4673
  n = {
4669
4674
  type: o.type,
4670
4675
  keyLength: o.keyLength,
4671
- payload: Object.entries(o.data).map(([c, a]) => ({
4672
- key: c,
4673
- value: a
4676
+ payload: Object.entries(o.data).map(([a, c]) => ({
4677
+ key: a,
4678
+ value: c
4674
4679
  }))
4675
4680
  };
4676
4681
  break;
@@ -4678,9 +4683,9 @@ function ul(s) {
4678
4683
  n = {
4679
4684
  type: o.type,
4680
4685
  keyLength: o.partitionKeyLength,
4681
- payload: Object.entries(o.parts).map(([c, a]) => ({
4682
- key: c,
4683
- value: a.id.toString()
4686
+ payload: Object.entries(o.parts).map(([a, c]) => ({
4687
+ key: a,
4688
+ value: c.id.toString()
4684
4689
  }))
4685
4690
  };
4686
4691
  break;
@@ -4688,16 +4693,16 @@ function ul(s) {
4688
4693
  n = {
4689
4694
  type: o.type,
4690
4695
  keyLength: o.partitionKeyLength,
4691
- payload: Object.entries(o.parts).map(([c, a]) => ({
4692
- key: c,
4693
- value: [a.index.id.toString(), a.values.id.toString()]
4696
+ payload: Object.entries(o.parts).map(([a, c]) => ({
4697
+ key: a,
4698
+ value: [c.index.id.toString(), c.values.id.toString()]
4694
4699
  }))
4695
4700
  };
4696
4701
  break;
4697
4702
  default:
4698
4703
  throw Error(`unsupported resource type: ${i}`);
4699
4704
  }
4700
- return n.payload.sort((c, a) => c.key.localeCompare(a.key)), n;
4705
+ return n.payload.sort((a, c) => a.key.localeCompare(c.key)), n;
4701
4706
  })
4702
4707
  );
4703
4708
  e.sort((r, o) => r.id.localeCompare(o.id));
@@ -4709,7 +4714,7 @@ async function dl(s, e, t) {
4709
4714
  ...as,
4710
4715
  ...cs(e),
4711
4716
  ...t
4712
- }, o = new Nr(r.localSecret), n = Xs(r.logger, s, r.localProjections), i = zs(s, r.logger), c = Ys(s, r.logger), a = Qs(s, r.logger), l = new Zs(
4717
+ }, o = new Nr(r.localSecret), n = Xs(r.logger, s, r.localProjections), i = zs(s, r.logger), a = Ys(s, r.logger), c = Qs(s, r.logger), l = new Zs(
4713
4718
  r.logger,
4714
4719
  n,
4715
4720
  i,
@@ -4719,8 +4724,8 @@ async function dl(s, e, t) {
4719
4724
  ), u = new eo(
4720
4725
  r.logger,
4721
4726
  o,
4722
- c,
4723
4727
  a,
4728
+ c,
4724
4729
  r.uploadDriverOps
4725
4730
  ), d = new to(r.logger, i, r.logStreamDriverOps), f = new ro(r.logger, d, l), h = await so.init(
4726
4731
  r.logger,
@@ -4740,7 +4745,7 @@ async function dl(s, e, t) {
4740
4745
  };
4741
4746
  }
4742
4747
  class ms {
4743
- constructor(e, t, r, o, n, i, c, a) {
4748
+ constructor(e, t, r, o, n, i, a, c) {
4744
4749
  S(this, "pl");
4745
4750
  /** Contains a reactive list of projects along with their meta information. */
4746
4751
  S(this, "projectList");
@@ -4748,7 +4753,7 @@ class ms {
4748
4753
  // Projects
4749
4754
  //
4750
4755
  S(this, "openedProjectsByRid", /* @__PURE__ */ new Map());
4751
- this.env = e, this.driverKit = t, this.signer = r, this.projectListResourceId = o, this.openedProjectsList = n, this.projectListTree = i, this.blockRegistryProvider = c, this.projectList = a, this.pl = this.env.pl;
4756
+ this.env = e, this.driverKit = t, this.signer = r, this.projectListResourceId = o, this.openedProjectsList = n, this.projectListTree = i, this.blockRegistryProvider = a, this.projectList = c, this.pl = this.env.pl;
4752
4757
  }
4753
4758
  /** Returns extended API driver kit used internally by middle layer. */
4754
4759
  get internalDriverKit() {
@@ -4839,38 +4844,38 @@ class ms {
4839
4844
  return E.lock(_), E.setField(F, _), await E.commit(), await _.globalId;
4840
4845
  } else
4841
4846
  return N.value;
4842
- }), i = o.logger, c = await dl(e, t, o), a = new ks(e.httpDispatcher, {
4847
+ }), i = o.logger, a = await dl(e, t, o), c = new ks(e.httpDispatcher, {
4843
4848
  minTimeout: 250,
4844
4849
  maxRetries: 4
4845
- }), l = new mo(a), u = new Yo(
4850
+ }), l = new mo(c), u = new Yo(
4846
4851
  l,
4847
- c.signer,
4848
- a
4852
+ a.signer,
4853
+ c
4849
4854
  ), d = new oo(
4850
4855
  i,
4851
4856
  e.httpDispatcher,
4852
4857
  o.frontendDownloadPath
4853
4858
  ), f = {
4854
4859
  pl: e,
4855
- signer: c.signer,
4860
+ signer: a.signer,
4856
4861
  logger: i,
4857
4862
  httpDispatcher: e.httpDispatcher,
4858
- retryHttpDispatcher: a,
4863
+ retryHttpDispatcher: c,
4859
4864
  ops: o,
4860
4865
  bpPreparer: u,
4861
4866
  frontendDownloadDriver: d,
4862
- driverKit: c,
4867
+ driverKit: a,
4863
4868
  blockUpdateWatcher: new nl(l, i, {
4864
4869
  minDelay: o.devBlockUpdateRecheckInterval,
4865
- http: a,
4870
+ http: c,
4866
4871
  preferredUpdateChannel: o.preferredUpdateChannel
4867
4872
  }),
4868
4873
  quickJs: await qs()
4869
4874
  }, h = new _s([]), g = await Fo(e, n, h, f);
4870
4875
  return new ms(
4871
4876
  f,
4872
- c,
4873
- c.signer,
4877
+ a,
4878
+ a.signer,
4874
4879
  n,
4875
4880
  h,
4876
4881
  g.tree,
@@ -4935,14 +4940,14 @@ async function ql(s, e = {}) {
4935
4940
  bodyLimit: 300,
4936
4941
  ...e
4937
4942
  }, r = [];
4938
- pl.forEach((a) => {
4939
- ao(a).subscribe((u) => {
4943
+ pl.forEach((c) => {
4944
+ ao(c).subscribe((u) => {
4940
4945
  var f;
4941
4946
  const d = (/* @__PURE__ */ new Date()).toISOString();
4942
4947
  (f = u == null ? void 0 : u.response) != null && f.headers && (u.response.headers = u.response.headers.map((h) => h.toString())), r.push(
4943
4948
  JSON.stringify({
4944
4949
  timestamp: d,
4945
- event: a,
4950
+ event: c,
4946
4951
  data: u
4947
4952
  })
4948
4953
  );
@@ -4960,27 +4965,27 @@ async function ql(s, e = {}) {
4960
4965
  const l = await new Kt(n).ping();
4961
4966
  return JSON.stringify(l).slice(0, t.bodyLimit) + "...";
4962
4967
  });
4963
- const c = new Kt(n).ll.httpDispatcher;
4968
+ const a = new Kt(n).ll.httpDispatcher;
4964
4969
  return o.blockRegistryOverviewChecks = await me(
4965
4970
  t.blockRegistryDurationMs,
4966
4971
  t.maxRegistryChecksPerSecond,
4967
- async () => await ke(new URL(t.blockOverviewPath, t.blockRegistryUrl), t, c)
4972
+ async () => await ke(new URL(t.blockOverviewPath, t.blockRegistryUrl), t, a)
4968
4973
  ), o.blockGARegistryOverviewChecks = await me(
4969
4974
  t.blockRegistryDurationMs,
4970
4975
  t.maxRegistryChecksPerSecond,
4971
- async () => await ke(new URL(t.blockOverviewPath, t.blockGARegistryUrl), t, c)
4976
+ async () => await ke(new URL(t.blockOverviewPath, t.blockGARegistryUrl), t, a)
4972
4977
  ), o.blockRegistryUiChecks = await me(
4973
4978
  t.blockRegistryDurationMs,
4974
4979
  t.maxRegistryChecksPerSecond,
4975
- async () => await ke(new URL(t.blockUiPath, t.blockRegistryUrl), t, c)
4980
+ async () => await ke(new URL(t.blockUiPath, t.blockRegistryUrl), t, a)
4976
4981
  ), o.blockGARegistryUiChecks = await me(
4977
4982
  t.blockRegistryDurationMs,
4978
4983
  t.maxRegistryChecksPerSecond,
4979
- async () => await ke(new URL(t.blockUiPath, t.blockGARegistryUrl), t, c)
4984
+ async () => await ke(new URL(t.blockUiPath, t.blockGARegistryUrl), t, a)
4980
4985
  ), o.autoUpdateCdnChecks = await me(
4981
4986
  t.autoUpdateCdnDurationMs,
4982
4987
  t.maxAutoUpdateCdnChecksPerSecond,
4983
- async () => await ke(t.autoUpdateCdnUrl, t, c)
4988
+ async () => await ke(t.autoUpdateCdnUrl, t, a)
4984
4989
  ), hl(o, s, t, r);
4985
4990
  }
4986
4991
  async function me(s, e, t) {
@@ -4993,13 +4998,13 @@ async function me(s, e, t) {
4993
4998
  } catch (l) {
4994
4999
  i = { ok: !1, error: l };
4995
5000
  }
4996
- const c = Fr(n);
5001
+ const a = Fr(n);
4997
5002
  o.push({
4998
- elapsedMs: c,
5003
+ elapsedMs: a,
4999
5004
  response: i
5000
5005
  });
5001
- const a = 1e3 / e - c;
5002
- a > 0 && await Vr(a);
5006
+ const c = 1e3 / e - a;
5007
+ c > 0 && await Vr(c);
5003
5008
  }
5004
5009
  return o;
5005
5010
  }
@@ -5015,8 +5020,8 @@ async function ke(s, e, t) {
5015
5020
  };
5016
5021
  }
5017
5022
  function hl(s, e, t, r) {
5018
- const o = s.plPings.filter((c) => c.response.ok), n = s.plPings.filter((c) => !c.response.ok), i = [
5019
- ...new Set(o.map((c) => JSON.stringify(c.response.value)))
5023
+ const o = s.plPings.filter((a) => a.response.ok), n = s.plPings.filter((a) => !a.response.ok), i = [
5024
+ ...new Set(o.map((a) => JSON.stringify(a.response.value)))
5020
5025
  ];
5021
5026
  return `
5022
5027
  Network report: