@brightsideoy/kama 0.1.0-alpha.78 → 0.1.0-alpha.80

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.

Potentially problematic release.


This version of @brightsideoy/kama might be problematic. Click here for more details.

package/dist/index.js CHANGED
@@ -140,41 +140,41 @@ function T(e) {
140
140
  }
141
141
  return !1;
142
142
  }
143
- var E = (e) => (S(e) || w(e)) && !!e.anchor, D = Symbol("break visit"), O = Symbol("skip children"), k = Symbol("remove node");
144
- function A(e, t) {
143
+ var E = (e) => (S(e) || w(e)) && !!e.anchor, D = Symbol("break visit"), ee = Symbol("skip children"), O = Symbol("remove node");
144
+ function k(e, t) {
145
145
  let n = ne(t);
146
- y(e) ? ee(null, e.contents, n, Object.freeze([e])) === k && (e.contents = null) : ee(null, e, n, Object.freeze([]));
146
+ y(e) ? te(null, e.contents, n, Object.freeze([e])) === O && (e.contents = null) : te(null, e, n, Object.freeze([]));
147
147
  }
148
- A.BREAK = D, A.SKIP = O, A.REMOVE = k;
149
- function ee(e, t, n, r) {
148
+ k.BREAK = D, k.SKIP = ee, k.REMOVE = O;
149
+ function te(e, t, n, r) {
150
150
  let i = re(e, t, n, r);
151
- if (T(i) || x(i)) return ie(e, r, i), ee(e, i, n, r);
151
+ if (T(i) || x(i)) return ie(e, r, i), te(e, i, n, r);
152
152
  if (typeof i != "symbol") {
153
153
  if (w(t)) {
154
154
  r = Object.freeze(r.concat(t));
155
155
  for (let e = 0; e < t.items.length; ++e) {
156
- let i = ee(e, t.items[e], n, r);
156
+ let i = te(e, t.items[e], n, r);
157
157
  if (typeof i == "number") e = i - 1;
158
158
  else if (i === D) return D;
159
- else i === k && (t.items.splice(e, 1), --e);
159
+ else i === O && (t.items.splice(e, 1), --e);
160
160
  }
161
161
  } else if (x(t)) {
162
162
  r = Object.freeze(r.concat(t));
163
- let e = ee("key", t.key, n, r);
163
+ let e = te("key", t.key, n, r);
164
164
  if (e === D) return D;
165
- e === k && (t.key = null);
166
- let i = ee("value", t.value, n, r);
165
+ e === O && (t.key = null);
166
+ let i = te("value", t.value, n, r);
167
167
  if (i === D) return D;
168
- i === k && (t.value = null);
168
+ i === O && (t.value = null);
169
169
  }
170
170
  }
171
171
  return i;
172
172
  }
173
- async function te(e, t) {
173
+ async function A(e, t) {
174
174
  let n = ne(t);
175
- y(e) ? await j(null, e.contents, n, Object.freeze([e])) === k && (e.contents = null) : await j(null, e, n, Object.freeze([]));
175
+ y(e) ? await j(null, e.contents, n, Object.freeze([e])) === O && (e.contents = null) : await j(null, e, n, Object.freeze([]));
176
176
  }
177
- te.BREAK = D, te.SKIP = O, te.REMOVE = k;
177
+ A.BREAK = D, A.SKIP = ee, A.REMOVE = O;
178
178
  async function j(e, t, n, r) {
179
179
  let i = await re(e, t, n, r);
180
180
  if (T(i) || x(i)) return ie(e, r, i), j(e, i, n, r);
@@ -185,16 +185,16 @@ async function j(e, t, n, r) {
185
185
  let i = await j(e, t.items[e], n, r);
186
186
  if (typeof i == "number") e = i - 1;
187
187
  else if (i === D) return D;
188
- else i === k && (t.items.splice(e, 1), --e);
188
+ else i === O && (t.items.splice(e, 1), --e);
189
189
  }
190
190
  } else if (x(t)) {
191
191
  r = Object.freeze(r.concat(t));
192
192
  let e = await j("key", t.key, n, r);
193
193
  if (e === D) return D;
194
- e === k && (t.key = null);
194
+ e === O && (t.key = null);
195
195
  let i = await j("value", t.value, n, r);
196
196
  if (i === D) return D;
197
- i === k && (t.value = null);
197
+ i === O && (t.value = null);
198
198
  }
199
199
  }
200
200
  return i;
@@ -311,7 +311,7 @@ var ae = {
311
311
  let t = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [], n = Object.entries(this.tags), r;
312
312
  if (e && n.length > 0 && T(e.contents)) {
313
313
  let t = {};
314
- A(e.contents, (e, n) => {
314
+ k(e.contents, (e, n) => {
315
315
  T(n) && n.tag && (t[n.tag] = !0);
316
316
  }), r = Object.keys(t);
317
317
  } else r = [];
@@ -334,7 +334,7 @@ function oe(e) {
334
334
  }
335
335
  function se(e) {
336
336
  let t = /* @__PURE__ */ new Set();
337
- return A(e, { Value(e, n) {
337
+ return k(e, { Value(e, n) {
338
338
  n.anchor && t.add(n.anchor);
339
339
  } }), t;
340
340
  }
@@ -439,7 +439,7 @@ var ue = class {
439
439
  resolve(e, t) {
440
440
  if (t?.maxAliasCount === 0) throw ReferenceError("Alias resolution is disabled");
441
441
  let n;
442
- t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], A(e, { Node: (e, t) => {
442
+ t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], k(e, { Node: (e, t) => {
443
443
  (v(t) || E(t)) && n.push(t);
444
444
  } }), t && (t.aliasResolveCache = n));
445
445
  let r;
@@ -509,8 +509,8 @@ var pe = (e) => !e || typeof e != "function" && typeof e != "object", I = class
509
509
  I.BLOCK_FOLDED = "BLOCK_FOLDED", I.BLOCK_LITERAL = "BLOCK_LITERAL", I.PLAIN = "PLAIN", I.QUOTE_DOUBLE = "QUOTE_DOUBLE", I.QUOTE_SINGLE = "QUOTE_SINGLE";
510
510
  //#endregion
511
511
  //#region node_modules/yaml/browser/dist/doc/createNode.js
512
- var L = "tag:yaml.org,2002:";
513
- function me(e, t, n) {
512
+ var me = "tag:yaml.org,2002:";
513
+ function he(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 me(e, t, n) {
518
518
  }
519
519
  return n.find((t) => t.identify?.(e) && !t.format);
520
520
  }
521
- function R(e, t, n) {
521
+ function L(e, t, n) {
522
522
  if (y(e) && (e = e.contents), T(e)) return e;
523
523
  if (x(e)) {
524
524
  let t = n.schema[p].createNode?.(n.schema, null, n);
@@ -533,8 +533,8 @@ function R(e, t, n) {
533
533
  node: null
534
534
  }, s.set(e, c);
535
535
  }
536
- t?.startsWith("!!") && (t = L + t.slice(2));
537
- let l = me(e, t, o.tags);
536
+ t?.startsWith("!!") && (t = me + t.slice(2));
537
+ let l = he(e, t, o.tags);
538
538
  if (!l) {
539
539
  if (e && typeof e.toJSON == "function" && (e = e.toJSON()), !e || typeof e != "object") {
540
540
  let t = new I(e);
@@ -548,7 +548,7 @@ function R(e, t, n) {
548
548
  }
549
549
  //#endregion
550
550
  //#region node_modules/yaml/browser/dist/nodes/Collection.js
551
- function z(e, t, n) {
551
+ function R(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 z(e, t, n) {
557
557
  e[n] = r, r = e;
558
558
  } else r = /* @__PURE__ */ new Map([[n, r]]);
559
559
  }
560
- return R(r, void 0, {
560
+ return L(r, void 0, {
561
561
  aliasDuplicateObjects: !1,
562
562
  keepUndefined: !1,
563
563
  onAnchor: () => {
@@ -567,7 +567,7 @@ function z(e, t, n) {
567
567
  sourceObjects: /* @__PURE__ */ new Map()
568
568
  });
569
569
  }
570
- var he = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done, ge = class extends ue {
570
+ var ge = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done, _e = class extends ue {
571
571
  constructor(e, t) {
572
572
  super(e), Object.defineProperty(this, "schema", {
573
573
  value: t,
@@ -581,11 +581,11 @@ var he = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next
581
581
  return e && (t.schema = e), t.items = t.items.map((t) => T(t) || x(t) ? t.clone(e) : t), this.range && (t.range = this.range.slice()), t;
582
582
  }
583
583
  addIn(e, t) {
584
- if (he(e)) this.add(t);
584
+ if (ge(e)) this.add(t);
585
585
  else {
586
586
  let [n, ...r] = e, i = this.get(n, !0);
587
587
  if (w(i)) i.addIn(r, t);
588
- else if (i === void 0 && this.schema) this.set(n, z(this.schema, r, t));
588
+ else if (i === void 0 && this.schema) this.set(n, R(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 he = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next
619
619
  else {
620
620
  let e = this.get(n, !0);
621
621
  if (w(e)) e.setIn(r, t);
622
- else if (e === void 0 && this.schema) this.set(n, z(this.schema, r, t));
622
+ else if (e === void 0 && this.schema) this.set(n, R(this.schema, r, t));
623
623
  else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
624
624
  }
625
625
  }
626
- }, _e = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
627
- function B(e, t) {
626
+ }, ve = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
627
+ function z(e, t) {
628
628
  return /^\n+$/.test(e) ? e.substring(1) : t ? e.replace(/^(?! *$)/gm, t) : e;
629
629
  }
630
- var ve = (e, t, n) => e.endsWith("\n") ? B(n, t) : n.includes("\n") ? "\n" + B(n, t) : (e.endsWith(" ") ? "" : " ") + n, ye = "flow", be = "block", xe = "quoted";
631
- function Se(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentWidth: a = 20, onFold: o, onOverflow: s } = {}) {
630
+ var ye = (e, t, n) => e.endsWith("\n") ? z(n, t) : n.includes("\n") ? "\n" + z(n, t) : (e.endsWith(" ") ? "" : " ") + n, be = "flow", xe = "block", Se = "quoted";
631
+ function Ce(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 Se(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 = Ce(e, h, t.length), h !== -1 && (d = h + c));
639
+ n === "block" && (h = we(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 Se(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
653
653
  }
654
654
  _ = h;
655
655
  }
656
- if (r === "\n") n === "block" && (h = Ce(e, h, t.length)), d = h + t.length + c, f = void 0;
656
+ if (r === "\n") n === "block" && (h = we(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 Se(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
680
680
  }
681
681
  return v;
682
682
  }
683
- function Ce(e, t, n) {
683
+ function we(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 Ce(e, t, n) {
693
693
  }
694
694
  //#endregion
695
695
  //#region node_modules/yaml/browser/dist/stringify/stringifyString.js
696
- var we = (e, t) => ({
696
+ var Te = (e, t) => ({
697
697
  indentAtStart: t ? e.indent.length : e.indentAtStart,
698
698
  lineWidth: e.options.lineWidth,
699
699
  minContentWidth: e.options.minContentWidth
700
- }), Te = (e) => /^(%|---|\.\.\.)/m.test(e);
701
- function Ee(e, t, n) {
700
+ }), Ee = (e) => /^(%|---|\.\.\.)/m.test(e);
701
+ function De(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 Ee(e, t, n) {
708
708
  }
709
709
  return !0;
710
710
  }
711
- function De(e, t) {
711
+ function Oe(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 || (Te(e) ? " " : ""), o = "", s = 0;
714
+ let { implicitKey: r } = t, i = t.options.doubleQuotedMinMultiLineLength, a = t.indent || (Ee(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 De(e, t) {
756
756
  break;
757
757
  default: e += 1;
758
758
  }
759
- return o = s ? o + n.slice(s) : n, r ? o : Se(o, a, xe, we(t, !1));
760
- }
761
- function Oe(e, t) {
762
- if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return De(e, t);
763
- let n = t.indent || (Te(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${n}`) + "'";
764
- return t.implicitKey ? r : Se(r, n, ye, we(t, !1));
759
+ return o = s ? o + n.slice(s) : n, r ? o : Ce(o, a, Se, Te(t, !1));
765
760
  }
766
761
  function ke(e, t) {
762
+ if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return Oe(e, t);
763
+ let n = t.indent || (Ee(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${n}`) + "'";
764
+ return t.implicitKey ? r : Ce(r, n, be, Te(t, !1));
765
+ }
766
+ function Ae(e, t) {
767
767
  let { singleQuote: n } = t.options, r;
768
- if (n === !1) r = De;
768
+ if (n === !1) r = Oe;
769
769
  else {
770
770
  let t = e.includes("\""), i = e.includes("'");
771
- r = t && !i ? Oe : i && !t ? De : n ? Oe : De;
771
+ r = t && !i ? ke : i && !t ? Oe : n ? ke : Oe;
772
772
  }
773
773
  return r(e, t);
774
774
  }
775
- var Ae;
775
+ var je;
776
776
  try {
777
- Ae = /* @__PURE__ */ RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
777
+ je = /* @__PURE__ */ RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
778
778
  } catch {
779
- Ae = /\n+(?!\n|$)/g;
779
+ je = /\n+(?!\n|$)/g;
780
780
  }
781
- function je({ comment: e, type: t, value: n }, r, i, a) {
781
+ function Me({ 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 ke(n, r);
784
- let l = r.indent || (r.forceBlockIndent || Te(n) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || t === I.BLOCK_FOLDED ? !1 : t === I.BLOCK_LITERAL || !Ee(n, c, l.length);
783
+ if (!o || /\n[\t ]+$/.test(n)) return Ae(n, r);
784
+ let l = r.indent || (r.forceBlockIndent || Ee(n) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || t === I.BLOCK_FOLDED ? !1 : t === I.BLOCK_LITERAL || !De(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 je({ 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(Ae, `$&${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(je, `$&${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 je({ 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 = we(r, !0);
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 = Te(r, !0);
805
805
  o !== "folded" && t !== I.BLOCK_FOLDED && (a.onOverflow = () => {
806
806
  i = !0;
807
807
  });
808
- let s = Se(`${v}${e}${p}`, l, be, a);
808
+ let s = Ce(`${v}${e}${p}`, l, xe, 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 Me(e, t, n, r) {
813
+ function Ne(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 ke(a, t);
816
- if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ? ke(a, t) : je(e, t, n, r);
817
- if (!s && !u && i !== I.PLAIN && a.includes("\n")) return je(e, t, n, r);
818
- if (Te(a)) {
819
- if (c === "") return t.forceBlockIndent = !0, je(e, t, n, r);
820
- if (s && c === l) return ke(a, t);
815
+ if (s && a.includes("\n") || u && /[[\]{},]/.test(a)) return Ae(a, t);
816
+ if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ? Ae(a, t) : Me(e, t, n, r);
817
+ if (!s && !u && i !== I.PLAIN && a.includes("\n")) return Me(e, t, n, r);
818
+ if (Ee(a)) {
819
+ if (c === "") return t.forceBlockIndent = !0, Me(e, t, n, r);
820
+ if (s && c === l) return Ae(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 ke(a, t);
825
+ if (r.some(e) || n?.some(e)) return Ae(a, t);
826
826
  }
827
- return s ? d : Se(d, c, ye, we(t, !1));
827
+ return s ? d : Ce(d, c, be, Te(t, !1));
828
828
  }
829
- function Ne(e, t, n, r) {
829
+ function Pe(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
831
  s !== I.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (s = I.QUOTE_DOUBLE);
832
832
  let c = (e) => {
833
833
  switch (e) {
834
834
  case I.BLOCK_FOLDED:
835
- case I.BLOCK_LITERAL: return i || a ? ke(o.value, t) : je(o, t, n, r);
836
- case I.QUOTE_DOUBLE: return De(o.value, t);
837
- case I.QUOTE_SINGLE: return Oe(o.value, t);
838
- case I.PLAIN: return Me(o, t, n, r);
835
+ case I.BLOCK_LITERAL: return i || a ? Ae(o.value, t) : Me(o, t, n, r);
836
+ case I.QUOTE_DOUBLE: return Oe(o.value, t);
837
+ case I.QUOTE_SINGLE: return ke(o.value, t);
838
+ case I.PLAIN: return Ne(o, t, n, r);
839
839
  default: return null;
840
840
  }
841
841
  }, l = c(s);
@@ -847,10 +847,10 @@ function Ne(e, t, n, r) {
847
847
  }
848
848
  //#endregion
849
849
  //#region node_modules/yaml/browser/dist/stringify/stringify.js
850
- function Pe(e, t) {
850
+ function Fe(e, t) {
851
851
  let n = Object.assign({
852
852
  blockQuote: !0,
853
- commentString: _e,
853
+ commentString: ve,
854
854
  defaultKeyType: null,
855
855
  defaultStringType: "PLAIN",
856
856
  directives: null,
@@ -887,7 +887,7 @@ function Pe(e, t) {
887
887
  options: n
888
888
  };
889
889
  }
890
- function Fe(e, t) {
890
+ function Ie(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 Fe(e, t) {
908
908
  }
909
909
  return n;
910
910
  }
911
- function Ie(e, t, { anchors: n, doc: r }) {
911
+ function Le(e, t, { anchors: n, doc: r }) {
912
912
  if (!r.directives) return "";
913
913
  let i = [], a = (S(e) || w(e)) && e.anchor;
914
914
  a && oe(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 Le(e, t, n, r) {
918
+ function Re(e, t, n, r) {
919
919
  if (x(e)) return e.toString(t, n, r);
920
920
  if (v(e)) {
921
921
  if (t.doc.directives) return e.toString(t);
@@ -923,15 +923,15 @@ function Le(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 = T(e) ? e : t.doc.createNode(e, { onTagObj: (e) => i = e });
926
- i ??= Fe(t.doc.schema.tags, a);
927
- let o = Ie(a, i, t);
926
+ i ??= Ie(t.doc.schema.tags, a);
927
+ let o = Le(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) : S(a) ? Ne(a, t, n, r) : a.toString(t, n, r);
929
+ let s = typeof i.stringify == "function" ? i.stringify(a, t, n, r) : S(a) ? Pe(a, t, n, r) : a.toString(t, n, r);
930
930
  return o ? S(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 Re({ key: e, value: t }, n, r, i) {
934
+ function ze({ 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 = T(e) && e.comment || null;
936
936
  if (d) {
937
937
  if (f) throw Error("With simple keys, key nodes cannot have comments");
@@ -943,22 +943,22 @@ function Re({ key: e, value: t }, n, r, i) {
943
943
  implicitKey: !p && (d || !a),
944
944
  indent: s + c
945
945
  });
946
- let m = !1, h = !1, g = Le(e, n, () => m = !0, () => h = !0);
946
+ let m = !1, h = !1, g = Re(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 += ve(g, n.indent, l(f)) : h && i && i(), g;
954
- m && (f = null), p ? (f && (g += ve(g, n.indent, l(f))), g = `? ${g}\n${s}:`) : (g = `${g}:`, f && (g += ve(g, n.indent, l(f))));
953
+ } else if (a && !d || t == null && p) return g = `? ${g}`, f && !m ? g += ye(g, n.indent, l(f)) : h && i && i(), g;
954
+ m && (f = null), p ? (f && (g += ye(g, n.indent, l(f))), g = `? ${g}\n${s}:`) : (g = `${g}:`, f && (g += ye(g, n.indent, l(f))));
955
955
  let _, v, y;
956
956
  T(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 && S(t) && (n.indentAtStart = g.length + 1), h = !1, !u && c.length >= 2 && !n.inFlow && !p && C(t) && !t.flow && !t.tag && !t.anchor && (n.indent = n.indent.substring(2));
957
- let b = !1, x = Le(t, n, () => b = !0, () => h = !0), E = " ";
957
+ let b = !1, x = Re(t, n, () => b = !0, () => h = !0), E = " ";
958
958
  if (f || _ || v) {
959
959
  if (E = _ ? "\n" : "", v) {
960
960
  let e = l(v);
961
- E += `\n${B(e, n.indent)}`;
961
+ E += `\n${z(e, n.indent)}`;
962
962
  }
963
963
  x === "" && !n.inFlow ? E === "\n" && y && (E = "\n\n") : E += `\n${n.indent}`;
964
964
  } else if (!p && w(t)) {
@@ -972,31 +972,31 @@ function Re({ key: e, value: t }, n, r, i) {
972
972
  t || (E = `\n${n.indent}`);
973
973
  }
974
974
  } else (x === "" || x[0] === "\n") && (E = "");
975
- return g += E + x, n.inFlow ? b && r && r() : y && !b ? g += ve(g, n.indent, l(y)) : h && i && i(), g;
975
+ return g += E + x, n.inFlow ? b && r && r() : y && !b ? g += ye(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 ze(e, t) {
979
+ function Be(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 Be = "<<", V = {
985
- identify: (e) => e === Be || typeof e == "symbol" && e.description === Be,
984
+ var Ve = "<<", B = {
985
+ identify: (e) => e === Ve || typeof e == "symbol" && e.description === Ve,
986
986
  default: "key",
987
987
  tag: "tag:yaml.org,2002:merge",
988
988
  test: /^<<$/,
989
- resolve: () => Object.assign(new I(Symbol(Be)), { addToJSMap: He }),
990
- stringify: () => Be
991
- }, Ve = (e, t) => (V.identify(t) || S(t) && (!t.type || t.type === I.PLAIN) && V.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === V.tag && e.default);
992
- function He(e, t, n) {
993
- let r = We(e, n);
994
- if (C(r)) for (let n of r.items) Ue(e, t, n);
995
- else if (Array.isArray(r)) for (let n of r) Ue(e, t, n);
996
- else Ue(e, t, r);
997
- }
989
+ resolve: () => Object.assign(new I(Symbol(Ve)), { addToJSMap: Ue }),
990
+ stringify: () => Ve
991
+ }, He = (e, t) => (B.identify(t) || S(t) && (!t.type || t.type === I.PLAIN) && B.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === B.tag && e.default);
998
992
  function Ue(e, t, n) {
999
- let r = We(e, n);
993
+ let r = Ge(e, n);
994
+ if (C(r)) for (let n of r.items) We(e, t, n);
995
+ else if (Array.isArray(r)) for (let n of r) We(e, t, n);
996
+ else We(e, t, r);
997
+ }
998
+ function We(e, t, n) {
999
+ let r = Ge(e, n);
1000
1000
  if (!b(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 Ue(e, t, n) {
1007
1007
  });
1008
1008
  return t;
1009
1009
  }
1010
- function We(e, t) {
1010
+ function Ge(e, t) {
1011
1011
  return e && v(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 Ge(e, t, { key: n, value: r }) {
1015
+ function Ke(e, t, { key: n, value: r }) {
1016
1016
  if (T(n) && n.addToJSMap) n.addToJSMap(e, t, r);
1017
- else if (Ve(e, n)) He(e, t, r);
1017
+ else if (He(e, n)) Ue(e, t, r);
1018
1018
  else {
1019
1019
  let i = F(n, "", e);
1020
1020
  if (t instanceof Map) t.set(i, F(r, i, e));
1021
1021
  else if (t instanceof Set) t.add(i);
1022
1022
  else {
1023
- let a = Ke(n, i, e), o = F(r, a, e);
1023
+ let a = qe(n, i, e), o = F(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 Ge(e, t, { key: n, value: r }) {
1031
1031
  }
1032
1032
  return t;
1033
1033
  }
1034
- function Ke(e, t, n) {
1034
+ function qe(e, t, n) {
1035
1035
  if (t === null) return "";
1036
1036
  if (typeof t != "object") return String(t);
1037
1037
  if (T(e) && n?.doc) {
1038
- let t = Pe(n.doc, {});
1038
+ let t = Fe(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) + "...\""), ze(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) + "...\""), Be(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 Ke(e, t, n) {
1050
1050
  }
1051
1051
  //#endregion
1052
1052
  //#region node_modules/yaml/browser/dist/nodes/Pair.js
1053
- function qe(e, t, n) {
1054
- return new H(R(e, void 0, n), R(t, void 0, n));
1053
+ function Je(e, t, n) {
1054
+ return new V(L(e, void 0, n), L(t, void 0, n));
1055
1055
  }
1056
- var H = class e {
1056
+ var V = class e {
1057
1057
  constructor(e, t = null) {
1058
1058
  Object.defineProperty(this, _, { value: m }), this.key = e, this.value = t;
1059
1059
  }
@@ -1062,32 +1062,32 @@ var H = class e {
1062
1062
  return T(n) && (n = n.clone(t)), T(r) && (r = r.clone(t)), new e(n, r);
1063
1063
  }
1064
1064
  toJSON(e, t) {
1065
- return Ge(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
1065
+ return Ke(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
1066
1066
  }
1067
1067
  toString(e, t, n) {
1068
- return e?.doc ? Re(this, e, t, n) : JSON.stringify(this);
1068
+ return e?.doc ? ze(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 Je(e, t, n) {
1074
- return (t.inFlow ?? e.flow ? Xe : Ye)(e, t, n);
1073
+ function Ye(e, t, n) {
1074
+ return (t.inFlow ?? e.flow ? Ze : Xe)(e, t, n);
1075
1075
  }
1076
- function Ye({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
1076
+ function Xe({ 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 (T(i)) !d && i.spaceBefore && f.push(""), Ze(n, f, i.commentBefore, d), i.comment && (o = i.comment);
1083
+ if (T(i)) !d && i.spaceBefore && f.push(""), Qe(n, f, i.commentBefore, d), i.comment && (o = i.comment);
1084
1084
  else if (x(i)) {
1085
1085
  let e = T(i.key) ? i.key : null;
1086
- e && (!d && e.spaceBefore && f.push(""), Ze(n, f, e.commentBefore, d));
1086
+ e && (!d && e.spaceBefore && f.push(""), Qe(n, f, e.commentBefore, d));
1087
1087
  }
1088
1088
  d = !1;
1089
- let s = Le(i, u, () => o = null, () => d = !0);
1090
- o && (s += ve(s, a, l(o))), d && o && (d = !1), f.push(r + s);
1089
+ let s = Re(i, u, () => o = null, () => d = !0);
1090
+ o && (s += ye(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 Ye({ 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" + z(l(e), c), s && s()) : d && o && o(), p;
1102
1102
  }
1103
- function Xe({ items: e }, t, { flowChars: n, itemIndent: r }) {
1103
+ function Ze({ 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 Xe({ 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 (T(i)) i.spaceBefore && d.push(""), Ze(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
1113
+ if (T(i)) i.spaceBefore && d.push(""), Qe(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
1114
1114
  else if (x(i)) {
1115
1115
  let e = T(i.key) ? i.key : null;
1116
- e && (e.spaceBefore && d.push(""), Ze(t, d, e.commentBefore, !1), e.comment && (l = !0));
1116
+ e && (e.spaceBefore && d.push(""), Qe(t, d, e.commentBefore, !1), e.comment && (l = !0));
1117
1117
  let n = T(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 = Le(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 += ve(o, r, s(a))), d.push(o), u = d.length;
1121
+ let o = Re(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 += ye(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 Xe({ items: e }, t, { flowChars: n, itemIndent: r }) {
1134
1134
  }
1135
1135
  return `${f}${o}${d.join(" ")}${o}${p}`;
1136
1136
  }
1137
- function Ze({ indent: e, options: { commentString: t } }, n, r, i) {
1137
+ function Qe({ 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 = z(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 Qe(e, t) {
1145
+ function $e(e, t) {
1146
1146
  let n = S(t) ? t.value : t;
1147
1147
  for (let r of e) if (x(r) && (r.key === t || r.key === n || S(r.key) && r.key.value === n)) return r;
1148
1148
  }
1149
- var U = class extends ge {
1149
+ var H = class extends _e {
1150
1150
  static get tagName() {
1151
1151
  return "tag:yaml.org,2002:map";
1152
1152
  }
@@ -1157,7 +1157,7 @@ var U = class extends ge {
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(qe(e, o, n));
1160
+ (o !== void 0 || r) && a.items.push(Je(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,8 +1165,8 @@ var U = class extends ge {
1165
1165
  }
1166
1166
  add(e, t) {
1167
1167
  let n;
1168
- n = x(e) ? e : !e || typeof e != "object" || !("key" in e) ? new H(e, e?.value) : new H(e.key, e.value);
1169
- let r = Qe(this.items, n.key), i = this.schema?.sortMapEntries;
1168
+ n = x(e) ? e : !e || typeof e != "object" || !("key" in e) ? new V(e, e?.value) : new V(e.key, e.value);
1169
+ let r = $e(this.items, n.key), i = this.schema?.sortMapEntries;
1170
1170
  if (r) {
1171
1171
  if (!t) throw Error(`Key ${n.key} already set`);
1172
1172
  S(r.value) && pe(n.value) ? r.value.value = n.value : r.value = n.value;
@@ -1176,29 +1176,29 @@ var U = class extends ge {
1176
1176
  } else this.items.push(n);
1177
1177
  }
1178
1178
  delete(e) {
1179
- let t = Qe(this.items, e);
1179
+ let t = $e(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 = Qe(this.items, e)?.value;
1183
+ let n = $e(this.items, e)?.value;
1184
1184
  return (!t && S(n) ? n.value : n) ?? void 0;
1185
1185
  }
1186
1186
  has(e) {
1187
- return !!Qe(this.items, e);
1187
+ return !!$e(this.items, e);
1188
1188
  }
1189
1189
  set(e, t) {
1190
- this.add(new H(e, t), !0);
1190
+ this.add(new V(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) Ge(t, r, e);
1195
+ for (let e of this.items) Ke(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 (!x(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 })), Je(this, e, {
1201
+ return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), Ye(this, e, {
1202
1202
  blockItemPrefix: "",
1203
1203
  flowChars: {
1204
1204
  start: "{",
@@ -1209,16 +1209,16 @@ var U = class extends ge {
1209
1209
  onComment: t
1210
1210
  });
1211
1211
  }
1212
- }, $e = {
1212
+ }, et = {
1213
1213
  collection: "map",
1214
1214
  default: !0,
1215
- nodeClass: U,
1215
+ nodeClass: H,
1216
1216
  tag: "tag:yaml.org,2002:map",
1217
1217
  resolve(e, t) {
1218
1218
  return b(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 ge {
1220
+ createNode: (e, t, n) => H.from(e, t, n)
1221
+ }, U = class extends _e {
1222
1222
  static get tagName() {
1223
1223
  return "tag:yaml.org,2002:seq";
1224
1224
  }
@@ -1229,21 +1229,21 @@ var U = class extends ge {
1229
1229
  this.items.push(e);
1230
1230
  }
1231
1231
  delete(e) {
1232
- let t = et(e);
1232
+ let t = tt(e);
1233
1233
  return typeof t == "number" && this.items.splice(t, 1).length > 0;
1234
1234
  }
1235
1235
  get(e, t) {
1236
- let n = et(e);
1236
+ let n = tt(e);
1237
1237
  if (typeof n != "number") return;
1238
1238
  let r = this.items[n];
1239
1239
  return !t && S(r) ? r.value : r;
1240
1240
  }
1241
1241
  has(e) {
1242
- let t = et(e);
1242
+ let t = tt(e);
1243
1243
  return typeof t == "number" && t < this.items.length;
1244
1244
  }
1245
1245
  set(e, t) {
1246
- let n = et(e);
1246
+ let n = tt(e);
1247
1247
  if (typeof n != "number") throw Error(`Expected a valid index, not ${e}.`);
1248
1248
  let r = this.items[n];
1249
1249
  S(r) && pe(t) ? r.value = t : this.items[n] = t;
@@ -1256,7 +1256,7 @@ var U = class extends ge {
1256
1256
  return n;
1257
1257
  }
1258
1258
  toString(e, t, n) {
1259
- return e ? Je(this, e, {
1259
+ return e ? Ye(this, e, {
1260
1260
  blockItemPrefix: "- ",
1261
1261
  flowChars: {
1262
1262
  start: "[",
@@ -1276,56 +1276,56 @@ var U = class extends ge {
1276
1276
  let n = t instanceof Set ? a : String(e++);
1277
1277
  a = r.call(t, n, a);
1278
1278
  }
1279
- i.items.push(R(a, void 0, n));
1279
+ i.items.push(L(a, void 0, n));
1280
1280
  }
1281
1281
  }
1282
1282
  return i;
1283
1283
  }
1284
1284
  };
1285
- function et(e) {
1285
+ function tt(e) {
1286
1286
  let t = S(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 tt = {
1291
+ var nt = {
1292
1292
  collection: "seq",
1293
1293
  default: !0,
1294
- nodeClass: W,
1294
+ nodeClass: U,
1295
1295
  tag: "tag:yaml.org,2002:seq",
1296
1296
  resolve(e, t) {
1297
1297
  return C(e) || t("Expected a sequence for this tag"), e;
1298
1298
  },
1299
- createNode: (e, t, n) => W.from(e, t, n)
1300
- }, nt = {
1299
+ createNode: (e, t, n) => U.from(e, t, n)
1300
+ }, rt = {
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), Ne(e, t, n, r);
1306
+ return t = Object.assign({ actualString: !0 }, t), Pe(e, t, n, r);
1307
1307
  }
1308
- }, rt = {
1308
+ }, it = {
1309
1309
  identify: (e) => e == null,
1310
1310
  createNode: () => new I(null),
1311
1311
  default: !0,
1312
1312
  tag: "tag:yaml.org,2002:null",
1313
1313
  test: /^(?:~|[Nn]ull|NULL)?$/,
1314
1314
  resolve: () => new I(null),
1315
- stringify: ({ source: e }, t) => typeof e == "string" && rt.test.test(e) ? e : t.options.nullStr
1316
- }, it = {
1315
+ stringify: ({ source: e }, t) => typeof e == "string" && it.test.test(e) ? e : t.options.nullStr
1316
+ }, at = {
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
1321
  resolve: (e) => new I(e[0] === "t" || e[0] === "T"),
1322
1322
  stringify({ source: e, value: t }, n) {
1323
- return e && it.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? n.options.trueStr : n.options.falseStr;
1323
+ return e && at.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 W({ 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 at = {
1343
+ var ot = {
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
- }, ot = {
1349
+ stringify: W
1350
+ }, st = {
1351
1351
  identify: (e) => typeof e == "number",
1352
1352
  default: !0,
1353
1353
  tag: "tag:yaml.org,2002:float",
@@ -1356,9 +1356,9 @@ var at = {
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() : W(e);
1360
1360
  }
1361
- }, st = {
1361
+ }, ct = {
1362
1362
  identify: (e) => typeof e == "number",
1363
1363
  default: !0,
1364
1364
  tag: "tag:yaml.org,2002:float",
@@ -1367,60 +1367,60 @@ var at = {
1367
1367
  let t = new I(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
- }, ct = (e) => typeof e == "bigint" || Number.isInteger(e), lt = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
1372
- function ut(e, t, n) {
1370
+ stringify: W
1371
+ }, lt = (e) => typeof e == "bigint" || Number.isInteger(e), ut = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
1372
+ function dt(e, t, n) {
1373
1373
  let { value: r } = e;
1374
- return ct(r) && r >= 0 ? n + r.toString(t) : G(e);
1374
+ return lt(r) && r >= 0 ? n + r.toString(t) : W(e);
1375
1375
  }
1376
- var dt = {
1377
- identify: (e) => ct(e) && e >= 0,
1376
+ var ft = {
1377
+ identify: (e) => lt(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) => lt(e, 2, 8, n),
1383
- stringify: (e) => ut(e, 8, "0o")
1384
- }, ft = {
1385
- identify: ct,
1382
+ resolve: (e, t, n) => ut(e, 2, 8, n),
1383
+ stringify: (e) => dt(e, 8, "0o")
1384
+ }, pt = {
1385
+ identify: lt,
1386
1386
  default: !0,
1387
1387
  tag: "tag:yaml.org,2002:int",
1388
1388
  test: /^[-+]?[0-9]+$/,
1389
- resolve: (e, t, n) => lt(e, 0, 10, n),
1390
- stringify: G
1391
- }, pt = {
1392
- identify: (e) => ct(e) && e >= 0,
1389
+ resolve: (e, t, n) => ut(e, 0, 10, n),
1390
+ stringify: W
1391
+ }, mt = {
1392
+ identify: (e) => lt(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) => lt(e, 2, 16, n),
1398
- stringify: (e) => ut(e, 16, "0x")
1399
- }, mt = [
1400
- $e,
1401
- tt,
1397
+ resolve: (e, t, n) => ut(e, 2, 16, n),
1398
+ stringify: (e) => dt(e, 16, "0x")
1399
+ }, ht = [
1400
+ et,
1402
1401
  nt,
1403
1402
  rt,
1404
1403
  it,
1405
- dt,
1404
+ at,
1406
1405
  ft,
1407
1406
  pt,
1408
- at,
1407
+ mt,
1409
1408
  ot,
1410
- st
1409
+ st,
1410
+ ct
1411
1411
  ];
1412
1412
  //#endregion
1413
1413
  //#region node_modules/yaml/browser/dist/schema/json/schema.js
1414
- function ht(e) {
1414
+ function gt(e) {
1415
1415
  return typeof e == "bigint" || Number.isInteger(e);
1416
1416
  }
1417
- var gt = ({ value: e }) => JSON.stringify(e), _t = [
1417
+ var _t = ({ value: e }) => JSON.stringify(e), vt = [
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: gt
1423
+ stringify: _t
1424
1424
  },
1425
1425
  {
1426
1426
  identify: (e) => e == null,
@@ -1429,7 +1429,7 @@ var gt = ({ value: e }) => JSON.stringify(e), _t = [
1429
1429
  tag: "tag:yaml.org,2002:null",
1430
1430
  test: /^null$/,
1431
1431
  resolve: () => null,
1432
- stringify: gt
1432
+ stringify: _t
1433
1433
  },
1434
1434
  {
1435
1435
  identify: (e) => typeof e == "boolean",
@@ -1437,15 +1437,15 @@ var gt = ({ value: e }) => JSON.stringify(e), _t = [
1437
1437
  tag: "tag:yaml.org,2002:bool",
1438
1438
  test: /^true$|^false$/,
1439
1439
  resolve: (e) => e === "true",
1440
- stringify: gt
1440
+ stringify: _t
1441
1441
  },
1442
1442
  {
1443
- identify: ht,
1443
+ identify: gt,
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 }) => ht(e) ? e.toString() : JSON.stringify(e)
1448
+ stringify: ({ value: e }) => gt(e) ? e.toString() : JSON.stringify(e)
1449
1449
  },
1450
1450
  {
1451
1451
  identify: (e) => typeof e == "number",
@@ -1453,16 +1453,16 @@ var gt = ({ value: e }) => JSON.stringify(e), _t = [
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: gt
1456
+ stringify: _t
1457
1457
  }
1458
- ], vt = [$e, tt].concat(_t, {
1458
+ ], yt = [et, nt].concat(vt, {
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
- }), yt = {
1465
+ }), bt = {
1466
1466
  identify: (e) => e instanceof Uint8Array,
1467
1467
  default: !1,
1468
1468
  tag: "tag:yaml.org,2002:binary",
@@ -1487,7 +1487,7 @@ var gt = ({ value: e }) => JSON.stringify(e), _t = [
1487
1487
  for (let t = 0, r = 0; t < n; ++t, r += e) i[t] = s.substr(r, e);
1488
1488
  s = i.join(t === I.BLOCK_LITERAL ? "\n" : " ");
1489
1489
  }
1490
- return Ne({
1490
+ return Pe({
1491
1491
  comment: e,
1492
1492
  type: t,
1493
1493
  value: s
@@ -1496,27 +1496,27 @@ var gt = ({ value: e }) => JSON.stringify(e), _t = [
1496
1496
  };
1497
1497
  //#endregion
1498
1498
  //#region node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
1499
- function bt(e, t) {
1499
+ function xt(e, t) {
1500
1500
  if (C(e)) for (let n = 0; n < e.items.length; ++n) {
1501
1501
  let r = e.items[n];
1502
1502
  if (!x(r)) {
1503
1503
  if (b(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 I(null));
1505
+ let e = r.items[0] || new V(new I(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] = x(r) ? r : new H(r);
1512
+ e.items[n] = x(r) ? r : new V(r);
1513
1513
  }
1514
1514
  }
1515
1515
  else t("Expected a sequence for this tag");
1516
1516
  return e;
1517
1517
  }
1518
- function xt(e, t, n) {
1519
- let { replacer: r } = n, i = new W(e);
1518
+ function St(e, t, n) {
1519
+ let { replacer: r } = n, i = new U(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 xt(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(qe(o, s, n));
1533
+ i.items.push(Je(o, s, n));
1534
1534
  }
1535
1535
  return i;
1536
1536
  }
1537
- var St = {
1537
+ var Ct = {
1538
1538
  collection: "seq",
1539
1539
  default: !1,
1540
1540
  tag: "tag:yaml.org,2002:pairs",
1541
- resolve: bt,
1542
- createNode: xt
1543
- }, Ct = class e extends W {
1541
+ resolve: xt,
1542
+ createNode: St
1543
+ }, wt = class e extends U {
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 = H.prototype.add.bind(this), this.delete = H.prototype.delete.bind(this), this.get = H.prototype.get.bind(this), this.has = H.prototype.has.bind(this), this.set = H.prototype.set.bind(this), this.tag = e.tag;
1546
1546
  }
1547
1547
  toJSON(e, t) {
1548
1548
  if (!t) return super.toJSON(e);
@@ -1556,51 +1556,51 @@ var St = {
1556
1556
  return n;
1557
1557
  }
1558
1558
  static from(e, t, n) {
1559
- let r = xt(e, t, n), i = new this();
1559
+ let r = St(e, t, n), i = new this();
1560
1560
  return i.items = r.items, i;
1561
1561
  }
1562
1562
  };
1563
- Ct.tag = "tag:yaml.org,2002:omap";
1564
- var wt = {
1563
+ wt.tag = "tag:yaml.org,2002:omap";
1564
+ var Tt = {
1565
1565
  collection: "seq",
1566
1566
  identify: (e) => e instanceof Map,
1567
- nodeClass: Ct,
1567
+ nodeClass: wt,
1568
1568
  default: !1,
1569
1569
  tag: "tag:yaml.org,2002:omap",
1570
1570
  resolve(e, t) {
1571
- let n = bt(e, t), r = [];
1571
+ let n = xt(e, t), r = [];
1572
1572
  for (let { key: e } of n.items) S(e) && (r.includes(e.value) ? t(`Ordered maps must not include duplicate keys: ${e.value}`) : r.push(e.value));
1573
- return Object.assign(new Ct(), n);
1573
+ return Object.assign(new wt(), n);
1574
1574
  },
1575
- createNode: (e, t, n) => Ct.from(e, t, n)
1575
+ createNode: (e, t, n) => wt.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 Tt({ value: e, source: t }, n) {
1580
- return t && (e ? Et : Dt).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
1579
+ function Et({ value: e, source: t }, n) {
1580
+ return t && (e ? Dt : Ot).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
1581
1581
  }
1582
- var Et = {
1582
+ var Dt = {
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
1587
  resolve: () => new I(!0),
1588
- stringify: Tt
1589
- }, Dt = {
1588
+ stringify: Et
1589
+ }, Ot = {
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
1594
  resolve: () => new I(!1),
1595
- stringify: Tt
1596
- }, Ot = {
1595
+ stringify: Et
1596
+ }, kt = {
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
- }, kt = {
1602
+ stringify: W
1603
+ }, At = {
1604
1604
  identify: (e) => typeof e == "number",
1605
1605
  default: !0,
1606
1606
  tag: "tag:yaml.org,2002:float",
@@ -1609,9 +1609,9 @@ var Et = {
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() : W(e);
1613
1613
  }
1614
- }, At = {
1614
+ }, jt = {
1615
1615
  identify: (e) => typeof e == "number",
1616
1616
  default: !0,
1617
1617
  tag: "tag:yaml.org,2002:float",
@@ -1624,9 +1624,9 @@ var Et = {
1624
1624
  }
1625
1625
  return t;
1626
1626
  },
1627
- stringify: G
1628
- }, jt = (e) => typeof e == "bigint" || Number.isInteger(e);
1629
- function Mt(e, t, n, { intAsBigInt: r }) {
1627
+ stringify: W
1628
+ }, Mt = (e) => typeof e == "bigint" || Number.isInteger(e);
1629
+ function Nt(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 Mt(e, t, n, { intAsBigInt: r }) {
1644
1644
  let a = parseInt(e, n);
1645
1645
  return i === "-" ? -1 * a : a;
1646
1646
  }
1647
- function Nt(e, t, n) {
1647
+ function Pt(e, t, n) {
1648
1648
  let { value: r } = e;
1649
- if (jt(r)) {
1649
+ if (Mt(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 W(e);
1654
1654
  }
1655
- var Pt = {
1656
- identify: jt,
1655
+ var Ft = {
1656
+ identify: Mt,
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) => Mt(e, 2, 2, n),
1662
- stringify: (e) => Nt(e, 2, "0b")
1663
- }, Ft = {
1664
- identify: jt,
1661
+ resolve: (e, t, n) => Nt(e, 2, 2, n),
1662
+ stringify: (e) => Pt(e, 2, "0b")
1663
+ }, It = {
1664
+ identify: Mt,
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) => Mt(e, 1, 8, n),
1670
- stringify: (e) => Nt(e, 8, "0")
1671
- }, It = {
1672
- identify: jt,
1669
+ resolve: (e, t, n) => Nt(e, 1, 8, n),
1670
+ stringify: (e) => Pt(e, 8, "0")
1671
+ }, Lt = {
1672
+ identify: Mt,
1673
1673
  default: !0,
1674
1674
  tag: "tag:yaml.org,2002:int",
1675
1675
  test: /^[-+]?[0-9][0-9_]*$/,
1676
- resolve: (e, t, n) => Mt(e, 0, 10, n),
1677
- stringify: G
1678
- }, Lt = {
1679
- identify: jt,
1676
+ resolve: (e, t, n) => Nt(e, 0, 10, n),
1677
+ stringify: W
1678
+ }, Rt = {
1679
+ identify: Mt,
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) => Mt(e, 2, 16, n),
1685
- stringify: (e) => Nt(e, 16, "0x")
1686
- }, Rt = class e extends U {
1684
+ resolve: (e, t, n) => Nt(e, 2, 16, n),
1685
+ stringify: (e) => Pt(e, 16, "0x")
1686
+ }, zt = class e extends H {
1687
1687
  constructor(t) {
1688
1688
  super(t), this.tag = e.tag;
1689
1689
  }
1690
1690
  add(e) {
1691
1691
  let t;
1692
- t = x(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new H(e.key, null) : new H(e, null), Qe(this.items, t.key) || this.items.push(t);
1692
+ t = x(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new V(e.key, null) : new V(e, null), $e(this.items, t.key) || this.items.push(t);
1693
1693
  }
1694
1694
  get(e, t) {
1695
- let n = Qe(this.items, e);
1695
+ let n = $e(this.items, e);
1696
1696
  return !t && x(n) ? S(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 = Qe(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 = $e(this.items, e);
1701
+ n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new V(e));
1702
1702
  }
1703
1703
  toJSON(e, t) {
1704
1704
  return super.toJSON(e, t, Set);
@@ -1710,21 +1710,21 @@ var Pt = {
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(qe(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(Je(e, null, n));
1714
1714
  return i;
1715
1715
  }
1716
1716
  };
1717
- Rt.tag = "tag:yaml.org,2002:set";
1718
- var zt = {
1717
+ zt.tag = "tag:yaml.org,2002:set";
1718
+ var Bt = {
1719
1719
  collection: "map",
1720
1720
  identify: (e) => e instanceof Set,
1721
- nodeClass: Rt,
1721
+ nodeClass: zt,
1722
1722
  default: !1,
1723
1723
  tag: "tag:yaml.org,2002:set",
1724
- createNode: (e, t, n) => Rt.from(e, t, n),
1724
+ createNode: (e, t, n) => zt.from(e, t, n),
1725
1725
  resolve(e, t) {
1726
1726
  if (b(e)) {
1727
- if (e.hasAllNullValues(!0)) return Object.assign(new Rt(), e);
1727
+ if (e.hasAllNullValues(!0)) return Object.assign(new zt(), 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 zt = {
1732
1732
  };
1733
1733
  //#endregion
1734
1734
  //#region node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
1735
- function Bt(e, t) {
1735
+ function Vt(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 Vt(e) {
1739
+ function Ht(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 W(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 Ht = {
1748
+ var Ut = {
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 }) => Bt(e, n),
1755
- stringify: Vt
1756
- }, Ut = {
1754
+ resolve: (e, t, { intAsBigInt: n }) => Vt(e, n),
1755
+ stringify: Ht
1756
+ }, Wt = {
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) => Bt(e, !1),
1763
- stringify: Vt
1764
- }, Wt = {
1762
+ resolve: (e) => Vt(e, !1),
1763
+ stringify: Ht
1764
+ }, Gt = {
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(Wt.test);
1770
+ let t = e.match(Gt.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 = Bt(u, !1);
1774
+ let e = Vt(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
- }, Gt = [
1781
- $e,
1782
- tt,
1780
+ }, Kt = [
1781
+ et,
1783
1782
  nt,
1784
1783
  rt,
1785
- Et,
1784
+ it,
1786
1785
  Dt,
1787
- Pt,
1786
+ Ot,
1788
1787
  Ft,
1789
1788
  It,
1790
1789
  Lt,
1791
- Ot,
1790
+ Rt,
1792
1791
  kt,
1793
1792
  At,
1794
- yt,
1795
- V,
1796
- wt,
1797
- St,
1798
- zt,
1799
- Ht,
1793
+ jt,
1794
+ bt,
1795
+ B,
1796
+ Tt,
1797
+ Ct,
1798
+ Bt,
1800
1799
  Ut,
1801
- Wt
1802
- ], Kt = /* @__PURE__ */ new Map([
1803
- ["core", mt],
1800
+ Wt,
1801
+ Gt
1802
+ ], qt = /* @__PURE__ */ new Map([
1803
+ ["core", ht],
1804
1804
  ["failsafe", [
1805
- $e,
1806
- tt,
1807
- nt
1805
+ et,
1806
+ nt,
1807
+ rt
1808
1808
  ]],
1809
- ["json", vt],
1810
- ["yaml11", Gt],
1811
- ["yaml-1.1", Gt]
1812
- ]), qt = {
1813
- binary: yt,
1814
- bool: it,
1815
- float: st,
1816
- floatExp: ot,
1817
- floatNaN: at,
1818
- floatTime: Ut,
1819
- int: ft,
1820
- intHex: pt,
1821
- intOct: dt,
1822
- intTime: Ht,
1823
- map: $e,
1824
- merge: V,
1825
- null: rt,
1826
- omap: wt,
1827
- pairs: St,
1828
- seq: tt,
1829
- set: zt,
1830
- timestamp: Wt
1831
- }, Jt = {
1832
- "tag:yaml.org,2002:binary": yt,
1833
- "tag:yaml.org,2002:merge": V,
1834
- "tag:yaml.org,2002:omap": wt,
1835
- "tag:yaml.org,2002:pairs": St,
1836
- "tag:yaml.org,2002:set": zt,
1837
- "tag:yaml.org,2002:timestamp": Wt
1809
+ ["json", yt],
1810
+ ["yaml11", Kt],
1811
+ ["yaml-1.1", Kt]
1812
+ ]), Jt = {
1813
+ binary: bt,
1814
+ bool: at,
1815
+ float: ct,
1816
+ floatExp: st,
1817
+ floatNaN: ot,
1818
+ floatTime: Wt,
1819
+ int: pt,
1820
+ intHex: mt,
1821
+ intOct: ft,
1822
+ intTime: Ut,
1823
+ map: et,
1824
+ merge: B,
1825
+ null: it,
1826
+ omap: Tt,
1827
+ pairs: Ct,
1828
+ seq: nt,
1829
+ set: Bt,
1830
+ timestamp: Gt
1831
+ }, Yt = {
1832
+ "tag:yaml.org,2002:binary": bt,
1833
+ "tag:yaml.org,2002:merge": B,
1834
+ "tag:yaml.org,2002:omap": Tt,
1835
+ "tag:yaml.org,2002:pairs": Ct,
1836
+ "tag:yaml.org,2002:set": Bt,
1837
+ "tag:yaml.org,2002:timestamp": Gt
1838
1838
  };
1839
- function Yt(e, t, n) {
1840
- let r = Kt.get(t);
1841
- if (r && !e) return n && !r.includes(V) ? r.concat(V) : r.slice();
1839
+ function Xt(e, t, n) {
1840
+ let r = qt.get(t);
1841
+ if (r && !e) return n && !r.includes(B) ? r.concat(B) : 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(Kt.keys()).filter((e) => e !== "yaml11").map((e) => JSON.stringify(e)).join(", ");
1846
+ let e = Array.from(qt.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" ? qt[t] : t;
1852
+ return n && (i = i.concat(B)), i.reduce((e, t) => {
1853
+ let n = typeof t == "string" ? Jt[t] : t;
1854
1854
  if (!n) {
1855
- let e = JSON.stringify(t), n = Object.keys(qt).map((e) => JSON.stringify(e)).join(", ");
1855
+ let e = JSON.stringify(t), n = Object.keys(Jt).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 Yt(e, t, n) {
1860
1860
  }
1861
1861
  //#endregion
1862
1862
  //#region node_modules/yaml/browser/dist/schema/Schema.js
1863
- var Xt = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), Zt = class e {
1863
+ var Zt = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), Qt = 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) ? Yt(e, "compat") : e ? Yt(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? Jt : {}, this.tags = Yt(t, this.name, n), this.toStringOptions = o ?? null, Object.defineProperty(this, p, { value: $e }), Object.defineProperty(this, h, { value: nt }), Object.defineProperty(this, g, { value: tt }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? Xt : null;
1865
+ this.compat = Array.isArray(e) ? Xt(e, "compat") : e ? Xt(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? Yt : {}, this.tags = Xt(t, this.name, n), this.toStringOptions = o ?? null, Object.defineProperty(this, p, { value: et }), Object.defineProperty(this, h, { value: rt }), Object.defineProperty(this, g, { value: nt }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? Zt : null;
1866
1866
  }
1867
1867
  clone() {
1868
1868
  let t = Object.create(e.prototype, Object.getOwnPropertyDescriptors(this));
@@ -1871,45 +1871,45 @@ var Xt = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), Zt = class e {
1871
1871
  };
1872
1872
  //#endregion
1873
1873
  //#region node_modules/yaml/browser/dist/stringify/stringifyDocument.js
1874
- function Qt(e, t) {
1874
+ function $t(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 = Pe(e, t), { commentString: a } = i.options;
1881
+ let i = Fe(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(z(t, ""));
1886
1886
  }
1887
1887
  let o = !1, s = null;
1888
1888
  if (e.contents) {
1889
1889
  if (T(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(z(t, ""));
1893
1893
  }
1894
1894
  i.forceBlockIndent = !!e.comment, s = e.contents.comment;
1895
1895
  }
1896
- let t = s ? void 0 : () => o = !0, c = Le(e.contents, i, () => s = null, t);
1897
- s && (c += ve(c, "", a(s))), (c[0] === "|" || c[0] === ">") && n[n.length - 1] === "---" ? n[n.length - 1] = `--- ${c}` : n.push(c);
1898
- } else n.push(Le(e.contents, i));
1896
+ let t = s ? void 0 : () => o = !0, c = Re(e.contents, i, () => s = null, t);
1897
+ s && (c += ye(c, "", a(s))), (c[0] === "|" || c[0] === ">") && n[n.length - 1] === "---" ? n[n.length - 1] = `--- ${c}` : n.push(c);
1898
+ } else n.push(Re(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(z(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(z(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 $t = class e {
1912
+ var en = class e {
1913
1913
  constructor(e, t, n) {
1914
1914
  this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, _, { value: f });
1915
1915
  let r = null;
@@ -1933,10 +1933,10 @@ var $t = class e {
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 = T(this.contents) ? this.contents.clone(t.schema) : this.contents, this.range && (t.range = this.range.slice()), t;
1934
1934
  }
1935
1935
  add(e) {
1936
- en(this.contents) && this.contents.add(e);
1936
+ tn(this.contents) && this.contents.add(e);
1937
1937
  }
1938
1938
  addIn(e, t) {
1939
- en(this.contents) && this.contents.addIn(e, t);
1939
+ tn(this.contents) && this.contents.addIn(e, t);
1940
1940
  }
1941
1941
  createAlias(e, t) {
1942
1942
  if (!e.anchor) {
@@ -1960,35 +1960,35 @@ var $t = class e {
1960
1960
  replacer: r,
1961
1961
  schema: this.schema,
1962
1962
  sourceObjects: f
1963
- }, m = R(e, l, p);
1963
+ }, m = L(e, l, p);
1964
1964
  return o && w(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 V(this.createNode(e, null, n), this.createNode(t, null, n));
1968
1968
  }
1969
1969
  delete(e) {
1970
- return en(this.contents) ? this.contents.delete(e) : !1;
1970
+ return tn(this.contents) ? this.contents.delete(e) : !1;
1971
1971
  }
1972
1972
  deleteIn(e) {
1973
- return he(e) ? this.contents != null && (this.contents = null, !0) : en(this.contents) ? this.contents.deleteIn(e) : !1;
1973
+ return ge(e) ? this.contents != null && (this.contents = null, !0) : tn(this.contents) ? this.contents.deleteIn(e) : !1;
1974
1974
  }
1975
1975
  get(e, t) {
1976
1976
  return w(this.contents) ? this.contents.get(e, t) : void 0;
1977
1977
  }
1978
1978
  getIn(e, t) {
1979
- return he(e) ? !t && S(this.contents) ? this.contents.value : this.contents : w(this.contents) ? this.contents.getIn(e, t) : void 0;
1979
+ return ge(e) ? !t && S(this.contents) ? this.contents.value : this.contents : w(this.contents) ? this.contents.getIn(e, t) : void 0;
1980
1980
  }
1981
1981
  has(e) {
1982
1982
  return w(this.contents) ? this.contents.has(e) : !1;
1983
1983
  }
1984
1984
  hasIn(e) {
1985
- return he(e) ? this.contents !== void 0 : w(this.contents) ? this.contents.hasIn(e) : !1;
1985
+ return ge(e) ? this.contents !== void 0 : w(this.contents) ? this.contents.hasIn(e) : !1;
1986
1986
  }
1987
1987
  set(e, t) {
1988
- this.contents == null ? this.contents = z(this.schema, [e], t) : en(this.contents) && this.contents.set(e, t);
1988
+ this.contents == null ? this.contents = R(this.schema, [e], t) : tn(this.contents) && this.contents.set(e, t);
1989
1989
  }
1990
1990
  setIn(e, t) {
1991
- he(e) ? this.contents = t : this.contents == null ? this.contents = z(this.schema, Array.from(e), t) : en(this.contents) && this.contents.setIn(e, t);
1991
+ ge(e) ? this.contents = t : this.contents == null ? this.contents = R(this.schema, Array.from(e), t) : tn(this.contents) && this.contents.setIn(e, t);
1992
1992
  }
1993
1993
  setSchema(e, t = {}) {
1994
1994
  typeof e == "number" && (e = String(e));
@@ -2016,7 +2016,7 @@ var $t = class e {
2016
2016
  }
2017
2017
  }
2018
2018
  if (t.schema instanceof Object) this.schema = t.schema;
2019
- else if (n) this.schema = new Zt(Object.assign(n, t));
2019
+ else if (n) this.schema = new Qt(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 } = {}) {
@@ -2045,28 +2045,28 @@ var $t = 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 Qt(this, e);
2048
+ return $t(this, e);
2049
2049
  }
2050
2050
  };
2051
- function en(e) {
2051
+ function tn(e) {
2052
2052
  if (w(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 tn = class extends Error {
2057
+ var nn = 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
- }, nn = class extends tn {
2061
+ }, rn = class extends nn {
2062
2062
  constructor(e, t, n) {
2063
2063
  super("YAMLParseError", e, t, n);
2064
2064
  }
2065
- }, rn = class extends tn {
2065
+ }, an = class extends nn {
2066
2066
  constructor(e, t, n) {
2067
2067
  super("YAMLWarning", e, t, n);
2068
2068
  }
2069
- }, an = (e, t) => (n) => {
2069
+ }, on = (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 tn = class extends Error {
2089
2089
  };
2090
2090
  //#endregion
2091
2091
  //#region node_modules/yaml/browser/dist/compose/resolve-props.js
2092
- function on(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIndent: o, startOnNewline: s }) {
2092
+ function sn(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 on(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 sn(e) {
2138
+ function cn(e) {
2139
2139
  if (!e) return null;
2140
2140
  switch (e.type) {
2141
2141
  case "alias":
@@ -2153,7 +2153,7 @@ function sn(e) {
2153
2153
  if (t.sep) {
2154
2154
  for (let e of t.sep) if (e.type === "newline") return !0;
2155
2155
  }
2156
- if (sn(t.key) || sn(t.value)) return !0;
2156
+ if (cn(t.key) || cn(t.value)) return !0;
2157
2157
  }
2158
2158
  return !1;
2159
2159
  default: return !0;
@@ -2161,15 +2161,15 @@ function sn(e) {
2161
2161
  }
2162
2162
  //#endregion
2163
2163
  //#region node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
2164
- function cn(e, t, n) {
2164
+ function ln(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 === "}") && sn(t) && n(r, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2167
+ r.indent === e && (r.source === "]" || r.source === "}") && cn(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 ln(e, t, n) {
2172
+ function un(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 || S(e) && S(t) && e.value === t.value;
@@ -2177,13 +2177,13 @@ function ln(e, t, n) {
2177
2177
  }
2178
2178
  //#endregion
2179
2179
  //#region node_modules/yaml/browser/dist/compose/resolve-block-map.js
2180
- var un = "All mapping items must start at the same column";
2181
- function dn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2182
- let o = new ((a?.nodeClass) ?? U)(n.schema);
2180
+ var dn = "All mapping items must start at the same column";
2181
+ function fn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2182
+ let o = new ((a?.nodeClass) ?? H)(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 = on(l, {
2186
+ let { start: l, key: u, sep: d, value: f } = a, p = sn(l, {
2187
2187
  indicator: "explicit-key-ind",
2188
2188
  next: u ?? d?.[0],
2189
2189
  offset: s,
@@ -2192,16 +2192,16 @@ function dn({ 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", un)), !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", dn)), !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 || sn(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", un);
2199
+ (p.newlineAfterProp || cn(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", dn);
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 && cn(r.indent, u, i), n.atKey = !1, ln(n, o.items, g) && i(h, "DUPLICATE_KEY", "Map keys must be unique");
2204
- let _ = on(d ?? [], {
2203
+ n.schema.compat && ln(r.indent, u, i), n.atKey = !1, un(n, o.items, g) && i(h, "DUPLICATE_KEY", "Map keys must be unique");
2204
+ let _ = sn(d ?? [], {
2205
2205
  indicator: "map-value-ind",
2206
2206
  next: f,
2207
2207
  offset: g.range[2],
@@ -2212,12 +2212,12 @@ function dn({ 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 && cn(r.indent, f, i), s = c.range[2];
2216
- let l = new H(g, c);
2215
+ n.schema.compat && ln(r.indent, f, i), s = c.range[2];
2216
+ let l = new V(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 V(g);
2221
2221
  n.options.keepSourceTokens && (e.srcToken = a), o.items.push(e);
2222
2222
  }
2223
2223
  }
@@ -2229,12 +2229,12 @@ function dn({ 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 fn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2233
- let o = new ((a?.nodeClass) ?? W)(n.schema);
2232
+ function pn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2233
+ let o = new ((a?.nodeClass) ?? U)(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 = on(a, {
2237
+ let u = sn(a, {
2238
2238
  indicator: "seq-item-ind",
2239
2239
  next: l,
2240
2240
  offset: s,
@@ -2250,7 +2250,7 @@ function fn({ 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 && cn(r.indent, l, i), s = d.range[2], o.items.push(d);
2253
+ n.schema.compat && ln(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 fn({ 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 pn(e, t, n, r) {
2263
+ function mn(e, t, n, r) {
2264
2264
  let i = "";
2265
2265
  if (e) {
2266
2266
  let a = !1, o = "";
@@ -2291,15 +2291,15 @@ function pn(e, t, n, r) {
2291
2291
  }
2292
2292
  //#endregion
2293
2293
  //#region node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
2294
- var mn = "Block collections are not allowed within flow collections", hn = (e) => e && (e.type === "block-map" || e.type === "block-seq");
2295
- function gn({ 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 hn = "Block collections are not allowed within flow collections", gn = (e) => e && (e.type === "block-map" || e.type === "block-seq");
2295
+ function _n({ 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 ? H : U))(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 = on(d, {
2302
+ let l = r.items[a], { start: d, key: f, sep: p, value: m } = l, h = sn(d, {
2303
2303
  flow: s,
2304
2304
  indicator: "explicit-key-ind",
2305
2305
  next: f ?? p?.[0],
@@ -2313,7 +2313,7 @@ function gn({ 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 && sn(f) && i(f, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2316
+ !o && n.options.strict && cn(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 gn({ 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], hn(m) && i(r.range, "BLOCK_IN_FLOW", mn);
2336
+ c.items.push(r), u = r.range[2], gn(m) && i(r.range, "BLOCK_IN_FLOW", hn);
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
- hn(f) && i(g.range, "BLOCK_IN_FLOW", mn), n.atKey = !1;
2341
- let _ = on(p ?? [], {
2340
+ gn(f) && i(g.range, "BLOCK_IN_FLOW", hn), n.atKey = !1;
2341
+ let _ = sn(p ?? [], {
2342
2342
  flow: s,
2343
2343
  indicator: "map-value-ind",
2344
2344
  next: m,
@@ -2360,13 +2360,13 @@ function gn({ 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 ? hn(m) && i(v.range, "BLOCK_IN_FLOW", mn) : _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
2364
- let y = new H(g, v);
2363
+ v ? gn(m) && i(v.range, "BLOCK_IN_FLOW", hn) : _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
2364
+ let y = new V(g, v);
2365
2365
  if (n.options.keepSourceTokens && (y.srcToken = l), o) {
2366
2366
  let e = c;
2367
- ln(n, e.items, g) && i(a, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(y);
2367
+ un(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 H(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 gn({ 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 = pn(p, m, n.options.strict, i);
2388
+ let e = mn(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 gn({ 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 _n(e, t, n, r, i, a) {
2404
- let o = n.type === "block-map" ? dn(e, t, n, r, a) : n.type === "block-seq" ? fn(e, t, n, r, a) : gn(e, t, n, r, a), s = o.constructor;
2403
+ function vn(e, t, n, r, i, a) {
2404
+ let o = n.type === "block-map" ? fn(e, t, n, r, a) : n.type === "block-seq" ? pn(e, t, n, r, a) : _n(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 vn(e, t, n, r, i) {
2407
+ function yn(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 _n(e, t, n, i, o);
2414
+ if (!a || !o || o === "!" || o === H.tagName && s === "map" || o === U.tagName && s === "seq") return vn(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), _n(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), vn(e, t, n, i, o);
2420
2420
  }
2421
- let l = _n(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = T(u) ? u : new I(u);
2421
+ let l = vn(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = T(u) ? u : new I(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 yn(e, t, n) {
2427
- let r = t.offset, i = bn(t, e.options.strict, n);
2426
+ function bn(e, t, n) {
2427
+ let r = t.offset, i = xn(t, e.options.strict, n);
2428
2428
  if (!i) return {
2429
2429
  value: "",
2430
2430
  type: null,
@@ -2435,7 +2435,7 @@ function yn(e, t, n) {
2435
2435
  r
2436
2436
  ]
2437
2437
  };
2438
- let a = i.mode === ">" ? I.BLOCK_FOLDED : I.BLOCK_LITERAL, o = t.source ? xn(t.source) : [], s = o.length;
2438
+ let a = i.mode === ">" ? I.BLOCK_FOLDED : I.BLOCK_LITERAL, o = t.source ? Sn(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;
@@ -2498,7 +2498,7 @@ function yn(e, t, n) {
2498
2498
  ]
2499
2499
  };
2500
2500
  }
2501
- function bn({ offset: e, props: t }, n, r) {
2501
+ function xn({ 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 bn({ offset: e, props: t }, n, r) {
2541
2541
  length: d
2542
2542
  };
2543
2543
  }
2544
- function xn(e) {
2544
+ function Sn(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 Sn(e, t, n) {
2551
+ function Cn(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 = I.PLAIN, c = Cn(a, l);
2555
+ s = I.PLAIN, c = wn(a, l);
2556
2556
  break;
2557
2557
  case "single-quoted-scalar":
2558
- s = I.QUOTE_SINGLE, c = wn(a, l);
2558
+ s = I.QUOTE_SINGLE, c = Tn(a, l);
2559
2559
  break;
2560
2560
  case "double-quoted-scalar":
2561
- s = I.QUOTE_DOUBLE, c = En(a, l);
2561
+ s = I.QUOTE_DOUBLE, c = Dn(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 Sn(e, t, n) {
2572
2572
  ]
2573
2573
  };
2574
2574
  }
2575
- let u = r + a.length, d = pn(o, u, t, n);
2575
+ let u = r + a.length, d = mn(o, u, t, n);
2576
2576
  return {
2577
2577
  value: c,
2578
2578
  type: s,
@@ -2584,7 +2584,7 @@ function Sn(e, t, n) {
2584
2584
  ]
2585
2585
  };
2586
2586
  }
2587
- function Cn(e, t) {
2587
+ function wn(e, t) {
2588
2588
  let n = "";
2589
2589
  switch (e[0]) {
2590
2590
  /* istanbul ignore next should not happen */
@@ -2604,12 +2604,12 @@ function Cn(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}`), Tn(e);
2607
+ return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`), En(e);
2608
2608
  }
2609
- function wn(e, t) {
2610
- return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), Tn(e.slice(1, -1)).replace(/''/g, "'");
2609
+ function Tn(e, t) {
2610
+ return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), En(e.slice(1, -1)).replace(/''/g, "'");
2611
2611
  }
2612
- function Tn(e) {
2612
+ function En(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 Tn(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 En(e, t) {
2626
+ function Dn(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 } = Dn(e, r);
2632
+ let { fold: t, offset: i } = On(e, r);
2633
2633
  n += t, r = i;
2634
2634
  } else if (i === "\\") {
2635
- let i = e[++r], a = On[i];
2635
+ let i = e[++r], a = kn[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 += kn(e, r + 1, a, t), r += a;
2641
+ n += An(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 En(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 Dn(e, t) {
2655
+ function On(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 Dn(e, t) {
2660
2660
  offset: t
2661
2661
  };
2662
2662
  }
2663
- var On = {
2663
+ var kn = {
2664
2664
  0: "\0",
2665
2665
  a: "\x07",
2666
2666
  b: "\b",
@@ -2680,7 +2680,7 @@ var On = {
2680
2680
  "\\": "\\",
2681
2681
  " ": " "
2682
2682
  };
2683
- function kn(e, t, n, r) {
2683
+ function An(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,9 +2691,9 @@ function kn(e, t, n, r) {
2691
2691
  }
2692
2692
  //#endregion
2693
2693
  //#region node_modules/yaml/browser/dist/compose/compose-scalar.js
2694
- function An(e, t, n, r) {
2695
- let { value: i, type: a, comment: o, range: s } = t.type === "block-scalar" ? yn(e, t, r) : Sn(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[h] : c ? jn(e.schema, i, c, n, r) : t.type === "scalar" ? Mn(e, i, t, r) : e.schema[h];
2694
+ function jn(e, t, n, r) {
2695
+ let { value: i, type: a, comment: o, range: s } = t.type === "block-scalar" ? bn(e, t, r) : Cn(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[h] : c ? Mn(e.schema, i, c, n, r) : t.type === "scalar" ? Nn(e, i, t, r) : e.schema[h];
2697
2697
  let u;
2698
2698
  try {
2699
2699
  let a = l.resolve(i, (e) => r(n ?? t, "TAG_RESOLVE_FAILED", e), e.options);
@@ -2704,7 +2704,7 @@ function An(e, t, n, r) {
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 jn(e, t, n, r, i) {
2707
+ function Mn(e, t, n, r, i) {
2708
2708
  if (n === "!") return e[h];
2709
2709
  let a = [];
2710
2710
  for (let t of e.tags) if (!t.collection && t.tag === n) {
@@ -2718,7 +2718,7 @@ function jn(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[h]);
2720
2720
  }
2721
- function Mn({ atKey: e, directives: t, schema: n }, r, i, a) {
2721
+ function Nn({ 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[h];
2723
2723
  if (n.compat) {
2724
2724
  let e = n.compat.find((e) => e.default && e.test?.test(r)) ?? n[h];
@@ -2728,7 +2728,7 @@ function Mn({ 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 Nn(e, t, n) {
2731
+ function Pn(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 Nn(e, t, n) {
2748
2748
  }
2749
2749
  //#endregion
2750
2750
  //#region node_modules/yaml/browser/dist/compose/compose-node.js
2751
- var Pn = {
2752
- composeNode: Fn,
2753
- composeEmptyNode: In
2751
+ var Fn = {
2752
+ composeNode: In,
2753
+ composeEmptyNode: Ln
2754
2754
  };
2755
- function Fn(e, t, n, r) {
2755
+ function In(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 = Ln(e, t, r), (s || c) && r(t, "ALIAS_PROPS", "An alias node must not specify any properties");
2759
+ l = Rn(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 = An(e, t, c, r), s && (l.anchor = s.source.substring(1));
2765
+ l = jn(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 = vn(Pn, e, t, n, r), s && (l.anchor = s.source.substring(1));
2771
+ l = yn(Fn, 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 ??= In(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 && (!S(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 ??= Ln(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 && (!S(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 In(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c }, l) {
2781
- let u = An(e, {
2780
+ function Ln(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c }, l) {
2781
+ let u = jn(e, {
2782
2782
  type: "scalar",
2783
- offset: Nn(t, n, r),
2783
+ offset: Pn(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 Ln({ options: e }, { offset: t, source: n, end: r }, i) {
2789
+ function Rn({ options: e }, { offset: t, source: n, end: r }, i) {
2790
2790
  let a = new de(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 = pn(r, o, e.strict, i);
2792
+ let o = t + n.length, s = mn(r, o, e.strict, i);
2793
2793
  return a.range = [
2794
2794
  t,
2795
2795
  o,
@@ -2798,14 +2798,14 @@ function Ln({ 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 Rn(e, t, { offset: n, start: r, value: i, end: a }, o) {
2802
- let s = new $t(void 0, Object.assign({ _directives: t }, e)), c = {
2801
+ function zn(e, t, { offset: n, start: r, value: i, end: a }, o) {
2802
+ let s = new en(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 = on(r, {
2808
+ }, l = sn(r, {
2809
2809
  indicator: "doc-start",
2810
2810
  next: i ?? a?.[0],
2811
2811
  offset: n,
@@ -2813,8 +2813,8 @@ function Rn(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 ? Fn(c, i, l, o) : In(c, l.end, r, null, l, o);
2817
- let u = s.contents.range[2], d = pn(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 ? In(c, i, l, o) : Ln(c, l.end, r, null, l, o);
2817
+ let u = s.contents.range[2], d = mn(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 Rn(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 zn(e) {
2826
+ function Bn(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 Bn(e) {
2832
+ function Vn(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 Bn(e) {
2848
2848
  afterEmptyLine: r
2849
2849
  };
2850
2850
  }
2851
- var Vn = class {
2851
+ var Hn = 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 = zn(e);
2855
- r ? this.warnings.push(new rn(i, t, n)) : this.errors.push(new nn(i, t, n));
2854
+ let i = Bn(e);
2855
+ r ? this.warnings.push(new an(i, t, n)) : this.errors.push(new rn(i, t, n));
2856
2856
  }, this.directives = new N({ version: e.version || "1.2" }), this.options = e;
2857
2857
  }
2858
2858
  decorate(e, t) {
2859
- let { comment: n, afterEmptyLine: r } = Bn(this.prelude);
2859
+ let { comment: n, afterEmptyLine: r } = Vn(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 Vn = class {
2879
2879
  }
2880
2880
  streamInfo() {
2881
2881
  return {
2882
- comment: Bn(this.prelude).comment,
2882
+ comment: Vn(this.prelude).comment,
2883
2883
  directives: this.directives,
2884
2884
  errors: this.errors,
2885
2885
  warnings: this.warnings
@@ -2893,12 +2893,12 @@ var Vn = class {
2893
2893
  switch (e.type) {
2894
2894
  case "directive":
2895
2895
  this.directives.add(e.source, (t, n, r) => {
2896
- let i = zn(e);
2896
+ let i = Bn(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 = Rn(this.options, this.directives, e, this.onError);
2901
+ let t = zn(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 Vn = 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 nn(zn(e), "UNEXPECTED_TOKEN", t);
2912
+ let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new rn(Bn(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 nn(zn(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
2918
+ this.errors.push(new rn(Bn(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
2919
2919
  break;
2920
2920
  }
2921
2921
  this.doc.directives.docEnd = !0;
2922
- let t = pn(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
2922
+ let t = mn(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 Vn = class {
2927
2927
  this.doc.range[2] = t.offset;
2928
2928
  break;
2929
2929
  }
2930
- default: this.errors.push(new nn(zn(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
2930
+ default: this.errors.push(new rn(Bn(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 $t(void 0, Object.assign({ _directives: this.directives }, this.options));
2936
+ let e = new en(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 Vn = class {
2944
2944
  };
2945
2945
  //#endregion
2946
2946
  //#region node_modules/yaml/browser/dist/parse/cst-scalar.js
2947
- function Hn(e, t = !0, n) {
2947
+ function Un(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 nn([i, i + 1], t, r);
2952
+ else throw new rn([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 Sn(e, t, r);
2958
- case "block-scalar": return yn({ options: { strict: t } }, e, r);
2957
+ case "double-quoted-scalar": return Cn(e, t, r);
2958
+ case "block-scalar": return bn({ options: { strict: t } }, e, r);
2959
2959
  }
2960
2960
  }
2961
2961
  return null;
2962
2962
  }
2963
- function Un(e, t) {
2964
- let { implicitKey: n = !1, indent: r, inFlow: i = !1, offset: a = -1, type: o = "PLAIN" } = t, s = Ne({
2963
+ function Wn(e, t) {
2964
+ let { implicitKey: n = !1, indent: r, inFlow: i = !1, offset: a = -1, type: o = "PLAIN" } = t, s = Pe({
2965
2965
  type: o,
2966
2966
  value: e
2967
2967
  }, {
@@ -2987,7 +2987,7 @@ function Un(e, t) {
2987
2987
  indent: r,
2988
2988
  source: t
2989
2989
  }];
2990
- return Kn(i, c) || i.push({
2990
+ return qn(i, c) || i.push({
2991
2991
  type: "newline",
2992
2992
  offset: -1,
2993
2993
  indent: r,
@@ -3023,7 +3023,7 @@ function Un(e, t) {
3023
3023
  };
3024
3024
  }
3025
3025
  }
3026
- function Wn(e, t, n = {}) {
3026
+ function Gn(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 Wn(e, t, n = {}) {
3040
3040
  }
3041
3041
  default: o = "PLAIN";
3042
3042
  }
3043
- let c = Ne({
3043
+ let c = Pe({
3044
3044
  type: o,
3045
3045
  value: t
3046
3046
  }, {
@@ -3055,18 +3055,18 @@ function Wn(e, t, n = {}) {
3055
3055
  switch (c[0]) {
3056
3056
  case "|":
3057
3057
  case ">":
3058
- Gn(e, c);
3058
+ Kn(e, c);
3059
3059
  break;
3060
3060
  case "\"":
3061
- qn(e, c, "double-quoted-scalar");
3061
+ Jn(e, c, "double-quoted-scalar");
3062
3062
  break;
3063
3063
  case "'":
3064
- qn(e, c, "single-quoted-scalar");
3064
+ Jn(e, c, "single-quoted-scalar");
3065
3065
  break;
3066
- default: qn(e, c, "scalar");
3066
+ default: Jn(e, c, "scalar");
3067
3067
  }
3068
3068
  }
3069
- function Gn(e, t) {
3069
+ function Kn(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 Gn(e, t) {
3079
3079
  indent: n,
3080
3080
  source: r
3081
3081
  }];
3082
- Kn(a, "end" in e ? e.end : void 0) || a.push({
3082
+ qn(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 Gn(e, t) {
3094
3094
  });
3095
3095
  }
3096
3096
  }
3097
- function Kn(e, t) {
3097
+ function qn(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 Kn(e, t) {
3104
3104
  }
3105
3105
  return !1;
3106
3106
  }
3107
- function qn(e, t, n) {
3107
+ function Jn(e, t, n) {
3108
3108
  switch (e.type) {
3109
3109
  case "scalar":
3110
3110
  case "double-quoted-scalar":
@@ -3151,28 +3151,28 @@ function qn(e, t, n) {
3151
3151
  }
3152
3152
  //#endregion
3153
3153
  //#region node_modules/yaml/browser/dist/parse/cst-stringify.js
3154
- var Jn = (e) => "type" in e ? Yn(e) : Xn(e);
3155
- function Yn(e) {
3154
+ var Yn = (e) => "type" in e ? Xn(e) : Zn(e);
3155
+ function Xn(e) {
3156
3156
  switch (e.type) {
3157
3157
  case "block-scalar": {
3158
3158
  let t = "";
3159
- for (let n of e.props) t += Yn(n);
3159
+ for (let n of e.props) t += Xn(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 += Xn(n);
3165
+ for (let n of e.items) t += Zn(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 += Xn(n);
3170
+ for (let n of e.items) t += Zn(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 = Xn(e);
3175
+ let t = Zn(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 Yn(e) {
3183
3183
  }
3184
3184
  }
3185
3185
  }
3186
- function Xn({ start: e, key: t, sep: n, value: r }) {
3186
+ function Zn({ 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 += Yn(t)), n) for (let e of n) i += e.source;
3190
- return r && (i += Yn(r)), i;
3189
+ if (t && (i += Xn(t)), n) for (let e of n) i += e.source;
3190
+ return r && (i += Xn(r)), i;
3191
3191
  }
3192
3192
  //#endregion
3193
3193
  //#region node_modules/yaml/browser/dist/parse/cst-visit.js
3194
- var Zn = Symbol("break visit"), Qn = Symbol("skip children"), $n = Symbol("remove item");
3195
- function er(e, t) {
3194
+ var Qn = Symbol("break visit"), $n = Symbol("skip children"), er = Symbol("remove item");
3195
+ function tr(e, t) {
3196
3196
  "type" in e && e.type === "document" && (e = {
3197
3197
  start: e.start,
3198
3198
  value: e.value
3199
- }), tr(Object.freeze([]), e, t);
3199
+ }), nr(Object.freeze([]), e, t);
3200
3200
  }
3201
- er.BREAK = Zn, er.SKIP = Qn, er.REMOVE = $n, er.itemAtPath = (e, t) => {
3201
+ tr.BREAK = Qn, tr.SKIP = $n, tr.REMOVE = er, tr.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 @@ er.BREAK = Zn, er.SKIP = Qn, er.REMOVE = $n, er.itemAtPath = (e, t) => {
3206
3206
  else return;
3207
3207
  }
3208
3208
  return n;
3209
- }, er.parentCollection = (e, t) => {
3210
- let n = er.itemAtPath(e, t.slice(0, -1)), r = t[t.length - 1][0], i = n?.[r];
3209
+ }, tr.parentCollection = (e, t) => {
3210
+ let n = tr.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 tr(e, t, n) {
3214
+ function nr(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 = tr(Object.freeze(e.concat([[i, t]])), a.items[t], n);
3221
+ let r = nr(Object.freeze(e.concat([[i, t]])), a.items[t], n);
3222
3222
  if (typeof r == "number") t = r - 1;
3223
- else if (r === Zn) return Zn;
3224
- else r === $n && (a.items.splice(t, 1), --t);
3223
+ else if (r === Qn) return Qn;
3224
+ else r === er && (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 tr(e, t, n) {
3230
3230
  }
3231
3231
  //#endregion
3232
3232
  //#region node_modules/yaml/browser/dist/parse/cst.js
3233
- var nr = /* @__PURE__ */ a({
3233
+ var rr = /* @__PURE__ */ a({
3234
3234
  BOM: () => "",
3235
3235
  DOCUMENT: () => "",
3236
3236
  FLOW_END: () => "",
3237
3237
  SCALAR: () => "",
3238
- createScalarToken: () => Un,
3239
- isCollection: () => rr,
3240
- isScalar: () => ir,
3241
- prettyToken: () => ar,
3242
- resolveAsScalar: () => Hn,
3243
- setScalarValue: () => Wn,
3244
- stringify: () => Jn,
3245
- tokenType: () => or,
3246
- visit: () => er
3247
- }), rr = (e) => !!e && "items" in e, ir = (e) => !!e && (e.type === "scalar" || e.type === "single-quoted-scalar" || e.type === "double-quoted-scalar" || e.type === "block-scalar");
3238
+ createScalarToken: () => Wn,
3239
+ isCollection: () => ir,
3240
+ isScalar: () => ar,
3241
+ prettyToken: () => or,
3242
+ resolveAsScalar: () => Un,
3243
+ setScalarValue: () => Gn,
3244
+ stringify: () => Yn,
3245
+ tokenType: () => sr,
3246
+ visit: () => tr
3247
+ }), ir = (e) => !!e && "items" in e, ar = (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 ar(e) {
3249
+ function or(e) {
3250
3250
  switch (e) {
3251
3251
  case "": return "<BOM>";
3252
3252
  case "": return "<DOC>";
@@ -3255,7 +3255,7 @@ function ar(e) {
3255
3255
  default: return JSON.stringify(e);
3256
3256
  }
3257
3257
  }
3258
- function or(e) {
3258
+ function sr(e) {
3259
3259
  switch (e) {
3260
3260
  case "": return "byte-order-mark";
3261
3261
  case "": return "doc-mode";
@@ -3292,7 +3292,7 @@ function or(e) {
3292
3292
  }
3293
3293
  //#endregion
3294
3294
  //#region node_modules/yaml/browser/dist/parse/lexer.js
3295
- function K(e) {
3295
+ function G(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 sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), lr = /* @__PURE__ */ new Set(",[]{}"), ur = /* @__PURE__ */ new Set(" ,[]{}\n\r "), dr = (e) => !e || ur.has(e), fr = class {
3305
+ var cr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), lr = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), ur = /* @__PURE__ */ new Set(",[]{}"), dr = /* @__PURE__ */ new Set(" ,[]{}\n\r "), fr = (e) => !e || dr.has(e), pr = 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 sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__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 === "...") && G(this.buffer[e + 3])) return -1;
3340
3340
  }
3341
3341
  return e;
3342
3342
  }
@@ -3398,14 +3398,14 @@ var sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__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 === "...") && G(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 && !G(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 === ":") && G(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 sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__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(dr), "doc";
3426
+ case "*": return yield* this.pushUntil(fr), "doc";
3427
3427
  case "\"":
3428
3428
  case "'": return yield* this.parseQuotedScalar();
3429
3429
  case "|":
@@ -3438,7 +3438,7 @@ var sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__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("...")) && G(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 sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__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(dr), "flow";
3451
+ case "*": return yield* this.pushUntil(fr), "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 || G(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 sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__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) => G(e) || e === "#");
3495
3495
  }
3496
3496
  *parseBlockScalar() {
3497
3497
  let e = this.pos - 1, t = 0, n;
@@ -3541,18 +3541,18 @@ var sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__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 && lr.has(r)) break;
3544
+ if (G(r) || e && ur.has(r)) break;
3545
3545
  t = n;
3546
- } else if (K(r)) {
3546
+ } else if (G(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 && lr.has(i)) break;
3548
+ if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e && ur.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 && lr.has(r)) break;
3555
+ if (e && ur.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 sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__PURE__ */
3572
3572
  e += yield* this.pushTag(), e += yield* this.pushSpaces(!0);
3573
3573
  continue loop;
3574
3574
  case "&":
3575
- e += yield* this.pushUntil(dr), e += yield* this.pushSpaces(!0);
3575
+ e += yield* this.pushUntil(fr), 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 && lr.has(n)) {
3581
+ if (G(n) || t && ur.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 sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__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 (; !G(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 (cr.has(t)) t = this.buffer[++e];
3600
- else if (t === "%" && sr.has(this.buffer[e + 1]) && sr.has(this.buffer[e + 2])) t = this.buffer[e += 3];
3599
+ for (; t;) if (lr.has(t)) t = this.buffer[++e];
3600
+ else if (t === "%" && cr.has(this.buffer[e + 1]) && cr.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 sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__PURE__ */
3619
3619
  for (; !e(n);) n = this.buffer[++t];
3620
3620
  return yield* this.pushToIndex(t, !1);
3621
3621
  }
3622
- }, pr = class {
3622
+ }, mr = 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 sr = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), cr = /* @__PURE__ */
3645
3645
  };
3646
3646
  //#endregion
3647
3647
  //#region node_modules/yaml/browser/dist/parse/parser.js
3648
- function mr(e, t) {
3648
+ function K(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 yr(e, t) {
3698
3698
  else for (let n = 0; n < t.length; ++n) e.push(t[n]);
3699
3699
  }
3700
3700
  function br(e) {
3701
- if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !mr(t.start, "explicit-key-ind") && !mr(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, gr(t.value) ? t.value.end ? yr(t.value.end, t.sep) : t.value.end = t.sep : yr(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 && !K(t.start, "explicit-key-ind") && !K(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, gr(t.value) ? t.value.end ? yr(t.value.end, t.sep) : t.value.end = t.sep : yr(t.start, t.sep), delete t.sep);
3702
3702
  }
3703
3703
  var xr = 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 fr(), 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 pr(), 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 xr = class {
3714
3714
  this.atScalar = !1, yield* this.step(), this.offset += e.length;
3715
3715
  return;
3716
3716
  }
3717
- let t = or(e);
3717
+ let t = sr(e);
3718
3718
  if (!t) {
3719
3719
  let t = `Not a YAML token: ${e}`;
3720
3720
  yield* this.pop({
@@ -4009,7 +4009,7 @@ var xr = class {
4009
4009
  case "map-value-ind":
4010
4010
  if (t.explicitKey) {
4011
4011
  if (!t.sep) {
4012
- if (mr(t.start, "newline")) Object.assign(t, {
4012
+ if (K(t.start, "newline")) Object.assign(t, {
4013
4013
  key: null,
4014
4014
  sep: [this.sourceToken]
4015
4015
  });
@@ -4031,7 +4031,7 @@ var xr = class {
4031
4031
  key: null,
4032
4032
  sep: [this.sourceToken]
4033
4033
  });
4034
- else if (mr(t.sep, "map-value-ind")) this.stack.push({
4034
+ else if (K(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 xr = class {
4041
4041
  sep: [this.sourceToken]
4042
4042
  }]
4043
4043
  });
4044
- else if (gr(t.key) && !mr(t.sep, "newline")) {
4044
+ else if (gr(t.key) && !K(t.sep, "newline")) {
4045
4045
  let e = vr(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 xr = class {
4058
4058
  start: i,
4059
4059
  key: null,
4060
4060
  sep: [this.sourceToken]
4061
- }) : mr(t.sep, "map-value-ind") ? this.stack.push({
4061
+ }) : K(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 xr = 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 && !mr(t.sep, "newline")) {
4095
+ if (!t.explicitKey && t.sep && !K(t.sep, "newline")) {
4096
4096
  yield* this.pop({
4097
4097
  type: "error",
4098
4098
  offset: this.offset,
@@ -4140,7 +4140,7 @@ var xr = class {
4140
4140
  return;
4141
4141
  case "seq-item-ind":
4142
4142
  if (this.indent !== e.indent) break;
4143
- t.value || mr(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4143
+ t.value || K(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 xr = class {
4323
4323
  function Sr(e) {
4324
4324
  let t = e.prettyErrors !== !1;
4325
4325
  return {
4326
- lineCounter: e.lineCounter || t && new pr() || null,
4326
+ lineCounter: e.lineCounter || t && new mr() || null,
4327
4327
  prettyErrors: t
4328
4328
  };
4329
4329
  }
4330
4330
  function Cr(e, t = {}) {
4331
- let { lineCounter: n, prettyErrors: r } = Sr(t), i = new xr(n?.addNewLine), a = new Vn(t), o = Array.from(a.compose(i.parse(e)));
4332
- if (r && n) for (let t of o) t.errors.forEach(an(e, n)), t.warnings.forEach(an(e, n));
4331
+ let { lineCounter: n, prettyErrors: r } = Sr(t), i = new xr(n?.addNewLine), a = new Hn(t), o = Array.from(a.compose(i.parse(e)));
4332
+ if (r && n) for (let t of o) t.errors.forEach(on(e, n)), t.warnings.forEach(on(e, n));
4333
4333
  return o.length > 0 ? o : Object.assign([], { empty: !0 }, a.streamInfo());
4334
4334
  }
4335
4335
  function wr(e, t = {}) {
4336
- let { lineCounter: n, prettyErrors: r } = Sr(t), i = new xr(n?.addNewLine), a = new Vn(t), o = null;
4336
+ let { lineCounter: n, prettyErrors: r } = Sr(t), i = new xr(n?.addNewLine), a = new Hn(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 nn(t.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4339
+ o.errors.push(new rn(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(an(e, n)), o.warnings.forEach(an(e, n))), o;
4342
+ return r && n && (o.errors.forEach(on(e, n)), o.warnings.forEach(on(e, n))), o;
4343
4343
  }
4344
4344
  function Tr(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 = wr(e, n);
4348
4348
  if (!i) return null;
4349
- if (i.warnings.forEach((e) => ze(i.options.logLevel, e)), i.errors.length > 0) {
4349
+ if (i.warnings.forEach((e) => Be(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 Er(e, t, n) {
4362
4362
  let { keepUndefined: e } = n ?? t ?? {};
4363
4363
  if (!e) return;
4364
4364
  }
4365
- return y(e) && !r ? e.toString(n) : new $t(e, r, n).toString(n);
4365
+ return y(e) && !r ? e.toString(n) : new en(e, r, n).toString(n);
4366
4366
  }
4367
4367
  //#endregion
4368
4368
  //#region node_modules/yaml/browser/index.js
4369
4369
  var Dr = /* @__PURE__ */ a({
4370
4370
  Alias: () => de,
4371
- CST: () => nr,
4372
- Composer: () => Vn,
4373
- Document: () => $t,
4374
- Lexer: () => fr,
4375
- LineCounter: () => pr,
4376
- Pair: () => H,
4371
+ CST: () => rr,
4372
+ Composer: () => Hn,
4373
+ Document: () => en,
4374
+ Lexer: () => pr,
4375
+ LineCounter: () => mr,
4376
+ Pair: () => V,
4377
4377
  Parser: () => xr,
4378
4378
  Scalar: () => I,
4379
- Schema: () => Zt,
4380
- YAMLError: () => tn,
4381
- YAMLMap: () => U,
4382
- YAMLParseError: () => nn,
4383
- YAMLSeq: () => W,
4384
- YAMLWarning: () => rn,
4379
+ Schema: () => Qt,
4380
+ YAMLError: () => nn,
4381
+ YAMLMap: () => H,
4382
+ YAMLParseError: () => rn,
4383
+ YAMLSeq: () => U,
4384
+ YAMLWarning: () => an,
4385
4385
  isAlias: () => v,
4386
4386
  isCollection: () => w,
4387
4387
  isDocument: () => y,
@@ -4394,8 +4394,8 @@ var Dr = /* @__PURE__ */ a({
4394
4394
  parseAllDocuments: () => Cr,
4395
4395
  parseDocument: () => wr,
4396
4396
  stringify: () => Er,
4397
- visit: () => A,
4398
- visitAsync: () => te
4397
+ visit: () => k,
4398
+ visitAsync: () => A
4399
4399
  }), Or = {
4400
4400
  rawNodes: {
4401
4401
  address: {
@@ -7400,7 +7400,7 @@ function li(e) {
7400
7400
  D[e] = Y(D[e] || {}, t);
7401
7401
  });
7402
7402
  });
7403
- let O = p ? {
7403
+ let ee = p ? {
7404
7404
  ...p,
7405
7405
  fields: D
7406
7406
  } : null;
@@ -7414,7 +7414,7 @@ function li(e) {
7414
7414
  nodeTemplate: u || null,
7415
7415
  treeTemplate: d || null,
7416
7416
  channelTemplate: E,
7417
- userTemplate: O
7417
+ userTemplate: ee
7418
7418
  };
7419
7419
  }
7420
7420
  //#endregion
@@ -7576,18 +7576,25 @@ async function fi(e, t) {
7576
7576
  return [];
7577
7577
  }
7578
7578
  }
7579
- function pi(e) {
7580
- 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;
7579
+ async function pi(e, t) {
7580
+ try {
7581
+ return (await ui(e, "\n WITH RECURSIVE tree_path(treeNodeId, contentId, parentId) AS (\n SELECT id, contentId, parentId \n FROM tree_nodes \n WHERE contentId = ?\n UNION ALL\n SELECT tn.id, tn.contentId, tn.parentId\n FROM tree_nodes tn\n INNER JOIN tree_path tp ON tn.parentId = tp.treeNodeId\n )\n SELECT DISTINCT cn.slug\n FROM tree_path tp\n INNER JOIN content_nodes cn ON tp.contentId = cn.id\n WHERE cn.status = 'published' AND cn.slug IS NOT NULL AND cn.id != ?\n ", [t, t])).map((e) => e.slug).filter(Boolean);
7582
+ } catch (e) {
7583
+ return console.warn("[Cache] Failed to fetch descendant slugs:", e), [];
7584
+ }
7581
7585
  }
7582
7586
  function mi(e) {
7583
- return +(e === !0 || e === 1 || e === "1" || e === "true");
7587
+ 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;
7584
7588
  }
7585
7589
  function hi(e) {
7590
+ return +(e === !0 || e === 1 || e === "1" || e === "true");
7591
+ }
7592
+ function gi(e) {
7586
7593
  if (e == null || e === "null" || e === "" || typeof e == "string" && e.startsWith("draft-")) return null;
7587
7594
  let t = Number(e);
7588
7595
  return isNaN(t) ? null : t;
7589
7596
  }
7590
- function gi(e) {
7597
+ function _i(e) {
7591
7598
  let t = { ...e };
7592
7599
  for (let e of [
7593
7600
  "id",
@@ -7616,10 +7623,10 @@ function gi(e) {
7616
7623
  ]) delete t[e];
7617
7624
  return t;
7618
7625
  }
7619
- function _i(e, t = /* @__PURE__ */ new Set()) {
7620
- return e ? typeof e == "string" ? (e.startsWith("ast_") && t.add(e), t) : Array.isArray(e) ? (e.forEach((e) => _i(e, t)), t) : (typeof e == "object" && Object.values(e).forEach((e) => _i(e, t)), t) : t;
7626
+ function vi(e, t = /* @__PURE__ */ new Set()) {
7627
+ return e ? typeof e == "string" ? (e.startsWith("ast_") && t.add(e), t) : Array.isArray(e) ? (e.forEach((e) => vi(e, t)), t) : (typeof e == "object" && Object.values(e).forEach((e) => vi(e, t)), t) : t;
7621
7628
  }
7622
- async function vi(e, t, n) {
7629
+ async function yi(e, t, n) {
7623
7630
  for (let r of n) {
7624
7631
  let n = (await ui(e, "\n SELECT id, storageKeyPrivate, isSystemVariant, parentAssetId, filename\n FROM assets WHERE id = ?\n ", [r]))[0];
7625
7632
  if (!n || (await ui(e, "SELECT 1 FROM node_assets WHERE assetId = ? LIMIT 1", [n.id])).length > 0) continue;
@@ -7638,7 +7645,7 @@ async function vi(e, t, n) {
7638
7645
  await di(e, `DELETE FROM node_assets WHERE assetId IN (${o})`, a), await di(e, `DELETE FROM assets WHERE id IN (${o})`, a);
7639
7646
  }
7640
7647
  }
7641
- async function yi(e, t, n) {
7648
+ async function bi(e, t, n) {
7642
7649
  let r = {}, i = null;
7643
7650
  if (t) {
7644
7651
  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 || [];
@@ -7690,11 +7697,11 @@ Z.get("/", async (e) => {
7690
7697
  if (s) try {
7691
7698
  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 = li(e.env?.BUNDLED_DEFINITIONS).nodes?.[i.contentType] || {}, l = n.layoutId || null;
7692
7699
  if (a) {
7693
- let { resolvedLayoutId: e, inheritedFields: r } = await yi(t, a.parentId, a.treeId);
7700
+ let { resolvedLayoutId: e, inheritedFields: r } = await bi(t, a.parentId, a.treeId);
7694
7701
  (l === "inherit" || !l) && (l = e || c.defaultLayout || null);
7695
7702
  for (let [e, t] of Object.entries(r)) (n[e] === void 0 || n[e] === null || n[e] === "") && t !== void 0 && (n[e] = t);
7696
7703
  } else (l === "inherit" || !l) && (l = c.defaultLayout || null);
7697
- let u = await oi(t, gi(n));
7704
+ let u = await oi(t, _i(n));
7698
7705
  Object.assign(o, u), o.resolvedLayoutId = l;
7699
7706
  } catch {}
7700
7707
  let c = await t.prepare("SELECT channelId FROM node_channels WHERE nodeId = ?").all(r);
@@ -7782,7 +7789,7 @@ Z.get("/", async (e) => {
7782
7789
  `).all(...T), a = Array.isArray(i) ? i : a?.results || [];
7783
7790
  for (let e of a) D[e.nodeId] || (D[e.nodeId] = []), D[e.nodeId].includes(e.label) || D[e.nodeId].push(e.label);
7784
7791
  }
7785
- let O = await Promise.all(w.map(async (e) => {
7792
+ let ee = await Promise.all(w.map(async (e) => {
7786
7793
  let n = (e.status === "draft" || !e.status) && !!e.publishedAt, r = {
7787
7794
  id: e.id,
7788
7795
  title: e.title,
@@ -7804,30 +7811,30 @@ Z.get("/", async (e) => {
7804
7811
  assetCount: e.assetCount || 0
7805
7812
  }, i = e.draftDataJson || e.dataJson;
7806
7813
  if (i) try {
7807
- let e = typeof i == "string" ? JSON.parse(i) : i, n = await oi(t, gi(e));
7814
+ let e = typeof i == "string" ? JSON.parse(i) : i, n = await oi(t, _i(e));
7808
7815
  Object.assign(r, n);
7809
7816
  } catch {}
7810
7817
  return r;
7811
7818
  }));
7812
7819
  return e.json({
7813
- items: O,
7820
+ items: ee,
7814
7821
  total: v,
7815
- hasMore: p + O.length < v,
7822
+ hasMore: p + ee.length < v,
7816
7823
  offset: p,
7817
7824
  limit: f
7818
7825
  });
7819
7826
  }), Z.post("/", async (e) => {
7820
- 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 = gi(_), { cleanedData: y, assetRefs: b } = ri(v), x = mi(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();
7827
+ 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 = _i(_), { cleanedData: y, assetRefs: b } = ri(v), x = hi(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();
7821
7828
  if (a) {
7822
7829
  let n = await t.prepare("SELECT title, slug, language, contentType, draftDataJson, dataJson, publishedAt, status FROM content_nodes WHERE id = ?").get(a), r = n?.draftDataJson || n?.dataJson || "{}";
7823
7830
  try {
7824
- _i(typeof r == "string" ? JSON.parse(r) : r, E);
7831
+ vi(typeof r == "string" ? JSON.parse(r) : r, E);
7825
7832
  } catch {}
7826
7833
  if (m !== void 0) {
7827
7834
  let e = await t.prepare("SELECT dataJson FROM content_blocks WHERE contentId = ? AND isDraft = 1").all(a);
7828
7835
  (Array.isArray(e) ? e : e?.results || []).forEach((e) => {
7829
7836
  try {
7830
- _i(typeof e.dataJson == "string" ? JSON.parse(e.dataJson) : e.dataJson, E);
7837
+ vi(typeof e.dataJson == "string" ? JSON.parse(e.dataJson) : e.dataJson, E);
7831
7838
  } catch {}
7832
7839
  });
7833
7840
  }
@@ -7845,7 +7852,7 @@ Z.get("/", async (e) => {
7845
7852
  });
7846
7853
  }
7847
7854
  {
7848
- let e = o === void 0 ? n?.title || "Untitled" : o, r = s === void 0 ? n?.slug ?? null : pi(s), i = C || n?.contentType || "page", c = S || n?.language || "en", l = n?.draftDataJson || n?.dataJson || "{}", u = {};
7855
+ let e = o === void 0 ? n?.title || "Untitled" : o, r = s === void 0 ? n?.slug ?? null : mi(s), i = C || n?.contentType || "page", c = S || n?.language || "en", l = n?.draftDataJson || n?.dataJson || "{}", u = {};
7849
7856
  try {
7850
7857
  u = JSON.parse(l);
7851
7858
  } catch {}
@@ -7856,7 +7863,7 @@ Z.get("/", async (e) => {
7856
7863
  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);
7857
7864
  }
7858
7865
  } else {
7859
- let e = o || "Untitled", n = pi(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);
7866
+ let e = o || "Untitled", n = mi(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);
7860
7867
  T = Number(i.lastInsertRowid);
7861
7868
  }
7862
7869
  if (h !== void 0 && Array.isArray(h) && T) {
@@ -7874,7 +7881,7 @@ Z.get("/", async (e) => {
7874
7881
  let i = Number(t.treeId) || t.treeId;
7875
7882
  if (!e.has(i)) {
7876
7883
  e.add(i);
7877
- let a = hi(t.parentId ?? t._draftParentId ?? null), o = typeof t.sortOrder == "number" ? t.sortOrder : 0;
7884
+ let a = gi(t.parentId ?? t._draftParentId ?? null), o = typeof t.sortOrder == "number" ? t.sortOrder : 0;
7878
7885
  n.push("(?, ?, ?, ?)"), r.push(i, T, a, o);
7879
7886
  }
7880
7887
  }
@@ -7905,10 +7912,10 @@ Z.get("/", async (e) => {
7905
7912
  let n = [...b, ...D];
7906
7913
  await ii(t, T, n);
7907
7914
  let r = new Set(n.map((e) => e.assetId)), i = new Set([...E].filter((e) => !r.has(e)));
7908
- i.size > 0 && await vi(t, ni(e.env), i);
7915
+ i.size > 0 && await yi(t, ni(e.env), i);
7909
7916
  }
7910
7917
  if (await J(e).clear(), T) {
7911
- let n = new X(e.env), r = o === void 0 ? s : pi(s);
7918
+ let n = new X(e.env), r = o === void 0 ? s : mi(s);
7912
7919
  await n.purgeInternalWorkerCache(e, t, T, r || "", S);
7913
7920
  }
7914
7921
  return e.json({
@@ -7952,8 +7959,10 @@ Z.get("/", async (e) => {
7952
7959
  await t.prepare("\n INSERT INTO node_revisions (nodeId, version, snapshotJson, createdById)\n VALUES (?, ?, ?, ?)\n ").run(i, _, v.publishedAt, a), await J(e).clear();
7953
7960
  let y = new X(e.env);
7954
7961
  await y.purgeInternalWorkerCache(e, t, i, o.slug, o.language || "en");
7955
- let b = await fi(t, i);
7956
- return y.purgeSmart(e, t, i, o.slug, b, p), e.json({
7962
+ let b = await fi(t, i), x = await pi(t, i);
7963
+ y.purgeSmart(e, t, i, o.slug, b, p);
7964
+ for (let t of x) y.purgeAndWarmSlug(e, t);
7965
+ return e.json({
7957
7966
  success: !0,
7958
7967
  id: i,
7959
7968
  status: "published",
@@ -7999,34 +8008,32 @@ Z.get("/", async (e) => {
7999
8008
  });
8000
8009
  //#endregion
8001
8010
  //#region server/routes/admin/trees.ts
8002
- var bi = new e();
8003
- function xi(e, t = null) {
8011
+ var xi = new e();
8012
+ function Si(e, t = null) {
8004
8013
  let n = [];
8005
8014
  for (let r = 0; r < e.length; r++) {
8006
8015
  let i = e[r];
8007
- if (i && (i.treeNodeId || i.id)) {
8008
- let e = i.treeNodeId || i.id;
8009
- if (typeof e == "string" && e.startsWith("draft-")) continue;
8010
- let a = Number(e);
8011
- if (isNaN(a)) continue;
8012
- n.push({
8013
- id: a,
8014
- parentId: t,
8015
- sortOrder: r
8016
- }), i.children && Array.isArray(i.children) && i.children.length > 0 && n.push(...xi(i.children, a));
8017
- }
8016
+ if (!i) continue;
8017
+ let a = i.treeNodeId || i.id || i.contentId;
8018
+ if (!a || typeof a == "string" && a.startsWith("draft-")) continue;
8019
+ let o = Number(a);
8020
+ isNaN(o) || (n.push({
8021
+ id: o,
8022
+ parentId: t,
8023
+ sortOrder: r
8024
+ }), i.children && Array.isArray(i.children) && i.children.length > 0 && n.push(...Si(i.children, o)));
8018
8025
  }
8019
8026
  return n;
8020
8027
  }
8021
- function Si(e) {
8028
+ function Ci(e) {
8022
8029
  if (e == null || e === "null" || e === "" || typeof e == "string" && e.startsWith("draft-")) return null;
8023
8030
  let t = Number(e);
8024
8031
  return isNaN(t) ? null : t;
8025
8032
  }
8026
- function Ci(e) {
8033
+ function wi(e) {
8027
8034
  return +(e === !0 || e === 1 || e === "1" || e === "true");
8028
8035
  }
8029
- bi.get("/tree.json", async (e) => {
8036
+ xi.get("/tree.json", async (e) => {
8030
8037
  try {
8031
8038
  let t = e.get("db"), n = e.req.query("treeId") || "main-nav", r = e.req.query("preview") === "true", i = 1;
8032
8039
  if (isNaN(Number(n))) {
@@ -8076,7 +8083,7 @@ bi.get("/tree.json", async (e) => {
8076
8083
  } catch (t) {
8077
8084
  return console.error("[CMS Tree API] GET Error:", t), e.json({ error: t.message || "Failed to fetch tree" }, 500);
8078
8085
  }
8079
- }), bi.post("/tree.json", async (e) => {
8086
+ }), xi.post("/tree.json", async (e) => {
8080
8087
  try {
8081
8088
  let t = e.get("db"), n = await e.req.json(), r = n.treeId ? String(n.treeId).trim() : "main-nav", i = J(e), a = new X(e.env), o = 1;
8082
8089
  if (isNaN(Number(r))) {
@@ -8088,7 +8095,7 @@ bi.get("/tree.json", async (e) => {
8088
8095
  }
8089
8096
  } else o = Number(r);
8090
8097
  if (n.tree && Array.isArray(n.tree)) {
8091
- let r = xi(n.tree, null);
8098
+ let r = Si(n.tree, null);
8092
8099
  if (r.length > 0) for (let e = 0; e < r.length; e += 50) {
8093
8100
  let n = r.slice(e, e + 50), i = n.map((e) => e.id), a = i.map(() => "?").join(","), s = "UPDATE tree_nodes SET \n";
8094
8101
  s += "parentId = CASE id \n", n.forEach(() => {
@@ -8103,11 +8110,14 @@ bi.get("/tree.json", async (e) => {
8103
8110
  c.push(e.id, e.sortOrder);
8104
8111
  }), c.push(...i), c.push(o), await t.prepare(s).run(...c);
8105
8112
  }
8106
- return await i.clear(), a.purgeGlobalCache(e), e.json({ success: !0 });
8113
+ return await i.clear(), e.executionCtx && typeof e.executionCtx.waitUntil == "function" ? e.executionCtx.waitUntil(a.purgeGlobalCache(e)) : await a.purgeGlobalCache(e), e.json({
8114
+ success: !0,
8115
+ reorderedCount: r.length
8116
+ });
8107
8117
  }
8108
- let { action: s, title: c, nodeType: l, parentId: u, contentId: d, nodeData: f = {}, pageData: p = {} } = n, m = Object.keys(f).length > 0 ? { ...f } : { ...p }, h = Ci(n.isHidden === void 0 ? m.isHidden === void 0 ? m.hidden : m.isHidden : n.isHidden);
8118
+ let { action: s, title: c, nodeType: l, parentId: u, contentId: d, nodeData: f = {}, pageData: p = {} } = n, m = Object.keys(f).length > 0 ? { ...f } : { ...p }, h = wi(n.isHidden === void 0 ? m.isHidden === void 0 ? m.hidden : m.isHidden : n.isHidden);
8109
8119
  delete m._isTreeDraft, delete m._draftParentId, delete m.isNew, delete m.nodeType, delete m.contentType, delete m.title, delete m.slug, delete m.hidden, delete m.is_hidden, delete m.isHidden, delete m.status;
8110
- let g = Si(u), _ = e.get("user")?.id || null;
8120
+ let g = Ci(u), _ = e.get("user")?.id || null;
8111
8121
  if (s === "create") {
8112
8122
  let r = m.slug || n.slug || c, s = r ? String(r).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "") : null;
8113
8123
  if (s) {
@@ -8139,7 +8149,7 @@ bi.get("/tree.json", async (e) => {
8139
8149
  let e = b.map(() => "(?, ?)").join(", "), n = b.flatMap((e) => [f, e]);
8140
8150
  await t.prepare(`INSERT OR IGNORE INTO node_channels (nodeId, channelId) VALUES ${e}`).run(...n);
8141
8151
  }
8142
- return await i.clear(), a.purgeGlobalCache(e), e.json({
8152
+ return await i.clear(), e.executionCtx && typeof e.executionCtx.waitUntil == "function" ? e.executionCtx.waitUntil(a.purgeGlobalCache(e)) : await a.purgeGlobalCache(e), e.json({
8143
8153
  success: !0,
8144
8154
  id: f,
8145
8155
  treeNodeId: v,
@@ -8177,14 +8187,14 @@ bi.get("/tree.json", async (e) => {
8177
8187
  }
8178
8188
  await t.prepare("DELETE FROM tree_nodes WHERE treeId = ? AND contentId = ?").run(o, d);
8179
8189
  let r = await t.prepare("\n INSERT INTO tree_nodes (treeId, contentId, parentId, sortOrder)\n VALUES (?, ?, ?, 0)\n ").run(o, d, g), s = Number(r.lastInsertRowid);
8180
- return await i.clear(), a.purgeGlobalCache(e), e.json({
8190
+ return await i.clear(), e.executionCtx && typeof e.executionCtx.waitUntil == "function" ? e.executionCtx.waitUntil(a.purgeGlobalCache(e)) : await a.purgeGlobalCache(e), e.json({
8181
8191
  success: !0,
8182
8192
  treeNodeId: s
8183
8193
  });
8184
8194
  }
8185
8195
  if (s === "detach") {
8186
8196
  let r = n.treeNodeId || n.contentId;
8187
- return r ? (await t.prepare("\n UPDATE tree_nodes \n SET parentId = (SELECT parentId FROM tree_nodes WHERE (id = ? OR contentId = ?) AND treeId = ?) \n WHERE parentId = ? AND treeId = ?\n ").run(r, r, o, r, o), await t.prepare("DELETE FROM tree_nodes WHERE (id = ? OR contentId = ?) AND treeId = ?").run(r, r, o), await i.clear(), a.purgeGlobalCache(e), e.json({ success: !0 })) : e.json({ error: "treeNodeId or contentId required for detach" }, 400);
8197
+ return r ? (await t.prepare("\n UPDATE tree_nodes \n SET parentId = (SELECT parentId FROM tree_nodes WHERE (id = ? OR contentId = ?) AND treeId = ?) \n WHERE parentId = ? AND treeId = ?\n ").run(r, r, o, r, o), await t.prepare("DELETE FROM tree_nodes WHERE (id = ? OR contentId = ?) AND treeId = ?").run(r, r, o), await i.clear(), e.executionCtx && typeof e.executionCtx.waitUntil == "function" ? e.executionCtx.waitUntil(a.purgeGlobalCache(e)) : await a.purgeGlobalCache(e), e.json({ success: !0 })) : e.json({ error: "treeNodeId or contentId required for detach" }, 400);
8188
8198
  }
8189
8199
  return e.json({ error: "Invalid payload or action" }, 400);
8190
8200
  } catch (t) {
@@ -8193,7 +8203,7 @@ bi.get("/tree.json", async (e) => {
8193
8203
  details: t.message
8194
8204
  }, 500);
8195
8205
  }
8196
- }), bi.get("/trees.json", async (e) => {
8206
+ }), xi.get("/trees.json", async (e) => {
8197
8207
  try {
8198
8208
  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) => {
8199
8209
  let n = Number(t.treeId), r = Number(t.channelId);
@@ -8223,7 +8233,7 @@ bi.get("/tree.json", async (e) => {
8223
8233
  } catch {
8224
8234
  return e.json([]);
8225
8235
  }
8226
- }), bi.post("/trees.json", async (e) => {
8236
+ }), xi.post("/trees.json", async (e) => {
8227
8237
  try {
8228
8238
  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 };
8229
8239
  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({
@@ -8248,7 +8258,9 @@ bi.get("/tree.json", async (e) => {
8248
8258
  await t.prepare(`INSERT OR IGNORE INTO channel_trees (channelId, treeId, key) VALUES ${n}`).run(...r);
8249
8259
  }
8250
8260
  }
8251
- return await J(e).clear(), new X(e.env).purgeGlobalCache(e), e.json({
8261
+ await J(e).clear();
8262
+ let m = new X(e.env);
8263
+ return e.executionCtx && typeof e.executionCtx.waitUntil == "function" ? e.executionCtx.waitUntil(m.purgeGlobalCache(e)) : await m.purgeGlobalCache(e), e.json({
8252
8264
  success: !0,
8253
8265
  id: p,
8254
8266
  key: o,
@@ -8262,12 +8274,14 @@ bi.get("/tree.json", async (e) => {
8262
8274
  } catch (t) {
8263
8275
  return console.error("[API Trees] Error saving tree:", t), e.json({ error: t.message || "Failed to save tree" }, 500);
8264
8276
  }
8265
- }), bi.delete("/trees.json", async (e) => {
8277
+ }), xi.delete("/trees.json", async (e) => {
8266
8278
  let t = e.get("db"), n = e.req.query("id");
8267
8279
  if (!n) return e.json({ error: "Tree ID required" }, 400);
8268
8280
  let r = Number(n);
8269
8281
  try {
8270
- return await t.prepare("DELETE FROM trees WHERE id = ?").run(r), await t.prepare("DELETE FROM channel_trees WHERE treeId = ?").run(r), await t.prepare("DELETE FROM tree_nodes WHERE treeId = ?").run(r), await J(e).clear(), new X(e.env).purgeGlobalCache(e), e.json({
8282
+ await t.prepare("DELETE FROM trees WHERE id = ?").run(r), await t.prepare("DELETE FROM channel_trees WHERE treeId = ?").run(r), await t.prepare("DELETE FROM tree_nodes WHERE treeId = ?").run(r), await J(e).clear();
8283
+ let n = new X(e.env);
8284
+ return e.executionCtx && typeof e.executionCtx.waitUntil == "function" ? e.executionCtx.waitUntil(n.purgeGlobalCache(e)) : await n.purgeGlobalCache(e), e.json({
8271
8285
  success: !0,
8272
8286
  deletedTreeId: r
8273
8287
  });
@@ -8277,8 +8291,8 @@ bi.get("/tree.json", async (e) => {
8277
8291
  });
8278
8292
  //#endregion
8279
8293
  //#region server/routes/admin/channels.ts
8280
- var wi = new e();
8281
- wi.get("/", async (e) => {
8294
+ var Ti = new e();
8295
+ Ti.get("/", async (e) => {
8282
8296
  try {
8283
8297
  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) => {
8284
8298
  e[t.channelId] || (e[t.channelId] = []);
@@ -8344,7 +8358,7 @@ wi.get("/", async (e) => {
8344
8358
  error: t.message
8345
8359
  }, 500);
8346
8360
  }
8347
- }), wi.post("/", async (e) => {
8361
+ }), Ti.post("/", async (e) => {
8348
8362
  try {
8349
8363
  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;
8350
8364
  if (await t.prepare("SELECT id FROM channels WHERE key = ? AND id != ? LIMIT 1").get(y, i ?? -1)) return e.json({
@@ -8381,7 +8395,7 @@ wi.get("/", async (e) => {
8381
8395
  details: t.message
8382
8396
  }, 500);
8383
8397
  }
8384
- }), wi.delete("/", async (e) => {
8398
+ }), Ti.delete("/", async (e) => {
8385
8399
  let t = e.get("db"), n = e.req.query("id");
8386
8400
  if (!n) return e.json({ error: "Channel ID required" }, 400);
8387
8401
  let r = Number(n);
@@ -8399,9 +8413,9 @@ wi.get("/", async (e) => {
8399
8413
  });
8400
8414
  //#endregion
8401
8415
  //#region server/routes/admin/schemas.ts
8402
- var Ti = new e(), Ei = null, Di = (e) => {
8416
+ var Ei = new e(), Di = null, Oi = (e) => {
8403
8417
  try {
8404
- if (!Ei) {
8418
+ if (!Di) {
8405
8419
  let t = ci(e.env?.BUNDLED_DEFINITIONS || Or), n = t.userTemplate || {
8406
8420
  id: "userTemplate",
8407
8421
  label: "User Account",
@@ -8438,7 +8452,7 @@ var Ti = new e(), Ei = null, Di = (e) => {
8438
8452
  }
8439
8453
  }
8440
8454
  };
8441
- Ei = {
8455
+ Di = {
8442
8456
  channelTemplate: t.channelTemplate || null,
8443
8457
  treeTemplate: t.treeTemplate || null,
8444
8458
  userTemplate: n,
@@ -8450,7 +8464,7 @@ var Ti = new e(), Ei = null, Di = (e) => {
8450
8464
  blockLayouts: t.blockLayouts || {}
8451
8465
  };
8452
8466
  }
8453
- return e.json(Ei, 200, { "Cache-Control": "public, max-age=300, stale-while-revalidate=86400" });
8467
+ return e.json(Di, 200, { "Cache-Control": "public, max-age=300, stale-while-revalidate=86400" });
8454
8468
  } catch (t) {
8455
8469
  return console.error("[CMS API] Error loading schemas:", t), e.json({
8456
8470
  error: "Failed to load schemas",
@@ -8458,10 +8472,10 @@ var Ti = new e(), Ei = null, Di = (e) => {
8458
8472
  }, 500);
8459
8473
  }
8460
8474
  };
8461
- Ti.get("/", Di), Ti.get("/schemas.json", Di);
8475
+ Ei.get("/", Oi), Ei.get("/schemas.json", Oi);
8462
8476
  //#endregion
8463
8477
  //#region server/routes/admin/validation.ts
8464
- var Oi = new e(), ki = {
8478
+ var ki = new e(), Ai = {
8465
8479
  node: "content_nodes",
8466
8480
  nodes: "content_nodes",
8467
8481
  content_node: "content_nodes",
@@ -8473,7 +8487,7 @@ var Oi = new e(), ki = {
8473
8487
  user: "users",
8474
8488
  users: "users",
8475
8489
  user_account: "user_accounts"
8476
- }, Ai = {
8490
+ }, ji = {
8477
8491
  content_nodes: [
8478
8492
  "id",
8479
8493
  "title",
@@ -8530,11 +8544,11 @@ var Oi = new e(), ki = {
8530
8544
  "createdAt"
8531
8545
  ]
8532
8546
  };
8533
- Oi.post("/validate-unique", async (e) => {
8547
+ ki.post("/validate-unique", async (e) => {
8534
8548
  try {
8535
8549
  let t = e.get("db"), { entityType: n, field: r, value: i, excludeId: a } = await e.req.json();
8536
8550
  if (!r || i == null || String(i).trim() === "") return e.json({ isUnique: !0 });
8537
- let o = ki[n] || "content_nodes", s = r.replace(/[^a-zA-Z0-9_]/g, ""), c = (Ai[o] || Ai.content_nodes).includes(s), l = -1;
8551
+ let o = Ai[n] || "content_nodes", s = r.replace(/[^a-zA-Z0-9_]/g, ""), c = (ji[o] || ji.content_nodes).includes(s), l = -1;
8538
8552
  if (a != null && String(a).trim() !== "") {
8539
8553
  let e = Number(a);
8540
8554
  l = isNaN(e) ? String(a) : e;
@@ -8546,7 +8560,7 @@ Oi.post("/validate-unique", async (e) => {
8546
8560
  } catch (t) {
8547
8561
  return console.error("[API Validation] Error validating global uniqueness:", t), e.json({ error: "Failed to validate uniqueness" }, 500);
8548
8562
  }
8549
- }), Oi.post("/validate-unique-sibling", async (e) => {
8563
+ }), ki.post("/validate-unique-sibling", async (e) => {
8550
8564
  try {
8551
8565
  let t = e.get("db"), { slug: n, treeId: r, parentId: i, excludeTreeNodeId: a } = await e.req.json();
8552
8566
  if (!n || !String(n).trim() || !r) return e.json({ isUnique: !0 });
@@ -8573,8 +8587,8 @@ Oi.post("/validate-unique", async (e) => {
8573
8587
  });
8574
8588
  //#endregion
8575
8589
  //#region server/routes/admin/stats.ts
8576
- var ji = new e();
8577
- ji.get("/", async (e) => {
8590
+ var Mi = new e();
8591
+ Mi.get("/", async (e) => {
8578
8592
  try {
8579
8593
  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) => ({
8580
8594
  ...e,
@@ -8617,7 +8631,7 @@ ji.get("/", async (e) => {
8617
8631
  });
8618
8632
  //#endregion
8619
8633
  //#region server/routes/admin/assets.ts
8620
- var Mi = new e();
8634
+ var Ni = new e();
8621
8635
  async function Q(e, t, n = []) {
8622
8636
  let r = e.prepare(t);
8623
8637
  if (typeof r.bind == "function") {
@@ -8630,20 +8644,20 @@ async function Q(e, t, n = []) {
8630
8644
  }
8631
8645
  return [];
8632
8646
  }
8633
- async function Ni(e, t, n = []) {
8647
+ async function Pi(e, t, n = []) {
8634
8648
  let r = e.prepare(t);
8635
8649
  if (typeof r.bind == "function") return await r.bind(...n).run();
8636
8650
  if (typeof r.run == "function") return await r.run(...n);
8637
8651
  }
8638
- function Pi(e, t, n) {
8652
+ function Fi(e, t, n) {
8639
8653
  let r = e || (t ? `/media/${t}` : "");
8640
8654
  return r && n && r.startsWith(`https://${n}/`) && !r.includes("/media/") && (r = r.replace(`https://${n}/`, `https://${n}/media/`)), r;
8641
8655
  }
8642
- async function Fi(e, t, n) {
8656
+ async function Ii(e, t, n) {
8643
8657
  try {
8644
8658
  let r = new X(e.env), i = await Q(t, "\n SELECT cdnUrl, storageKeyPrivate\n FROM assets\n WHERE id = ? OR parentAssetId = ?\n ", [n, n]), a = [];
8645
8659
  for (let t of i) {
8646
- let n = Pi(t.cdnUrl, t.storageKeyPrivate, e.env?.CDN_DOMAIN);
8660
+ let n = Fi(t.cdnUrl, t.storageKeyPrivate, e.env?.CDN_DOMAIN);
8647
8661
  n && a.push(n);
8648
8662
  }
8649
8663
  let o = await Q(t, "\n SELECT DISTINCT cn.id, cn.slug, cn.status\n FROM node_assets na\n INNER JOIN content_nodes cn ON na.nodeId = cn.id\n LEFT JOIN assets crop ON na.assetId = crop.id\n WHERE cn.status = 'published' AND (\n na.assetId = ?\n OR crop.parentAssetId = ?\n OR crop.id = (SELECT parentAssetId FROM assets WHERE id = ?)\n )\n ", [
@@ -8657,7 +8671,7 @@ async function Fi(e, t, n) {
8657
8671
  console.warn("[Assets Router] Failed to purge edge cache for asset nodes:", e);
8658
8672
  }
8659
8673
  }
8660
- Mi.get("/", async (e) => {
8674
+ Ni.get("/", async (e) => {
8661
8675
  try {
8662
8676
  let t = u(e), { search: n = "", type: r = "all", page: i = "1", limit: a = "24", sort: o = "createdAt", order: s = "DESC", nodeId: c, channelId: l, trashed: d } = e.req.query(), f = Math.max(1, parseInt(i, 10) || 1), p = Math.max(1, Math.min(100, parseInt(a, 10) || 24)), m = (f - 1) * p, h = {
8663
8677
  createdAt: "a.createdAt",
@@ -8724,7 +8738,7 @@ Mi.get("/", async (e) => {
8724
8738
  ...JSON.parse(t.dataJson || "{}")
8725
8739
  };
8726
8740
  } catch {}
8727
- let r = Pi(t.cdnUrl, t.storageKeyPrivate, e.env?.CDN_DOMAIN);
8741
+ let r = Fi(t.cdnUrl, t.storageKeyPrivate, e.env?.CDN_DOMAIN);
8728
8742
  return {
8729
8743
  id: t.id,
8730
8744
  filename: t.filename || "Untitled Asset",
@@ -8748,7 +8762,7 @@ Mi.get("/", async (e) => {
8748
8762
  details: t.message || String(t)
8749
8763
  }, 500);
8750
8764
  }
8751
- }), Mi.post("/upload", async (e) => {
8765
+ }), Ni.post("/upload", async (e) => {
8752
8766
  try {
8753
8767
  let t = u(e), n = ni(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;
8754
8768
  s && (await Q(t, "SELECT id FROM assets WHERE id = ?", [s])).length === 0 && (s = null);
@@ -8767,7 +8781,7 @@ Mi.get("/", async (e) => {
8767
8781
  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;
8768
8782
  T && (await Q(t, "SELECT id FROM users WHERE id = ?", [T])).length === 0 && (T = null);
8769
8783
  let E = +!!h;
8770
- await Ni(t, "\n INSERT INTO assets (id, filename, mimeType, sizeBytes, storageKeyPrivate, cdnUrl, createdById, isSystemVariant, parentAssetId, cropCoordinatesJson)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n ", [
8784
+ await Pi(t, "\n INSERT INTO assets (id, filename, mimeType, sizeBytes, storageKeyPrivate, cdnUrl, createdById, isSystemVariant, parentAssetId, cropCoordinatesJson)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n ", [
8771
8785
  p,
8772
8786
  i.name,
8773
8787
  S,
@@ -8782,7 +8796,7 @@ Mi.get("/", async (e) => {
8782
8796
  let D = x;
8783
8797
  if (s) {
8784
8798
  let n = await Q(t, "SELECT cdnUrl, storageKeyPrivate FROM assets WHERE id = ?", [s]);
8785
- n.length > 0 && (D = Pi(n[0].cdnUrl, n[0].storageKeyPrivate, y)), await Fi(e, t, s);
8799
+ n.length > 0 && (D = Fi(n[0].cdnUrl, n[0].storageKeyPrivate, y)), await Ii(e, t, s);
8786
8800
  }
8787
8801
  return e.json({
8788
8802
  id: p,
@@ -8801,7 +8815,7 @@ Mi.get("/", async (e) => {
8801
8815
  details: t.message || String(t)
8802
8816
  }, 500);
8803
8817
  }
8804
- }), Mi.get("/:id/details", async (e) => {
8818
+ }), Ni.get("/:id/details", async (e) => {
8805
8819
  try {
8806
8820
  let t = u(e), n = e.req.param("id"), r = await Q(t, "SELECT * FROM assets WHERE id = ?", [n]);
8807
8821
  if (!r || r.length === 0) return e.json({ error: "Asset not found" }, 404);
@@ -8824,7 +8838,7 @@ Mi.get("/", async (e) => {
8824
8838
  ...JSON.parse(i.dataJson || "{}")
8825
8839
  };
8826
8840
  } catch {}
8827
- let l = Pi(i.cdnUrl, i.storageKeyPrivate, e.env?.CDN_DOMAIN);
8841
+ let l = Fi(i.cdnUrl, i.storageKeyPrivate, e.env?.CDN_DOMAIN);
8828
8842
  return e.json({
8829
8843
  id: i.id,
8830
8844
  filename: i.filename,
@@ -8851,7 +8865,7 @@ Mi.get("/", async (e) => {
8851
8865
  createdAt: t.createdAt,
8852
8866
  parentAssetId: t.parentAssetId || i.id,
8853
8867
  cropCoordinates: n,
8854
- url: Pi(t.cdnUrl, t.storageKeyPrivate, e.env?.CDN_DOMAIN),
8868
+ url: Fi(t.cdnUrl, t.storageKeyPrivate, e.env?.CDN_DOMAIN),
8855
8869
  originalUrl: l
8856
8870
  };
8857
8871
  })
@@ -8859,7 +8873,7 @@ Mi.get("/", async (e) => {
8859
8873
  } catch (t) {
8860
8874
  return console.error("❌ [Asset Details Error]:", t), e.json({ error: "Failed to load details" }, 500);
8861
8875
  }
8862
- }), Mi.put("/:id", async (e) => {
8876
+ }), Ni.put("/:id", async (e) => {
8863
8877
  try {
8864
8878
  let t = u(e), n = e.req.param("id"), r = await e.req.json(), i = await Q(t, "SELECT filename, dataJson FROM assets WHERE id = ?", [n]);
8865
8879
  if (!i || i.length === 0) return e.json({ error: "Asset not found" }, 404);
@@ -8867,18 +8881,18 @@ Mi.get("/", async (e) => {
8867
8881
  try {
8868
8882
  o = JSON.parse(a.dataJson || "{}");
8869
8883
  } catch {}
8870
- return r.title !== void 0 && (o.title = r.title), r.alt !== void 0 && (o.alt = r.alt), r.description !== void 0 && (o.description = r.description), await Ni(t, "UPDATE assets SET filename = ?, dataJson = ?, updatedAt = CURRENT_TIMESTAMP WHERE id = ?", [
8884
+ return r.title !== void 0 && (o.title = r.title), r.alt !== void 0 && (o.alt = r.alt), r.description !== void 0 && (o.description = r.description), await Pi(t, "UPDATE assets SET filename = ?, dataJson = ?, updatedAt = CURRENT_TIMESTAMP WHERE id = ?", [
8871
8885
  r.filename === void 0 ? a.filename : r.filename,
8872
8886
  JSON.stringify(o),
8873
8887
  n
8874
- ]), await Fi(e, t, n), e.json({ success: !0 });
8888
+ ]), await Ii(e, t, n), e.json({ success: !0 });
8875
8889
  } catch (t) {
8876
8890
  return console.error("❌ [Asset Update Error]:", t), e.json({ error: "Failed to update asset" }, 500);
8877
8891
  }
8878
- }), Mi.delete("/:id", async (e) => {
8892
+ }), Ni.delete("/:id", async (e) => {
8879
8893
  try {
8880
8894
  let t = u(e), n = e.req.param("id"), r = (await Q(t, "SELECT id, filename, isSystemVariant FROM assets WHERE id = ?", [n]))[0];
8881
- return r ? (await Fi(e, t, n), 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 ?))", [
8895
+ return r ? (await Ii(e, t, n), r.isSystemVariant ? await Pi(t, "UPDATE assets SET deletedAt = CURRENT_TIMESTAMP WHERE id = ?", [n]) : await Pi(t, "UPDATE assets\n SET deletedAt = CURRENT_TIMESTAMP\n WHERE id = ? OR parentAssetId = ? OR (isSystemVariant = 1 AND (filename LIKE ? OR filename LIKE ?))", [
8882
8896
  n,
8883
8897
  n,
8884
8898
  `crop_%${r.filename ? r.filename.replace(/\.[^/.]+$/, "") : ""}%`,
@@ -8894,17 +8908,17 @@ Mi.get("/", async (e) => {
8894
8908
  details: t.message || String(t)
8895
8909
  }, 500);
8896
8910
  }
8897
- }), Mi.post("/restore", async (e) => {
8911
+ }), Ni.post("/restore", async (e) => {
8898
8912
  try {
8899
8913
  let t = u(e), n = await e.req.json(), r = n.id || n.assetId;
8900
8914
  if (!r) return e.json({ error: "Asset ID required" }, 400);
8901
8915
  let i = (await Q(t, "SELECT id, filename FROM assets WHERE id = ?", [r]))[0];
8902
- 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 ?))", [
8916
+ return i ? (await Pi(t, "UPDATE assets \n SET deletedAt = NULL \n WHERE id = ? OR parentAssetId = ? OR (isSystemVariant = 1 AND (filename LIKE ? OR filename LIKE ?))", [
8903
8917
  r,
8904
8918
  r,
8905
8919
  `crop_%${i.filename ? i.filename.replace(/\.[^/.]+$/, "") : ""}%`,
8906
8920
  `%${r}%`
8907
- ]), await Fi(e, t, r), e.json({
8921
+ ]), await Ii(e, t, r), e.json({
8908
8922
  success: !0,
8909
8923
  id: r,
8910
8924
  restored: !0
@@ -8915,11 +8929,11 @@ Mi.get("/", async (e) => {
8915
8929
  details: t.message
8916
8930
  }, 500);
8917
8931
  }
8918
- }), Mi.delete("/purge/:id", async (e) => {
8932
+ }), Ni.delete("/purge/:id", async (e) => {
8919
8933
  try {
8920
8934
  let t = u(e), n = ni(e.env), r = e.req.param("id"), i = (await Q(t, "SELECT id, filename, storageKeyPrivate, isSystemVariant FROM assets WHERE id = ?", [r]))[0];
8921
8935
  if (!i) return e.json({ error: "Asset not found" }, 404);
8922
- await Fi(e, t, r);
8936
+ await Ii(e, t, r);
8923
8937
  let a = [i];
8924
8938
  i.isSystemVariant || (a = [i, ...await Q(t, "SELECT id, storageKeyPrivate FROM assets \n WHERE parentAssetId = ? OR (isSystemVariant = 1 AND (filename LIKE ? OR filename LIKE ?))", [
8925
8939
  r,
@@ -8935,7 +8949,7 @@ Mi.get("/", async (e) => {
8935
8949
  }
8936
8950
  }
8937
8951
  let s = o.map(() => "?").join(",");
8938
- 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({
8952
+ return await Pi(t, `DELETE FROM node_assets WHERE assetId IN (${s})`, o), await Pi(t, `DELETE FROM assets WHERE id IN (${s})`, o), e.json({
8939
8953
  success: !0,
8940
8954
  id: r,
8941
8955
  purged: !0,
@@ -8951,8 +8965,8 @@ Mi.get("/", async (e) => {
8951
8965
  });
8952
8966
  //#endregion
8953
8967
  //#region server/routes/public/node.ts
8954
- var Ii = new e();
8955
- function Li() {
8968
+ var Li = new e();
8969
+ function Ri() {
8956
8970
  return {
8957
8971
  fullPath: /* @__PURE__ */ new Map(),
8958
8972
  treeEdges: /* @__PURE__ */ new Map(),
@@ -8960,10 +8974,10 @@ function Li() {
8960
8974
  assetUrls: /* @__PURE__ */ new Map()
8961
8975
  };
8962
8976
  }
8963
- function Ri(...e) {
8977
+ function zi(...e) {
8964
8978
  return e.map((e) => String(e ?? "")).join(":");
8965
8979
  }
8966
- function zi(e, t) {
8980
+ function Bi(e, t) {
8967
8981
  let n = Date.now();
8968
8982
  if (e && String(e).trim() !== "") {
8969
8983
  let t = Date.parse(e);
@@ -8975,7 +8989,7 @@ function zi(e, t) {
8975
8989
  }
8976
8990
  return !0;
8977
8991
  }
8978
- async function Bi(e, t, n) {
8992
+ async function Vi(e, t, n) {
8979
8993
  let r = t.filter((e) => e.componentId === "content-feed" || e.componentId === "article-list");
8980
8994
  await Promise.all(r.map(async (t) => {
8981
8995
  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];
@@ -8996,7 +9010,7 @@ async function Bi(e, t, n) {
8996
9010
  if (e.dataJson) try {
8997
9011
  t = typeof e.dataJson == "string" ? JSON.parse(e.dataJson) : e.dataJson;
8998
9012
  } catch {}
8999
- return zi(t.startShowingAt, t.stopShowingAt) ? {
9013
+ return Bi(t.startShowingAt, t.stopShowingAt) ? {
9000
9014
  id: e.id,
9001
9015
  title: e.title,
9002
9016
  slug: e.slug,
@@ -9013,7 +9027,7 @@ async function Bi(e, t, n) {
9013
9027
  }
9014
9028
  }));
9015
9029
  }
9016
- async function Vi(e, t, n, r, i = !1, a) {
9030
+ async function Hi(e, t, n, r, i = !1, a) {
9017
9031
  if (!t) return { blocks: [] };
9018
9032
  let o = 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\n UNION ALL\n\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 *\n FROM ancestor_path\n ORDER BY level ASC\n ").all(t, t), s = Array.isArray(o) ? o : o?.results || [];
9019
9033
  if (!s || s.length === 0) return { blocks: [] };
@@ -9069,10 +9083,10 @@ async function Vi(e, t, n, r, i = !1, a) {
9069
9083
  try {
9070
9084
  a = (typeof t.dataJson == "string" ? JSON.parse(t.dataJson) : t.dataJson) || {};
9071
9085
  } catch {}
9072
- let o = a.hidden === !0 || a.hidden === 1 || a.hidden === "1" || a.hidden === "true", s = zi(a.startShowingAt, a.stopShowingAt);
9086
+ let o = a.hidden === !0 || a.hidden === 1 || a.hidden === "1" || a.hidden === "true", s = Bi(a.startShowingAt, a.stopShowingAt);
9073
9087
  if (!i && (o || !s)) return null;
9074
- let c = t.elementType || t.componentId || "text-block", l = r.blocks?.[c]?.fields || r.elements?.[c]?.fields || r.components?.[c]?.fields || {}, u = String(a.blockId || a._instanceId || a.id || t.blockId || t.id), d = Hi(a, l);
9075
- return d = await oi(e, d), d = Ui(d), d.blockId = u, {
9088
+ let c = t.elementType || t.componentId || "text-block", l = r.blocks?.[c]?.fields || r.elements?.[c]?.fields || r.components?.[c]?.fields || {}, u = String(a.blockId || a._instanceId || a.id || t.blockId || t.id), d = Ui(a, l);
9089
+ return d = await oi(e, d), d = Wi(d), d.blockId = u, {
9076
9090
  region: t.region || n,
9077
9091
  block: {
9078
9092
  instanceId: t.id,
@@ -9092,7 +9106,7 @@ async function Vi(e, t, n, r, i = !1, a) {
9092
9106
  }
9093
9107
  return { blocks: [] };
9094
9108
  }
9095
- function Hi(e, t = {}) {
9109
+ function Ui(e, t = {}) {
9096
9110
  let n = {};
9097
9111
  for (let [r, i] of Object.entries(e)) {
9098
9112
  if (r.endsWith("_meta") || r === "disabledRegions" || r === "hidden" || r === "is_hidden" || r === "isHidden" || r === "status" || r === "startShowingAt" || r === "stopShowingAt" || r === "slug" || r === "title" || r === "id" || r.startsWith("_")) continue;
@@ -9101,14 +9115,14 @@ function Hi(e, t = {}) {
9101
9115
  }
9102
9116
  return n;
9103
9117
  }
9104
- function Ui(e) {
9105
- if (Array.isArray(e)) return e.map(Ui);
9118
+ function Wi(e) {
9119
+ if (Array.isArray(e)) return e.map(Wi);
9106
9120
  if (!e || typeof e != "object") return e;
9107
9121
  if (typeof e.id == "string" && e.id.startsWith("ast_") && typeof e.url == "string") {
9108
9122
  let t = e.metadataOverrides || {}, n = e.variants && typeof e.variants == "object" ? e.variants : {}, r = Object.entries(n).find(([, t]) => t?.id === e.id)?.[0], i = r ? {
9109
9123
  ...t,
9110
9124
  ...t.crops?.[r] || {}
9111
- } : t, a = Object.fromEntries(Object.entries(n).filter(([, t]) => t?.id !== e.id).map(([t, n]) => [t, Ui({
9125
+ } : t, a = Object.fromEntries(Object.entries(n).filter(([, t]) => t?.id !== e.id).map(([t, n]) => [t, Wi({
9112
9126
  ...n,
9113
9127
  title: n?.title ?? e.title ?? "",
9114
9128
  alt: n?.alt ?? e.alt ?? "",
@@ -9122,9 +9136,9 @@ function Ui(e) {
9122
9136
  ...Object.keys(a).length > 0 ? { variants: a } : {}
9123
9137
  };
9124
9138
  }
9125
- return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Ui(t)]));
9139
+ return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Wi(t)]));
9126
9140
  }
9127
- async function Wi(e, t, n) {
9141
+ async function Gi(e, t, n) {
9128
9142
  if (typeof t == "string") {
9129
9143
  if (!t.includes("#node:") && !t.includes("data-node-id") && !t.includes("#asset:") && !t.includes("data-asset-id")) return t;
9130
9144
  let r = (e, t) => {
@@ -9150,9 +9164,9 @@ async function Wi(e, t, n) {
9150
9164
  return await Promise.all(Array.from(t.matchAll(h)).map(async (t) => {
9151
9165
  let i = t[1], a = r(i, "data-node-id"), o = r(i, "data-tree-id");
9152
9166
  if (!a || !o) return;
9153
- let s = await Ki(e, a, o, n);
9167
+ let s = await qi(e, a, o, n);
9154
9168
  if (s?.treeNodeId) {
9155
- let t = await Xi(e, String(s.treeNodeId), o, n);
9169
+ let t = await Zi(e, String(s.treeNodeId), o, n);
9156
9170
  m.set(`${a}:${o}`, t);
9157
9171
  }
9158
9172
  })), t.replace(h, (e, t) => {
@@ -9172,39 +9186,39 @@ async function Wi(e, t, n) {
9172
9186
  return /href\s*=\s*["'][^"']*["']/i.test(_) ? _ = _.replace(/href\s*=\s*["'][^"']*["']/i, `href="${g || "/"}"`) : _ += ` href="${g || "/"}"`, `<a ${_}>`;
9173
9187
  });
9174
9188
  }
9175
- if (Array.isArray(t)) return Promise.all(t.map((t) => Wi(e, t, n)));
9189
+ if (Array.isArray(t)) return Promise.all(t.map((t) => Gi(e, t, n)));
9176
9190
  if (t && typeof t == "object") {
9177
9191
  if (typeof t.href == "string" && (t.href.startsWith("#node:") || t.href.startsWith("#asset:"))) return {
9178
9192
  ...t,
9179
- href: await Gi(e, t, n)
9193
+ href: await Ki(e, t, n)
9180
9194
  };
9181
- let r = await Promise.all(Object.entries(t).map(async ([t, r]) => [t, await Wi(e, r, n)]));
9195
+ let r = await Promise.all(Object.entries(t).map(async ([t, r]) => [t, await Gi(e, r, n)]));
9182
9196
  return Object.fromEntries(r);
9183
9197
  }
9184
9198
  return t;
9185
9199
  }
9186
- async function Gi(e, t, n) {
9200
+ async function Ki(e, t, n) {
9187
9201
  let r = t.href.match(/^#node:(.+)$/), i = t.href.match(/^#asset:(.+)$/);
9188
- if (i) return Ji(e, i[1], n);
9202
+ if (i) return Yi(e, i[1], n);
9189
9203
  if (!r) return t.href;
9190
9204
  let a = r[1];
9191
9205
  if (t.treeId) {
9192
- let r = await Ki(e, a, String(t.treeId), n);
9206
+ let r = await qi(e, a, String(t.treeId), n);
9193
9207
  if (r?.treeNodeId) {
9194
- let i = await Xi(e, String(r.treeNodeId), String(t.treeId), n);
9208
+ let i = await Zi(e, String(r.treeNodeId), String(t.treeId), n);
9195
9209
  if (i) return i;
9196
9210
  }
9197
9211
  }
9198
- let o = await qi(e, a, n);
9212
+ let o = await Ji(e, a, n);
9199
9213
  return o === void 0 ? "#" : `/${o}`;
9200
9214
  }
9201
- async function Ki(e, t, n, r) {
9202
- let i = Ri(t, n), a = r.treeEdges.get(i);
9215
+ async function qi(e, t, n, r) {
9216
+ let i = zi(t, n), a = r.treeEdges.get(i);
9203
9217
  if (a) return a;
9204
9218
  let o = e.prepare("\n SELECT id as treeNodeId\n FROM tree_nodes\n WHERE contentId = ?\n AND treeId = ?\n LIMIT 1\n ").get(t, n);
9205
9219
  return r.treeEdges.set(i, Promise.resolve(o)), o;
9206
9220
  }
9207
- async function qi(e, t, n) {
9221
+ async function Ji(e, t, n) {
9208
9222
  let r = String(t), i = n.nodeSlugs.get(r);
9209
9223
  if (i) return i;
9210
9224
  let a = (async () => {
@@ -9213,7 +9227,7 @@ async function qi(e, t, n) {
9213
9227
  })();
9214
9228
  return n.nodeSlugs.set(r, a), a;
9215
9229
  }
9216
- async function Ji(e, t, n) {
9230
+ async function Yi(e, t, n) {
9217
9231
  let r = String(t), i = n.assetUrls.get(r);
9218
9232
  if (i) return i;
9219
9233
  let a = (async () => {
@@ -9222,7 +9236,7 @@ async function Ji(e, t, n) {
9222
9236
  })();
9223
9237
  return n.assetUrls.set(r, a), a;
9224
9238
  }
9225
- function Yi(e) {
9239
+ function Xi(e) {
9226
9240
  let t = e.socialImage;
9227
9241
  if (!t || typeof t != "object") return null;
9228
9242
  let n = (e, t) => {
@@ -9253,9 +9267,9 @@ function Yi(e) {
9253
9267
  ])
9254
9268
  };
9255
9269
  }
9256
- async function Xi(e, t, n, r) {
9270
+ async function Zi(e, t, n, r) {
9257
9271
  if (!t) return "";
9258
- let i = Ri(t, n);
9272
+ let i = zi(t, n);
9259
9273
  if (r) {
9260
9274
  let e = r.fullPath.get(i);
9261
9275
  if (e) return e;
@@ -9270,7 +9284,7 @@ async function Xi(e, t, n, r) {
9270
9284
  })();
9271
9285
  return r && r.fullPath.set(i, a), a;
9272
9286
  }
9273
- async function Zi(e, t, n, r, i) {
9287
+ async function Qi(e, t, n, r, i) {
9274
9288
  let a = {}, o = null;
9275
9289
  if (t) {
9276
9290
  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\n UNION ALL\n\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([
@@ -9308,20 +9322,20 @@ async function Zi(e, t, n, r, i) {
9308
9322
  inheritedFields: a
9309
9323
  };
9310
9324
  }
9311
- function Qi(e) {
9325
+ function $i(e) {
9312
9326
  let t = Number(e?.env?.CMS_NODE_CACHE_TTL);
9313
9327
  return Number.isFinite(t) && t >= 60 ? Math.floor(t) : 300;
9314
9328
  }
9315
- async function $i(e, t, n, r) {
9329
+ async function ea(e, t, n, r) {
9316
9330
  try {
9317
9331
  await e.set(t, n, r);
9318
9332
  } catch (e) {
9319
9333
  console.warn("[CMS Cache] Failed to write node response to cache:", e);
9320
9334
  }
9321
9335
  }
9322
- Ii.get("/*", async (e) => {
9336
+ Li.get("/*", async (e) => {
9323
9337
  try {
9324
- let t = e.get("db"), n = Li(), r = new URL(e.req.url).pathname.match(/\/node\/(.+)$/), i = (r ? r[1] : "home").replace(/^\/+|\/+$/g, ""), a = e.req.query("channelId") || e.req.query("channel") || "1", o = e.req.query("lang") || "en", s = e.req.query("preview") === "true", c = isNaN(Number(a)) ? await t.prepare("SELECT * FROM channels WHERE key = ?").get(a) : await t.prepare("SELECT * FROM channels WHERE id = ?").get(Number(a));
9338
+ let t = e.get("db"), n = Ri(), r = new URL(e.req.url).pathname.match(/\/node\/(.+)$/), i = (r ? r[1] : "home").replace(/^\/+|\/+$/g, ""), a = e.req.query("channelId") || e.req.query("channel") || "1", o = e.req.query("lang") || "en", s = e.req.query("preview") === "true", c = isNaN(Number(a)) ? await t.prepare("SELECT * FROM channels WHERE key = ?").get(a) : await t.prepare("SELECT * FROM channels WHERE id = ?").get(Number(a));
9325
9339
  if (!c) return e.json({ error: `Channel '${a}' not found` }, 404);
9326
9340
  let l = c.status === "disabled" || c.status === "inactive" || c.isEnabled === 0 || c.isEnabled === !1;
9327
9341
  if (!s && l) return e.json({ error: `Channel '${c.key || a}' is currently inactive` }, 404);
@@ -9346,7 +9360,7 @@ Ii.get("/*", async (e) => {
9346
9360
  if (E.length > 0) {
9347
9361
  let e = await Promise.all(E.map(async (e) => ({
9348
9362
  candidate: e,
9349
- calculatedPath: await Xi(t, String(e.treeNodeId), String(e.treeId), n)
9363
+ calculatedPath: await Zi(t, String(e.treeNodeId), String(e.treeId), n)
9350
9364
  }))), r = S.replace(/^\/+|\/+$/g, "");
9351
9365
  for (let { candidate: t, calculatedPath: n } of e) {
9352
9366
  let e = n.replace(/^\/+|\/+$/g, "");
@@ -9370,17 +9384,17 @@ Ii.get("/*", async (e) => {
9370
9384
  LIMIT 1
9371
9385
  `).get(...e);
9372
9386
  }
9373
- let D = v?.treeId || y || "main-nav", O = v?.parentId || null, k = v?.treeNodeId ? await Xi(t, String(v.treeNodeId), String(D), n) : `/${(_.slug || "").replace(/^\/+|\/+$/g, "")}`, A = {
9387
+ let D = v?.treeId || y || "main-nav", ee = v?.parentId || null, O = v?.treeNodeId ? await Zi(t, String(v.treeNodeId), String(D), n) : `/${(_.slug || "").replace(/^\/+|\/+$/g, "")}`, k = {
9374
9388
  id: _.id,
9375
9389
  title: _.title,
9376
9390
  slug: _.slug,
9377
9391
  language: _.language || o || "en",
9378
- path: k === "" ? "/" : k,
9392
+ path: O === "" ? "/" : O,
9379
9393
  nodeType: _.contentType,
9380
9394
  createdAt: _.createdAt,
9381
9395
  updatedAt: _.updatedAt
9382
- }, ee = _.contentType || "node", te = h.nodes?.[ee] || Object.values(h.nodes || {})[0] || {}, j = { ...te.fields || {} };
9383
- te.tabs && Object.values(te.tabs).forEach((e) => {
9396
+ }, te = _.contentType || "node", A = h.nodes?.[te] || Object.values(h.nodes || {})[0] || {}, j = { ...A.fields || {} };
9397
+ A.tabs && Object.values(A.tabs).forEach((e) => {
9384
9398
  Object.assign(j, e.fields || {});
9385
9399
  });
9386
9400
  let ne = {}, re = null, ie = null, ae = !1, M = {}, N = s && _.draftDataJson ? _.draftDataJson : _.dataJson || _.draftDataJson;
@@ -9388,23 +9402,23 @@ Ii.get("/*", async (e) => {
9388
9402
  M = typeof N == "string" ? JSON.parse(N) : N;
9389
9403
  } catch {}
9390
9404
  M.disabledRegions && (ne = M.disabledRegions), ae = M.hidden === !0 || M.hidden === 1 || M.hidden === "1" || M.hidden === "true", re = M.startShowingAt || null, ie = M.stopShowingAt || null;
9391
- let oe = M.layoutId, se = oe && oe !== "inherit", { resolvedLayoutId: ce, inheritedFields: le } = await Zi(t, O, D, s, j), P = se ? oe : ce || te.defaultLayout || null;
9405
+ let oe = M.layoutId, se = oe && oe !== "inherit", { resolvedLayoutId: ce, inheritedFields: le } = await Qi(t, ee, D, s, j), P = se ? oe : ce || A.defaultLayout || null;
9392
9406
  for (let [e, t] of Object.entries(le)) (M[e] === void 0 || M[e] === null || M[e] === "" || M[e] === "inherit") && t !== void 0 && (M[e] = t);
9393
- let F = await oi(t, Hi(M, j));
9394
- F = Ui(F), F = await Wi(t, F, n);
9395
- let ue = Yi(F);
9396
- delete F.socialImage, delete F.fbImage, delete F.xImage, delete F.whatsappImage, ue && (F.socialImages = ue), A.slug = _.slug, A.title = _.title, Object.assign(A, F), A.layoutId = P;
9397
- let de = Number(_.isHidden) === 1 || ae, fe = !zi(re, ie);
9407
+ let F = await oi(t, Ui(M, j));
9408
+ F = Wi(F), F = await Gi(t, F, n);
9409
+ let ue = Xi(F);
9410
+ delete F.socialImage, delete F.fbImage, delete F.xImage, delete F.whatsappImage, ue && (F.socialImages = ue), k.slug = _.slug, k.title = _.title, Object.assign(k, F), k.layoutId = P;
9411
+ let de = Number(_.isHidden) === 1 || ae, fe = !Bi(re, ie);
9398
9412
  if (!s && (de || fe)) return e.json({ error: "Node is hidden or outside its scheduled publishing window" }, 404);
9399
9413
  let pe = [];
9400
9414
  if (v?.treeNodeId) {
9401
- let e = await t.prepare("\n SELECT\n t.id as treeNodeId,\n t.contentId as id,\n c.title,\n c.slug,\n c.language,\n c.contentType as nodeType,\n c.isHidden,\n c.dataJson,\n c.draftDataJson\n FROM tree_nodes t\n INNER JOIN content_nodes c\n ON t.contentId = c.id\n WHERE t.parentId = ?\n AND t.treeId = ?\n ORDER BY t.sortOrder ASC\n ").all(v.treeNodeId, D), n = Array.isArray(e) ? e : e?.results || [], r = A.path === "/" ? "" : A.path;
9415
+ let e = await t.prepare("\n SELECT\n t.id as treeNodeId,\n t.contentId as id,\n c.title,\n c.slug,\n c.language,\n c.contentType as nodeType,\n c.isHidden,\n c.dataJson,\n c.draftDataJson\n FROM tree_nodes t\n INNER JOIN content_nodes c\n ON t.contentId = c.id\n WHERE t.parentId = ?\n AND t.treeId = ?\n ORDER BY t.sortOrder ASC\n ").all(v.treeNodeId, D), n = Array.isArray(e) ? e : e?.results || [], r = k.path === "/" ? "" : k.path;
9402
9416
  pe = n.map((e) => {
9403
9417
  let t = {}, n = s && e.draftDataJson ? e.draftDataJson : e.dataJson;
9404
9418
  try {
9405
9419
  t = (typeof n == "string" ? JSON.parse(n) : n) || {};
9406
9420
  } catch {}
9407
- let i = Number(e.isHidden) === 1 || t.hidden === !0 || t.hidden === 1 || t.hidden === "1", a = zi(t.startShowingAt, t.stopShowingAt), o = (e.slug || "").replace(/^\/+|\/+$/g, "");
9421
+ let i = Number(e.isHidden) === 1 || t.hidden === !0 || t.hidden === 1 || t.hidden === "1", a = Bi(t.startShowingAt, t.stopShowingAt), o = (e.slug || "").replace(/^\/+|\/+$/g, "");
9408
9422
  return !s && (i || !a) ? null : {
9409
9423
  treeNodeId: e.treeNodeId,
9410
9424
  id: e.id,
@@ -9416,18 +9430,18 @@ Ii.get("/*", async (e) => {
9416
9430
  };
9417
9431
  }).filter(Boolean);
9418
9432
  }
9419
- A.children = pe;
9420
- let I = +!!s, L = await t.prepare("\n SELECT *\n FROM content_blocks\n WHERE contentId = ?\n AND isDraft = ?\n ORDER BY sortOrder ASC\n ").all(_.id, I), me = Array.isArray(L) ? L : L?.results || [];
9421
- me.length === 0 && !s && (L = await t.prepare("\n SELECT *\n FROM content_blocks\n WHERE contentId = ?\n ORDER BY sortOrder ASC\n ").all(_.id), me = Array.isArray(L) ? L : L?.results || []);
9422
- let R = {}, z = {}, he = await Promise.all(me.map(async (e) => {
9433
+ k.children = pe;
9434
+ let I = +!!s, me = await t.prepare("\n SELECT *\n FROM content_blocks\n WHERE contentId = ?\n AND isDraft = ?\n ORDER BY sortOrder ASC\n ").all(_.id, I), he = Array.isArray(me) ? me : me?.results || [];
9435
+ he.length === 0 && !s && (me = await t.prepare("\n SELECT *\n FROM content_blocks\n WHERE contentId = ?\n ORDER BY sortOrder ASC\n ").all(_.id), he = Array.isArray(me) ? me : me?.results || []);
9436
+ let L = {}, R = {}, ge = await Promise.all(he.map(async (e) => {
9423
9437
  let r = e.region || "main", i = {};
9424
9438
  try {
9425
9439
  i = (typeof e.dataJson == "string" ? JSON.parse(e.dataJson) : e.dataJson) || {};
9426
9440
  } catch {}
9427
- let a = i.hidden === !0 || i.hidden === 1 || i.hidden === "1" || i.hidden === "true", o = zi(i.startShowingAt, i.stopShowingAt);
9441
+ let a = i.hidden === !0 || i.hidden === 1 || i.hidden === "1" || i.hidden === "true", o = Bi(i.startShowingAt, i.stopShowingAt);
9428
9442
  if (!s && (a || !o)) return null;
9429
- let c = e.elementType || e.componentId || "text-block", l = h.blocks?.[c]?.fields || h.elements?.[c]?.fields || h.components?.[c]?.fields || {}, u = String(i.blockId || i._instanceId || i.id || e.blockId || e.id), d = Hi(i, l);
9430
- return d = await oi(t, d), d = Ui(d), d = await Wi(t, d, n), d.blockId = u, {
9443
+ let c = e.elementType || e.componentId || "text-block", l = h.blocks?.[c]?.fields || h.elements?.[c]?.fields || h.components?.[c]?.fields || {}, u = String(i.blockId || i._instanceId || i.id || e.blockId || e.id), d = Ui(i, l);
9444
+ return d = await oi(t, d), d = Wi(d), d = await Gi(t, d, n), d.blockId = u, {
9431
9445
  region: r,
9432
9446
  block: {
9433
9447
  instanceId: e.id,
@@ -9437,8 +9451,8 @@ Ii.get("/*", async (e) => {
9437
9451
  }
9438
9452
  };
9439
9453
  }));
9440
- for (let e of he) e && (R[e.region] || (R[e.region] = [], z[e.region] = { isInherited: !1 }), R[e.region].push(e.block));
9441
- let ge = {
9454
+ for (let e of ge) e && (L[e.region] || (L[e.region] = [], R[e.region] = { isInherited: !1 }), L[e.region].push(e.block));
9455
+ let _e = {
9442
9456
  header: {
9443
9457
  label: "Header",
9444
9458
  inherit: "parent"
@@ -9449,31 +9463,31 @@ Ii.get("/*", async (e) => {
9449
9463
  },
9450
9464
  ...(P ? h.nodeLayouts?.[P] || h.layouts?.[P] : null)?.regions || { main: { label: "Content" } }
9451
9465
  };
9452
- for (let [e, r] of Object.entries(ge)) {
9453
- let i = R[e] && R[e].length > 0, a = !!ne[e];
9454
- if (R[e] || (R[e] = [], z[e] = { isInherited: !1 }), (r?.inherit === "parent" || r?.inherit === !0 || r?.inherit === "true" || e === "header" || e === "footer") && !i && !a && O) {
9455
- let r = await Vi(t, O, e, h, s, n);
9456
- if (r.blocks.length > 0 && (R[e] = r.blocks, z[e] = {
9466
+ for (let [e, r] of Object.entries(_e)) {
9467
+ let i = L[e] && L[e].length > 0, a = !!ne[e];
9468
+ if (L[e] || (L[e] = [], R[e] = { isInherited: !1 }), (r?.inherit === "parent" || r?.inherit === !0 || r?.inherit === "true" || e === "header" || e === "footer") && !i && !a && ee) {
9469
+ let r = await Hi(t, ee, e, h, s, n);
9470
+ if (r.blocks.length > 0 && (L[e] = r.blocks, R[e] = {
9457
9471
  isInherited: !0,
9458
9472
  inheritedFromId: r.inheritedFromId,
9459
9473
  inheritedFromTitle: r.inheritedFromTitle
9460
- }, r.subRegions)) for (let [t, n] of Object.entries(r.subRegions)) t !== e && (R[t] = n, z[t] = {
9474
+ }, r.subRegions)) for (let [t, n] of Object.entries(r.subRegions)) t !== e && (L[t] = n, R[t] = {
9461
9475
  isInherited: !0,
9462
9476
  inheritedFromId: r.inheritedFromId,
9463
9477
  inheritedFromTitle: r.inheritedFromTitle
9464
9478
  });
9465
9479
  }
9466
9480
  }
9467
- await Promise.all(Object.keys(R).map((e) => Bi(t, R[e], u)));
9468
- let _e = {
9481
+ await Promise.all(Object.keys(L).map((e) => Vi(t, L[e], u)));
9482
+ let ve = {
9469
9483
  channelId: u || d,
9470
9484
  treeId: D,
9471
- language: A.language,
9472
- node: A,
9473
- content: R,
9474
- regionMeta: z
9485
+ language: k.language,
9486
+ node: k,
9487
+ content: L,
9488
+ regionMeta: R
9475
9489
  };
9476
- return !s && !m && (e.header("X-Cache", "MISS"), await $i(f, p, _e, Qi(e))), e.json(_e);
9490
+ return !s && !m && (e.header("X-Cache", "MISS"), await ea(f, p, ve, $i(e))), e.json(ve);
9477
9491
  } catch (t) {
9478
9492
  console.error("[CMS Public API] Error fetching node by path:", t);
9479
9493
  let n = e.env?.ENVIRONMENT === "development";
@@ -9485,8 +9499,8 @@ Ii.get("/*", async (e) => {
9485
9499
  });
9486
9500
  //#endregion
9487
9501
  //#region server/routes/public/tree.ts
9488
- var ea = new e();
9489
- function ta(e, t) {
9502
+ var ta = new e();
9503
+ function na(e, t) {
9490
9504
  let n = /* @__PURE__ */ new Date();
9491
9505
  if (e && String(e).trim() !== "") {
9492
9506
  let t = new Date(e);
@@ -9498,14 +9512,14 @@ function ta(e, t) {
9498
9512
  }
9499
9513
  return !0;
9500
9514
  }
9501
- async function na(e, t, n, r) {
9515
+ async function ra(e, t, n, r) {
9502
9516
  try {
9503
9517
  await e.set(t, n, r);
9504
9518
  } catch (e) {
9505
9519
  console.warn("[CMS Cache] Failed to write tree response to cache:", e);
9506
9520
  }
9507
9521
  }
9508
- ea.get("/:treeParam", async (e) => {
9522
+ ta.get("/:treeParam", async (e) => {
9509
9523
  try {
9510
9524
  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";
9511
9525
  if (r && r !== "default" && r !== "all") {
@@ -9559,7 +9573,7 @@ ea.get("/:treeParam", async (e) => {
9559
9573
  return (p.get(n) || []).map((e) => {
9560
9574
  let n = m.get(String(e.treeNodeId)) || {}, r = {};
9561
9575
  for (let [e, t] of Object.entries(n)) e !== "_isTreeDraft" && e !== "_draftParentId" && e !== "isNew" && e !== "hidden" && e !== "is_hidden" && e !== "isHidden" && e !== "status" && (r[e] = t);
9562
- let a = !i && (e.status === "draft" || e.status === "new"), o = Number(e.isHidden) === 1 || a || n.hidden === !0 || n.hidden === 1 || n.hidden === "1" || n.hidden === "true", s = ta(n.startShowingAt, n.stopShowingAt), c = (e.slug || "").replace(/^\/+|\/+$/g, ""), l = (!e.parentId || e.parentId === "null" || e.parentId === "") && (c === "home" || c === "homee") ? "/" : `${t}/${c}`.replace(/\/+/g, "/"), u = {
9576
+ let a = !i && (e.status === "draft" || e.status === "new"), o = Number(e.isHidden) === 1 || a || n.hidden === !0 || n.hidden === 1 || n.hidden === "1" || n.hidden === "true", s = na(n.startShowingAt, n.stopShowingAt), c = (e.slug || "").replace(/^\/+|\/+$/g, ""), l = (!e.parentId || e.parentId === "null" || e.parentId === "") && (c === "home" || c === "homee") ? "/" : `${t}/${c}`.replace(/\/+/g, "/"), u = {
9563
9577
  id: e.id,
9564
9578
  treeNodeId: e.treeNodeId,
9565
9579
  parentId: e.parentId || null,
@@ -9584,7 +9598,7 @@ ea.get("/:treeParam", async (e) => {
9584
9598
  ...d,
9585
9599
  items: h(null)
9586
9600
  };
9587
- return !i && !s && (e.header("X-Cache", "MISS"), await na(a, o, g, 300)), e.json(g);
9601
+ return !i && !s && (e.header("X-Cache", "MISS"), await ra(a, o, g, 300)), e.json(g);
9588
9602
  } catch (t) {
9589
9603
  return console.error("[CMS Public Tree API] Error:", t), e.json({
9590
9604
  error: "Failed to fetch public tree",
@@ -9594,8 +9608,8 @@ ea.get("/:treeParam", async (e) => {
9594
9608
  });
9595
9609
  //#endregion
9596
9610
  //#region server/routes/public/assets.ts
9597
- var ra = new e();
9598
- function ia(e, t) {
9611
+ var ia = new e();
9612
+ function aa(e, t) {
9599
9613
  if (t === "webp") return "image/webp";
9600
9614
  if (t === "avif") return "image/avif";
9601
9615
  if (t === "jpeg" || t === "jpg") return "image/jpeg";
@@ -9603,7 +9617,7 @@ function ia(e, t) {
9603
9617
  let n = e.toLowerCase();
9604
9618
  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";
9605
9619
  }
9606
- ra.get("/*", async (e) => {
9620
+ ia.get("/*", async (e) => {
9607
9621
  let t = e.req.path.replace(/^\/media\//, "").replace(/^\//, "");
9608
9622
  if (!t) return e.text("Asset key missing", 400);
9609
9623
  let n = e.env?.MEDIA_BUCKET, { w: r, h: i, q: a, f: o } = e.req.query(), s = !!(r || i || a || o), c = e.req.header("Accept") || "", l = "";
@@ -9626,7 +9640,7 @@ ra.get("/*", async (e) => {
9626
9640
  c = await n.get(e);
9627
9641
  }
9628
9642
  if (!c) return e.text(`Asset not found: ${t}`, 404);
9629
- let d = c.httpMetadata?.contentType || ia(t), m = d.startsWith("image/") && !d.includes("svg"), g = !1;
9643
+ let d = c.httpMetadata?.contentType || aa(t), m = d.startsWith("image/") && !d.includes("svg"), g = !1;
9630
9644
  if (s && m && e.env?.IMAGES) {
9631
9645
  g = !0;
9632
9646
  try {
@@ -9689,7 +9703,7 @@ ra.get("/*", async (e) => {
9689
9703
  if (!s) {
9690
9704
  let n = _(C);
9691
9705
  return e.body(n, 200, {
9692
- "Content-Type": ia(t),
9706
+ "Content-Type": aa(t),
9693
9707
  "Cache-Control": "public, max-age=86400"
9694
9708
  });
9695
9709
  }
@@ -9697,7 +9711,7 @@ ra.get("/*", async (e) => {
9697
9711
  if (g(f)) {
9698
9712
  let n = _(f);
9699
9713
  return e.body(n, 200, {
9700
- "Content-Type": ia(t, u),
9714
+ "Content-Type": aa(t, u),
9701
9715
  "Cache-Control": "public, max-age=31536000, immutable",
9702
9716
  "X-Local-Cache": "HIT"
9703
9717
  });
@@ -9710,14 +9724,14 @@ ra.get("/*", async (e) => {
9710
9724
  typeof n == "number" && (a.width = n), typeof o == "number" && (a.height = o), (a.width || a.height) && (a.fit = "cover", i = i.resize(a)), u === "webp" ? i = i.webp({ quality: typeof c == "number" ? c : 80 }) : u === "avif" ? i = i.avif({ quality: typeof c == "number" ? c : 70 }) : u === "jpeg" || u === "jpg" ? i = i.jpeg({ quality: typeof c == "number" ? c : 80 }) : u === "png" && (i = i.png({ quality: typeof c == "number" ? c : 80 }));
9711
9725
  let s = await i.toBuffer();
9712
9726
  return v(x(f), { recursive: !0 }), y(f, s), e.body(s, 200, {
9713
- "Content-Type": ia(t, u),
9727
+ "Content-Type": aa(t, u),
9714
9728
  "Cache-Control": "public, max-age=31536000, immutable",
9715
9729
  "X-Local-Cache": "MISS"
9716
9730
  });
9717
9731
  } catch {
9718
9732
  let n = _(C);
9719
9733
  return e.body(n, 200, {
9720
- "Content-Type": ia(t),
9734
+ "Content-Type": aa(t),
9721
9735
  "Cache-Control": "public, max-age=86400"
9722
9736
  });
9723
9737
  }
@@ -9728,8 +9742,8 @@ ra.get("/*", async (e) => {
9728
9742
  });
9729
9743
  //#endregion
9730
9744
  //#region server/routes/public/paths.ts
9731
- var aa = new e();
9732
- function oa(e, t) {
9745
+ var oa = new e();
9746
+ function sa(e, t) {
9733
9747
  let n = /* @__PURE__ */ new Date();
9734
9748
  if (e && String(e).trim() !== "") {
9735
9749
  let t = new Date(e);
@@ -9741,7 +9755,7 @@ function oa(e, t) {
9741
9755
  }
9742
9756
  return !0;
9743
9757
  }
9744
- aa.get("/", async (e) => {
9758
+ oa.get("/", async (e) => {
9745
9759
  try {
9746
9760
  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 ORDER BY t.sortOrder ASC\n ").all(), n = Array.isArray(t) ? t : t?.results || [], r = [], i = /* @__PURE__ */ new Map();
9747
9761
  for (let e of n) {
@@ -9765,7 +9779,7 @@ aa.get("/", async (e) => {
9765
9779
  function o(e = null, t = "") {
9766
9780
  let n = e == null || e === "" || e === "null" ? "__ROOT__" : String(e), s = i.get(n) || [];
9767
9781
  for (let e of s) {
9768
- let n = a.get(String(e.treeNodeId)) || {}, i = e.status === "published" || e.status === "active", s = oa(n.startShowingAt, n.stopShowingAt);
9782
+ let n = a.get(String(e.treeNodeId)) || {}, i = e.status === "published" || e.status === "active", s = sa(n.startShowingAt, n.stopShowingAt);
9769
9783
  if (!i || !s) continue;
9770
9784
  let c = (e.slug || "").replace(/^\/+|\/+$/g, ""), l = c === "home" || c === "homee" ? "/" : `${t}/${c}`.replace(/\/+/g, "/");
9771
9785
  e.nodeType !== "external-link" && r.push(l);
@@ -9782,7 +9796,7 @@ aa.get("/", async (e) => {
9782
9796
  });
9783
9797
  //#endregion
9784
9798
  //#region server/index.ts
9785
- var $ = new e(), sa = !1;
9799
+ var $ = new e(), ca = !1;
9786
9800
  $.use("*", o()), $.use("/media/*", o({
9787
9801
  origin: "*",
9788
9802
  allowMethods: [
@@ -9803,13 +9817,13 @@ $.use("*", o()), $.use("/media/*", o({
9803
9817
  let n = new URL(e.req.url), r = (e.req.header("host") || n.hostname).split(":")[0];
9804
9818
  e.set("currentDomain", r);
9805
9819
  let i = u(e);
9806
- if (e.set("db", i), !sa) try {
9807
- await Mr(i), sa = !0;
9820
+ if (e.set("db", i), !ca) try {
9821
+ await Mr(i), ca = !0;
9808
9822
  } catch (e) {
9809
9823
  console.error("❌ [CMS Server] Failed to initialize system tables on cold start:", e);
9810
9824
  }
9811
9825
  await t();
9812
- }), $.route("/media", ra), $.use("/media/*", Fr()), $.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", ji), $.route("/api/cms/stats.json", ji), $.route("/api/cms", bi), $.route("/api/cms/channels", wi), $.route("/api/cms/channels.json", wi), $.route("/api/cms/schemas", Ti), $.route("/api/cms/schemas.json", Ti), $.route("/api/cms", Oi), $.route("/api/admin/assets", Mi), $.route("/api/v1/node", Ii), $.route("/api/v1/page", Ii), $.route("/api/v1/tree", ea), $.route("/api/v1/all-paths", aa), $.get("*", async (e) => {
9826
+ }), $.route("/media", ia), $.use("/media/*", Fr()), $.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", Mi), $.route("/api/cms/stats.json", Mi), $.route("/api/cms", xi), $.route("/api/cms/channels", Ti), $.route("/api/cms/channels.json", Ti), $.route("/api/cms/schemas", Ei), $.route("/api/cms/schemas.json", Ei), $.route("/api/cms", ki), $.route("/api/admin/assets", Ni), $.route("/api/v1/node", Li), $.route("/api/v1/page", Li), $.route("/api/v1/tree", ta), $.route("/api/v1/all-paths", oa), $.get("*", async (e) => {
9813
9827
  if (e.env?.ASSETS) {
9814
9828
  let t = await e.env.ASSETS.fetch(e.req.raw);
9815
9829
  if (t.status === 404) {