@milaboratories/pl-middle-layer 1.41.13 → 1.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- var po = Object.defineProperty;
1
+ var fo = Object.defineProperty;
2
2
  var Wr = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s), zr = (s) => {
3
3
  throw TypeError(s);
4
4
  };
5
- var fo = (s, e, t) => e in s ? po(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
- var b = (s, e, t) => fo(s, typeof e != "symbol" ? e + "" : e, t);
5
+ var ho = (s, e, t) => e in s ? fo(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
+ var b = (s, e, t) => ho(s, typeof e != "symbol" ? e + "" : e, t);
7
7
  var Xr = (s, e, t) => {
8
8
  if (e != null) {
9
9
  typeof e != "object" && typeof e != "function" && zr("Object expected");
@@ -32,79 +32,79 @@ var Xr = (s, e, t) => {
32
32
  };
33
33
  return i();
34
34
  };
35
- import { extractConfig as Ee, UiError as Qr, PFrameDriverError as K, mapValueInVOE as vn, executePSpecPredicate as ho, mapPObjectData as ve, mapPTableDef as Sr, isDataInfo as yn, mapDataInfo as br, checkBlockFlag as go, JsRenderInternal as mo, isConfigLambda as wn, extractCodeWithInfo as ft, DefaultNavigationState as vo, isPFrameDriverError as yo, ensureError as it, extractAllColumns as wo, isAbortError as So, RuntimeCapabilities as bo } from "@platforma-sdk/model";
35
+ import { extractConfig as Ee, UiError as Qr, PFrameDriverError as K, mapValueInVOE as yn, executePSpecPredicate as go, mapPObjectData as ve, mapPTableDef as Sr, isDataInfo as wn, mapDataInfo as br, checkBlockFlag as mo, JsRenderInternal as vo, isConfigLambda as Sn, extractCodeWithInfo as ft, DefaultNavigationState as yo, isPFrameDriverError as wo, ensureError as it, extractAllColumns as So, isAbortError as bo, RuntimeCapabilities as ko } from "@platforma-sdk/model";
36
36
  export * from "@platforma-sdk/model";
37
- import { StableChannel as je, AnyChannel as xe, InitialBlockSettings as Zr, blockPackIdToString as ko } from "@milaboratories/pl-model-middle-layer";
37
+ import { StableChannel as je, AnyChannel as xe, InitialBlockSettings as Zr, blockPackIdToString as Co } from "@milaboratories/pl-model-middle-layer";
38
38
  export * from "@milaboratories/pl-model-middle-layer";
39
39
  export * from "@milaboratories/pl-deployments";
40
- import { request as $r, RetryAgent as Co } from "undici";
41
- import { RegistryV1 as ye, tryLoadPackDescription as kr, BlockPackMetaEmbedAbsoluteBytes as Ro, RegistryV2Reader as Po, folderReaderByUrl as Eo, loadPackDescription as es } from "@platforma-sdk/block-tools";
40
+ import { request as $r, RetryAgent as Ro } from "undici";
41
+ import { RegistryV1 as ye, tryLoadPackDescription as kr, BlockPackMetaEmbedAbsoluteBytes as Po, RegistryV2Reader as Eo, folderReaderByUrl as Oo, loadPackDescription as es } from "@platforma-sdk/block-tools";
42
42
  import oe from "node:fs";
43
- import * as Oo from "node:path";
43
+ import * as Fo from "node:path";
44
44
  import q from "node:path";
45
- import Fo from "yaml";
46
- import { assertNever as Q, notEmpty as N, canonicalJsonBytes as To, canonicalJsonGzBytes as Io, cachedDeserialize as Je, cachedDecode as kt, deepFreeze as ts, ConsoleLoggerAdapter as Sn, isDisposable as $o, isAsyncDisposable as Ao, ConcurrencyLimitingExecutor as rs, emptyDir as Lo, HmacSha256Signer as Ar, BlockEventDispatcher as Do } from "@milaboratories/ts-helpers";
47
- import * as bn from "node:fs/promises";
45
+ import To from "yaml";
46
+ import { assertNever as Q, notEmpty as N, canonicalJsonBytes as Io, canonicalJsonGzBytes as $o, cachedDeserialize as Me, cachedDecode as kt, deepFreeze as ts, ConsoleLoggerAdapter as bn, isDisposable as Ao, isAsyncDisposable as Lo, ConcurrencyLimitingExecutor as rs, emptyDir as Do, HmacSha256Signer as Ar, BlockEventDispatcher as No } from "@milaboratories/ts-helpers";
47
+ import * as kn from "node:fs/promises";
48
48
  import at from "node:fs/promises";
49
- import { tryResolve as No } from "@milaboratories/resolve-helper";
50
- import { resourceTypesEqual as ue, field as M, Pl as D, PlClient as kn, isResourceId as ss, isNullResourceId as Me, isResource as Bo, isResourceRef as jo, isNotNullResourceId as Cr, ensureResourceIdNotNull as ct, resourceType as we, resourceTypeToString as xo, stringifyWithResourceId as Ye, resourceIdToString as Fe, isNotFoundError as Uo, isTimeoutOrCancelError as Vo, toGlobalResourceId as Jo, UnauthenticatedPlClient as Cn, toGlobalFieldId as Mo, poll as Go, ContinuePolling as qo, plAddressToConfig as _o } from "@milaboratories/pl-client";
49
+ import { tryResolve as Bo } from "@milaboratories/resolve-helper";
50
+ import { resourceTypesEqual as ue, field as J, Pl as D, PlClient as Cn, isResourceId as ss, isNullResourceId as Je, isResource as jo, isResourceRef as xo, isNotNullResourceId as Cr, ensureResourceIdNotNull as ct, resourceType as we, resourceTypeToString as Uo, stringifyWithResourceId as Ye, resourceIdToString as Fe, isNotFoundError as Vo, isTimeoutOrCancelError as Mo, DefaultRetryOptions as ns, toGlobalResourceId as Jo, UnauthenticatedPlClient as Rn, toGlobalFieldId as Go, poll as qo, ContinuePolling as _o, plAddressToConfig as Ko } from "@milaboratories/pl-client";
51
51
  export * from "@milaboratories/pl-client";
52
- import { SynchronizedTreeState as Rn, treeDumpStats as Ko, isPlTreeNodeAccessor as Ho } from "@milaboratories/pl-tree";
53
- import { Computable as H, ChangeSource as ns, PollComputablePool as Wo, WatchableValue as zo } from "@milaboratories/computable";
54
- import { randomUUID as ge, createHash as Ie, randomBytes as Xo } from "node:crypto";
55
- import { PlTemplateV1 as Y, PlTemplateOverrideV1 as Oe, PlTemplateLibV1 as he, PlTemplateSoftwareV1 as de, parseTemplate as Yo } from "@milaboratories/pl-model-backend";
52
+ import { SynchronizedTreeState as Pn, treeDumpStats as Ho, isPlTreeNodeAccessor as Wo } from "@milaboratories/pl-tree";
53
+ import { Computable as H, ChangeSource as os, PollComputablePool as zo, WatchableValue as Xo } from "@milaboratories/computable";
54
+ import { randomUUID as ge, createHash as Ie, randomBytes as Yo } from "node:crypto";
55
+ import { PlTemplateV1 as Y, PlTemplateOverrideV1 as Oe, PlTemplateLibV1 as he, PlTemplateSoftwareV1 as de, parseTemplate as Qo } from "@milaboratories/pl-model-backend";
56
56
  import { LRUCache as lt } from "lru-cache";
57
- import { Worker as Qo } from "node:worker_threads";
58
- import Pn from "denque";
57
+ import { Worker as Zo } from "node:worker_threads";
58
+ import En from "denque";
59
59
  import { Templates as Se } from "@platforma-sdk/workflow-tengo";
60
60
  import re from "canonicalize";
61
- import Zo from "node:assert";
62
- import { Scope as Ge, errors as ei, getQuickJS as ti } from "quickjs-emscripten";
63
- import { PlQuickJSError as ri } from "@milaboratories/pl-errors";
64
- import * as os from "remeda";
65
- import { setTimeout as En } from "node:timers/promises";
66
- import { createDownloadClient as On, createLogsClient as si, createUploadBlobClient as Fn, createUploadProgressClient as ni, DownloadDriver as oi, DownloadBlobToURLDriver as ii, UploadDriver as ai, LogsStreamDriver as ci, LogsDriver as li, LsDriver as Tn, DownloadUrlDriver as ui, uploadBlob as In, ImportFileHandleUploadData as $n, isUpload as di, isSignMatch as pi } from "@milaboratories/pl-drivers";
67
- import { PFrame as An } from "@milaboratories/pframes-rs-node";
68
- import { channel as fi } from "node:diagnostics_channel";
69
- import { text as hi } from "node:stream/consumers";
70
- import Ln from "node:os";
71
- async function is(s) {
61
+ import ei from "node:assert";
62
+ import { Scope as Ge, errors as ti, getQuickJS as ri } from "quickjs-emscripten";
63
+ import { PlQuickJSError as si } from "@milaboratories/pl-errors";
64
+ import * as is from "remeda";
65
+ import { setTimeout as On } from "node:timers/promises";
66
+ import { createDownloadClient as Fn, createLogsClient as ni, createUploadBlobClient as Tn, createUploadProgressClient as oi, DownloadDriver as ii, DownloadBlobToURLDriver as ai, UploadDriver as ci, LogsStreamDriver as li, LogsDriver as ui, LsDriver as In, DownloadUrlDriver as di, uploadBlob as $n, ImportFileHandleUploadData as An, isUpload as pi, isSignMatch as fi } from "@milaboratories/pl-drivers";
67
+ import { PFrame as Ln } from "@milaboratories/pframes-rs-node";
68
+ import { channel as hi } from "node:diagnostics_channel";
69
+ import { text as gi } from "node:stream/consumers";
70
+ import Dn from "node:os";
71
+ async function as(s) {
72
72
  try {
73
- return await bn.stat(s, { bigint: !0 });
73
+ return await kn.stat(s, { bigint: !0 });
74
74
  } catch (e) {
75
75
  if (e.code === "ENOENT")
76
76
  return;
77
77
  throw e;
78
78
  }
79
79
  }
80
- const gi = [ye.PlPackageYamlConfigFile], mi = [ye.PlPackageJsonConfigFile], Lr = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Dr = ["config", "dist", "config.json"], Dn = ["frontend", "dist"], as = "block-model/dist/config.json", vi = "block-ui/package.json", yi = [
80
+ const mi = [ye.PlPackageYamlConfigFile], vi = [ye.PlPackageJsonConfigFile], Lr = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Dr = ["config", "dist", "config.json"], Nn = ["frontend", "dist"], cs = "block-model/dist/config.json", yi = "block-ui/package.json", wi = [
81
81
  Lr,
82
82
  Dr,
83
- gi,
84
83
  mi,
85
- Dn
84
+ vi,
85
+ Nn
86
86
  ];
87
- async function wi(s) {
88
- return await is(q.join(s, ...Dr)) !== void 0 || await is(q.join(s, ...Lr)) !== void 0;
87
+ async function Si(s) {
88
+ return await as(q.join(s, ...Dr)) !== void 0 || await as(q.join(s, ...Lr)) !== void 0;
89
89
  }
90
90
  function Ct(s, e) {
91
- const t = No(s, e);
91
+ const t = Bo(s, e);
92
92
  if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
93
93
  return t;
94
94
  }
95
- async function cs(s, e) {
96
- if (q.isAbsolute(s) || (s = q.resolve(s)), await wi(s))
95
+ async function ls(s, e) {
96
+ if (q.isAbsolute(s) || (s = q.resolve(s)), await Si(s))
97
97
  return {
98
98
  workflow: q.join(s, ...Lr),
99
99
  config: q.join(s, ...Dr),
100
- ui: q.join(s, ...Dn)
100
+ ui: q.join(s, ...Nn)
101
101
  };
102
102
  {
103
- const t = Ct(s, as), r = Ct(s, as), n = Ct(s, vi);
103
+ const t = Ct(s, cs), r = Ct(s, cs), n = Ct(s, yi);
104
104
  return { workflow: t, config: r, ui: q.resolve(n, "..", "dist") };
105
105
  }
106
106
  }
107
- async function Si(s) {
107
+ async function bi(s) {
108
108
  try {
109
109
  return await oe.promises.readFile(s, "utf8");
110
110
  } catch (e) {
@@ -113,7 +113,7 @@ async function Si(s) {
113
113
  throw e;
114
114
  }
115
115
  }
116
- async function bi(s) {
116
+ async function ki(s) {
117
117
  try {
118
118
  return await oe.promises.stat(s, { bigint: !0 });
119
119
  } catch (e) {
@@ -122,10 +122,10 @@ async function bi(s) {
122
122
  throw e;
123
123
  }
124
124
  }
125
- async function Nn(s) {
125
+ async function Bn(s) {
126
126
  let e = 0n;
127
- for (const t of yi) {
128
- const r = q.join(s, ...t), n = await bi(r);
127
+ for (const t of wi) {
128
+ const r = q.join(s, ...t), n = await ki(r);
129
129
  n !== void 0 && e < n.mtimeNs && (e = n.mtimeNs);
130
130
  }
131
131
  return e.toString();
@@ -136,7 +136,7 @@ async function Nr(s) {
136
136
  }), t = await oe.promises.stat(s.components.model.file, { bigint: !0 });
137
137
  return (e.mtimeNs > t.mtimeNs ? e.mtimeNs : t.mtimeNs).toString();
138
138
  }
139
- class uu {
139
+ class du {
140
140
  constructor(e, t, r) {
141
141
  this.v2Provider = e, this.registries = t, this.http = r;
142
142
  }
@@ -204,11 +204,11 @@ class uu {
204
204
  case "local-dev":
205
205
  for (const n of await oe.promises.readdir(r.path, { withFileTypes: !0 })) {
206
206
  if (!n.isDirectory()) continue;
207
- const i = q.join(r.path, n.name), o = await Si(
207
+ const i = q.join(r.path, n.name), o = await bi(
208
208
  q.join(i, ye.PlPackageYamlConfigFile)
209
209
  );
210
210
  if (o !== void 0) {
211
- const a = ye.PlPackageConfigData.parse(Fo.parse(o)), c = await Nn(i), l = {
211
+ const a = ye.PlPackageConfigData.parse(To.parse(o)), c = await Bn(i), l = {
212
212
  organization: a.organization,
213
213
  name: a.package,
214
214
  version: "DEV"
@@ -246,7 +246,7 @@ class uu {
246
246
  if (c !== void 0) {
247
247
  const l = await Nr(c), u = {
248
248
  id: c.id,
249
- meta: await Ro.parseAsync(c.meta),
249
+ meta: await Po.parseAsync(c.meta),
250
250
  featureFlags: c.featureFlags,
251
251
  spec: {
252
252
  type: "dev-v2",
@@ -288,7 +288,7 @@ class uu {
288
288
  return await this.v2Provider.getRegistry(n.url).getSpecificOverview(t, r);
289
289
  }
290
290
  }
291
- class ki {
291
+ class Ci {
292
292
  constructor(e) {
293
293
  b(this, "registries", /* @__PURE__ */ new Map());
294
294
  this.http = e;
@@ -296,33 +296,33 @@ class ki {
296
296
  getRegistry(e) {
297
297
  const t = this.registries.get(e);
298
298
  if (t) return t;
299
- const r = new Po(Eo(e, this.http));
299
+ const r = new Eo(Oo(e, this.http));
300
300
  return this.registries.set(e, r), r;
301
301
  }
302
302
  }
303
- const du = {
303
+ const pu = {
304
304
  type: "remote-v2",
305
305
  url: "https://blocks.pl-open.science/"
306
- }, pu = {
306
+ }, fu = {
307
307
  type: "remote-v1",
308
308
  url: "https://block.registry.platforma.bio/releases"
309
- }, fu = {
309
+ }, hu = {
310
310
  type: "remote-v1",
311
311
  url: "https://block.registry.platforma.bio/dev"
312
- }, Ci = {
313
- groups: [{ id: "default", label: "Default", blocks: [] }]
314
312
  }, Ri = {
313
+ groups: [{ id: "default", label: "Default", blocks: [] }]
314
+ }, Pi = {
315
315
  stagingRefreshTimestamp: 0,
316
316
  blocksInLimbo: []
317
- }, Pi = {
317
+ }, Ei = {
318
318
  label: "New Project"
319
- }, Ei = { name: "UserProject", version: "2" }, ut = "SchemaVersion", qe = "2", Br = "ProjectCreated", _e = "ProjectLastModified", Ke = "ProjectMeta", fe = "ProjectStructure", dt = "BlockRenderingState", Oi = "BlockArgsAuthor/";
319
+ }, Oi = { name: "UserProject", version: "2" }, ut = "SchemaVersion", qe = "2", Br = "ProjectCreated", _e = "ProjectLastModified", Ke = "ProjectMeta", fe = "ProjectStructure", dt = "BlockRenderingState", Fi = "BlockArgsAuthor/";
320
320
  function Rr(s) {
321
- return `${Oi}${s}`;
321
+ return `${Fi}${s}`;
322
322
  }
323
- const Pr = "ProjectStructureAuthor", Fi = "__serviceTemplate_";
323
+ const Pr = "ProjectStructureAuthor", Ti = "__serviceTemplate_";
324
324
  function Er(s) {
325
- return `${Fi}${s}`;
325
+ return `${Ti}${s}`;
326
326
  }
327
327
  const Rt = /* @__PURE__ */ new Set([
328
328
  "blockPack",
@@ -337,21 +337,21 @@ const Rt = /* @__PURE__ */ new Set([
337
337
  function _(s, e) {
338
338
  return `${s}-${e}`;
339
339
  }
340
- const Ti = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|uiState|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
341
- function Ii(s) {
342
- const e = s.match(Ti);
340
+ const Ii = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|uiState|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
341
+ function $i(s) {
342
+ const e = s.match(Ii);
343
343
  if (e === null) return;
344
344
  const { blockId: t, fieldName: r } = e.groups;
345
345
  return { blockId: t, fieldName: r };
346
346
  }
347
- const $i = "projects", Bn = { name: "Projects", version: "1" }, Ai = (s) => ue(s.type, Bn) ? s.fields : [];
348
- async function Li(s, e, t, r) {
349
- const n = await Rn.init(
347
+ const Ai = "projects", jn = { name: "Projects", version: "1" }, Li = (s) => ue(s.type, jn) ? s.fields : [];
348
+ async function Di(s, e, t, r) {
349
+ const n = await Pn.init(
350
350
  s,
351
351
  e,
352
352
  {
353
353
  ...r.ops.defaultTreeOptions,
354
- pruning: Ai
354
+ pruning: Li
355
355
  },
356
356
  r.logger
357
357
  );
@@ -375,36 +375,36 @@ async function Li(s, e, t, r) {
375
375
  return l.sort((u) => -u.lastModified.valueOf()), l;
376
376
  }).withStableType(), tree: n };
377
377
  }
378
- const Di = {
378
+ const Ni = {
379
379
  name: "EphRenderTemplate",
380
380
  version: "1"
381
- }, Ni = {
381
+ }, Bi = {
382
382
  name: "RenderTemplate",
383
383
  version: "1"
384
384
  };
385
385
  function jr(s, e, t, r, n) {
386
386
  if (n.length === 0) throw new Error("Zero output names provided");
387
- const i = t ? s.createEphemeral(Di) : s.createStruct(Ni), o = M(i, "template"), a = M(i, "inputs");
387
+ const i = t ? s.createEphemeral(Ni) : s.createStruct(Bi), o = J(i, "template"), a = J(i, "inputs");
388
388
  return s.createField(o, "Input", e), s.createField(a, "Input", D.createPlMap(s, r, t)), s.lockInputs(i), D.futureRecord(s, i, n, "Output", "outputs/");
389
389
  }
390
- const Bi = { name: "BContextEnd", version: "1" }, ji = { name: "BContext", version: "1" }, xi = "id", Ui = "parent/", Vi = ["context", "result"];
391
- function ls(s, e, t) {
392
- return jr(s, e, !0, t, Vi);
390
+ const ji = { name: "BContextEnd", version: "1" }, xi = { name: "BContext", version: "1" }, Ui = "id", Vi = "parent/", Mi = ["context", "result"];
391
+ function us(s, e, t) {
392
+ return jr(s, e, !0, t, Mi);
393
393
  }
394
394
  function Ji(s) {
395
- const e = s.createEphemeral(Bi);
395
+ const e = s.createEphemeral(ji);
396
396
  return s.lock(e), e;
397
397
  }
398
- function us(s, e) {
398
+ function ds(s, e) {
399
399
  if (e.length === 0) return Ji(s);
400
400
  if (e.length === 1) return e[0];
401
- const t = s.createEphemeral(ji);
402
- s.createField(M(t, xi), "Input", D.createPlString(s, ge()));
401
+ const t = s.createEphemeral(xi);
402
+ s.createField(J(t, Ui), "Input", D.createPlString(s, ge()));
403
403
  for (let r = 0; r < e.length; r++)
404
- s.createField(M(t, `${Ui}${r}`), "Input", e[r]);
404
+ s.createField(J(t, `${Vi}${r}`), "Input", e[r]);
405
405
  return s.lock(t), t;
406
406
  }
407
- function jn(s, e) {
407
+ function xn(s, e) {
408
408
  const t = /* @__PURE__ */ new Map(), r = (n, i, o) => {
409
409
  const a = Ie("sha256");
410
410
  i.updateCacheKey(n, a, o);
@@ -415,9 +415,9 @@ function jn(s, e) {
415
415
  }
416
416
  return t.get(c);
417
417
  };
418
- return r(e.template, xn, e.hashToSource);
418
+ return r(e.template, Un, e.hashToSource);
419
419
  }
420
- const ds = {
420
+ const ps = {
421
421
  updateCacheKey(s, e, t) {
422
422
  e.update(he.type.name).update(he.type.version).update(s.name).update(s.version).update(Te(s.name, t, s.sourceHash));
423
423
  },
@@ -435,12 +435,12 @@ const ds = {
435
435
  const n = de.fromV3Data(s, Te(s.name, r, s.sourceHash)), i = e.createStruct(de.type, n.data);
436
436
  return e.setKValue(i, de.metaNameKey, JSON.stringify(n.name)), e.lock(i), i;
437
437
  }
438
- }, xn = {
438
+ }, Un = {
439
439
  updateCacheKey(s, e, t) {
440
440
  e.update(Y.type.name).update(Y.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(Te(s.name, t, s.sourceHash));
441
441
  const r = (n) => (n.sort((i, o) => i[0] === o[0] ? 0 : i[0] < o[0] ? -1 : 1), n);
442
442
  for (const [n, i] of r(Object.entries(s.libs ?? {})))
443
- e.update("lib:" + n), ds.updateCacheKey(i, e, t);
443
+ e.update("lib:" + n), ps.updateCacheKey(i, e, t);
444
444
  for (const [n, i] of r(Object.entries(s.software ?? {})))
445
445
  e.update("soft:" + n), Qe.updateCacheKey(i, e, t);
446
446
  for (const [n, i] of r(Object.entries(s.assets ?? {})))
@@ -455,7 +455,7 @@ const ds = {
455
455
  );
456
456
  for (const [a, c] of Object.entries(s.libs ?? {})) {
457
457
  const l = Y.libField(n, a);
458
- e.createField(l, "Input"), e.setField(l, t(c, ds, r));
458
+ e.createField(l, "Input"), e.setField(l, t(c, ps, r));
459
459
  }
460
460
  for (const [a, c] of Object.entries(s.software ?? {})) {
461
461
  const l = Y.swField(n, a);
@@ -467,7 +467,7 @@ const ds = {
467
467
  }
468
468
  for (const [a, c] of Object.entries(s.templates ?? {})) {
469
469
  const l = Y.tplField(n, a);
470
- e.createField(l, "Input"), e.setField(l, t(c, xn, r));
470
+ e.createField(l, "Input"), e.setField(l, t(c, Un, r));
471
471
  }
472
472
  if (e.lock(n), !s.hashOverride) return n;
473
473
  const i = e.createStruct(
@@ -483,29 +483,29 @@ function Te(s, e, t) {
483
483
  `trying to get "${s}" source: sources map doesn't contain source hash ${t}`
484
484
  );
485
485
  }
486
- function Mi(s, e) {
487
- const t = Yo(e.content), r = t.type;
486
+ function Gi(s, e) {
487
+ const t = Qo(e.content), r = t.type;
488
488
  switch (r) {
489
489
  case "pl.tengo-template.v2":
490
- return Vn(s, t);
490
+ return Mn(s, t);
491
491
  case "pl.tengo-template.v3":
492
- return jn(s, t);
492
+ return xn(s, t);
493
493
  default:
494
494
  Q(r);
495
495
  }
496
496
  }
497
- function Gi(s, e) {
497
+ function qi(s, e) {
498
498
  const t = e.data, r = t.type;
499
499
  switch (r) {
500
500
  case "pl.tengo-template.v2":
501
- return Vn(s, t);
501
+ return Mn(s, t);
502
502
  case "pl.tengo-template.v3":
503
- return jn(s, t);
503
+ return xn(s, t);
504
504
  default:
505
505
  Q(r);
506
506
  }
507
507
  }
508
- const ps = {
508
+ const fs = {
509
509
  hash(s, e) {
510
510
  e.update(he.type.name).update(he.type.version).update(s.name).update(s.version).update(s.src);
511
511
  },
@@ -523,12 +523,12 @@ const ps = {
523
523
  const r = de.fromV2Data(s), n = e.createStruct(de.type, r.data);
524
524
  return e.setKValue(n, de.metaNameKey, JSON.stringify(r.name)), e.lock(n), n;
525
525
  }
526
- }, Un = {
526
+ }, Vn = {
527
527
  hash(s, e) {
528
528
  e.update(Y.type.name).update(Y.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(s.src);
529
529
  const t = (r) => (r.sort((n, i) => n[0] === i[0] ? 0 : n[0] < i[0] ? -1 : 1), r);
530
530
  for (const [r, n] of t(Object.entries(s.libs ?? {})))
531
- e.update("lib:" + r), ps.hash(n, e);
531
+ e.update("lib:" + r), fs.hash(n, e);
532
532
  for (const [r, n] of t(Object.entries(s.software ?? {})))
533
533
  e.update("soft:" + r), Ze.hash(n, e);
534
534
  for (const [r, n] of t(Object.entries(s.assets ?? {})))
@@ -543,7 +543,7 @@ const ps = {
543
543
  );
544
544
  for (const [o, a] of Object.entries(s.libs ?? {})) {
545
545
  const c = Y.libField(r, o);
546
- e.createField(c, "Input"), e.setField(c, t(a, ps));
546
+ e.createField(c, "Input"), e.setField(c, t(a, fs));
547
547
  }
548
548
  for (const [o, a] of Object.entries(s.software ?? {})) {
549
549
  const c = Y.swField(r, o);
@@ -555,7 +555,7 @@ const ps = {
555
555
  }
556
556
  for (const [o, a] of Object.entries(s.templates ?? {})) {
557
557
  const c = Y.tplField(r, o);
558
- e.createField(c, "Input"), e.setField(c, t(a, Un));
558
+ e.createField(c, "Input"), e.setField(c, t(a, Vn));
559
559
  }
560
560
  if (e.lock(r), !s.hashOverride) return r;
561
561
  const n = e.createStruct(
@@ -565,7 +565,7 @@ const ps = {
565
565
  return e.createField(i, "Service"), e.setField(i, r), e.lock(n), n;
566
566
  }
567
567
  };
568
- function Vn(s, e) {
568
+ function Mn(s, e) {
569
569
  const t = /* @__PURE__ */ new Map(), r = (n, i) => {
570
570
  const o = Ie("sha256");
571
571
  i.hash(n, o);
@@ -576,12 +576,12 @@ function Vn(s, e) {
576
576
  }
577
577
  return t.get(a);
578
578
  };
579
- return r(e, Un);
579
+ return r(e, Vn);
580
580
  }
581
- const qi = { name: "TengoTemplateGet", version: "1" }, _i = "registry", Ki = "templateURI", Hi = "template", hu = { name: "TengoTemplatePack", version: "1" }, gu = {
581
+ const _i = { name: "TengoTemplateGet", version: "1" }, Ki = "registry", Hi = "templateURI", Wi = "template", gu = { name: "TengoTemplatePack", version: "1" }, mu = {
582
582
  name: "TengoTemplatePackConvert",
583
583
  version: "1"
584
- }, mu = "templatePack", vu = "template";
584
+ }, vu = "templatePack", yu = "template";
585
585
  async function Jn(s) {
586
586
  switch (s.type) {
587
587
  case "from-file":
@@ -598,36 +598,36 @@ async function Jn(s) {
598
598
  return Q(s);
599
599
  }
600
600
  }
601
- function Wi(s, e) {
602
- const t = s.createStruct(qi), r = M(t, _i), n = M(t, Ki), i = M(t, Hi);
601
+ function zi(s, e) {
602
+ const t = s.createStruct(_i), r = J(t, Ki), n = J(t, Hi), i = J(t, Wi);
603
603
  return s.setField(r, s.createValue(D.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(n, s.createValue(D.JsonString, Buffer.from(JSON.stringify(e.path)))), i;
604
604
  }
605
605
  function ht(s, e) {
606
606
  switch (e.type) {
607
607
  case "from-registry":
608
- return Wi(s, e);
608
+ return zi(s, e);
609
609
  case "explicit":
610
- return Mi(s, e);
611
- case "prepared":
612
610
  return Gi(s, e);
611
+ case "prepared":
612
+ return qi(s, e);
613
613
  default:
614
614
  return Q(e);
615
615
  }
616
616
  }
617
- const Mn = { name: "Frontend/FromUrl", version: "1" }, Gn = {
617
+ const Gn = { name: "Frontend/FromUrl", version: "1" }, qn = {
618
618
  name: "Frontend/FromFolder",
619
619
  version: "1"
620
620
  };
621
- function zi(s, e) {
621
+ function Xi(s, e) {
622
622
  switch (e.type) {
623
623
  case "url":
624
624
  return s.createValue(
625
- Mn,
625
+ Gn,
626
626
  JSON.stringify({ url: e.url })
627
627
  );
628
628
  case "local":
629
629
  return s.createValue(
630
- Gn,
630
+ qn,
631
631
  JSON.stringify({
632
632
  path: e.path,
633
633
  signature: e.signature
@@ -637,12 +637,12 @@ function zi(s, e) {
637
637
  return Q(e);
638
638
  }
639
639
  }
640
- class Xi {
640
+ class Yi {
641
641
  constructor() {
642
642
  b(this, "nextMessageId", 0);
643
643
  b(this, "worker");
644
644
  b(this, "pendingRequests", /* @__PURE__ */ new Map());
645
- const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : q.resolve(import.meta.dirname, "worker.js"), t = this.worker = new Qo(
645
+ const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : q.resolve(import.meta.dirname, "worker.js"), t = this.worker = new Zo(
646
646
  e,
647
647
  {
648
648
  workerData: {}
@@ -673,17 +673,17 @@ class Xi {
673
673
  return this.terminate();
674
674
  }
675
675
  }
676
- const Yi = { name: "BlockPackCustom", version: "1" }, qn = "template", _n = "frontend";
677
- function fs(s) {
676
+ const Qi = { name: "BlockPackCustom", version: "1" }, _n = "template", Kn = "frontend";
677
+ function hs(s) {
678
678
  return s.endsWith("/") ? s : `${s}/`;
679
679
  }
680
- function Qi(s) {
680
+ function Zi(s) {
681
681
  return Buffer.from(s).toString("utf8");
682
682
  }
683
683
  function et(s) {
684
- return JSON.parse(Qi(s));
684
+ return JSON.parse(Zi(s));
685
685
  }
686
- class Zi {
686
+ class ea {
687
687
  constructor(e, t, r) {
688
688
  b(this, "remoteContentCache", new lt({
689
689
  max: 500,
@@ -703,7 +703,7 @@ class Zi {
703
703
  case "prepared":
704
704
  return e.config;
705
705
  case "dev-v1": {
706
- const t = await cs(e.folder), r = await oe.promises.readFile(t.config, { encoding: "utf-8" });
706
+ const t = await ls(e.folder), r = await oe.promises.readFile(t.config, { encoding: "utf-8" });
707
707
  return JSON.parse(r);
708
708
  }
709
709
  case "dev-v2": {
@@ -713,7 +713,7 @@ class Zi {
713
713
  return JSON.parse(r);
714
714
  }
715
715
  case "from-registry-v1": {
716
- const t = `${fs(e.registryUrl)}${ye.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, r = await this.remoteContentCache.forceFetch(`${t}/config.json`);
716
+ const t = `${hs(e.registryUrl)}${ye.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, r = await this.remoteContentCache.forceFetch(`${t}/config.json`);
717
717
  return et(r);
718
718
  }
719
719
  case "from-registry-v2": {
@@ -730,7 +730,7 @@ class Zi {
730
730
  if (e.type === "prepared")
731
731
  return e;
732
732
  const t = await this.prepareWithoutUnpacking(e);
733
- const r = Xr(n, new Xi(), !0);
733
+ const r = Xr(n, new Yi(), !0);
734
734
  return {
735
735
  ...t,
736
736
  type: "prepared",
@@ -751,7 +751,7 @@ class Zi {
751
751
  case "explicit":
752
752
  return e;
753
753
  case "dev-v1": {
754
- const t = await cs(e.folder), r = await oe.promises.readFile(t.workflow), n = JSON.parse(
754
+ const t = await ls(e.folder), r = await oe.promises.readFile(t.workflow), n = JSON.parse(
755
755
  await oe.promises.readFile(t.config, "utf-8")
756
756
  ), i = t.ui;
757
757
  return {
@@ -793,7 +793,7 @@ class Zi {
793
793
  };
794
794
  }
795
795
  case "from-registry-v1": {
796
- const t = `${fs(e.registryUrl)}${ye.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, r = `${t}/template.plj.gz`, n = await this.remoteContentCache.forceFetch(r), i = new Uint8Array(n), o = await this.remoteContentCache.forceFetch(`${t}/config.json`), a = et(o);
796
+ const t = `${hs(e.registryUrl)}${ye.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, r = `${t}/template.plj.gz`, n = await this.remoteContentCache.forceFetch(r), i = new Uint8Array(n), o = await this.remoteContentCache.forceFetch(`${t}/config.json`), a = et(o);
797
797
  return {
798
798
  type: "explicit",
799
799
  template: {
@@ -829,14 +829,14 @@ class Zi {
829
829
  }
830
830
  }
831
831
  }
832
- function ea(s, e) {
833
- const t = { config: e.config, source: e.source }, r = s.createStruct(Yi, JSON.stringify(t));
834
- return s.createField(M(r, qn), "Input", ht(s, e.template)), s.createField(M(r, _n), "Input", zi(s, e.frontend)), s.lock(r), r;
832
+ function ta(s, e) {
833
+ const t = { config: e.config, source: e.source }, r = s.createStruct(Qi, JSON.stringify(t));
834
+ return s.createField(J(r, _n), "Input", ht(s, e.template)), s.createField(J(r, Kn), "Input", Xi(s, e.frontend)), s.lock(r), r;
835
835
  }
836
- function hs(s, e) {
836
+ function gs(s, e) {
837
837
  switch (e.type) {
838
838
  case "prepared":
839
- return ea(s, e);
839
+ return ta(s, e);
840
840
  default:
841
841
  return Q(e.type);
842
842
  }
@@ -844,7 +844,7 @@ function hs(s, e) {
844
844
  function tt(s, e, t) {
845
845
  return { __isRef: !0, blockId: s, name: e };
846
846
  }
847
- function ta(s) {
847
+ function ra(s) {
848
848
  return typeof s == "object" && s !== null && "__isRef" in s && s.__isRef === !0 && "blockId" in s && "name" in s;
849
849
  }
850
850
  function Or(s, e, t) {
@@ -860,7 +860,7 @@ function Or(s, e, t) {
860
860
  return;
861
861
  case "object":
862
862
  if (e === null) return;
863
- if (ta(e))
863
+ if (ra(e))
864
864
  t === void 0 || t.has(e.blockId) ? (s.upstreams.add(e.blockId), e.requireEnrichments && s.upstreamsRequiringEnrichments.add(e.blockId)) : s.missingReferences = !0;
865
865
  else if (Array.isArray(e))
866
866
  for (const n of e) Or(s, n, t);
@@ -872,7 +872,7 @@ function Or(s, e, t) {
872
872
  Q(r);
873
873
  }
874
874
  }
875
- function ra(s, e) {
875
+ function sa(s, e) {
876
876
  const t = { upstreams: /* @__PURE__ */ new Set(), upstreamsRequiringEnrichments: /* @__PURE__ */ new Set(), missingReferences: !1 };
877
877
  return Or(t, s, e), t;
878
878
  }
@@ -883,7 +883,7 @@ function se(s) {
883
883
  }
884
884
  };
885
885
  }
886
- class Kn {
886
+ class Hn {
887
887
  constructor(e) {
888
888
  /** Nodes are stored in the map in topological order */
889
889
  b(this, "nodes");
@@ -923,14 +923,14 @@ function Fr(s) {
923
923
  };
924
924
  e.set(r, n), t === void 0 ? (n.directUpstream = n.upstream = /* @__PURE__ */ new Set(), n.enrichments = n.enrichmentTargets = /* @__PURE__ */ new Set()) : (n.directUpstream = n.upstream = /* @__PURE__ */ new Set([t.id]), t.directDownstream = t.downstream = /* @__PURE__ */ new Set([n.id]), t.enrichments = t.enrichmentTargets = /* @__PURE__ */ new Set()), t = n;
925
925
  }
926
- return t !== void 0 && (t.directDownstream = t.downstream = /* @__PURE__ */ new Set()), new Kn(e);
926
+ return t !== void 0 && (t.directDownstream = t.downstream = /* @__PURE__ */ new Set()), new Hn(e);
927
927
  }
928
928
  function nt(s, e) {
929
- const t = /* @__PURE__ */ new Map(), r = new Kn(t), n = /* @__PURE__ */ new Set();
929
+ const t = /* @__PURE__ */ new Map(), r = new Hn(t), n = /* @__PURE__ */ new Set();
930
930
  for (const { id: i } of se(s)) {
931
931
  const o = e(i);
932
932
  if (o === void 0) continue;
933
- const a = ra(o.args, n), c = /* @__PURE__ */ new Set([
933
+ const a = sa(o.args, n), c = /* @__PURE__ */ new Set([
934
934
  ...a.upstreams,
935
935
  ...r.traverseIds("enrichments", ...a.upstreamsRequiringEnrichments)
936
936
  ]), l = /* @__PURE__ */ new Set();
@@ -962,7 +962,7 @@ function nt(s, e) {
962
962
  }
963
963
  return r;
964
964
  }
965
- function sa(s, e) {
965
+ function na(s, e) {
966
966
  if (s.size !== e.size) return !1;
967
967
  for (const t of s) if (!e.has(t)) return !1;
968
968
  return !0;
@@ -972,17 +972,17 @@ function Tr(s, e) {
972
972
  for (const t of s) if (e.has(t)) return !0;
973
973
  return !1;
974
974
  }
975
- function gs(s, e) {
975
+ function ms(s, e) {
976
976
  const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
977
977
  return s.nodes.forEach((i) => {
978
978
  const o = e.nodes.get(i.id);
979
- o === void 0 ? t.add(i.id) : (!sa(i.upstream, o.upstream) || Tr(i.upstream, n)) && n.add(i.id);
979
+ o === void 0 ? t.add(i.id) : (!na(i.upstream, o.upstream) || Tr(i.upstream, n)) && n.add(i.id);
980
980
  }), e.nodes.forEach((i) => {
981
981
  s.nodes.has(i.id) ? Tr(i.upstream, n) && n.add(i.id) : r.add(i.id);
982
982
  }), { onlyInA: t, onlyInB: r, different: n };
983
983
  }
984
984
  let Pt;
985
- async function Hn() {
985
+ async function Wn() {
986
986
  if (Pt === void 0) {
987
987
  const s = await Jn(Se["pframes.export-pframe-for-ui"]);
988
988
  if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
@@ -991,7 +991,7 @@ async function Hn() {
991
991
  }
992
992
  return Pt;
993
993
  }
994
- function na(s, e, t) {
994
+ function oa(s, e, t) {
995
995
  return jr(s, e, !0, { pf: t }, ["result"]).result;
996
996
  }
997
997
  let ke;
@@ -1016,7 +1016,7 @@ class Ot {
1016
1016
  constructor(e, t, r, n) {
1017
1017
  b(this, "currentArgsC", Et(
1018
1018
  () => this.fields.currentArgs.modCount,
1019
- () => Je(this.fields.currentArgs.value)
1019
+ () => Me(this.fields.currentArgs.value)
1020
1020
  ));
1021
1021
  b(this, "prodArgsC", Et(
1022
1022
  () => {
@@ -1027,7 +1027,7 @@ class Ot {
1027
1027
  var t;
1028
1028
  const e = (t = this.fields.prodArgs) == null ? void 0 : t.value;
1029
1029
  if (e !== void 0)
1030
- return Je(e);
1030
+ return Me(e);
1031
1031
  }
1032
1032
  ));
1033
1033
  b(this, "productionStaleC", Et(
@@ -1076,12 +1076,12 @@ class Ot {
1076
1076
  getTemplate(e) {
1077
1077
  return e.getFutureFieldValue(
1078
1078
  D.unwrapHolder(e, this.fields.blockPack.ref),
1079
- qn,
1079
+ _n,
1080
1080
  "Input"
1081
1081
  );
1082
1082
  }
1083
1083
  }
1084
- const oa = (s) => {
1084
+ const ia = (s) => {
1085
1085
  throw new Error(`No new block info for ${s}`);
1086
1086
  };
1087
1087
  class pt {
@@ -1176,7 +1176,7 @@ class pt {
1176
1176
  throw new Error("block not found");
1177
1177
  }
1178
1178
  setBlockFieldObj(e, t, r) {
1179
- const n = M(this.rid, _(e, t));
1179
+ const n = J(this.rid, _(e, t));
1180
1180
  if (r.ref === void 0) throw new Error("Can't set value with empty ref");
1181
1181
  this.getBlockInfo(e).fields[t] === void 0 ? this.tx.createField(n, "Dynamic", r.ref) : this.tx.setField(n, r.ref), this.getBlockInfo(e).fields[t] = {
1182
1182
  modCount: this.globalModCount++,
@@ -1191,7 +1191,7 @@ class pt {
1191
1191
  const n = this.getBlockInfo(e);
1192
1192
  for (const i of t) {
1193
1193
  const o = n.fields;
1194
- i in o && (this.tx.removeField(M(this.rid, _(e, i))), delete o[i], this.fieldsChanged = !0, r = !0);
1194
+ i in o && (this.tx.removeField(J(this.rid, _(e, i))), delete o[i], this.fieldsChanged = !0, r = !0);
1195
1195
  }
1196
1196
  return r;
1197
1197
  }
@@ -1248,9 +1248,9 @@ class pt {
1248
1248
  const l = a === "args" ? "currentArgs" : "uiState";
1249
1249
  let u, d = !1;
1250
1250
  if (a === "args")
1251
- u = To(c);
1251
+ u = Io(c);
1252
1252
  else {
1253
- const { data: f, isGzipped: v } = Io(c);
1253
+ const { data: f, isGzipped: v } = $o(c);
1254
1254
  u = f, d = v;
1255
1255
  }
1256
1256
  if (Buffer.compare(i.fields[l].value, u) === 0) continue;
@@ -1273,7 +1273,7 @@ class pt {
1273
1273
  if (((i = n.fields.prodCtx) == null ? void 0 : i.ref) === void 0)
1274
1274
  throw new Error("One of the upstreams staging is not rendered.");
1275
1275
  t.push(D.unwrapHolder(this.tx, n.fields.prodCtx.ref));
1276
- }), us(this.tx, t);
1276
+ }), ds(this.tx, t);
1277
1277
  }
1278
1278
  createStagingCtx(e) {
1279
1279
  const t = [];
@@ -1283,16 +1283,16 @@ class pt {
1283
1283
  if (((i = n.fields.stagingCtx) == null ? void 0 : i.ref) === void 0)
1284
1284
  throw new Error("One of the upstreams staging is not rendered.");
1285
1285
  t.push(D.unwrapHolder(this.tx, n.fields.stagingCtx.ref)), ((o = n.fields.prodCtx) == null ? void 0 : o.ref) !== void 0 && t.push(D.unwrapHolder(this.tx, n.fields.prodCtx.ref));
1286
- }), us(this.tx, t);
1286
+ }), ds(this.tx, t);
1287
1287
  }
1288
1288
  exportCtx(e) {
1289
- return na(this.tx, D.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
1289
+ return oa(this.tx, D.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
1290
1290
  }
1291
1291
  renderStagingFor(e) {
1292
1292
  this.resetStaging(e);
1293
1293
  const t = this.getBlockInfo(e), r = this.createStagingCtx(this.getStagingGraph().nodes.get(e).upstream);
1294
1294
  if (this.getBlock(e).renderingMode !== "Heavy") throw new Error("not supported yet");
1295
- const n = t.getTemplate(this.tx), i = ls(this.tx, n, {
1295
+ const n = t.getTemplate(this.tx), i = us(this.tx, n, {
1296
1296
  args: t.fields.currentArgs.ref,
1297
1297
  blockId: this.tx.createValue(D.JsonString, JSON.stringify(e)),
1298
1298
  isProduction: this.tx.createValue(D.JsonBool, JSON.stringify(!1)),
@@ -1310,7 +1310,7 @@ class pt {
1310
1310
  const t = this.getBlockInfo(e), r = this.createProdCtx(this.getPendingProductionGraph().nodes.get(e).upstream);
1311
1311
  if (this.getBlock(e).renderingMode === "Light")
1312
1312
  throw new Error("Can't render production for light block.");
1313
- const n = t.getTemplate(this.tx), i = ls(this.tx, n, {
1313
+ const n = t.getTemplate(this.tx), i = us(this.tx, n, {
1314
1314
  args: t.fields.currentArgs.ref,
1315
1315
  blockId: this.tx.createValue(D.JsonString, JSON.stringify(e)),
1316
1316
  isProduction: this.tx.createValue(D.JsonBool, JSON.stringify(!0)),
@@ -1329,7 +1329,7 @@ class pt {
1329
1329
  initializeNewBlock(e, t) {
1330
1330
  const r = new Ot(e, {}, Ee(t.blockPack.config), t.blockPack.source);
1331
1331
  this.blockInfos.set(e, r);
1332
- const n = hs(this.tx, t.blockPack);
1332
+ const n = gs(this.tx, t.blockPack);
1333
1333
  this.setBlockField(e, "blockPack", D.wrapInHolder(this.tx, n), "NotReady"), this.setBlockFieldObj(
1334
1334
  e,
1335
1335
  "blockSettings",
@@ -1371,8 +1371,8 @@ class pt {
1371
1371
  this.resetOrLimboProduction(e), r.check();
1372
1372
  }
1373
1373
  /** Very generic method, better check for more specialized case-specific methods first. */
1374
- updateStructure(e, t = oa) {
1375
- const r = this.getStagingGraph(), n = this.getActualProductionGraph(), i = Fr(e), o = gs(r, i);
1374
+ updateStructure(e, t = ia) {
1375
+ const r = this.getStagingGraph(), n = this.getActualProductionGraph(), i = Fr(e), o = ms(r, i);
1376
1376
  for (const l of o.onlyInA) {
1377
1377
  const { fields: u } = this.getBlockInfo(l);
1378
1378
  this.deleteBlockFields(l, ...Object.keys(u)), this.blockInfos.delete(l), this.blocksInLimbo.delete(l) && (this.renderingStateChanged = !0);
@@ -1383,7 +1383,7 @@ class pt {
1383
1383
  const a = nt(
1384
1384
  e,
1385
1385
  (l) => this.getProductionGraphBlockInfo(l, !0)
1386
- ), c = gs(n, a);
1386
+ ), c = ms(n, a);
1387
1387
  n.traverse("downstream", [...c.different], (l) => {
1388
1388
  this.resetOrLimboProduction(l.id);
1389
1389
  }), (o.onlyInB.size > 0 || o.onlyInA.size > 0 || o.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();
@@ -1464,7 +1464,7 @@ class pt {
1464
1464
  this.setBlockField(
1465
1465
  e,
1466
1466
  "blockPack",
1467
- D.wrapInHolder(this.tx, hs(this.tx, t)),
1467
+ D.wrapInHolder(this.tx, gs(this.tx, t)),
1468
1468
  "NotReady"
1469
1469
  ), r !== void 0 ? this.setStates([{ blockId: e, args: r.args, uiState: r.uiState }]) : this.getStagingGraph().traverse("downstream", [e], ({ id: i }) => this.resetStaging(i)), n.productionRendered && this.getActualProductionGraph().traverse(
1470
1470
  "downstream",
@@ -1513,7 +1513,7 @@ class pt {
1513
1513
  * accordingly */
1514
1514
  stopProduction(...e) {
1515
1515
  var o, a;
1516
- const t = this.getActualProductionGraph(), r = new Pn(e), n = new Set(e), i = [];
1516
+ const t = this.getActualProductionGraph(), r = new En(e), n = new Set(e), i = [];
1517
1517
  for (; !r.isEmpty(); ) {
1518
1518
  const c = r.shift(), l = this.getBlockInfo(c).fields;
1519
1519
  if (!(((o = l.prodOutput) == null ? void 0 : o.status) === "Ready" && ((a = l.prodCtx) == null ? void 0 : a.status) === "Ready") && this.deleteBlockFields(c, "prodOutput", "prodCtx", "prodUiCtx", "prodArgs")) {
@@ -1589,20 +1589,20 @@ class pt {
1589
1589
  static async load(e, t, r, n) {
1590
1590
  const i = t.getResourceData(r, !0), o = t.getKValueJson(r, ut), a = t.getKValueJson(r, _e), c = t.getKValueJson(r, Ke), l = t.getKValueJson(r, fe), u = t.getKValueJson(r, dt), d = await i, p = /* @__PURE__ */ new Map();
1591
1591
  for (const g of d.fields) {
1592
- const m = Ii(g.name);
1592
+ const m = $i(g.name);
1593
1593
  if (m === void 0) continue;
1594
1594
  let S = p.get(m.blockId);
1595
1595
  S === void 0 && (S = {
1596
1596
  id: m.blockId,
1597
1597
  fields: {}
1598
- }, p.set(m.blockId, S)), S.fields[m.fieldName] = Me(g.value) ? { modCount: 0 } : { modCount: 0, ref: g.value };
1598
+ }, p.set(m.blockId, S)), S.fields[m.fieldName] = Je(g.value) ? { modCount: 0 } : { modCount: 0, ref: g.value };
1599
1599
  }
1600
1600
  const f = [];
1601
1601
  p.forEach((g) => {
1602
1602
  const m = g.fields;
1603
1603
  for (const [S, w] of Object.entries(m)) {
1604
1604
  if (w.ref === void 0) continue;
1605
- if (!Bo(w.ref) || jo(w.ref))
1605
+ if (!jo(w.ref) || xo(w.ref))
1606
1606
  throw new Error("unexpected behaviour");
1607
1607
  const C = S;
1608
1608
  f.push([
@@ -1639,15 +1639,15 @@ class pt {
1639
1639
  }
1640
1640
  }
1641
1641
  for (const [g, m] of x) {
1642
- const S = await m, w = Je(N(S.data));
1642
+ const S = await m, w = Me(N(S.data));
1643
1643
  g.blockConfig = Ee(w.config), g.blockPack = w.source;
1644
1644
  }
1645
- const U = await Hn(), P = Er(U.hash), $ = d.fields.find(
1645
+ const U = await Wn(), P = Er(U.hash), $ = d.fields.find(
1646
1646
  (g) => g.name === P
1647
1647
  );
1648
1648
  let R;
1649
1649
  $ !== void 0 ? R = ct($.value) : (R = D.wrapInHolder(t, ht(t, U.spec)), t.createField(
1650
- M(r, Er(U.hash)),
1650
+ J(r, Er(U.hash)),
1651
1651
  "Dynamic",
1652
1652
  R
1653
1653
  ));
@@ -1656,14 +1656,14 @@ class pt {
1656
1656
  g,
1657
1657
  new Ot(g, m, N(S), N(w))
1658
1658
  ));
1659
- const J = /* @__PURE__ */ new Set();
1659
+ const M = /* @__PURE__ */ new Set();
1660
1660
  for (const g of se(E)) {
1661
1661
  if (!X.has(g.id))
1662
1662
  throw new Error(`Inconsistent project structure: no inputs for ${g.id}`);
1663
- J.add(g.id);
1663
+ M.add(g.id);
1664
1664
  }
1665
1665
  X.forEach((g) => {
1666
- if (!J.has(g.id))
1666
+ if (!M.has(g.id))
1667
1667
  throw new Error(`Inconsistent project structure: no structure entry for ${g.id}`);
1668
1668
  g.check();
1669
1669
  });
@@ -1684,14 +1684,14 @@ class pt {
1684
1684
  return z.fixProblemsAndMigrate(), z;
1685
1685
  }
1686
1686
  }
1687
- async function ia(s, e = Pi) {
1688
- const t = s.createEphemeral(Ei);
1687
+ async function aa(s, e = Ei) {
1688
+ const t = s.createEphemeral(Oi);
1689
1689
  s.lock(t);
1690
1690
  const r = String(Date.now());
1691
- s.setKValue(t, ut, JSON.stringify(qe)), s.setKValue(t, Br, r), s.setKValue(t, _e, r), s.setKValue(t, Ke, JSON.stringify(e)), s.setKValue(t, fe, JSON.stringify(Ci)), s.setKValue(t, dt, JSON.stringify(Ri));
1692
- const n = await Hn();
1691
+ s.setKValue(t, ut, JSON.stringify(qe)), s.setKValue(t, Br, r), s.setKValue(t, _e, r), s.setKValue(t, Ke, JSON.stringify(e)), s.setKValue(t, fe, JSON.stringify(Ri)), s.setKValue(t, dt, JSON.stringify(Pi));
1692
+ const n = await Wn();
1693
1693
  return s.createField(
1694
- M(t, Er(n.hash)),
1694
+ J(t, Er(n.hash)),
1695
1695
  "Dynamic",
1696
1696
  D.wrapInHolder(s, ht(s, n.spec))
1697
1697
  ), t;
@@ -1699,18 +1699,18 @@ async function ia(s, e = Pi) {
1699
1699
  async function rt(s, e, t, r) {
1700
1700
  return ne(s, e, t, void 0, r);
1701
1701
  }
1702
- async function ne(s, e, t, r, n) {
1703
- if (e instanceof kn)
1704
- return await e.withWriteTx("ProjectAction", async (i) => {
1705
- const o = await pt.load(s, i, t, r), a = await n(o);
1706
- return o.wasModified && (o.save(), await i.commit(), Z().logProjectMutationStat && console.log(JSON.stringify(i.stat))), a;
1707
- });
1702
+ async function ne(s, e, t, r, n, i = {}) {
1703
+ if (e instanceof Cn)
1704
+ return await e.withWriteTx("ProjectAction", async (o) => {
1705
+ const a = await pt.load(s, o, t, r), c = await n(a);
1706
+ return a.wasModified && (a.save(), await o.commit(), Z().logProjectMutationStat && console.log(JSON.stringify(o.stat))), c;
1707
+ }, i);
1708
1708
  {
1709
- const i = await pt.load(s, e, t, r), o = await n(i);
1710
- return i.save(), o;
1709
+ const o = await pt.load(s, e, t, r), a = await n(o);
1710
+ return o.save(), a;
1711
1711
  }
1712
1712
  }
1713
- function* aa(s) {
1713
+ function* ca(s) {
1714
1714
  switch (s.type) {
1715
1715
  case "Json":
1716
1716
  return;
@@ -1733,7 +1733,7 @@ function Ft(s, e) {
1733
1733
  Object.entries(s).map(([t, r]) => [t, e(r, t)])
1734
1734
  );
1735
1735
  }
1736
- function ca(s, e) {
1736
+ function la(s, e) {
1737
1737
  switch (s.type) {
1738
1738
  case "Json":
1739
1739
  return { ...s };
@@ -1762,29 +1762,29 @@ function ca(s, e) {
1762
1762
  Q(s);
1763
1763
  }
1764
1764
  }
1765
- const la = we("PColumnData/JsonPartitioned", "1"), ua = we(
1765
+ const ua = we("PColumnData/JsonPartitioned", "1"), da = we(
1766
1766
  "PColumnData/Partitioned/JsonPartitioned",
1767
1767
  "1"
1768
- ), da = we("PColumnData/BinaryPartitioned", "1"), pa = we(
1768
+ ), pa = we("PColumnData/BinaryPartitioned", "1"), fa = we(
1769
1769
  "PColumnData/Partitioned/BinaryPartitioned",
1770
1770
  "1"
1771
- ), fa = we("PColumnData/ParquetPartitioned", "1"), ha = we(
1771
+ ), ha = we("PColumnData/ParquetPartitioned", "1"), ga = we(
1772
1772
  "PColumnData/Partitioned/ParquetPartitioned",
1773
1773
  "1"
1774
- ), ga = we("PColumnData/Json", "1");
1775
- function ma(s) {
1774
+ ), ma = we("PColumnData/Json", "1");
1775
+ function va(s) {
1776
1776
  if (!s.getIsReadyOrError()) throw new K("Data not ready.");
1777
1777
  const e = s.getDataAsJson();
1778
1778
  if (e === void 0)
1779
1779
  throw new K("unexpected data info structure, no resource data");
1780
- if (ue(s.resourceType, ga)) {
1780
+ if (ue(s.resourceType, ma)) {
1781
1781
  const t = e;
1782
1782
  return {
1783
1783
  type: "Json",
1784
1784
  keyLength: t.keyLength,
1785
1785
  data: t.data
1786
1786
  };
1787
- } else if (ue(s.resourceType, la)) {
1787
+ } else if (ue(s.resourceType, ua)) {
1788
1788
  const t = e, r = Object.fromEntries(
1789
1789
  s.listInputFields().map((n) => [n, s.traverse({ field: n, errorIfFieldNotSet: !0 }).resourceInfo])
1790
1790
  );
@@ -1793,7 +1793,7 @@ function ma(s) {
1793
1793
  partitionKeyLength: t.partitionKeyLength,
1794
1794
  parts: r
1795
1795
  };
1796
- } else if (ue(s.resourceType, ua)) {
1796
+ } else if (ue(s.resourceType, da)) {
1797
1797
  const t = e, r = {};
1798
1798
  for (const n of s.listInputFields()) {
1799
1799
  const i = s.traverse({ field: n, errorIfFieldNotSet: !0 }), o = i.listInputFields();
@@ -1811,7 +1811,7 @@ function ma(s) {
1811
1811
  partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
1812
1812
  parts: r
1813
1813
  };
1814
- } else if (ue(s.resourceType, da)) {
1814
+ } else if (ue(s.resourceType, pa)) {
1815
1815
  const t = e, r = {};
1816
1816
  for (const n of s.listInputFields())
1817
1817
  if (n.endsWith(".index")) {
@@ -1832,7 +1832,7 @@ function ma(s) {
1832
1832
  partitionKeyLength: t.partitionKeyLength,
1833
1833
  parts: r
1834
1834
  };
1835
- } else if (ue(s.resourceType, pa)) {
1835
+ } else if (ue(s.resourceType, fa)) {
1836
1836
  const t = e, r = {};
1837
1837
  for (const n of s.listInputFields()) {
1838
1838
  const i = s.traverse({ field: n, errorIfFieldNotSet: !0 }), o = i.listInputFields();
@@ -1865,7 +1865,7 @@ function ma(s) {
1865
1865
  partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
1866
1866
  parts: r
1867
1867
  };
1868
- } else if (ue(s.resourceType, fa)) {
1868
+ } else if (ue(s.resourceType, ha)) {
1869
1869
  const t = e, r = {};
1870
1870
  for (const n of s.listInputFields()) {
1871
1871
  const i = s.traverse({ field: n, assertFieldType: "Input", errorIfFieldNotSet: !0 });
@@ -1876,7 +1876,7 @@ function ma(s) {
1876
1876
  partitionKeyLength: t.partitionKeyLength,
1877
1877
  parts: r
1878
1878
  };
1879
- } else if (ue(s.resourceType, ha)) {
1879
+ } else if (ue(s.resourceType, ga)) {
1880
1880
  const t = e, r = {};
1881
1881
  for (const n of s.listInputFields()) {
1882
1882
  const o = s.traverse({ field: n, errorIfFieldNotSet: !0 }).listInputFields();
@@ -1895,7 +1895,7 @@ function ma(s) {
1895
1895
  parts: r
1896
1896
  };
1897
1897
  }
1898
- throw new K(`unsupported resource type: ${xo(s.resourceType)}`);
1898
+ throw new K(`unsupported resource type: ${Uo(s.resourceType)}`);
1899
1899
  }
1900
1900
  function Ir(s) {
1901
1901
  const e = s.traverse(
@@ -1909,7 +1909,7 @@ function Ir(s) {
1909
1909
  ...r
1910
1910
  };
1911
1911
  }
1912
- function va(s, e) {
1912
+ function ya(s, e) {
1913
1913
  const t = s.axesSpec.length, r = {};
1914
1914
  for (const { key: n, val: i } of e) {
1915
1915
  if (n.length !== t)
@@ -1922,17 +1922,17 @@ function va(s, e) {
1922
1922
  data: r
1923
1923
  };
1924
1924
  }
1925
- function ya(s, e) {
1925
+ function wa(s, e) {
1926
1926
  const t = Ie("sha256");
1927
- return t.update(re(s)), t.update(String(Me(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
1927
+ return t.update(re(s)), t.update(String(Je(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
1928
1928
  }
1929
- function ms(s, e) {
1929
+ function vs(s, e) {
1930
1930
  return re({ __isRef: !0, blockId: s, name: e });
1931
1931
  }
1932
- function wa(s, e) {
1932
+ function Sa(s, e) {
1933
1933
  return re({ resolvePath: s, name: e });
1934
1934
  }
1935
- function Wn(s, e = !0, t = !1, r = "") {
1935
+ function zn(s, e = !0, t = !1, r = "") {
1936
1936
  var a, c, l;
1937
1937
  const n = /^(?<name>.*)\.(?<type>spec|data)$/, i = /* @__PURE__ */ new Map();
1938
1938
  for (const u of s.listInputFields()) {
@@ -1970,10 +1970,10 @@ function Wn(s, e = !0, t = !1, r = "") {
1970
1970
  for (const [, u] of i) u.data === void 0 && (u.hasData = !1);
1971
1971
  return { locked: o, results: i };
1972
1972
  }
1973
- function Sa(s, e = !0, t = "", r) {
1973
+ function ba(s, e = !0, t = "", r) {
1974
1974
  if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
1975
- const n = Wn(s, e, !1, t);
1976
- Zo(n.locked);
1975
+ const n = zn(s, e, !1, t);
1976
+ ei(n.locked);
1977
1977
  const i = {};
1978
1978
  for (const [o, a] of n.results) {
1979
1979
  if (a.spec === void 0) throw new Error(`no spec for key ${o}`);
@@ -1983,7 +1983,7 @@ function Sa(s, e = !0, t = "", r) {
1983
1983
  if (c === void 0) throw new Error(`no data for key ${o}`);
1984
1984
  if (!c.ok) throw c.error;
1985
1985
  i[o] = {
1986
- id: r.length === 0 ? ya(a.spec, c.value) : wa(r, o),
1986
+ id: r.length === 0 ? wa(a.spec, c.value) : Sa(r, o),
1987
1987
  spec: a.spec,
1988
1988
  data: c.value
1989
1989
  };
@@ -2024,8 +2024,8 @@ class xr {
2024
2024
  if (r === void 0) return;
2025
2025
  const n = (a = (o = r.prod) == null ? void 0 : o.results) == null ? void 0 : a.get(t), i = (c = n == null ? void 0 : n.data) == null ? void 0 : c.call(n);
2026
2026
  if (n !== void 0 && n.spec !== void 0 && i !== void 0)
2027
- return vn(i, (l) => ({
2028
- id: ms(e, t),
2027
+ return yn(i, (l) => ({
2028
+ id: vs(e, t),
2029
2029
  spec: n.spec,
2030
2030
  data: l
2031
2031
  }));
@@ -2064,7 +2064,7 @@ class xr {
2064
2064
  l !== void 0 ? e.push({
2065
2065
  ref: tt(o, a),
2066
2066
  obj: {
2067
- id: l.ok ? ms(o, a) : void 0,
2067
+ id: l.ok ? vs(o, a) : void 0,
2068
2068
  spec: c.spec,
2069
2069
  data: l
2070
2070
  }
@@ -2118,7 +2118,7 @@ class xr {
2118
2118
  for (const r of this.blocks.values()) {
2119
2119
  const n = /* @__PURE__ */ new Set(), i = (o) => {
2120
2120
  for (const [a, c] of o.results)
2121
- n.has(a) || c.spec === void 0 || (n.add(a), ho(e, c.spec) && t.push({
2121
+ n.has(a) || c.spec === void 0 || (n.add(a), go(e, c.spec) && t.push({
2122
2122
  label: r.info.label + " / " + a,
2123
2123
  ref: tt(r.info.id, a),
2124
2124
  spec: c.spec
@@ -2132,7 +2132,7 @@ class xr {
2132
2132
  const n = e.accessor(t).node(), i = N(n.getKeyValueAsJson(fe)), a = Fr(i).traverseIds("upstream", r), c = /* @__PURE__ */ new Map();
2133
2133
  for (const l of se(i)) {
2134
2134
  if (!a.has(l.id)) continue;
2135
- const u = vs(
2135
+ const u = ys(
2136
2136
  n.traverse({
2137
2137
  field: _(l.id, "prodCtx"),
2138
2138
  ignoreError: !0,
@@ -2143,7 +2143,7 @@ class xr {
2143
2143
  field: _(l.id, "prodUiCtx"),
2144
2144
  stableIfNotFound: !0
2145
2145
  })
2146
- ), d = vs(
2146
+ ), d = ys(
2147
2147
  n.traverse({
2148
2148
  field: _(l.id, "stagingCtx"),
2149
2149
  ignoreError: !0,
@@ -2158,10 +2158,10 @@ class xr {
2158
2158
  return new xr(e, c);
2159
2159
  }
2160
2160
  }
2161
- function vs(s, e) {
2161
+ function ys(s, e) {
2162
2162
  if (e === void 0)
2163
2163
  return s ? { locked: !1, results: /* @__PURE__ */ new Map() } : void 0;
2164
- if (e.ok) return Wn(e.value, !1, !0);
2164
+ if (e.ok) return zn(e.value, !1, !0);
2165
2165
  }
2166
2166
  function Ur(s, e) {
2167
2167
  return {
@@ -2195,7 +2195,7 @@ function Ur(s, e) {
2195
2195
  }
2196
2196
  };
2197
2197
  }
2198
- function zn(s, e) {
2198
+ function Xn(s, e) {
2199
2199
  return {
2200
2200
  ...Ur(s, e),
2201
2201
  prod: (t) => {
@@ -2269,7 +2269,7 @@ function* te(s, e) {
2269
2269
  Q(s);
2270
2270
  }
2271
2271
  }
2272
- function ba(s, e) {
2272
+ function ka(s, e) {
2273
2273
  const t = {};
2274
2274
  for (const [r, n] of Object.entries(s)) t[r] = e(n);
2275
2275
  return t;
@@ -2277,7 +2277,7 @@ function ba(s, e) {
2277
2277
  function Ue(s, e) {
2278
2278
  return s === void 0 ? void 0 : e(s);
2279
2279
  }
2280
- function ka(s) {
2280
+ function Ca(s) {
2281
2281
  switch (s.type) {
2282
2282
  case "GetImportProgress":
2283
2283
  return !0;
@@ -2285,8 +2285,8 @@ function ka(s) {
2285
2285
  return !1;
2286
2286
  }
2287
2287
  }
2288
- function Ca(s) {
2289
- for (const e of te(s)) if (ka(e)) return !0;
2288
+ function Ra(s) {
2289
+ for (const e of te(s)) if (Ca(e)) return !0;
2290
2290
  return !1;
2291
2291
  }
2292
2292
  function gt(s) {
@@ -2298,47 +2298,47 @@ function gt(s) {
2298
2298
  function I(s) {
2299
2299
  return () => gt(s);
2300
2300
  }
2301
- const Ra = (s) => {
2301
+ const Pa = (s) => {
2302
2302
  const e = {};
2303
2303
  for (const [t, r] of Object.entries(s)) e[t] = r;
2304
2304
  return I(e);
2305
- }, Pa = (s) => {
2305
+ }, Ea = (s) => {
2306
2306
  const e = s.source;
2307
2307
  if (e === void 0) return I(void 0);
2308
2308
  const t = [];
2309
2309
  for (const r of e)
2310
2310
  r instanceof Array ? t.push(...r) : t.push(r);
2311
2311
  return I(t);
2312
- }, Ea = (s) => {
2312
+ }, Oa = (s) => {
2313
2313
  const e = s.source, t = s.field;
2314
2314
  return e === void 0 || t === void 0 ? I(void 0) : ({ cCtx: r }) => {
2315
2315
  var n;
2316
2316
  return gt((n = r.accessor(e).node().traverse(t)) == null ? void 0 : n.persist());
2317
2317
  };
2318
2318
  };
2319
- function Xn(s, e) {
2319
+ function Yn(s, e) {
2320
2320
  const t = {}, r = s.length;
2321
2321
  for (let n = 0; n < r; n++) t[String(n)] = e(s[n]);
2322
2322
  return t;
2323
2323
  }
2324
- function Oa(s, e) {
2324
+ function Fa(s, e) {
2325
2325
  return (t) => {
2326
2326
  const r = t.source;
2327
2327
  return r === void 0 ? I(void 0) : () => ({
2328
2328
  type: "ScheduleSubroutine",
2329
- subroutine: Yn(r.length),
2330
- args: Xn(r, (n) => L({ ...s, [e.itVar]: n }, e.mapping))
2329
+ subroutine: Qn(r.length),
2330
+ args: Yn(r, (n) => L({ ...s, [e.itVar]: n }, e.mapping))
2331
2331
  });
2332
2332
  };
2333
2333
  }
2334
- function Yn(s) {
2334
+ function Qn(s) {
2335
2335
  return (e) => {
2336
2336
  const t = [];
2337
2337
  for (let r = 0; r < s; r++) t.push(e[String(r)]);
2338
2338
  return I(t);
2339
2339
  };
2340
2340
  }
2341
- function Fa(s, e) {
2341
+ function Ta(s, e) {
2342
2342
  return (t) => {
2343
2343
  const r = t.source;
2344
2344
  if (r === void 0) return I(void 0);
@@ -2349,34 +2349,34 @@ function Fa(s, e) {
2349
2349
  }
2350
2350
  return () => ({
2351
2351
  type: "ScheduleSubroutine",
2352
- subroutine: Ta,
2352
+ subroutine: Ia,
2353
2353
  args: n
2354
2354
  });
2355
2355
  };
2356
2356
  }
2357
- const Ta = (s) => I(s), Ia = (s) => {
2357
+ const Ia = (s) => I(s), $a = (s) => {
2358
2358
  const e = s.arg;
2359
2359
  return I(e === void 0 ? void 0 : e.length === 0);
2360
- }, $a = (s) => {
2360
+ }, Aa = (s) => {
2361
2361
  const e = s.operand;
2362
2362
  return I(e === void 0 ? void 0 : !e);
2363
- }, Aa = (s) => {
2363
+ }, La = (s) => {
2364
2364
  const e = s.operand1, t = s.operand2;
2365
2365
  return I(e === void 0 || t === void 0 ? void 0 : e && t);
2366
- }, La = (s) => {
2366
+ }, Da = (s) => {
2367
2367
  const e = s.operand1, t = s.operand2;
2368
2368
  return I(e === void 0 || t === void 0 ? void 0 : e || t);
2369
- }, Da = (s) => {
2369
+ }, Na = (s) => {
2370
2370
  const e = s.source;
2371
2371
  return e === void 0 ? I(void 0) : ({ cCtx: t }) => {
2372
2372
  var r;
2373
2373
  return gt((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
2374
2374
  };
2375
- }, Na = (s) => {
2375
+ }, Ba = (s) => {
2376
2376
  const e = s.source, t = s.field;
2377
2377
  return I(e === void 0 || t === void 0 ? void 0 : e[t]);
2378
2378
  };
2379
- function Ba(s, e) {
2379
+ function ja(s, e) {
2380
2380
  return (t) => {
2381
2381
  const r = t.source;
2382
2382
  return r === void 0 ? I(void 0) : ({ cCtx: n }) => {
@@ -2391,13 +2391,13 @@ function Ba(s, e) {
2391
2391
  }
2392
2392
  return {
2393
2393
  type: "ScheduleSubroutine",
2394
- subroutine: ja,
2394
+ subroutine: xa,
2395
2395
  args: o
2396
2396
  };
2397
2397
  };
2398
2398
  };
2399
2399
  }
2400
- const ja = (s) => I(s), xa = (s) => (e) => {
2400
+ const xa = (s) => I(s), Ua = (s) => (e) => {
2401
2401
  const t = e.source;
2402
2402
  return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
2403
2403
  type: "ScheduleComputable",
@@ -2411,7 +2411,7 @@ const ja = (s) => I(s), xa = (s) => (e) => {
2411
2411
  }
2412
2412
  )
2413
2413
  });
2414
- }, Ua = (s) => (e) => {
2414
+ }, Va = (s) => (e) => {
2415
2415
  const t = e.source;
2416
2416
  return t === void 0 ? I(void 0) : ({ cCtx: r, drivers: n }) => {
2417
2417
  const i = r.accessor(t).node().resourceInfo;
@@ -2422,7 +2422,7 @@ const ja = (s) => I(s), xa = (s) => (e) => {
2422
2422
  })
2423
2423
  };
2424
2424
  };
2425
- }, Va = (s) => (e) => {
2425
+ }, Ma = (s) => (e) => {
2426
2426
  const t = e.source;
2427
2427
  return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
2428
2428
  type: "ScheduleComputable",
@@ -2444,43 +2444,43 @@ const ja = (s) => I(s), xa = (s) => (e) => {
2444
2444
  type: "ScheduleComputable",
2445
2445
  computable: t.drivers.blobDriver.getDownloadedBlob(e)
2446
2446
  });
2447
- }, Ma = (s) => {
2447
+ }, Ga = (s) => {
2448
2448
  const e = s.source;
2449
2449
  return e === void 0 ? I(void 0) : ({ drivers: t }) => ({
2450
2450
  type: "ScheduleComputable",
2451
2451
  computable: t.blobDriver.getOnDemandBlob(e)
2452
2452
  });
2453
- }, Ga = (s) => (e) => {
2453
+ }, qa = (s) => (e) => {
2454
2454
  const t = e.source;
2455
2455
  return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
2456
2456
  type: "ScheduleComputable",
2457
2457
  computable: r.blobToURLDriver.extractArchiveAndGetURL(t, s)
2458
2458
  });
2459
- }, qa = (s) => {
2459
+ }, _a = (s) => {
2460
2460
  const e = s.source;
2461
2461
  return e === void 0 ? I(void 0) : ({ drivers: t }) => ({
2462
2462
  type: "ScheduleComputable",
2463
2463
  computable: t.uploadDriver.getProgressId(e)
2464
2464
  });
2465
- }, _a = (s) => (e) => {
2465
+ }, Ka = (s) => (e) => {
2466
2466
  const t = e.source;
2467
2467
  return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
2468
2468
  type: "ScheduleComputable",
2469
2469
  computable: r.logDriver.getLastLogs(t, s)
2470
2470
  });
2471
- }, Ka = (s) => (e) => {
2471
+ }, Ha = (s) => (e) => {
2472
2472
  const t = e.source;
2473
2473
  return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
2474
2474
  type: "ScheduleComputable",
2475
2475
  computable: r.logDriver.getProgressLog(t, s)
2476
2476
  });
2477
- }, Ha = (s) => (e) => {
2477
+ }, Wa = (s) => (e) => {
2478
2478
  const t = e.source;
2479
2479
  return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
2480
2480
  type: "ScheduleComputable",
2481
2481
  computable: r.logDriver.getProgressLogWithInfo(t, s)
2482
2482
  });
2483
- }, Wa = (s) => {
2483
+ }, za = (s) => {
2484
2484
  const e = s.source;
2485
2485
  return e === void 0 ? I(void 0) : ({ drivers: t }) => ({
2486
2486
  type: "ScheduleComputable",
@@ -2496,14 +2496,14 @@ function L(s, e) {
2496
2496
  case "Isolate":
2497
2497
  return ({ drivers: t }) => ({
2498
2498
  type: "ScheduleComputable",
2499
- computable: eo(t, s, e.cfg)
2499
+ computable: to(t, s, e.cfg)
2500
2500
  });
2501
2501
  case "Immediate":
2502
2502
  return I(e.value);
2503
2503
  case "GetJsonField":
2504
2504
  return () => ({
2505
2505
  type: "ScheduleSubroutine",
2506
- subroutine: Na,
2506
+ subroutine: Ba,
2507
2507
  args: {
2508
2508
  source: L(s, e.source),
2509
2509
  field: L(s, e.field)
@@ -2512,7 +2512,7 @@ function L(s, e) {
2512
2512
  case "MapArrayValues":
2513
2513
  return () => ({
2514
2514
  type: "ScheduleSubroutine",
2515
- subroutine: Oa(s, e),
2515
+ subroutine: Fa(s, e),
2516
2516
  args: {
2517
2517
  source: L(s, e.source)
2518
2518
  }
@@ -2520,7 +2520,7 @@ function L(s, e) {
2520
2520
  case "MapRecordValues":
2521
2521
  return () => ({
2522
2522
  type: "ScheduleSubroutine",
2523
- subroutine: Fa(s, e),
2523
+ subroutine: Ta(s, e),
2524
2524
  args: {
2525
2525
  source: L(s, e.source)
2526
2526
  }
@@ -2528,19 +2528,19 @@ function L(s, e) {
2528
2528
  case "MakeObject":
2529
2529
  return () => ({
2530
2530
  type: "ScheduleSubroutine",
2531
- subroutine: Ra,
2532
- args: ba(e.template, (t) => L(s, t))
2531
+ subroutine: Pa,
2532
+ args: ka(e.template, (t) => L(s, t))
2533
2533
  });
2534
2534
  case "MakeArray":
2535
2535
  return () => ({
2536
2536
  type: "ScheduleSubroutine",
2537
- subroutine: Yn(e.template.length),
2538
- args: Xn(e.template, (t) => L(s, t))
2537
+ subroutine: Qn(e.template.length),
2538
+ args: Yn(e.template, (t) => L(s, t))
2539
2539
  });
2540
2540
  case "Flatten":
2541
2541
  return () => ({
2542
2542
  type: "ScheduleSubroutine",
2543
- subroutine: Pa,
2543
+ subroutine: Ea,
2544
2544
  args: {
2545
2545
  source: L(s, e.source)
2546
2546
  }
@@ -2548,7 +2548,7 @@ function L(s, e) {
2548
2548
  case "IsEmpty":
2549
2549
  return () => ({
2550
2550
  type: "ScheduleSubroutine",
2551
- subroutine: Ia,
2551
+ subroutine: $a,
2552
2552
  args: {
2553
2553
  arg: L(s, e.arg)
2554
2554
  }
@@ -2556,7 +2556,7 @@ function L(s, e) {
2556
2556
  case "Not":
2557
2557
  return () => ({
2558
2558
  type: "ScheduleSubroutine",
2559
- subroutine: $a,
2559
+ subroutine: Aa,
2560
2560
  args: {
2561
2561
  operand: L(s, e.operand)
2562
2562
  }
@@ -2564,7 +2564,7 @@ function L(s, e) {
2564
2564
  case "And":
2565
2565
  return () => ({
2566
2566
  type: "ScheduleSubroutine",
2567
- subroutine: Aa,
2567
+ subroutine: La,
2568
2568
  args: {
2569
2569
  operand1: L(s, e.operand1),
2570
2570
  operand2: L(s, e.operand2)
@@ -2573,7 +2573,7 @@ function L(s, e) {
2573
2573
  case "Or":
2574
2574
  return () => ({
2575
2575
  type: "ScheduleSubroutine",
2576
- subroutine: La,
2576
+ subroutine: Da,
2577
2577
  args: {
2578
2578
  operand1: L(s, e.operand1),
2579
2579
  operand2: L(s, e.operand2)
@@ -2582,7 +2582,7 @@ function L(s, e) {
2582
2582
  case "MapResourceFields":
2583
2583
  return () => ({
2584
2584
  type: "ScheduleSubroutine",
2585
- subroutine: Ba(s, e),
2585
+ subroutine: ja(s, e),
2586
2586
  args: {
2587
2587
  source: L(s, e.source)
2588
2588
  }
@@ -2590,7 +2590,7 @@ function L(s, e) {
2590
2590
  case "GetResourceField":
2591
2591
  return () => ({
2592
2592
  type: "ScheduleSubroutine",
2593
- subroutine: Ea,
2593
+ subroutine: Oa,
2594
2594
  args: {
2595
2595
  source: L(s, e.source),
2596
2596
  field: L(s, e.field)
@@ -2599,7 +2599,7 @@ function L(s, e) {
2599
2599
  case "GetResourceValueAsJson":
2600
2600
  return () => ({
2601
2601
  type: "ScheduleSubroutine",
2602
- subroutine: Da,
2602
+ subroutine: Na,
2603
2603
  args: {
2604
2604
  source: L(s, e.source)
2605
2605
  }
@@ -2607,7 +2607,7 @@ function L(s, e) {
2607
2607
  case "GetBlobContent":
2608
2608
  return () => ({
2609
2609
  type: "ScheduleSubroutine",
2610
- subroutine: xa(e.range),
2610
+ subroutine: Ua(e.range),
2611
2611
  args: {
2612
2612
  source: L(s, e.source)
2613
2613
  }
@@ -2615,7 +2615,7 @@ function L(s, e) {
2615
2615
  case "GetBlobContentAsString":
2616
2616
  return () => ({
2617
2617
  type: "ScheduleSubroutine",
2618
- subroutine: Ua(e.range),
2618
+ subroutine: Va(e.range),
2619
2619
  args: {
2620
2620
  source: L(s, e.source)
2621
2621
  }
@@ -2623,7 +2623,7 @@ function L(s, e) {
2623
2623
  case "GetBlobContentAsJson":
2624
2624
  return () => ({
2625
2625
  type: "ScheduleSubroutine",
2626
- subroutine: Va(e.range),
2626
+ subroutine: Ma(e.range),
2627
2627
  args: {
2628
2628
  source: L(s, e.source)
2629
2629
  }
@@ -2639,7 +2639,7 @@ function L(s, e) {
2639
2639
  case "GetOnDemandBlobContent":
2640
2640
  return () => ({
2641
2641
  type: "ScheduleSubroutine",
2642
- subroutine: Ma,
2642
+ subroutine: Ga,
2643
2643
  args: {
2644
2644
  source: L(s, e.source)
2645
2645
  }
@@ -2647,7 +2647,7 @@ function L(s, e) {
2647
2647
  case "ExtractArchiveAndGetURL":
2648
2648
  return () => ({
2649
2649
  type: "ScheduleSubroutine",
2650
- subroutine: Ga(e.format),
2650
+ subroutine: qa(e.format),
2651
2651
  args: {
2652
2652
  source: L(s, e.source)
2653
2653
  }
@@ -2655,7 +2655,7 @@ function L(s, e) {
2655
2655
  case "GetImportProgress":
2656
2656
  return () => ({
2657
2657
  type: "ScheduleSubroutine",
2658
- subroutine: qa,
2658
+ subroutine: _a,
2659
2659
  args: {
2660
2660
  source: L(s, e.source)
2661
2661
  }
@@ -2663,7 +2663,7 @@ function L(s, e) {
2663
2663
  case "GetLastLogs":
2664
2664
  return () => ({
2665
2665
  type: "ScheduleSubroutine",
2666
- subroutine: _a(e.lines),
2666
+ subroutine: Ka(e.lines),
2667
2667
  args: {
2668
2668
  source: L(s, e.source)
2669
2669
  }
@@ -2671,7 +2671,7 @@ function L(s, e) {
2671
2671
  case "GetProgressLog":
2672
2672
  return () => ({
2673
2673
  type: "ScheduleSubroutine",
2674
- subroutine: Ka(e.patternToSearch),
2674
+ subroutine: Ha(e.patternToSearch),
2675
2675
  args: {
2676
2676
  source: L(s, e.source)
2677
2677
  }
@@ -2679,7 +2679,7 @@ function L(s, e) {
2679
2679
  case "GetProgressLogWithInfo":
2680
2680
  return () => ({
2681
2681
  type: "ScheduleSubroutine",
2682
- subroutine: Ha(e.patternToSearch),
2682
+ subroutine: Wa(e.patternToSearch),
2683
2683
  args: {
2684
2684
  source: L(s, e.source)
2685
2685
  }
@@ -2687,7 +2687,7 @@ function L(s, e) {
2687
2687
  case "GetLogHandle":
2688
2688
  return () => ({
2689
2689
  type: "ScheduleSubroutine",
2690
- subroutine: Wa,
2690
+ subroutine: za,
2691
2691
  args: {
2692
2692
  source: L(s, e.source)
2693
2693
  }
@@ -2696,8 +2696,8 @@ function L(s, e) {
2696
2696
  return Q(e);
2697
2697
  }
2698
2698
  }
2699
- const za = ["$prod", "$staging"];
2700
- function Xa(s) {
2699
+ const Xa = ["$prod", "$staging"];
2700
+ function Ya(s) {
2701
2701
  return {
2702
2702
  $blockId: s.blockId,
2703
2703
  $args: (e) => JSON.parse(s.args(e)),
@@ -2709,16 +2709,16 @@ function Xa(s) {
2709
2709
  $staging: s.staging
2710
2710
  };
2711
2711
  }
2712
- const Qn = Symbol(), Zn = "return", Ya = { op: Qn, arg: Zn };
2713
- function Qa(s) {
2714
- return s.op == Qn && s.arg == Zn;
2712
+ const Zn = Symbol(), eo = "return", Qa = { op: Zn, arg: eo };
2713
+ function Za(s) {
2714
+ return s.op == Zn && s.arg == eo;
2715
2715
  }
2716
- function Za() {
2716
+ function ec() {
2717
2717
  return { pendingSubroutines: /* @__PURE__ */ new Map() };
2718
2718
  }
2719
- function ys(s, e, t, r) {
2720
- const n = new Pn(t), i = (a, c) => {
2721
- if (Qa(a))
2719
+ function ws(s, e, t, r) {
2720
+ const n = new En(t), i = (a, c) => {
2721
+ if (Za(a))
2722
2722
  return e.result = c, !1;
2723
2723
  const l = N(e.pendingSubroutines.get(a.op));
2724
2724
  if (a.arg in l.args) throw new Error("argument already set");
@@ -2771,26 +2771,26 @@ function ys(s, e, t, r) {
2771
2771
  }
2772
2772
  return o;
2773
2773
  }
2774
- function ec(s, e, t, r = {}) {
2775
- return eo(s, Xa(e), t, r);
2774
+ function tc(s, e, t, r = {}) {
2775
+ return to(s, Ya(e), t, r);
2776
2776
  }
2777
- function eo(s, e, t, r = {}) {
2777
+ function to(s, e, t, r = {}) {
2778
2778
  const n = `${e.blockId}#` + re({
2779
2779
  ctx: Object.fromEntries(
2780
- Object.entries(e).filter(([i]) => za.indexOf(i) === -1)
2780
+ Object.entries(e).filter(([i]) => Xa.indexOf(i) === -1)
2781
2781
  ),
2782
2782
  cfg: t
2783
2783
  });
2784
2784
  return H.makeRaw(
2785
2785
  (i) => {
2786
- const o = { drivers: s, cCtx: i }, a = Za();
2786
+ const o = { drivers: s, cCtx: i }, a = ec();
2787
2787
  return {
2788
- ir: ys(
2788
+ ir: ws(
2789
2789
  o,
2790
2790
  a,
2791
2791
  [
2792
2792
  {
2793
- destination: Ya,
2793
+ destination: Qa,
2794
2794
  operation: L(e, t)
2795
2795
  }
2796
2796
  ],
@@ -2812,7 +2812,7 @@ function eo(s, e, t, r = {}) {
2812
2812
  result: a.result,
2813
2813
  pendingSubroutines: p
2814
2814
  };
2815
- if (ys(d, f, u, !1), !("result" in f))
2815
+ if (ws(d, f, u, !1), !("result" in f))
2816
2816
  throw new Error("illegal cfg rendering stack state, no result");
2817
2817
  return f.result;
2818
2818
  }
@@ -2821,10 +2821,10 @@ function eo(s, e, t, r = {}) {
2821
2821
  { ...r, key: n }
2822
2822
  );
2823
2823
  }
2824
- function ws(s) {
2824
+ function Ss(s) {
2825
2825
  return s !== void 0 ? Buffer.from(s).toString("base64") : void 0;
2826
2826
  }
2827
- class tc {
2827
+ class rc {
2828
2828
  constructor(e, t, r, n, i) {
2829
2829
  b(this, "computablesToResolve", {});
2830
2830
  b(this, "computableCtx");
@@ -2891,13 +2891,13 @@ class tc {
2891
2891
  return this.getAccessor(e).listDynamicFields();
2892
2892
  }
2893
2893
  getKeyValueBase64(e, t) {
2894
- return ws(this.getAccessor(e).getKeyValue(t));
2894
+ return Ss(this.getAccessor(e).getKeyValue(t));
2895
2895
  }
2896
2896
  getKeyValueAsString(e, t) {
2897
2897
  return this.getAccessor(e).getKeyValueAsString(t);
2898
2898
  }
2899
2899
  getDataBase64(e) {
2900
- return ws(this.getAccessor(e).getData());
2900
+ return Ss(this.getAccessor(e).getData());
2901
2901
  }
2902
2902
  getDataAsString(e) {
2903
2903
  return this.getAccessor(e).getDataAsString();
@@ -2908,7 +2908,7 @@ class tc {
2908
2908
  parsePObjectCollection(e, t, r, ...n) {
2909
2909
  const i = this.getAccessor(e);
2910
2910
  if (!i.getIsReadyOrError()) return;
2911
- const o = Sa(i, t, r, n), a = {};
2911
+ const o = ba(i, t, r, n), a = {};
2912
2912
  for (const [c, l] of Object.entries(o))
2913
2913
  a[c] = ve(l, (u) => this.wrapAccessor(u));
2914
2914
  return a;
@@ -3056,7 +3056,7 @@ class tc {
3056
3056
  obj: {
3057
3057
  id: t.obj.id,
3058
3058
  spec: t.obj.spec,
3059
- data: vn(t.obj.data, (r) => this.wrapAccessor(r))
3059
+ data: yn(t.obj.data, (r) => this.wrapAccessor(r))
3060
3060
  }
3061
3061
  }))
3062
3062
  };
@@ -3107,7 +3107,7 @@ class tc {
3107
3107
  * - Passes through other values
3108
3108
  */
3109
3109
  transformInputPData(e) {
3110
- return typeof e == "string" ? this.getAccessor(e) : yn(e) ? br(e, (t) => this.getAccessor(t)) : e;
3110
+ return typeof e == "string" ? this.getAccessor(e) : wn(e) ? br(e, (t) => this.getAccessor(t)) : e;
3111
3111
  }
3112
3112
  //
3113
3113
  // Computable
@@ -3156,7 +3156,7 @@ class tc {
3156
3156
  };
3157
3157
  r.newFunction(o, c).consume((l) => r.setProp(e, o, l)), r.newFunction(o, a).consume((l) => r.setProp(e, o + "__internal__", l));
3158
3158
  };
3159
- if (go(this.featureFlags, "supportsLazyState"))
3159
+ if (mo(this.featureFlags, "supportsLazyState"))
3160
3160
  i("args", () => {
3161
3161
  if (this.computableCtx === void 0)
3162
3162
  throw new Error("Add dummy call to ctx.args outside the future lambda. Can't be directly used in this context.");
@@ -3261,7 +3261,7 @@ class tc {
3261
3261
  });
3262
3262
  }
3263
3263
  }
3264
- function rc(s) {
3264
+ function sc(s) {
3265
3265
  return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
3266
3266
  }
3267
3267
  class He {
@@ -3269,7 +3269,7 @@ class He {
3269
3269
  b(this, "callbackRegistry");
3270
3270
  b(this, "fnJSONStringify");
3271
3271
  b(this, "fnJSONParse");
3272
- b(this, "errorRepo", new sc());
3272
+ b(this, "errorRepo", new nc());
3273
3273
  b(this, "computableHelper");
3274
3274
  if (this.scope = e, this.vm = t, this.deadlineSetter = r, this.callbackRegistry = this.scope.manage(this.vm.newObject()), this.fnJSONStringify = e.manage(
3275
3275
  t.getProp(t.global, "JSON").consume((o) => t.getProp(o, "stringify"))
@@ -3278,7 +3278,7 @@ class He {
3278
3278
  if (this.fnJSONParse = e.manage(
3279
3279
  t.getProp(t.global, "JSON").consume((o) => t.getProp(o, "parse"))
3280
3280
  ), t.typeof(this.fnJSONParse) !== "function") throw new Error("JSON.parse() not found.");
3281
- i !== void 0 && (this.computableHelper = new tc(this, i.blockCtx, i.mlEnv, n, i.computableCtx)), this.injectCtx();
3281
+ i !== void 0 && (this.computableHelper = new rc(this, i.blockCtx, i.mlEnv, n, i.computableCtx)), this.injectCtx();
3282
3282
  }
3283
3283
  resetComputableCtx() {
3284
3284
  N(this.computableHelper, "Computable context helper is not initialized").resetComputableCtx();
@@ -3355,7 +3355,7 @@ class He {
3355
3355
  r = this.vm.null;
3356
3356
  break;
3357
3357
  }
3358
- if (rc(e)) {
3358
+ if (sc(e)) {
3359
3359
  r = this.vm.newArrayBuffer(e), n = !0;
3360
3360
  break;
3361
3361
  }
@@ -3397,12 +3397,12 @@ class He {
3397
3397
  this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
3398
3398
  t,
3399
3399
  "featureFlags",
3400
- this.exportObjectUniversal(mo.GlobalCfgRenderCtxFeatureFlags, e)
3400
+ this.exportObjectUniversal(vo.GlobalCfgRenderCtxFeatureFlags, e)
3401
3401
  ), this.computableHelper !== void 0 && this.computableHelper.injectCtx(t), this.vm.setProp(this.vm.global, "cfgRenderCtx", t);
3402
3402
  });
3403
3403
  }
3404
3404
  }
3405
- class sc {
3405
+ class nc {
3406
3406
  constructor() {
3407
3407
  b(this, "errorIdToError", /* @__PURE__ */ new Map());
3408
3408
  }
@@ -3419,7 +3419,7 @@ class sc {
3419
3419
  }
3420
3420
  /** Returns the original error that was stored by parsing uuid of mimicrated error. */
3421
3421
  getOriginal(e) {
3422
- if (!(e instanceof ei.QuickJSUnwrapError))
3422
+ if (!(e instanceof ti.QuickJSUnwrapError))
3423
3423
  return console.warn("ErrorRepo: quickJSError is not a QuickJSUnwrapError", Ye(e)), e;
3424
3424
  const t = e.cause;
3425
3425
  if (!(typeof t == "object" && t !== null && "name" in t && typeof t.name == "string"))
@@ -3430,13 +3430,13 @@ class sc {
3430
3430
  const i = this.errorIdToError.get(n);
3431
3431
  if (i === void 0)
3432
3432
  throw new Error(`ErrorRepo: errorId not found: ${n}, ${Ye(e)}`);
3433
- return new ri(e, i);
3433
+ return new si(e, i);
3434
3434
  }
3435
3435
  }
3436
- function Ss(s, e, t, r, n) {
3436
+ function bs(s, e, t, r, n) {
3437
3437
  Z().logOutputStatus && (Z().logOutputStatus === "any" || !t) && console.log(t ? `Stable output ${s} calculated ${e !== void 0 ? "defined" : "undefined"}; (#${r})` : `Unstable output ${s}; marker = ${n}; ${e !== void 0 ? "defined" : "undefined"} (#${r})`);
3438
3438
  }
3439
- function nc(s, e, t, r, n, i = {}) {
3439
+ function oc(s, e, t, r, n, i = {}) {
3440
3440
  const { code: o, featureFlags: a } = r, c = `${e.blockId}#lambda#${n}#${t.handle}`;
3441
3441
  return i = { ...i, key: c }, i.mode === void 0 && t.retentive === !0 && (i.mode = "StableOnlyRetentive"), H.makeRaw((l) => {
3442
3442
  Z().logOutputRecalculations && console.log(`Block lambda recalculation : ${c} (${l.changeSourceMarker}; ${l.bodyInvocations} invocations)`);
@@ -3465,7 +3465,7 @@ function nc(s, e, t, r, n, i = {}) {
3465
3465
  const E = h.computableHelper.computablesToResolve;
3466
3466
  if (Object.keys(E).length === 0) {
3467
3467
  const F = h.importObjectUniversal(y);
3468
- return Ss(t.handle, F, l.unstableMarker === void 0, -1, l.unstableMarker), { ir: F };
3468
+ return bs(t.handle, F, l.unstableMarker === void 0, -1, l.unstableMarker), { ir: F };
3469
3469
  }
3470
3470
  let B = 0;
3471
3471
  return Z().logOutputStatus && console.log(`Output ${t.handle} scaffold calculated (not all computables resolved yet).`), d = !0, {
@@ -3473,7 +3473,7 @@ function nc(s, e, t, r, n, i = {}) {
3473
3473
  postprocessValue: (F, { unstableMarker: x, stable: U }) => {
3474
3474
  for (const [$, R] of Object.entries(F)) h.runCallback($, R);
3475
3475
  const P = h.importObjectUniversal(y);
3476
- return B++, Ss(t.handle, P, U, B, x), P;
3476
+ return B++, bs(t.handle, P, U, B, x), P;
3477
3477
  }
3478
3478
  };
3479
3479
  } catch (p) {
@@ -3483,7 +3483,7 @@ function nc(s, e, t, r, n, i = {}) {
3483
3483
  }
3484
3484
  }, i);
3485
3485
  }
3486
- function oc(s, e, t, ...r) {
3486
+ function ic(s, e, t, ...r) {
3487
3487
  const { code: n, featureFlags: i } = t, o = new Ge();
3488
3488
  try {
3489
3489
  const a = o.manage(s.newRuntime());
@@ -3503,14 +3503,14 @@ function oc(s, e, t, ...r) {
3503
3503
  o.dispose();
3504
3504
  }
3505
3505
  }
3506
- function ic(s) {
3507
- return wn(s) ? s.isActive === !0 : Ca(s);
3506
+ function ac(s) {
3507
+ return Sn(s) ? s.isActive === !0 : Ra(s);
3508
3508
  }
3509
3509
  function Ve(s, e, t, r, n, i = {}) {
3510
- if (wn(t)) {
3510
+ if (Sn(t)) {
3511
3511
  if (r === void 0) throw new Error("No code bundle.");
3512
- return nc(s, e, t, r, n, i);
3513
- } else return ec(s.driverKit, e, t, i);
3512
+ return oc(s, e, t, r, n, i);
3513
+ } else return tc(s.driverKit, e, t, i);
3514
3514
  }
3515
3515
  function We(s, e) {
3516
3516
  return Ue(
@@ -3528,13 +3528,13 @@ function We(s, e) {
3528
3528
  }
3529
3529
  );
3530
3530
  }
3531
- function ac(s, e) {
3531
+ function cc(s, e) {
3532
3532
  if (s === e) return !0;
3533
3533
  if (s === void 0 || e === void 0) return !1;
3534
- const t = os.omitBy((r, n) => n.startsWith("__"));
3535
- return os.isDeepEqual(t(s), t(e));
3534
+ const t = is.omitBy((r, n) => n.startsWith("__"));
3535
+ return is.isDeepEqual(t(s), t(e));
3536
3536
  }
3537
- function cc(s, e, t) {
3537
+ function lc(s, e, t) {
3538
3538
  return H.make(
3539
3539
  (r) => {
3540
3540
  var v, h, y, E, B, F, x, U;
@@ -3554,7 +3554,7 @@ function cc(s, e, t) {
3554
3554
  stableIfNotFound: !0
3555
3555
  });
3556
3556
  if (le !== void 0) {
3557
- const X = le.getDataAsJson(), J = n.getField({
3557
+ const X = le.getDataAsJson(), M = n.getField({
3558
3558
  field: _(P, "prodOutput"),
3559
3559
  assertFieldType: "Dynamic",
3560
3560
  errorIfFieldNotFound: !0
@@ -3565,11 +3565,11 @@ function cc(s, e, t) {
3565
3565
  });
3566
3566
  G = {
3567
3567
  arguments: X,
3568
- stale: !ac(R, X),
3569
- outputError: J.error !== void 0 || z.error !== void 0 || ((v = J.value) == null ? void 0 : v.getError()) !== void 0 || ((h = z.value) == null ? void 0 : h.getError()) !== void 0,
3570
- outputsError: ((y = J.error) == null ? void 0 : y.getDataAsString()) ?? ((B = (E = J.value) == null ? void 0 : E.getError()) == null ? void 0 : B.getDataAsString()),
3568
+ stale: !cc(R, X),
3569
+ outputError: M.error !== void 0 || z.error !== void 0 || ((v = M.value) == null ? void 0 : v.getError()) !== void 0 || ((h = z.value) == null ? void 0 : h.getError()) !== void 0,
3570
+ outputsError: ((y = M.error) == null ? void 0 : y.getDataAsString()) ?? ((B = (E = M.value) == null ? void 0 : E.getError()) == null ? void 0 : B.getDataAsString()),
3571
3571
  exportsError: ((F = z.error) == null ? void 0 : F.getDataAsString()) ?? ((U = (x = z.value) == null ? void 0 : x.getError()) == null ? void 0 : U.getDataAsString()),
3572
- finished: (J.value !== void 0 && J.value.getIsReadyOrError() || J.error !== void 0 && J.error.getIsReadyOrError()) && (z.value !== void 0 && z.value.getIsReadyOrError() || z.error !== void 0 && z.error.getIsReadyOrError())
3572
+ finished: (M.value !== void 0 && M.value.getIsReadyOrError() || M.error !== void 0 && M.error.getIsReadyOrError()) && (z.value !== void 0 && z.value.getIsReadyOrError() || z.error !== void 0 && z.error.getIsReadyOrError())
3573
3573
  };
3574
3574
  }
3575
3575
  u.set(P, { currentArguments: R, prod: G, argsRid: $.resourceInfo.id });
@@ -3585,7 +3585,7 @@ function cc(s, e, t) {
3585
3585
  const G = N(u.get(P)), le = N(d.nodes.get(P));
3586
3586
  let X = "NotCalculated";
3587
3587
  G.prod !== void 0 && (p.has(P) ? X = "Limbo" : X = G.prod.finished ? "Done" : "Running");
3588
- const J = We(n, P), { sections: z, title: g, inputsValid: m, sdkVersion: S, featureFlags: w, isIncompatibleWithRuntime: C } = Ue(J, ({ bpId: ie, cfg: be }) => {
3588
+ const M = We(n, P), { sections: z, title: g, inputsValid: m, sdkVersion: S, featureFlags: w, isIncompatibleWithRuntime: C } = Ue(M, ({ bpId: ie, cfg: be }) => {
3589
3589
  if (!t.runtimeCapabilities.checkCompatibility(be.featureFlags))
3590
3590
  return {
3591
3591
  isIncompatibleWithRuntime: !0,
@@ -3611,7 +3611,7 @@ function cc(s, e, t) {
3611
3611
  pe,
3612
3612
  ie
3613
3613
  ).wrap({
3614
- recover: (uo) => (t.logger.error("Error in block model title"), t.logger.error(uo), "Invalid title")
3614
+ recover: (po) => (t.logger.error("Error in block model title"), t.logger.error(po), "Invalid title")
3615
3615
  })
3616
3616
  ),
3617
3617
  inputsValid: Ve(
@@ -3632,7 +3632,7 @@ function cc(s, e, t) {
3632
3632
  assertFieldType: "Dynamic",
3633
3633
  errorIfFieldNotSet: !0
3634
3634
  }).getDataAsJson(), O = Ue(
3635
- J,
3635
+ M,
3636
3636
  ({ info: ie }) => t.blockUpdateWatcher.get({ currentSpec: ie.source, settings: k })
3637
3637
  );
3638
3638
  return {
@@ -3653,7 +3653,7 @@ function cc(s, e, t) {
3653
3653
  sections: z,
3654
3654
  inputsValid: m,
3655
3655
  updateInfo: {},
3656
- currentBlockPack: (V = J == null ? void 0 : J.info) == null ? void 0 : V.source,
3656
+ currentBlockPack: (V = M == null ? void 0 : M.info) == null ? void 0 : V.source,
3657
3657
  updates: O,
3658
3658
  sdkVersion: S,
3659
3659
  featureFlags: w,
@@ -3691,13 +3691,13 @@ function cc(s, e, t) {
3691
3691
  }
3692
3692
  ).withStableType();
3693
3693
  }
3694
- function lc(s, e) {
3694
+ function uc(s, e) {
3695
3695
  const t = s.node();
3696
- if (ue(t.resourceType, Mn)) {
3696
+ if (ue(t.resourceType, Gn)) {
3697
3697
  const r = t.getDataAsJson();
3698
3698
  if (r === void 0) throw new Error("No resource data.");
3699
3699
  return e.frontendDownloadDriver.getUrl(new URL(r.url)).withStableType();
3700
- } else if (ue(t.resourceType, Gn)) {
3700
+ } else if (ue(t.resourceType, qn)) {
3701
3701
  const r = t.getDataAsJson();
3702
3702
  if (r === void 0) throw new Error("No resource data.");
3703
3703
  return e.signer.verify(
@@ -3708,10 +3708,10 @@ function lc(s, e) {
3708
3708
  } else
3709
3709
  throw new Error(`Unsupported resource type: ${JSON.stringify(t.resourceType)}`);
3710
3710
  }
3711
- function uc(s, e) {
3711
+ function dc(s, e) {
3712
3712
  if (s !== void 0)
3713
3713
  return H.make(
3714
- (t) => lc(t.accessor(s), e),
3714
+ (t) => uc(t.accessor(s), e),
3715
3715
  {
3716
3716
  postprocessValue: (t) => {
3717
3717
  if (t !== void 0) {
@@ -3723,7 +3723,7 @@ function uc(s, e) {
3723
3723
  }
3724
3724
  ).withStableType();
3725
3725
  }
3726
- function dc(s, e, t) {
3726
+ function pc(s, e, t) {
3727
3727
  return H.make(
3728
3728
  (r) => {
3729
3729
  var a;
@@ -3733,19 +3733,19 @@ function dc(s, e, t) {
3733
3733
  assertFieldType: "Dynamic"
3734
3734
  },
3735
3735
  { field: D.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
3736
- { field: _n, assertFieldType: "Input" }
3736
+ { field: Kn, assertFieldType: "Input" }
3737
3737
  )) == null ? void 0 : a.persist();
3738
3738
  return {
3739
- url: uc(o, t),
3739
+ url: dc(o, t),
3740
3740
  sdkVersion: i == null ? void 0 : i.cfg.sdkVersion
3741
3741
  };
3742
3742
  },
3743
3743
  { mode: "StableOnlyLive" }
3744
3744
  );
3745
3745
  }
3746
- function to(s, e, t) {
3746
+ function ro(s, e, t) {
3747
3747
  if (t === void 0)
3748
- return H.make((o) => to(s, e, o), {
3748
+ return H.make((o) => ro(s, e, o), {
3749
3749
  key: `inputs#${Fe(s.rid)}#${e}`
3750
3750
  });
3751
3751
  const r = t.accessor(s).node(), n = Ur(s, e), i = n.uiState(t);
@@ -3757,12 +3757,12 @@ function to(s, e, t) {
3757
3757
  ui: i !== void 0 ? ts(JSON.parse(i)) : void 0
3758
3758
  };
3759
3759
  }
3760
- function pc(s, e, t) {
3760
+ function fc(s, e, t) {
3761
3761
  const r = "outputs#" + Fe(s.rid) + "#" + e;
3762
3762
  return H.make(
3763
3763
  (n) => {
3764
3764
  Z().logOutputRecalculations && console.log(`blockOutput recalculation : ${r} (${n.changeSourceMarker}; ${n.bodyInvocations} invocations)`);
3765
- const i = n.accessor(s).node(), o = zn(s, e);
3765
+ const i = n.accessor(s).node(), o = Xn(s, e);
3766
3766
  return Ue(We(i, e), ({ cfg: a, bpId: c }) => {
3767
3767
  const l = {};
3768
3768
  for (const [u, d] of Object.entries(a.outputs)) {
@@ -3775,15 +3775,15 @@ function pc(s, e, t) {
3775
3775
  { key: r }
3776
3776
  ).withStableType();
3777
3777
  }
3778
- function fc(s, e) {
3778
+ function hc(s, e) {
3779
3779
  return H.make((t) => {
3780
3780
  const r = t.accessor(s).node(), n = N(r.getKeyValueAsJson(fe)), i = [];
3781
3781
  for (const { id: o } of se(n)) {
3782
3782
  const a = We(r, o);
3783
3783
  if (a === void 0) continue;
3784
- const c = Object.entries(a.cfg.outputs).map(([, u]) => u).filter((u) => ic(u)).map((u) => u);
3784
+ const c = Object.entries(a.cfg.outputs).map(([, u]) => u).filter((u) => ac(u)).map((u) => u);
3785
3785
  if (c.length === 0) continue;
3786
- const l = zn(r.persist(), o);
3786
+ const l = Xn(r.persist(), o);
3787
3787
  for (const u of c)
3788
3788
  i.push(
3789
3789
  H.wrapError(Ve(e, l, u, ft(a.cfg), a.bpId))
@@ -3792,21 +3792,21 @@ function fc(s, e) {
3792
3792
  return i;
3793
3793
  });
3794
3794
  }
3795
- class hc {
3795
+ class gc {
3796
3796
  constructor() {
3797
3797
  b(this, "states", /* @__PURE__ */ new Map());
3798
3798
  }
3799
3799
  setState(e, t) {
3800
3800
  const r = this.states.get(e);
3801
3801
  if (r === void 0) {
3802
- this.states.set(e, { state: t, change: new ns() });
3802
+ this.states.set(e, { state: t, change: new os() });
3803
3803
  return;
3804
3804
  }
3805
3805
  r.state = { ...t }, r.change.markChanged("navigation state changed");
3806
3806
  }
3807
3807
  readState(e, t) {
3808
3808
  let r = this.states.get(t);
3809
- return r === void 0 && (r = { state: { ...vo }, change: new ns() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
3809
+ return r === void 0 && (r = { state: { ...yo }, change: new os() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
3810
3810
  }
3811
3811
  getState(e) {
3812
3812
  return H.make(
@@ -3819,7 +3819,7 @@ class hc {
3819
3819
  t !== void 0 && (this.states.delete(e), t.change.markChanged("block deleted"));
3820
3820
  }
3821
3821
  }
3822
- function gc(s) {
3822
+ function mc(s) {
3823
3823
  return H.make((e) => {
3824
3824
  const t = e.accessor(s).node(), r = N(t.getKeyValueAsJson(fe));
3825
3825
  return {
@@ -3827,30 +3827,30 @@ function gc(s) {
3827
3827
  };
3828
3828
  });
3829
3829
  }
3830
- const mc = "1", vc = "BlockFrontendState/";
3831
- async function yc(s, e) {
3830
+ const vc = "1", yc = "BlockFrontendState/";
3831
+ async function wc(s, e) {
3832
3832
  await s.withWriteTx("ProjectMigration", async (t) => {
3833
3833
  const r = await t.getKValueJson(e, ut);
3834
3834
  if (r !== qe) {
3835
- if (r === mc)
3836
- await wc(t, e);
3835
+ if (r === vc)
3836
+ await Sc(t, e);
3837
3837
  else
3838
3838
  throw new Error(`Unknown project schema version: ${r}`);
3839
3839
  t.setKValue(e, ut, JSON.stringify(qe)), await t.commit();
3840
3840
  }
3841
3841
  });
3842
3842
  }
3843
- async function wc(s, e) {
3843
+ async function Sc(s, e) {
3844
3844
  const [t, r] = await Promise.all([
3845
3845
  s.getKValueJson(e, fe),
3846
3846
  s.listKeyValues(e)
3847
3847
  ]), n = new Map(r.map((i) => [i.key, i.value]));
3848
3848
  for (const i of se(t)) {
3849
- const o = vc + i.id, a = n.get(o), c = a ? Je(a) : {}, l = s.createJsonGzValue(c), u = M(e, _(i.id, "uiState"));
3849
+ const o = yc + i.id, a = n.get(o), c = a ? Me(a) : {}, l = s.createJsonGzValue(c), u = J(e, _(i.id, "uiState"));
3850
3850
  s.createField(u, "Dynamic", l), s.deleteKValue(e, o);
3851
3851
  }
3852
3852
  }
3853
- function bs(s) {
3853
+ function ks(s) {
3854
3854
  return JSON.stringify(s, (e, t) => typeof t == "bigint" ? Fe(t) : ArrayBuffer.isView(t) || t instanceof Int8Array || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array || t instanceof BigInt64Array || t instanceof BigUint64Array ? Buffer.from(t.buffer, t.byteOffset, t.byteLength).toString("base64") : Buffer.isBuffer(t) ? t.toString("base64") : t);
3855
3855
  }
3856
3856
  class Vr {
@@ -3860,7 +3860,7 @@ class Vr {
3860
3860
  /** Data for the left panel, contain basic information about block status. */
3861
3861
  b(this, "overview");
3862
3862
  b(this, "overviewLight");
3863
- b(this, "navigationStates", new hc());
3863
+ b(this, "navigationStates", new gc());
3864
3864
  // null is set for deleted blocks
3865
3865
  b(this, "blockComputables", /* @__PURE__ */ new Map());
3866
3866
  b(this, "blockFrontends", /* @__PURE__ */ new Map());
@@ -3868,18 +3868,18 @@ class Vr {
3868
3868
  b(this, "refreshLoopResult");
3869
3869
  b(this, "abortController", new AbortController());
3870
3870
  b(this, "destroyed", !1);
3871
- this.env = e, this.projectTree = r, this.overview = cc(
3871
+ this.env = e, this.projectTree = r, this.overview = lc(
3872
3872
  r.entry(),
3873
3873
  this.navigationStates,
3874
3874
  e
3875
- ).withPreCalculatedValueTree(), this.overviewLight = gc(r.entry()).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = fc(r.entry(), e);
3875
+ ).withPreCalculatedValueTree(), this.overviewLight = mc(r.entry()).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = hc(r.entry(), e);
3876
3876
  }
3877
3877
  async refreshLoop() {
3878
3878
  for (; !this.destroyed; )
3879
3879
  try {
3880
3880
  await rt(this.env.projectHelper, this.env.pl, this.rid, (r) => {
3881
3881
  r.doRefresh(this.env.ops.stagingRenderingRate);
3882
- }), await this.activeConfigs.getValue(), await En(this.env.ops.projectRefreshInterval, this.abortController.signal);
3882
+ }), await this.activeConfigs.getValue(), await On(this.env.ops.projectRefreshInterval, this.abortController.signal);
3883
3883
  const e = await this.overviewLight.getValue(), t = new Set(e.listOfBlocks);
3884
3884
  for (const r of this.blockComputables.keys())
3885
3885
  if (!t.has(r)) {
@@ -3887,12 +3887,12 @@ class Vr {
3887
3887
  n != null && n.fullState.resetState(), this.blockComputables.set(r, null);
3888
3888
  }
3889
3889
  } catch (e) {
3890
- if (Uo(e)) {
3890
+ if (Vo(e)) {
3891
3891
  console.warn(
3892
3892
  "project refresh routine terminated, because project was externally deleted"
3893
3893
  );
3894
3894
  break;
3895
- } else if (!Vo(e))
3895
+ } else if (!Mo(e))
3896
3896
  throw new Error("Unexpected exception", { cause: e });
3897
3897
  }
3898
3898
  }
@@ -3926,7 +3926,11 @@ class Vr {
3926
3926
  blockPack: o
3927
3927
  },
3928
3928
  r
3929
- )
3929
+ ),
3930
+ { retryOptions: {
3931
+ ...ns,
3932
+ backoffMultiplier: ns.backoffMultiplier * 1.1
3933
+ } }
3930
3934
  ), await this.projectTree.refreshState(), i;
3931
3935
  }
3932
3936
  /**
@@ -4084,10 +4088,10 @@ class Vr {
4084
4088
  async resetBlockArgsAndUiState(e, t) {
4085
4089
  await this.env.pl.withWriteTx("BlockInputsReset", async (r) => {
4086
4090
  const n = ct(
4087
- (await r.getField(M(this.rid, _(e, "blockPack")))).value
4091
+ (await r.getField(J(this.rid, _(e, "blockPack")))).value
4088
4092
  ), i = ct(
4089
- (await r.getField(M(n, D.HolderRefField))).value
4090
- ), o = await r.getResourceData(i, !1), a = Ee(Je(N(o.data)).config);
4093
+ (await r.getField(J(n, D.HolderRefField))).value
4094
+ ), o = await r.getResourceData(i, !1), a = Ee(Me(N(o.data)).config);
4091
4095
  await ne(this.env.projectHelper, r, this.rid, t, (c) => {
4092
4096
  c.setStates([{ blockId: e, args: a.initialArgs, uiState: a.initialUiState }]);
4093
4097
  }), await r.commit();
@@ -4097,10 +4101,10 @@ class Vr {
4097
4101
  const t = this.blockComputables.get(e);
4098
4102
  if (t === null) throw new Error(`Block ${e} is deleted`);
4099
4103
  if (t === void 0) {
4100
- const r = pc(this.projectTree.entry(), e, this.env), i = {
4104
+ const r = fc(this.projectTree.entry(), e, this.env), i = {
4101
4105
  fullState: H.make(
4102
4106
  (o) => ({
4103
- argsAndUiState: to(this.projectTree.entry(), e, o),
4107
+ argsAndUiState: ro(this.projectTree.entry(), e, o),
4104
4108
  outputs: r,
4105
4109
  navigationState: this.navigationStates.getState(e),
4106
4110
  overview: this.overview
@@ -4108,7 +4112,7 @@ class Vr {
4108
4112
  {
4109
4113
  postprocessValue: (o) => {
4110
4114
  var u, d, p;
4111
- const a = (p = (d = (u = o.overview) == null ? void 0 : u.blocks) == null ? void 0 : d.find((f) => f.id == e)) == null ? void 0 : p.sdkVersion, l = a && bc(a) && o.outputs !== void 0 ? Cc(o.outputs) : o.outputs;
4115
+ const a = (p = (d = (u = o.overview) == null ? void 0 : u.blocks) == null ? void 0 : d.find((f) => f.id == e)) == null ? void 0 : p.sdkVersion, l = a && kc(a) && o.outputs !== void 0 ? Rc(o.outputs) : o.outputs;
4112
4116
  return {
4113
4117
  ...o.argsAndUiState,
4114
4118
  outputs: l,
@@ -4136,7 +4140,7 @@ class Vr {
4136
4140
  getBlockFrontend(e) {
4137
4141
  const t = this.blockFrontends.get(e);
4138
4142
  if (t === void 0) {
4139
- const r = dc(
4143
+ const r = pc(
4140
4144
  this.projectTree.entry(),
4141
4145
  e,
4142
4146
  this.env
@@ -4156,14 +4160,14 @@ class Vr {
4156
4160
  await this.destroy();
4157
4161
  }
4158
4162
  static async init(e, t) {
4159
- await yc(e.pl, t), await rt(e.projectHelper, e.pl, t, (n) => {
4163
+ await wc(e.pl, t), await rt(e.projectHelper, e.pl, t, (n) => {
4160
4164
  });
4161
- const r = await Rn.init(
4165
+ const r = await Pn.init(
4162
4166
  e.pl,
4163
4167
  t,
4164
4168
  {
4165
4169
  ...e.ops.defaultTreeOptions,
4166
- pruning: Sc
4170
+ pruning: bc
4167
4171
  },
4168
4172
  e.logger
4169
4173
  );
@@ -4173,13 +4177,13 @@ class Vr {
4173
4177
  var c, l;
4174
4178
  return (((c = a.data) == null ? void 0 : c.byteLength) ?? 0) - (((l = o.data) == null ? void 0 : l.byteLength) ?? 0);
4175
4179
  });
4176
- const i = Ko(n);
4177
- await at.writeFile(`${Fe(t)}.json`, bs(n)), await at.writeFile(`${Fe(t)}.stats.json`, bs(i));
4180
+ const i = Ho(n);
4181
+ await at.writeFile(`${Fe(t)}.json`, ks(n)), await at.writeFile(`${Fe(t)}.stats.json`, ks(i));
4178
4182
  }
4179
4183
  return new Vr(e, t, r);
4180
4184
  }
4181
4185
  }
4182
- function Sc(s) {
4186
+ function bc(s) {
4183
4187
  if (s.type.name.startsWith("StreamWorkdir/"))
4184
4188
  return [];
4185
4189
  switch (s.type.name) {
@@ -4193,14 +4197,14 @@ function Sc(s) {
4193
4197
  return s.fields;
4194
4198
  }
4195
4199
  }
4196
- function bc(s) {
4197
- return !kc(s, "1.26.0");
4200
+ function kc(s) {
4201
+ return !Cc(s, "1.26.0");
4198
4202
  }
4199
- function kc(s, e) {
4203
+ function Cc(s, e) {
4200
4204
  const t = s.split(".").map(Number), r = e.split(".").map(Number);
4201
4205
  return t[0] > r[0] || t[0] === r[0] && t[1] > r[1] || t[0] === r[0] && t[1] === r[1] && t[2] > r[2];
4202
4206
  }
4203
- function Cc(s) {
4207
+ function Rc(s) {
4204
4208
  const e = {};
4205
4209
  for (const [t, r] of Object.entries(s)) {
4206
4210
  if (r.ok) {
@@ -4215,8 +4219,8 @@ function Cc(s) {
4215
4219
  }
4216
4220
  return e;
4217
4221
  }
4218
- const ro = {
4219
- logger: new Sn(),
4222
+ const so = {
4223
+ logger: new bn(),
4220
4224
  blobDriverOps: {
4221
4225
  cacheSoftSizeBytes: 8 * 1024 * 1024 * 1024,
4222
4226
  // 8 GB
@@ -4255,7 +4259,7 @@ const ro = {
4255
4259
  // 8 GB
4256
4260
  }
4257
4261
  };
4258
- function so(s) {
4262
+ function no(s) {
4259
4263
  return {
4260
4264
  blobDownloadPath: q.join(s, "download"),
4261
4265
  blobDownloadRangesCachePath: q.join(s, "downloadRangesCache"),
@@ -4263,8 +4267,8 @@ function so(s) {
4263
4267
  pframesSpillPath: q.join(s, "pframes")
4264
4268
  };
4265
4269
  }
4266
- const Rc = {
4267
- ...ro,
4270
+ const Pc = {
4271
+ ...so,
4268
4272
  defaultTreeOptions: {
4269
4273
  pollingInterval: 350,
4270
4274
  stopPollingDelay: 2500,
@@ -4278,19 +4282,19 @@ const Rc = {
4278
4282
  projectRefreshInterval: 700,
4279
4283
  stagingRenderingRate: 5
4280
4284
  };
4281
- function Pc(s) {
4285
+ function Ec(s) {
4282
4286
  return {
4283
- ...so(s),
4287
+ ...no(s),
4284
4288
  frontendDownloadPath: q.join(s, "frontend")
4285
4289
  };
4286
4290
  }
4287
- function Ec(s) {
4291
+ function Oc(s) {
4288
4292
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
4289
4293
  }
4290
- var st = { exports: {} }, Tt, ks;
4294
+ var st = { exports: {} }, Tt, Cs;
4291
4295
  function mt() {
4292
- if (ks) return Tt;
4293
- ks = 1;
4296
+ if (Cs) return Tt;
4297
+ Cs = 1;
4294
4298
  const s = "2.0.0", e = 256, t = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
4295
4299
  9007199254740991, r = 16, n = e - 6;
4296
4300
  return Tt = {
@@ -4312,14 +4316,14 @@ function mt() {
4312
4316
  FLAG_LOOSE: 2
4313
4317
  }, Tt;
4314
4318
  }
4315
- var It, Cs;
4319
+ var It, Rs;
4316
4320
  function vt() {
4317
- return Cs || (Cs = 1, It = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...e) => console.error("SEMVER", ...e) : () => {
4321
+ return Rs || (Rs = 1, It = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...e) => console.error("SEMVER", ...e) : () => {
4318
4322
  }), It;
4319
4323
  }
4320
- var Rs;
4324
+ var Ps;
4321
4325
  function ze() {
4322
- return Rs || (Rs = 1, function(s, e) {
4326
+ return Ps || (Ps = 1, function(s, e) {
4323
4327
  const {
4324
4328
  MAX_SAFE_COMPONENT_LENGTH: t,
4325
4329
  MAX_SAFE_BUILD_LENGTH: r,
@@ -4343,17 +4347,17 @@ function ze() {
4343
4347
  h("NUMERICIDENTIFIER", "0|[1-9]\\d*"), h("NUMERICIDENTIFIERLOOSE", "\\d+"), h("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${p}*`), h("MAINVERSION", `(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`), h("MAINVERSIONLOOSE", `(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASEIDENTIFIER", `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`), h("PRERELEASEIDENTIFIERLOOSE", `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASE", `(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`), h("PRERELEASELOOSE", `(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`), h("BUILDIDENTIFIER", `${p}+`), h("BUILD", `(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`), h("FULLPLAIN", `v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`), h("FULL", `^${c[u.FULLPLAIN]}$`), h("LOOSEPLAIN", `[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`), h("LOOSE", `^${c[u.LOOSEPLAIN]}$`), h("GTLT", "((?:<|>)?=?)"), h("XRANGEIDENTIFIERLOOSE", `${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), h("XRANGEIDENTIFIER", `${c[u.NUMERICIDENTIFIER]}|x|X|\\*`), h("XRANGEPLAIN", `[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`), h("XRANGEPLAINLOOSE", `[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`), h("XRANGE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`), h("XRANGELOOSE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`), h("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), h("COERCE", `${c[u.COERCEPLAIN]}(?:$|[^\\d])`), h("COERCEFULL", c[u.COERCEPLAIN] + `(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`), h("COERCERTL", c[u.COERCE], !0), h("COERCERTLFULL", c[u.COERCEFULL], !0), h("LONETILDE", "(?:~>?)"), h("TILDETRIM", `(\\s*)${c[u.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", h("TILDE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`), h("TILDELOOSE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`), h("LONECARET", "(?:\\^)"), h("CARETTRIM", `(\\s*)${c[u.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", h("CARET", `^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`), h("CARETLOOSE", `^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`), h("COMPARATORLOOSE", `^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`), h("COMPARATOR", `^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`), h("COMPARATORTRIM", `(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", h("HYPHENRANGE", `^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`), h("HYPHENRANGELOOSE", `^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`), h("STAR", "(<|>)?=?\\s*\\*"), h("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), h("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
4344
4348
  }(st, st.exports)), st.exports;
4345
4349
  }
4346
- var $t, Ps;
4347
- function Jr() {
4348
- if (Ps) return $t;
4349
- Ps = 1;
4350
+ var $t, Es;
4351
+ function Mr() {
4352
+ if (Es) return $t;
4353
+ Es = 1;
4350
4354
  const s = Object.freeze({ loose: !0 }), e = Object.freeze({});
4351
4355
  return $t = (r) => r ? typeof r != "object" ? s : r : e, $t;
4352
4356
  }
4353
- var At, Es;
4354
- function no() {
4355
- if (Es) return At;
4356
- Es = 1;
4357
+ var At, Os;
4358
+ function oo() {
4359
+ if (Os) return At;
4360
+ Os = 1;
4357
4361
  const s = /^[0-9]+$/, e = (r, n) => {
4358
4362
  const i = s.test(r), o = s.test(n);
4359
4363
  return i && o && (r = +r, n = +n), r === n ? 0 : i && !o ? -1 : o && !i ? 1 : r < n ? -1 : 1;
@@ -4363,11 +4367,11 @@ function no() {
4363
4367
  rcompareIdentifiers: (r, n) => e(n, r)
4364
4368
  }, At;
4365
4369
  }
4366
- var Lt, Os;
4370
+ var Lt, Fs;
4367
4371
  function ee() {
4368
- if (Os) return Lt;
4369
- Os = 1;
4370
- const s = vt(), { MAX_LENGTH: e, MAX_SAFE_INTEGER: t } = mt(), { safeRe: r, t: n } = ze(), i = Jr(), { compareIdentifiers: o } = no();
4372
+ if (Fs) return Lt;
4373
+ Fs = 1;
4374
+ const s = vt(), { MAX_LENGTH: e, MAX_SAFE_INTEGER: t } = mt(), { safeRe: r, t: n } = ze(), i = Mr(), { compareIdentifiers: o } = oo();
4371
4375
  class a {
4372
4376
  constructor(l, u) {
4373
4377
  if (u = i(u), l instanceof a) {
@@ -4524,10 +4528,10 @@ function ee() {
4524
4528
  }
4525
4529
  return Lt = a, Lt;
4526
4530
  }
4527
- var Dt, Fs;
4531
+ var Dt, Ts;
4528
4532
  function $e() {
4529
- if (Fs) return Dt;
4530
- Fs = 1;
4533
+ if (Ts) return Dt;
4534
+ Ts = 1;
4531
4535
  const s = ee();
4532
4536
  return Dt = (t, r, n = !1) => {
4533
4537
  if (t instanceof s)
@@ -4541,30 +4545,30 @@ function $e() {
4541
4545
  }
4542
4546
  }, Dt;
4543
4547
  }
4544
- var Nt, Ts;
4545
- function Oc() {
4546
- if (Ts) return Nt;
4547
- Ts = 1;
4548
+ var Nt, Is;
4549
+ function Fc() {
4550
+ if (Is) return Nt;
4551
+ Is = 1;
4548
4552
  const s = $e();
4549
4553
  return Nt = (t, r) => {
4550
4554
  const n = s(t, r);
4551
4555
  return n ? n.version : null;
4552
4556
  }, Nt;
4553
4557
  }
4554
- var Bt, Is;
4555
- function Fc() {
4556
- if (Is) return Bt;
4557
- Is = 1;
4558
+ var Bt, $s;
4559
+ function Tc() {
4560
+ if ($s) return Bt;
4561
+ $s = 1;
4558
4562
  const s = $e();
4559
4563
  return Bt = (t, r) => {
4560
4564
  const n = s(t.trim().replace(/^[=v]+/, ""), r);
4561
4565
  return n ? n.version : null;
4562
4566
  }, Bt;
4563
4567
  }
4564
- var jt, $s;
4565
- function Tc() {
4566
- if ($s) return jt;
4567
- $s = 1;
4568
+ var jt, As;
4569
+ function Ic() {
4570
+ if (As) return jt;
4571
+ As = 1;
4568
4572
  const s = ee();
4569
4573
  return jt = (t, r, n, i, o) => {
4570
4574
  typeof n == "string" && (o = i, i = n, n = void 0);
@@ -4578,10 +4582,10 @@ function Tc() {
4578
4582
  }
4579
4583
  }, jt;
4580
4584
  }
4581
- var xt, As;
4582
- function Ic() {
4583
- if (As) return xt;
4584
- As = 1;
4585
+ var xt, Ls;
4586
+ function $c() {
4587
+ if (Ls) return xt;
4588
+ Ls = 1;
4585
4589
  const s = $e();
4586
4590
  return xt = (t, r) => {
4587
4591
  const n = s(t, null, !0), i = s(r, null, !0), o = n.compare(i);
@@ -4598,62 +4602,62 @@ function Ic() {
4598
4602
  return n.major !== i.major ? p + "major" : n.minor !== i.minor ? p + "minor" : n.patch !== i.patch ? p + "patch" : "prerelease";
4599
4603
  }, xt;
4600
4604
  }
4601
- var Ut, Ls;
4602
- function $c() {
4603
- if (Ls) return Ut;
4604
- Ls = 1;
4605
- const s = ee();
4606
- return Ut = (t, r) => new s(t, r).major, Ut;
4607
- }
4608
- var Vt, Ds;
4605
+ var Ut, Ds;
4609
4606
  function Ac() {
4610
- if (Ds) return Vt;
4607
+ if (Ds) return Ut;
4611
4608
  Ds = 1;
4612
4609
  const s = ee();
4613
- return Vt = (t, r) => new s(t, r).minor, Vt;
4610
+ return Ut = (t, r) => new s(t, r).major, Ut;
4614
4611
  }
4615
- var Jt, Ns;
4612
+ var Vt, Ns;
4616
4613
  function Lc() {
4617
- if (Ns) return Jt;
4614
+ if (Ns) return Vt;
4618
4615
  Ns = 1;
4619
4616
  const s = ee();
4620
- return Jt = (t, r) => new s(t, r).patch, Jt;
4617
+ return Vt = (t, r) => new s(t, r).minor, Vt;
4621
4618
  }
4622
4619
  var Mt, Bs;
4623
4620
  function Dc() {
4624
4621
  if (Bs) return Mt;
4625
4622
  Bs = 1;
4623
+ const s = ee();
4624
+ return Mt = (t, r) => new s(t, r).patch, Mt;
4625
+ }
4626
+ var Jt, js;
4627
+ function Nc() {
4628
+ if (js) return Jt;
4629
+ js = 1;
4626
4630
  const s = $e();
4627
- return Mt = (t, r) => {
4631
+ return Jt = (t, r) => {
4628
4632
  const n = s(t, r);
4629
4633
  return n && n.prerelease.length ? n.prerelease : null;
4630
- }, Mt;
4634
+ }, Jt;
4631
4635
  }
4632
- var Gt, js;
4636
+ var Gt, xs;
4633
4637
  function ae() {
4634
- if (js) return Gt;
4635
- js = 1;
4638
+ if (xs) return Gt;
4639
+ xs = 1;
4636
4640
  const s = ee();
4637
4641
  return Gt = (t, r, n) => new s(t, n).compare(new s(r, n)), Gt;
4638
4642
  }
4639
- var qt, xs;
4640
- function Nc() {
4641
- if (xs) return qt;
4642
- xs = 1;
4643
+ var qt, Us;
4644
+ function Bc() {
4645
+ if (Us) return qt;
4646
+ Us = 1;
4643
4647
  const s = ae();
4644
4648
  return qt = (t, r, n) => s(r, t, n), qt;
4645
4649
  }
4646
- var _t, Us;
4647
- function Bc() {
4648
- if (Us) return _t;
4649
- Us = 1;
4650
+ var _t, Vs;
4651
+ function jc() {
4652
+ if (Vs) return _t;
4653
+ Vs = 1;
4650
4654
  const s = ae();
4651
4655
  return _t = (t, r) => s(t, r, !0), _t;
4652
4656
  }
4653
- var Kt, Vs;
4654
- function Mr() {
4655
- if (Vs) return Kt;
4656
- Vs = 1;
4657
+ var Kt, Ms;
4658
+ function Jr() {
4659
+ if (Ms) return Kt;
4660
+ Ms = 1;
4657
4661
  const s = ee();
4658
4662
  return Kt = (t, r, n) => {
4659
4663
  const i = new s(t, n), o = new s(r, n);
@@ -4661,66 +4665,66 @@ function Mr() {
4661
4665
  }, Kt;
4662
4666
  }
4663
4667
  var Ht, Js;
4664
- function jc() {
4668
+ function xc() {
4665
4669
  if (Js) return Ht;
4666
4670
  Js = 1;
4667
- const s = Mr();
4671
+ const s = Jr();
4668
4672
  return Ht = (t, r) => t.sort((n, i) => s(n, i, r)), Ht;
4669
4673
  }
4670
- var Wt, Ms;
4671
- function xc() {
4672
- if (Ms) return Wt;
4673
- Ms = 1;
4674
- const s = Mr();
4674
+ var Wt, Gs;
4675
+ function Uc() {
4676
+ if (Gs) return Wt;
4677
+ Gs = 1;
4678
+ const s = Jr();
4675
4679
  return Wt = (t, r) => t.sort((n, i) => s(i, n, r)), Wt;
4676
4680
  }
4677
- var zt, Gs;
4681
+ var zt, qs;
4678
4682
  function yt() {
4679
- if (Gs) return zt;
4680
- Gs = 1;
4683
+ if (qs) return zt;
4684
+ qs = 1;
4681
4685
  const s = ae();
4682
4686
  return zt = (t, r, n) => s(t, r, n) > 0, zt;
4683
4687
  }
4684
- var Xt, qs;
4688
+ var Xt, _s;
4685
4689
  function Gr() {
4686
- if (qs) return Xt;
4687
- qs = 1;
4690
+ if (_s) return Xt;
4691
+ _s = 1;
4688
4692
  const s = ae();
4689
4693
  return Xt = (t, r, n) => s(t, r, n) < 0, Xt;
4690
4694
  }
4691
- var Yt, _s;
4692
- function oo() {
4693
- if (_s) return Yt;
4694
- _s = 1;
4695
+ var Yt, Ks;
4696
+ function io() {
4697
+ if (Ks) return Yt;
4698
+ Ks = 1;
4695
4699
  const s = ae();
4696
4700
  return Yt = (t, r, n) => s(t, r, n) === 0, Yt;
4697
4701
  }
4698
- var Qt, Ks;
4699
- function io() {
4700
- if (Ks) return Qt;
4701
- Ks = 1;
4702
+ var Qt, Hs;
4703
+ function ao() {
4704
+ if (Hs) return Qt;
4705
+ Hs = 1;
4702
4706
  const s = ae();
4703
4707
  return Qt = (t, r, n) => s(t, r, n) !== 0, Qt;
4704
4708
  }
4705
- var Zt, Hs;
4709
+ var Zt, Ws;
4706
4710
  function qr() {
4707
- if (Hs) return Zt;
4708
- Hs = 1;
4711
+ if (Ws) return Zt;
4712
+ Ws = 1;
4709
4713
  const s = ae();
4710
4714
  return Zt = (t, r, n) => s(t, r, n) >= 0, Zt;
4711
4715
  }
4712
- var er, Ws;
4716
+ var er, zs;
4713
4717
  function _r() {
4714
- if (Ws) return er;
4715
- Ws = 1;
4718
+ if (zs) return er;
4719
+ zs = 1;
4716
4720
  const s = ae();
4717
4721
  return er = (t, r, n) => s(t, r, n) <= 0, er;
4718
4722
  }
4719
- var tr, zs;
4720
- function ao() {
4721
- if (zs) return tr;
4722
- zs = 1;
4723
- const s = oo(), e = io(), t = yt(), r = qr(), n = Gr(), i = _r();
4723
+ var tr, Xs;
4724
+ function co() {
4725
+ if (Xs) return tr;
4726
+ Xs = 1;
4727
+ const s = io(), e = ao(), t = yt(), r = qr(), n = Gr(), i = _r();
4724
4728
  return tr = (a, c, l, u) => {
4725
4729
  switch (c) {
4726
4730
  case "===":
@@ -4746,10 +4750,10 @@ function ao() {
4746
4750
  }
4747
4751
  }, tr;
4748
4752
  }
4749
- var rr, Xs;
4750
- function Uc() {
4751
- if (Xs) return rr;
4752
- Xs = 1;
4753
+ var rr, Ys;
4754
+ function Vc() {
4755
+ if (Ys) return rr;
4756
+ Ys = 1;
4753
4757
  const s = ee(), e = $e(), { safeRe: t, t: r } = ze();
4754
4758
  return rr = (i, o) => {
4755
4759
  if (i instanceof s)
@@ -4773,10 +4777,10 @@ function Uc() {
4773
4777
  return e(`${c}.${l}.${u}${d}${p}`, o);
4774
4778
  }, rr;
4775
4779
  }
4776
- var sr, Ys;
4777
- function Vc() {
4778
- if (Ys) return sr;
4779
- Ys = 1;
4780
+ var sr, Qs;
4781
+ function Mc() {
4782
+ if (Qs) return sr;
4783
+ Qs = 1;
4780
4784
  class s {
4781
4785
  constructor() {
4782
4786
  this.max = 1e3, this.map = /* @__PURE__ */ new Map();
@@ -4802,10 +4806,10 @@ function Vc() {
4802
4806
  }
4803
4807
  return sr = s, sr;
4804
4808
  }
4805
- var nr, Qs;
4809
+ var nr, Zs;
4806
4810
  function ce() {
4807
- if (Qs) return nr;
4808
- Qs = 1;
4811
+ if (Zs) return nr;
4812
+ Zs = 1;
4809
4813
  const s = /\s+/g;
4810
4814
  class e {
4811
4815
  constructor(m, S) {
@@ -4852,7 +4856,7 @@ function ce() {
4852
4856
  if (C)
4853
4857
  return C;
4854
4858
  const k = this.options.loose, O = k ? c[l.HYPHENRANGELOOSE] : c[l.HYPHENRANGE];
4855
- m = m.replace(O, J(this.options.includePrerelease)), o("hyphen replace", m), m = m.replace(c[l.COMPARATORTRIM], u), o("comparator trim", m), m = m.replace(c[l.TILDETRIM], d), o("tilde trim", m), m = m.replace(c[l.CARETTRIM], p), o("caret trim", m);
4859
+ m = m.replace(O, M(this.options.includePrerelease)), o("hyphen replace", m), m = m.replace(c[l.COMPARATORTRIM], u), o("comparator trim", m), m = m.replace(c[l.TILDETRIM], d), o("tilde trim", m), m = m.replace(c[l.CARETTRIM], p), o("caret trim", m);
4856
4860
  let A = m.split(" ").map((V) => B(V, this.options)).join(" ").split(/\s+/).map((V) => X(V, this.options));
4857
4861
  k && (A = A.filter((V) => (o("loose invalid filter", V, this.options), !!V.match(c[l.COMPARATORLOOSE])))), o("range list", A);
4858
4862
  const T = /* @__PURE__ */ new Map(), j = A.map((V) => new i(V, this.options));
@@ -4887,7 +4891,7 @@ function ce() {
4887
4891
  }
4888
4892
  }
4889
4893
  nr = e;
4890
- const t = Vc(), r = new t(), n = Jr(), i = wt(), o = vt(), a = ee(), {
4894
+ const t = Mc(), r = new t(), n = Mr(), i = wt(), o = vt(), a = ee(), {
4891
4895
  safeRe: c,
4892
4896
  t: l,
4893
4897
  comparatorTrimReplace: u,
@@ -4923,7 +4927,7 @@ function ce() {
4923
4927
  const j = F(k), W = j || F(O), V = W || F(A), ie = V;
4924
4928
  return C === "=" && ie && (C = ""), T = m.includePrerelease ? "-0" : "", j ? C === ">" || C === "<" ? w = "<0.0.0-0" : w = "*" : C && ie ? (W && (O = 0), A = 0, C === ">" ? (C = ">=", W ? (k = +k + 1, O = 0, A = 0) : (O = +O + 1, A = 0)) : C === "<=" && (C = "<", W ? k = +k + 1 : O = +O + 1), C === "<" && (T = "-0"), w = `${C + k}.${O}.${A}${T}`) : W ? w = `>=${k}.0.0${T} <${+k + 1}.0.0-0` : V && (w = `>=${k}.${O}.0${T} <${k}.${+O + 1}.0-0`), o("xRange return", w), w;
4925
4929
  });
4926
- }, le = (g, m) => (o("replaceStars", g, m), g.trim().replace(c[l.STAR], "")), X = (g, m) => (o("replaceGTE0", g, m), g.trim().replace(c[m.includePrerelease ? l.GTE0PRE : l.GTE0], "")), J = (g) => (m, S, w, C, k, O, A, T, j, W, V, ie) => (F(w) ? S = "" : F(C) ? S = `>=${w}.0.0${g ? "-0" : ""}` : F(k) ? S = `>=${w}.${C}.0${g ? "-0" : ""}` : O ? S = `>=${S}` : S = `>=${S}${g ? "-0" : ""}`, F(j) ? T = "" : F(W) ? T = `<${+j + 1}.0.0-0` : F(V) ? T = `<${j}.${+W + 1}.0-0` : ie ? T = `<=${j}.${W}.${V}-${ie}` : g ? T = `<${j}.${W}.${+V + 1}-0` : T = `<=${T}`, `${S} ${T}`.trim()), z = (g, m, S) => {
4930
+ }, le = (g, m) => (o("replaceStars", g, m), g.trim().replace(c[l.STAR], "")), X = (g, m) => (o("replaceGTE0", g, m), g.trim().replace(c[m.includePrerelease ? l.GTE0PRE : l.GTE0], "")), M = (g) => (m, S, w, C, k, O, A, T, j, W, V, ie) => (F(w) ? S = "" : F(C) ? S = `>=${w}.0.0${g ? "-0" : ""}` : F(k) ? S = `>=${w}.${C}.0${g ? "-0" : ""}` : O ? S = `>=${S}` : S = `>=${S}${g ? "-0" : ""}`, F(j) ? T = "" : F(W) ? T = `<${+j + 1}.0.0-0` : F(V) ? T = `<${j}.${+W + 1}.0-0` : ie ? T = `<=${j}.${W}.${V}-${ie}` : g ? T = `<${j}.${W}.${+V + 1}-0` : T = `<=${T}`, `${S} ${T}`.trim()), z = (g, m, S) => {
4927
4931
  for (let w = 0; w < g.length; w++)
4928
4932
  if (!g[w].test(m))
4929
4933
  return !1;
@@ -4940,10 +4944,10 @@ function ce() {
4940
4944
  };
4941
4945
  return nr;
4942
4946
  }
4943
- var or, Zs;
4947
+ var or, en;
4944
4948
  function wt() {
4945
- if (Zs) return or;
4946
- Zs = 1;
4949
+ if (en) return or;
4950
+ en = 1;
4947
4951
  const s = Symbol("SemVer ANY");
4948
4952
  class e {
4949
4953
  static get ANY() {
@@ -4984,13 +4988,13 @@ function wt() {
4984
4988
  }
4985
4989
  }
4986
4990
  or = e;
4987
- const t = Jr(), { safeRe: r, t: n } = ze(), i = ao(), o = vt(), a = ee(), c = ce();
4991
+ const t = Mr(), { safeRe: r, t: n } = ze(), i = co(), o = vt(), a = ee(), c = ce();
4988
4992
  return or;
4989
4993
  }
4990
- var ir, en;
4994
+ var ir, tn;
4991
4995
  function St() {
4992
- if (en) return ir;
4993
- en = 1;
4996
+ if (tn) return ir;
4997
+ tn = 1;
4994
4998
  const s = ce();
4995
4999
  return ir = (t, r, n) => {
4996
5000
  try {
@@ -5001,17 +5005,17 @@ function St() {
5001
5005
  return r.test(t);
5002
5006
  }, ir;
5003
5007
  }
5004
- var ar, tn;
5008
+ var ar, rn;
5005
5009
  function Jc() {
5006
- if (tn) return ar;
5007
- tn = 1;
5010
+ if (rn) return ar;
5011
+ rn = 1;
5008
5012
  const s = ce();
5009
5013
  return ar = (t, r) => new s(t, r).set.map((n) => n.map((i) => i.value).join(" ").trim().split(" ")), ar;
5010
5014
  }
5011
- var cr, rn;
5012
- function Mc() {
5013
- if (rn) return cr;
5014
- rn = 1;
5015
+ var cr, sn;
5016
+ function Gc() {
5017
+ if (sn) return cr;
5018
+ sn = 1;
5015
5019
  const s = ee(), e = ce();
5016
5020
  return cr = (r, n, i) => {
5017
5021
  let o = null, a = null, c = null;
@@ -5025,10 +5029,10 @@ function Mc() {
5025
5029
  }), o;
5026
5030
  }, cr;
5027
5031
  }
5028
- var lr, sn;
5029
- function Gc() {
5030
- if (sn) return lr;
5031
- sn = 1;
5032
+ var lr, nn;
5033
+ function qc() {
5034
+ if (nn) return lr;
5035
+ nn = 1;
5032
5036
  const s = ee(), e = ce();
5033
5037
  return lr = (r, n, i) => {
5034
5038
  let o = null, a = null, c = null;
@@ -5042,10 +5046,10 @@ function Gc() {
5042
5046
  }), o;
5043
5047
  }, lr;
5044
5048
  }
5045
- var ur, nn;
5046
- function qc() {
5047
- if (nn) return ur;
5048
- nn = 1;
5049
+ var ur, on;
5050
+ function _c() {
5051
+ if (on) return ur;
5052
+ on = 1;
5049
5053
  const s = ee(), e = ce(), t = yt();
5050
5054
  return ur = (n, i) => {
5051
5055
  n = new e(n, i);
@@ -5078,10 +5082,10 @@ function qc() {
5078
5082
  return o && n.test(o) ? o : null;
5079
5083
  }, ur;
5080
5084
  }
5081
- var dr, on;
5082
- function _c() {
5083
- if (on) return dr;
5084
- on = 1;
5085
+ var dr, an;
5086
+ function Kc() {
5087
+ if (an) return dr;
5088
+ an = 1;
5085
5089
  const s = ce();
5086
5090
  return dr = (t, r) => {
5087
5091
  try {
@@ -5091,10 +5095,10 @@ function _c() {
5091
5095
  }
5092
5096
  }, dr;
5093
5097
  }
5094
- var pr, an;
5098
+ var pr, cn;
5095
5099
  function Kr() {
5096
- if (an) return pr;
5097
- an = 1;
5100
+ if (cn) return pr;
5101
+ cn = 1;
5098
5102
  const s = ee(), e = wt(), { ANY: t } = e, r = ce(), n = St(), i = yt(), o = Gr(), a = _r(), c = qr();
5099
5103
  return pr = (u, d, p, f) => {
5100
5104
  u = new s(u, f), d = new r(d, f);
@@ -5124,31 +5128,31 @@ function Kr() {
5124
5128
  return !0;
5125
5129
  }, pr;
5126
5130
  }
5127
- var fr, cn;
5128
- function Kc() {
5129
- if (cn) return fr;
5130
- cn = 1;
5131
- const s = Kr();
5132
- return fr = (t, r, n) => s(t, r, ">", n), fr;
5133
- }
5134
- var hr, ln;
5131
+ var fr, ln;
5135
5132
  function Hc() {
5136
- if (ln) return hr;
5133
+ if (ln) return fr;
5137
5134
  ln = 1;
5138
5135
  const s = Kr();
5139
- return hr = (t, r, n) => s(t, r, "<", n), hr;
5136
+ return fr = (t, r, n) => s(t, r, ">", n), fr;
5140
5137
  }
5141
- var gr, un;
5138
+ var hr, un;
5142
5139
  function Wc() {
5143
- if (un) return gr;
5140
+ if (un) return hr;
5144
5141
  un = 1;
5145
- const s = ce();
5146
- return gr = (t, r, n) => (t = new s(t, n), r = new s(r, n), t.intersects(r, n)), gr;
5142
+ const s = Kr();
5143
+ return hr = (t, r, n) => s(t, r, "<", n), hr;
5147
5144
  }
5148
- var mr, dn;
5145
+ var gr, dn;
5149
5146
  function zc() {
5150
- if (dn) return mr;
5147
+ if (dn) return gr;
5151
5148
  dn = 1;
5149
+ const s = ce();
5150
+ return gr = (t, r, n) => (t = new s(t, n), r = new s(r, n), t.intersects(r, n)), gr;
5151
+ }
5152
+ var mr, pn;
5153
+ function Xc() {
5154
+ if (pn) return mr;
5155
+ pn = 1;
5152
5156
  const s = St(), e = ae();
5153
5157
  return mr = (t, r, n) => {
5154
5158
  const i = [];
@@ -5164,10 +5168,10 @@ function zc() {
5164
5168
  return u.length < d.length ? u : r;
5165
5169
  }, mr;
5166
5170
  }
5167
- var vr, pn;
5168
- function Xc() {
5169
- if (pn) return vr;
5170
- pn = 1;
5171
+ var vr, fn;
5172
+ function Yc() {
5173
+ if (fn) return vr;
5174
+ fn = 1;
5171
5175
  const s = ce(), e = wt(), { ANY: t } = e, r = St(), n = ae(), i = (d, p, f = {}) => {
5172
5176
  if (d === p)
5173
5177
  return !0;
@@ -5251,11 +5255,11 @@ function Xc() {
5251
5255
  };
5252
5256
  return vr = i, vr;
5253
5257
  }
5254
- var yr, fn;
5255
- function Yc() {
5256
- if (fn) return yr;
5257
- fn = 1;
5258
- const s = ze(), e = mt(), t = ee(), r = no(), n = $e(), i = Oc(), o = Fc(), a = Tc(), c = Ic(), l = $c(), u = Ac(), d = Lc(), p = Dc(), f = ae(), v = Nc(), h = Bc(), y = Mr(), E = jc(), B = xc(), F = yt(), x = Gr(), U = oo(), P = io(), $ = qr(), R = _r(), G = ao(), le = Uc(), X = wt(), J = ce(), z = St(), g = Jc(), m = Mc(), S = Gc(), w = qc(), C = _c(), k = Kr(), O = Kc(), A = Hc(), T = Wc(), j = zc(), W = Xc();
5258
+ var yr, hn;
5259
+ function Qc() {
5260
+ if (hn) return yr;
5261
+ hn = 1;
5262
+ const s = ze(), e = mt(), t = ee(), r = oo(), n = $e(), i = Fc(), o = Tc(), a = Ic(), c = $c(), l = Ac(), u = Lc(), d = Dc(), p = Nc(), f = ae(), v = Bc(), h = jc(), y = Jr(), E = xc(), B = Uc(), F = yt(), x = Gr(), U = io(), P = ao(), $ = qr(), R = _r(), G = co(), le = Vc(), X = wt(), M = ce(), z = St(), g = Jc(), m = Gc(), S = qc(), w = _c(), C = Kc(), k = Kr(), O = Hc(), A = Wc(), T = zc(), j = Xc(), W = Yc();
5259
5263
  return yr = {
5260
5264
  parse: n,
5261
5265
  valid: i,
@@ -5281,7 +5285,7 @@ function Yc() {
5281
5285
  cmp: G,
5282
5286
  coerce: le,
5283
5287
  Comparator: X,
5284
- Range: J,
5288
+ Range: M,
5285
5289
  satisfies: z,
5286
5290
  toComparators: g,
5287
5291
  maxSatisfying: m,
@@ -5304,13 +5308,13 @@ function Yc() {
5304
5308
  rcompareIdentifiers: r.rcompareIdentifiers
5305
5309
  }, yr;
5306
5310
  }
5307
- var Qc = Yc();
5308
- const Zc = /* @__PURE__ */ Ec(Qc), el = {
5311
+ var Zc = Qc();
5312
+ const el = /* @__PURE__ */ Oc(Zc), tl = {
5309
5313
  minDelay: 1500
5310
- }, tl = "__no_updates__";
5311
- class rl extends Wo {
5314
+ }, rl = "__no_updates__";
5315
+ class sl extends zo {
5312
5316
  constructor(t, r, n = {}) {
5313
- super({ ...n, ...el }, r);
5317
+ super({ ...n, ...tl }, r);
5314
5318
  b(this, "http");
5315
5319
  b(this, "preferredUpdateChannel");
5316
5320
  this.registryProvider = t, this.http = n.http, this.preferredUpdateChannel = n.preferredUpdateChannel;
@@ -5324,7 +5328,7 @@ class rl extends Wo {
5324
5328
  case "from-registry-v2":
5325
5329
  return `from_registry_v2_${re(t)}`;
5326
5330
  default:
5327
- return tl;
5331
+ return rl;
5328
5332
  }
5329
5333
  }
5330
5334
  async readValue(t) {
@@ -5334,7 +5338,7 @@ class rl extends Wo {
5334
5338
  switch (i.type) {
5335
5339
  case "dev-v1":
5336
5340
  try {
5337
- const o = await Nn(i.folder);
5341
+ const o = await Bn(i.folder);
5338
5342
  return o === i.mtime ? { suggestions: [] } : { mainSuggestion: { ...i, mtime: o }, suggestions: [] };
5339
5343
  } catch (o) {
5340
5344
  return this.logger.warn(o), { suggestions: [] };
@@ -5360,7 +5364,7 @@ class rl extends Wo {
5360
5364
  else {
5361
5365
  if (await c.getLatestOverview(i.id, xe) === void 0)
5362
5366
  return this.logger.error(
5363
- `No "any" channel record for ${ko(i.id)}`
5367
+ `No "any" channel record for ${Co(i.id)}`
5364
5368
  ), { suggestions: [] };
5365
5369
  l = xe;
5366
5370
  }
@@ -5385,7 +5389,7 @@ class rl extends Wo {
5385
5389
  update: { ...i, id: { ...i.id, version: h } }
5386
5390
  }));
5387
5391
  if (d === void 0) return { suggestions: p };
5388
- if (a !== void 0 && Zc.lte(d, a))
5392
+ if (a !== void 0 && el.lte(d, a))
5389
5393
  return { suggestions: p };
5390
5394
  const f = {
5391
5395
  ...i,
@@ -5412,7 +5416,7 @@ class rl extends Wo {
5412
5416
  return re(t) === re(r);
5413
5417
  }
5414
5418
  }
5415
- class hn {
5419
+ class gn {
5416
5420
  constructor() {
5417
5421
  b(this, "resources", /* @__PURE__ */ new Map());
5418
5422
  b(this, "disposeQueue", Promise.resolve());
@@ -5423,7 +5427,7 @@ class hn {
5423
5427
  if (t.refCount === 0) {
5424
5428
  this.resources.delete(e);
5425
5429
  const r = t.resource;
5426
- $o(r) ? this.disposeQueue.then(() => r[Symbol.dispose]()) : Ao(r) && this.disposeQueue.then(() => r[Symbol.asyncDispose]());
5430
+ Ao(r) ? this.disposeQueue.then(() => r[Symbol.dispose]()) : Lo(r) && this.disposeQueue.then(() => r[Symbol.asyncDispose]());
5427
5431
  }
5428
5432
  }
5429
5433
  acquire(e) {
@@ -5452,7 +5456,7 @@ class hn {
5452
5456
  function Pe(s) {
5453
5457
  return String(s.id);
5454
5458
  }
5455
- const sl = ["Int", "Long", "Float", "Double", "String", "Bytes"];
5459
+ const nl = ["Int", "Long", "Float", "Double", "String", "Bytes"];
5456
5460
  function Be(s) {
5457
5461
  const e = [], t = [];
5458
5462
  for (const r of s)
@@ -5468,7 +5472,7 @@ function Be(s) {
5468
5472
  }
5469
5473
  return t;
5470
5474
  }
5471
- function gn(s) {
5475
+ function mn(s) {
5472
5476
  return "partitionFilters" in s ? {
5473
5477
  ...s,
5474
5478
  partitionFilters: Be(s.partitionFilters),
@@ -5480,7 +5484,7 @@ function gn(s) {
5480
5484
  };
5481
5485
  }
5482
5486
  const Ce = (s, e) => typeof e == "bigint" ? e.toString() : e;
5483
- class nl {
5487
+ class ol {
5484
5488
  constructor(e, t) {
5485
5489
  b(this, "perFrame", /* @__PURE__ */ new Map());
5486
5490
  b(this, "global");
@@ -5512,7 +5516,7 @@ class nl {
5512
5516
  this.disposeListeners.set(r, i), e.resource.disposeSignal.addEventListener("abort", i);
5513
5517
  }
5514
5518
  }
5515
- class ol {
5519
+ class il {
5516
5520
  constructor(e, t, r, n) {
5517
5521
  b(this, "pFramePromise");
5518
5522
  b(this, "abortController", new AbortController());
@@ -5524,30 +5528,30 @@ class ol {
5524
5528
  try {
5525
5529
  await r.awaitStableFullValue(this.disposeSignal);
5526
5530
  } catch (n) {
5527
- if (So(n))
5531
+ if (bo(n))
5528
5532
  break;
5529
5533
  throw n;
5530
5534
  }
5531
5535
  });
5532
5536
  b(this, "resolveBlobContent", async (e) => {
5533
5537
  const t = this.getOrCreateComputableForBlob(e), r = this.blobDriver.getLocalPath((await t.awaitStableValue(this.disposeSignal)).handle);
5534
- return await bn.readFile(r);
5538
+ return await kn.readFile(r);
5535
5539
  });
5536
5540
  this.blobDriver = e, this.logger = t, this.spillPath = r;
5537
5541
  const i = (a, c) => this.logger[a](c);
5538
5542
  for (const a of n)
5539
- for (const c of aa(a.data))
5543
+ for (const c of ca(a.data))
5540
5544
  this.blobIdToResource.set(Pe(c), c);
5541
5545
  const o = [
5542
5546
  ...new Map(n.map((a) => ({
5543
5547
  ...a,
5544
- data: ca(a.data, Pe)
5548
+ data: la(a.data, Pe)
5545
5549
  })).map(
5546
5550
  (a) => [re(a), a]
5547
5551
  )).values()
5548
5552
  ];
5549
5553
  try {
5550
- const a = new An(this.spillPath, i);
5554
+ const a = new Ln(this.spillPath, i);
5551
5555
  a.setDataSource(this);
5552
5556
  const c = [];
5553
5557
  for (const l of o)
@@ -5606,7 +5610,7 @@ class Hr {
5606
5610
  b(this, "tableConcurrencyLimiter");
5607
5611
  this.blobDriver = e, this.logger = t, this.spillPath = r;
5608
5612
  const i = new rs(n.pFrameConcurrency);
5609
- this.frameConcurrencyLimiter = i, this.tableConcurrencyLimiter = new rs(n.pTableConcurrency), this.pTableCache = new nl(this.logger, n), this.pFrames = new class extends hn {
5613
+ this.frameConcurrencyLimiter = i, this.tableConcurrencyLimiter = new rs(n.pTableConcurrency), this.pTableCache = new ol(this.logger, n), this.pFrames = new class extends gn {
5610
5614
  constructor(o, a, c) {
5611
5615
  super(), this.blobDriver = o, this.logger = a, this.spillPath = c;
5612
5616
  }
@@ -5621,16 +5625,16 @@ class Hr {
5621
5625
  createNewResource(o) {
5622
5626
  return Z().logPFrameRequests && t.info(
5623
5627
  `PFrame creation (pFrameHandle = ${this.calculateParamsKey(o)}): ${JSON.stringify(o, Ce)}`
5624
- ), new ol(this.blobDriver, this.logger, this.spillPath, o);
5628
+ ), new il(this.blobDriver, this.logger, this.spillPath, o);
5625
5629
  }
5626
5630
  calculateParamsKey(o) {
5627
5631
  try {
5628
- return al(o);
5632
+ return cl(o);
5629
5633
  } catch (a) {
5630
- throw yo(a) ? a : new K(`PFrame handle calculation failed, request: ${JSON.stringify(o, Ce)}, error: ${it(a)}`);
5634
+ throw wo(a) ? a : new K(`PFrame handle calculation failed, request: ${JSON.stringify(o, Ce)}, error: ${it(a)}`);
5631
5635
  }
5632
5636
  }
5633
- }(this.blobDriver, this.logger, this.spillPath), this.pTables = new class extends hn {
5637
+ }(this.blobDriver, this.logger, this.spillPath), this.pTables = new class extends gn {
5634
5638
  constructor(o) {
5635
5639
  super(), this.pFrames = o;
5636
5640
  }
@@ -5672,7 +5676,7 @@ class Hr {
5672
5676
  }
5673
5677
  calculateParamsKey(o) {
5674
5678
  try {
5675
- return il(o);
5679
+ return al(o);
5676
5680
  } catch (a) {
5677
5681
  throw new K(`PTable handle calculation failed, request: ${JSON.stringify(o)}, error: ${it(a)}`);
5678
5682
  }
@@ -5680,26 +5684,26 @@ class Hr {
5680
5684
  }(this.pFrames);
5681
5685
  }
5682
5686
  async pprofDump() {
5683
- return await An.pprofDump();
5687
+ return await Ln.pprofDump();
5684
5688
  }
5685
5689
  static async init(e, t, r, n) {
5686
- const i = Oo.resolve(r);
5687
- return await Lo(i), new Hr(e, t, i, n);
5690
+ const i = Fo.resolve(r);
5691
+ return await Do(i), new Hr(e, t, i, n);
5688
5692
  }
5689
5693
  //
5690
5694
  // Internal / Config API Methods
5691
5695
  //
5692
5696
  createPFrame(e, t) {
5693
- const r = e.filter((i) => sl.find((o) => o === i.spec.valueType)).map(
5697
+ const r = e.filter((i) => nl.find((o) => o === i.spec.valueType)).map(
5694
5698
  (i) => ve(
5695
5699
  i,
5696
- (o) => Ho(o) ? ma(o) : yn(o) ? o.type === "ParquetPartitioned" ? br(o, (a) => Ir(a)) : br(o, (a) => a.resourceInfo) : va(i.spec, o)
5700
+ (o) => Wo(o) ? va(o) : wn(o) ? o.type === "ParquetPartitioned" ? br(o, (a) => Ir(a)) : br(o, (a) => a.resourceInfo) : ya(i.spec, o)
5697
5701
  )
5698
5702
  ), n = this.pFrames.acquire(r);
5699
5703
  return t.addOnDestroy(n.unref), n.key;
5700
5704
  }
5701
5705
  createPTable(e, t) {
5702
- const r = gn(e), n = this.createPFrame(wo(r.src), t), i = Sr(r, (a) => a.id), o = this.pTables.acquire({ def: i, pFrameHandle: n });
5706
+ const r = mn(e), n = this.createPFrame(So(r.src), t), i = Sr(r, (a) => a.id), o = this.pTables.acquire({ def: i, pFrameHandle: n });
5703
5707
  return Z().logPFrameRequests && this.logger.info(
5704
5708
  `Create PTable call (pFrameHandle = ${n}; pTableHandle = ${JSON.stringify(o)}): ${JSON.stringify(
5705
5709
  Sr(r, (a) => a.spec),
@@ -5743,7 +5747,7 @@ class Hr {
5743
5747
  );
5744
5748
  const i = this.pTables.acquire({
5745
5749
  pFrameHandle: e,
5746
- def: gn(t)
5750
+ def: mn(t)
5747
5751
  }), { resource: { pTablePromise: o, disposeSignal: a } } = i, c = await o, l = AbortSignal.any([n, a].filter((u) => !!u));
5748
5752
  return await this.frameConcurrencyLimiter.run(async () => {
5749
5753
  try {
@@ -5837,11 +5841,11 @@ function ot(s) {
5837
5841
  Q(s);
5838
5842
  }
5839
5843
  }
5840
- function il(s) {
5844
+ function al(s) {
5841
5845
  const e = Ie("sha256");
5842
5846
  return e.update(re(s)), e.digest().toString("hex");
5843
5847
  }
5844
- function al(s) {
5848
+ function cl(s) {
5845
5849
  const e = [...s].map(
5846
5850
  (r) => ve(r, (n) => {
5847
5851
  let i;
@@ -5900,12 +5904,12 @@ function al(s) {
5900
5904
  const t = Ie("sha256");
5901
5905
  return t.update(re(e)), t.digest().toString("hex");
5902
5906
  }
5903
- async function cl(s, e, t, r) {
5907
+ async function ll(s, e, t, r) {
5904
5908
  const n = {
5905
- ...ro,
5906
- ...so(e),
5909
+ ...so,
5910
+ ...no(e),
5907
5911
  ...r
5908
- }, i = new Ar(n.localSecret), o = On(n.logger, s, n.localProjections), a = si(s, n.logger), c = Fn(s, n.logger), l = ni(s, n.logger), u = await oi.init(
5912
+ }, i = new Ar(n.localSecret), o = Fn(n.logger, s, n.localProjections), a = ni(s, n.logger), c = Tn(s, n.logger), l = oi(s, n.logger), u = await ii.init(
5909
5913
  n.logger,
5910
5914
  o,
5911
5915
  a,
@@ -5913,19 +5917,19 @@ async function cl(s, e, t, r) {
5913
5917
  n.blobDownloadRangesCachePath,
5914
5918
  i,
5915
5919
  n.blobDriverOps
5916
- ), d = new ii(
5920
+ ), d = new ai(
5917
5921
  n.logger,
5918
5922
  i,
5919
5923
  o,
5920
5924
  n.downloadBlobToURLPath,
5921
5925
  n.downloadBlobToURLDriverOps
5922
- ), p = new ai(
5926
+ ), p = new ci(
5923
5927
  n.logger,
5924
5928
  i,
5925
5929
  c,
5926
5930
  l,
5927
5931
  n.uploadDriverOps
5928
- ), f = new ci(n.logger, a, n.logStreamDriverOps), v = new li(n.logger, f, u), h = await Tn.init(
5932
+ ), f = new li(n.logger, a, n.logStreamDriverOps), v = new ui(n.logger, f, u), h = await In.init(
5929
5933
  n.logger,
5930
5934
  s,
5931
5935
  i,
@@ -5937,7 +5941,7 @@ async function cl(s, e, t, r) {
5937
5941
  n.logger,
5938
5942
  n.pframesSpillPath,
5939
5943
  n.pFrameDriverOps
5940
- ), E = new ui(
5944
+ ), E = new di(
5941
5945
  n.logger,
5942
5946
  s.httpDispatcher,
5943
5947
  t,
@@ -5955,7 +5959,7 @@ async function cl(s, e, t, r) {
5955
5959
  frontendDriver: E
5956
5960
  };
5957
5961
  }
5958
- class ll {
5962
+ class ul {
5959
5963
  constructor(e) {
5960
5964
  b(this, "enrichmentTargetsCache", new lt({
5961
5965
  max: 256,
@@ -5967,7 +5971,7 @@ class ll {
5967
5971
  const t = e.blockConfig();
5968
5972
  if (t.enrichmentTargets === void 0) return;
5969
5973
  const r = e.args();
5970
- return oc(this.quickJs, t.enrichmentTargets, ft(t), r);
5974
+ return ic(this.quickJs, t.enrichmentTargets, ft(t), r);
5971
5975
  }
5972
5976
  getEnrichmentTargets(e, t, r) {
5973
5977
  const n = { blockConfig: e, args: t };
@@ -5977,7 +5981,7 @@ class ll {
5977
5981
  return this.enrichmentTargetsCache.memo(i, { context: n }).value;
5978
5982
  }
5979
5983
  }
5980
- class co {
5984
+ class lo {
5981
5985
  constructor(e, t, r, n, i, o, a, c) {
5982
5986
  b(this, "pl");
5983
5987
  /** Contains a reactive list of projects along with their meta information. */
@@ -6002,8 +6006,8 @@ class co {
6002
6006
  /** Creates a project with initial state and adds it to project list. */
6003
6007
  async createProject(e, t = ge()) {
6004
6008
  const r = await this.pl.withWriteTx("MLCreateProject", async (n) => {
6005
- const i = await ia(n, e);
6006
- return n.createField(M(this.projectListResourceId, t), "Dynamic", i), await n.commit(), await Jo(i);
6009
+ const i = await aa(n, e);
6010
+ return n.createField(J(this.projectListResourceId, t), "Dynamic", i), await n.commit(), await Jo(i);
6007
6011
  });
6008
6012
  return await this.projectListTree.refreshState(), r;
6009
6013
  }
@@ -6017,13 +6021,13 @@ class co {
6017
6021
  * destruction of all attached objects, like files, analysis results etc. */
6018
6022
  async deleteProject(e) {
6019
6023
  await this.pl.withWriteTx("MLRemoveProject", async (t) => {
6020
- t.removeField(M(this.projectListResourceId, e)), await t.commit();
6024
+ t.removeField(J(this.projectListResourceId, e)), await t.commit();
6021
6025
  }), await this.projectListTree.refreshState();
6022
6026
  }
6023
6027
  async projectIdToResourceId(e) {
6024
6028
  return await this.pl.withReadTx("Project id to resource id", async (t) => {
6025
- const r = (await t.getField(M(this.projectListResourceId, e))).value;
6026
- if (Me(r)) throw new Error("Unexpected project list structure.");
6029
+ const r = (await t.getField(J(this.projectListResourceId, e))).value;
6030
+ if (Je(r)) throw new Error("Unexpected project list structure.");
6027
6031
  return r;
6028
6032
  });
6029
6033
  }
@@ -6071,29 +6075,29 @@ class co {
6071
6075
  /** Initialize middle layer */
6072
6076
  static async init(e, t, r) {
6073
6077
  const n = {
6074
- ...Rc,
6075
- ...Pc(t),
6078
+ ...Pc,
6079
+ ...Ec(t),
6076
6080
  ...r
6077
6081
  };
6078
6082
  n.defaultTreeOptions.logStat = Z().logTreeStats, n.debugOps.dumpInitialTreeState = Z().dumpInitialTreeState;
6079
6083
  const i = await e.withWriteTx("MLInitialization", async (y) => {
6080
- const E = M(y.clientRoot, $i);
6084
+ const E = J(y.clientRoot, Ai);
6081
6085
  y.createField(E, "Dynamic");
6082
6086
  const B = await y.getField(E);
6083
- if (Me(B.value)) {
6084
- const F = y.createEphemeral(Bn);
6087
+ if (Je(B.value)) {
6088
+ const F = y.createEphemeral(jn);
6085
6089
  return y.lock(F), y.setField(E, F), await y.commit(), await F.globalId;
6086
6090
  } else
6087
6091
  return B.value;
6088
- }), o = n.logger, a = await cl(e, t, n.frontendDownloadPath, n), c = new Co(e.httpDispatcher), l = new ki(c), u = new Zi(
6092
+ }), o = n.logger, a = await ll(e, t, n.frontendDownloadPath, n), c = new Ro(e.httpDispatcher), l = new Ci(c), u = new ea(
6089
6093
  l,
6090
6094
  a.signer,
6091
6095
  c
6092
- ), d = await ti(), p = new bo();
6096
+ ), d = await ri(), p = new ko();
6093
6097
  p.addSupportedRequirement("requiresModelAPIVersion", 1);
6094
6098
  const f = {
6095
6099
  pl: e,
6096
- blockEventDispatcher: new Do(),
6100
+ blockEventDispatcher: new No(),
6097
6101
  signer: a.signer,
6098
6102
  logger: o,
6099
6103
  httpDispatcher: e.httpDispatcher,
@@ -6102,16 +6106,16 @@ class co {
6102
6106
  bpPreparer: u,
6103
6107
  frontendDownloadDriver: a.frontendDriver,
6104
6108
  driverKit: a,
6105
- blockUpdateWatcher: new rl(l, o, {
6109
+ blockUpdateWatcher: new sl(l, o, {
6106
6110
  minDelay: n.devBlockUpdateRecheckInterval,
6107
6111
  http: c,
6108
6112
  preferredUpdateChannel: n.preferredUpdateChannel
6109
6113
  }),
6110
6114
  runtimeCapabilities: p,
6111
6115
  quickJs: d,
6112
- projectHelper: new ll(d)
6113
- }, v = new zo([]), h = await Li(e, i, v, f);
6114
- return new co(
6116
+ projectHelper: new ul(d)
6117
+ }, v = new Xo([]), h = await Di(e, i, v, f);
6118
+ return new lo(
6115
6119
  f,
6116
6120
  a,
6117
6121
  a.signer,
@@ -6123,41 +6127,41 @@ class co {
6123
6127
  );
6124
6128
  }
6125
6129
  }
6126
- async function ul(s, e) {
6130
+ async function dl(s, e) {
6127
6131
  return await Ae(s.pingCheckDurationMs, s.maxPingsPerSecond, async () => {
6128
- const r = await new Cn(e).ping();
6132
+ const r = await new Rn(e).ping();
6129
6133
  return JSON.stringify(r).slice(0, s.bodyLimit) + "...";
6130
6134
  });
6131
6135
  }
6132
- async function dl(s, e) {
6136
+ async function pl(s, e) {
6133
6137
  return await Ae(
6134
6138
  s.blockRegistryDurationMs,
6135
6139
  s.maxRegistryChecksPerSecond,
6136
6140
  async () => await Xe(new URL(s.blockOverviewPath, s.blockRegistryUrl), s, e)
6137
6141
  );
6138
6142
  }
6139
- async function pl(s, e) {
6143
+ async function fl(s, e) {
6140
6144
  return await Ae(
6141
6145
  s.blockRegistryDurationMs,
6142
6146
  s.maxRegistryChecksPerSecond,
6143
6147
  async () => await Xe(new URL(s.blockOverviewPath, s.blockGARegistryUrl), s, e)
6144
6148
  );
6145
6149
  }
6146
- async function fl(s, e) {
6150
+ async function hl(s, e) {
6147
6151
  return await Ae(
6148
6152
  s.blockRegistryDurationMs,
6149
6153
  s.maxRegistryChecksPerSecond,
6150
6154
  async () => await Xe(new URL(s.blockUiPath, s.blockRegistryUrl), s, e)
6151
6155
  );
6152
6156
  }
6153
- async function hl(s, e) {
6157
+ async function gl(s, e) {
6154
6158
  return await Ae(
6155
6159
  s.blockRegistryDurationMs,
6156
6160
  s.maxRegistryChecksPerSecond,
6157
6161
  async () => await Xe(new URL(s.blockUiPath, s.blockGARegistryUrl), s, e)
6158
6162
  );
6159
6163
  }
6160
- async function gl(s, e) {
6164
+ async function ml(s, e) {
6161
6165
  return await Ae(
6162
6166
  s.autoUpdateCdnDurationMs,
6163
6167
  s.maxAutoUpdateCdnChecksPerSecond,
@@ -6166,7 +6170,7 @@ async function gl(s, e) {
6166
6170
  }
6167
6171
  async function Ae(s, e, t) {
6168
6172
  const r = Date.now(), n = [];
6169
- for (; mn(r) < s; ) {
6173
+ for (; vn(r) < s; ) {
6170
6174
  const i = Date.now();
6171
6175
  let o;
6172
6176
  try {
@@ -6174,13 +6178,13 @@ async function Ae(s, e, t) {
6174
6178
  } catch (l) {
6175
6179
  o = { ok: !1, error: l };
6176
6180
  }
6177
- const a = mn(i);
6181
+ const a = vn(i);
6178
6182
  n.push({
6179
6183
  elapsedMs: a,
6180
6184
  response: o
6181
6185
  });
6182
6186
  const c = 1e3 / e - a;
6183
- c > 0 && await En(c);
6187
+ c > 0 && await On(c);
6184
6188
  }
6185
6189
  return n;
6186
6190
  }
@@ -6195,11 +6199,11 @@ async function Xe(s, e, t) {
6195
6199
  beginningOfBody: i.slice(0, e.bodyLimit) + "..."
6196
6200
  };
6197
6201
  }
6198
- function mn(s) {
6202
+ function vn(s) {
6199
6203
  return Date.now() - s;
6200
6204
  }
6201
6205
  function Re(s) {
6202
- const e = s.filter((o) => o.response.ok), t = s.length - e.length, { mean: r, median: n } = ml(s), i = `
6206
+ const e = s.filter((o) => o.response.ok), t = s.length - e.length, { mean: r, median: n } = vl(s), i = `
6203
6207
  total: ${s.length};
6204
6208
  successes: ${e.length};
6205
6209
  errors: ${t};
@@ -6211,7 +6215,7 @@ function Re(s) {
6211
6215
  details: i
6212
6216
  };
6213
6217
  }
6214
- function ml(s) {
6218
+ function vl(s) {
6215
6219
  const e = s.map((n) => n.elapsedMs).sort(), t = e.reduce((n, i) => n + i) / e.length;
6216
6220
  let r;
6217
6221
  if (e.length > 0) {
@@ -6220,15 +6224,15 @@ function ml(s) {
6220
6224
  }
6221
6225
  return { mean: t, median: r };
6222
6226
  }
6223
- async function vl(s, e, t) {
6227
+ async function yl(s, e, t) {
6224
6228
  try {
6225
- const r = await yl(s, e, t);
6229
+ const r = await wl(s, e, t);
6226
6230
  return r !== `Hello, ${t}` ? { status: "failed", message: `Template uploading failed: expected: ${t}, got: ${r}` } : { status: "ok", message: `Template uploading succeeded: ${r}` };
6227
6231
  } catch (r) {
6228
6232
  return { status: "failed", message: `Template uploading failed: error occurred: ${r}` };
6229
6233
  }
6230
6234
  }
6231
- async function yl(s, e, t) {
6235
+ async function wl(s, e, t) {
6232
6236
  var n;
6233
6237
  const r = await Le(
6234
6238
  e,
@@ -6245,15 +6249,15 @@ async function yl(s, e, t) {
6245
6249
  r != null && await De(e, Object.values(r));
6246
6250
  }
6247
6251
  }
6248
- async function wl(s, e, t, r, n, i) {
6252
+ async function Sl(s, e, t, r, n, i) {
6249
6253
  try {
6250
- const o = await Sl(s, e, t, r, n, i);
6254
+ const o = await bl(s, e, t, r, n, i);
6251
6255
  return o.type.name !== "Blob" ? { status: "failed", message: `File uploading failed: ${o.type.name}` } : { status: "ok", message: `File uploading succeeded: ${o.type.name}` };
6252
6256
  } catch (o) {
6253
6257
  return { status: "failed", message: `File uploading failed: error occurred: ${o}` };
6254
6258
  }
6255
6259
  }
6256
- async function Sl(s, e, t, r, n, i) {
6260
+ async function bl(s, e, t, r, n, i) {
6257
6261
  var c;
6258
6262
  const o = await t.getLocalFileHandle(i), a = await Le(
6259
6263
  n,
@@ -6266,9 +6270,9 @@ async function Sl(s, e, t, r, n, i) {
6266
6270
  );
6267
6271
  try {
6268
6272
  const l = await me(n, a.progress);
6269
- if (di(l)) {
6270
- const u = $n.parse(JSON.parse(N((c = l.data) == null ? void 0 : c.toString())));
6271
- pi(e, u.localPath, u.pathSignature) && await In(
6273
+ if (pi(l)) {
6274
+ const u = An.parse(JSON.parse(N((c = l.data) == null ? void 0 : c.toString())));
6275
+ fi(e, u.localPath, u.pathSignature) && await $n(
6272
6276
  s,
6273
6277
  r,
6274
6278
  l,
@@ -6287,15 +6291,15 @@ async function Sl(s, e, t, r, n, i) {
6287
6291
  await De(n, Object.values(a));
6288
6292
  }
6289
6293
  }
6290
- async function bl(s, e, t, r, n, i, o) {
6294
+ async function kl(s, e, t, r, n, i, o) {
6291
6295
  try {
6292
- const a = await kl(s, e, t, r, n, i);
6296
+ const a = await Cl(s, e, t, r, n, i);
6293
6297
  return a !== o ? { status: "failed", message: `File downloading failed: expected: ${o}, got: ${a}` } : { status: "ok", message: `File downloading succeeded: ${a}` };
6294
6298
  } catch (a) {
6295
6299
  return { status: "failed", message: `File downloading failed: error occurred: ${a}` };
6296
6300
  }
6297
6301
  }
6298
- async function kl(s, e, t, r, n, i) {
6302
+ async function Cl(s, e, t, r, n, i) {
6299
6303
  var c;
6300
6304
  const o = await t.getLocalFileHandle(i), a = await Le(
6301
6305
  e,
@@ -6306,11 +6310,11 @@ async function kl(s, e, t, r, n, i) {
6306
6310
  );
6307
6311
  try {
6308
6312
  const l = await me(e, a.progress);
6309
- await In(
6313
+ await $n(
6310
6314
  s,
6311
6315
  r,
6312
6316
  l,
6313
- $n.parse(JSON.parse(N((c = l.data) == null ? void 0 : c.toString()))),
6317
+ An.parse(JSON.parse(N((c = l.data) == null ? void 0 : c.toString()))),
6314
6318
  () => !1,
6315
6319
  {
6316
6320
  nPartsWithThisUploadSpeed: 1,
@@ -6324,22 +6328,22 @@ async function kl(s, e, t, r, n, i) {
6324
6328
  u,
6325
6329
  {},
6326
6330
  {},
6327
- async (d) => await hi(d)
6331
+ async (d) => await gi(d)
6328
6332
  );
6329
6333
  } finally {
6330
6334
  await De(e, Object.values(a));
6331
6335
  }
6332
6336
  }
6333
- async function Cl(s) {
6337
+ async function Rl(s) {
6334
6338
  try {
6335
- const e = await Rl(s);
6339
+ const e = await Pl(s);
6336
6340
  return e !== `Hello from go binary
6337
6341
  ` ? { status: "failed", message: `Software check failed: got: ${e}` } : { status: "ok", message: `Software check succeeded: ${e}` };
6338
6342
  } catch (e) {
6339
6343
  return { status: "failed", message: `Software check failed: error occurred: ${e}` };
6340
6344
  }
6341
6345
  }
6342
- async function Rl(s) {
6346
+ async function Pl(s) {
6343
6347
  var t;
6344
6348
  const e = await Le(
6345
6349
  s,
@@ -6354,16 +6358,16 @@ async function Rl(s) {
6354
6358
  await De(s, Object.values(e));
6355
6359
  }
6356
6360
  }
6357
- async function Pl(s, e) {
6361
+ async function El(s, e) {
6358
6362
  try {
6359
- const t = await El(s, e);
6363
+ const t = await Ol(s, e);
6360
6364
  return t !== `Hello, ${e}!
6361
6365
  ` ? { status: "failed", message: `Python software check failed: got: ${t}` } : { status: "ok", message: `Python software check succeeded: ${t}` };
6362
6366
  } catch (t) {
6363
6367
  return { status: "failed", message: `Python software check failed: error occurred: ${t}` };
6364
6368
  }
6365
6369
  }
6366
- async function El(s, e) {
6370
+ async function Ol(s, e) {
6367
6371
  var r;
6368
6372
  const t = await Le(
6369
6373
  s,
@@ -6378,12 +6382,12 @@ async function El(s, e) {
6378
6382
  await De(s, Object.values(t));
6379
6383
  }
6380
6384
  }
6381
- async function Ol(s, e, t, r) {
6385
+ async function Fl(s, e, t, r) {
6382
6386
  var n, i;
6383
6387
  try {
6384
6388
  const o = await t.getStorageList(), a = {};
6385
6389
  for (const c of o) {
6386
- const l = await Fl(t, c, r.nFilesToCheck, r.minFileSize, r.maxFileSize, r.minLsRequests);
6390
+ const l = await Tl(t, c, r.nFilesToCheck, r.minFileSize, r.maxFileSize, r.minLsRequests);
6387
6391
  if (l.file === void 0) {
6388
6392
  a[c.name] = {
6389
6393
  status: "warn",
@@ -6417,8 +6421,8 @@ async function Ol(s, e, t, r) {
6417
6421
  return { unknown: { status: "failed", message: `Download from every storage failed: error occurred: ${o}` } };
6418
6422
  }
6419
6423
  }
6420
- async function Fl(s, e, t, r, n, i) {
6421
- const o = lo(s, e, "", 0);
6424
+ async function Tl(s, e, t, r, n, i) {
6425
+ const o = uo(s, e, "", 0);
6422
6426
  let a, c = 0, l = 0;
6423
6427
  for await (const { file: u, nLsRequests: d } of o) {
6424
6428
  if (l = Math.max(l, d), c >= t && l > i)
@@ -6429,7 +6433,7 @@ async function Fl(s, e, t, r, n, i) {
6429
6433
  }
6430
6434
  return { file: a, nLsRequests: l, nCheckedFiles: c };
6431
6435
  }
6432
- async function* lo(s, e, t, r) {
6436
+ async function* uo(s, e, t, r) {
6433
6437
  r++;
6434
6438
  const n = await s.listRemoteFilesWithAdditionalInfo(e.handle, t);
6435
6439
  for (const i of n.entries)
@@ -6439,15 +6443,15 @@ async function* lo(s, e, t, r) {
6439
6443
  nLsRequests: r
6440
6444
  };
6441
6445
  else if (i.type === "dir")
6442
- for await (const o of lo(s, e, i.fullPath, r))
6446
+ for await (const o of uo(s, e, i.fullPath, r))
6443
6447
  r = Math.max(o.nLsRequests, r), yield o;
6444
6448
  }
6445
- async function Tl() {
6446
- const s = q.join(Ln.tmpdir(), `check-network-big-temp-${Date.now()}.bin`), e = 20 * 1024 * 1024, t = Xo(e);
6449
+ async function Il() {
6450
+ const s = q.join(Dn.tmpdir(), `check-network-big-temp-${Date.now()}.bin`), e = 20 * 1024 * 1024, t = Yo(e);
6447
6451
  return await at.appendFile(s, t), { filePath: s };
6448
6452
  }
6449
- async function Il() {
6450
- const s = q.join(Ln.tmpdir(), `check-network-temp-${Date.now()}.txt`), e = "Hello, world! " + (/* @__PURE__ */ new Date()).toISOString();
6453
+ async function $l() {
6454
+ const s = q.join(Dn.tmpdir(), `check-network-temp-${Date.now()}.txt`), e = "Hello, world! " + (/* @__PURE__ */ new Date()).toISOString();
6451
6455
  return await at.writeFile(s, e), { filePath: s, fileContent: e };
6452
6456
  }
6453
6457
  async function Le(s, e, t, r, n) {
@@ -6460,21 +6464,21 @@ async function Le(s, e, t, r, n) {
6460
6464
  n
6461
6465
  ), l = {};
6462
6466
  for (const u of n) {
6463
- const d = M(s.clientRoot, u);
6464
- i.createField(d, "Dynamic", c[u]), l[u] = await Mo(d);
6467
+ const d = J(s.clientRoot, u);
6468
+ i.createField(d, "Dynamic", c[u]), l[u] = await Go(d);
6465
6469
  }
6466
6470
  return await i.commit(), l;
6467
6471
  });
6468
6472
  }
6469
6473
  async function me(s, e) {
6470
- return await Go(s, async (t) => {
6474
+ return await qo(s, async (t) => {
6471
6475
  const r = await t.tx.getField(e);
6472
6476
  if (Cr(r.error)) {
6473
6477
  const n = await t.tx.getResourceData(r.error, !0);
6474
6478
  throw new Error(`getFieldValue of "${e.fieldName}" field failed: ${n.data}`);
6475
6479
  }
6476
- if (Me(r.value))
6477
- throw new qo();
6480
+ if (Je(r.value))
6481
+ throw new _o();
6478
6482
  return await t.tx.getResourceData(r.value, !0);
6479
6483
  });
6480
6484
  }
@@ -6485,10 +6489,10 @@ async function De(s, e) {
6485
6489
  await t.commit();
6486
6490
  });
6487
6491
  }
6488
- async function yu(s, e, t, r = {}) {
6492
+ async function wu(s, e, t, r = {}) {
6489
6493
  const n = [];
6490
- Ll.forEach((i) => {
6491
- fi(i).subscribe((a) => {
6494
+ Dl.forEach((i) => {
6495
+ hi(i).subscribe((a) => {
6492
6496
  var u, d;
6493
6497
  const c = (/* @__PURE__ */ new Date()).toISOString(), l = { ...a };
6494
6498
  (u = l == null ? void 0 : l.response) != null && u.headers && (l.response = { ...l.response }, l.response.headers = l.response.headers.slice(), l.response.headers = l.response.headers.map((p) => p.toString())), (d = l == null ? void 0 : l.request) != null && d.body && (l.request = { ...l.request }, l.request.body = "too big"), n.push(
@@ -6511,19 +6515,19 @@ async function yu(s, e, t, r = {}) {
6511
6515
  lsDriver: d,
6512
6516
  httpClient: p,
6513
6517
  ops: f
6514
- } = await $l(s, e, t, r), { filePath: v, fileContent: h } = await Il(), { filePath: y } = await Tl(), E = {
6515
- plPings: await ul(f, o),
6516
- blockRegistryOverviewChecks: await dl(f, p),
6517
- blockGARegistryOverviewChecks: await pl(f, p),
6518
- blockRegistryUiChecks: await fl(f, p),
6519
- blockGARegistryUiChecks: await hl(f, p),
6520
- autoUpdateCdnChecks: await gl(f, p),
6521
- uploadTemplateCheck: await vl(i, a, "Jack"),
6522
- uploadFileCheck: await wl(i, c, d, u, a, y),
6523
- downloadFileCheck: await bl(i, a, d, u, l, v, h),
6524
- softwareCheck: await Cl(a),
6525
- pythonSoftwareCheck: await Pl(a, "Jack"),
6526
- storageToDownloadReport: await Ol(
6518
+ } = await Al(s, e, t, r), { filePath: v, fileContent: h } = await $l(), { filePath: y } = await Il(), E = {
6519
+ plPings: await dl(f, o),
6520
+ blockRegistryOverviewChecks: await pl(f, p),
6521
+ blockGARegistryOverviewChecks: await fl(f, p),
6522
+ blockRegistryUiChecks: await hl(f, p),
6523
+ blockGARegistryUiChecks: await gl(f, p),
6524
+ autoUpdateCdnChecks: await ml(f, p),
6525
+ uploadTemplateCheck: await yl(i, a, "Jack"),
6526
+ uploadFileCheck: await Sl(i, c, d, u, a, y),
6527
+ downloadFileCheck: await kl(i, a, d, u, l, v, h),
6528
+ softwareCheck: await Rl(a),
6529
+ pythonSoftwareCheck: await El(a, "Jack"),
6530
+ storageToDownloadReport: await Fl(
6527
6531
  i,
6528
6532
  a,
6529
6533
  d,
@@ -6536,12 +6540,12 @@ async function yu(s, e, t, r = {}) {
6536
6540
  }
6537
6541
  )
6538
6542
  };
6539
- return Al(E, s, f, n);
6543
+ return Ll(E, s, f, n);
6540
6544
  } catch (i) {
6541
6545
  return `Unhandled error while checking the network: ${i}`;
6542
6546
  }
6543
6547
  }
6544
- async function $l(s, e, t, r = {}) {
6548
+ async function Al(s, e, t, r = {}) {
6545
6549
  const n = {
6546
6550
  pingCheckDurationMs: 1e4,
6547
6551
  pingTimeoutMs: 3e3,
@@ -6564,14 +6568,14 @@ async function $l(s, e, t, r = {}) {
6564
6568
  everyStorageNFilesToCheck: 300,
6565
6569
  everyStorageMinLsRequests: 50,
6566
6570
  ...r
6567
- }, i = _o(s, {
6571
+ }, i = Ko(s, {
6568
6572
  defaultRequestTimeout: n.pingTimeoutMs
6569
6573
  });
6570
6574
  i.alternativeRoot = `check_network_${ge()}`;
6571
- const o = new Cn(i);
6575
+ const o = new Rn(i);
6572
6576
  let a = {};
6573
6577
  e && t && (a = await o.login(e, t));
6574
- const c = await kn.init(s, { authInformation: a }), l = o.ll.httpDispatcher, u = new Sn(), d = new Ar("localSecret"), p = On(u, c, []), f = Fn(c, u), v = await Tn.init(
6578
+ const c = await Cn.init(s, { authInformation: a }), l = o.ll.httpDispatcher, u = new bn(), d = new Ar("localSecret"), p = Fn(u, c, []), f = Tn(c, u), v = await In.init(
6575
6579
  u,
6576
6580
  c,
6577
6581
  d,
@@ -6594,7 +6598,7 @@ async function $l(s, e, t, r = {}) {
6594
6598
  }
6595
6599
  };
6596
6600
  }
6597
- function Al(s, e, t, r) {
6601
+ function Ll(s, e, t, r) {
6598
6602
  const n = s.plPings.filter((y) => y.response.ok), i = s.plPings.filter((y) => !y.response.ok), o = [
6599
6603
  ...new Set(n.map((y) => JSON.stringify(y.response.value)))
6600
6604
  ], a = (y) => y ? "OK" : "FAILED", c = (y) => y.status === "ok" ? "OK" : y.status === "warn" ? "WARN" : "FAILED", l = Re(s.plPings), u = Re(s.blockRegistryOverviewChecks), d = Re(s.blockGARegistryOverviewChecks), p = Re(s.blockRegistryUiChecks), f = Re(s.blockGARegistryUiChecks), v = Re(s.autoUpdateCdnChecks), h = Object.entries(s.storageToDownloadReport).map(([y, E]) => `${c(E)} ${y} storage check`).join(`
@@ -6666,7 +6670,7 @@ ${r.join(`
6666
6670
  `)}
6667
6671
  `;
6668
6672
  }
6669
- const Ll = [
6673
+ const Dl = [
6670
6674
  "undici:request:create",
6671
6675
  // When a new request is created
6672
6676
  "undici:request:bodySent",
@@ -6705,33 +6709,33 @@ const Ll = [
6705
6709
  // When a dispatcher retries a request
6706
6710
  ];
6707
6711
  export {
6708
- uu as BlockPackRegistry,
6709
- du as CentralBlockRegistry,
6710
- so as DefaultDriverKitOpsPaths,
6711
- ro as DefaultDriverKitOpsSettings,
6712
- Pc as DefaultMiddleLayerOpsPaths,
6713
- Rc as DefaultMiddleLayerOpsSettings,
6714
- Gn as FrontendFromFolderResourceType,
6715
- Mn as FrontendFromUrlResourceType,
6716
- co as MiddleLayer,
6712
+ du as BlockPackRegistry,
6713
+ pu as CentralBlockRegistry,
6714
+ no as DefaultDriverKitOpsPaths,
6715
+ so as DefaultDriverKitOpsSettings,
6716
+ Ec as DefaultMiddleLayerOpsPaths,
6717
+ Pc as DefaultMiddleLayerOpsSettings,
6718
+ qn as FrontendFromFolderResourceType,
6719
+ Gn as FrontendFromUrlResourceType,
6720
+ lo as MiddleLayer,
6717
6721
  Vr as Project,
6718
- qi as TengoTemplateGet,
6719
- _i as TengoTemplateGetRegistry,
6720
- Hi as TengoTemplateGetTemplate,
6721
- Ki as TengoTemplateGetTemplateURI,
6722
- hu as TengoTemplatePack,
6723
- gu as TengoTemplatePackConvert,
6724
- vu as TengoTemplatePackConvertTemplate,
6725
- mu as TengoTemplatePackConvertTemplatePack,
6726
- fu as V1CentralDevSnapshotRegistry,
6727
- pu as V1CentralRegistry,
6728
- ki as V2RegistryProvider,
6729
- yu as checkNetwork,
6722
+ _i as TengoTemplateGet,
6723
+ Ki as TengoTemplateGetRegistry,
6724
+ Wi as TengoTemplateGetTemplate,
6725
+ Hi as TengoTemplateGetTemplateURI,
6726
+ gu as TengoTemplatePack,
6727
+ mu as TengoTemplatePackConvert,
6728
+ yu as TengoTemplatePackConvertTemplate,
6729
+ vu as TengoTemplatePackConvertTemplatePack,
6730
+ hu as V1CentralDevSnapshotRegistry,
6731
+ fu as V1CentralRegistry,
6732
+ Ci as V2RegistryProvider,
6733
+ wu as checkNetwork,
6730
6734
  jr as createRenderTemplate,
6731
- Nn as getDevV1PacketMtime,
6735
+ Bn as getDevV1PacketMtime,
6732
6736
  Nr as getDevV2PacketMtime,
6733
- cl as initDriverKit,
6734
- $l as initNetworkCheck,
6737
+ ll as initDriverKit,
6738
+ Al as initNetworkCheck,
6735
6739
  ht as loadTemplate,
6736
6740
  Jn as prepareTemplateSpec
6737
6741
  };