@brightsideoy/kama 0.1.0-alpha.44 → 0.1.0-alpha.45

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.js CHANGED
@@ -143,56 +143,56 @@ function j(e) {
143
143
  var ee = (e) => (O(e) || A(e)) && !!e.anchor, M = Symbol("break visit"), te = Symbol("skip children"), N = Symbol("remove node");
144
144
  function P(e, t) {
145
145
  let n = ie(t);
146
- T(e) ? ne(null, e.contents, n, Object.freeze([e])) === N && (e.contents = null) : ne(null, e, n, Object.freeze([]));
146
+ T(e) ? F(null, e.contents, n, Object.freeze([e])) === N && (e.contents = null) : F(null, e, n, Object.freeze([]));
147
147
  }
148
148
  P.BREAK = M, P.SKIP = te, P.REMOVE = N;
149
- function ne(e, t, n, r) {
150
- let i = I(e, t, n, r);
151
- if (j(i) || D(i)) return ae(e, r, i), ne(e, i, n, r);
149
+ function F(e, t, n, r) {
150
+ let i = ae(e, t, n, r);
151
+ if (j(i) || D(i)) return I(e, r, i), F(e, i, n, r);
152
152
  if (typeof i != "symbol") {
153
153
  if (A(t)) {
154
154
  r = Object.freeze(r.concat(t));
155
155
  for (let e = 0; e < t.items.length; ++e) {
156
- let i = ne(e, t.items[e], n, r);
156
+ let i = F(e, t.items[e], n, r);
157
157
  if (typeof i == "number") e = i - 1;
158
158
  else if (i === M) return M;
159
159
  else i === N && (t.items.splice(e, 1), --e);
160
160
  }
161
161
  } else if (D(t)) {
162
162
  r = Object.freeze(r.concat(t));
163
- let e = ne("key", t.key, n, r);
163
+ let e = F("key", t.key, n, r);
164
164
  if (e === M) return M;
165
165
  e === N && (t.key = null);
166
- let i = ne("value", t.value, n, r);
166
+ let i = F("value", t.value, n, r);
167
167
  if (i === M) return M;
168
168
  i === N && (t.value = null);
169
169
  }
170
170
  }
171
171
  return i;
172
172
  }
173
- async function re(e, t) {
173
+ async function ne(e, t) {
174
174
  let n = ie(t);
175
- T(e) ? await F(null, e.contents, n, Object.freeze([e])) === N && (e.contents = null) : await F(null, e, n, Object.freeze([]));
175
+ T(e) ? await re(null, e.contents, n, Object.freeze([e])) === N && (e.contents = null) : await re(null, e, n, Object.freeze([]));
176
176
  }
177
- re.BREAK = M, re.SKIP = te, re.REMOVE = N;
178
- async function F(e, t, n, r) {
179
- let i = await I(e, t, n, r);
180
- if (j(i) || D(i)) return ae(e, r, i), F(e, i, n, r);
177
+ ne.BREAK = M, ne.SKIP = te, ne.REMOVE = N;
178
+ async function re(e, t, n, r) {
179
+ let i = await ae(e, t, n, r);
180
+ if (j(i) || D(i)) return I(e, r, i), re(e, i, n, r);
181
181
  if (typeof i != "symbol") {
182
182
  if (A(t)) {
183
183
  r = Object.freeze(r.concat(t));
184
184
  for (let e = 0; e < t.items.length; ++e) {
185
- let i = await F(e, t.items[e], n, r);
185
+ let i = await re(e, t.items[e], n, r);
186
186
  if (typeof i == "number") e = i - 1;
187
187
  else if (i === M) return M;
188
188
  else i === N && (t.items.splice(e, 1), --e);
189
189
  }
190
190
  } else if (D(t)) {
191
191
  r = Object.freeze(r.concat(t));
192
- let e = await F("key", t.key, n, r);
192
+ let e = await re("key", t.key, n, r);
193
193
  if (e === M) return M;
194
194
  e === N && (t.key = null);
195
- let i = await F("value", t.value, n, r);
195
+ let i = await re("value", t.value, n, r);
196
196
  if (i === M) return M;
197
197
  i === N && (t.value = null);
198
198
  }
@@ -214,7 +214,7 @@ function ie(e) {
214
214
  Seq: e.Collection
215
215
  }, e) : e;
216
216
  }
217
- function I(e, t, n, r) {
217
+ function ae(e, t, n, r) {
218
218
  if (typeof n == "function") return n(e, t, r);
219
219
  if (E(t)) return n.Map?.(e, t, r);
220
220
  if (k(t)) return n.Seq?.(e, t, r);
@@ -222,7 +222,7 @@ function I(e, t, n, r) {
222
222
  if (O(t)) return n.Scalar?.(e, t, r);
223
223
  if (w(t)) return n.Alias?.(e, t, r);
224
224
  }
225
- function ae(e, t, n) {
225
+ function I(e, t, n) {
226
226
  let r = t[t.length - 1];
227
227
  if (A(r)) r.items[e] = n;
228
228
  else if (D(r)) e === "key" ? r.key = n : r.value = n;
@@ -234,14 +234,14 @@ function ae(e, t, n) {
234
234
  }
235
235
  //#endregion
236
236
  //#region node_modules/yaml/browser/dist/doc/directives.js
237
- var L = {
237
+ var oe = {
238
238
  "!": "%21",
239
239
  ",": "%2C",
240
240
  "[": "%5B",
241
241
  "]": "%5D",
242
242
  "{": "%7B",
243
243
  "}": "%7D"
244
- }, oe = (e) => e.replace(/[!,[\]{}]/g, (e) => L[e]), se = class e {
244
+ }, L = (e) => e.replace(/[!,[\]{}]/g, (e) => oe[e]), R = class e {
245
245
  constructor(t, n) {
246
246
  this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, e.defaultYaml, t), this.tags = Object.assign({}, e.defaultTags, n);
247
247
  }
@@ -304,7 +304,7 @@ var L = {
304
304
  return n === "!" ? e : (t(`Could not resolve tag: ${e}`), null);
305
305
  }
306
306
  tagString(e) {
307
- for (let [t, n] of Object.entries(this.tags)) if (e.startsWith(n)) return t + oe(e.substring(n.length));
307
+ for (let [t, n] of Object.entries(this.tags)) if (e.startsWith(n)) return t + L(e.substring(n.length));
308
308
  return e[0] === "!" ? e : `!<${e}>`;
309
309
  }
310
310
  toString(e) {
@@ -319,37 +319,37 @@ var L = {
319
319
  return t.join("\n");
320
320
  }
321
321
  };
322
- se.defaultYaml = {
322
+ R.defaultYaml = {
323
323
  explicit: !1,
324
324
  version: "1.2"
325
- }, se.defaultTags = { "!!": "tag:yaml.org,2002:" };
325
+ }, R.defaultTags = { "!!": "tag:yaml.org,2002:" };
326
326
  //#endregion
327
327
  //#region node_modules/yaml/browser/dist/doc/anchors.js
328
- function ce(e) {
328
+ function se(e) {
329
329
  if (/[\x00-\x19\s,[\]{}]/.test(e)) {
330
330
  let t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;
331
331
  throw Error(t);
332
332
  }
333
333
  return !0;
334
334
  }
335
- function le(e) {
335
+ function ce(e) {
336
336
  let t = /* @__PURE__ */ new Set();
337
337
  return P(e, { Value(e, n) {
338
338
  n.anchor && t.add(n.anchor);
339
339
  } }), t;
340
340
  }
341
- function ue(e, t) {
341
+ function le(e, t) {
342
342
  for (let n = 1;; ++n) {
343
343
  let r = `${e}${n}`;
344
344
  if (!t.has(r)) return r;
345
345
  }
346
346
  }
347
- function de(e, t) {
347
+ function ue(e, t) {
348
348
  let n = [], r = /* @__PURE__ */ new Map(), i = null;
349
349
  return {
350
350
  onAnchor: (r) => {
351
- n.push(r), i ??= le(e);
352
- let a = ue(t, i);
351
+ n.push(r), i ??= ce(e);
352
+ let a = le(t, i);
353
353
  return i.add(a), a;
354
354
  },
355
355
  setAnchors: () => {
@@ -367,22 +367,22 @@ function de(e, t) {
367
367
  }
368
368
  //#endregion
369
369
  //#region node_modules/yaml/browser/dist/doc/applyReviver.js
370
- function fe(e, t, n, r) {
370
+ function de(e, t, n, r) {
371
371
  if (r && typeof r == "object") {
372
372
  if (Array.isArray(r)) for (let t = 0, n = r.length; t < n; ++t) {
373
- let n = r[t], i = fe(e, r, String(t), n);
373
+ let n = r[t], i = de(e, r, String(t), n);
374
374
  i === void 0 ? delete r[t] : i !== n && (r[t] = i);
375
375
  }
376
376
  else if (r instanceof Map) for (let t of Array.from(r.keys())) {
377
- let n = r.get(t), i = fe(e, r, t, n);
377
+ let n = r.get(t), i = de(e, r, t, n);
378
378
  i === void 0 ? r.delete(t) : i !== n && r.set(t, i);
379
379
  }
380
380
  else if (r instanceof Set) for (let t of Array.from(r)) {
381
- let n = fe(e, r, t, t);
381
+ let n = de(e, r, t, t);
382
382
  n === void 0 ? r.delete(t) : n !== t && (r.delete(t), r.add(n));
383
383
  }
384
384
  else for (let [t, n] of Object.entries(r)) {
385
- let i = fe(e, r, t, n);
385
+ let i = de(e, r, t, n);
386
386
  i === void 0 ? delete r[t] : i !== n && (r[t] = i);
387
387
  }
388
388
  }
@@ -390,8 +390,8 @@ function fe(e, t, n, r) {
390
390
  }
391
391
  //#endregion
392
392
  //#region node_modules/yaml/browser/dist/nodes/toJS.js
393
- function R(e, t, n) {
394
- if (Array.isArray(e)) return e.map((e, t) => R(e, String(t), n));
393
+ function z(e, t, n) {
394
+ if (Array.isArray(e)) return e.map((e, t) => z(e, String(t), n));
395
395
  if (e && typeof e.toJSON == "function") {
396
396
  if (!n || !ee(e)) return e.toJSON(t, n);
397
397
  let r = {
@@ -409,7 +409,7 @@ function R(e, t, n) {
409
409
  }
410
410
  //#endregion
411
411
  //#region node_modules/yaml/browser/dist/nodes/Node.js
412
- var pe = class {
412
+ var fe = class {
413
413
  constructor(e) {
414
414
  Object.defineProperty(this, C, { value: e });
415
415
  }
@@ -426,11 +426,11 @@ var pe = class {
426
426
  mapAsMap: t === !0,
427
427
  mapKeyWarned: !1,
428
428
  maxAliasCount: typeof n == "number" ? n : 100
429
- }, o = R(this, "", a);
429
+ }, o = z(this, "", a);
430
430
  if (typeof r == "function") for (let { count: e, res: t } of a.anchors.values()) r(t, e);
431
- return typeof i == "function" ? fe(i, { "": o }, "", o) : o;
431
+ return typeof i == "function" ? de(i, { "": o }, "", o) : o;
432
432
  }
433
- }, me = class extends pe {
433
+ }, pe = class extends fe {
434
434
  constructor(e) {
435
435
  super(_), this.source = e, Object.defineProperty(this, "tag", { set() {
436
436
  throw Error("Alias nodes cannot have tags");
@@ -458,14 +458,14 @@ var pe = class {
458
458
  }
459
459
  let o = n.get(a);
460
460
  /* istanbul ignore if */
461
- if (o ||= (R(a, null, t), n.get(a)), o?.res === void 0) throw ReferenceError("This should not happen: Alias anchor was not resolved?");
462
- if (i >= 0 && (o.count += 1, o.aliasCount === 0 && (o.aliasCount = he(r, a, n)), o.count * o.aliasCount > i)) throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");
461
+ if (o ||= (z(a, null, t), n.get(a)), o?.res === void 0) throw ReferenceError("This should not happen: Alias anchor was not resolved?");
462
+ if (i >= 0 && (o.count += 1, o.aliasCount === 0 && (o.aliasCount = me(r, a, n)), o.count * o.aliasCount > i)) throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");
463
463
  return o.res;
464
464
  }
465
465
  toString(e, t, n) {
466
466
  let r = `*${this.source}`;
467
467
  if (e) {
468
- if (ce(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
468
+ if (se(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
469
469
  let e = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
470
470
  throw Error(e);
471
471
  }
@@ -474,7 +474,7 @@ var pe = class {
474
474
  return r;
475
475
  }
476
476
  };
477
- function he(e, t, n) {
477
+ function me(e, t, n) {
478
478
  if (w(t)) {
479
479
  let r = t.resolve(e), i = n && r && n.get(r);
480
480
  return i ? i.count * i.aliasCount : 0;
@@ -482,35 +482,35 @@ function he(e, t, n) {
482
482
  if (A(t)) {
483
483
  let r = 0;
484
484
  for (let i of t.items) {
485
- let t = he(e, i, n);
485
+ let t = me(e, i, n);
486
486
  t > r && (r = t);
487
487
  }
488
488
  return r;
489
489
  }
490
490
  if (D(t)) {
491
- let r = he(e, t.key, n), i = he(e, t.value, n);
491
+ let r = me(e, t.key, n), i = me(e, t.value, n);
492
492
  return Math.max(r, i);
493
493
  }
494
494
  return 1;
495
495
  }
496
496
  //#endregion
497
497
  //#region node_modules/yaml/browser/dist/nodes/Scalar.js
498
- var ge = (e) => !e || typeof e != "function" && typeof e != "object", z = class extends pe {
498
+ var he = (e) => !e || typeof e != "function" && typeof e != "object", B = class extends fe {
499
499
  constructor(e) {
500
500
  super(x), this.value = e;
501
501
  }
502
502
  toJSON(e, t) {
503
- return t?.keep ? this.value : R(this.value, e, t);
503
+ return t?.keep ? this.value : z(this.value, e, t);
504
504
  }
505
505
  toString() {
506
506
  return String(this.value);
507
507
  }
508
508
  };
509
- z.BLOCK_FOLDED = "BLOCK_FOLDED", z.BLOCK_LITERAL = "BLOCK_LITERAL", z.PLAIN = "PLAIN", z.QUOTE_DOUBLE = "QUOTE_DOUBLE", z.QUOTE_SINGLE = "QUOTE_SINGLE";
509
+ B.BLOCK_FOLDED = "BLOCK_FOLDED", B.BLOCK_LITERAL = "BLOCK_LITERAL", B.PLAIN = "PLAIN", B.QUOTE_DOUBLE = "QUOTE_DOUBLE", B.QUOTE_SINGLE = "QUOTE_SINGLE";
510
510
  //#endregion
511
511
  //#region node_modules/yaml/browser/dist/doc/createNode.js
512
- var _e = "tag:yaml.org,2002:";
513
- function ve(e, t, n) {
512
+ var ge = "tag:yaml.org,2002:";
513
+ function _e(e, t, n) {
514
514
  if (t) {
515
515
  let e = n.filter((e) => e.tag === t), r = e.find((e) => !e.format) ?? e[0];
516
516
  if (!r) throw Error(`Tag ${t} not found`);
@@ -518,7 +518,7 @@ function ve(e, t, n) {
518
518
  }
519
519
  return n.find((t) => t.identify?.(e) && !t.format);
520
520
  }
521
- function ye(e, t, n) {
521
+ function ve(e, t, n) {
522
522
  if (T(e) && (e = e.contents), j(e)) return e;
523
523
  if (D(e)) {
524
524
  let t = n.schema[y].createNode?.(n.schema, null, n);
@@ -527,28 +527,28 @@ function ye(e, t, n) {
527
527
  (e instanceof String || e instanceof Number || e instanceof Boolean || typeof BigInt < "u" && e instanceof BigInt) && (e = e.valueOf());
528
528
  let { aliasDuplicateObjects: r, onAnchor: i, onTagObj: a, schema: o, sourceObjects: s } = n, c;
529
529
  if (r && e && typeof e == "object") {
530
- if (c = s.get(e), c) return c.anchor ?? (c.anchor = i(e)), new me(c.anchor);
530
+ if (c = s.get(e), c) return c.anchor ?? (c.anchor = i(e)), new pe(c.anchor);
531
531
  c = {
532
532
  anchor: null,
533
533
  node: null
534
534
  }, s.set(e, c);
535
535
  }
536
- t?.startsWith("!!") && (t = _e + t.slice(2));
537
- let l = ve(e, t, o.tags);
536
+ t?.startsWith("!!") && (t = ge + t.slice(2));
537
+ let l = _e(e, t, o.tags);
538
538
  if (!l) {
539
539
  if (e && typeof e.toJSON == "function" && (e = e.toJSON()), !e || typeof e != "object") {
540
- let t = new z(e);
540
+ let t = new B(e);
541
541
  return c && (c.node = t), t;
542
542
  }
543
543
  l = e instanceof Map ? o[y] : Symbol.iterator in Object(e) ? o[S] : o[y];
544
544
  }
545
545
  a && (a(l), delete n.onTagObj);
546
- let u = l?.createNode ? l.createNode(n.schema, e, n) : typeof l?.nodeClass?.from == "function" ? l.nodeClass.from(n.schema, e, n) : new z(e);
546
+ let u = l?.createNode ? l.createNode(n.schema, e, n) : typeof l?.nodeClass?.from == "function" ? l.nodeClass.from(n.schema, e, n) : new B(e);
547
547
  return t ? u.tag = t : l.default || (u.tag = l.tag), c && (c.node = u), u;
548
548
  }
549
549
  //#endregion
550
550
  //#region node_modules/yaml/browser/dist/nodes/Collection.js
551
- function be(e, t, n) {
551
+ function ye(e, t, n) {
552
552
  let r = n;
553
553
  for (let e = t.length - 1; e >= 0; --e) {
554
554
  let n = t[e];
@@ -557,7 +557,7 @@ function be(e, t, n) {
557
557
  e[n] = r, r = e;
558
558
  } else r = /* @__PURE__ */ new Map([[n, r]]);
559
559
  }
560
- return ye(r, void 0, {
560
+ return ve(r, void 0, {
561
561
  aliasDuplicateObjects: !1,
562
562
  keepUndefined: !1,
563
563
  onAnchor: () => {
@@ -567,7 +567,7 @@ function be(e, t, n) {
567
567
  sourceObjects: /* @__PURE__ */ new Map()
568
568
  });
569
569
  }
570
- var xe = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done, Se = class extends pe {
570
+ var be = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done, xe = class extends fe {
571
571
  constructor(e, t) {
572
572
  super(e), Object.defineProperty(this, "schema", {
573
573
  value: t,
@@ -581,11 +581,11 @@ var xe = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next
581
581
  return e && (t.schema = e), t.items = t.items.map((t) => j(t) || D(t) ? t.clone(e) : t), this.range && (t.range = this.range.slice()), t;
582
582
  }
583
583
  addIn(e, t) {
584
- if (xe(e)) this.add(t);
584
+ if (be(e)) this.add(t);
585
585
  else {
586
586
  let [n, ...r] = e, i = this.get(n, !0);
587
587
  if (A(i)) i.addIn(r, t);
588
- else if (i === void 0 && this.schema) this.set(n, be(this.schema, r, t));
588
+ else if (i === void 0 && this.schema) this.set(n, ye(this.schema, r, t));
589
589
  else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
590
590
  }
591
591
  }
@@ -619,16 +619,16 @@ var xe = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next
619
619
  else {
620
620
  let e = this.get(n, !0);
621
621
  if (A(e)) e.setIn(r, t);
622
- else if (e === void 0 && this.schema) this.set(n, be(this.schema, r, t));
622
+ else if (e === void 0 && this.schema) this.set(n, ye(this.schema, r, t));
623
623
  else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
624
624
  }
625
625
  }
626
- }, Ce = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
627
- function B(e, t) {
626
+ }, Se = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
627
+ function V(e, t) {
628
628
  return /^\n+$/.test(e) ? e.substring(1) : t ? e.replace(/^(?! *$)/gm, t) : e;
629
629
  }
630
- var we = (e, t, n) => e.endsWith("\n") ? B(n, t) : n.includes("\n") ? "\n" + B(n, t) : (e.endsWith(" ") ? "" : " ") + n, Te = "flow", Ee = "block", De = "quoted";
631
- function Oe(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentWidth: a = 20, onFold: o, onOverflow: s } = {}) {
630
+ var Ce = (e, t, n) => e.endsWith("\n") ? V(n, t) : n.includes("\n") ? "\n" + V(n, t) : (e.endsWith(" ") ? "" : " ") + n, we = "flow", Te = "block", Ee = "quoted";
631
+ function De(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentWidth: a = 20, onFold: o, onOverflow: s } = {}) {
632
632
  if (!i || i < 0) return e;
633
633
  i < a && (a = 0);
634
634
  let c = Math.max(1 + a, 1 + i - t.length);
@@ -636,7 +636,7 @@ function Oe(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
636
636
  let l = [], u = {}, d = i - t.length;
637
637
  typeof r == "number" && (r > i - Math.max(2, a) ? l.push(0) : d = i - r);
638
638
  let f, p, m = !1, h = -1, g = -1, _ = -1;
639
- n === "block" && (h = ke(e, h, t.length), h !== -1 && (d = h + c));
639
+ n === "block" && (h = Oe(e, h, t.length), h !== -1 && (d = h + c));
640
640
  for (let r; r = e[h += 1];) {
641
641
  if (n === "quoted" && r === "\\") {
642
642
  switch (g = h, e[h + 1]) {
@@ -653,7 +653,7 @@ function Oe(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
653
653
  }
654
654
  _ = h;
655
655
  }
656
- if (r === "\n") n === "block" && (h = ke(e, h, t.length)), d = h + t.length + c, f = void 0;
656
+ if (r === "\n") n === "block" && (h = Oe(e, h, t.length)), d = h + t.length + c, f = void 0;
657
657
  else {
658
658
  if (r === " " && p && p !== " " && p !== "\n" && p !== " ") {
659
659
  let t = e[h + 1];
@@ -680,7 +680,7 @@ function Oe(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
680
680
  }
681
681
  return v;
682
682
  }
683
- function ke(e, t, n) {
683
+ function Oe(e, t, n) {
684
684
  let r = t, i = t + 1, a = e[i];
685
685
  for (; a === " " || a === " ";) if (t < i + n) a = e[++t];
686
686
  else {
@@ -693,12 +693,12 @@ function ke(e, t, n) {
693
693
  }
694
694
  //#endregion
695
695
  //#region node_modules/yaml/browser/dist/stringify/stringifyString.js
696
- var Ae = (e, t) => ({
696
+ var ke = (e, t) => ({
697
697
  indentAtStart: t ? e.indent.length : e.indentAtStart,
698
698
  lineWidth: e.options.lineWidth,
699
699
  minContentWidth: e.options.minContentWidth
700
- }), je = (e) => /^(%|---|\.\.\.)/m.test(e);
701
- function Me(e, t, n) {
700
+ }), Ae = (e) => /^(%|---|\.\.\.)/m.test(e);
701
+ function je(e, t, n) {
702
702
  if (!t || t < 0) return !1;
703
703
  let r = t - n, i = e.length;
704
704
  if (i <= r) return !1;
@@ -708,10 +708,10 @@ function Me(e, t, n) {
708
708
  }
709
709
  return !0;
710
710
  }
711
- function Ne(e, t) {
711
+ function Me(e, t) {
712
712
  let n = JSON.stringify(e);
713
713
  if (t.options.doubleQuotedAsJSON) return n;
714
- let { implicitKey: r } = t, i = t.options.doubleQuotedMinMultiLineLength, a = t.indent || (je(e) ? " " : ""), o = "", s = 0;
714
+ let { implicitKey: r } = t, i = t.options.doubleQuotedMinMultiLineLength, a = t.indent || (Ae(e) ? " " : ""), o = "", s = 0;
715
715
  for (let e = 0, t = n[e]; t; t = n[++e]) if (t === " " && n[e + 1] === "\\" && n[e + 2] === "n" && (o += n.slice(s, e) + "\\ ", e += 1, s = e, t = "\\"), t === "\\") switch (n[e + 1]) {
716
716
  case "u":
717
717
  {
@@ -756,32 +756,32 @@ function Ne(e, t) {
756
756
  break;
757
757
  default: e += 1;
758
758
  }
759
- return o = s ? o + n.slice(s) : n, r ? o : Oe(o, a, De, Ae(t, !1));
759
+ return o = s ? o + n.slice(s) : n, r ? o : De(o, a, Ee, ke(t, !1));
760
760
  }
761
- function Pe(e, t) {
762
- if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return Ne(e, t);
763
- let n = t.indent || (je(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${n}`) + "'";
764
- return t.implicitKey ? r : Oe(r, n, Te, Ae(t, !1));
761
+ function Ne(e, t) {
762
+ if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return Me(e, t);
763
+ let n = t.indent || (Ae(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${n}`) + "'";
764
+ return t.implicitKey ? r : De(r, n, we, ke(t, !1));
765
765
  }
766
- function Fe(e, t) {
766
+ function Pe(e, t) {
767
767
  let { singleQuote: n } = t.options, r;
768
- if (n === !1) r = Ne;
768
+ if (n === !1) r = Me;
769
769
  else {
770
770
  let t = e.includes("\""), i = e.includes("'");
771
- r = t && !i ? Pe : i && !t ? Ne : n ? Pe : Ne;
771
+ r = t && !i ? Ne : i && !t ? Me : n ? Ne : Me;
772
772
  }
773
773
  return r(e, t);
774
774
  }
775
- var Ie;
775
+ var Fe;
776
776
  try {
777
- Ie = /* @__PURE__ */ RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
777
+ Fe = /* @__PURE__ */ RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
778
778
  } catch {
779
- Ie = /\n+(?!\n|$)/g;
779
+ Fe = /\n+(?!\n|$)/g;
780
780
  }
781
- function Le({ comment: e, type: t, value: n }, r, i, a) {
781
+ function Ie({ comment: e, type: t, value: n }, r, i, a) {
782
782
  let { blockQuote: o, commentString: s, lineWidth: c } = r.options;
783
- if (!o || /\n[\t ]+$/.test(n)) return Fe(n, r);
784
- let l = r.indent || (r.forceBlockIndent || je(n) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || t === z.BLOCK_FOLDED ? !1 : t === z.BLOCK_LITERAL || !Me(n, c, l.length);
783
+ if (!o || /\n[\t ]+$/.test(n)) return Pe(n, r);
784
+ let l = r.indent || (r.forceBlockIndent || Ae(n) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || t === B.BLOCK_FOLDED ? !1 : t === B.BLOCK_LITERAL || !je(n, c, l.length);
785
785
  if (!n) return u ? "|\n" : ">\n";
786
786
  let d, f;
787
787
  for (f = n.length; f > 0; --f) {
@@ -789,7 +789,7 @@ function Le({ comment: e, type: t, value: n }, r, i, a) {
789
789
  if (e !== "\n" && e !== " " && e !== " ") break;
790
790
  }
791
791
  let p = n.substring(f), m = p.indexOf("\n");
792
- m === -1 ? d = "-" : n === p || m !== p.length - 1 ? (d = "+", a && a()) : d = "", p &&= (n = n.slice(0, -p.length), p[p.length - 1] === "\n" && (p = p.slice(0, -1)), p.replace(Ie, `$&${l}`));
792
+ m === -1 ? d = "-" : n === p || m !== p.length - 1 ? (d = "+", a && a()) : d = "", p &&= (n = n.slice(0, -p.length), p[p.length - 1] === "\n" && (p = p.slice(0, -1)), p.replace(Fe, `$&${l}`));
793
793
  let h = !1, g, _ = -1;
794
794
  for (g = 0; g < n.length; ++g) {
795
795
  let e = n[g];
@@ -801,41 +801,41 @@ function Le({ comment: e, type: t, value: n }, r, i, a) {
801
801
  v &&= (n = n.substring(v.length), v.replace(/\n+/g, `$&${l}`));
802
802
  let y = (h ? l ? "2" : "1" : "") + d;
803
803
  if (e && (y += " " + s(e.replace(/ ?[\r\n]+/g, " ")), i && i()), !u) {
804
- let e = n.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${l}`), i = !1, a = Ae(r, !0);
805
- o !== "folded" && t !== z.BLOCK_FOLDED && (a.onOverflow = () => {
804
+ let e = n.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${l}`), i = !1, a = ke(r, !0);
805
+ o !== "folded" && t !== B.BLOCK_FOLDED && (a.onOverflow = () => {
806
806
  i = !0;
807
807
  });
808
- let s = Oe(`${v}${e}${p}`, l, Ee, a);
808
+ let s = De(`${v}${e}${p}`, l, Te, a);
809
809
  if (!i) return `>${y}\n${l}${s}`;
810
810
  }
811
811
  return n = n.replace(/\n+/g, `$&${l}`), `|${y}\n${l}${v}${n}${p}`;
812
812
  }
813
- function Re(e, t, n, r) {
813
+ function Le(e, t, n, r) {
814
814
  let { type: i, value: a } = e, { actualString: o, implicitKey: s, indent: c, indentStep: l, inFlow: u } = t;
815
- if (s && a.includes("\n") || u && /[[\]{},]/.test(a)) return Fe(a, t);
816
- if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ? Fe(a, t) : Le(e, t, n, r);
817
- if (!s && !u && i !== z.PLAIN && a.includes("\n")) return Le(e, t, n, r);
818
- if (je(a)) {
819
- if (c === "") return t.forceBlockIndent = !0, Le(e, t, n, r);
820
- if (s && c === l) return Fe(a, t);
815
+ if (s && a.includes("\n") || u && /[[\]{},]/.test(a)) return Pe(a, t);
816
+ if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ? Pe(a, t) : Ie(e, t, n, r);
817
+ if (!s && !u && i !== B.PLAIN && a.includes("\n")) return Ie(e, t, n, r);
818
+ if (Ae(a)) {
819
+ if (c === "") return t.forceBlockIndent = !0, Ie(e, t, n, r);
820
+ if (s && c === l) return Pe(a, t);
821
821
  }
822
822
  let d = a.replace(/\n+/g, `$&\n${c}`);
823
823
  if (o) {
824
824
  let e = (e) => e.default && e.tag !== "tag:yaml.org,2002:str" && e.test?.test(d), { compat: n, tags: r } = t.doc.schema;
825
- if (r.some(e) || n?.some(e)) return Fe(a, t);
825
+ if (r.some(e) || n?.some(e)) return Pe(a, t);
826
826
  }
827
- return s ? d : Oe(d, c, Te, Ae(t, !1));
827
+ return s ? d : De(d, c, we, ke(t, !1));
828
828
  }
829
- function ze(e, t, n, r) {
829
+ function Re(e, t, n, r) {
830
830
  let { implicitKey: i, inFlow: a } = t, o = typeof e.value == "string" ? e : Object.assign({}, e, { value: String(e.value) }), { type: s } = e;
831
- s !== z.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (s = z.QUOTE_DOUBLE);
831
+ s !== B.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (s = B.QUOTE_DOUBLE);
832
832
  let c = (e) => {
833
833
  switch (e) {
834
- case z.BLOCK_FOLDED:
835
- case z.BLOCK_LITERAL: return i || a ? Fe(o.value, t) : Le(o, t, n, r);
836
- case z.QUOTE_DOUBLE: return Ne(o.value, t);
837
- case z.QUOTE_SINGLE: return Pe(o.value, t);
838
- case z.PLAIN: return Re(o, t, n, r);
834
+ case B.BLOCK_FOLDED:
835
+ case B.BLOCK_LITERAL: return i || a ? Pe(o.value, t) : Ie(o, t, n, r);
836
+ case B.QUOTE_DOUBLE: return Me(o.value, t);
837
+ case B.QUOTE_SINGLE: return Ne(o.value, t);
838
+ case B.PLAIN: return Le(o, t, n, r);
839
839
  default: return null;
840
840
  }
841
841
  }, l = c(s);
@@ -847,10 +847,10 @@ function ze(e, t, n, r) {
847
847
  }
848
848
  //#endregion
849
849
  //#region node_modules/yaml/browser/dist/stringify/stringify.js
850
- function Be(e, t) {
850
+ function ze(e, t) {
851
851
  let n = Object.assign({
852
852
  blockQuote: !0,
853
- commentString: Ce,
853
+ commentString: Se,
854
854
  defaultKeyType: null,
855
855
  defaultStringType: "PLAIN",
856
856
  directives: null,
@@ -887,7 +887,7 @@ function Be(e, t) {
887
887
  options: n
888
888
  };
889
889
  }
890
- function Ve(e, t) {
890
+ function Be(e, t) {
891
891
  if (t.tag) {
892
892
  let n = e.filter((e) => e.tag === t.tag);
893
893
  if (n.length > 0) return n.find((e) => e.format === t.format) ?? n[0];
@@ -908,14 +908,14 @@ function Ve(e, t) {
908
908
  }
909
909
  return n;
910
910
  }
911
- function He(e, t, { anchors: n, doc: r }) {
911
+ function Ve(e, t, { anchors: n, doc: r }) {
912
912
  if (!r.directives) return "";
913
913
  let i = [], a = (O(e) || A(e)) && e.anchor;
914
- a && ce(a) && (n.add(a), i.push(`&${a}`));
914
+ a && se(a) && (n.add(a), i.push(`&${a}`));
915
915
  let o = e.tag ?? (t.default ? null : t.tag);
916
916
  return o && i.push(r.directives.tagString(o)), i.join(" ");
917
917
  }
918
- function Ue(e, t, n, r) {
918
+ function He(e, t, n, r) {
919
919
  if (D(e)) return e.toString(t, n, r);
920
920
  if (w(e)) {
921
921
  if (t.doc.directives) return e.toString(t);
@@ -923,42 +923,42 @@ function Ue(e, t, n, r) {
923
923
  t.resolvedAliases ? t.resolvedAliases.add(e) : t.resolvedAliases = /* @__PURE__ */ new Set([e]), e = e.resolve(t.doc);
924
924
  }
925
925
  let i, a = j(e) ? e : t.doc.createNode(e, { onTagObj: (e) => i = e });
926
- i ??= Ve(t.doc.schema.tags, a);
927
- let o = He(a, i, t);
926
+ i ??= Be(t.doc.schema.tags, a);
927
+ let o = Ve(a, i, t);
928
928
  o.length > 0 && (t.indentAtStart = (t.indentAtStart ?? 0) + o.length + 1);
929
- let s = typeof i.stringify == "function" ? i.stringify(a, t, n, r) : O(a) ? ze(a, t, n, r) : a.toString(t, n, r);
929
+ let s = typeof i.stringify == "function" ? i.stringify(a, t, n, r) : O(a) ? Re(a, t, n, r) : a.toString(t, n, r);
930
930
  return o ? O(a) || s[0] === "{" || s[0] === "[" ? `${o} ${s}` : `${o}\n${t.indent}${s}` : s;
931
931
  }
932
932
  //#endregion
933
933
  //#region node_modules/yaml/browser/dist/stringify/stringifyPair.js
934
- function We({ key: e, value: t }, n, r, i) {
934
+ function Ue({ key: e, value: t }, n, r, i) {
935
935
  let { allNullValues: a, doc: o, indent: s, indentStep: c, options: { commentString: l, indentSeq: u, simpleKeys: d } } = n, f = j(e) && e.comment || null;
936
936
  if (d) {
937
937
  if (f) throw Error("With simple keys, key nodes cannot have comments");
938
938
  if (A(e) || !j(e) && typeof e == "object") throw Error("With simple keys, collection cannot be used as a key value");
939
939
  }
940
- let p = !d && (!e || f && t == null && !n.inFlow || A(e) || (O(e) ? e.type === z.BLOCK_FOLDED || e.type === z.BLOCK_LITERAL : typeof e == "object"));
940
+ let p = !d && (!e || f && t == null && !n.inFlow || A(e) || (O(e) ? e.type === B.BLOCK_FOLDED || e.type === B.BLOCK_LITERAL : typeof e == "object"));
941
941
  n = Object.assign({}, n, {
942
942
  allNullValues: !1,
943
943
  implicitKey: !p && (d || !a),
944
944
  indent: s + c
945
945
  });
946
- let m = !1, h = !1, g = Ue(e, n, () => m = !0, () => h = !0);
946
+ let m = !1, h = !1, g = He(e, n, () => m = !0, () => h = !0);
947
947
  if (!p && !n.inFlow && g.length > 1024) {
948
948
  if (d) throw Error("With simple keys, single line scalar must not span more than 1024 characters");
949
949
  p = !0;
950
950
  }
951
951
  if (n.inFlow) {
952
952
  if (a || t == null) return m && r && r(), g === "" ? "?" : p ? `? ${g}` : g;
953
- } else if (a && !d || t == null && p) return g = `? ${g}`, f && !m ? g += we(g, n.indent, l(f)) : h && i && i(), g;
954
- m && (f = null), p ? (f && (g += we(g, n.indent, l(f))), g = `? ${g}\n${s}:`) : (g = `${g}:`, f && (g += we(g, n.indent, l(f))));
953
+ } else if (a && !d || t == null && p) return g = `? ${g}`, f && !m ? g += Ce(g, n.indent, l(f)) : h && i && i(), g;
954
+ m && (f = null), p ? (f && (g += Ce(g, n.indent, l(f))), g = `? ${g}\n${s}:`) : (g = `${g}:`, f && (g += Ce(g, n.indent, l(f))));
955
955
  let _, v, y;
956
956
  j(t) ? (_ = !!t.spaceBefore, v = t.commentBefore, y = t.comment) : (_ = !1, v = null, y = null, t && typeof t == "object" && (t = o.createNode(t))), n.implicitKey = !1, !p && !f && O(t) && (n.indentAtStart = g.length + 1), h = !1, !u && c.length >= 2 && !n.inFlow && !p && k(t) && !t.flow && !t.tag && !t.anchor && (n.indent = n.indent.substring(2));
957
- let b = !1, x = Ue(t, n, () => b = !0, () => h = !0), S = " ";
957
+ let b = !1, x = He(t, n, () => b = !0, () => h = !0), S = " ";
958
958
  if (f || _ || v) {
959
959
  if (S = _ ? "\n" : "", v) {
960
960
  let e = l(v);
961
- S += `\n${B(e, n.indent)}`;
961
+ S += `\n${V(e, n.indent)}`;
962
962
  }
963
963
  x === "" && !n.inFlow ? S === "\n" && y && (S = "\n\n") : S += `\n${n.indent}`;
964
964
  } else if (!p && A(t)) {
@@ -972,31 +972,31 @@ function We({ key: e, value: t }, n, r, i) {
972
972
  t || (S = `\n${n.indent}`);
973
973
  }
974
974
  } else (x === "" || x[0] === "\n") && (S = "");
975
- return g += S + x, n.inFlow ? b && r && r() : y && !b ? g += we(g, n.indent, l(y)) : h && i && i(), g;
975
+ return g += S + x, n.inFlow ? b && r && r() : y && !b ? g += Ce(g, n.indent, l(y)) : h && i && i(), g;
976
976
  }
977
977
  //#endregion
978
978
  //#region node_modules/yaml/browser/dist/log.js
979
- function Ge(e, t) {
979
+ function We(e, t) {
980
980
  (e === "debug" || e === "warn") && console.warn(t);
981
981
  }
982
982
  //#endregion
983
983
  //#region node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
984
- var Ke = "<<", V = {
985
- identify: (e) => e === Ke || typeof e == "symbol" && e.description === Ke,
984
+ var Ge = "<<", H = {
985
+ identify: (e) => e === Ge || typeof e == "symbol" && e.description === Ge,
986
986
  default: "key",
987
987
  tag: "tag:yaml.org,2002:merge",
988
988
  test: /^<<$/,
989
- resolve: () => Object.assign(new z(Symbol(Ke)), { addToJSMap: Je }),
990
- stringify: () => Ke
991
- }, qe = (e, t) => (V.identify(t) || O(t) && (!t.type || t.type === z.PLAIN) && V.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === V.tag && e.default);
992
- function Je(e, t, n) {
993
- let r = Xe(e, n);
994
- if (k(r)) for (let n of r.items) Ye(e, t, n);
995
- else if (Array.isArray(r)) for (let n of r) Ye(e, t, n);
996
- else Ye(e, t, r);
989
+ resolve: () => Object.assign(new B(Symbol(Ge)), { addToJSMap: qe }),
990
+ stringify: () => Ge
991
+ }, Ke = (e, t) => (H.identify(t) || O(t) && (!t.type || t.type === B.PLAIN) && H.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === H.tag && e.default);
992
+ function qe(e, t, n) {
993
+ let r = Ye(e, n);
994
+ if (k(r)) for (let n of r.items) Je(e, t, n);
995
+ else if (Array.isArray(r)) for (let n of r) Je(e, t, n);
996
+ else Je(e, t, r);
997
997
  }
998
- function Ye(e, t, n) {
999
- let r = Xe(e, n);
998
+ function Je(e, t, n) {
999
+ let r = Ye(e, n);
1000
1000
  if (!E(r)) throw Error("Merge sources must be maps or map aliases");
1001
1001
  let i = r.toJSON(null, e, Map);
1002
1002
  for (let [e, n] of i) t instanceof Map ? t.has(e) || t.set(e, n) : t instanceof Set ? t.add(e) : Object.prototype.hasOwnProperty.call(t, e) || Object.defineProperty(t, e, {
@@ -1007,20 +1007,20 @@ function Ye(e, t, n) {
1007
1007
  });
1008
1008
  return t;
1009
1009
  }
1010
- function Xe(e, t) {
1010
+ function Ye(e, t) {
1011
1011
  return e && w(t) ? t.resolve(e.doc, e) : t;
1012
1012
  }
1013
1013
  //#endregion
1014
1014
  //#region node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
1015
- function Ze(e, t, { key: n, value: r }) {
1015
+ function Xe(e, t, { key: n, value: r }) {
1016
1016
  if (j(n) && n.addToJSMap) n.addToJSMap(e, t, r);
1017
- else if (qe(e, n)) Je(e, t, r);
1017
+ else if (Ke(e, n)) qe(e, t, r);
1018
1018
  else {
1019
- let i = R(n, "", e);
1020
- if (t instanceof Map) t.set(i, R(r, i, e));
1019
+ let i = z(n, "", e);
1020
+ if (t instanceof Map) t.set(i, z(r, i, e));
1021
1021
  else if (t instanceof Set) t.add(i);
1022
1022
  else {
1023
- let a = Qe(n, i, e), o = R(r, a, e);
1023
+ let a = Ze(n, i, e), o = z(r, a, e);
1024
1024
  a in t ? Object.defineProperty(t, a, {
1025
1025
  value: o,
1026
1026
  writable: !0,
@@ -1031,18 +1031,18 @@ function Ze(e, t, { key: n, value: r }) {
1031
1031
  }
1032
1032
  return t;
1033
1033
  }
1034
- function Qe(e, t, n) {
1034
+ function Ze(e, t, n) {
1035
1035
  if (t === null) return "";
1036
1036
  if (typeof t != "object") return String(t);
1037
1037
  if (j(e) && n?.doc) {
1038
- let t = Be(n.doc, {});
1038
+ let t = ze(n.doc, {});
1039
1039
  t.anchors = /* @__PURE__ */ new Set();
1040
1040
  for (let e of n.anchors.keys()) t.anchors.add(e.anchor);
1041
1041
  t.inFlow = !0, t.inStringifyKey = !0;
1042
1042
  let r = e.toString(t);
1043
1043
  if (!n.mapKeyWarned) {
1044
1044
  let e = JSON.stringify(r);
1045
- e.length > 40 && (e = e.substring(0, 36) + "...\""), Ge(n.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`), n.mapKeyWarned = !0;
1045
+ e.length > 40 && (e = e.substring(0, 36) + "...\""), We(n.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`), n.mapKeyWarned = !0;
1046
1046
  }
1047
1047
  return r;
1048
1048
  }
@@ -1050,10 +1050,10 @@ function Qe(e, t, n) {
1050
1050
  }
1051
1051
  //#endregion
1052
1052
  //#region node_modules/yaml/browser/dist/nodes/Pair.js
1053
- function $e(e, t, n) {
1054
- return new H(ye(e, void 0, n), ye(t, void 0, n));
1053
+ function Qe(e, t, n) {
1054
+ return new U(ve(e, void 0, n), ve(t, void 0, n));
1055
1055
  }
1056
- var H = class e {
1056
+ var U = class e {
1057
1057
  constructor(e, t = null) {
1058
1058
  Object.defineProperty(this, C, { value: b }), this.key = e, this.value = t;
1059
1059
  }
@@ -1062,32 +1062,32 @@ var H = class e {
1062
1062
  return j(n) && (n = n.clone(t)), j(r) && (r = r.clone(t)), new e(n, r);
1063
1063
  }
1064
1064
  toJSON(e, t) {
1065
- return Ze(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
1065
+ return Xe(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
1066
1066
  }
1067
1067
  toString(e, t, n) {
1068
- return e?.doc ? We(this, e, t, n) : JSON.stringify(this);
1068
+ return e?.doc ? Ue(this, e, t, n) : JSON.stringify(this);
1069
1069
  }
1070
1070
  };
1071
1071
  //#endregion
1072
1072
  //#region node_modules/yaml/browser/dist/stringify/stringifyCollection.js
1073
- function et(e, t, n) {
1074
- return (t.inFlow ?? e.flow ? nt : tt)(e, t, n);
1073
+ function $e(e, t, n) {
1074
+ return (t.inFlow ?? e.flow ? tt : et)(e, t, n);
1075
1075
  }
1076
- function tt({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
1076
+ function et({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
1077
1077
  let { indent: c, options: { commentString: l } } = n, u = Object.assign({}, n, {
1078
1078
  indent: a,
1079
1079
  type: null
1080
1080
  }), d = !1, f = [];
1081
1081
  for (let e = 0; e < t.length; ++e) {
1082
1082
  let i = t[e], o = null;
1083
- if (j(i)) !d && i.spaceBefore && f.push(""), rt(n, f, i.commentBefore, d), i.comment && (o = i.comment);
1083
+ if (j(i)) !d && i.spaceBefore && f.push(""), nt(n, f, i.commentBefore, d), i.comment && (o = i.comment);
1084
1084
  else if (D(i)) {
1085
1085
  let e = j(i.key) ? i.key : null;
1086
- e && (!d && e.spaceBefore && f.push(""), rt(n, f, e.commentBefore, d));
1086
+ e && (!d && e.spaceBefore && f.push(""), nt(n, f, e.commentBefore, d));
1087
1087
  }
1088
1088
  d = !1;
1089
- let s = Ue(i, u, () => o = null, () => d = !0);
1090
- o && (s += we(s, a, l(o))), d && o && (d = !1), f.push(r + s);
1089
+ let s = He(i, u, () => o = null, () => d = !0);
1090
+ o && (s += Ce(s, a, l(o))), d && o && (d = !1), f.push(r + s);
1091
1091
  }
1092
1092
  let p;
1093
1093
  if (f.length === 0) p = i.start + i.end;
@@ -1098,9 +1098,9 @@ function tt({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, ite
1098
1098
  p += t ? `\n${c}${t}` : "\n";
1099
1099
  }
1100
1100
  }
1101
- return e ? (p += "\n" + B(l(e), c), s && s()) : d && o && o(), p;
1101
+ return e ? (p += "\n" + V(l(e), c), s && s()) : d && o && o(), p;
1102
1102
  }
1103
- function nt({ items: e }, t, { flowChars: n, itemIndent: r }) {
1103
+ function tt({ items: e }, t, { flowChars: n, itemIndent: r }) {
1104
1104
  let { indent: i, indentStep: a, flowCollectionPadding: o, options: { commentString: s } } = t;
1105
1105
  r += a;
1106
1106
  let c = Object.assign({}, t, {
@@ -1110,16 +1110,16 @@ function nt({ items: e }, t, { flowChars: n, itemIndent: r }) {
1110
1110
  }), l = !1, u = 0, d = [];
1111
1111
  for (let n = 0; n < e.length; ++n) {
1112
1112
  let i = e[n], a = null;
1113
- if (j(i)) i.spaceBefore && d.push(""), rt(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
1113
+ if (j(i)) i.spaceBefore && d.push(""), nt(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
1114
1114
  else if (D(i)) {
1115
1115
  let e = j(i.key) ? i.key : null;
1116
- e && (e.spaceBefore && d.push(""), rt(t, d, e.commentBefore, !1), e.comment && (l = !0));
1116
+ e && (e.spaceBefore && d.push(""), nt(t, d, e.commentBefore, !1), e.comment && (l = !0));
1117
1117
  let n = j(i.value) ? i.value : null;
1118
1118
  n ? (n.comment && (a = n.comment), n.commentBefore && (l = !0)) : i.value == null && e?.comment && (a = e.comment);
1119
1119
  }
1120
1120
  a && (l = !0);
1121
- let o = Ue(i, c, () => a = null);
1122
- l ||= d.length > u || o.includes("\n"), n < e.length - 1 ? o += "," : t.options.trailingComma && (t.options.lineWidth > 0 && (l ||= d.reduce((e, t) => e + t.length + 2, 2) + (o.length + 2) > t.options.lineWidth), l && (o += ",")), a && (o += we(o, r, s(a))), d.push(o), u = d.length;
1121
+ let o = He(i, c, () => a = null);
1122
+ l ||= d.length > u || o.includes("\n"), n < e.length - 1 ? o += "," : t.options.trailingComma && (t.options.lineWidth > 0 && (l ||= d.reduce((e, t) => e + t.length + 2, 2) + (o.length + 2) > t.options.lineWidth), l && (o += ",")), a && (o += Ce(o, r, s(a))), d.push(o), u = d.length;
1123
1123
  }
1124
1124
  let { start: f, end: p } = n;
1125
1125
  if (d.length === 0) return f + p;
@@ -1134,19 +1134,19 @@ function nt({ items: e }, t, { flowChars: n, itemIndent: r }) {
1134
1134
  }
1135
1135
  return `${f}${o}${d.join(" ")}${o}${p}`;
1136
1136
  }
1137
- function rt({ indent: e, options: { commentString: t } }, n, r, i) {
1137
+ function nt({ indent: e, options: { commentString: t } }, n, r, i) {
1138
1138
  if (r && i && (r = r.replace(/^\n+/, "")), r) {
1139
- let i = B(t(r), e);
1139
+ let i = V(t(r), e);
1140
1140
  n.push(i.trimStart());
1141
1141
  }
1142
1142
  }
1143
1143
  //#endregion
1144
1144
  //#region node_modules/yaml/browser/dist/nodes/YAMLMap.js
1145
- function it(e, t) {
1145
+ function rt(e, t) {
1146
1146
  let n = O(t) ? t.value : t;
1147
1147
  for (let r of e) if (D(r) && (r.key === t || r.key === n || O(r.key) && r.key.value === n)) return r;
1148
1148
  }
1149
- var U = class extends Se {
1149
+ var W = class extends xe {
1150
1150
  static get tagName() {
1151
1151
  return "tag:yaml.org,2002:map";
1152
1152
  }
@@ -1157,7 +1157,7 @@ var U = class extends Se {
1157
1157
  let { keepUndefined: r, replacer: i } = n, a = new this(e), o = (e, o) => {
1158
1158
  if (typeof i == "function") o = i.call(t, e, o);
1159
1159
  else if (Array.isArray(i) && !i.includes(e)) return;
1160
- (o !== void 0 || r) && a.items.push($e(e, o, n));
1160
+ (o !== void 0 || r) && a.items.push(Qe(e, o, n));
1161
1161
  };
1162
1162
  if (t instanceof Map) for (let [e, n] of t) o(e, n);
1163
1163
  else if (t && typeof t == "object") for (let e of Object.keys(t)) o(e, t[e]);
@@ -1165,40 +1165,40 @@ var U = class extends Se {
1165
1165
  }
1166
1166
  add(e, t) {
1167
1167
  let n;
1168
- n = D(e) ? e : !e || typeof e != "object" || !("key" in e) ? new H(e, e?.value) : new H(e.key, e.value);
1169
- let r = it(this.items, n.key), i = this.schema?.sortMapEntries;
1168
+ n = D(e) ? e : !e || typeof e != "object" || !("key" in e) ? new U(e, e?.value) : new U(e.key, e.value);
1169
+ let r = rt(this.items, n.key), i = this.schema?.sortMapEntries;
1170
1170
  if (r) {
1171
1171
  if (!t) throw Error(`Key ${n.key} already set`);
1172
- O(r.value) && ge(n.value) ? r.value.value = n.value : r.value = n.value;
1172
+ O(r.value) && he(n.value) ? r.value.value = n.value : r.value = n.value;
1173
1173
  } else if (i) {
1174
1174
  let e = this.items.findIndex((e) => i(n, e) < 0);
1175
1175
  e === -1 ? this.items.push(n) : this.items.splice(e, 0, n);
1176
1176
  } else this.items.push(n);
1177
1177
  }
1178
1178
  delete(e) {
1179
- let t = it(this.items, e);
1179
+ let t = rt(this.items, e);
1180
1180
  return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
1181
1181
  }
1182
1182
  get(e, t) {
1183
- let n = it(this.items, e)?.value;
1183
+ let n = rt(this.items, e)?.value;
1184
1184
  return (!t && O(n) ? n.value : n) ?? void 0;
1185
1185
  }
1186
1186
  has(e) {
1187
- return !!it(this.items, e);
1187
+ return !!rt(this.items, e);
1188
1188
  }
1189
1189
  set(e, t) {
1190
- this.add(new H(e, t), !0);
1190
+ this.add(new U(e, t), !0);
1191
1191
  }
1192
1192
  toJSON(e, t, n) {
1193
1193
  let r = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
1194
1194
  t?.onCreate && t.onCreate(r);
1195
- for (let e of this.items) Ze(t, r, e);
1195
+ for (let e of this.items) Xe(t, r, e);
1196
1196
  return r;
1197
1197
  }
1198
1198
  toString(e, t, n) {
1199
1199
  if (!e) return JSON.stringify(this);
1200
1200
  for (let e of this.items) if (!D(e)) throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);
1201
- return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), et(this, e, {
1201
+ return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), $e(this, e, {
1202
1202
  blockItemPrefix: "",
1203
1203
  flowChars: {
1204
1204
  start: "{",
@@ -1209,16 +1209,16 @@ var U = class extends Se {
1209
1209
  onComment: t
1210
1210
  });
1211
1211
  }
1212
- }, at = {
1212
+ }, it = {
1213
1213
  collection: "map",
1214
1214
  default: !0,
1215
- nodeClass: U,
1215
+ nodeClass: W,
1216
1216
  tag: "tag:yaml.org,2002:map",
1217
1217
  resolve(e, t) {
1218
1218
  return E(e) || t("Expected a mapping for this tag"), e;
1219
1219
  },
1220
- createNode: (e, t, n) => U.from(e, t, n)
1221
- }, W = class extends Se {
1220
+ createNode: (e, t, n) => W.from(e, t, n)
1221
+ }, G = class extends xe {
1222
1222
  static get tagName() {
1223
1223
  return "tag:yaml.org,2002:seq";
1224
1224
  }
@@ -1229,34 +1229,34 @@ var U = class extends Se {
1229
1229
  this.items.push(e);
1230
1230
  }
1231
1231
  delete(e) {
1232
- let t = ot(e);
1232
+ let t = at(e);
1233
1233
  return typeof t == "number" && this.items.splice(t, 1).length > 0;
1234
1234
  }
1235
1235
  get(e, t) {
1236
- let n = ot(e);
1236
+ let n = at(e);
1237
1237
  if (typeof n != "number") return;
1238
1238
  let r = this.items[n];
1239
1239
  return !t && O(r) ? r.value : r;
1240
1240
  }
1241
1241
  has(e) {
1242
- let t = ot(e);
1242
+ let t = at(e);
1243
1243
  return typeof t == "number" && t < this.items.length;
1244
1244
  }
1245
1245
  set(e, t) {
1246
- let n = ot(e);
1246
+ let n = at(e);
1247
1247
  if (typeof n != "number") throw Error(`Expected a valid index, not ${e}.`);
1248
1248
  let r = this.items[n];
1249
- O(r) && ge(t) ? r.value = t : this.items[n] = t;
1249
+ O(r) && he(t) ? r.value = t : this.items[n] = t;
1250
1250
  }
1251
1251
  toJSON(e, t) {
1252
1252
  let n = [];
1253
1253
  t?.onCreate && t.onCreate(n);
1254
1254
  let r = 0;
1255
- for (let e of this.items) n.push(R(e, String(r++), t));
1255
+ for (let e of this.items) n.push(z(e, String(r++), t));
1256
1256
  return n;
1257
1257
  }
1258
1258
  toString(e, t, n) {
1259
- return e ? et(this, e, {
1259
+ return e ? $e(this, e, {
1260
1260
  blockItemPrefix: "- ",
1261
1261
  flowChars: {
1262
1262
  start: "[",
@@ -1276,56 +1276,56 @@ var U = class extends Se {
1276
1276
  let n = t instanceof Set ? a : String(e++);
1277
1277
  a = r.call(t, n, a);
1278
1278
  }
1279
- i.items.push(ye(a, void 0, n));
1279
+ i.items.push(ve(a, void 0, n));
1280
1280
  }
1281
1281
  }
1282
1282
  return i;
1283
1283
  }
1284
1284
  };
1285
- function ot(e) {
1285
+ function at(e) {
1286
1286
  let t = O(e) ? e.value : e;
1287
1287
  return t && typeof t == "string" && (t = Number(t)), typeof t == "number" && Number.isInteger(t) && t >= 0 ? t : null;
1288
1288
  }
1289
1289
  //#endregion
1290
1290
  //#region node_modules/yaml/browser/dist/schema/common/seq.js
1291
- var st = {
1291
+ var ot = {
1292
1292
  collection: "seq",
1293
1293
  default: !0,
1294
- nodeClass: W,
1294
+ nodeClass: G,
1295
1295
  tag: "tag:yaml.org,2002:seq",
1296
1296
  resolve(e, t) {
1297
1297
  return k(e) || t("Expected a sequence for this tag"), e;
1298
1298
  },
1299
- createNode: (e, t, n) => W.from(e, t, n)
1300
- }, ct = {
1299
+ createNode: (e, t, n) => G.from(e, t, n)
1300
+ }, st = {
1301
1301
  identify: (e) => typeof e == "string",
1302
1302
  default: !0,
1303
1303
  tag: "tag:yaml.org,2002:str",
1304
1304
  resolve: (e) => e,
1305
1305
  stringify(e, t, n, r) {
1306
- return t = Object.assign({ actualString: !0 }, t), ze(e, t, n, r);
1306
+ return t = Object.assign({ actualString: !0 }, t), Re(e, t, n, r);
1307
1307
  }
1308
- }, lt = {
1308
+ }, ct = {
1309
1309
  identify: (e) => e == null,
1310
- createNode: () => new z(null),
1310
+ createNode: () => new B(null),
1311
1311
  default: !0,
1312
1312
  tag: "tag:yaml.org,2002:null",
1313
1313
  test: /^(?:~|[Nn]ull|NULL)?$/,
1314
- resolve: () => new z(null),
1315
- stringify: ({ source: e }, t) => typeof e == "string" && lt.test.test(e) ? e : t.options.nullStr
1316
- }, ut = {
1314
+ resolve: () => new B(null),
1315
+ stringify: ({ source: e }, t) => typeof e == "string" && ct.test.test(e) ? e : t.options.nullStr
1316
+ }, lt = {
1317
1317
  identify: (e) => typeof e == "boolean",
1318
1318
  default: !0,
1319
1319
  tag: "tag:yaml.org,2002:bool",
1320
1320
  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
1321
- resolve: (e) => new z(e[0] === "t" || e[0] === "T"),
1321
+ resolve: (e) => new B(e[0] === "t" || e[0] === "T"),
1322
1322
  stringify({ source: e, value: t }, n) {
1323
- return e && ut.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? n.options.trueStr : n.options.falseStr;
1323
+ return e && lt.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? n.options.trueStr : n.options.falseStr;
1324
1324
  }
1325
1325
  };
1326
1326
  //#endregion
1327
1327
  //#region node_modules/yaml/browser/dist/stringify/stringifyNumber.js
1328
- function G({ format: e, minFractionDigits: t, tag: n, value: r }) {
1328
+ function K({ format: e, minFractionDigits: t, tag: n, value: r }) {
1329
1329
  if (typeof r == "bigint") return String(r);
1330
1330
  let i = typeof r == "number" ? r : Number(r);
1331
1331
  if (!isFinite(i)) return isNaN(i) ? ".nan" : i < 0 ? "-.inf" : ".inf";
@@ -1340,14 +1340,14 @@ function G({ format: e, minFractionDigits: t, tag: n, value: r }) {
1340
1340
  }
1341
1341
  //#endregion
1342
1342
  //#region node_modules/yaml/browser/dist/schema/core/float.js
1343
- var dt = {
1343
+ var ut = {
1344
1344
  identify: (e) => typeof e == "number",
1345
1345
  default: !0,
1346
1346
  tag: "tag:yaml.org,2002:float",
1347
1347
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1348
1348
  resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
1349
- stringify: G
1350
- }, ft = {
1349
+ stringify: K
1350
+ }, dt = {
1351
1351
  identify: (e) => typeof e == "number",
1352
1352
  default: !0,
1353
1353
  tag: "tag:yaml.org,2002:float",
@@ -1356,80 +1356,80 @@ var dt = {
1356
1356
  resolve: (e) => parseFloat(e),
1357
1357
  stringify(e) {
1358
1358
  let t = Number(e.value);
1359
- return isFinite(t) ? t.toExponential() : G(e);
1359
+ return isFinite(t) ? t.toExponential() : K(e);
1360
1360
  }
1361
- }, pt = {
1361
+ }, ft = {
1362
1362
  identify: (e) => typeof e == "number",
1363
1363
  default: !0,
1364
1364
  tag: "tag:yaml.org,2002:float",
1365
1365
  test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
1366
1366
  resolve(e) {
1367
- let t = new z(parseFloat(e)), n = e.indexOf(".");
1367
+ let t = new B(parseFloat(e)), n = e.indexOf(".");
1368
1368
  return n !== -1 && e[e.length - 1] === "0" && (t.minFractionDigits = e.length - n - 1), t;
1369
1369
  },
1370
- stringify: G
1371
- }, mt = (e) => typeof e == "bigint" || Number.isInteger(e), ht = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
1372
- function gt(e, t, n) {
1370
+ stringify: K
1371
+ }, pt = (e) => typeof e == "bigint" || Number.isInteger(e), mt = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
1372
+ function ht(e, t, n) {
1373
1373
  let { value: r } = e;
1374
- return mt(r) && r >= 0 ? n + r.toString(t) : G(e);
1374
+ return pt(r) && r >= 0 ? n + r.toString(t) : K(e);
1375
1375
  }
1376
- var _t = {
1377
- identify: (e) => mt(e) && e >= 0,
1376
+ var gt = {
1377
+ identify: (e) => pt(e) && e >= 0,
1378
1378
  default: !0,
1379
1379
  tag: "tag:yaml.org,2002:int",
1380
1380
  format: "OCT",
1381
1381
  test: /^0o[0-7]+$/,
1382
- resolve: (e, t, n) => ht(e, 2, 8, n),
1383
- stringify: (e) => gt(e, 8, "0o")
1384
- }, vt = {
1385
- identify: mt,
1382
+ resolve: (e, t, n) => mt(e, 2, 8, n),
1383
+ stringify: (e) => ht(e, 8, "0o")
1384
+ }, _t = {
1385
+ identify: pt,
1386
1386
  default: !0,
1387
1387
  tag: "tag:yaml.org,2002:int",
1388
1388
  test: /^[-+]?[0-9]+$/,
1389
- resolve: (e, t, n) => ht(e, 0, 10, n),
1390
- stringify: G
1391
- }, yt = {
1392
- identify: (e) => mt(e) && e >= 0,
1389
+ resolve: (e, t, n) => mt(e, 0, 10, n),
1390
+ stringify: K
1391
+ }, vt = {
1392
+ identify: (e) => pt(e) && e >= 0,
1393
1393
  default: !0,
1394
1394
  tag: "tag:yaml.org,2002:int",
1395
1395
  format: "HEX",
1396
1396
  test: /^0x[0-9a-fA-F]+$/,
1397
- resolve: (e, t, n) => ht(e, 2, 16, n),
1398
- stringify: (e) => gt(e, 16, "0x")
1399
- }, bt = [
1400
- at,
1397
+ resolve: (e, t, n) => mt(e, 2, 16, n),
1398
+ stringify: (e) => ht(e, 16, "0x")
1399
+ }, yt = [
1400
+ it,
1401
+ ot,
1401
1402
  st,
1402
1403
  ct,
1403
1404
  lt,
1404
- ut,
1405
+ gt,
1405
1406
  _t,
1406
1407
  vt,
1407
- yt,
1408
+ ut,
1408
1409
  dt,
1409
- ft,
1410
- pt
1410
+ ft
1411
1411
  ];
1412
1412
  //#endregion
1413
1413
  //#region node_modules/yaml/browser/dist/schema/json/schema.js
1414
- function xt(e) {
1414
+ function bt(e) {
1415
1415
  return typeof e == "bigint" || Number.isInteger(e);
1416
1416
  }
1417
- var St = ({ value: e }) => JSON.stringify(e), Ct = [
1417
+ var xt = ({ value: e }) => JSON.stringify(e), St = [
1418
1418
  {
1419
1419
  identify: (e) => typeof e == "string",
1420
1420
  default: !0,
1421
1421
  tag: "tag:yaml.org,2002:str",
1422
1422
  resolve: (e) => e,
1423
- stringify: St
1423
+ stringify: xt
1424
1424
  },
1425
1425
  {
1426
1426
  identify: (e) => e == null,
1427
- createNode: () => new z(null),
1427
+ createNode: () => new B(null),
1428
1428
  default: !0,
1429
1429
  tag: "tag:yaml.org,2002:null",
1430
1430
  test: /^null$/,
1431
1431
  resolve: () => null,
1432
- stringify: St
1432
+ stringify: xt
1433
1433
  },
1434
1434
  {
1435
1435
  identify: (e) => typeof e == "boolean",
@@ -1437,15 +1437,15 @@ var St = ({ value: e }) => JSON.stringify(e), Ct = [
1437
1437
  tag: "tag:yaml.org,2002:bool",
1438
1438
  test: /^true$|^false$/,
1439
1439
  resolve: (e) => e === "true",
1440
- stringify: St
1440
+ stringify: xt
1441
1441
  },
1442
1442
  {
1443
- identify: xt,
1443
+ identify: bt,
1444
1444
  default: !0,
1445
1445
  tag: "tag:yaml.org,2002:int",
1446
1446
  test: /^-?(?:0|[1-9][0-9]*)$/,
1447
1447
  resolve: (e, t, { intAsBigInt: n }) => n ? BigInt(e) : parseInt(e, 10),
1448
- stringify: ({ value: e }) => xt(e) ? e.toString() : JSON.stringify(e)
1448
+ stringify: ({ value: e }) => bt(e) ? e.toString() : JSON.stringify(e)
1449
1449
  },
1450
1450
  {
1451
1451
  identify: (e) => typeof e == "number",
@@ -1453,16 +1453,16 @@ var St = ({ value: e }) => JSON.stringify(e), Ct = [
1453
1453
  tag: "tag:yaml.org,2002:float",
1454
1454
  test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
1455
1455
  resolve: (e) => parseFloat(e),
1456
- stringify: St
1456
+ stringify: xt
1457
1457
  }
1458
- ], wt = [at, st].concat(Ct, {
1458
+ ], Ct = [it, ot].concat(St, {
1459
1459
  default: !0,
1460
1460
  tag: "",
1461
1461
  test: /^/,
1462
1462
  resolve(e, t) {
1463
1463
  return t(`Unresolved plain scalar ${JSON.stringify(e)}`), e;
1464
1464
  }
1465
- }), Tt = {
1465
+ }), wt = {
1466
1466
  identify: (e) => e instanceof Uint8Array,
1467
1467
  default: !1,
1468
1468
  tag: "tag:yaml.org,2002:binary",
@@ -1482,12 +1482,12 @@ var St = ({ value: e }) => JSON.stringify(e), Ct = [
1482
1482
  for (let t = 0; t < o.length; ++t) e += String.fromCharCode(o[t]);
1483
1483
  s = btoa(e);
1484
1484
  } else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");
1485
- if (t ??= z.BLOCK_LITERAL, t !== z.QUOTE_DOUBLE) {
1485
+ if (t ??= B.BLOCK_LITERAL, t !== B.QUOTE_DOUBLE) {
1486
1486
  let e = Math.max(r.options.lineWidth - r.indent.length, r.options.minContentWidth), n = Math.ceil(s.length / e), i = Array(n);
1487
1487
  for (let t = 0, r = 0; t < n; ++t, r += e) i[t] = s.substr(r, e);
1488
- s = i.join(t === z.BLOCK_LITERAL ? "\n" : " ");
1488
+ s = i.join(t === B.BLOCK_LITERAL ? "\n" : " ");
1489
1489
  }
1490
- return ze({
1490
+ return Re({
1491
1491
  comment: e,
1492
1492
  type: t,
1493
1493
  value: s
@@ -1496,27 +1496,27 @@ var St = ({ value: e }) => JSON.stringify(e), Ct = [
1496
1496
  };
1497
1497
  //#endregion
1498
1498
  //#region node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
1499
- function Et(e, t) {
1499
+ function Tt(e, t) {
1500
1500
  if (k(e)) for (let n = 0; n < e.items.length; ++n) {
1501
1501
  let r = e.items[n];
1502
1502
  if (!D(r)) {
1503
1503
  if (E(r)) {
1504
1504
  r.items.length > 1 && t("Each pair must have its own sequence indicator");
1505
- let e = r.items[0] || new H(new z(null));
1505
+ let e = r.items[0] || new U(new B(null));
1506
1506
  if (r.commentBefore && (e.key.commentBefore = e.key.commentBefore ? `${r.commentBefore}\n${e.key.commentBefore}` : r.commentBefore), r.comment) {
1507
1507
  let t = e.value ?? e.key;
1508
1508
  t.comment = t.comment ? `${r.comment}\n${t.comment}` : r.comment;
1509
1509
  }
1510
1510
  r = e;
1511
1511
  }
1512
- e.items[n] = D(r) ? r : new H(r);
1512
+ e.items[n] = D(r) ? r : new U(r);
1513
1513
  }
1514
1514
  }
1515
1515
  else t("Expected a sequence for this tag");
1516
1516
  return e;
1517
1517
  }
1518
- function Dt(e, t, n) {
1519
- let { replacer: r } = n, i = new W(e);
1518
+ function Et(e, t, n) {
1519
+ let { replacer: r } = n, i = new G(e);
1520
1520
  i.tag = "tag:yaml.org,2002:pairs";
1521
1521
  let a = 0;
1522
1522
  if (t && Symbol.iterator in Object(t)) for (let e of t) {
@@ -1530,19 +1530,19 @@ function Dt(e, t, n) {
1530
1530
  if (t.length === 1) o = t[0], s = e[o];
1531
1531
  else throw TypeError(`Expected tuple with one key, not ${t.length} keys`);
1532
1532
  } else o = e;
1533
- i.items.push($e(o, s, n));
1533
+ i.items.push(Qe(o, s, n));
1534
1534
  }
1535
1535
  return i;
1536
1536
  }
1537
- var Ot = {
1537
+ var Dt = {
1538
1538
  collection: "seq",
1539
1539
  default: !1,
1540
1540
  tag: "tag:yaml.org,2002:pairs",
1541
- resolve: Et,
1542
- createNode: Dt
1543
- }, kt = class e extends W {
1541
+ resolve: Tt,
1542
+ createNode: Et
1543
+ }, Ot = class e extends G {
1544
1544
  constructor() {
1545
- super(), this.add = U.prototype.add.bind(this), this.delete = U.prototype.delete.bind(this), this.get = U.prototype.get.bind(this), this.has = U.prototype.has.bind(this), this.set = U.prototype.set.bind(this), this.tag = e.tag;
1545
+ super(), this.add = W.prototype.add.bind(this), this.delete = W.prototype.delete.bind(this), this.get = W.prototype.get.bind(this), this.has = W.prototype.has.bind(this), this.set = W.prototype.set.bind(this), this.tag = e.tag;
1546
1546
  }
1547
1547
  toJSON(e, t) {
1548
1548
  if (!t) return super.toJSON(e);
@@ -1550,57 +1550,57 @@ var Ot = {
1550
1550
  t?.onCreate && t.onCreate(n);
1551
1551
  for (let e of this.items) {
1552
1552
  let r, i;
1553
- if (D(e) ? (r = R(e.key, "", t), i = R(e.value, r, t)) : r = R(e, "", t), n.has(r)) throw Error("Ordered maps must not include duplicate keys");
1553
+ if (D(e) ? (r = z(e.key, "", t), i = z(e.value, r, t)) : r = z(e, "", t), n.has(r)) throw Error("Ordered maps must not include duplicate keys");
1554
1554
  n.set(r, i);
1555
1555
  }
1556
1556
  return n;
1557
1557
  }
1558
1558
  static from(e, t, n) {
1559
- let r = Dt(e, t, n), i = new this();
1559
+ let r = Et(e, t, n), i = new this();
1560
1560
  return i.items = r.items, i;
1561
1561
  }
1562
1562
  };
1563
- kt.tag = "tag:yaml.org,2002:omap";
1564
- var At = {
1563
+ Ot.tag = "tag:yaml.org,2002:omap";
1564
+ var kt = {
1565
1565
  collection: "seq",
1566
1566
  identify: (e) => e instanceof Map,
1567
- nodeClass: kt,
1567
+ nodeClass: Ot,
1568
1568
  default: !1,
1569
1569
  tag: "tag:yaml.org,2002:omap",
1570
1570
  resolve(e, t) {
1571
- let n = Et(e, t), r = [];
1571
+ let n = Tt(e, t), r = [];
1572
1572
  for (let { key: e } of n.items) O(e) && (r.includes(e.value) ? t(`Ordered maps must not include duplicate keys: ${e.value}`) : r.push(e.value));
1573
- return Object.assign(new kt(), n);
1573
+ return Object.assign(new Ot(), n);
1574
1574
  },
1575
- createNode: (e, t, n) => kt.from(e, t, n)
1575
+ createNode: (e, t, n) => Ot.from(e, t, n)
1576
1576
  };
1577
1577
  //#endregion
1578
1578
  //#region node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js
1579
- function jt({ value: e, source: t }, n) {
1580
- return t && (e ? Mt : Nt).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
1579
+ function At({ value: e, source: t }, n) {
1580
+ return t && (e ? jt : Mt).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
1581
1581
  }
1582
- var Mt = {
1582
+ var jt = {
1583
1583
  identify: (e) => e === !0,
1584
1584
  default: !0,
1585
1585
  tag: "tag:yaml.org,2002:bool",
1586
1586
  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1587
- resolve: () => new z(!0),
1588
- stringify: jt
1589
- }, Nt = {
1587
+ resolve: () => new B(!0),
1588
+ stringify: At
1589
+ }, Mt = {
1590
1590
  identify: (e) => e === !1,
1591
1591
  default: !0,
1592
1592
  tag: "tag:yaml.org,2002:bool",
1593
1593
  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1594
- resolve: () => new z(!1),
1595
- stringify: jt
1596
- }, Pt = {
1594
+ resolve: () => new B(!1),
1595
+ stringify: At
1596
+ }, Nt = {
1597
1597
  identify: (e) => typeof e == "number",
1598
1598
  default: !0,
1599
1599
  tag: "tag:yaml.org,2002:float",
1600
1600
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1601
1601
  resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
1602
- stringify: G
1603
- }, Ft = {
1602
+ stringify: K
1603
+ }, Pt = {
1604
1604
  identify: (e) => typeof e == "number",
1605
1605
  default: !0,
1606
1606
  tag: "tag:yaml.org,2002:float",
@@ -1609,24 +1609,24 @@ var Mt = {
1609
1609
  resolve: (e) => parseFloat(e.replace(/_/g, "")),
1610
1610
  stringify(e) {
1611
1611
  let t = Number(e.value);
1612
- return isFinite(t) ? t.toExponential() : G(e);
1612
+ return isFinite(t) ? t.toExponential() : K(e);
1613
1613
  }
1614
- }, It = {
1614
+ }, Ft = {
1615
1615
  identify: (e) => typeof e == "number",
1616
1616
  default: !0,
1617
1617
  tag: "tag:yaml.org,2002:float",
1618
1618
  test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
1619
1619
  resolve(e) {
1620
- let t = new z(parseFloat(e.replace(/_/g, ""))), n = e.indexOf(".");
1620
+ let t = new B(parseFloat(e.replace(/_/g, ""))), n = e.indexOf(".");
1621
1621
  if (n !== -1) {
1622
1622
  let r = e.substring(n + 1).replace(/_/g, "");
1623
1623
  r[r.length - 1] === "0" && (t.minFractionDigits = r.length);
1624
1624
  }
1625
1625
  return t;
1626
1626
  },
1627
- stringify: G
1628
- }, Lt = (e) => typeof e == "bigint" || Number.isInteger(e);
1629
- function Rt(e, t, n, { intAsBigInt: r }) {
1627
+ stringify: K
1628
+ }, It = (e) => typeof e == "bigint" || Number.isInteger(e);
1629
+ function Lt(e, t, n, { intAsBigInt: r }) {
1630
1630
  let i = e[0];
1631
1631
  if ((i === "-" || i === "+") && (t += 1), e = e.substring(t).replace(/_/g, ""), r) {
1632
1632
  switch (n) {
@@ -1644,61 +1644,61 @@ function Rt(e, t, n, { intAsBigInt: r }) {
1644
1644
  let a = parseInt(e, n);
1645
1645
  return i === "-" ? -1 * a : a;
1646
1646
  }
1647
- function zt(e, t, n) {
1647
+ function Rt(e, t, n) {
1648
1648
  let { value: r } = e;
1649
- if (Lt(r)) {
1649
+ if (It(r)) {
1650
1650
  let e = r.toString(t);
1651
1651
  return r < 0 ? "-" + n + e.substr(1) : n + e;
1652
1652
  }
1653
- return G(e);
1653
+ return K(e);
1654
1654
  }
1655
- var Bt = {
1656
- identify: Lt,
1655
+ var zt = {
1656
+ identify: It,
1657
1657
  default: !0,
1658
1658
  tag: "tag:yaml.org,2002:int",
1659
1659
  format: "BIN",
1660
1660
  test: /^[-+]?0b[0-1_]+$/,
1661
- resolve: (e, t, n) => Rt(e, 2, 2, n),
1662
- stringify: (e) => zt(e, 2, "0b")
1663
- }, Vt = {
1664
- identify: Lt,
1661
+ resolve: (e, t, n) => Lt(e, 2, 2, n),
1662
+ stringify: (e) => Rt(e, 2, "0b")
1663
+ }, Bt = {
1664
+ identify: It,
1665
1665
  default: !0,
1666
1666
  tag: "tag:yaml.org,2002:int",
1667
1667
  format: "OCT",
1668
1668
  test: /^[-+]?0[0-7_]+$/,
1669
- resolve: (e, t, n) => Rt(e, 1, 8, n),
1670
- stringify: (e) => zt(e, 8, "0")
1671
- }, Ht = {
1672
- identify: Lt,
1669
+ resolve: (e, t, n) => Lt(e, 1, 8, n),
1670
+ stringify: (e) => Rt(e, 8, "0")
1671
+ }, Vt = {
1672
+ identify: It,
1673
1673
  default: !0,
1674
1674
  tag: "tag:yaml.org,2002:int",
1675
1675
  test: /^[-+]?[0-9][0-9_]*$/,
1676
- resolve: (e, t, n) => Rt(e, 0, 10, n),
1677
- stringify: G
1678
- }, Ut = {
1679
- identify: Lt,
1676
+ resolve: (e, t, n) => Lt(e, 0, 10, n),
1677
+ stringify: K
1678
+ }, Ht = {
1679
+ identify: It,
1680
1680
  default: !0,
1681
1681
  tag: "tag:yaml.org,2002:int",
1682
1682
  format: "HEX",
1683
1683
  test: /^[-+]?0x[0-9a-fA-F_]+$/,
1684
- resolve: (e, t, n) => Rt(e, 2, 16, n),
1685
- stringify: (e) => zt(e, 16, "0x")
1686
- }, Wt = class e extends U {
1684
+ resolve: (e, t, n) => Lt(e, 2, 16, n),
1685
+ stringify: (e) => Rt(e, 16, "0x")
1686
+ }, Ut = class e extends W {
1687
1687
  constructor(t) {
1688
1688
  super(t), this.tag = e.tag;
1689
1689
  }
1690
1690
  add(e) {
1691
1691
  let t;
1692
- t = D(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new H(e.key, null) : new H(e, null), it(this.items, t.key) || this.items.push(t);
1692
+ t = D(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new U(e.key, null) : new U(e, null), rt(this.items, t.key) || this.items.push(t);
1693
1693
  }
1694
1694
  get(e, t) {
1695
- let n = it(this.items, e);
1695
+ let n = rt(this.items, e);
1696
1696
  return !t && D(n) ? O(n.key) ? n.key.value : n.key : n;
1697
1697
  }
1698
1698
  set(e, t) {
1699
1699
  if (typeof t != "boolean") throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
1700
- let n = it(this.items, e);
1701
- n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new H(e));
1700
+ let n = rt(this.items, e);
1701
+ n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new U(e));
1702
1702
  }
1703
1703
  toJSON(e, t) {
1704
1704
  return super.toJSON(e, t, Set);
@@ -1710,21 +1710,21 @@ var Bt = {
1710
1710
  }
1711
1711
  static from(e, t, n) {
1712
1712
  let { replacer: r } = n, i = new this(e);
1713
- if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push($e(e, null, n));
1713
+ if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(Qe(e, null, n));
1714
1714
  return i;
1715
1715
  }
1716
1716
  };
1717
- Wt.tag = "tag:yaml.org,2002:set";
1718
- var Gt = {
1717
+ Ut.tag = "tag:yaml.org,2002:set";
1718
+ var Wt = {
1719
1719
  collection: "map",
1720
1720
  identify: (e) => e instanceof Set,
1721
- nodeClass: Wt,
1721
+ nodeClass: Ut,
1722
1722
  default: !1,
1723
1723
  tag: "tag:yaml.org,2002:set",
1724
- createNode: (e, t, n) => Wt.from(e, t, n),
1724
+ createNode: (e, t, n) => Ut.from(e, t, n),
1725
1725
  resolve(e, t) {
1726
1726
  if (E(e)) {
1727
- if (e.hasAllNullValues(!0)) return Object.assign(new Wt(), e);
1727
+ if (e.hasAllNullValues(!0)) return Object.assign(new Ut(), e);
1728
1728
  t("Set items must all have null values");
1729
1729
  } else t("Expected a mapping for this tag");
1730
1730
  return e;
@@ -1732,127 +1732,127 @@ var Gt = {
1732
1732
  };
1733
1733
  //#endregion
1734
1734
  //#region node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
1735
- function Kt(e, t) {
1735
+ function Gt(e, t) {
1736
1736
  let n = e[0], r = n === "-" || n === "+" ? e.substring(1) : e, i = (e) => t ? BigInt(e) : Number(e), a = r.replace(/_/g, "").split(":").reduce((e, t) => e * i(60) + i(t), i(0));
1737
1737
  return n === "-" ? i(-1) * a : a;
1738
1738
  }
1739
- function qt(e) {
1739
+ function Kt(e) {
1740
1740
  let { value: t } = e, n = (e) => e;
1741
1741
  if (typeof t == "bigint") n = (e) => BigInt(e);
1742
- else if (isNaN(t) || !isFinite(t)) return G(e);
1742
+ else if (isNaN(t) || !isFinite(t)) return K(e);
1743
1743
  let r = "";
1744
1744
  t < 0 && (r = "-", t *= n(-1));
1745
1745
  let i = n(60), a = [t % i];
1746
1746
  return t < 60 ? a.unshift(0) : (t = (t - a[0]) / i, a.unshift(t % i), t >= 60 && (t = (t - a[0]) / i, a.unshift(t))), r + a.map((e) => String(e).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
1747
1747
  }
1748
- var Jt = {
1748
+ var qt = {
1749
1749
  identify: (e) => typeof e == "bigint" || Number.isInteger(e),
1750
1750
  default: !0,
1751
1751
  tag: "tag:yaml.org,2002:int",
1752
1752
  format: "TIME",
1753
1753
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
1754
- resolve: (e, t, { intAsBigInt: n }) => Kt(e, n),
1755
- stringify: qt
1756
- }, Yt = {
1754
+ resolve: (e, t, { intAsBigInt: n }) => Gt(e, n),
1755
+ stringify: Kt
1756
+ }, Jt = {
1757
1757
  identify: (e) => typeof e == "number",
1758
1758
  default: !0,
1759
1759
  tag: "tag:yaml.org,2002:float",
1760
1760
  format: "TIME",
1761
1761
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
1762
- resolve: (e) => Kt(e, !1),
1763
- stringify: qt
1764
- }, Xt = {
1762
+ resolve: (e) => Gt(e, !1),
1763
+ stringify: Kt
1764
+ }, Yt = {
1765
1765
  identify: (e) => e instanceof Date,
1766
1766
  default: !0,
1767
1767
  tag: "tag:yaml.org,2002:timestamp",
1768
1768
  test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
1769
1769
  resolve(e) {
1770
- let t = e.match(Xt.test);
1770
+ let t = e.match(Yt.test);
1771
1771
  if (!t) throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");
1772
1772
  let [, n, r, i, a, o, s] = t.map(Number), c = t[7] ? Number((t[7] + "00").substr(1, 3)) : 0, l = Date.UTC(n, r - 1, i, a || 0, o || 0, s || 0, c), u = t[8];
1773
1773
  if (u && u !== "Z") {
1774
- let e = Kt(u, !1);
1774
+ let e = Gt(u, !1);
1775
1775
  Math.abs(e) < 30 && (e *= 60), l -= 6e4 * e;
1776
1776
  }
1777
1777
  return new Date(l);
1778
1778
  },
1779
1779
  stringify: ({ value: e }) => e?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
1780
- }, Zt = [
1781
- at,
1780
+ }, Xt = [
1781
+ it,
1782
+ ot,
1782
1783
  st,
1783
1784
  ct,
1784
- lt,
1785
+ jt,
1785
1786
  Mt,
1786
- Nt,
1787
+ zt,
1787
1788
  Bt,
1788
1789
  Vt,
1789
1790
  Ht,
1790
- Ut,
1791
+ Nt,
1791
1792
  Pt,
1792
1793
  Ft,
1793
- It,
1794
- Tt,
1795
- V,
1796
- At,
1797
- Ot,
1798
- Gt,
1794
+ wt,
1795
+ H,
1796
+ kt,
1797
+ Dt,
1798
+ Wt,
1799
+ qt,
1799
1800
  Jt,
1800
- Yt,
1801
- Xt
1802
- ], Qt = /* @__PURE__ */ new Map([
1803
- ["core", bt],
1801
+ Yt
1802
+ ], Zt = /* @__PURE__ */ new Map([
1803
+ ["core", yt],
1804
1804
  ["failsafe", [
1805
- at,
1806
- st,
1807
- ct
1805
+ it,
1806
+ ot,
1807
+ st
1808
1808
  ]],
1809
- ["json", wt],
1810
- ["yaml11", Zt],
1811
- ["yaml-1.1", Zt]
1812
- ]), $t = {
1813
- binary: Tt,
1814
- bool: ut,
1815
- float: pt,
1816
- floatExp: ft,
1817
- floatNaN: dt,
1818
- floatTime: Yt,
1819
- int: vt,
1820
- intHex: yt,
1821
- intOct: _t,
1822
- intTime: Jt,
1823
- map: at,
1824
- merge: V,
1825
- null: lt,
1826
- omap: At,
1827
- pairs: Ot,
1828
- seq: st,
1829
- set: Gt,
1830
- timestamp: Xt
1831
- }, en = {
1832
- "tag:yaml.org,2002:binary": Tt,
1833
- "tag:yaml.org,2002:merge": V,
1834
- "tag:yaml.org,2002:omap": At,
1835
- "tag:yaml.org,2002:pairs": Ot,
1836
- "tag:yaml.org,2002:set": Gt,
1837
- "tag:yaml.org,2002:timestamp": Xt
1809
+ ["json", Ct],
1810
+ ["yaml11", Xt],
1811
+ ["yaml-1.1", Xt]
1812
+ ]), Qt = {
1813
+ binary: wt,
1814
+ bool: lt,
1815
+ float: ft,
1816
+ floatExp: dt,
1817
+ floatNaN: ut,
1818
+ floatTime: Jt,
1819
+ int: _t,
1820
+ intHex: vt,
1821
+ intOct: gt,
1822
+ intTime: qt,
1823
+ map: it,
1824
+ merge: H,
1825
+ null: ct,
1826
+ omap: kt,
1827
+ pairs: Dt,
1828
+ seq: ot,
1829
+ set: Wt,
1830
+ timestamp: Yt
1831
+ }, $t = {
1832
+ "tag:yaml.org,2002:binary": wt,
1833
+ "tag:yaml.org,2002:merge": H,
1834
+ "tag:yaml.org,2002:omap": kt,
1835
+ "tag:yaml.org,2002:pairs": Dt,
1836
+ "tag:yaml.org,2002:set": Wt,
1837
+ "tag:yaml.org,2002:timestamp": Yt
1838
1838
  };
1839
- function tn(e, t, n) {
1840
- let r = Qt.get(t);
1841
- if (r && !e) return n && !r.includes(V) ? r.concat(V) : r.slice();
1839
+ function en(e, t, n) {
1840
+ let r = Zt.get(t);
1841
+ if (r && !e) return n && !r.includes(H) ? r.concat(H) : r.slice();
1842
1842
  let i = r;
1843
1843
  if (!i) {
1844
1844
  if (Array.isArray(e)) i = [];
1845
1845
  else {
1846
- let e = Array.from(Qt.keys()).filter((e) => e !== "yaml11").map((e) => JSON.stringify(e)).join(", ");
1846
+ let e = Array.from(Zt.keys()).filter((e) => e !== "yaml11").map((e) => JSON.stringify(e)).join(", ");
1847
1847
  throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`);
1848
1848
  }
1849
1849
  }
1850
1850
  if (Array.isArray(e)) for (let t of e) i = i.concat(t);
1851
1851
  else typeof e == "function" && (i = e(i.slice()));
1852
- return n && (i = i.concat(V)), i.reduce((e, t) => {
1853
- let n = typeof t == "string" ? $t[t] : t;
1852
+ return n && (i = i.concat(H)), i.reduce((e, t) => {
1853
+ let n = typeof t == "string" ? Qt[t] : t;
1854
1854
  if (!n) {
1855
- let e = JSON.stringify(t), n = Object.keys($t).map((e) => JSON.stringify(e)).join(", ");
1855
+ let e = JSON.stringify(t), n = Object.keys(Qt).map((e) => JSON.stringify(e)).join(", ");
1856
1856
  throw Error(`Unknown custom tag ${e}; use one of ${n}`);
1857
1857
  }
1858
1858
  return e.includes(n) || e.push(n), e;
@@ -1860,9 +1860,9 @@ function tn(e, t, n) {
1860
1860
  }
1861
1861
  //#endregion
1862
1862
  //#region node_modules/yaml/browser/dist/schema/Schema.js
1863
- var nn = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), rn = class e {
1863
+ var tn = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), nn = class e {
1864
1864
  constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: r, schema: i, sortMapEntries: a, toStringDefaults: o }) {
1865
- this.compat = Array.isArray(e) ? tn(e, "compat") : e ? tn(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? en : {}, this.tags = tn(t, this.name, n), this.toStringOptions = o ?? null, Object.defineProperty(this, y, { value: at }), Object.defineProperty(this, x, { value: ct }), Object.defineProperty(this, S, { value: st }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? nn : null;
1865
+ this.compat = Array.isArray(e) ? en(e, "compat") : e ? en(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? $t : {}, this.tags = en(t, this.name, n), this.toStringOptions = o ?? null, Object.defineProperty(this, y, { value: it }), Object.defineProperty(this, x, { value: st }), Object.defineProperty(this, S, { value: ot }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? tn : null;
1866
1866
  }
1867
1867
  clone() {
1868
1868
  let t = Object.create(e.prototype, Object.getOwnPropertyDescriptors(this));
@@ -1871,45 +1871,45 @@ var nn = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), rn = class e {
1871
1871
  };
1872
1872
  //#endregion
1873
1873
  //#region node_modules/yaml/browser/dist/stringify/stringifyDocument.js
1874
- function an(e, t) {
1874
+ function rn(e, t) {
1875
1875
  let n = [], r = t.directives === !0;
1876
1876
  if (t.directives !== !1 && e.directives) {
1877
1877
  let t = e.directives.toString(e);
1878
1878
  t ? (n.push(t), r = !0) : e.directives.docStart && (r = !0);
1879
1879
  }
1880
1880
  r && n.push("---");
1881
- let i = Be(e, t), { commentString: a } = i.options;
1881
+ let i = ze(e, t), { commentString: a } = i.options;
1882
1882
  if (e.commentBefore) {
1883
1883
  n.length !== 1 && n.unshift("");
1884
1884
  let t = a(e.commentBefore);
1885
- n.unshift(B(t, ""));
1885
+ n.unshift(V(t, ""));
1886
1886
  }
1887
1887
  let o = !1, s = null;
1888
1888
  if (e.contents) {
1889
1889
  if (j(e.contents)) {
1890
1890
  if (e.contents.spaceBefore && r && n.push(""), e.contents.commentBefore) {
1891
1891
  let t = a(e.contents.commentBefore);
1892
- n.push(B(t, ""));
1892
+ n.push(V(t, ""));
1893
1893
  }
1894
1894
  i.forceBlockIndent = !!e.comment, s = e.contents.comment;
1895
1895
  }
1896
- let t = s ? void 0 : () => o = !0, c = Ue(e.contents, i, () => s = null, t);
1897
- s && (c += we(c, "", a(s))), (c[0] === "|" || c[0] === ">") && n[n.length - 1] === "---" ? n[n.length - 1] = `--- ${c}` : n.push(c);
1898
- } else n.push(Ue(e.contents, i));
1896
+ let t = s ? void 0 : () => o = !0, c = He(e.contents, i, () => s = null, t);
1897
+ s && (c += Ce(c, "", a(s))), (c[0] === "|" || c[0] === ">") && n[n.length - 1] === "---" ? n[n.length - 1] = `--- ${c}` : n.push(c);
1898
+ } else n.push(He(e.contents, i));
1899
1899
  if (e.directives?.docEnd) {
1900
1900
  if (e.comment) {
1901
1901
  let t = a(e.comment);
1902
- t.includes("\n") ? (n.push("..."), n.push(B(t, ""))) : n.push(`... ${t}`);
1902
+ t.includes("\n") ? (n.push("..."), n.push(V(t, ""))) : n.push(`... ${t}`);
1903
1903
  } else n.push("...");
1904
1904
  } else {
1905
1905
  let t = e.comment;
1906
- t && o && (t = t.replace(/^\n+/, "")), t && ((!o || s) && n[n.length - 1] !== "" && n.push(""), n.push(B(a(t), "")));
1906
+ t && o && (t = t.replace(/^\n+/, "")), t && ((!o || s) && n[n.length - 1] !== "" && n.push(""), n.push(V(a(t), "")));
1907
1907
  }
1908
1908
  return n.join("\n") + "\n";
1909
1909
  }
1910
1910
  //#endregion
1911
1911
  //#region node_modules/yaml/browser/dist/doc/Document.js
1912
- var on = class e {
1912
+ var an = class e {
1913
1913
  constructor(e, t, n) {
1914
1914
  this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, C, { value: v });
1915
1915
  let r = null;
@@ -1926,24 +1926,24 @@ var on = class e {
1926
1926
  }, n);
1927
1927
  this.options = i;
1928
1928
  let { version: a } = i;
1929
- n?._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (a = this.directives.yaml.version)) : this.directives = new se({ version: a }), this.setSchema(a, n), this.contents = e === void 0 ? null : this.createNode(e, r, n);
1929
+ n?._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (a = this.directives.yaml.version)) : this.directives = new R({ version: a }), this.setSchema(a, n), this.contents = e === void 0 ? null : this.createNode(e, r, n);
1930
1930
  }
1931
1931
  clone() {
1932
1932
  let t = Object.create(e.prototype, { [C]: { value: v } });
1933
1933
  return t.commentBefore = this.commentBefore, t.comment = this.comment, t.errors = this.errors.slice(), t.warnings = this.warnings.slice(), t.options = Object.assign({}, this.options), this.directives && (t.directives = this.directives.clone()), t.schema = this.schema.clone(), t.contents = j(this.contents) ? this.contents.clone(t.schema) : this.contents, this.range && (t.range = this.range.slice()), t;
1934
1934
  }
1935
1935
  add(e) {
1936
- sn(this.contents) && this.contents.add(e);
1936
+ on(this.contents) && this.contents.add(e);
1937
1937
  }
1938
1938
  addIn(e, t) {
1939
- sn(this.contents) && this.contents.addIn(e, t);
1939
+ on(this.contents) && this.contents.addIn(e, t);
1940
1940
  }
1941
1941
  createAlias(e, t) {
1942
1942
  if (!e.anchor) {
1943
- let n = le(this);
1944
- e.anchor = !t || n.has(t) ? ue(t || "a", n) : t;
1943
+ let n = ce(this);
1944
+ e.anchor = !t || n.has(t) ? le(t || "a", n) : t;
1945
1945
  }
1946
- return new me(e.anchor);
1946
+ return new pe(e.anchor);
1947
1947
  }
1948
1948
  createNode(e, t, n) {
1949
1949
  let r;
@@ -1952,7 +1952,7 @@ var on = class e {
1952
1952
  let e = t.filter((e) => typeof e == "number" || e instanceof String || e instanceof Number).map(String);
1953
1953
  e.length > 0 && (t = t.concat(e)), r = t;
1954
1954
  } else n === void 0 && t && (n = t, t = void 0);
1955
- let { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: s, onTagObj: c, tag: l } = n ?? {}, { onAnchor: u, setAnchors: d, sourceObjects: f } = de(this, a || "a"), p = {
1955
+ let { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: s, onTagObj: c, tag: l } = n ?? {}, { onAnchor: u, setAnchors: d, sourceObjects: f } = ue(this, a || "a"), p = {
1956
1956
  aliasDuplicateObjects: i ?? !0,
1957
1957
  keepUndefined: s ?? !1,
1958
1958
  onAnchor: u,
@@ -1960,49 +1960,49 @@ var on = class e {
1960
1960
  replacer: r,
1961
1961
  schema: this.schema,
1962
1962
  sourceObjects: f
1963
- }, m = ye(e, l, p);
1963
+ }, m = ve(e, l, p);
1964
1964
  return o && A(m) && (m.flow = !0), d(), m;
1965
1965
  }
1966
1966
  createPair(e, t, n = {}) {
1967
- return new H(this.createNode(e, null, n), this.createNode(t, null, n));
1967
+ return new U(this.createNode(e, null, n), this.createNode(t, null, n));
1968
1968
  }
1969
1969
  delete(e) {
1970
- return sn(this.contents) ? this.contents.delete(e) : !1;
1970
+ return on(this.contents) ? this.contents.delete(e) : !1;
1971
1971
  }
1972
1972
  deleteIn(e) {
1973
- return xe(e) ? this.contents != null && (this.contents = null, !0) : sn(this.contents) ? this.contents.deleteIn(e) : !1;
1973
+ return be(e) ? this.contents != null && (this.contents = null, !0) : on(this.contents) ? this.contents.deleteIn(e) : !1;
1974
1974
  }
1975
1975
  get(e, t) {
1976
1976
  return A(this.contents) ? this.contents.get(e, t) : void 0;
1977
1977
  }
1978
1978
  getIn(e, t) {
1979
- return xe(e) ? !t && O(this.contents) ? this.contents.value : this.contents : A(this.contents) ? this.contents.getIn(e, t) : void 0;
1979
+ return be(e) ? !t && O(this.contents) ? this.contents.value : this.contents : A(this.contents) ? this.contents.getIn(e, t) : void 0;
1980
1980
  }
1981
1981
  has(e) {
1982
1982
  return A(this.contents) ? this.contents.has(e) : !1;
1983
1983
  }
1984
1984
  hasIn(e) {
1985
- return xe(e) ? this.contents !== void 0 : A(this.contents) ? this.contents.hasIn(e) : !1;
1985
+ return be(e) ? this.contents !== void 0 : A(this.contents) ? this.contents.hasIn(e) : !1;
1986
1986
  }
1987
1987
  set(e, t) {
1988
- this.contents == null ? this.contents = be(this.schema, [e], t) : sn(this.contents) && this.contents.set(e, t);
1988
+ this.contents == null ? this.contents = ye(this.schema, [e], t) : on(this.contents) && this.contents.set(e, t);
1989
1989
  }
1990
1990
  setIn(e, t) {
1991
- xe(e) ? this.contents = t : this.contents == null ? this.contents = be(this.schema, Array.from(e), t) : sn(this.contents) && this.contents.setIn(e, t);
1991
+ be(e) ? this.contents = t : this.contents == null ? this.contents = ye(this.schema, Array.from(e), t) : on(this.contents) && this.contents.setIn(e, t);
1992
1992
  }
1993
1993
  setSchema(e, t = {}) {
1994
1994
  typeof e == "number" && (e = String(e));
1995
1995
  let n;
1996
1996
  switch (e) {
1997
1997
  case "1.1":
1998
- this.directives ? this.directives.yaml.version = "1.1" : this.directives = new se({ version: "1.1" }), n = {
1998
+ this.directives ? this.directives.yaml.version = "1.1" : this.directives = new R({ version: "1.1" }), n = {
1999
1999
  resolveKnownTags: !1,
2000
2000
  schema: "yaml-1.1"
2001
2001
  };
2002
2002
  break;
2003
2003
  case "1.2":
2004
2004
  case "next":
2005
- this.directives ? this.directives.yaml.version = e : this.directives = new se({ version: e }), n = {
2005
+ this.directives ? this.directives.yaml.version = e : this.directives = new R({ version: e }), n = {
2006
2006
  resolveKnownTags: !0,
2007
2007
  schema: "core"
2008
2008
  };
@@ -2016,7 +2016,7 @@ var on = class e {
2016
2016
  }
2017
2017
  }
2018
2018
  if (t.schema instanceof Object) this.schema = t.schema;
2019
- else if (n) this.schema = new rn(Object.assign(n, t));
2019
+ else if (n) this.schema = new nn(Object.assign(n, t));
2020
2020
  else throw Error("With a null YAML version, the { schema: Schema } option is required");
2021
2021
  }
2022
2022
  toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: r, onAnchor: i, reviver: a } = {}) {
@@ -2027,9 +2027,9 @@ var on = class e {
2027
2027
  mapAsMap: n === !0,
2028
2028
  mapKeyWarned: !1,
2029
2029
  maxAliasCount: typeof r == "number" ? r : 100
2030
- }, s = R(this.contents, t ?? "", o);
2030
+ }, s = z(this.contents, t ?? "", o);
2031
2031
  if (typeof i == "function") for (let { count: e, res: t } of o.anchors.values()) i(t, e);
2032
- return typeof a == "function" ? fe(a, { "": s }, "", s) : s;
2032
+ return typeof a == "function" ? de(a, { "": s }, "", s) : s;
2033
2033
  }
2034
2034
  toJSON(e, t) {
2035
2035
  return this.toJS({
@@ -2045,28 +2045,28 @@ var on = class e {
2045
2045
  let t = JSON.stringify(e.indent);
2046
2046
  throw Error(`"indent" option must be a positive integer, not ${t}`);
2047
2047
  }
2048
- return an(this, e);
2048
+ return rn(this, e);
2049
2049
  }
2050
2050
  };
2051
- function sn(e) {
2051
+ function on(e) {
2052
2052
  if (A(e)) return !0;
2053
2053
  throw Error("Expected a YAML collection as document contents");
2054
2054
  }
2055
2055
  //#endregion
2056
2056
  //#region node_modules/yaml/browser/dist/errors.js
2057
- var cn = class extends Error {
2057
+ var sn = class extends Error {
2058
2058
  constructor(e, t, n, r) {
2059
2059
  super(), this.name = e, this.code = n, this.message = r, this.pos = t;
2060
2060
  }
2061
- }, ln = class extends cn {
2061
+ }, cn = class extends sn {
2062
2062
  constructor(e, t, n) {
2063
2063
  super("YAMLParseError", e, t, n);
2064
2064
  }
2065
- }, un = class extends cn {
2065
+ }, ln = class extends sn {
2066
2066
  constructor(e, t, n) {
2067
2067
  super("YAMLWarning", e, t, n);
2068
2068
  }
2069
- }, dn = (e, t) => (n) => {
2069
+ }, un = (e, t) => (n) => {
2070
2070
  if (n.pos[0] === -1) return;
2071
2071
  n.linePos = n.pos.map((e) => t.linePos(e));
2072
2072
  let { line: r, col: i } = n.linePos[0];
@@ -2089,7 +2089,7 @@ var cn = class extends Error {
2089
2089
  };
2090
2090
  //#endregion
2091
2091
  //#region node_modules/yaml/browser/dist/compose/resolve-props.js
2092
- function fn(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIndent: o, startOnNewline: s }) {
2092
+ function dn(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIndent: o, startOnNewline: s }) {
2093
2093
  let c = !1, l = s, u = s, d = "", f = "", p = !1, m = !1, h = null, g = null, _ = null, v = null, y = null, b = null, x = null;
2094
2094
  for (let i of e) switch (m &&= (i.type !== "space" && i.type !== "newline" && i.type !== "comma" && a(i.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), !1), h &&= (l && i.type !== "comment" && i.type !== "newline" && a(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), null), i.type) {
2095
2095
  case "space":
@@ -2135,7 +2135,7 @@ function fn(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIn
2135
2135
  }
2136
2136
  //#endregion
2137
2137
  //#region node_modules/yaml/browser/dist/compose/util-contains-newline.js
2138
- function pn(e) {
2138
+ function fn(e) {
2139
2139
  if (!e) return null;
2140
2140
  switch (e.type) {
2141
2141
  case "alias":
@@ -2153,7 +2153,7 @@ function pn(e) {
2153
2153
  if (t.sep) {
2154
2154
  for (let e of t.sep) if (e.type === "newline") return !0;
2155
2155
  }
2156
- if (pn(t.key) || pn(t.value)) return !0;
2156
+ if (fn(t.key) || fn(t.value)) return !0;
2157
2157
  }
2158
2158
  return !1;
2159
2159
  default: return !0;
@@ -2161,15 +2161,15 @@ function pn(e) {
2161
2161
  }
2162
2162
  //#endregion
2163
2163
  //#region node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
2164
- function mn(e, t, n) {
2164
+ function pn(e, t, n) {
2165
2165
  if (t?.type === "flow-collection") {
2166
2166
  let r = t.end[0];
2167
- r.indent === e && (r.source === "]" || r.source === "}") && pn(t) && n(r, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2167
+ r.indent === e && (r.source === "]" || r.source === "}") && fn(t) && n(r, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2168
2168
  }
2169
2169
  }
2170
2170
  //#endregion
2171
2171
  //#region node_modules/yaml/browser/dist/compose/util-map-includes.js
2172
- function hn(e, t, n) {
2172
+ function mn(e, t, n) {
2173
2173
  let { uniqueKeys: r } = e.options;
2174
2174
  if (r === !1) return !1;
2175
2175
  let i = typeof r == "function" ? r : (e, t) => e === t || O(e) && O(t) && e.value === t.value;
@@ -2177,13 +2177,13 @@ function hn(e, t, n) {
2177
2177
  }
2178
2178
  //#endregion
2179
2179
  //#region node_modules/yaml/browser/dist/compose/resolve-block-map.js
2180
- var gn = "All mapping items must start at the same column";
2181
- function _n({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2182
- let o = new ((a?.nodeClass) ?? U)(n.schema);
2180
+ var hn = "All mapping items must start at the same column";
2181
+ function gn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2182
+ let o = new ((a?.nodeClass) ?? W)(n.schema);
2183
2183
  n.atRoot &&= !1;
2184
2184
  let s = r.offset, c = null;
2185
2185
  for (let a of r.items) {
2186
- let { start: l, key: u, sep: d, value: f } = a, p = fn(l, {
2186
+ let { start: l, key: u, sep: d, value: f } = a, p = dn(l, {
2187
2187
  indicator: "explicit-key-ind",
2188
2188
  next: u ?? d?.[0],
2189
2189
  offset: s,
@@ -2192,16 +2192,16 @@ function _n({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2192
2192
  startOnNewline: !0
2193
2193
  }), m = !p.found;
2194
2194
  if (m) {
2195
- if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT", gn)), !p.anchor && !p.tag && !d) {
2195
+ if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT", hn)), !p.anchor && !p.tag && !d) {
2196
2196
  c = p.end, p.comment && (o.comment ? o.comment += "\n" + p.comment : o.comment = p.comment);
2197
2197
  continue;
2198
2198
  }
2199
- (p.newlineAfterProp || pn(u)) && i(u ?? l[l.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2200
- } else p.found?.indent !== r.indent && i(s, "BAD_INDENT", gn);
2199
+ (p.newlineAfterProp || fn(u)) && i(u ?? l[l.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2200
+ } else p.found?.indent !== r.indent && i(s, "BAD_INDENT", hn);
2201
2201
  n.atKey = !0;
2202
2202
  let h = p.end, g = u ? e(n, u, p, i) : t(n, h, l, null, p, i);
2203
- n.schema.compat && mn(r.indent, u, i), n.atKey = !1, hn(n, o.items, g) && i(h, "DUPLICATE_KEY", "Map keys must be unique");
2204
- let _ = fn(d ?? [], {
2203
+ n.schema.compat && pn(r.indent, u, i), n.atKey = !1, mn(n, o.items, g) && i(h, "DUPLICATE_KEY", "Map keys must be unique");
2204
+ let _ = dn(d ?? [], {
2205
2205
  indicator: "map-value-ind",
2206
2206
  next: f,
2207
2207
  offset: g.range[2],
@@ -2212,12 +2212,12 @@ function _n({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2212
2212
  if (s = _.end, _.found) {
2213
2213
  m && (f?.type === "block-map" && !_.hasNewline && i(s, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), n.options.strict && p.start < _.found.offset - 1024 && i(g.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
2214
2214
  let c = f ? e(n, f, _, i) : t(n, s, d, null, _, i);
2215
- n.schema.compat && mn(r.indent, f, i), s = c.range[2];
2216
- let l = new H(g, c);
2215
+ n.schema.compat && pn(r.indent, f, i), s = c.range[2];
2216
+ let l = new U(g, c);
2217
2217
  n.options.keepSourceTokens && (l.srcToken = a), o.items.push(l);
2218
2218
  } else {
2219
2219
  m && i(g.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
2220
- let e = new H(g);
2220
+ let e = new U(g);
2221
2221
  n.options.keepSourceTokens && (e.srcToken = a), o.items.push(e);
2222
2222
  }
2223
2223
  }
@@ -2229,12 +2229,12 @@ function _n({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2229
2229
  }
2230
2230
  //#endregion
2231
2231
  //#region node_modules/yaml/browser/dist/compose/resolve-block-seq.js
2232
- function vn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2233
- let o = new ((a?.nodeClass) ?? W)(n.schema);
2232
+ function _n({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2233
+ let o = new ((a?.nodeClass) ?? G)(n.schema);
2234
2234
  n.atRoot &&= !1, n.atKey &&= !1;
2235
2235
  let s = r.offset, c = null;
2236
2236
  for (let { start: a, value: l } of r.items) {
2237
- let u = fn(a, {
2237
+ let u = dn(a, {
2238
2238
  indicator: "seq-item-ind",
2239
2239
  next: l,
2240
2240
  offset: s,
@@ -2250,7 +2250,7 @@ function vn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2250
2250
  }
2251
2251
  }
2252
2252
  let d = l ? e(n, l, u, i) : t(n, u.end, a, null, u, i);
2253
- n.schema.compat && mn(r.indent, l, i), s = d.range[2], o.items.push(d);
2253
+ n.schema.compat && pn(r.indent, l, i), s = d.range[2], o.items.push(d);
2254
2254
  }
2255
2255
  return o.range = [
2256
2256
  r.offset,
@@ -2260,7 +2260,7 @@ function vn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2260
2260
  }
2261
2261
  //#endregion
2262
2262
  //#region node_modules/yaml/browser/dist/compose/resolve-end.js
2263
- function yn(e, t, n, r) {
2263
+ function vn(e, t, n, r) {
2264
2264
  let i = "";
2265
2265
  if (e) {
2266
2266
  let a = !1, o = "";
@@ -2291,15 +2291,15 @@ function yn(e, t, n, r) {
2291
2291
  }
2292
2292
  //#endregion
2293
2293
  //#region node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
2294
- var bn = "Block collections are not allowed within flow collections", xn = (e) => e && (e.type === "block-map" || e.type === "block-seq");
2295
- function Sn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2296
- let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new ((a?.nodeClass) ?? (o ? U : W))(n.schema);
2294
+ var yn = "Block collections are not allowed within flow collections", bn = (e) => e && (e.type === "block-map" || e.type === "block-seq");
2295
+ function xn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2296
+ let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new ((a?.nodeClass) ?? (o ? W : G))(n.schema);
2297
2297
  c.flow = !0;
2298
2298
  let l = n.atRoot;
2299
2299
  l && (n.atRoot = !1), n.atKey &&= !1;
2300
2300
  let u = r.offset + r.start.source.length;
2301
2301
  for (let a = 0; a < r.items.length; ++a) {
2302
- let l = r.items[a], { start: d, key: f, sep: p, value: m } = l, h = fn(d, {
2302
+ let l = r.items[a], { start: d, key: f, sep: p, value: m } = l, h = dn(d, {
2303
2303
  flow: s,
2304
2304
  indicator: "explicit-key-ind",
2305
2305
  next: f ?? p?.[0],
@@ -2313,7 +2313,7 @@ function Sn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2313
2313
  a === 0 && h.comma ? i(h.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`) : a < r.items.length - 1 && i(h.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${s}`), h.comment && (c.comment ? c.comment += "\n" + h.comment : c.comment = h.comment), u = h.end;
2314
2314
  continue;
2315
2315
  }
2316
- !o && n.options.strict && pn(f) && i(f, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2316
+ !o && n.options.strict && fn(f) && i(f, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2317
2317
  }
2318
2318
  if (a === 0) h.comma && i(h.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`);
2319
2319
  else if (h.comma || i(h.start, "MISSING_CHAR", `Missing , between ${s} items`), h.comment) {
@@ -2333,12 +2333,12 @@ function Sn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2333
2333
  }
2334
2334
  if (!o && !p && !h.found) {
2335
2335
  let r = m ? e(n, m, h, i) : t(n, h.end, p, null, h, i);
2336
- c.items.push(r), u = r.range[2], xn(m) && i(r.range, "BLOCK_IN_FLOW", bn);
2336
+ c.items.push(r), u = r.range[2], bn(m) && i(r.range, "BLOCK_IN_FLOW", yn);
2337
2337
  } else {
2338
2338
  n.atKey = !0;
2339
2339
  let a = h.end, g = f ? e(n, f, h, i) : t(n, a, d, null, h, i);
2340
- xn(f) && i(g.range, "BLOCK_IN_FLOW", bn), n.atKey = !1;
2341
- let _ = fn(p ?? [], {
2340
+ bn(f) && i(g.range, "BLOCK_IN_FLOW", yn), n.atKey = !1;
2341
+ let _ = dn(p ?? [], {
2342
2342
  flow: s,
2343
2343
  indicator: "map-value-ind",
2344
2344
  next: m,
@@ -2360,13 +2360,13 @@ function Sn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2360
2360
  }
2361
2361
  } else m && ("source" in m && m.source?.[0] === ":" ? i(m, "MISSING_CHAR", `Missing space after : in ${s}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${s} items`));
2362
2362
  let v = m ? e(n, m, _, i) : _.found ? t(n, _.end, p, null, _, i) : null;
2363
- v ? xn(m) && i(v.range, "BLOCK_IN_FLOW", bn) : _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
2364
- let y = new H(g, v);
2363
+ v ? bn(m) && i(v.range, "BLOCK_IN_FLOW", yn) : _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
2364
+ let y = new U(g, v);
2365
2365
  if (n.options.keepSourceTokens && (y.srcToken = l), o) {
2366
2366
  let e = c;
2367
- hn(n, e.items, g) && i(a, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(y);
2367
+ mn(n, e.items, g) && i(a, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(y);
2368
2368
  } else {
2369
- let e = new U(n.schema);
2369
+ let e = new W(n.schema);
2370
2370
  e.flow = !0, e.items.push(y);
2371
2371
  let t = (v ?? g).range;
2372
2372
  e.range = [
@@ -2385,7 +2385,7 @@ function Sn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2385
2385
  i(u, l ? "MISSING_CHAR" : "BAD_INDENT", t), f && f.source.length !== 1 && p.unshift(f);
2386
2386
  }
2387
2387
  if (p.length > 0) {
2388
- let e = yn(p, m, n.options.strict, i);
2388
+ let e = vn(p, m, n.options.strict, i);
2389
2389
  e.comment && (c.comment ? c.comment += "\n" + e.comment : c.comment = e.comment), c.range = [
2390
2390
  r.offset,
2391
2391
  m,
@@ -2400,31 +2400,31 @@ function Sn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2400
2400
  }
2401
2401
  //#endregion
2402
2402
  //#region node_modules/yaml/browser/dist/compose/compose-collection.js
2403
- function Cn(e, t, n, r, i, a) {
2404
- let o = n.type === "block-map" ? _n(e, t, n, r, a) : n.type === "block-seq" ? vn(e, t, n, r, a) : Sn(e, t, n, r, a), s = o.constructor;
2403
+ function Sn(e, t, n, r, i, a) {
2404
+ let o = n.type === "block-map" ? gn(e, t, n, r, a) : n.type === "block-seq" ? _n(e, t, n, r, a) : xn(e, t, n, r, a), s = o.constructor;
2405
2405
  return i === "!" || i === s.tagName ? (o.tag = s.tagName, o) : (i && (o.tag = i), o);
2406
2406
  }
2407
- function wn(e, t, n, r, i) {
2407
+ function Cn(e, t, n, r, i) {
2408
2408
  let a = r.tag, o = a ? t.directives.tagName(a.source, (e) => i(a, "TAG_RESOLVE_FAILED", e)) : null;
2409
2409
  if (n.type === "block-seq") {
2410
2410
  let { anchor: e, newlineAfterProp: t } = r, n = e && a ? e.offset > a.offset ? e : a : e ?? a;
2411
2411
  n && (!t || t.offset < n.offset) && i(n, "MISSING_CHAR", "Missing newline after block sequence props");
2412
2412
  }
2413
2413
  let s = n.type === "block-map" ? "map" : n.type === "block-seq" ? "seq" : n.start.source === "{" ? "map" : "seq";
2414
- if (!a || !o || o === "!" || o === U.tagName && s === "map" || o === W.tagName && s === "seq") return Cn(e, t, n, i, o);
2414
+ if (!a || !o || o === "!" || o === W.tagName && s === "map" || o === G.tagName && s === "seq") return Sn(e, t, n, i, o);
2415
2415
  let c = t.schema.tags.find((e) => e.tag === o && e.collection === s);
2416
2416
  if (!c) {
2417
2417
  let r = t.schema.knownTags[o];
2418
2418
  if (r?.collection === s) t.schema.tags.push(Object.assign({}, r, { default: !1 })), c = r;
2419
- else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), Cn(e, t, n, i, o);
2419
+ else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), Sn(e, t, n, i, o);
2420
2420
  }
2421
- let l = Cn(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = j(u) ? u : new z(u);
2421
+ let l = Sn(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = j(u) ? u : new B(u);
2422
2422
  return d.range = l.range, d.tag = o, c?.format && (d.format = c.format), d;
2423
2423
  }
2424
2424
  //#endregion
2425
2425
  //#region node_modules/yaml/browser/dist/compose/resolve-block-scalar.js
2426
- function Tn(e, t, n) {
2427
- let r = t.offset, i = En(t, e.options.strict, n);
2426
+ function wn(e, t, n) {
2427
+ let r = t.offset, i = Tn(t, e.options.strict, n);
2428
2428
  if (!i) return {
2429
2429
  value: "",
2430
2430
  type: null,
@@ -2435,7 +2435,7 @@ function Tn(e, t, n) {
2435
2435
  r
2436
2436
  ]
2437
2437
  };
2438
- let a = i.mode === ">" ? z.BLOCK_FOLDED : z.BLOCK_LITERAL, o = t.source ? Dn(t.source) : [], s = o.length;
2438
+ let a = i.mode === ">" ? B.BLOCK_FOLDED : B.BLOCK_LITERAL, o = t.source ? En(t.source) : [], s = o.length;
2439
2439
  for (let e = o.length - 1; e >= 0; --e) {
2440
2440
  let t = o[e][1];
2441
2441
  if (t === "" || t === "\r") s = e;
@@ -2476,7 +2476,7 @@ function Tn(e, t, n) {
2476
2476
  let e = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
2477
2477
  n(l - r.length - (s ? 2 : 1), "BAD_INDENT", e), t = "";
2478
2478
  }
2479
- a === z.BLOCK_LITERAL ? (d += f + t.slice(c) + r, f = "\n") : t.length > c || r[0] === " " ? (f === " " ? f = "\n" : !p && f === "\n" && (f = "\n\n"), d += f + t.slice(c) + r, f = "\n", p = !0) : r === "" ? f === "\n" ? d += "\n" : f = "\n" : (d += f + r, f = " ", p = !1);
2479
+ a === B.BLOCK_LITERAL ? (d += f + t.slice(c) + r, f = "\n") : t.length > c || r[0] === " " ? (f === " " ? f = "\n" : !p && f === "\n" && (f = "\n\n"), d += f + t.slice(c) + r, f = "\n", p = !0) : r === "" ? f === "\n" ? d += "\n" : f = "\n" : (d += f + r, f = " ", p = !1);
2480
2480
  }
2481
2481
  switch (i.chomp) {
2482
2482
  case "-": break;
@@ -2498,7 +2498,7 @@ function Tn(e, t, n) {
2498
2498
  ]
2499
2499
  };
2500
2500
  }
2501
- function En({ offset: e, props: t }, n, r) {
2501
+ function Tn({ offset: e, props: t }, n, r) {
2502
2502
  /* istanbul ignore if should not happen */
2503
2503
  if (t[0].type !== "block-scalar-header") return r(t[0], "IMPOSSIBLE", "Block scalar header not found"), null;
2504
2504
  let { source: i } = t[0], a = i[0], o = 0, s = "", c = -1;
@@ -2541,24 +2541,24 @@ function En({ offset: e, props: t }, n, r) {
2541
2541
  length: d
2542
2542
  };
2543
2543
  }
2544
- function Dn(e) {
2544
+ function En(e) {
2545
2545
  let t = e.split(/\n( *)/), n = t[0], r = n.match(/^( *)/), i = [r?.[1] ? [r[1], n.slice(r[1].length)] : ["", n]];
2546
2546
  for (let e = 1; e < t.length; e += 2) i.push([t[e], t[e + 1]]);
2547
2547
  return i;
2548
2548
  }
2549
2549
  //#endregion
2550
2550
  //#region node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
2551
- function On(e, t, n) {
2551
+ function Dn(e, t, n) {
2552
2552
  let { offset: r, type: i, source: a, end: o } = e, s, c, l = (e, t, i) => n(r + e, t, i);
2553
2553
  switch (i) {
2554
2554
  case "scalar":
2555
- s = z.PLAIN, c = kn(a, l);
2555
+ s = B.PLAIN, c = On(a, l);
2556
2556
  break;
2557
2557
  case "single-quoted-scalar":
2558
- s = z.QUOTE_SINGLE, c = An(a, l);
2558
+ s = B.QUOTE_SINGLE, c = kn(a, l);
2559
2559
  break;
2560
2560
  case "double-quoted-scalar":
2561
- s = z.QUOTE_DOUBLE, c = Mn(a, l);
2561
+ s = B.QUOTE_DOUBLE, c = jn(a, l);
2562
2562
  break;
2563
2563
  /* istanbul ignore next should not happen */
2564
2564
  default: return n(e, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
@@ -2572,7 +2572,7 @@ function On(e, t, n) {
2572
2572
  ]
2573
2573
  };
2574
2574
  }
2575
- let u = r + a.length, d = yn(o, u, t, n);
2575
+ let u = r + a.length, d = vn(o, u, t, n);
2576
2576
  return {
2577
2577
  value: c,
2578
2578
  type: s,
@@ -2584,7 +2584,7 @@ function On(e, t, n) {
2584
2584
  ]
2585
2585
  };
2586
2586
  }
2587
- function kn(e, t) {
2587
+ function On(e, t) {
2588
2588
  let n = "";
2589
2589
  switch (e[0]) {
2590
2590
  /* istanbul ignore next should not happen */
@@ -2604,12 +2604,12 @@ function kn(e, t) {
2604
2604
  case "@":
2605
2605
  case "`": n = `reserved character ${e[0]}`;
2606
2606
  }
2607
- return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`), jn(e);
2607
+ return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`), An(e);
2608
2608
  }
2609
- function An(e, t) {
2610
- return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), jn(e.slice(1, -1)).replace(/''/g, "'");
2609
+ function kn(e, t) {
2610
+ return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), An(e.slice(1, -1)).replace(/''/g, "'");
2611
2611
  }
2612
- function jn(e) {
2612
+ function An(e) {
2613
2613
  let t, n;
2614
2614
  try {
2615
2615
  t = /* @__PURE__ */ RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy"), n = /* @__PURE__ */ RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
@@ -2623,22 +2623,22 @@ function jn(e) {
2623
2623
  let s = /[ \t]*(.*)/sy;
2624
2624
  return s.lastIndex = o, r = s.exec(e), i + a + (r?.[1] ?? "");
2625
2625
  }
2626
- function Mn(e, t) {
2626
+ function jn(e, t) {
2627
2627
  let n = "";
2628
2628
  for (let r = 1; r < e.length - 1; ++r) {
2629
2629
  let i = e[r];
2630
2630
  if (i !== "\r" || e[r + 1] !== "\n") {
2631
2631
  if (i === "\n") {
2632
- let { fold: t, offset: i } = Nn(e, r);
2632
+ let { fold: t, offset: i } = Mn(e, r);
2633
2633
  n += t, r = i;
2634
2634
  } else if (i === "\\") {
2635
- let i = e[++r], a = Pn[i];
2635
+ let i = e[++r], a = Nn[i];
2636
2636
  if (a) n += a;
2637
2637
  else if (i === "\n") for (i = e[r + 1]; i === " " || i === " ";) i = e[++r + 1];
2638
2638
  else if (i === "\r" && e[r + 1] === "\n") for (i = e[++r + 1]; i === " " || i === " ";) i = e[++r + 1];
2639
2639
  else if (i === "x" || i === "u" || i === "U") {
2640
2640
  let a = i === "x" ? 2 : i === "u" ? 4 : 8;
2641
- n += Fn(e, r + 1, a, t), r += a;
2641
+ n += Pn(e, r + 1, a, t), r += a;
2642
2642
  } else {
2643
2643
  let i = e.substr(r - 1, 2);
2644
2644
  t(r - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), n += i;
@@ -2652,7 +2652,7 @@ function Mn(e, t) {
2652
2652
  }
2653
2653
  return (e[e.length - 1] !== "\"" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing \"quote"), n;
2654
2654
  }
2655
- function Nn(e, t) {
2655
+ function Mn(e, t) {
2656
2656
  let n = "", r = e[t + 1];
2657
2657
  for (; (r === " " || r === " " || r === "\n" || r === "\r") && (r !== "\r" || e[t + 2] === "\n");) r === "\n" && (n += "\n"), t += 1, r = e[t + 1];
2658
2658
  return n ||= " ", {
@@ -2660,7 +2660,7 @@ function Nn(e, t) {
2660
2660
  offset: t
2661
2661
  };
2662
2662
  }
2663
- var Pn = {
2663
+ var Nn = {
2664
2664
  0: "\0",
2665
2665
  a: "\x07",
2666
2666
  b: "\b",
@@ -2680,7 +2680,7 @@ var Pn = {
2680
2680
  "\\": "\\",
2681
2681
  " ": " "
2682
2682
  };
2683
- function Fn(e, t, n, r) {
2683
+ function Pn(e, t, n, r) {
2684
2684
  let i = e.substr(t, n), a = i.length === n && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
2685
2685
  try {
2686
2686
  return String.fromCodePoint(a);
@@ -2691,20 +2691,20 @@ function Fn(e, t, n, r) {
2691
2691
  }
2692
2692
  //#endregion
2693
2693
  //#region node_modules/yaml/browser/dist/compose/compose-scalar.js
2694
- function In(e, t, n, r) {
2695
- let { value: i, type: a, comment: o, range: s } = t.type === "block-scalar" ? Tn(e, t, r) : On(t, e.options.strict, r), c = n ? e.directives.tagName(n.source, (e) => r(n, "TAG_RESOLVE_FAILED", e)) : null, l;
2696
- l = e.options.stringKeys && e.atKey ? e.schema[x] : c ? Ln(e.schema, i, c, n, r) : t.type === "scalar" ? Rn(e, i, t, r) : e.schema[x];
2694
+ function Fn(e, t, n, r) {
2695
+ let { value: i, type: a, comment: o, range: s } = t.type === "block-scalar" ? wn(e, t, r) : Dn(t, e.options.strict, r), c = n ? e.directives.tagName(n.source, (e) => r(n, "TAG_RESOLVE_FAILED", e)) : null, l;
2696
+ l = e.options.stringKeys && e.atKey ? e.schema[x] : c ? In(e.schema, i, c, n, r) : t.type === "scalar" ? Ln(e, i, t, r) : e.schema[x];
2697
2697
  let u;
2698
2698
  try {
2699
2699
  let a = l.resolve(i, (e) => r(n ?? t, "TAG_RESOLVE_FAILED", e), e.options);
2700
- u = O(a) ? a : new z(a);
2700
+ u = O(a) ? a : new B(a);
2701
2701
  } catch (e) {
2702
2702
  let a = e instanceof Error ? e.message : String(e);
2703
- r(n ?? t, "TAG_RESOLVE_FAILED", a), u = new z(i);
2703
+ r(n ?? t, "TAG_RESOLVE_FAILED", a), u = new B(i);
2704
2704
  }
2705
2705
  return u.range = s, u.source = i, a && (u.type = a), c && (u.tag = c), l.format && (u.format = l.format), o && (u.comment = o), u;
2706
2706
  }
2707
- function Ln(e, t, n, r, i) {
2707
+ function In(e, t, n, r, i) {
2708
2708
  if (n === "!") return e[x];
2709
2709
  let a = [];
2710
2710
  for (let t of e.tags) if (!t.collection && t.tag === n) {
@@ -2718,7 +2718,7 @@ function Ln(e, t, n, r, i) {
2718
2718
  test: void 0
2719
2719
  })), o) : (i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${n}`, n !== "tag:yaml.org,2002:str"), e[x]);
2720
2720
  }
2721
- function Rn({ atKey: e, directives: t, schema: n }, r, i, a) {
2721
+ function Ln({ atKey: e, directives: t, schema: n }, r, i, a) {
2722
2722
  let o = n.tags.find((t) => (t.default === !0 || e && t.default === "key") && t.test?.test(r)) || n[x];
2723
2723
  if (n.compat) {
2724
2724
  let e = n.compat.find((e) => e.default && e.test?.test(r)) ?? n[x];
@@ -2728,7 +2728,7 @@ function Rn({ atKey: e, directives: t, schema: n }, r, i, a) {
2728
2728
  }
2729
2729
  //#endregion
2730
2730
  //#region node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
2731
- function zn(e, t, n) {
2731
+ function Rn(e, t, n) {
2732
2732
  if (t) {
2733
2733
  n ??= t.length;
2734
2734
  for (let r = n - 1; r >= 0; --r) {
@@ -2748,48 +2748,48 @@ function zn(e, t, n) {
2748
2748
  }
2749
2749
  //#endregion
2750
2750
  //#region node_modules/yaml/browser/dist/compose/compose-node.js
2751
- var Bn = {
2752
- composeNode: Vn,
2753
- composeEmptyNode: Hn
2751
+ var zn = {
2752
+ composeNode: Bn,
2753
+ composeEmptyNode: Vn
2754
2754
  };
2755
- function Vn(e, t, n, r) {
2755
+ function Bn(e, t, n, r) {
2756
2756
  let i = e.atKey, { spaceBefore: a, comment: o, anchor: s, tag: c } = n, l, u = !0;
2757
2757
  switch (t.type) {
2758
2758
  case "alias":
2759
- l = Un(e, t, r), (s || c) && r(t, "ALIAS_PROPS", "An alias node must not specify any properties");
2759
+ l = Hn(e, t, r), (s || c) && r(t, "ALIAS_PROPS", "An alias node must not specify any properties");
2760
2760
  break;
2761
2761
  case "scalar":
2762
2762
  case "single-quoted-scalar":
2763
2763
  case "double-quoted-scalar":
2764
2764
  case "block-scalar":
2765
- l = In(e, t, c, r), s && (l.anchor = s.source.substring(1));
2765
+ l = Fn(e, t, c, r), s && (l.anchor = s.source.substring(1));
2766
2766
  break;
2767
2767
  case "block-map":
2768
2768
  case "block-seq":
2769
2769
  case "flow-collection":
2770
2770
  try {
2771
- l = wn(Bn, e, t, n, r), s && (l.anchor = s.source.substring(1));
2771
+ l = Cn(zn, e, t, n, r), s && (l.anchor = s.source.substring(1));
2772
2772
  } catch (e) {
2773
2773
  r(t, "RESOURCE_EXHAUSTION", e instanceof Error ? e.message : String(e));
2774
2774
  }
2775
2775
  break;
2776
2776
  default: r(t, "UNEXPECTED_TOKEN", t.type === "error" ? t.message : `Unsupported token (type: ${t.type})`), u = !1;
2777
2777
  }
2778
- return l ??= Hn(e, t.offset, void 0, null, n, r), s && l.anchor === "" && r(s, "BAD_ALIAS", "Anchor cannot be an empty string"), i && e.options.stringKeys && (!O(l) || typeof l.value != "string" || l.tag && l.tag !== "tag:yaml.org,2002:str") && r(c ?? t, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), a && (l.spaceBefore = !0), o && (t.type === "scalar" && t.source === "" ? l.comment = o : l.commentBefore = o), e.options.keepSourceTokens && u && (l.srcToken = t), l;
2778
+ return l ??= Vn(e, t.offset, void 0, null, n, r), s && l.anchor === "" && r(s, "BAD_ALIAS", "Anchor cannot be an empty string"), i && e.options.stringKeys && (!O(l) || typeof l.value != "string" || l.tag && l.tag !== "tag:yaml.org,2002:str") && r(c ?? t, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), a && (l.spaceBefore = !0), o && (t.type === "scalar" && t.source === "" ? l.comment = o : l.commentBefore = o), e.options.keepSourceTokens && u && (l.srcToken = t), l;
2779
2779
  }
2780
- function Hn(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c }, l) {
2781
- let u = In(e, {
2780
+ function Vn(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c }, l) {
2781
+ let u = Fn(e, {
2782
2782
  type: "scalar",
2783
- offset: zn(t, n, r),
2783
+ offset: Rn(t, n, r),
2784
2784
  indent: -1,
2785
2785
  source: ""
2786
2786
  }, s, l);
2787
2787
  return o && (u.anchor = o.source.substring(1), u.anchor === "" && l(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (u.spaceBefore = !0), a && (u.comment = a, u.range[2] = c), u;
2788
2788
  }
2789
- function Un({ options: e }, { offset: t, source: n, end: r }, i) {
2790
- let a = new me(n.substring(1));
2789
+ function Hn({ options: e }, { offset: t, source: n, end: r }, i) {
2790
+ let a = new pe(n.substring(1));
2791
2791
  a.source === "" && i(t, "BAD_ALIAS", "Alias cannot be an empty string"), a.source.endsWith(":") && i(t + n.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
2792
- let o = t + n.length, s = yn(r, o, e.strict, i);
2792
+ let o = t + n.length, s = vn(r, o, e.strict, i);
2793
2793
  return a.range = [
2794
2794
  t,
2795
2795
  o,
@@ -2798,14 +2798,14 @@ function Un({ options: e }, { offset: t, source: n, end: r }, i) {
2798
2798
  }
2799
2799
  //#endregion
2800
2800
  //#region node_modules/yaml/browser/dist/compose/compose-doc.js
2801
- function Wn(e, t, { offset: n, start: r, value: i, end: a }, o) {
2802
- let s = new on(void 0, Object.assign({ _directives: t }, e)), c = {
2801
+ function Un(e, t, { offset: n, start: r, value: i, end: a }, o) {
2802
+ let s = new an(void 0, Object.assign({ _directives: t }, e)), c = {
2803
2803
  atKey: !1,
2804
2804
  atRoot: !0,
2805
2805
  directives: s.directives,
2806
2806
  options: s.options,
2807
2807
  schema: s.schema
2808
- }, l = fn(r, {
2808
+ }, l = dn(r, {
2809
2809
  indicator: "doc-start",
2810
2810
  next: i ?? a?.[0],
2811
2811
  offset: n,
@@ -2813,8 +2813,8 @@ function Wn(e, t, { offset: n, start: r, value: i, end: a }, o) {
2813
2813
  parentIndent: 0,
2814
2814
  startOnNewline: !0
2815
2815
  });
2816
- l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ? Vn(c, i, l, o) : Hn(c, l.end, r, null, l, o);
2817
- let u = s.contents.range[2], d = yn(a, u, !1, o);
2816
+ l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ? Bn(c, i, l, o) : Vn(c, l.end, r, null, l, o);
2817
+ let u = s.contents.range[2], d = vn(a, u, !1, o);
2818
2818
  return d.comment && (s.comment = d.comment), s.range = [
2819
2819
  n,
2820
2820
  u,
@@ -2823,13 +2823,13 @@ function Wn(e, t, { offset: n, start: r, value: i, end: a }, o) {
2823
2823
  }
2824
2824
  //#endregion
2825
2825
  //#region node_modules/yaml/browser/dist/compose/composer.js
2826
- function Gn(e) {
2826
+ function Wn(e) {
2827
2827
  if (typeof e == "number") return [e, e + 1];
2828
2828
  if (Array.isArray(e)) return e.length === 2 ? e : [e[0], e[1]];
2829
2829
  let { offset: t, source: n } = e;
2830
2830
  return [t, t + (typeof n == "string" ? n.length : 1)];
2831
2831
  }
2832
- function Kn(e) {
2832
+ function Gn(e) {
2833
2833
  let t = "", n = !1, r = !1;
2834
2834
  for (let i = 0; i < e.length; ++i) {
2835
2835
  let a = e[i];
@@ -2848,15 +2848,15 @@ function Kn(e) {
2848
2848
  afterEmptyLine: r
2849
2849
  };
2850
2850
  }
2851
- var qn = class {
2851
+ var Kn = class {
2852
2852
  constructor(e = {}) {
2853
2853
  this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (e, t, n, r) => {
2854
- let i = Gn(e);
2855
- r ? this.warnings.push(new un(i, t, n)) : this.errors.push(new ln(i, t, n));
2856
- }, this.directives = new se({ version: e.version || "1.2" }), this.options = e;
2854
+ let i = Wn(e);
2855
+ r ? this.warnings.push(new ln(i, t, n)) : this.errors.push(new cn(i, t, n));
2856
+ }, this.directives = new R({ version: e.version || "1.2" }), this.options = e;
2857
2857
  }
2858
2858
  decorate(e, t) {
2859
- let { comment: n, afterEmptyLine: r } = Kn(this.prelude);
2859
+ let { comment: n, afterEmptyLine: r } = Gn(this.prelude);
2860
2860
  if (n) {
2861
2861
  let i = e.contents;
2862
2862
  if (t) e.comment = e.comment ? `${e.comment}\n${n}` : n;
@@ -2879,7 +2879,7 @@ var qn = class {
2879
2879
  }
2880
2880
  streamInfo() {
2881
2881
  return {
2882
- comment: Kn(this.prelude).comment,
2882
+ comment: Gn(this.prelude).comment,
2883
2883
  directives: this.directives,
2884
2884
  errors: this.errors,
2885
2885
  warnings: this.warnings
@@ -2893,12 +2893,12 @@ var qn = class {
2893
2893
  switch (e.type) {
2894
2894
  case "directive":
2895
2895
  this.directives.add(e.source, (t, n, r) => {
2896
- let i = Gn(e);
2896
+ let i = Wn(e);
2897
2897
  i[0] += t, this.onError(i, "BAD_DIRECTIVE", n, r);
2898
2898
  }), this.prelude.push(e.source), this.atDirectives = !0;
2899
2899
  break;
2900
2900
  case "document": {
2901
- let t = Wn(this.options, this.directives, e, this.onError);
2901
+ let t = Un(this.options, this.directives, e, this.onError);
2902
2902
  this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
2903
2903
  break;
2904
2904
  }
@@ -2909,17 +2909,17 @@ var qn = class {
2909
2909
  this.prelude.push(e.source);
2910
2910
  break;
2911
2911
  case "error": {
2912
- let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new ln(Gn(e), "UNEXPECTED_TOKEN", t);
2912
+ let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new cn(Wn(e), "UNEXPECTED_TOKEN", t);
2913
2913
  this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
2914
2914
  break;
2915
2915
  }
2916
2916
  case "doc-end": {
2917
2917
  if (!this.doc) {
2918
- this.errors.push(new ln(Gn(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
2918
+ this.errors.push(new cn(Wn(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
2919
2919
  break;
2920
2920
  }
2921
2921
  this.doc.directives.docEnd = !0;
2922
- let t = yn(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
2922
+ let t = vn(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
2923
2923
  if (this.decorate(this.doc, !0), t.comment) {
2924
2924
  let e = this.doc.comment;
2925
2925
  this.doc.comment = e ? `${e}\n${t.comment}` : t.comment;
@@ -2927,13 +2927,13 @@ var qn = class {
2927
2927
  this.doc.range[2] = t.offset;
2928
2928
  break;
2929
2929
  }
2930
- default: this.errors.push(new ln(Gn(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
2930
+ default: this.errors.push(new cn(Wn(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
2931
2931
  }
2932
2932
  }
2933
2933
  *end(e = !1, t = -1) {
2934
2934
  if (this.doc) this.decorate(this.doc, !0), yield this.doc, this.doc = null;
2935
2935
  else if (e) {
2936
- let e = new on(void 0, Object.assign({ _directives: this.directives }, this.options));
2936
+ let e = new an(void 0, Object.assign({ _directives: this.directives }, this.options));
2937
2937
  this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), e.range = [
2938
2938
  0,
2939
2939
  t,
@@ -2944,24 +2944,24 @@ var qn = class {
2944
2944
  };
2945
2945
  //#endregion
2946
2946
  //#region node_modules/yaml/browser/dist/parse/cst-scalar.js
2947
- function Jn(e, t = !0, n) {
2947
+ function qn(e, t = !0, n) {
2948
2948
  if (e) {
2949
2949
  let r = (e, t, r) => {
2950
2950
  let i = typeof e == "number" ? e : Array.isArray(e) ? e[0] : e.offset;
2951
2951
  if (n) n(i, t, r);
2952
- else throw new ln([i, i + 1], t, r);
2952
+ else throw new cn([i, i + 1], t, r);
2953
2953
  };
2954
2954
  switch (e.type) {
2955
2955
  case "scalar":
2956
2956
  case "single-quoted-scalar":
2957
- case "double-quoted-scalar": return On(e, t, r);
2958
- case "block-scalar": return Tn({ options: { strict: t } }, e, r);
2957
+ case "double-quoted-scalar": return Dn(e, t, r);
2958
+ case "block-scalar": return wn({ options: { strict: t } }, e, r);
2959
2959
  }
2960
2960
  }
2961
2961
  return null;
2962
2962
  }
2963
- function Yn(e, t) {
2964
- let { implicitKey: n = !1, indent: r, inFlow: i = !1, offset: a = -1, type: o = "PLAIN" } = t, s = ze({
2963
+ function Jn(e, t) {
2964
+ let { implicitKey: n = !1, indent: r, inFlow: i = !1, offset: a = -1, type: o = "PLAIN" } = t, s = Re({
2965
2965
  type: o,
2966
2966
  value: e
2967
2967
  }, {
@@ -2987,7 +2987,7 @@ function Yn(e, t) {
2987
2987
  indent: r,
2988
2988
  source: t
2989
2989
  }];
2990
- return Qn(i, c) || i.push({
2990
+ return Zn(i, c) || i.push({
2991
2991
  type: "newline",
2992
2992
  offset: -1,
2993
2993
  indent: r,
@@ -3023,7 +3023,7 @@ function Yn(e, t) {
3023
3023
  };
3024
3024
  }
3025
3025
  }
3026
- function Xn(e, t, n = {}) {
3026
+ function Yn(e, t, n = {}) {
3027
3027
  let { afterKey: r = !1, implicitKey: i = !1, inFlow: a = !1, type: o } = n, s = "indent" in e ? e.indent : null;
3028
3028
  if (r && typeof s == "number" && (s += 2), !o) switch (e.type) {
3029
3029
  case "single-quoted-scalar":
@@ -3040,7 +3040,7 @@ function Xn(e, t, n = {}) {
3040
3040
  }
3041
3041
  default: o = "PLAIN";
3042
3042
  }
3043
- let c = ze({
3043
+ let c = Re({
3044
3044
  type: o,
3045
3045
  value: t
3046
3046
  }, {
@@ -3055,18 +3055,18 @@ function Xn(e, t, n = {}) {
3055
3055
  switch (c[0]) {
3056
3056
  case "|":
3057
3057
  case ">":
3058
- Zn(e, c);
3058
+ Xn(e, c);
3059
3059
  break;
3060
3060
  case "\"":
3061
- $n(e, c, "double-quoted-scalar");
3061
+ Qn(e, c, "double-quoted-scalar");
3062
3062
  break;
3063
3063
  case "'":
3064
- $n(e, c, "single-quoted-scalar");
3064
+ Qn(e, c, "single-quoted-scalar");
3065
3065
  break;
3066
- default: $n(e, c, "scalar");
3066
+ default: Qn(e, c, "scalar");
3067
3067
  }
3068
3068
  }
3069
- function Zn(e, t) {
3069
+ function Xn(e, t) {
3070
3070
  let n = t.indexOf("\n"), r = t.substring(0, n), i = t.substring(n + 1) + "\n";
3071
3071
  if (e.type === "block-scalar") {
3072
3072
  let t = e.props[0];
@@ -3079,7 +3079,7 @@ function Zn(e, t) {
3079
3079
  indent: n,
3080
3080
  source: r
3081
3081
  }];
3082
- Qn(a, "end" in e ? e.end : void 0) || a.push({
3082
+ Zn(a, "end" in e ? e.end : void 0) || a.push({
3083
3083
  type: "newline",
3084
3084
  offset: -1,
3085
3085
  indent: n,
@@ -3094,7 +3094,7 @@ function Zn(e, t) {
3094
3094
  });
3095
3095
  }
3096
3096
  }
3097
- function Qn(e, t) {
3097
+ function Zn(e, t) {
3098
3098
  if (t) for (let n of t) switch (n.type) {
3099
3099
  case "space":
3100
3100
  case "comment":
@@ -3104,7 +3104,7 @@ function Qn(e, t) {
3104
3104
  }
3105
3105
  return !1;
3106
3106
  }
3107
- function $n(e, t, n) {
3107
+ function Qn(e, t, n) {
3108
3108
  switch (e.type) {
3109
3109
  case "scalar":
3110
3110
  case "double-quoted-scalar":
@@ -3151,28 +3151,28 @@ function $n(e, t, n) {
3151
3151
  }
3152
3152
  //#endregion
3153
3153
  //#region node_modules/yaml/browser/dist/parse/cst-stringify.js
3154
- var er = (e) => "type" in e ? tr(e) : nr(e);
3155
- function tr(e) {
3154
+ var $n = (e) => "type" in e ? er(e) : tr(e);
3155
+ function er(e) {
3156
3156
  switch (e.type) {
3157
3157
  case "block-scalar": {
3158
3158
  let t = "";
3159
- for (let n of e.props) t += tr(n);
3159
+ for (let n of e.props) t += er(n);
3160
3160
  return t + e.source;
3161
3161
  }
3162
3162
  case "block-map":
3163
3163
  case "block-seq": {
3164
3164
  let t = "";
3165
- for (let n of e.items) t += nr(n);
3165
+ for (let n of e.items) t += tr(n);
3166
3166
  return t;
3167
3167
  }
3168
3168
  case "flow-collection": {
3169
3169
  let t = e.start.source;
3170
- for (let n of e.items) t += nr(n);
3170
+ for (let n of e.items) t += tr(n);
3171
3171
  for (let n of e.end) t += n.source;
3172
3172
  return t;
3173
3173
  }
3174
3174
  case "document": {
3175
- let t = nr(e);
3175
+ let t = tr(e);
3176
3176
  if (e.end) for (let n of e.end) t += n.source;
3177
3177
  return t;
3178
3178
  }
@@ -3183,22 +3183,22 @@ function tr(e) {
3183
3183
  }
3184
3184
  }
3185
3185
  }
3186
- function nr({ start: e, key: t, sep: n, value: r }) {
3186
+ function tr({ start: e, key: t, sep: n, value: r }) {
3187
3187
  let i = "";
3188
3188
  for (let t of e) i += t.source;
3189
- if (t && (i += tr(t)), n) for (let e of n) i += e.source;
3190
- return r && (i += tr(r)), i;
3189
+ if (t && (i += er(t)), n) for (let e of n) i += e.source;
3190
+ return r && (i += er(r)), i;
3191
3191
  }
3192
3192
  //#endregion
3193
3193
  //#region node_modules/yaml/browser/dist/parse/cst-visit.js
3194
- var rr = Symbol("break visit"), ir = Symbol("skip children"), ar = Symbol("remove item");
3195
- function or(e, t) {
3194
+ var nr = Symbol("break visit"), rr = Symbol("skip children"), ir = Symbol("remove item");
3195
+ function ar(e, t) {
3196
3196
  "type" in e && e.type === "document" && (e = {
3197
3197
  start: e.start,
3198
3198
  value: e.value
3199
- }), sr(Object.freeze([]), e, t);
3199
+ }), or(Object.freeze([]), e, t);
3200
3200
  }
3201
- or.BREAK = rr, or.SKIP = ir, or.REMOVE = ar, or.itemAtPath = (e, t) => {
3201
+ ar.BREAK = nr, ar.SKIP = rr, ar.REMOVE = ir, ar.itemAtPath = (e, t) => {
3202
3202
  let n = e;
3203
3203
  for (let [e, r] of t) {
3204
3204
  let t = n?.[e];
@@ -3206,22 +3206,22 @@ or.BREAK = rr, or.SKIP = ir, or.REMOVE = ar, or.itemAtPath = (e, t) => {
3206
3206
  else return;
3207
3207
  }
3208
3208
  return n;
3209
- }, or.parentCollection = (e, t) => {
3210
- let n = or.itemAtPath(e, t.slice(0, -1)), r = t[t.length - 1][0], i = n?.[r];
3209
+ }, ar.parentCollection = (e, t) => {
3210
+ let n = ar.itemAtPath(e, t.slice(0, -1)), r = t[t.length - 1][0], i = n?.[r];
3211
3211
  if (i && "items" in i) return i;
3212
3212
  throw Error("Parent collection not found");
3213
3213
  };
3214
- function sr(e, t, n) {
3214
+ function or(e, t, n) {
3215
3215
  let r = n(t, e);
3216
3216
  if (typeof r == "symbol") return r;
3217
3217
  for (let i of ["key", "value"]) {
3218
3218
  let a = t[i];
3219
3219
  if (a && "items" in a) {
3220
3220
  for (let t = 0; t < a.items.length; ++t) {
3221
- let r = sr(Object.freeze(e.concat([[i, t]])), a.items[t], n);
3221
+ let r = or(Object.freeze(e.concat([[i, t]])), a.items[t], n);
3222
3222
  if (typeof r == "number") t = r - 1;
3223
- else if (r === rr) return rr;
3224
- else r === ar && (a.items.splice(t, 1), --t);
3223
+ else if (r === nr) return nr;
3224
+ else r === ir && (a.items.splice(t, 1), --t);
3225
3225
  }
3226
3226
  typeof r == "function" && i === "key" && (r = r(t, e));
3227
3227
  }
@@ -3230,23 +3230,23 @@ function sr(e, t, n) {
3230
3230
  }
3231
3231
  //#endregion
3232
3232
  //#region node_modules/yaml/browser/dist/parse/cst.js
3233
- var cr = /* @__PURE__ */ d({
3233
+ var sr = /* @__PURE__ */ d({
3234
3234
  BOM: () => "",
3235
3235
  DOCUMENT: () => "",
3236
3236
  FLOW_END: () => "",
3237
3237
  SCALAR: () => "",
3238
- createScalarToken: () => Yn,
3239
- isCollection: () => lr,
3240
- isScalar: () => ur,
3241
- prettyToken: () => dr,
3242
- resolveAsScalar: () => Jn,
3243
- setScalarValue: () => Xn,
3244
- stringify: () => er,
3245
- tokenType: () => fr,
3246
- visit: () => or
3247
- }), lr = (e) => !!e && "items" in e, ur = (e) => !!e && (e.type === "scalar" || e.type === "single-quoted-scalar" || e.type === "double-quoted-scalar" || e.type === "block-scalar");
3238
+ createScalarToken: () => Jn,
3239
+ isCollection: () => cr,
3240
+ isScalar: () => lr,
3241
+ prettyToken: () => ur,
3242
+ resolveAsScalar: () => qn,
3243
+ setScalarValue: () => Yn,
3244
+ stringify: () => $n,
3245
+ tokenType: () => dr,
3246
+ visit: () => ar
3247
+ }), cr = (e) => !!e && "items" in e, lr = (e) => !!e && (e.type === "scalar" || e.type === "single-quoted-scalar" || e.type === "double-quoted-scalar" || e.type === "block-scalar");
3248
3248
  /* istanbul ignore next */
3249
- function dr(e) {
3249
+ function ur(e) {
3250
3250
  switch (e) {
3251
3251
  case "": return "<BOM>";
3252
3252
  case "": return "<DOC>";
@@ -3255,7 +3255,7 @@ function dr(e) {
3255
3255
  default: return JSON.stringify(e);
3256
3256
  }
3257
3257
  }
3258
- function fr(e) {
3258
+ function dr(e) {
3259
3259
  switch (e) {
3260
3260
  case "": return "byte-order-mark";
3261
3261
  case "": return "doc-mode";
@@ -3292,7 +3292,7 @@ function fr(e) {
3292
3292
  }
3293
3293
  //#endregion
3294
3294
  //#region node_modules/yaml/browser/dist/parse/lexer.js
3295
- function K(e) {
3295
+ function q(e) {
3296
3296
  switch (e) {
3297
3297
  case void 0:
3298
3298
  case " ":
@@ -3302,7 +3302,7 @@ function K(e) {
3302
3302
  default: return !1;
3303
3303
  }
3304
3304
  }
3305
- var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), hr = /* @__PURE__ */ new Set(",[]{}"), gr = /* @__PURE__ */ new Set(" ,[]{}\n\r "), _r = (e) => !e || gr.has(e), vr = class {
3305
+ var fr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), pr = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), mr = /* @__PURE__ */ new Set(",[]{}"), hr = /* @__PURE__ */ new Set(" ,[]{}\n\r "), gr = (e) => !e || hr.has(e), _r = class {
3306
3306
  constructor() {
3307
3307
  this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
3308
3308
  }
@@ -3336,7 +3336,7 @@ var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */
3336
3336
  }
3337
3337
  if (t === "-" || t === ".") {
3338
3338
  let t = this.buffer.substr(e, 3);
3339
- if ((t === "---" || t === "...") && K(this.buffer[e + 3])) return -1;
3339
+ if ((t === "---" || t === "...") && q(this.buffer[e + 3])) return -1;
3340
3340
  }
3341
3341
  return e;
3342
3342
  }
@@ -3398,14 +3398,14 @@ var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */
3398
3398
  if (e === "-" || e === ".") {
3399
3399
  if (!this.atEnd && !this.hasChars(4)) return this.setNext("line-start");
3400
3400
  let e = this.peek(3);
3401
- if ((e === "---" || e === "...") && K(this.charAt(3))) return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, e === "---" ? "doc" : "stream";
3401
+ if ((e === "---" || e === "...") && q(this.charAt(3))) return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, e === "---" ? "doc" : "stream";
3402
3402
  }
3403
- return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !K(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
3403
+ return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !q(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
3404
3404
  }
3405
3405
  *parseBlockStart() {
3406
3406
  let [e, t] = this.peek(2);
3407
3407
  if (!t && !this.atEnd) return this.setNext("block-start");
3408
- if ((e === "-" || e === "?" || e === ":") && K(t)) {
3408
+ if ((e === "-" || e === "?" || e === ":") && q(t)) {
3409
3409
  let e = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
3410
3410
  return this.indentNext = this.indentValue + 1, this.indentValue += e, "block-start";
3411
3411
  }
@@ -3423,7 +3423,7 @@ var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */
3423
3423
  case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
3424
3424
  case "}":
3425
3425
  case "]": return yield* this.pushCount(1), "doc";
3426
- case "*": return yield* this.pushUntil(_r), "doc";
3426
+ case "*": return yield* this.pushUntil(gr), "doc";
3427
3427
  case "\"":
3428
3428
  case "'": return yield* this.parseQuotedScalar();
3429
3429
  case "|":
@@ -3438,7 +3438,7 @@ var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */
3438
3438
  while (e + t > 0);
3439
3439
  let r = this.getLine();
3440
3440
  if (r === null) return this.setNext("flow");
3441
- if ((n !== -1 && n < this.indentNext && r[0] !== "#" || n === 0 && (r.startsWith("---") || r.startsWith("...")) && K(r[3])) && (n !== this.indentNext - 1 || this.flowLevel !== 1 || r[0] !== "]" && r[0] !== "}")) return this.flowLevel = 0, yield "", yield* this.parseLineStart();
3441
+ if ((n !== -1 && n < this.indentNext && r[0] !== "#" || n === 0 && (r.startsWith("---") || r.startsWith("...")) && q(r[3])) && (n !== this.indentNext - 1 || this.flowLevel !== 1 || r[0] !== "]" && r[0] !== "}")) return this.flowLevel = 0, yield "", yield* this.parseLineStart();
3442
3442
  let i = 0;
3443
3443
  for (; r[i] === ",";) i += yield* this.pushCount(1), i += yield* this.pushSpaces(!0), this.flowKey = !1;
3444
3444
  switch (i += yield* this.pushIndicators(), r[i]) {
@@ -3448,12 +3448,12 @@ var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */
3448
3448
  case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
3449
3449
  case "}":
3450
3450
  case "]": return yield* this.pushCount(1), this.flowKey = !0, --this.flowLevel, this.flowLevel ? "flow" : "doc";
3451
- case "*": return yield* this.pushUntil(_r), "flow";
3451
+ case "*": return yield* this.pushUntil(gr), "flow";
3452
3452
  case "\"":
3453
3453
  case "'": return this.flowKey = !0, yield* this.parseQuotedScalar();
3454
3454
  case ":": {
3455
3455
  let e = this.charAt(1);
3456
- if (this.flowKey || K(e) || e === ",") return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
3456
+ if (this.flowKey || q(e) || e === ",") return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
3457
3457
  }
3458
3458
  default: return this.flowKey = !1, yield* this.parsePlainScalar();
3459
3459
  }
@@ -3491,7 +3491,7 @@ var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */
3491
3491
  else if (t > "0" && t <= "9") this.blockScalarIndent = Number(t) - 1;
3492
3492
  else if (t !== "-") break;
3493
3493
  }
3494
- return yield* this.pushUntil((e) => K(e) || e === "#");
3494
+ return yield* this.pushUntil((e) => q(e) || e === "#");
3495
3495
  }
3496
3496
  *parseBlockScalar() {
3497
3497
  let e = this.pos - 1, t = 0, n;
@@ -3541,18 +3541,18 @@ var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */
3541
3541
  let e = this.flowLevel > 0, t = this.pos - 1, n = this.pos - 1, r;
3542
3542
  for (; r = this.buffer[++n];) if (r === ":") {
3543
3543
  let r = this.buffer[n + 1];
3544
- if (K(r) || e && hr.has(r)) break;
3544
+ if (q(r) || e && mr.has(r)) break;
3545
3545
  t = n;
3546
- } else if (K(r)) {
3546
+ } else if (q(r)) {
3547
3547
  let i = this.buffer[n + 1];
3548
- if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e && hr.has(i)) break;
3548
+ if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e && mr.has(i)) break;
3549
3549
  if (r === "\n") {
3550
3550
  let e = this.continueScalar(n + 1);
3551
3551
  if (e === -1) break;
3552
3552
  n = Math.max(n, e - 2);
3553
3553
  }
3554
3554
  } else {
3555
- if (e && hr.has(r)) break;
3555
+ if (e && mr.has(r)) break;
3556
3556
  t = n;
3557
3557
  }
3558
3558
  return !r && !this.atEnd ? this.setNext("plain-scalar") : (yield "", yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
@@ -3572,13 +3572,13 @@ var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */
3572
3572
  e += yield* this.pushTag(), e += yield* this.pushSpaces(!0);
3573
3573
  continue loop;
3574
3574
  case "&":
3575
- e += yield* this.pushUntil(_r), e += yield* this.pushSpaces(!0);
3575
+ e += yield* this.pushUntil(gr), e += yield* this.pushSpaces(!0);
3576
3576
  continue loop;
3577
3577
  case "-":
3578
3578
  case "?":
3579
3579
  case ":": {
3580
3580
  let t = this.flowLevel > 0, n = this.charAt(1);
3581
- if (K(n) || t && hr.has(n)) {
3581
+ if (q(n) || t && mr.has(n)) {
3582
3582
  t ? this.flowKey &&= !1 : this.indentNext = this.indentValue + 1, e += yield* this.pushCount(1), e += yield* this.pushSpaces(!0);
3583
3583
  continue loop;
3584
3584
  }
@@ -3591,13 +3591,13 @@ var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */
3591
3591
  *pushTag() {
3592
3592
  if (this.charAt(1) === "<") {
3593
3593
  let e = this.pos + 2, t = this.buffer[e];
3594
- for (; !K(t) && t !== ">";) t = this.buffer[++e];
3594
+ for (; !q(t) && t !== ">";) t = this.buffer[++e];
3595
3595
  return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
3596
3596
  }
3597
3597
  {
3598
3598
  let e = this.pos + 1, t = this.buffer[e];
3599
- for (; t;) if (mr.has(t)) t = this.buffer[++e];
3600
- else if (t === "%" && pr.has(this.buffer[e + 1]) && pr.has(this.buffer[e + 2])) t = this.buffer[e += 3];
3599
+ for (; t;) if (pr.has(t)) t = this.buffer[++e];
3600
+ else if (t === "%" && fr.has(this.buffer[e + 1]) && fr.has(this.buffer[e + 2])) t = this.buffer[e += 3];
3601
3601
  else break;
3602
3602
  return yield* this.pushToIndex(e, !1);
3603
3603
  }
@@ -3619,7 +3619,7 @@ var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */
3619
3619
  for (; !e(n);) n = this.buffer[++t];
3620
3620
  return yield* this.pushToIndex(t, !1);
3621
3621
  }
3622
- }, yr = class {
3622
+ }, vr = class {
3623
3623
  constructor() {
3624
3624
  this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
3625
3625
  let t = 0, n = this.lineStarts.length;
@@ -3645,7 +3645,7 @@ var pr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), mr = /* @__PURE__ */
3645
3645
  };
3646
3646
  //#endregion
3647
3647
  //#region node_modules/yaml/browser/dist/parse/parser.js
3648
- function q(e, t) {
3648
+ function yr(e, t) {
3649
3649
  for (let n = 0; n < e.length; ++n) if (e[n].type === t) return !0;
3650
3650
  return !1;
3651
3651
  }
@@ -3698,11 +3698,11 @@ function wr(e, t) {
3698
3698
  else for (let n = 0; n < t.length; ++n) e.push(t[n]);
3699
3699
  }
3700
3700
  function Tr(e) {
3701
- if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !q(t.start, "explicit-key-ind") && !q(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, xr(t.value) ? t.value.end ? wr(t.value.end, t.sep) : t.value.end = t.sep : wr(t.start, t.sep), delete t.sep);
3701
+ if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !yr(t.start, "explicit-key-ind") && !yr(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, xr(t.value) ? t.value.end ? wr(t.value.end, t.sep) : t.value.end = t.sep : wr(t.start, t.sep), delete t.sep);
3702
3702
  }
3703
3703
  var Er = class {
3704
3704
  constructor(e) {
3705
- this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new vr(), this.onNewLine = e;
3705
+ this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new _r(), this.onNewLine = e;
3706
3706
  }
3707
3707
  *parse(e, t = !1) {
3708
3708
  this.onNewLine && this.offset === 0 && this.onNewLine(0);
@@ -3714,7 +3714,7 @@ var Er = class {
3714
3714
  this.atScalar = !1, yield* this.step(), this.offset += e.length;
3715
3715
  return;
3716
3716
  }
3717
- let t = fr(e);
3717
+ let t = dr(e);
3718
3718
  if (!t) {
3719
3719
  let t = `Not a YAML token: ${e}`;
3720
3720
  yield* this.pop({
@@ -4009,7 +4009,7 @@ var Er = class {
4009
4009
  case "map-value-ind":
4010
4010
  if (t.explicitKey) {
4011
4011
  if (!t.sep) {
4012
- if (q(t.start, "newline")) Object.assign(t, {
4012
+ if (yr(t.start, "newline")) Object.assign(t, {
4013
4013
  key: null,
4014
4014
  sep: [this.sourceToken]
4015
4015
  });
@@ -4031,7 +4031,7 @@ var Er = class {
4031
4031
  key: null,
4032
4032
  sep: [this.sourceToken]
4033
4033
  });
4034
- else if (q(t.sep, "map-value-ind")) this.stack.push({
4034
+ else if (yr(t.sep, "map-value-ind")) this.stack.push({
4035
4035
  type: "block-map",
4036
4036
  offset: this.offset,
4037
4037
  indent: this.indent,
@@ -4041,7 +4041,7 @@ var Er = class {
4041
4041
  sep: [this.sourceToken]
4042
4042
  }]
4043
4043
  });
4044
- else if (xr(t.key) && !q(t.sep, "newline")) {
4044
+ else if (xr(t.key) && !yr(t.sep, "newline")) {
4045
4045
  let e = Cr(t.start), n = t.key, r = t.sep;
4046
4046
  r.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
4047
4047
  type: "block-map",
@@ -4058,7 +4058,7 @@ var Er = class {
4058
4058
  start: i,
4059
4059
  key: null,
4060
4060
  sep: [this.sourceToken]
4061
- }) : q(t.sep, "map-value-ind") ? this.stack.push({
4061
+ }) : yr(t.sep, "map-value-ind") ? this.stack.push({
4062
4062
  type: "block-map",
4063
4063
  offset: this.offset,
4064
4064
  indent: this.indent,
@@ -4092,7 +4092,7 @@ var Er = class {
4092
4092
  let r = this.startBlockValue(e);
4093
4093
  if (r) {
4094
4094
  if (r.type === "block-seq") {
4095
- if (!t.explicitKey && t.sep && !q(t.sep, "newline")) {
4095
+ if (!t.explicitKey && t.sep && !yr(t.sep, "newline")) {
4096
4096
  yield* this.pop({
4097
4097
  type: "error",
4098
4098
  offset: this.offset,
@@ -4140,7 +4140,7 @@ var Er = class {
4140
4140
  return;
4141
4141
  case "seq-item-ind":
4142
4142
  if (this.indent !== e.indent) break;
4143
- t.value || q(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4143
+ t.value || yr(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4144
4144
  return;
4145
4145
  }
4146
4146
  if (this.indent > e.indent) {
@@ -4323,30 +4323,30 @@ var Er = class {
4323
4323
  function Dr(e) {
4324
4324
  let t = e.prettyErrors !== !1;
4325
4325
  return {
4326
- lineCounter: e.lineCounter || t && new yr() || null,
4326
+ lineCounter: e.lineCounter || t && new vr() || null,
4327
4327
  prettyErrors: t
4328
4328
  };
4329
4329
  }
4330
4330
  function Or(e, t = {}) {
4331
- let { lineCounter: n, prettyErrors: r } = Dr(t), i = new Er(n?.addNewLine), a = new qn(t), o = Array.from(a.compose(i.parse(e)));
4332
- if (r && n) for (let t of o) t.errors.forEach(dn(e, n)), t.warnings.forEach(dn(e, n));
4331
+ let { lineCounter: n, prettyErrors: r } = Dr(t), i = new Er(n?.addNewLine), a = new Kn(t), o = Array.from(a.compose(i.parse(e)));
4332
+ if (r && n) for (let t of o) t.errors.forEach(un(e, n)), t.warnings.forEach(un(e, n));
4333
4333
  return o.length > 0 ? o : Object.assign([], { empty: !0 }, a.streamInfo());
4334
4334
  }
4335
4335
  function kr(e, t = {}) {
4336
- let { lineCounter: n, prettyErrors: r } = Dr(t), i = new Er(n?.addNewLine), a = new qn(t), o = null;
4336
+ let { lineCounter: n, prettyErrors: r } = Dr(t), i = new Er(n?.addNewLine), a = new Kn(t), o = null;
4337
4337
  for (let t of a.compose(i.parse(e), !0, e.length)) if (!o) o = t;
4338
4338
  else if (o.options.logLevel !== "silent") {
4339
- o.errors.push(new ln(t.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4339
+ o.errors.push(new cn(t.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4340
4340
  break;
4341
4341
  }
4342
- return r && n && (o.errors.forEach(dn(e, n)), o.warnings.forEach(dn(e, n))), o;
4342
+ return r && n && (o.errors.forEach(un(e, n)), o.warnings.forEach(un(e, n))), o;
4343
4343
  }
4344
4344
  function Ar(e, t, n) {
4345
4345
  let r;
4346
4346
  typeof t == "function" ? r = t : n === void 0 && t && typeof t == "object" && (n = t);
4347
4347
  let i = kr(e, n);
4348
4348
  if (!i) return null;
4349
- if (i.warnings.forEach((e) => Ge(i.options.logLevel, e)), i.errors.length > 0) {
4349
+ if (i.warnings.forEach((e) => We(i.options.logLevel, e)), i.errors.length > 0) {
4350
4350
  if (i.options.logLevel !== "silent") throw i.errors[0];
4351
4351
  i.errors = [];
4352
4352
  }
@@ -4362,26 +4362,26 @@ function jr(e, t, n) {
4362
4362
  let { keepUndefined: e } = n ?? t ?? {};
4363
4363
  if (!e) return;
4364
4364
  }
4365
- return T(e) && !r ? e.toString(n) : new on(e, r, n).toString(n);
4365
+ return T(e) && !r ? e.toString(n) : new an(e, r, n).toString(n);
4366
4366
  }
4367
4367
  //#endregion
4368
4368
  //#region node_modules/yaml/browser/index.js
4369
4369
  var Mr = /* @__PURE__ */ d({
4370
- Alias: () => me,
4371
- CST: () => cr,
4372
- Composer: () => qn,
4373
- Document: () => on,
4374
- Lexer: () => vr,
4375
- LineCounter: () => yr,
4376
- Pair: () => H,
4370
+ Alias: () => pe,
4371
+ CST: () => sr,
4372
+ Composer: () => Kn,
4373
+ Document: () => an,
4374
+ Lexer: () => _r,
4375
+ LineCounter: () => vr,
4376
+ Pair: () => U,
4377
4377
  Parser: () => Er,
4378
- Scalar: () => z,
4379
- Schema: () => rn,
4380
- YAMLError: () => cn,
4381
- YAMLMap: () => U,
4382
- YAMLParseError: () => ln,
4383
- YAMLSeq: () => W,
4384
- YAMLWarning: () => un,
4378
+ Scalar: () => B,
4379
+ Schema: () => nn,
4380
+ YAMLError: () => sn,
4381
+ YAMLMap: () => W,
4382
+ YAMLParseError: () => cn,
4383
+ YAMLSeq: () => G,
4384
+ YAMLWarning: () => ln,
4385
4385
  isAlias: () => w,
4386
4386
  isCollection: () => A,
4387
4387
  isDocument: () => T,
@@ -4395,7 +4395,7 @@ var Mr = /* @__PURE__ */ d({
4395
4395
  parseDocument: () => kr,
4396
4396
  stringify: () => jr,
4397
4397
  visit: () => P,
4398
- visitAsync: () => re
4398
+ visitAsync: () => ne
4399
4399
  }), Nr = {
4400
4400
  rawNodes: {
4401
4401
  address: {
@@ -6671,8 +6671,89 @@ function Y(e) {
6671
6671
  return t === "none" || t === "off" || t === "false" ? new ni() : e?.env?.CMS_CACHE_KV ? new ti(e.env.CMS_CACHE_KV) : t === "lru" ? (ri ||= new ei(), ri) : new ni();
6672
6672
  }
6673
6673
  //#endregion
6674
- //#region server/utils/node-assets-interceptor.ts
6674
+ //#region server/storage/provider.ts
6675
6675
  function ii(e) {
6676
+ let t = e.split(".").pop()?.toLowerCase() || "bin";
6677
+ return t = t.replace(/[^a-z0-9]/g, ""), [
6678
+ "php",
6679
+ "exe",
6680
+ "sh",
6681
+ "bat",
6682
+ "cmd",
6683
+ "html",
6684
+ "htm",
6685
+ "js",
6686
+ "mjs",
6687
+ "cjs"
6688
+ ].includes(t) ? "bin" : t;
6689
+ }
6690
+ var ai = class {
6691
+ bucket;
6692
+ publicDomain;
6693
+ constructor(e, t) {
6694
+ this.bucket = e, this.publicDomain = t;
6695
+ }
6696
+ async upload(e, t = "uploads") {
6697
+ let n = ii(e.name), r = `${t}/${crypto.randomUUID().replace(/-/g, "")}.${n}`;
6698
+ return await this.bucket.put(r, e.stream(), { httpMetadata: { contentType: e.type } }), {
6699
+ key: r,
6700
+ url: `https://${this.publicDomain}/${r}`
6701
+ };
6702
+ }
6703
+ async delete(e) {
6704
+ await this.bucket.delete(e);
6705
+ }
6706
+ }, oi = class {
6707
+ customStoragePath;
6708
+ constructor(e) {
6709
+ this.customStoragePath = e;
6710
+ }
6711
+ async upload(e, t = "uploads") {
6712
+ let n = await import(
6713
+ /* @vite-ignore */
6714
+ "node:path"
6715
+ ), r = await import(
6716
+ /* @vite-ignore */
6717
+ "node:fs"
6718
+ ), i = await import(
6719
+ /* @vite-ignore */
6720
+ "node:fs/promises"
6721
+ ), { pipeline: a } = await import(
6722
+ /* @vite-ignore */
6723
+ "node:stream/promises"
6724
+ ), o = ii(e.name), s = `${t}/${crypto.randomUUID().replace(/-/g, "")}.${o}`, c = this.customStoragePath || "./public/media", l = n.resolve(process.cwd(), c), u = n.join(l, s);
6725
+ await i.mkdir(n.dirname(u), { recursive: !0 });
6726
+ let d = r.createWriteStream(u);
6727
+ return await a(e.stream(), d), {
6728
+ key: s,
6729
+ url: `/media/${s}`
6730
+ };
6731
+ }
6732
+ async delete(e) {
6733
+ let t = await import(
6734
+ /* @vite-ignore */
6735
+ "node:path"
6736
+ ), n = await import(
6737
+ /* @vite-ignore */
6738
+ "node:fs/promises"
6739
+ ), r = this.customStoragePath || "./public/media", i = t.resolve(process.cwd(), r), a = t.join(i, e);
6740
+ try {
6741
+ await n.unlink(a);
6742
+ } catch (e) {
6743
+ if (e.code !== "ENOENT") throw e;
6744
+ }
6745
+ }
6746
+ };
6747
+ function si(e) {
6748
+ if (e.MEDIA_BUCKET) {
6749
+ let t = e.CDN_DOMAIN || "cdn.yourdomain.com";
6750
+ return new ai(e.MEDIA_BUCKET, t);
6751
+ }
6752
+ return new oi(e.LOCAL_MEDIA_PATH);
6753
+ }
6754
+ //#endregion
6755
+ //#region server/utils/node-assets-interceptor.ts
6756
+ function ci(e) {
6676
6757
  if (!e || typeof e != "object") return {
6677
6758
  cleanedData: e,
6678
6759
  assetRefs: []
@@ -6712,7 +6793,7 @@ function ii(e) {
6712
6793
  assetRefs: t
6713
6794
  };
6714
6795
  }
6715
- async function ai(e, t, n) {
6796
+ async function li(e, t, n) {
6716
6797
  if (await e.prepare("DELETE FROM node_assets WHERE nodeId = ?").run(t), n.length === 0) return;
6717
6798
  let r = /* @__PURE__ */ new Set();
6718
6799
  for (let i of n) {
@@ -6722,23 +6803,23 @@ async function ai(e, t, n) {
6722
6803
  }
6723
6804
  //#endregion
6724
6805
  //#region server/utils/asset-hydrator.ts
6725
- function oi(e) {
6806
+ function ui(e) {
6726
6807
  if (!e) return null;
6727
6808
  if (typeof e == "string" && e.startsWith("ast_")) return e;
6728
6809
  if (typeof e == "object" && e) {
6729
6810
  if (typeof e.id == "string" && e.id.startsWith("ast_")) return e.id;
6730
- if (typeof e.id == "object") return oi(e.id);
6811
+ if (typeof e.id == "object") return ui(e.id);
6731
6812
  }
6732
6813
  return null;
6733
6814
  }
6734
- async function si(e, t) {
6815
+ async function di(e, t) {
6735
6816
  if (!t || typeof t != "object") return t;
6736
6817
  let n = /* @__PURE__ */ new Set(), r = (e) => {
6737
6818
  if (!e) return;
6738
- let t = oi(e);
6819
+ let t = ui(e);
6739
6820
  if (t) {
6740
6821
  if (n.add(t), typeof e == "object" && e.parentAssetId) {
6741
- let t = oi(e.parentAssetId);
6822
+ let t = ui(e.parentAssetId);
6742
6823
  t && n.add(t);
6743
6824
  }
6744
6825
  } else Array.isArray(e) ? e.forEach(r) : typeof e == "object" && Object.values(e).forEach(r);
@@ -6765,7 +6846,7 @@ async function si(e, t) {
6765
6846
  AND (parentAssetId IN (${i}) OR ${Array.from(n).map(() => "filename LIKE ?").join(" OR ")})
6766
6847
  `).all(...Array.from(n), ...Array.from(n).map((e) => `%${e}%`)), c = Array.isArray(s) ? s : s?.results || [], l = /* @__PURE__ */ new Map();
6767
6848
  for (let e of c) {
6768
- let t = oi(e.parentAssetId) || Array.from(n).find((t) => e.filename.includes(t));
6849
+ let t = ui(e.parentAssetId) || Array.from(n).find((t) => e.filename.includes(t));
6769
6850
  if (!t) continue;
6770
6851
  let r = e.filename.match(/^crop_([a-z0-9]+)_/i), i = r ? r[1] : "standard", a = null;
6771
6852
  if (e.cropCoordinatesJson) try {
@@ -6791,7 +6872,7 @@ async function si(e, t) {
6791
6872
  id: e.id,
6792
6873
  url: t,
6793
6874
  originalUrl: n,
6794
- parentAssetId: oi(e.parentAssetId) || null,
6875
+ parentAssetId: ui(e.parentAssetId) || null,
6795
6876
  cropCoordinates: r,
6796
6877
  variants: i && Object.keys(i).length > 0 ? i : void 0,
6797
6878
  filename: e.filename,
@@ -6800,7 +6881,7 @@ async function si(e, t) {
6800
6881
  }
6801
6882
  let d = (e) => {
6802
6883
  if (!e) return e;
6803
- let t = oi(e);
6884
+ let t = ui(e);
6804
6885
  if (t) {
6805
6886
  let n = u.get(t) || {
6806
6887
  id: t,
@@ -6810,7 +6891,7 @@ async function si(e, t) {
6810
6891
  return {
6811
6892
  ...n,
6812
6893
  id: t,
6813
- parentAssetId: n.parentAssetId ? oi(n.parentAssetId) : null,
6894
+ parentAssetId: n.parentAssetId ? ui(n.parentAssetId) : null,
6814
6895
  url: typeof e == "object" && e.url && !e.url.startsWith("blob:") ? e.url : n.url,
6815
6896
  originalUrl: typeof e == "object" && e.originalUrl && !e.originalUrl.startsWith("blob:") ? e.originalUrl : n.originalUrl,
6816
6897
  cropCoordinates: i || n.cropCoordinates || null,
@@ -6847,7 +6928,7 @@ function X(e = {}, t = {}) {
6847
6928
  ...t.rules || {}
6848
6929
  }, n;
6849
6930
  }
6850
- function ci() {
6931
+ function fi() {
6851
6932
  if (typeof process > "u" || !process?.versions?.node) return null;
6852
6933
  try {
6853
6934
  let e = (e) => {
@@ -6914,12 +6995,12 @@ function ci() {
6914
6995
  return null;
6915
6996
  }
6916
6997
  }
6917
- function li(e) {
6918
- if (e && (Object.keys(e.rawNodes || {}).length > 0 || Object.keys(e.nodes || {}).length > 0)) return ui(e);
6919
- let t = ci();
6920
- return t && Object.keys(t.rawNodes).length > 0 ? ui(t) : ui(null);
6998
+ function pi(e) {
6999
+ if (e && (Object.keys(e.rawNodes || {}).length > 0 || Object.keys(e.nodes || {}).length > 0)) return mi(e);
7000
+ let t = fi();
7001
+ return t && Object.keys(t.rawNodes).length > 0 ? mi(t) : mi(null);
6921
7002
  }
6922
- function ui(e) {
7003
+ function mi(e) {
6923
7004
  if (!e) return {
6924
7005
  nodes: {},
6925
7006
  trees: {},
@@ -7159,18 +7240,35 @@ function ui(e) {
7159
7240
  //#endregion
7160
7241
  //#region server/routes/admin/nodes.ts
7161
7242
  var Z = new e();
7162
- function di(e) {
7243
+ async function hi(e, t, n = []) {
7244
+ let r = e.prepare(t);
7245
+ if (typeof r.bind == "function") {
7246
+ let e = await r.bind(...n).all();
7247
+ return e?.results || e || [];
7248
+ }
7249
+ if (typeof r.all == "function") {
7250
+ let e = await r.all(...n);
7251
+ return Array.isArray(e) ? e : e?.results || [];
7252
+ }
7253
+ return [];
7254
+ }
7255
+ async function gi(e, t, n = []) {
7256
+ let r = e.prepare(t);
7257
+ if (typeof r.bind == "function") return r.bind(...n).run();
7258
+ if (typeof r.run == "function") return r.run(...n);
7259
+ }
7260
+ function _i(e) {
7163
7261
  return !e || !e.trim() ? null : e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "").replace(/[\s-]+/g, "-").replace(/^-+|-+$/g, "") || null;
7164
7262
  }
7165
- function fi(e) {
7263
+ function vi(e) {
7166
7264
  return +(e === !0 || e === 1 || e === "1" || e === "true");
7167
7265
  }
7168
- function pi(e) {
7266
+ function yi(e) {
7169
7267
  if (e == null || e === "null" || e === "" || typeof e == "string" && e.startsWith("draft-")) return null;
7170
7268
  let t = Number(e);
7171
7269
  return isNaN(t) ? null : t;
7172
7270
  }
7173
- function mi(e) {
7271
+ function bi(e) {
7174
7272
  let t = { ...e };
7175
7273
  for (let e of [
7176
7274
  "id",
@@ -7199,7 +7297,29 @@ function mi(e) {
7199
7297
  ]) delete t[e];
7200
7298
  return t;
7201
7299
  }
7202
- async function hi(e, t, n) {
7300
+ function xi(e, t = /* @__PURE__ */ new Set()) {
7301
+ return e ? typeof e == "string" ? (e.startsWith("ast_") && t.add(e), t) : Array.isArray(e) ? (e.forEach((e) => xi(e, t)), t) : (typeof e == "object" && Object.values(e).forEach((e) => xi(e, t)), t) : t;
7302
+ }
7303
+ async function Si(e, t, n) {
7304
+ for (let r of n) {
7305
+ let n = (await hi(e, "\n SELECT id, storageKeyPrivate, isSystemVariant, parentAssetId, filename\n FROM assets WHERE id = ?\n ", [r]))[0];
7306
+ if (!n || (await hi(e, "SELECT 1 FROM node_assets WHERE assetId = ? LIMIT 1", [n.id])).length > 0) continue;
7307
+ let i = [n];
7308
+ if (!n.isSystemVariant) {
7309
+ let t = await hi(e, "\n SELECT id, storageKeyPrivate, isSystemVariant, parentAssetId, filename\n FROM assets\n WHERE parentAssetId = ? OR (isSystemVariant = 1 AND filename LIKE ?)\n ", [n.id, `crop_%${String(n.filename || "").replace(/\.[^/.]+$/, "")}%`]), r = t.map((e) => e.id);
7310
+ if (r.length > 0 && (await hi(e, `SELECT DISTINCT assetId FROM node_assets WHERE assetId IN (${r.map(() => "?").join(",")})`, r)).length > 0) continue;
7311
+ i = [n, ...t];
7312
+ }
7313
+ for (let e of i) if (e.storageKeyPrivate) try {
7314
+ await t.delete(e.storageKeyPrivate);
7315
+ } catch (t) {
7316
+ console.warn(`[Asset Cleanup] Failed to delete ${e.storageKeyPrivate}:`, t);
7317
+ }
7318
+ let a = i.map((e) => e.id), o = a.map(() => "?").join(",");
7319
+ await gi(e, `DELETE FROM node_assets WHERE assetId IN (${o})`, a), await gi(e, `DELETE FROM assets WHERE id IN (${o})`, a);
7320
+ }
7321
+ }
7322
+ async function Ci(e, t, n) {
7203
7323
  let r = {}, i = null;
7204
7324
  if (t) {
7205
7325
  let n = await e.prepare("\n WITH RECURSIVE ancestor_path(id, parentId, draftDataJson, dataJson, level) AS (\n SELECT t.id, t.parentId, c.draftDataJson, c.dataJson, 0\n FROM tree_nodes t\n INNER JOIN content_nodes c ON t.contentId = c.id\n WHERE t.id = ?\n UNION ALL\n SELECT t.id, t.parentId, c.draftDataJson, c.dataJson, ap.level + 1\n FROM tree_nodes t\n INNER JOIN content_nodes c ON t.contentId = c.id\n INNER JOIN ancestor_path ap ON t.id = ap.parentId\n )\n SELECT draftDataJson, dataJson FROM ancestor_path ORDER BY level ASC\n ").all(t), a = Array.isArray(n) ? n : n?.results || [];
@@ -7249,13 +7369,13 @@ Z.get("/", async (e) => {
7249
7369
  updatedAt: i.updatedAt
7250
7370
  }, s = i.draftDataJson || i.dataJson;
7251
7371
  if (s) try {
7252
- let n = typeof s == "string" ? JSON.parse(s) : s, a = await t.prepare("SELECT id as treeNodeId, treeId, parentId FROM tree_nodes WHERE contentId = ? LIMIT 1").get(r), c = ui(e.env?.BUNDLED_DEFINITIONS).nodes?.[i.contentType] || {}, l = n.layoutId || null;
7372
+ let n = typeof s == "string" ? JSON.parse(s) : s, a = await t.prepare("SELECT id as treeNodeId, treeId, parentId FROM tree_nodes WHERE contentId = ? LIMIT 1").get(r), c = mi(e.env?.BUNDLED_DEFINITIONS).nodes?.[i.contentType] || {}, l = n.layoutId || null;
7253
7373
  if (a) {
7254
- let { resolvedLayoutId: e, inheritedFields: r } = await hi(t, a.parentId, a.treeId);
7374
+ let { resolvedLayoutId: e, inheritedFields: r } = await Ci(t, a.parentId, a.treeId);
7255
7375
  (l === "inherit" || !l) && (l = e || c.defaultLayout || null);
7256
7376
  for (let [e, t] of Object.entries(r)) (n[e] === void 0 || n[e] === null || n[e] === "") && t !== void 0 && (n[e] = t);
7257
7377
  } else (l === "inherit" || !l) && (l = c.defaultLayout || null);
7258
- let u = await si(t, mi(n));
7378
+ let u = await di(t, bi(n));
7259
7379
  Object.assign(o, u), o.resolvedLayoutId = l;
7260
7380
  } catch {}
7261
7381
  let c = await t.prepare("SELECT channelId FROM node_channels WHERE nodeId = ?").all(r);
@@ -7265,7 +7385,7 @@ Z.get("/", async (e) => {
7265
7385
  let u = await t.prepare("\n SELECT * FROM content_blocks \n WHERE contentId = ? AND isDraft = 1 \n ORDER BY sortOrder ASC\n ").all(r), d = Array.isArray(u) ? u : u?.results || [], f = await Promise.all(d.map(async (e) => {
7266
7386
  let n = {};
7267
7387
  try {
7268
- n = typeof e.dataJson == "string" ? JSON.parse(e.dataJson || "{}") : e.dataJson || {}, n && typeof n == "object" && (n = await si(t, n));
7388
+ n = typeof e.dataJson == "string" ? JSON.parse(e.dataJson || "{}") : e.dataJson || {}, n && typeof n == "object" && (n = await di(t, n));
7269
7389
  } catch {
7270
7390
  n = {};
7271
7391
  }
@@ -7365,7 +7485,7 @@ Z.get("/", async (e) => {
7365
7485
  assetCount: e.assetCount || 0
7366
7486
  }, i = e.draftDataJson || e.dataJson;
7367
7487
  if (i) try {
7368
- let e = typeof i == "string" ? JSON.parse(i) : i, n = await si(t, mi(e));
7488
+ let e = typeof i == "string" ? JSON.parse(i) : i, n = await di(t, bi(e));
7369
7489
  Object.assign(r, n);
7370
7490
  } catch {}
7371
7491
  return r;
@@ -7378,16 +7498,27 @@ Z.get("/", async (e) => {
7378
7498
  limit: f
7379
7499
  });
7380
7500
  }), Z.post("/", async (e) => {
7381
- let t = e.get("db"), n = await e.req.json(), r = n.node || n.activeNode || n, i = r.id || n.id, a = i != null && i !== "" && !isNaN(Number(i)) ? Number(i) : null, { title: o, slug: s, language: c, nodeType: l, contentType: u, isHidden: d, hidden: f, is_hidden: p, blocks: m, channels: h, trees: g, ..._ } = r, v = mi(_), { cleanedData: y, assetRefs: b } = ii(v), x = fi(d === void 0 ? f === void 0 ? p : f : d), S = c || "en", C = l || u || "page", w = e.get("user")?.id || null, T = a;
7501
+ let t = e.get("db"), n = await e.req.json(), r = n.node || n.activeNode || n, i = r.id || n.id, a = i != null && i !== "" && !isNaN(Number(i)) ? Number(i) : null, { title: o, slug: s, language: c, nodeType: l, contentType: u, isHidden: d, hidden: f, is_hidden: p, blocks: m, channels: h, trees: g, ..._ } = r, v = bi(_), { cleanedData: y, assetRefs: b } = ci(v), x = vi(d === void 0 ? f === void 0 ? p : f : d), S = c || "en", C = l || u || "page", w = e.get("user")?.id || null, T = a, E = /* @__PURE__ */ new Set();
7382
7502
  if (a) {
7383
- let n = await t.prepare("SELECT title, slug, contentType, language, draftDataJson, dataJson, publishedAt, status FROM content_nodes WHERE id = ?").get(a);
7503
+ let n = await t.prepare("SELECT title, slug, contentType, language, draftDataJson, dataJson, publishedAt, status FROM content_nodes WHERE id = ?").get(a), r = n?.draftDataJson || n?.dataJson || "{}";
7504
+ try {
7505
+ xi(typeof r == "string" ? JSON.parse(r) : r, E);
7506
+ } catch {}
7507
+ if (m !== void 0) {
7508
+ let e = await t.prepare("SELECT dataJson FROM content_blocks WHERE contentId = ? AND isDraft = 1").all(a);
7509
+ (Array.isArray(e) ? e : e?.results || []).forEach((e) => {
7510
+ try {
7511
+ xi(typeof e.dataJson == "string" ? JSON.parse(e.dataJson) : e.dataJson, E);
7512
+ } catch {}
7513
+ });
7514
+ }
7384
7515
  if (m === void 0 && o === void 0 && s === void 0 && h === void 0 && g === void 0 && Object.keys(v).length === 0) return await t.prepare("\n UPDATE content_nodes \n SET isHidden = ?, \n updatedById = ?, \n updatedAt = CURRENT_TIMESTAMP\n WHERE id = ?\n ").run(x, w, a), await Y(e).clear(), e.json({
7385
7516
  success: !0,
7386
7517
  id: a,
7387
7518
  status: n?.status || "published"
7388
7519
  });
7389
7520
  {
7390
- let e = o === void 0 ? n?.title || "Untitled" : o, r = s === void 0 ? n?.slug ?? null : di(s), i = C || n?.contentType || "page", c = S || n?.language || "en", l = n?.draftDataJson || n?.dataJson || "{}", u = {};
7521
+ let e = o === void 0 ? n?.title || "Untitled" : o, r = s === void 0 ? n?.slug ?? null : _i(s), i = C || n?.contentType || "page", c = S || n?.language || "en", l = n?.draftDataJson || n?.dataJson || "{}", u = {};
7391
7522
  try {
7392
7523
  u = JSON.parse(l);
7393
7524
  } catch {}
@@ -7398,7 +7529,7 @@ Z.get("/", async (e) => {
7398
7529
  await t.prepare("\n UPDATE content_nodes \n SET title = ?, \n slug = ?, \n language = ?,\n contentType = ?, \n isHidden = ?, \n status = 'draft', \n draftDataJson = ?, \n updatedById = ?, \n updatedAt = CURRENT_TIMESTAMP\n WHERE id = ?\n ").run(e, r, c, i, x, d, w, a);
7399
7530
  }
7400
7531
  } else {
7401
- let e = o || "Untitled", n = di(s), r = JSON.stringify(y), i = await t.prepare("\n INSERT INTO content_nodes (contentType, title, slug, language, isHidden, status, draftDataJson, dataJson, createdById, updatedById)\n VALUES (?, ?, ?, ?, ?, 'draft', ?, NULL, ?, ?)\n ").run(C, e, n, S, x, r, w, w);
7532
+ let e = o || "Untitled", n = _i(s), r = JSON.stringify(y), i = await t.prepare("\n INSERT INTO content_nodes (contentType, title, slug, language, isHidden, status, draftDataJson, dataJson, createdById, updatedById)\n VALUES (?, ?, ?, ?, ?, 'draft', ?, NULL, ?, ?)\n ").run(C, e, n, S, x, r, w, w);
7402
7533
  T = Number(i.lastInsertRowid);
7403
7534
  }
7404
7535
  if (h !== void 0 && Array.isArray(h) && T) {
@@ -7416,24 +7547,24 @@ Z.get("/", async (e) => {
7416
7547
  let i = Number(t.treeId) || t.treeId;
7417
7548
  if (!e.has(i)) {
7418
7549
  e.add(i);
7419
- let a = pi(t.parentId ?? t._draftParentId ?? null), o = typeof t.sortOrder == "number" ? t.sortOrder : 0;
7550
+ let a = yi(t.parentId ?? t._draftParentId ?? null), o = typeof t.sortOrder == "number" ? t.sortOrder : 0;
7420
7551
  n.push("(?, ?, ?, ?)"), r.push(i, T, a, o);
7421
7552
  }
7422
7553
  }
7423
7554
  n.length > 0 && await t.prepare(`INSERT INTO tree_nodes (treeId, contentId, parentId, sortOrder) VALUES ${n.join(", ")}`).run(...r);
7424
7555
  }
7425
- let E = [];
7556
+ let D = [];
7426
7557
  if (m !== void 0 && Array.isArray(m) && T) {
7427
7558
  await t.prepare("DELETE FROM content_blocks WHERE contentId = ? AND isDraft = 1").run(T);
7428
7559
  let e = [], n = [];
7429
7560
  for (let t = 0; t < m.length; t++) {
7430
- let r = m[t], i = r.componentId || r.elementType || "text-block", a = r.data || {}, o = String(r.blockId || a.blockId || r.instanceId || r.id || `block-${Date.now()}`), { cleanedData: s, assetRefs: c } = ii({
7561
+ let r = m[t], i = r.componentId || r.elementType || "text-block", a = r.data || {}, o = String(r.blockId || a.blockId || r.instanceId || r.id || `block-${Date.now()}`), { cleanedData: s, assetRefs: c } = ci({
7431
7562
  ...a,
7432
7563
  blockId: o,
7433
7564
  _instanceId: o
7434
7565
  });
7435
7566
  c.forEach((e) => {
7436
- E.push({
7567
+ D.push({
7437
7568
  ...e,
7438
7569
  fieldKey: `blocks[${t}].${e.fieldKey}`
7439
7570
  });
@@ -7444,8 +7575,10 @@ Z.get("/", async (e) => {
7444
7575
  e.length > 0 && await t.prepare(`INSERT INTO content_blocks (contentId, sortOrder, elementType, dataJson, region, isDraft) VALUES ${e.join(", ")}`).run(...n);
7445
7576
  }
7446
7577
  if (T) {
7447
- let e = [...b, ...E];
7448
- await ai(t, T, e);
7578
+ let n = [...b, ...D];
7579
+ await li(t, T, n);
7580
+ let r = new Set(n.map((e) => e.assetId)), i = new Set([...E].filter((e) => !r.has(e)));
7581
+ i.size > 0 && await Si(t, si(e.env), i);
7449
7582
  }
7450
7583
  return await Y(e).clear(), e.json({
7451
7584
  success: !0,
@@ -7509,8 +7642,8 @@ Z.get("/", async (e) => {
7509
7642
  });
7510
7643
  //#endregion
7511
7644
  //#region server/routes/admin/trees.ts
7512
- var gi = new e();
7513
- function _i(e, t = null) {
7645
+ var wi = new e();
7646
+ function Ti(e, t = null) {
7514
7647
  let n = [];
7515
7648
  for (let r = 0; r < e.length; r++) {
7516
7649
  let i = e[r];
@@ -7523,20 +7656,20 @@ function _i(e, t = null) {
7523
7656
  id: a,
7524
7657
  parentId: t,
7525
7658
  sortOrder: r
7526
- }), i.children && Array.isArray(i.children) && i.children.length > 0 && n.push(..._i(i.children, a));
7659
+ }), i.children && Array.isArray(i.children) && i.children.length > 0 && n.push(...Ti(i.children, a));
7527
7660
  }
7528
7661
  }
7529
7662
  return n;
7530
7663
  }
7531
- function vi(e) {
7664
+ function Ei(e) {
7532
7665
  if (e == null || e === "null" || e === "" || typeof e == "string" && e.startsWith("draft-")) return null;
7533
7666
  let t = Number(e);
7534
7667
  return isNaN(t) ? null : t;
7535
7668
  }
7536
- function yi(e) {
7669
+ function Di(e) {
7537
7670
  return +(e === !0 || e === 1 || e === "1" || e === "true");
7538
7671
  }
7539
- gi.get("/tree.json", async (e) => {
7672
+ wi.get("/tree.json", async (e) => {
7540
7673
  try {
7541
7674
  let t = e.get("db"), n = e.req.query("treeId") || "main-nav", r = e.req.query("preview") === "true", i = 1;
7542
7675
  if (isNaN(Number(n))) {
@@ -7585,7 +7718,7 @@ gi.get("/tree.json", async (e) => {
7585
7718
  } catch (t) {
7586
7719
  return console.error("[CMS Tree API] GET Error:", t), e.json({ error: t.message || "Failed to fetch tree" }, 500);
7587
7720
  }
7588
- }), gi.post("/tree.json", async (e) => {
7721
+ }), wi.post("/tree.json", async (e) => {
7589
7722
  try {
7590
7723
  let t = e.get("db"), n = await e.req.json(), r = n.treeId ? String(n.treeId).trim() : "main-nav", i = Y(e), a = 1;
7591
7724
  if (isNaN(Number(r))) {
@@ -7597,7 +7730,7 @@ gi.get("/tree.json", async (e) => {
7597
7730
  }
7598
7731
  } else a = Number(r);
7599
7732
  if (n.tree && Array.isArray(n.tree)) {
7600
- let r = _i(n.tree, null);
7733
+ let r = Ti(n.tree, null);
7601
7734
  if (r.length > 0) for (let e = 0; e < r.length; e += 50) {
7602
7735
  let n = r.slice(e, e + 50), i = n.map((e) => e.id), o = i.map(() => "?").join(","), s = "UPDATE tree_nodes SET \n";
7603
7736
  s += "parentId = CASE id \n", n.forEach(() => {
@@ -7614,9 +7747,9 @@ gi.get("/tree.json", async (e) => {
7614
7747
  }
7615
7748
  return await i.clear(), e.json({ success: !0 });
7616
7749
  }
7617
- let { action: o, title: s, nodeType: c, parentId: l, contentId: u, nodeData: d = {}, pageData: f = {} } = n, p = Object.keys(d).length > 0 ? { ...d } : { ...f }, m = yi(n.isHidden === void 0 ? p.isHidden === void 0 ? p.hidden : p.isHidden : n.isHidden);
7750
+ let { action: o, title: s, nodeType: c, parentId: l, contentId: u, nodeData: d = {}, pageData: f = {} } = n, p = Object.keys(d).length > 0 ? { ...d } : { ...f }, m = Di(n.isHidden === void 0 ? p.isHidden === void 0 ? p.hidden : p.isHidden : n.isHidden);
7618
7751
  delete p._isTreeDraft, delete p._draftParentId, delete p.isNew, delete p.nodeType, delete p.contentType, delete p.title, delete p.slug, delete p.hidden, delete p.is_hidden, delete p.isHidden, delete p.status;
7619
- let h = vi(l), g = e.get("user")?.id || null;
7752
+ let h = Ei(l), g = e.get("user")?.id || null;
7620
7753
  if (o === "create") {
7621
7754
  let r = p.slug || n.slug || s, o = r ? String(r).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "") : null;
7622
7755
  if (o) {
@@ -7702,7 +7835,7 @@ gi.get("/tree.json", async (e) => {
7702
7835
  details: t.message
7703
7836
  }, 500);
7704
7837
  }
7705
- }), gi.get("/trees.json", async (e) => {
7838
+ }), wi.get("/trees.json", async (e) => {
7706
7839
  try {
7707
7840
  let t = e.get("db"), n = await t.prepare("SELECT * FROM trees ORDER BY LOWER(label) ASC").all(), r = Array.isArray(n) ? n : n?.results || [], i = await t.prepare("SELECT channelId, treeId FROM channel_trees").all(), a = (Array.isArray(i) ? i : i?.results || []).reduce((e, t) => {
7708
7841
  let n = Number(t.treeId), r = Number(t.channelId);
@@ -7731,7 +7864,7 @@ gi.get("/tree.json", async (e) => {
7731
7864
  } catch {
7732
7865
  return e.json([]);
7733
7866
  }
7734
- }), gi.post("/trees.json", async (e) => {
7867
+ }), wi.post("/trees.json", async (e) => {
7735
7868
  try {
7736
7869
  let t = e.get("db"), n = await e.req.json(), r = n.id, i = r != null && r !== "" && !isNaN(Number(r)) ? Number(r) : null, a = `tree-${Date.now().toString(36)}`, o = (n.key || n.slug || a).toLowerCase().replace(/[^a-z0-9_-]/g, "-"), s = n.label?.trim() || o, c = n.treeType !== void 0 && n.treeType !== null ? n.treeType : n.type ?? "site", l = n.channelId !== void 0 && n.channelId !== null && Number(n.channelId) || null, u = +(n.isHidden === !0 || n.isHidden === 1 || n.isHidden === "true"), d = e.get("user")?.id || null, f = { ...n };
7737
7870
  if (delete f.id, delete f.key, delete f.label, delete f.treeType, delete f.type, delete f.channelId, delete f.channels, delete f.isHidden, delete f.createdById, delete f.updatedById, delete f.createdAt, delete f.updatedAt, await t.prepare("SELECT id FROM trees WHERE key = ? AND id != ? LIMIT 1").get(o, i ?? -1)) return e.json({
@@ -7770,7 +7903,7 @@ gi.get("/tree.json", async (e) => {
7770
7903
  } catch (t) {
7771
7904
  return console.error("[API Trees] Error saving tree:", t), e.json({ error: t.message || "Failed to save tree" }, 500);
7772
7905
  }
7773
- }), gi.delete("/trees.json", async (e) => {
7906
+ }), wi.delete("/trees.json", async (e) => {
7774
7907
  let t = e.get("db"), n = e.req.query("id");
7775
7908
  if (!n) return e.json({ error: "Tree ID required" }, 400);
7776
7909
  let r = Number(n);
@@ -7785,8 +7918,8 @@ gi.get("/tree.json", async (e) => {
7785
7918
  });
7786
7919
  //#endregion
7787
7920
  //#region server/routes/admin/channels.ts
7788
- var bi = new e();
7789
- bi.get("/", async (e) => {
7921
+ var Oi = new e();
7922
+ Oi.get("/", async (e) => {
7790
7923
  try {
7791
7924
  let t = e.get("db"), n = await t.prepare("SELECT * FROM channels ORDER BY id ASC").all(), r = Array.isArray(n) ? n : n?.results || [], i = await t.prepare("SELECT channelId, treeId, key, metaJson FROM channel_trees").all(), a = ((Array.isArray(i) ? i : i?.results || []) || []).reduce((e, t) => {
7792
7925
  e[t.channelId] || (e[t.channelId] = []);
@@ -7810,7 +7943,7 @@ bi.get("/", async (e) => {
7810
7943
  isHidden: !!e.isHidden,
7811
7944
  trees: a[e.id] || []
7812
7945
  };
7813
- }), s = e.env?.BUNDLED_DEFINITIONS, c = ui(s)?.channelTemplate || {
7946
+ }), s = e.env?.BUNDLED_DEFINITIONS, c = mi(s)?.channelTemplate || {
7814
7947
  label: "Channel Settings",
7815
7948
  fields: {
7816
7949
  key: {
@@ -7852,7 +7985,7 @@ bi.get("/", async (e) => {
7852
7985
  error: t.message
7853
7986
  }, 500);
7854
7987
  }
7855
- }), bi.post("/", async (e) => {
7988
+ }), Oi.post("/", async (e) => {
7856
7989
  try {
7857
7990
  let t = e.get("db"), n = await e.req.json(), r = n.id, i = r != null && r !== "" && !isNaN(Number(r)) ? Number(r) : null, { key: a, label: o, channelType: s = "website", domain: c = "localhost", baseUrl: l = "http://localhost:4321", defaultLanguage: u = "en", isHidden: d = !1, trees: f = [], createdById: p = null, updatedById: m = null, id: h, createdAt: g, updatedAt: _, ...v } = n, y = a?.trim() || "main", b = o?.trim() || "Untitled Channel", x = Array.isArray(f) ? f : [], S = JSON.stringify(v || {}), C = e.get("user")?.id || m || p || null;
7858
7991
  if (await t.prepare("SELECT id FROM channels WHERE key = ? AND id != ? LIMIT 1").get(y, i ?? -1)) return e.json({
@@ -7889,7 +8022,7 @@ bi.get("/", async (e) => {
7889
8022
  details: t.message
7890
8023
  }, 500);
7891
8024
  }
7892
- }), bi.delete("/", async (e) => {
8025
+ }), Oi.delete("/", async (e) => {
7893
8026
  let t = e.get("db"), n = e.req.query("id");
7894
8027
  if (!n) return e.json({ error: "Channel ID required" }, 400);
7895
8028
  let r = Number(n);
@@ -7907,10 +8040,10 @@ bi.get("/", async (e) => {
7907
8040
  });
7908
8041
  //#endregion
7909
8042
  //#region server/routes/admin/schemas.ts
7910
- var xi = new e(), Si = null, Ci = (e) => {
8043
+ var ki = new e(), Ai = null, ji = (e) => {
7911
8044
  try {
7912
- if (!Si) {
7913
- let t = li(e.env?.BUNDLED_DEFINITIONS || Nr), n = t.userTemplate || {
8045
+ if (!Ai) {
8046
+ let t = pi(e.env?.BUNDLED_DEFINITIONS || Nr), n = t.userTemplate || {
7914
8047
  id: "userTemplate",
7915
8048
  label: "User Account",
7916
8049
  fields: {
@@ -7946,7 +8079,7 @@ var xi = new e(), Si = null, Ci = (e) => {
7946
8079
  }
7947
8080
  }
7948
8081
  };
7949
- Si = {
8082
+ Ai = {
7950
8083
  channelTemplate: t.channelTemplate || null,
7951
8084
  treeTemplate: t.treeTemplate || null,
7952
8085
  userTemplate: n,
@@ -7958,7 +8091,7 @@ var xi = new e(), Si = null, Ci = (e) => {
7958
8091
  blockLayouts: t.blockLayouts || {}
7959
8092
  };
7960
8093
  }
7961
- return e.json(Si, 200, { "Cache-Control": "public, max-age=300, stale-while-revalidate=86400" });
8094
+ return e.json(Ai, 200, { "Cache-Control": "public, max-age=300, stale-while-revalidate=86400" });
7962
8095
  } catch (t) {
7963
8096
  return console.error("[CMS API] Error loading schemas:", t), e.json({
7964
8097
  error: "Failed to load schemas",
@@ -7966,10 +8099,10 @@ var xi = new e(), Si = null, Ci = (e) => {
7966
8099
  }, 500);
7967
8100
  }
7968
8101
  };
7969
- xi.get("/", Ci), xi.get("/schemas.json", Ci);
8102
+ ki.get("/", ji), ki.get("/schemas.json", ji);
7970
8103
  //#endregion
7971
8104
  //#region server/routes/admin/validation.ts
7972
- var wi = new e(), Ti = {
8105
+ var Mi = new e(), Ni = {
7973
8106
  node: "content_nodes",
7974
8107
  nodes: "content_nodes",
7975
8108
  content_node: "content_nodes",
@@ -7981,7 +8114,7 @@ var wi = new e(), Ti = {
7981
8114
  user: "users",
7982
8115
  users: "users",
7983
8116
  user_account: "user_accounts"
7984
- }, Ei = {
8117
+ }, Pi = {
7985
8118
  content_nodes: [
7986
8119
  "id",
7987
8120
  "title",
@@ -8038,11 +8171,11 @@ var wi = new e(), Ti = {
8038
8171
  "createdAt"
8039
8172
  ]
8040
8173
  };
8041
- wi.post("/validate-unique", async (e) => {
8174
+ Mi.post("/validate-unique", async (e) => {
8042
8175
  try {
8043
8176
  let t = e.get("db"), { entityType: n, field: r, value: i, excludeId: a } = await e.req.json();
8044
8177
  if (!r || i == null || String(i).trim() === "") return e.json({ isUnique: !0 });
8045
- let o = Ti[n] || "content_nodes", s = r.replace(/[^a-zA-Z0-9_]/g, ""), c = (Ei[o] || Ei.content_nodes).includes(s), l = -1;
8178
+ let o = Ni[n] || "content_nodes", s = r.replace(/[^a-zA-Z0-9_]/g, ""), c = (Pi[o] || Pi.content_nodes).includes(s), l = -1;
8046
8179
  if (a != null && String(a).trim() !== "") {
8047
8180
  let e = Number(a);
8048
8181
  l = isNaN(e) ? String(a) : e;
@@ -8054,7 +8187,7 @@ wi.post("/validate-unique", async (e) => {
8054
8187
  } catch (t) {
8055
8188
  return console.error("[API Validation] Error validating global uniqueness:", t), e.json({ error: "Failed to validate uniqueness" }, 500);
8056
8189
  }
8057
- }), wi.post("/validate-unique-sibling", async (e) => {
8190
+ }), Mi.post("/validate-unique-sibling", async (e) => {
8058
8191
  try {
8059
8192
  let t = e.get("db"), { slug: n, treeId: r, parentId: i, excludeTreeNodeId: a } = await e.req.json();
8060
8193
  if (!n || !String(n).trim() || !r) return e.json({ isUnique: !0 });
@@ -8081,8 +8214,8 @@ wi.post("/validate-unique", async (e) => {
8081
8214
  });
8082
8215
  //#endregion
8083
8216
  //#region server/routes/admin/stats.ts
8084
- var Di = new e();
8085
- Di.get("/", async (e) => {
8217
+ var Fi = new e();
8218
+ Fi.get("/", async (e) => {
8086
8219
  try {
8087
8220
  let t = e.get("db"), n = await t.prepare("\n SELECT \n COUNT(*) as total,\n SUM(CASE WHEN isHidden = 0 THEN 1 ELSE 0 END) as published,\n SUM(CASE WHEN isHidden = 1 THEN 1 ELSE 0 END) as hidden\n FROM content_nodes\n ").get(), r = Number(n?.total) || 0, i = Number(n?.published) || 0, a = Number(n?.hidden) || 0, o = await t.prepare("\n SELECT \n (SELECT COUNT(*) FROM channels) as totalChannels,\n (SELECT COUNT(*) FROM trees) as totalTrees,\n (SELECT COUNT(*) FROM users) as totalUsers\n ").get(), s = await t.prepare("\n SELECT contentType as type, COUNT(*) as count \n FROM content_nodes \n GROUP BY contentType \n ORDER BY count DESC\n ").all(), c = Array.isArray(s) ? s : s?.results || [], l = await t.prepare("\n SELECT id, title, slug, contentType, isHidden, status, updatedAt \n FROM content_nodes \n ORDER BY updatedAt DESC \n LIMIT 5\n ").all(), u = (Array.isArray(l) ? l : l?.results || []).map((e) => ({
8088
8221
  ...e,
@@ -8097,7 +8230,7 @@ Di.get("/", async (e) => {
8097
8230
  isHidden: !!e.isHidden,
8098
8231
  channelNames: e.channelLabels ? e.channelLabels.split(",") : [],
8099
8232
  treeNames: e.treeLabels ? e.treeLabels.split(",") : []
8100
- })), p = e.env?.BUNDLED_DEFINITIONS, m = li(p), h = m.nodes || m.nodeSchemas || {}, g = c.map((e) => {
8233
+ })), p = e.env?.BUNDLED_DEFINITIONS, m = pi(p), h = m.nodes || m.nodeSchemas || {}, g = c.map((e) => {
8101
8234
  let t = e.type || "node", n = h[t]?.label || t.charAt(0).toUpperCase() + t.slice(1);
8102
8235
  return {
8103
8236
  type: t,
@@ -8124,89 +8257,8 @@ Di.get("/", async (e) => {
8124
8257
  }
8125
8258
  });
8126
8259
  //#endregion
8127
- //#region server/storage/provider.ts
8128
- function Oi(e) {
8129
- let t = e.split(".").pop()?.toLowerCase() || "bin";
8130
- return t = t.replace(/[^a-z0-9]/g, ""), [
8131
- "php",
8132
- "exe",
8133
- "sh",
8134
- "bat",
8135
- "cmd",
8136
- "html",
8137
- "htm",
8138
- "js",
8139
- "mjs",
8140
- "cjs"
8141
- ].includes(t) ? "bin" : t;
8142
- }
8143
- var ki = class {
8144
- bucket;
8145
- publicDomain;
8146
- constructor(e, t) {
8147
- this.bucket = e, this.publicDomain = t;
8148
- }
8149
- async upload(e, t = "uploads") {
8150
- let n = Oi(e.name), r = `${t}/${crypto.randomUUID().replace(/-/g, "")}.${n}`;
8151
- return await this.bucket.put(r, e.stream(), { httpMetadata: { contentType: e.type } }), {
8152
- key: r,
8153
- url: `https://${this.publicDomain}/${r}`
8154
- };
8155
- }
8156
- async delete(e) {
8157
- await this.bucket.delete(e);
8158
- }
8159
- }, Ai = class {
8160
- customStoragePath;
8161
- constructor(e) {
8162
- this.customStoragePath = e;
8163
- }
8164
- async upload(e, t = "uploads") {
8165
- let n = await import(
8166
- /* @vite-ignore */
8167
- "node:path"
8168
- ), r = await import(
8169
- /* @vite-ignore */
8170
- "node:fs"
8171
- ), i = await import(
8172
- /* @vite-ignore */
8173
- "node:fs/promises"
8174
- ), { pipeline: a } = await import(
8175
- /* @vite-ignore */
8176
- "node:stream/promises"
8177
- ), o = Oi(e.name), s = `${t}/${crypto.randomUUID().replace(/-/g, "")}.${o}`, c = this.customStoragePath || "./public/media", l = n.resolve(process.cwd(), c), u = n.join(l, s);
8178
- await i.mkdir(n.dirname(u), { recursive: !0 });
8179
- let d = r.createWriteStream(u);
8180
- return await a(e.stream(), d), {
8181
- key: s,
8182
- url: `/media/${s}`
8183
- };
8184
- }
8185
- async delete(e) {
8186
- let t = await import(
8187
- /* @vite-ignore */
8188
- "node:path"
8189
- ), n = await import(
8190
- /* @vite-ignore */
8191
- "node:fs/promises"
8192
- ), r = this.customStoragePath || "./public/media", i = t.resolve(process.cwd(), r), a = t.join(i, e);
8193
- try {
8194
- await n.unlink(a);
8195
- } catch (e) {
8196
- if (e.code !== "ENOENT") throw e;
8197
- }
8198
- }
8199
- };
8200
- function ji(e) {
8201
- if (e.MEDIA_BUCKET) {
8202
- let t = e.CDN_DOMAIN || "cdn.yourdomain.com";
8203
- return new ki(e.MEDIA_BUCKET, t);
8204
- }
8205
- return new Ai(e.LOCAL_MEDIA_PATH);
8206
- }
8207
- //#endregion
8208
8260
  //#region server/routes/admin/assets.ts
8209
- var Mi = new e();
8261
+ var Ii = new e();
8210
8262
  async function Q(e, t, n = []) {
8211
8263
  let r = e.prepare(t);
8212
8264
  if (typeof r.bind == "function") {
@@ -8219,16 +8271,16 @@ async function Q(e, t, n = []) {
8219
8271
  }
8220
8272
  return [];
8221
8273
  }
8222
- async function Ni(e, t, n = []) {
8274
+ async function Li(e, t, n = []) {
8223
8275
  let r = e.prepare(t);
8224
8276
  if (typeof r.bind == "function") return await r.bind(...n).run();
8225
8277
  if (typeof r.run == "function") return await r.run(...n);
8226
8278
  }
8227
- function Pi(e, t, n) {
8279
+ function Ri(e, t, n) {
8228
8280
  let r = e || (t ? `/media/${t}` : "");
8229
8281
  return r && n && r.startsWith(`https://${n}/`) && !r.includes("/media/") && (r = r.replace(`https://${n}/`, `https://${n}/media/`)), r;
8230
8282
  }
8231
- Mi.get("/", async (e) => {
8283
+ Ii.get("/", async (e) => {
8232
8284
  try {
8233
8285
  let t = g(e), { search: n = "", type: r = "all", page: i = "1", limit: a = "24", sort: o = "createdAt", order: s = "DESC", nodeId: c, channelId: l, trashed: u } = e.req.query(), d = Math.max(1, parseInt(i, 10) || 1), f = Math.max(1, Math.min(100, parseInt(a, 10) || 24)), p = (d - 1) * f, m = {
8234
8286
  createdAt: "a.createdAt",
@@ -8291,7 +8343,7 @@ Mi.get("/", async (e) => {
8291
8343
  try {
8292
8344
  n = JSON.parse(t.dataJson || "{}");
8293
8345
  } catch {}
8294
- let r = Pi(t.cdnUrl, t.storageKeyPrivate, e.env?.CDN_DOMAIN);
8346
+ let r = Ri(t.cdnUrl, t.storageKeyPrivate, e.env?.CDN_DOMAIN);
8295
8347
  return {
8296
8348
  id: t.id,
8297
8349
  filename: t.filename || "Untitled Asset",
@@ -8314,9 +8366,9 @@ Mi.get("/", async (e) => {
8314
8366
  details: t.message || String(t)
8315
8367
  }, 500);
8316
8368
  }
8317
- }), Mi.post("/upload", async (e) => {
8369
+ }), Ii.post("/upload", async (e) => {
8318
8370
  try {
8319
- let t = g(e), n = ji(e.env), r = await e.req.parseBody(), i = r.file, a = r.isVariant === "true" || r.isVariant === "1" || r.temporary === "true", o = r.parentAssetId || r.parentAsset, s = typeof o == "string" && o.trim().length > 0 ? o.trim() : null;
8371
+ let t = g(e), n = si(e.env), r = await e.req.parseBody(), i = r.file, a = r.isVariant === "true" || r.isVariant === "1" || r.temporary === "true", o = r.parentAssetId || r.parentAsset, s = typeof o == "string" && o.trim().length > 0 ? o.trim() : null;
8320
8372
  s && (await Q(t, "SELECT id FROM assets WHERE id = ?", [s])).length === 0 && (s = null);
8321
8373
  let c = r.cropCoordinates, l = null, u = null;
8322
8374
  if (c) {
@@ -8333,7 +8385,7 @@ Mi.get("/", async (e) => {
8333
8385
  let y = e.env.CDN_DOMAIN, b = v.replace(/^\//, ""), x = y ? `https://${y}/media/${b}` : `/media/${b}`, S = i.type || "application/octet-stream", C = i.size || 0, w = e.get("userId"), T = typeof w == "string" && w.trim().length > 0 ? w : null;
8334
8386
  T && (await Q(t, "SELECT id FROM users WHERE id = ?", [T])).length === 0 && (T = null);
8335
8387
  let E = +!!m;
8336
- await Ni(t, "\n INSERT INTO assets (id, filename, mimeType, sizeBytes, storageKeyPrivate, cdnUrl, createdById, isSystemVariant, parentAssetId, cropCoordinatesJson)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n ", [
8388
+ await Li(t, "\n INSERT INTO assets (id, filename, mimeType, sizeBytes, storageKeyPrivate, cdnUrl, createdById, isSystemVariant, parentAssetId, cropCoordinatesJson)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n ", [
8337
8389
  f,
8338
8390
  i.name,
8339
8391
  S,
@@ -8348,7 +8400,7 @@ Mi.get("/", async (e) => {
8348
8400
  let D = x;
8349
8401
  if (s) {
8350
8402
  let e = await Q(t, "SELECT cdnUrl, storageKeyPrivate FROM assets WHERE id = ?", [s]);
8351
- e.length > 0 && (D = Pi(e[0].cdnUrl, e[0].storageKeyPrivate, y));
8403
+ e.length > 0 && (D = Ri(e[0].cdnUrl, e[0].storageKeyPrivate, y));
8352
8404
  }
8353
8405
  return e.json({
8354
8406
  id: f,
@@ -8367,7 +8419,7 @@ Mi.get("/", async (e) => {
8367
8419
  details: t.message || String(t)
8368
8420
  }, 500);
8369
8421
  }
8370
- }), Mi.get("/:id/details", async (e) => {
8422
+ }), Ii.get("/:id/details", async (e) => {
8371
8423
  try {
8372
8424
  let t = g(e), n = e.req.param("id"), r = await Q(t, "SELECT * FROM assets WHERE id = ?", [n]);
8373
8425
  if (!r || r.length === 0) return e.json({ error: "Asset not found" }, 404);
@@ -8386,7 +8438,7 @@ Mi.get("/", async (e) => {
8386
8438
  try {
8387
8439
  c = JSON.parse(i.dataJson || "{}");
8388
8440
  } catch {}
8389
- let l = Pi(i.cdnUrl, i.storageKeyPrivate, e.env?.CDN_DOMAIN);
8441
+ let l = Ri(i.cdnUrl, i.storageKeyPrivate, e.env?.CDN_DOMAIN);
8390
8442
  return e.json({
8391
8443
  id: i.id,
8392
8444
  filename: i.filename,
@@ -8412,7 +8464,7 @@ Mi.get("/", async (e) => {
8412
8464
  createdAt: t.createdAt,
8413
8465
  parentAssetId: t.parentAssetId || i.id,
8414
8466
  cropCoordinates: n,
8415
- url: Pi(t.cdnUrl, t.storageKeyPrivate, e.env?.CDN_DOMAIN),
8467
+ url: Ri(t.cdnUrl, t.storageKeyPrivate, e.env?.CDN_DOMAIN),
8416
8468
  originalUrl: l
8417
8469
  };
8418
8470
  })
@@ -8420,7 +8472,7 @@ Mi.get("/", async (e) => {
8420
8472
  } catch (t) {
8421
8473
  return console.error("❌ [Asset Details Error]:", t), e.json({ error: "Failed to load details" }, 500);
8422
8474
  }
8423
- }), Mi.put("/:id", async (e) => {
8475
+ }), Ii.put("/:id", async (e) => {
8424
8476
  try {
8425
8477
  let t = g(e), n = e.req.param("id"), r = await e.req.json(), i = await Q(t, "SELECT filename, dataJson FROM assets WHERE id = ?", [n]);
8426
8478
  if (!i || i.length === 0) return e.json({ error: "Asset not found" }, 404);
@@ -8428,7 +8480,7 @@ Mi.get("/", async (e) => {
8428
8480
  try {
8429
8481
  o = JSON.parse(a.dataJson || "{}");
8430
8482
  } catch {}
8431
- return r.title !== void 0 && (o.title = r.title), r.alt !== void 0 && (o.alt = r.alt), await Ni(t, "UPDATE assets SET filename = ?, dataJson = ?, updatedAt = CURRENT_TIMESTAMP WHERE id = ?", [
8483
+ return r.title !== void 0 && (o.title = r.title), r.alt !== void 0 && (o.alt = r.alt), await Li(t, "UPDATE assets SET filename = ?, dataJson = ?, updatedAt = CURRENT_TIMESTAMP WHERE id = ?", [
8432
8484
  r.filename === void 0 ? a.filename : r.filename,
8433
8485
  JSON.stringify(o),
8434
8486
  n
@@ -8436,10 +8488,10 @@ Mi.get("/", async (e) => {
8436
8488
  } catch (t) {
8437
8489
  return console.error("❌ [Asset Update Error]:", t), e.json({ error: "Failed to update asset" }, 500);
8438
8490
  }
8439
- }), Mi.delete("/:id", async (e) => {
8491
+ }), Ii.delete("/:id", async (e) => {
8440
8492
  try {
8441
8493
  let t = g(e), n = e.req.param("id"), r = (await Q(t, "SELECT id, filename, isSystemVariant FROM assets WHERE id = ?", [n]))[0];
8442
- return r ? (r.isSystemVariant ? await Ni(t, "UPDATE assets SET deletedAt = CURRENT_TIMESTAMP WHERE id = ?", [n]) : await Ni(t, "UPDATE assets\n SET deletedAt = CURRENT_TIMESTAMP\n WHERE id = ? OR parentAssetId = ? OR (isSystemVariant = 1 AND (filename LIKE ? OR filename LIKE ?))", [
8494
+ return r ? (r.isSystemVariant ? await Li(t, "UPDATE assets SET deletedAt = CURRENT_TIMESTAMP WHERE id = ?", [n]) : await Li(t, "UPDATE assets\n SET deletedAt = CURRENT_TIMESTAMP\n WHERE id = ? OR parentAssetId = ? OR (isSystemVariant = 1 AND (filename LIKE ? OR filename LIKE ?))", [
8443
8495
  n,
8444
8496
  n,
8445
8497
  `crop_%${r.filename ? r.filename.replace(/\.[^/.]+$/, "") : ""}%`,
@@ -8455,12 +8507,12 @@ Mi.get("/", async (e) => {
8455
8507
  details: t.message || String(t)
8456
8508
  }, 500);
8457
8509
  }
8458
- }), Mi.post("/restore", async (e) => {
8510
+ }), Ii.post("/restore", async (e) => {
8459
8511
  try {
8460
8512
  let t = g(e), n = await e.req.json(), r = n.id || n.assetId;
8461
8513
  if (!r) return e.json({ error: "Asset ID required" }, 400);
8462
8514
  let i = (await Q(t, "SELECT id, filename FROM assets WHERE id = ?", [r]))[0];
8463
- return i ? (await Ni(t, "UPDATE assets \n SET deletedAt = NULL \n WHERE id = ? OR parentAssetId = ? OR (isSystemVariant = 1 AND (filename LIKE ? OR filename LIKE ?))", [
8515
+ return i ? (await Li(t, "UPDATE assets \n SET deletedAt = NULL \n WHERE id = ? OR parentAssetId = ? OR (isSystemVariant = 1 AND (filename LIKE ? OR filename LIKE ?))", [
8464
8516
  r,
8465
8517
  r,
8466
8518
  `crop_%${i.filename ? i.filename.replace(/\.[^/.]+$/, "") : ""}%`,
@@ -8476,9 +8528,9 @@ Mi.get("/", async (e) => {
8476
8528
  details: t.message
8477
8529
  }, 500);
8478
8530
  }
8479
- }), Mi.delete("/purge/:id", async (e) => {
8531
+ }), Ii.delete("/purge/:id", async (e) => {
8480
8532
  try {
8481
- let t = g(e), n = ji(e.env), r = e.req.param("id"), i = (await Q(t, "SELECT id, filename, storageKeyPrivate, isSystemVariant FROM assets WHERE id = ?", [r]))[0];
8533
+ let t = g(e), n = si(e.env), r = e.req.param("id"), i = (await Q(t, "SELECT id, filename, storageKeyPrivate, isSystemVariant FROM assets WHERE id = ?", [r]))[0];
8482
8534
  if (!i) return e.json({ error: "Asset not found" }, 404);
8483
8535
  let a = [i];
8484
8536
  i.isSystemVariant || (a = [i, ...await Q(t, "SELECT id, storageKeyPrivate FROM assets \n WHERE parentAssetId = ? OR (isSystemVariant = 1 AND (filename LIKE ? OR filename LIKE ?))", [
@@ -8495,7 +8547,7 @@ Mi.get("/", async (e) => {
8495
8547
  }
8496
8548
  }
8497
8549
  let s = o.map(() => "?").join(",");
8498
- return await Ni(t, `DELETE FROM node_assets WHERE assetId IN (${s})`, o), await Ni(t, `DELETE FROM assets WHERE id IN (${s})`, o), e.json({
8550
+ return await Li(t, `DELETE FROM node_assets WHERE assetId IN (${s})`, o), await Li(t, `DELETE FROM assets WHERE id IN (${s})`, o), e.json({
8499
8551
  success: !0,
8500
8552
  id: r,
8501
8553
  purged: !0,
@@ -8511,8 +8563,8 @@ Mi.get("/", async (e) => {
8511
8563
  });
8512
8564
  //#endregion
8513
8565
  //#region server/routes/public/node.ts
8514
- var Fi = new e();
8515
- function Ii(e, t) {
8566
+ var zi = new e();
8567
+ function Bi(e, t) {
8516
8568
  let n = /* @__PURE__ */ new Date();
8517
8569
  if (e && String(e).trim() !== "") {
8518
8570
  let t = new Date(e);
@@ -8524,7 +8576,7 @@ function Ii(e, t) {
8524
8576
  }
8525
8577
  return !0;
8526
8578
  }
8527
- async function Li(e, t) {
8579
+ async function Vi(e, t) {
8528
8580
  if (!t || typeof t != "object") return t;
8529
8581
  let n = { ...t };
8530
8582
  for (let [t, r] of Object.entries(n)) if (typeof r == "string" && r.startsWith("ast_")) try {
@@ -8545,10 +8597,10 @@ async function Li(e, t) {
8545
8597
  };
8546
8598
  }
8547
8599
  } catch {}
8548
- else typeof r == "object" && r && !Array.isArray(r) && !r.url && (n[t] = await Li(e, r));
8600
+ else typeof r == "object" && r && !Array.isArray(r) && !r.url && (n[t] = await Vi(e, r));
8549
8601
  return n;
8550
8602
  }
8551
- async function Ri(e, t, n) {
8603
+ async function Hi(e, t, n) {
8552
8604
  let r = t.filter((e) => e.componentId === "content-feed" || e.componentId === "article-list");
8553
8605
  for (let t of r) {
8554
8606
  let r = t.data || {}, i = r.nodeType || "article", a = Number(r.limit) || 12, o = r.sortBy || "updatedAt", s = "FROM content_nodes WHERE contentType = ? AND isHidden = 0 AND (status = 'published' OR status IS NULL)", c = [i];
@@ -8564,7 +8616,7 @@ async function Ri(e, t, n) {
8564
8616
  if (e.dataJson) try {
8565
8617
  t = typeof e.dataJson == "string" ? JSON.parse(e.dataJson) : e.dataJson;
8566
8618
  } catch {}
8567
- return Ii(t.startShowingAt, t.stopShowingAt) ? {
8619
+ return Bi(t.startShowingAt, t.stopShowingAt) ? {
8568
8620
  id: e.id,
8569
8621
  title: e.title,
8570
8622
  slug: e.slug,
@@ -8581,7 +8633,7 @@ async function Ri(e, t, n) {
8581
8633
  }
8582
8634
  }
8583
8635
  }
8584
- async function zi(e, t, n, r, i = !1) {
8636
+ async function Ui(e, t, n, r, i = !1) {
8585
8637
  if (!t) return { blocks: [] };
8586
8638
  let a = await e.prepare("\n WITH RECURSIVE ancestor_path(id, contentId, title, slug, parentId, level) AS (\n SELECT t.id, t.contentId, c.title, c.slug, t.parentId, 0\n FROM tree_nodes t\n INNER JOIN content_nodes c ON t.contentId = c.id\n WHERE t.id = ? OR c.id = ?\n UNION ALL\n SELECT t.id, t.contentId, c.title, c.slug, t.parentId, ap.level + 1\n FROM tree_nodes t\n INNER JOIN content_nodes c ON t.contentId = c.id\n INNER JOIN ancestor_path ap ON t.id = ap.parentId\n )\n SELECT * FROM ancestor_path ORDER BY level ASC\n ").all(t, t), o = Array.isArray(a) ? a : a?.results || [];
8587
8639
  if (!o || o.length === 0) return { blocks: [] };
@@ -8611,10 +8663,10 @@ async function zi(e, t, n, r, i = !1) {
8611
8663
  try {
8612
8664
  o = typeof t.dataJson == "string" ? JSON.parse(t.dataJson) : t.dataJson;
8613
8665
  } catch {}
8614
- let s = o.hidden === !0 || o.hidden === 1 || o.hidden === "1" || o.hidden === "true", l = Ii(o.startShowingAt, o.stopShowingAt);
8666
+ let s = o.hidden === !0 || o.hidden === 1 || o.hidden === "1" || o.hidden === "true", l = Bi(o.startShowingAt, o.stopShowingAt);
8615
8667
  if (!i && (s || !l)) continue;
8616
- let u = t.elementType || t.componentId || "text-block", d = r.blocks?.[u]?.fields || r.elements?.[u]?.fields || r.components?.[u]?.fields || {}, f = String(o.blockId || o._instanceId || o.id || t.blockId || t.id), p = Bi(o, d);
8617
- p = await si(e, p), p = await Li(e, p), p.blockId = f;
8668
+ let u = t.elementType || t.componentId || "text-block", d = r.blocks?.[u]?.fields || r.elements?.[u]?.fields || r.components?.[u]?.fields || {}, f = String(o.blockId || o._instanceId || o.id || t.blockId || t.id), p = Wi(o, d);
8669
+ p = await di(e, p), p = await Vi(e, p), p.blockId = f;
8618
8670
  let m = t.region || n;
8619
8671
  c[m] || (c[m] = []), c[m].push({
8620
8672
  instanceId: t.id,
@@ -8633,7 +8685,7 @@ async function zi(e, t, n, r, i = !1) {
8633
8685
  }
8634
8686
  return { blocks: [] };
8635
8687
  }
8636
- function Bi(e, t = {}) {
8688
+ function Wi(e, t = {}) {
8637
8689
  let n = {};
8638
8690
  for (let [r, i] of Object.entries(e)) {
8639
8691
  if (r === "disabledRegions" || r === "hidden" || r === "is_hidden" || r === "isHidden" || r === "status" || r === "startShowingAt" || r === "stopShowingAt" || r === "slug" || r === "title" || r === "id" || r.startsWith("_")) continue;
@@ -8642,7 +8694,38 @@ function Bi(e, t = {}) {
8642
8694
  }
8643
8695
  return n;
8644
8696
  }
8645
- async function Vi(e, t, n) {
8697
+ function Gi(e) {
8698
+ let t = e.socialImage;
8699
+ if (!t || typeof t != "object") return null;
8700
+ let n = (e, t) => {
8701
+ if (!e || typeof e != "object") return null;
8702
+ let n = e.variants || {}, r = t.find((e) => n[e]), i = r ? n[r] : null;
8703
+ return {
8704
+ assetId: e.id,
8705
+ url: i?.url || e.url || e.originalUrl || "",
8706
+ cropCoordinates: i?.cropCoordinates || e.cropCoordinates || null,
8707
+ ...r ? { variant: r } : {}
8708
+ };
8709
+ };
8710
+ return {
8711
+ facebook: n(e.fbImage || t, [
8712
+ "fbImage",
8713
+ "aspectRatio",
8714
+ "standard"
8715
+ ]),
8716
+ x: n(e.xImage || t, [
8717
+ "xImage",
8718
+ "aspectRatio",
8719
+ "standard"
8720
+ ]),
8721
+ whatsapp: n(e.whatsappImage || t, [
8722
+ "whatsappImage",
8723
+ "aspectRatio",
8724
+ "standard"
8725
+ ])
8726
+ };
8727
+ }
8728
+ async function Ki(e, t, n) {
8646
8729
  if (!t) return "";
8647
8730
  let r = await e.prepare("\n WITH RECURSIVE ancestor_path(id, parentId, slug, level) AS (\n SELECT t.id, t.parentId, c.slug, 0\n FROM tree_nodes t\n INNER JOIN content_nodes c ON t.contentId = c.id\n WHERE t.id = ? AND t.treeId = ?\n UNION ALL\n SELECT t.id, t.parentId, c.slug, ap.level + 1\n FROM tree_nodes t\n INNER JOIN content_nodes c ON t.contentId = c.id\n INNER JOIN ancestor_path ap ON t.id = ap.parentId\n WHERE t.treeId = ?\n )\n SELECT slug FROM ancestor_path ORDER BY level DESC\n ").all(t, n, n), i = Array.isArray(r) ? r : r?.results || [], a = [];
8648
8731
  for (let e of i) {
@@ -8651,7 +8734,7 @@ async function Vi(e, t, n) {
8651
8734
  }
8652
8735
  return "/" + a.join("/");
8653
8736
  }
8654
- async function Hi(e, t, n, r, i) {
8737
+ async function qi(e, t, n, r, i) {
8655
8738
  let a = {}, o = null;
8656
8739
  if (t) {
8657
8740
  let n = await e.prepare("\n WITH RECURSIVE ancestor_path(id, contentId, title, slug, parentId, level) AS (\n SELECT t.id, t.contentId, c.title, c.slug, t.parentId, 0\n FROM tree_nodes t\n INNER JOIN content_nodes c ON t.contentId = c.id\n WHERE t.id = ? OR c.id = ?\n UNION ALL\n SELECT t.id, t.contentId, c.title, c.slug, t.parentId, ap.level + 1\n FROM tree_nodes t\n INNER JOIN content_nodes c ON t.contentId = c.id\n INNER JOIN ancestor_path ap ON t.id = ap.parentId\n )\n SELECT c.dataJson, c.draftDataJson \n FROM ancestor_path ap\n INNER JOIN content_nodes c ON ap.contentId = c.id\n ORDER BY ap.level ASC\n ").all(t, t), i = Array.isArray(n) ? n : n?.results || [], s = /* @__PURE__ */ new Set([
@@ -8689,7 +8772,7 @@ async function Hi(e, t, n, r, i) {
8689
8772
  inheritedFields: a
8690
8773
  };
8691
8774
  }
8692
- Fi.get("/*", async (e) => {
8775
+ zi.get("/*", async (e) => {
8693
8776
  try {
8694
8777
  let t = e.get("db"), n = new URL(e.req.url).pathname.match(/\/node\/(.+)$/), r = (n ? n[1] : "home").replace(/^\/+|\/+$/g, ""), i = e.req.query("channelId") || e.req.query("channel") || "1", a = e.req.query("lang") || "en", o = e.req.query("preview") === "true", s = isNaN(Number(i)) ? await t.prepare("SELECT * FROM channels WHERE key = ?").get(i) : await t.prepare("SELECT * FROM channels WHERE id = ?").get(Number(i));
8695
8778
  if (!s) return e.json({ error: `Channel '${i}' not found` }, 404);
@@ -8700,7 +8783,7 @@ Fi.get("/*", async (e) => {
8700
8783
  let t = await d.get(f);
8701
8784
  if (t) return e.header("X-Cache", "HIT"), e.json(t);
8702
8785
  }
8703
- let p = ui(e.env?.BUNDLED_DEFINITIONS), m = !isNaN(Number(r)) && r.length > 0, h = null, g = null, _ = e.req.query("treeId");
8786
+ let p = mi(e.env?.BUNDLED_DEFINITIONS), m = !isNaN(Number(r)) && r.length > 0, h = null, g = null, _ = e.req.query("treeId");
8704
8787
  if (m) h = l === null ? await t.prepare("SELECT * FROM content_nodes WHERE id = ?").get(Number(r)) : await t.prepare("\n SELECT cn.* \n FROM content_nodes cn\n INNER JOIN node_channels nc ON cn.id = nc.nodeId\n WHERE cn.id = ? AND nc.channelId = ?\n ").get(Number(r), l);
8705
8788
  else {
8706
8789
  let e = r.split("/"), n = e[e.length - 1], i = "/" + r.replace(/^\/+|\/+$/g, ""), a = `
@@ -8711,7 +8794,7 @@ Fi.get("/*", async (e) => {
8711
8794
  WHERE cn.slug = ? ${l === null ? "" : "AND nc.channelId = ?"}
8712
8795
  `, o = l === null ? [n] : [n, l], s = await t.prepare(a).all(...o), c = Array.isArray(s) ? s : s?.results || [];
8713
8796
  if (c.length > 0) for (let e of c) {
8714
- let n = (await Vi(t, e.treeNodeId, e.treeId)).replace(/^\/+|\/+$/g, ""), r = i.replace(/^\/+|\/+$/g, "");
8797
+ let n = (await Ki(t, e.treeNodeId, e.treeId)).replace(/^\/+|\/+$/g, ""), r = i.replace(/^\/+|\/+$/g, "");
8715
8798
  if (n === r || r === "home" && (n === "" || n === "home")) {
8716
8799
  h = e, g = e;
8717
8800
  break;
@@ -8729,7 +8812,7 @@ Fi.get("/*", async (e) => {
8729
8812
  LIMIT 1
8730
8813
  `).get(...e);
8731
8814
  }
8732
- let v = g?.treeId || _ || "main-nav", y = g?.parentId || null, b = g?.treeNodeId ? await Vi(t, g.treeNodeId, v) : `/${(h.slug || "").replace(/^\/+|\/+$/g, "")}`, x = {
8815
+ let v = g?.treeId || _ || "main-nav", y = g?.parentId || null, b = g?.treeNodeId ? await Ki(t, g.treeNodeId, v) : `/${(h.slug || "").replace(/^\/+|\/+$/g, "")}`, x = {
8733
8816
  id: h.id,
8734
8817
  title: h.title,
8735
8818
  slug: h.slug,
@@ -8747,21 +8830,23 @@ Fi.get("/*", async (e) => {
8747
8830
  k = typeof A == "string" ? JSON.parse(A) : A;
8748
8831
  } catch {}
8749
8832
  k.disabledRegions && (T = k.disabledRegions), O = k.hidden === !0 || k.hidden === 1 || k.hidden === "1" || k.hidden === "true", E = k.startShowingAt || null, D = k.stopShowingAt || null;
8750
- let j = k.layoutId, ee = j && j !== "inherit", { resolvedLayoutId: M, inheritedFields: te } = await Hi(t, y, v, o, w), N = ee ? j : M || C.defaultLayout || null;
8833
+ let j = k.layoutId, ee = j && j !== "inherit", { resolvedLayoutId: M, inheritedFields: te } = await qi(t, y, v, o, w), N = ee ? j : M || C.defaultLayout || null;
8751
8834
  for (let [e, t] of Object.entries(te)) (k[e] === void 0 || k[e] === null || k[e] === "" || k[e] === "inherit") && t !== void 0 && (k[e] = t);
8752
- let P = await si(t, Bi(k, w));
8753
- P = await Li(t, P), x.slug = h.slug, x.title = h.title, Object.assign(x, P), x.layoutId = N;
8754
- let ne = !!h.isHidden || O, re = !Ii(E, D);
8835
+ let P = await di(t, Wi(k, w));
8836
+ P = await Vi(t, P);
8837
+ let F = Gi(P);
8838
+ delete P.socialImage, delete P.fbImage, delete P.xImage, delete P.whatsappImage, F && (P.socialImages = F), x.slug = h.slug, x.title = h.title, Object.assign(x, P), x.layoutId = N;
8839
+ let ne = !!h.isHidden || O, re = !Bi(E, D);
8755
8840
  if (!o && (ne || re)) return e.json({ error: "Node is hidden or outside its scheduled publishing window" }, 404);
8756
- let F = [];
8841
+ let ie = [];
8757
8842
  if (g?.treeNodeId) {
8758
8843
  let e = await t.prepare("\n SELECT t.id as treeNodeId, t.contentId as id, c.title, c.slug, c.language, c.contentType as nodeType, c.isHidden, c.dataJson, c.draftDataJson\n FROM tree_nodes t\n INNER JOIN content_nodes c ON t.contentId = c.id\n WHERE t.parentId = ? AND t.treeId = ?\n ORDER BY t.sortOrder ASC\n ").all(g.treeNodeId, v), n = Array.isArray(e) ? e : e?.results || [], r = x.path === "/" ? "" : x.path;
8759
- F = n.map((e) => {
8844
+ ie = n.map((e) => {
8760
8845
  let t = {}, n = o && e.draftDataJson ? e.draftDataJson : e.dataJson;
8761
8846
  try {
8762
8847
  t = typeof n == "string" ? JSON.parse(n) : n;
8763
8848
  } catch {}
8764
- let i = !!e.isHidden || t.hidden === !0 || t.hidden === 1 || t.hidden === "1", a = Ii(t.startShowingAt, t.stopShowingAt), s = (e.slug || "").replace(/^\/+|\/+$/g, "");
8849
+ let i = !!e.isHidden || t.hidden === !0 || t.hidden === 1 || t.hidden === "1", a = Bi(t.startShowingAt, t.stopShowingAt), s = (e.slug || "").replace(/^\/+|\/+$/g, "");
8765
8850
  return !o && (i || !a) ? null : {
8766
8851
  treeNodeId: e.treeNodeId,
8767
8852
  id: e.id,
@@ -8773,21 +8858,21 @@ Fi.get("/*", async (e) => {
8773
8858
  };
8774
8859
  }).filter(Boolean);
8775
8860
  }
8776
- x.children = F;
8777
- let ie = +!!o, I = await t.prepare("\n SELECT * FROM content_blocks \n WHERE contentId = ? AND isDraft = ? \n ORDER BY sortOrder ASC\n ").all(h.id, ie), ae = Array.isArray(I) ? I : I?.results || [];
8778
- ae.length === 0 && !o && (I = await t.prepare("\n SELECT * FROM content_blocks \n WHERE contentId = ?\n ORDER BY sortOrder ASC\n ").all(h.id), ae = Array.isArray(I) ? I : I?.results || []);
8779
- let L = {}, oe = {};
8780
- for (let e of ae) {
8861
+ x.children = ie;
8862
+ let ae = +!!o, I = await t.prepare("\n SELECT * FROM content_blocks \n WHERE contentId = ? AND isDraft = ? \n ORDER BY sortOrder ASC\n ").all(h.id, ae), oe = Array.isArray(I) ? I : I?.results || [];
8863
+ oe.length === 0 && !o && (I = await t.prepare("\n SELECT * FROM content_blocks \n WHERE contentId = ?\n ORDER BY sortOrder ASC\n ").all(h.id), oe = Array.isArray(I) ? I : I?.results || []);
8864
+ let L = {}, R = {};
8865
+ for (let e of oe) {
8781
8866
  let n = e.region || "main";
8782
- L[n] || (L[n] = [], oe[n] = { isInherited: !1 });
8867
+ L[n] || (L[n] = [], R[n] = { isInherited: !1 });
8783
8868
  let r = {};
8784
8869
  try {
8785
8870
  r = typeof e.dataJson == "string" ? JSON.parse(e.dataJson) : e.dataJson;
8786
8871
  } catch {}
8787
- let i = r.hidden === !0 || r.hidden === 1 || r.hidden === "1" || r.hidden === "true", a = Ii(r.startShowingAt, r.stopShowingAt);
8872
+ let i = r.hidden === !0 || r.hidden === 1 || r.hidden === "1" || r.hidden === "true", a = Bi(r.startShowingAt, r.stopShowingAt);
8788
8873
  if (!o && (i || !a)) continue;
8789
- let s = e.elementType || e.componentId || "text-block", c = p.blocks?.[s]?.fields || p.elements?.[s]?.fields || p.components?.[s]?.fields || {}, l = String(r.blockId || r._instanceId || r.id || e.blockId || e.id), u = Bi(r, c);
8790
- u = await si(t, u), u.blockId = l, L[n].push({
8874
+ let s = e.elementType || e.componentId || "text-block", c = p.blocks?.[s]?.fields || p.elements?.[s]?.fields || p.components?.[s]?.fields || {}, l = String(r.blockId || r._instanceId || r.id || e.blockId || e.id), u = Wi(r, c);
8875
+ u = await di(t, u), u.blockId = l, L[n].push({
8791
8876
  instanceId: e.id,
8792
8877
  blockId: l,
8793
8878
  componentId: s,
@@ -8807,27 +8892,27 @@ Fi.get("/*", async (e) => {
8807
8892
  };
8808
8893
  for (let [e, n] of Object.entries(se)) {
8809
8894
  let r = L[e] && L[e].length > 0, i = !!T[e];
8810
- if (L[e] || (L[e] = [], oe[e] = { isInherited: !1 }), (n?.inherit === "parent" || n?.inherit === !0 || n?.inherit === "true" || e === "header" || e === "footer") && !r && !i && y) {
8811
- let n = await zi(t, y, e, p, o);
8812
- if (n.blocks.length > 0 && (L[e] = n.blocks, oe[e] = {
8895
+ if (L[e] || (L[e] = [], R[e] = { isInherited: !1 }), (n?.inherit === "parent" || n?.inherit === !0 || n?.inherit === "true" || e === "header" || e === "footer") && !r && !i && y) {
8896
+ let n = await Ui(t, y, e, p, o);
8897
+ if (n.blocks.length > 0 && (L[e] = n.blocks, R[e] = {
8813
8898
  isInherited: !0,
8814
8899
  inheritedFromId: n.inheritedFromId,
8815
8900
  inheritedFromTitle: n.inheritedFromTitle
8816
- }, n.subRegions)) for (let [t, r] of Object.entries(n.subRegions)) t !== e && (L[t] = r, oe[t] = {
8901
+ }, n.subRegions)) for (let [t, r] of Object.entries(n.subRegions)) t !== e && (L[t] = r, R[t] = {
8817
8902
  isInherited: !0,
8818
8903
  inheritedFromId: n.inheritedFromId,
8819
8904
  inheritedFromTitle: n.inheritedFromTitle
8820
8905
  });
8821
8906
  }
8822
8907
  }
8823
- for (let e of Object.keys(L)) await Ri(t, L[e], l);
8908
+ for (let e of Object.keys(L)) await Hi(t, L[e], l);
8824
8909
  let ce = {
8825
8910
  channelId: l || u,
8826
8911
  treeId: v,
8827
8912
  language: x.language,
8828
8913
  node: x,
8829
8914
  content: L,
8830
- regionMeta: oe
8915
+ regionMeta: R
8831
8916
  };
8832
8917
  return o || (await d.set(f, ce, 300), e.header("X-Cache", "MISS")), e.json(ce);
8833
8918
  } catch (t) {
@@ -8839,8 +8924,8 @@ Fi.get("/*", async (e) => {
8839
8924
  });
8840
8925
  //#endregion
8841
8926
  //#region server/routes/public/tree.ts
8842
- var Ui = new e();
8843
- function Wi(e, t) {
8927
+ var Ji = new e();
8928
+ function Yi(e, t) {
8844
8929
  let n = /* @__PURE__ */ new Date();
8845
8930
  if (e && String(e).trim() !== "") {
8846
8931
  let t = new Date(e);
@@ -8852,7 +8937,7 @@ function Wi(e, t) {
8852
8937
  }
8853
8938
  return !0;
8854
8939
  }
8855
- Ui.get("/:treeParam", async (e) => {
8940
+ Ji.get("/:treeParam", async (e) => {
8856
8941
  try {
8857
8942
  let t = e.get("db"), n = e.req.param("treeParam"), r = e.req.query("channelId") || e.req.query("channel") || "default", i = e.req.query("preview") === "true";
8858
8943
  if (r && r !== "default" && r !== "all") {
@@ -8871,7 +8956,7 @@ Ui.get("/:treeParam", async (e) => {
8871
8956
  if (c && c.isHidden && !i) return e.json({ error: `Tree '${n}' is hidden` }, 404);
8872
8957
  let l = c?.id || (s ? Number(n) : null), u = {};
8873
8958
  if (c && c.dataJson) try {
8874
- let t = typeof c.dataJson == "string" ? JSON.parse(c.dataJson) : c.dataJson, r = e.env?.BUNDLED_DEFINITIONS, i = ui(r), a = (i.trees?.[c.treeType || n] || i.trees?.site || {}).fields || {};
8959
+ let t = typeof c.dataJson == "string" ? JSON.parse(c.dataJson) : c.dataJson, r = e.env?.BUNDLED_DEFINITIONS, i = mi(r), a = (i.trees?.[c.treeType || n] || i.trees?.site || {}).fields || {};
8875
8960
  for (let [e, n] of Object.entries(t)) a[e]?.public === !0 && (u[e] = n);
8876
8961
  } catch (e) {
8877
8962
  console.warn("[CMS Public Tree API] Failed to parse tree dataJson", e);
@@ -8891,7 +8976,7 @@ Ui.get("/:treeParam", async (e) => {
8891
8976
  if (r) try {
8892
8977
  n = typeof r == "string" ? JSON.parse(r) : r, delete n._isTreeDraft, delete n._draftParentId, delete n.isNew, delete n.hidden, delete n.is_hidden, delete n.isHidden, delete n.status;
8893
8978
  } catch {}
8894
- let a = !i && (e.status === "draft" || e.status === "new"), o = !!e.isHidden || a || n.hidden === !0 || n.hidden === 1 || n.hidden === "1" || n.hidden === "true", s = Wi(n.startShowingAt, n.stopShowingAt), c = (e.slug || "").replace(/^\/+|\/+$/g, ""), l = c === "home" || c === "homee" ? "/" : `${t}/${c}`.replace(/\/+/g, "/"), u = {
8979
+ let a = !i && (e.status === "draft" || e.status === "new"), o = !!e.isHidden || a || n.hidden === !0 || n.hidden === 1 || n.hidden === "1" || n.hidden === "true", s = Yi(n.startShowingAt, n.stopShowingAt), c = (e.slug || "").replace(/^\/+|\/+$/g, ""), l = c === "home" || c === "homee" ? "/" : `${t}/${c}`.replace(/\/+/g, "/"), u = {
8895
8980
  id: e.id,
8896
8981
  treeNodeId: e.treeNodeId,
8897
8982
  parentId: e.parentId || null,
@@ -8926,8 +9011,8 @@ Ui.get("/:treeParam", async (e) => {
8926
9011
  });
8927
9012
  //#endregion
8928
9013
  //#region server/routes/public/assets.ts
8929
- var Gi = new e();
8930
- function Ki(e, t) {
9014
+ var Xi = new e();
9015
+ function Zi(e, t) {
8931
9016
  if (t === "webp") return "image/webp";
8932
9017
  if (t === "avif") return "image/avif";
8933
9018
  if (t === "jpeg" || t === "jpg") return "image/jpeg";
@@ -8935,7 +9020,7 @@ function Ki(e, t) {
8935
9020
  let n = e.toLowerCase();
8936
9021
  return n.endsWith(".jpg") || n.endsWith(".jpeg") ? "image/jpeg" : n.endsWith(".png") ? "image/png" : n.endsWith(".webp") ? "image/webp" : n.endsWith(".gif") ? "image/gif" : n.endsWith(".svg") ? "image/svg+xml" : n.endsWith(".pdf") ? "application/pdf" : n.endsWith(".mp4") ? "video/mp4" : n.endsWith(".webm") ? "video/webm" : "application/octet-stream";
8937
9022
  }
8938
- Gi.get("/*", async (e) => {
9023
+ Xi.get("/*", async (e) => {
8939
9024
  let t = e.req.path.replace(/^\/media\//, "").replace(/^\//, "");
8940
9025
  if (!t) return e.text("Asset key missing", 400);
8941
9026
  let o = e.env?.MEDIA_BUCKET, { w: l, h: u, q: d, f } = e.req.query(), p = !!(l || u || d || f), m = e.req.header("Via")?.includes("image-resizing") || e.req.header("User-Agent")?.includes("Cloudflare-ImgRen");
@@ -8975,7 +9060,7 @@ Gi.get("/*", async (e) => {
8975
9060
  if (!p) {
8976
9061
  let n = i(g);
8977
9062
  return e.body(n, 200, {
8978
- "Content-Type": Ki(t),
9063
+ "Content-Type": Zi(t),
8979
9064
  "Cache-Control": "public, max-age=86400"
8980
9065
  });
8981
9066
  }
@@ -8983,7 +9068,7 @@ Gi.get("/*", async (e) => {
8983
9068
  if (n(b)) {
8984
9069
  let n = i(b);
8985
9070
  return e.body(n, 200, {
8986
- "Content-Type": Ki(t, v),
9071
+ "Content-Type": Zi(t, v),
8987
9072
  "Cache-Control": "public, max-age=31536000, immutable",
8988
9073
  "X-Local-Cache": "HIT"
8989
9074
  });
@@ -8993,14 +9078,14 @@ Gi.get("/*", async (e) => {
8993
9078
  typeof o == "number" && (c.width = o), typeof m == "number" && (c.height = m), (c.width || c.height) && (c.fit = "cover", i = i.resize(c)), v === "webp" ? i = i.webp({ quality: typeof _ == "number" ? _ : 80 }) : v === "avif" ? i = i.avif({ quality: typeof _ == "number" ? _ : 70 }) : v === "jpeg" || v === "jpg" ? i = i.jpeg({ quality: typeof _ == "number" ? _ : 80 }) : v === "png" && (i = i.png({ quality: typeof _ == "number" ? _ : 80 }));
8994
9079
  let l = await i.toBuffer();
8995
9080
  return r(s(b), { recursive: !0 }), a(b, l), e.body(l, 200, {
8996
- "Content-Type": Ki(t, v),
9081
+ "Content-Type": Zi(t, v),
8997
9082
  "Cache-Control": "public, max-age=31536000, immutable",
8998
9083
  "X-Local-Cache": "MISS"
8999
9084
  });
9000
9085
  } catch {
9001
9086
  let n = i(g);
9002
9087
  return e.body(n, 200, {
9003
- "Content-Type": Ki(t),
9088
+ "Content-Type": Zi(t),
9004
9089
  "Cache-Control": "public, max-age=86400"
9005
9090
  });
9006
9091
  }
@@ -9011,8 +9096,8 @@ Gi.get("/*", async (e) => {
9011
9096
  });
9012
9097
  //#endregion
9013
9098
  //#region server/routes/public/paths.ts
9014
- var qi = new e();
9015
- function Ji(e, t) {
9099
+ var Qi = new e();
9100
+ function $i(e, t) {
9016
9101
  let n = /* @__PURE__ */ new Date();
9017
9102
  if (e && String(e).trim() !== "") {
9018
9103
  let t = new Date(e);
@@ -9024,7 +9109,7 @@ function Ji(e, t) {
9024
9109
  }
9025
9110
  return !0;
9026
9111
  }
9027
- qi.get("/", async (e) => {
9112
+ Qi.get("/", async (e) => {
9028
9113
  try {
9029
9114
  let t = await e.get("db").prepare("\n SELECT \n t.id as treeNodeId,\n t.parentId,\n c.slug,\n c.contentType as nodeType,\n c.status,\n c.dataJson\n FROM tree_nodes t\n INNER JOIN content_nodes c ON t.contentId = c.id\n WHERE (c.deletedAt IS NULL OR c.deletedAt = '')\n ").all(), n = Array.isArray(t) ? t : t?.results || [], r = [];
9030
9115
  function i(e = null, t = "") {
@@ -9037,7 +9122,7 @@ qi.get("/", async (e) => {
9037
9122
  if (e.dataJson) try {
9038
9123
  n = typeof e.dataJson == "string" ? JSON.parse(e.dataJson) : e.dataJson;
9039
9124
  } catch {}
9040
- let a = e.status === "published" || e.status === "active", o = Ji(n.startShowingAt, n.stopShowingAt);
9125
+ let a = e.status === "published" || e.status === "active", o = $i(n.startShowingAt, n.stopShowingAt);
9041
9126
  if (!a || !o) continue;
9042
9127
  let s = (e.slug || "").replace(/^\/+|\/+$/g, ""), c = s === "home" || s === "homee" ? "/" : `${t}/${s}`.replace(/\/+/g, "/");
9043
9128
  e.nodeType !== "external-link" && r.push(c);
@@ -9054,7 +9139,7 @@ qi.get("/", async (e) => {
9054
9139
  });
9055
9140
  //#endregion
9056
9141
  //#region server/index.ts
9057
- var $ = new e(), Yi = !1;
9142
+ var $ = new e(), ea = !1;
9058
9143
  $.use("*", f()), $.use("/media/*", f({
9059
9144
  origin: "*",
9060
9145
  allowMethods: [
@@ -9075,13 +9160,13 @@ $.use("*", f()), $.use("/media/*", f({
9075
9160
  let n = new URL(e.req.url), r = (e.req.header("host") || n.hostname).split(":")[0];
9076
9161
  e.set("currentDomain", r);
9077
9162
  let i = g(e);
9078
- if (e.set("db", i), !Yi) try {
9079
- await Lr(i), Yi = !0;
9163
+ if (e.set("db", i), !ea) try {
9164
+ await Lr(i), ea = !0;
9080
9165
  } catch (e) {
9081
9166
  console.error("❌ [CMS Server] Failed to initialize system tables on cold start:", e);
9082
9167
  }
9083
9168
  await t();
9084
- }), $.route("/media", Gi), $.use("/media/*", Br()), $.route("/api/cms/nodes", Z), $.route("/api/cms/nodes.json", Z), $.route("/api/cms/formcsv", Z), $.route("/api/cms/formcsv.json", Z), $.route("/api/cms/stats", Di), $.route("/api/cms/stats.json", Di), $.route("/api/cms", gi), $.route("/api/cms/channels", bi), $.route("/api/cms/channels.json", bi), $.route("/api/cms/schemas", xi), $.route("/api/cms/schemas.json", xi), $.route("/api/cms", wi), $.route("/api/admin/assets", Mi), $.route("/api/v1/node", Fi), $.route("/api/v1/page", Fi), $.route("/api/v1/tree", Ui), $.route("/api/v1/all-paths", qi), $.get("*", async (e) => {
9169
+ }), $.route("/media", Xi), $.use("/media/*", Br()), $.route("/api/cms/nodes", Z), $.route("/api/cms/nodes.json", Z), $.route("/api/cms/formcsv", Z), $.route("/api/cms/formcsv.json", Z), $.route("/api/cms/stats", Fi), $.route("/api/cms/stats.json", Fi), $.route("/api/cms", wi), $.route("/api/cms/channels", Oi), $.route("/api/cms/channels.json", Oi), $.route("/api/cms/schemas", ki), $.route("/api/cms/schemas.json", ki), $.route("/api/cms", Mi), $.route("/api/admin/assets", Ii), $.route("/api/v1/node", zi), $.route("/api/v1/page", zi), $.route("/api/v1/tree", Ji), $.route("/api/v1/all-paths", Qi), $.get("*", async (e) => {
9085
9170
  if (e.env?.ASSETS) {
9086
9171
  let t = await e.env.ASSETS.fetch(e.req.raw);
9087
9172
  if (t.status === 404) {