@wp-playground/blueprints 0.6.7 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1734,16 +1734,16 @@ const SupportedPHPVersions = [
1734
1734
  ], SupportedPHPExtensionBundles = {
1735
1735
  "kitchen-sink": SupportedPHPExtensionsList
1736
1736
  };
1737
- var De, Ge;
1737
+ var Ae, Ge;
1738
1738
  class PHPBrowser {
1739
1739
  /**
1740
1740
  * @param server - The PHP server to browse.
1741
1741
  * @param config - The browser configuration.
1742
1742
  */
1743
1743
  constructor(t, r = {}) {
1744
- Q(this, De, void 0);
1744
+ Q(this, Ae, void 0);
1745
1745
  Q(this, Ge, void 0);
1746
- this.requestHandler = t, te(this, De, {}), te(this, Ge, {
1746
+ this.requestHandler = t, te(this, Ae, {}), te(this, Ge, {
1747
1747
  handleRedirects: !1,
1748
1748
  maxRedirects: 4,
1749
1749
  ...r
@@ -1809,19 +1809,19 @@ class PHPBrowser {
1809
1809
  if (!r.includes("="))
1810
1810
  continue;
1811
1811
  const n = r.indexOf("="), s = r.substring(0, n), i = r.substring(n + 1).split(";")[0];
1812
- H(this, De)[s] = i;
1812
+ H(this, Ae)[s] = i;
1813
1813
  } catch (n) {
1814
1814
  console.error(n);
1815
1815
  }
1816
1816
  }
1817
1817
  serializeCookies() {
1818
1818
  const t = [];
1819
- for (const r in H(this, De))
1820
- t.push(`${r}=${H(this, De)[r]}`);
1819
+ for (const r in H(this, Ae))
1820
+ t.push(`${r}=${H(this, Ae)[r]}`);
1821
1821
  return t.join("; ");
1822
1822
  }
1823
1823
  }
1824
- De = new WeakMap(), Ge = new WeakMap();
1824
+ Ae = new WeakMap(), Ge = new WeakMap();
1825
1825
  const DEFAULT_BASE_URL = "http://example.com";
1826
1826
  function toRelativeUrl(e) {
1827
1827
  return e.toString().substring(e.origin.length);
@@ -1860,7 +1860,7 @@ function fileToUint8Array(e) {
1860
1860
  }, r.readAsArrayBuffer(e);
1861
1861
  });
1862
1862
  }
1863
- var Pe, Ke, dt, Ae, Je, ve, Qe, Fe, mt, xt, _t, Wt, $t, Bt;
1863
+ var Pe, Ke, dt, De, Je, ve, Qe, Fe, mt, xt, _t, Wt, $t, Bt;
1864
1864
  class PHPRequestHandler {
1865
1865
  /**
1866
1866
  * @param php - The PHP instance.
@@ -1895,7 +1895,7 @@ class PHPRequestHandler {
1895
1895
  Q(this, Pe, void 0);
1896
1896
  Q(this, Ke, void 0);
1897
1897
  Q(this, dt, void 0);
1898
- Q(this, Ae, void 0);
1898
+ Q(this, De, void 0);
1899
1899
  Q(this, Je, void 0);
1900
1900
  Q(this, ve, void 0);
1901
1901
  Q(this, Qe, void 0);
@@ -1903,20 +1903,21 @@ class PHPRequestHandler {
1903
1903
  te(this, Fe, new Semaphore({ concurrency: 1 }));
1904
1904
  const {
1905
1905
  documentRoot: n = "/www/",
1906
- absoluteUrl: s = typeof location == "object" ? location == null ? void 0 : location.href : ""
1906
+ absoluteUrl: s = typeof location == "object" ? location == null ? void 0 : location.href : "",
1907
+ rewriteRules: i = []
1907
1908
  } = r;
1908
1909
  this.php = t, te(this, Pe, n);
1909
- const i = new URL(s);
1910
- te(this, dt, i.hostname), te(this, Ae, i.port ? Number(i.port) : i.protocol === "https:" ? 443 : 80), te(this, Ke, (i.protocol || "").replace(":", ""));
1911
- const o = H(this, Ae) !== 443 && H(this, Ae) !== 80;
1910
+ const o = new URL(s);
1911
+ te(this, dt, o.hostname), te(this, De, o.port ? Number(o.port) : o.protocol === "https:" ? 443 : 80), te(this, Ke, (o.protocol || "").replace(":", ""));
1912
+ const l = H(this, De) !== 443 && H(this, De) !== 80;
1912
1913
  te(this, Je, [
1913
1914
  H(this, dt),
1914
- o ? `:${H(this, Ae)}` : ""
1915
- ].join("")), te(this, ve, i.pathname.replace(/\/+$/, "")), te(this, Qe, [
1915
+ l ? `:${H(this, De)}` : ""
1916
+ ].join("")), te(this, ve, o.pathname.replace(/\/+$/, "")), te(this, Qe, [
1916
1917
  `${H(this, Ke)}://`,
1917
1918
  H(this, Je),
1918
1919
  H(this, ve)
1919
- ].join(""));
1920
+ ].join("")), this.rewriteRules = i;
1920
1921
  }
1921
1922
  /** @inheritDoc */
1922
1923
  pathToInternalUrl(t) {
@@ -1943,14 +1944,14 @@ class PHPRequestHandler {
1943
1944
  const r = t.url.startsWith("http://") || t.url.startsWith("https://"), n = new URL(
1944
1945
  t.url,
1945
1946
  r ? void 0 : DEFAULT_BASE_URL
1946
- ), s = removePathPrefix(
1947
- n.pathname,
1948
- H(this, ve)
1947
+ ), s = applyRewriteRules(
1948
+ removePathPrefix(n.pathname, H(this, ve)),
1949
+ this.rewriteRules
1949
1950
  ), i = `${H(this, Pe)}${s}`;
1950
1951
  return seemsLikeAPHPRequestHandlerPath(i) ? await ce(this, _t, Wt).call(this, t, n) : ce(this, mt, xt).call(this, i);
1951
1952
  }
1952
1953
  }
1953
- Pe = new WeakMap(), Ke = new WeakMap(), dt = new WeakMap(), Ae = new WeakMap(), Je = new WeakMap(), ve = new WeakMap(), Qe = new WeakMap(), Fe = new WeakMap(), mt = new WeakSet(), xt = function(t) {
1954
+ Pe = new WeakMap(), Ke = new WeakMap(), dt = new WeakMap(), De = new WeakMap(), Je = new WeakMap(), ve = new WeakMap(), Qe = new WeakMap(), Fe = new WeakMap(), mt = new WeakSet(), xt = function(t) {
1954
1955
  if (!this.php.fileExists(t))
1955
1956
  return new PHPResponse(
1956
1957
  404,
@@ -1976,7 +1977,7 @@ Pe = new WeakMap(), Ke = new WeakMap(), dt = new WeakMap(), Ae = new WeakMap(),
1976
1977
  r
1977
1978
  );
1978
1979
  }, _t = new WeakSet(), Wt = async function(t, r) {
1979
- var s, i;
1980
+ var s;
1980
1981
  if (H(this, Fe).running > 0 && ((s = t.headers) == null ? void 0 : s["x-request-issuer"]) === "php")
1981
1982
  return console.warn(
1982
1983
  "Possible deadlock: Called request() before the previous request() have finished. PHP likely issued an HTTP call to itself. Normally this would lead to infinite waiting as Request 1 holds the lock that the Request 2 is waiting to acquire. That's not useful, so PHPRequestHandler will return error 502 instead."
@@ -1991,28 +1992,20 @@ Pe = new WeakMap(), Ke = new WeakMap(), dt = new WeakMap(), Ae = new WeakMap(),
1991
1992
  "HTTPS",
1992
1993
  H(this, Qe).startsWith("https://") ? "on" : ""
1993
1994
  );
1994
- let o = "GET";
1995
- const l = {
1995
+ let i = "GET";
1996
+ const o = {
1996
1997
  host: H(this, Je),
1997
1998
  ...normalizeHeaders(t.headers || {})
1998
1999
  };
1999
- let d = t.body;
2000
- if (typeof d == "object" && !(d instanceof Uint8Array)) {
2001
- o = "POST";
2002
- const { bytes: p, contentType: $ } = await encodeAsMultipart(d);
2003
- d = p, l["content-type"] = $;
2000
+ let l = t.body;
2001
+ if (typeof l == "object" && !(l instanceof Uint8Array)) {
2002
+ i = "POST";
2003
+ const { bytes: u, contentType: p } = await encodeAsMultipart(l);
2004
+ l = u, o["content-type"] = p;
2004
2005
  }
2005
- let u;
2006
+ let d;
2006
2007
  try {
2007
- let p = r.pathname;
2008
- if ((i = t.headers) != null && i["x-rewrite-url"])
2009
- try {
2010
- p = new URL(
2011
- t.headers["x-rewrite-url"]
2012
- ).pathname;
2013
- } catch {
2014
- }
2015
- u = ce(this, $t, Bt).call(this, p);
2008
+ d = ce(this, $t, Bt).call(this, r.pathname);
2016
2009
  } catch {
2017
2010
  return new PHPResponse(
2018
2011
  404,
@@ -2026,17 +2019,17 @@ Pe = new WeakMap(), Ke = new WeakMap(), dt = new WeakMap(), Ae = new WeakMap(),
2026
2019
  H(this, ve)
2027
2020
  ),
2028
2021
  protocol: H(this, Ke),
2029
- method: t.method || o,
2030
- body: d,
2031
- scriptPath: u,
2032
- headers: l
2022
+ method: t.method || i,
2023
+ body: l,
2024
+ scriptPath: d,
2025
+ headers: o
2033
2026
  });
2034
2027
  } finally {
2035
2028
  n();
2036
2029
  }
2037
2030
  }, $t = new WeakSet(), Bt = function(t) {
2038
2031
  let r = removePathPrefix(t, H(this, ve));
2039
- r.includes(".php") ? r = r.split(".php")[0] + ".php" : this.php.isDir(`${H(this, Pe)}${r}`) ? (r.endsWith("/") || (r = `${r}/`), r = `${r}index.php`) : r = "/index.php";
2032
+ r = applyRewriteRules(r, this.rewriteRules), r.includes(".php") ? r = r.split(".php")[0] + ".php" : this.php.isDir(`${H(this, Pe)}${r}`) ? (r.endsWith("/") || (r = `${r}/`), r = `${r}index.php`) : r = "/index.php";
2040
2033
  const n = `${H(this, Pe)}${r}`;
2041
2034
  if (this.php.fileExists(n))
2042
2035
  return n;
@@ -2091,6 +2084,12 @@ function seemsLikeAPHPFile(e) {
2091
2084
  function seemsLikeADirectoryRoot(e) {
2092
2085
  return !e.split("/").pop().includes(".");
2093
2086
  }
2087
+ function applyRewriteRules(e, t) {
2088
+ for (const r of t)
2089
+ if (new RegExp(r.match).test(e))
2090
+ return e.replace(r.match, r.replacement);
2091
+ return e;
2092
+ }
2094
2093
  const FileErrorCodes = {
2095
2094
  0: "No error occurred. System call completed successfully.",
2096
2095
  1: "Argument list too long.",
@@ -2366,6 +2365,11 @@ class BasePHP {
2366
2365
  throw d.output = l, console.error(d), d;
2367
2366
  }
2368
2367
  return o;
2368
+ } catch (n) {
2369
+ throw this.dispatchEvent({
2370
+ type: "request.error",
2371
+ error: n
2372
+ }), n;
2369
2373
  } finally {
2370
2374
  try {
2371
2375
  r && this[__private__dont__use].free(r);
@@ -3453,7 +3457,7 @@ var scope = {};
3453
3457
  return ue(a, this.to);
3454
3458
  }
3455
3459
  }
3456
- class A extends T {
3460
+ class D extends T {
3457
3461
  constructor(a, h, C, M) {
3458
3462
  super(), this.loop = a, this.varKind = h, this.name = C, this.iterable = M;
3459
3463
  }
@@ -3483,7 +3487,7 @@ var scope = {};
3483
3487
  }
3484
3488
  }
3485
3489
  k.kind = "return";
3486
- class D extends R {
3490
+ class A extends R {
3487
3491
  render(a) {
3488
3492
  let h = "try" + super.render(a);
3489
3493
  return this.catch && (h += this.catch.render(a)), this.finally && (h += this.finally.render(a)), h;
@@ -3626,7 +3630,7 @@ var scope = {};
3626
3630
  this.var(q, (0, t._)`${W}[${G}]`), C(q);
3627
3631
  });
3628
3632
  }
3629
- return this._for(new A("of", M, q, h), () => C(q));
3633
+ return this._for(new D("of", M, q, h), () => C(q));
3630
3634
  }
3631
3635
  // `for-in` statement.
3632
3636
  // With option `ownProperties` replaced with a `for-of` loop for object keys
@@ -3634,7 +3638,7 @@ var scope = {};
3634
3638
  if (this.opts.ownProperties)
3635
3639
  return this.forOf(a, (0, t._)`Object.keys(${h})`, C);
3636
3640
  const q = this._scope.toName(a);
3637
- return this._for(new A("in", M, q, h), () => C(q));
3641
+ return this._for(new D("in", M, q, h), () => C(q));
3638
3642
  }
3639
3643
  // end `for` loop
3640
3644
  endFor() {
@@ -3659,7 +3663,7 @@ var scope = {};
3659
3663
  try(a, h, C) {
3660
3664
  if (!h && !C)
3661
3665
  throw new Error('CodeGen: "try" without "catch" and "finally"');
3662
- const M = new D();
3666
+ const M = new A();
3663
3667
  if (this._blockNode(M), this.code(a), h) {
3664
3668
  const q = this.name("e");
3665
3669
  this._currNode = M.catch = new V(q), h(q);
@@ -3780,8 +3784,8 @@ var util = {};
3780
3784
  const t = codegen, r = code$1;
3781
3785
  function n(w) {
3782
3786
  const k = {};
3783
- for (const D of w)
3784
- k[D] = !0;
3787
+ for (const A of w)
3788
+ k[A] = !0;
3785
3789
  return k;
3786
3790
  }
3787
3791
  e.toHash = n;
@@ -3790,19 +3794,19 @@ var util = {};
3790
3794
  }
3791
3795
  e.alwaysValidSchema = s;
3792
3796
  function i(w, k = w.schema) {
3793
- const { opts: D, self: V } = w;
3794
- if (!D.strictSchema || typeof k == "boolean")
3797
+ const { opts: A, self: V } = w;
3798
+ if (!A.strictSchema || typeof k == "boolean")
3795
3799
  return;
3796
3800
  const x = V.RULES.keywords;
3797
3801
  for (const re in k)
3798
- x[re] || A(w, `unknown keyword: "${re}"`);
3802
+ x[re] || D(w, `unknown keyword: "${re}"`);
3799
3803
  }
3800
3804
  e.checkUnknownRules = i;
3801
3805
  function o(w, k) {
3802
3806
  if (typeof w == "boolean")
3803
3807
  return !w;
3804
- for (const D in w)
3805
- if (k[D])
3808
+ for (const A in w)
3809
+ if (k[A])
3806
3810
  return !0;
3807
3811
  return !1;
3808
3812
  }
@@ -3810,18 +3814,18 @@ var util = {};
3810
3814
  function l(w, k) {
3811
3815
  if (typeof w == "boolean")
3812
3816
  return !w;
3813
- for (const D in w)
3814
- if (D !== "$ref" && k.all[D])
3817
+ for (const A in w)
3818
+ if (A !== "$ref" && k.all[A])
3815
3819
  return !0;
3816
3820
  return !1;
3817
3821
  }
3818
3822
  e.schemaHasRulesButRef = l;
3819
- function d({ topSchemaRef: w, schemaPath: k }, D, V, x) {
3823
+ function d({ topSchemaRef: w, schemaPath: k }, A, V, x) {
3820
3824
  if (!x) {
3821
- if (typeof D == "number" || typeof D == "boolean")
3822
- return D;
3823
- if (typeof D == "string")
3824
- return (0, t._)`${D}`;
3825
+ if (typeof A == "number" || typeof A == "boolean")
3826
+ return A;
3827
+ if (typeof A == "string")
3828
+ return (0, t._)`${A}`;
3825
3829
  }
3826
3830
  return (0, t._)`${w}${k}${(0, t.getProperty)(V)}`;
3827
3831
  }
@@ -3844,32 +3848,32 @@ var util = {};
3844
3848
  e.unescapeJsonPointer = O;
3845
3849
  function N(w, k) {
3846
3850
  if (Array.isArray(w))
3847
- for (const D of w)
3848
- k(D);
3851
+ for (const A of w)
3852
+ k(A);
3849
3853
  else
3850
3854
  k(w);
3851
3855
  }
3852
3856
  e.eachItem = N;
3853
- function R({ mergeNames: w, mergeToName: k, mergeValues: D, resultToName: V }) {
3857
+ function R({ mergeNames: w, mergeToName: k, mergeValues: A, resultToName: V }) {
3854
3858
  return (x, re, K, ue) => {
3855
- const oe = K === void 0 ? re : K instanceof t.Name ? (re instanceof t.Name ? w(x, re, K) : k(x, re, K), K) : re instanceof t.Name ? (k(x, K, re), re) : D(re, K);
3859
+ const oe = K === void 0 ? re : K instanceof t.Name ? (re instanceof t.Name ? w(x, re, K) : k(x, re, K), K) : re instanceof t.Name ? (k(x, K, re), re) : A(re, K);
3856
3860
  return ue === t.Name && !(oe instanceof t.Name) ? V(x, oe) : oe;
3857
3861
  };
3858
3862
  }
3859
3863
  e.mergeEvaluated = {
3860
3864
  props: R({
3861
- mergeNames: (w, k, D) => w.if((0, t._)`${D} !== true && ${k} !== undefined`, () => {
3862
- w.if((0, t._)`${k} === true`, () => w.assign(D, !0), () => w.assign(D, (0, t._)`${D} || {}`).code((0, t._)`Object.assign(${D}, ${k})`));
3865
+ mergeNames: (w, k, A) => w.if((0, t._)`${A} !== true && ${k} !== undefined`, () => {
3866
+ w.if((0, t._)`${k} === true`, () => w.assign(A, !0), () => w.assign(A, (0, t._)`${A} || {}`).code((0, t._)`Object.assign(${A}, ${k})`));
3863
3867
  }),
3864
- mergeToName: (w, k, D) => w.if((0, t._)`${D} !== true`, () => {
3865
- k === !0 ? w.assign(D, !0) : (w.assign(D, (0, t._)`${D} || {}`), g(w, D, k));
3868
+ mergeToName: (w, k, A) => w.if((0, t._)`${A} !== true`, () => {
3869
+ k === !0 ? w.assign(A, !0) : (w.assign(A, (0, t._)`${A} || {}`), g(w, A, k));
3866
3870
  }),
3867
3871
  mergeValues: (w, k) => w === !0 ? !0 : { ...w, ...k },
3868
3872
  resultToName: v
3869
3873
  }),
3870
3874
  items: R({
3871
- mergeNames: (w, k, D) => w.if((0, t._)`${D} !== true && ${k} !== undefined`, () => w.assign(D, (0, t._)`${k} === true ? true : ${D} > ${k} ? ${D} : ${k}`)),
3872
- mergeToName: (w, k, D) => w.if((0, t._)`${D} !== true`, () => w.assign(D, k === !0 ? !0 : (0, t._)`${D} > ${k} ? ${D} : ${k}`)),
3875
+ mergeNames: (w, k, A) => w.if((0, t._)`${A} !== true && ${k} !== undefined`, () => w.assign(A, (0, t._)`${k} === true ? true : ${A} > ${k} ? ${A} : ${k}`)),
3876
+ mergeToName: (w, k, A) => w.if((0, t._)`${A} !== true`, () => w.assign(A, k === !0 ? !0 : (0, t._)`${A} > ${k} ? ${A} : ${k}`)),
3873
3877
  mergeValues: (w, k) => w === !0 ? !0 : Math.max(w, k),
3874
3878
  resultToName: (w, k) => w.var("items", k)
3875
3879
  })
@@ -3877,12 +3881,12 @@ var util = {};
3877
3881
  function v(w, k) {
3878
3882
  if (k === !0)
3879
3883
  return w.var("props", !0);
3880
- const D = w.var("props", (0, t._)`{}`);
3881
- return k !== void 0 && g(w, D, k), D;
3884
+ const A = w.var("props", (0, t._)`{}`);
3885
+ return k !== void 0 && g(w, A, k), A;
3882
3886
  }
3883
3887
  e.evaluatedPropsToName = v;
3884
- function g(w, k, D) {
3885
- Object.keys(D).forEach((V) => w.assign((0, t._)`${k}${(0, t.getProperty)(V)}`, !0));
3888
+ function g(w, k, A) {
3889
+ Object.keys(A).forEach((V) => w.assign((0, t._)`${k}${(0, t.getProperty)(V)}`, !0));
3886
3890
  }
3887
3891
  e.setEvaluated = g;
3888
3892
  const m = {};
@@ -3897,22 +3901,22 @@ var util = {};
3897
3901
  (function(w) {
3898
3902
  w[w.Num = 0] = "Num", w[w.Str = 1] = "Str";
3899
3903
  })(S = e.Type || (e.Type = {}));
3900
- function I(w, k, D) {
3904
+ function I(w, k, A) {
3901
3905
  if (w instanceof t.Name) {
3902
3906
  const V = k === S.Num;
3903
- return D ? V ? (0, t._)`"[" + ${w} + "]"` : (0, t._)`"['" + ${w} + "']"` : V ? (0, t._)`"/" + ${w}` : (0, t._)`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
3907
+ return A ? V ? (0, t._)`"[" + ${w} + "]"` : (0, t._)`"['" + ${w} + "']"` : V ? (0, t._)`"/" + ${w}` : (0, t._)`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
3904
3908
  }
3905
- return D ? (0, t.getProperty)(w).toString() : "/" + $(w);
3909
+ return A ? (0, t.getProperty)(w).toString() : "/" + $(w);
3906
3910
  }
3907
3911
  e.getErrorPath = I;
3908
- function A(w, k, D = w.opts.strictSchema) {
3909
- if (D) {
3910
- if (k = `strict mode: ${k}`, D === !0)
3912
+ function D(w, k, A = w.opts.strictSchema) {
3913
+ if (A) {
3914
+ if (k = `strict mode: ${k}`, A === !0)
3911
3915
  throw new Error(k);
3912
3916
  w.self.logger.warn(k);
3913
3917
  }
3914
3918
  }
3915
- e.checkStrictMode = A;
3919
+ e.checkStrictMode = D;
3916
3920
  })(util);
3917
3921
  var names$1 = {};
3918
3922
  Object.defineProperty(names$1, "__esModule", { value: !0 });
@@ -3949,25 +3953,25 @@ names$1.default = names;
3949
3953
  message: ({ keyword: g, schemaType: m }) => m ? (0, t.str)`"${g}" keyword must be ${m} ($data)` : (0, t.str)`"${g}" keyword is invalid ($data)`
3950
3954
  };
3951
3955
  function s(g, m = e.keywordError, T, S) {
3952
- const { it: I } = g, { gen: A, compositeRule: w, allErrors: k } = I, D = $(g, m, T);
3953
- S ?? (w || k) ? d(A, D) : u(I, (0, t._)`[${D}]`);
3956
+ const { it: I } = g, { gen: D, compositeRule: w, allErrors: k } = I, A = $(g, m, T);
3957
+ S ?? (w || k) ? d(D, A) : u(I, (0, t._)`[${A}]`);
3954
3958
  }
3955
3959
  e.reportError = s;
3956
3960
  function i(g, m = e.keywordError, T) {
3957
- const { it: S } = g, { gen: I, compositeRule: A, allErrors: w } = S, k = $(g, m, T);
3958
- d(I, k), A || w || u(S, n.default.vErrors);
3961
+ const { it: S } = g, { gen: I, compositeRule: D, allErrors: w } = S, k = $(g, m, T);
3962
+ d(I, k), D || w || u(S, n.default.vErrors);
3959
3963
  }
3960
3964
  e.reportExtraError = i;
3961
3965
  function o(g, m) {
3962
3966
  g.assign(n.default.errors, m), g.if((0, t._)`${n.default.vErrors} !== null`, () => g.if(m, () => g.assign((0, t._)`${n.default.vErrors}.length`, m), () => g.assign(n.default.vErrors, null)));
3963
3967
  }
3964
3968
  e.resetErrorsCount = o;
3965
- function l({ gen: g, keyword: m, schemaValue: T, data: S, errsCount: I, it: A }) {
3969
+ function l({ gen: g, keyword: m, schemaValue: T, data: S, errsCount: I, it: D }) {
3966
3970
  if (I === void 0)
3967
3971
  throw new Error("ajv implementation error");
3968
3972
  const w = g.name("err");
3969
3973
  g.forRange("i", I, n.default.errors, (k) => {
3970
- g.const(w, (0, t._)`${n.default.vErrors}[${k}]`), g.if((0, t._)`${w}.instancePath === undefined`, () => g.assign((0, t._)`${w}.instancePath`, (0, t.strConcat)(n.default.instancePath, A.errorPath))), g.assign((0, t._)`${w}.schemaPath`, (0, t.str)`${A.errSchemaPath}/${m}`), A.opts.verbose && (g.assign((0, t._)`${w}.schema`, T), g.assign((0, t._)`${w}.data`, S));
3974
+ g.const(w, (0, t._)`${n.default.vErrors}[${k}]`), g.if((0, t._)`${w}.instancePath === undefined`, () => g.assign((0, t._)`${w}.instancePath`, (0, t.strConcat)(n.default.instancePath, D.errorPath))), g.assign((0, t._)`${w}.schemaPath`, (0, t.str)`${D.errSchemaPath}/${m}`), D.opts.verbose && (g.assign((0, t._)`${w}.schema`, T), g.assign((0, t._)`${w}.data`, S));
3971
3975
  });
3972
3976
  }
3973
3977
  e.extendErrors = l;
@@ -3993,11 +3997,11 @@ names$1.default = names;
3993
3997
  return S === !1 ? (0, t._)`{}` : O(g, m, T);
3994
3998
  }
3995
3999
  function O(g, m, T = {}) {
3996
- const { gen: S, it: I } = g, A = [
4000
+ const { gen: S, it: I } = g, D = [
3997
4001
  N(I, T),
3998
4002
  R(g, T)
3999
4003
  ];
4000
- return v(g, m, A), S.object(...A);
4004
+ return v(g, m, D), S.object(...D);
4001
4005
  }
4002
4006
  function N({ errorPath: g }, { instancePath: m }) {
4003
4007
  const T = m ? (0, t.str)`${g}${(0, r.getErrorPath)(m, r.Type.Str)}` : g;
@@ -4008,8 +4012,8 @@ names$1.default = names;
4008
4012
  return T && (I = (0, t.str)`${I}${(0, r.getErrorPath)(T, r.Type.Str)}`), [p.schemaPath, I];
4009
4013
  }
4010
4014
  function v(g, { params: m, message: T }, S) {
4011
- const { keyword: I, data: A, schemaValue: w, it: k } = g, { opts: D, propertyName: V, topSchemaRef: x, schemaPath: re } = k;
4012
- S.push([p.keyword, I], [p.params, typeof m == "function" ? m(g) : m || (0, t._)`{}`]), D.messages && S.push([p.message, typeof T == "function" ? T(g) : T]), D.verbose && S.push([p.schema, w], [p.parentSchema, (0, t._)`${x}${re}`], [n.default.data, A]), V && S.push([p.propertyName, V]);
4015
+ const { keyword: I, data: D, schemaValue: w, it: k } = g, { opts: A, propertyName: V, topSchemaRef: x, schemaPath: re } = k;
4016
+ S.push([p.keyword, I], [p.params, typeof m == "function" ? m(g) : m || (0, t._)`{}`]), A.messages && S.push([p.message, typeof T == "function" ? T(g) : T]), A.verbose && S.push([p.schema, w], [p.parentSchema, (0, t._)`${x}${re}`], [n.default.data, D]), V && S.push([p.propertyName, V]);
4013
4017
  }
4014
4018
  })(errors);
4015
4019
  Object.defineProperty(boolSchema, "__esModule", { value: !0 });
@@ -4109,11 +4113,11 @@ applicability.shouldUseRule = shouldUseRule;
4109
4113
  }
4110
4114
  e.getJSONTypes = d;
4111
4115
  function u(S, I) {
4112
- const { gen: A, data: w, opts: k } = S, D = $(I, k.coerceTypes), V = I.length > 0 && !(D.length === 0 && I.length === 1 && (0, r.schemaHasRulesForType)(S, I[0]));
4116
+ const { gen: D, data: w, opts: k } = S, A = $(I, k.coerceTypes), V = I.length > 0 && !(A.length === 0 && I.length === 1 && (0, r.schemaHasRulesForType)(S, I[0]));
4113
4117
  if (V) {
4114
4118
  const x = v(I, w, k.strictNumbers, o.Wrong);
4115
- A.if(x, () => {
4116
- D.length ? O(S, I, D) : m(S);
4119
+ D.if(x, () => {
4120
+ A.length ? O(S, I, A) : m(S);
4117
4121
  });
4118
4122
  }
4119
4123
  return V;
@@ -4121,13 +4125,13 @@ applicability.shouldUseRule = shouldUseRule;
4121
4125
  e.coerceAndCheckDataType = u;
4122
4126
  const p = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
4123
4127
  function $(S, I) {
4124
- return I ? S.filter((A) => p.has(A) || I === "array" && A === "array") : [];
4128
+ return I ? S.filter((D) => p.has(D) || I === "array" && D === "array") : [];
4125
4129
  }
4126
- function O(S, I, A) {
4127
- const { gen: w, data: k, opts: D } = S, V = w.let("dataType", (0, s._)`typeof ${k}`), x = w.let("coerced", (0, s._)`undefined`);
4128
- D.coerceTypes === "array" && w.if((0, s._)`${V} == 'object' && Array.isArray(${k}) && ${k}.length == 1`, () => w.assign(k, (0, s._)`${k}[0]`).assign(V, (0, s._)`typeof ${k}`).if(v(I, k, D.strictNumbers), () => w.assign(x, k))), w.if((0, s._)`${x} !== undefined`);
4129
- for (const K of A)
4130
- (p.has(K) || K === "array" && D.coerceTypes === "array") && re(K);
4130
+ function O(S, I, D) {
4131
+ const { gen: w, data: k, opts: A } = S, V = w.let("dataType", (0, s._)`typeof ${k}`), x = w.let("coerced", (0, s._)`undefined`);
4132
+ A.coerceTypes === "array" && w.if((0, s._)`${V} == 'object' && Array.isArray(${k}) && ${k}.length == 1`, () => w.assign(k, (0, s._)`${k}[0]`).assign(V, (0, s._)`typeof ${k}`).if(v(I, k, A.strictNumbers), () => w.assign(x, k))), w.if((0, s._)`${x} !== undefined`);
4133
+ for (const K of D)
4134
+ (p.has(K) || K === "array" && A.coerceTypes === "array") && re(K);
4131
4135
  w.else(), m(S), w.endIf(), w.if((0, s._)`${x} !== undefined`, () => {
4132
4136
  w.assign(k, x), N(S, x);
4133
4137
  });
@@ -4156,49 +4160,49 @@ applicability.shouldUseRule = shouldUseRule;
4156
4160
  }
4157
4161
  }
4158
4162
  }
4159
- function N({ gen: S, parentData: I, parentDataProperty: A }, w) {
4160
- S.if((0, s._)`${I} !== undefined`, () => S.assign((0, s._)`${I}[${A}]`, w));
4163
+ function N({ gen: S, parentData: I, parentDataProperty: D }, w) {
4164
+ S.if((0, s._)`${I} !== undefined`, () => S.assign((0, s._)`${I}[${D}]`, w));
4161
4165
  }
4162
- function R(S, I, A, w = o.Correct) {
4166
+ function R(S, I, D, w = o.Correct) {
4163
4167
  const k = w === o.Correct ? s.operators.EQ : s.operators.NEQ;
4164
- let D;
4168
+ let A;
4165
4169
  switch (S) {
4166
4170
  case "null":
4167
4171
  return (0, s._)`${I} ${k} null`;
4168
4172
  case "array":
4169
- D = (0, s._)`Array.isArray(${I})`;
4173
+ A = (0, s._)`Array.isArray(${I})`;
4170
4174
  break;
4171
4175
  case "object":
4172
- D = (0, s._)`${I} && typeof ${I} == "object" && !Array.isArray(${I})`;
4176
+ A = (0, s._)`${I} && typeof ${I} == "object" && !Array.isArray(${I})`;
4173
4177
  break;
4174
4178
  case "integer":
4175
- D = V((0, s._)`!(${I} % 1) && !isNaN(${I})`);
4179
+ A = V((0, s._)`!(${I} % 1) && !isNaN(${I})`);
4176
4180
  break;
4177
4181
  case "number":
4178
- D = V();
4182
+ A = V();
4179
4183
  break;
4180
4184
  default:
4181
4185
  return (0, s._)`typeof ${I} ${k} ${S}`;
4182
4186
  }
4183
- return w === o.Correct ? D : (0, s.not)(D);
4187
+ return w === o.Correct ? A : (0, s.not)(A);
4184
4188
  function V(x = s.nil) {
4185
- return (0, s.and)((0, s._)`typeof ${I} == "number"`, x, A ? (0, s._)`isFinite(${I})` : s.nil);
4189
+ return (0, s.and)((0, s._)`typeof ${I} == "number"`, x, D ? (0, s._)`isFinite(${I})` : s.nil);
4186
4190
  }
4187
4191
  }
4188
4192
  e.checkDataType = R;
4189
- function v(S, I, A, w) {
4193
+ function v(S, I, D, w) {
4190
4194
  if (S.length === 1)
4191
- return R(S[0], I, A, w);
4195
+ return R(S[0], I, D, w);
4192
4196
  let k;
4193
- const D = (0, i.toHash)(S);
4194
- if (D.array && D.object) {
4197
+ const A = (0, i.toHash)(S);
4198
+ if (A.array && A.object) {
4195
4199
  const V = (0, s._)`typeof ${I} != "object"`;
4196
- k = D.null ? V : (0, s._)`!${I} || ${V}`, delete D.null, delete D.array, delete D.object;
4200
+ k = A.null ? V : (0, s._)`!${I} || ${V}`, delete A.null, delete A.array, delete A.object;
4197
4201
  } else
4198
4202
  k = s.nil;
4199
- D.number && delete D.integer;
4200
- for (const V in D)
4201
- k = (0, s.and)(k, R(V, I, A, w));
4203
+ A.number && delete A.integer;
4204
+ for (const V in A)
4205
+ k = (0, s.and)(k, R(V, I, D, w));
4202
4206
  return k;
4203
4207
  }
4204
4208
  e.checkDataTypes = v;
@@ -4212,11 +4216,11 @@ applicability.shouldUseRule = shouldUseRule;
4212
4216
  }
4213
4217
  e.reportTypeError = m;
4214
4218
  function T(S) {
4215
- const { gen: I, data: A, schema: w } = S, k = (0, i.schemaRefOrVal)(S, w, "type");
4219
+ const { gen: I, data: D, schema: w } = S, k = (0, i.schemaRefOrVal)(S, w, "type");
4216
4220
  return {
4217
4221
  gen: I,
4218
4222
  keyword: "type",
4219
- data: A,
4223
+ data: D,
4220
4224
  schema: w.type,
4221
4225
  schemaCode: k,
4222
4226
  schemaValue: k,
@@ -4692,8 +4696,8 @@ function getSchemaRefs(e, t) {
4692
4696
  if (S = normalizeId(g ? I(g, S) : S), d.has(S))
4693
4697
  throw p(S);
4694
4698
  d.add(S);
4695
- let A = this.refs[S];
4696
- return typeof A == "string" && (A = this.refs[A]), typeof A == "object" ? u($, A.schema, S) : S !== normalizeId(v) && (S[0] === "#" ? (u($, l[S], S), l[S] = $) : this.refs[S] = v), S;
4699
+ let D = this.refs[S];
4700
+ return typeof D == "string" && (D = this.refs[D]), typeof D == "object" ? u($, D.schema, S) : S !== normalizeId(v) && (S[0] === "#" ? (u($, l[S], S), l[S] = $) : this.refs[S] = v), S;
4697
4701
  }
4698
4702
  function T(S) {
4699
4703
  if (typeof S == "string") {
@@ -5306,7 +5310,7 @@ var uri$1 = {}, uri_all = { exports: {} };
5306
5310
  return _;
5307
5311
  } else
5308
5312
  return Array.from(f);
5309
- }, R = 2147483647, v = 36, g = 1, m = 26, T = 38, S = 700, I = 72, A = 128, w = "-", k = /^xn--/, D = /[^\0-\x7E]/, V = /[\x2E\u3002\uFF0E\uFF61]/g, x = {
5313
+ }, R = 2147483647, v = 36, g = 1, m = 26, T = 38, S = 700, I = 72, D = 128, w = "-", k = /^xn--/, A = /[^\0-\x7E]/, V = /[\x2E\u3002\uFF0E\uFF61]/g, x = {
5310
5314
  overflow: "Overflow: input needs wider integers to process",
5311
5315
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
5312
5316
  "invalid-input": "Invalid input"
@@ -5353,7 +5357,7 @@ var uri$1 = {}, uri_all = { exports: {} };
5353
5357
  c = K(c / re);
5354
5358
  return K(b + (re + 1) * c / (c + T));
5355
5359
  }, j = function(c) {
5356
- var _ = [], E = c.length, b = 0, U = A, L = I, J = c.lastIndexOf(w);
5360
+ var _ = [], E = c.length, b = 0, U = D, L = I, J = c.lastIndexOf(w);
5357
5361
  J < 0 && (J = 0);
5358
5362
  for (var Y = 0; Y < J; ++Y)
5359
5363
  c.charCodeAt(Y) >= 128 && oe("not-basic"), _.push(c.charCodeAt(Y));
@@ -5380,7 +5384,7 @@ var uri$1 = {}, uri_all = { exports: {} };
5380
5384
  }, P = function(c) {
5381
5385
  var _ = [];
5382
5386
  c = qe(c);
5383
- var E = c.length, b = A, U = 0, L = I, J = !0, Y = !1, se = void 0;
5387
+ var E = c.length, b = D, U = 0, L = I, J = !0, Y = !1, se = void 0;
5384
5388
  try {
5385
5389
  for (var B = c[Symbol.iterator](), Z; !(J = (Z = B.next()).done); J = !0) {
5386
5390
  var ie = Z.value;
@@ -5455,7 +5459,7 @@ var uri$1 = {}, uri_all = { exports: {} };
5455
5459
  });
5456
5460
  }, h = function(c) {
5457
5461
  return Oe(c, function(_) {
5458
- return D.test(_) ? "xn--" + P(_) : _;
5462
+ return A.test(_) ? "xn--" + P(_) : _;
5459
5463
  });
5460
5464
  }, C = {
5461
5465
  /**
@@ -5667,12 +5671,12 @@ var uri$1 = {}, uri_all = { exports: {} };
5667
5671
  }
5668
5672
  return c.fragment = void 0, c;
5669
5673
  }
5670
- }, Dt = {
5674
+ }, At = {
5671
5675
  scheme: "wss",
5672
5676
  domainHost: at.domainHost,
5673
5677
  parse: at.parse,
5674
5678
  serialize: at.serialize
5675
- }, ir = {}, At = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]", _e = "[0-9A-Fa-f]", or = s(s("%[EFef]" + _e + "%" + _e + _e + "%" + _e + _e) + "|" + s("%[89A-Fa-f]" + _e + "%" + _e + _e) + "|" + s("%" + _e + _e)), ar = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]", cr = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]", lr = n(cr, '[\\"\\\\]'), dr = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]", ur = new RegExp(At, "g"), We = new RegExp(or, "g"), pr = new RegExp(n("[^]", ar, "[\\.]", '[\\"]', lr), "g"), Ft = new RegExp(n("[^]", At, dr), "g"), fr = Ft;
5679
+ }, ir = {}, Dt = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]", _e = "[0-9A-Fa-f]", or = s(s("%[EFef]" + _e + "%" + _e + _e + "%" + _e + _e) + "|" + s("%[89A-Fa-f]" + _e + "%" + _e + _e) + "|" + s("%" + _e + _e)), ar = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]", cr = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]", lr = n(cr, '[\\"\\\\]'), dr = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]", ur = new RegExp(Dt, "g"), We = new RegExp(or, "g"), pr = new RegExp(n("[^]", ar, "[\\.]", '[\\"]', lr), "g"), Ft = new RegExp(n("[^]", Dt, dr), "g"), fr = Ft;
5676
5680
  function Ct(f) {
5677
5681
  var c = W(f);
5678
5682
  return c.match(ur) ? c : f;
@@ -5766,7 +5770,7 @@ var uri$1 = {}, uri_all = { exports: {} };
5766
5770
  return E.nss = (c.uuid || "").toLowerCase(), E;
5767
5771
  }
5768
5772
  };
5769
- M[Ne.scheme] = Ne, M[It.scheme] = It, M[at.scheme] = at, M[Dt.scheme] = Dt, M[Mt.scheme] = Mt, M[qt.scheme] = qt, M[Ut.scheme] = Ut, r.SCHEMES = M, r.pctEncChar = q, r.pctDecChars = W, r.parse = de, r.removeDotSegments = me, r.serialize = le, r.resolveComponents = xe, r.resolve = it, r.normalize = Ce, r.equal = ot, r.escapeComponent = ut, r.unescapeComponent = pe, Object.defineProperty(r, "__esModule", { value: !0 });
5773
+ M[Ne.scheme] = Ne, M[It.scheme] = It, M[at.scheme] = at, M[At.scheme] = At, M[Mt.scheme] = Mt, M[qt.scheme] = qt, M[Ut.scheme] = Ut, r.SCHEMES = M, r.pctEncChar = q, r.pctDecChars = W, r.parse = de, r.removeDotSegments = me, r.serialize = le, r.resolveComponents = xe, r.resolve = it, r.normalize = Ce, r.equal = ot, r.escapeComponent = ut, r.unescapeComponent = pe, Object.defineProperty(r, "__esModule", { value: !0 });
5770
5774
  });
5771
5775
  })(uri_all, uri_all.exports);
5772
5776
  var uri_allExports = uri_all.exports;
@@ -5861,7 +5865,7 @@ uri$1.default = uri;
5861
5865
  const { es5: j, lines: P } = this.opts.code;
5862
5866
  this.scope = new l.ValueScope({ scope: {}, prefixes: v, es5: j, lines: P }), this.logger = K(y.logger);
5863
5867
  const a = y.validateFormats;
5864
- y.validateFormats = !1, this.RULES = (0, i.getRules)(), A.call(this, g, y, "NOT SUPPORTED"), A.call(this, m, y, "DEPRECATED", "warn"), this._metaOpts = x.call(this), y.formats && D.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), y.keywords && V.call(this, y.keywords), typeof y.meta == "object" && this.addMetaSchema(y.meta), k.call(this), y.validateFormats = a;
5868
+ y.validateFormats = !1, this.RULES = (0, i.getRules)(), D.call(this, g, y, "NOT SUPPORTED"), D.call(this, m, y, "DEPRECATED", "warn"), this._metaOpts = x.call(this), y.formats && A.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), y.keywords && V.call(this, y.keywords), typeof y.meta == "object" && this.addMetaSchema(y.meta), k.call(this), y.validateFormats = a;
5865
5869
  }
5866
5870
  _addVocabularies() {
5867
5871
  this.addKeyword("$async");
@@ -6115,7 +6119,7 @@ uri$1.default = uri;
6115
6119
  }
6116
6120
  }
6117
6121
  e.default = I, I.ValidationError = n.default, I.MissingRefError = s.default;
6118
- function A(F, y, j, P = "error") {
6122
+ function D(F, y, j, P = "error") {
6119
6123
  for (const a in F) {
6120
6124
  const h = a;
6121
6125
  h in y && this.logger[P](`${j}: option ${a}. ${F[h]}`);
@@ -6133,7 +6137,7 @@ uri$1.default = uri;
6133
6137
  for (const y in F)
6134
6138
  this.addSchema(F[y], y);
6135
6139
  }
6136
- function D() {
6140
+ function A() {
6137
6141
  for (const F in this.opts.formats) {
6138
6142
  const y = this.opts.formats[F];
6139
6143
  y && this.addFormat(F, y);
@@ -7200,8 +7204,8 @@ const codegen_1$1 = codegen, error$1 = {
7200
7204
  return d.strictSchema === !1 ? codegen_1$1.nil : (0, codegen_1$1._)`${o} && !${m}`;
7201
7205
  }
7202
7206
  function S() {
7203
- const I = p.$async ? (0, codegen_1$1._)`(${v}.async ? await ${m}(${n}) : ${m}(${n}))` : (0, codegen_1$1._)`${m}(${n})`, A = (0, codegen_1$1._)`(typeof ${m} == "function" ? ${I} : ${m}.test(${n}))`;
7204
- return (0, codegen_1$1._)`${m} && ${m} !== true && ${g} === ${t} && !${A}`;
7207
+ const I = p.$async ? (0, codegen_1$1._)`(${v}.async ? await ${m}(${n}) : ${m}(${n}))` : (0, codegen_1$1._)`${m}(${n})`, D = (0, codegen_1$1._)`(typeof ${m} == "function" ? ${I} : ${m}.test(${n}))`;
7208
+ return (0, codegen_1$1._)`${m} && ${m} !== true && ${g} === ${t} && !${D}`;
7205
7209
  }
7206
7210
  }
7207
7211
  function N() {
@@ -7216,17 +7220,17 @@ const codegen_1$1 = codegen, error$1 = {
7216
7220
  v === t && e.pass(I());
7217
7221
  function T() {
7218
7222
  if (d.strictSchema === !1) {
7219
- $.logger.warn(A());
7223
+ $.logger.warn(D());
7220
7224
  return;
7221
7225
  }
7222
- throw new Error(A());
7223
- function A() {
7226
+ throw new Error(D());
7227
+ function D() {
7224
7228
  return `unknown format "${i}" ignored in schema at path "${u}"`;
7225
7229
  }
7226
7230
  }
7227
- function S(A) {
7228
- const w = A instanceof RegExp ? (0, codegen_1$1.regexpCode)(A) : d.code.formats ? (0, codegen_1$1._)`${d.code.formats}${(0, codegen_1$1.getProperty)(i)}` : void 0, k = r.scopeValue("formats", { key: i, ref: A, code: w });
7229
- return typeof A == "object" && !(A instanceof RegExp) ? [A.type || "string", A.validate, (0, codegen_1$1._)`${k}.validate`] : ["string", A, k];
7231
+ function S(D) {
7232
+ const w = D instanceof RegExp ? (0, codegen_1$1.regexpCode)(D) : d.code.formats ? (0, codegen_1$1._)`${d.code.formats}${(0, codegen_1$1.getProperty)(i)}` : void 0, k = r.scopeValue("formats", { key: i, ref: D, code: w });
7233
+ return typeof D == "object" && !(D instanceof RegExp) ? [D.type || "string", D.validate, (0, codegen_1$1._)`${k}.validate`] : ["string", D, k];
7230
7234
  }
7231
7235
  function I() {
7232
7236
  if (typeof R == "object" && !(R instanceof RegExp) && R.async) {
@@ -7314,12 +7318,12 @@ const codegen_1 = codegen, types_1 = types, compile_1 = compile, util_1 = util,
7314
7318
  const R = {}, v = m(s);
7315
7319
  let g = !0;
7316
7320
  for (let I = 0; I < o.length; I++) {
7317
- let A = o[I];
7318
- A != null && A.$ref && !(0, util_1.schemaHasRulesButRef)(A, i.self.RULES) && (A = compile_1.resolveRef.call(i.self, i.schemaEnv.root, i.baseId, A == null ? void 0 : A.$ref), A instanceof compile_1.SchemaEnv && (A = A.schema));
7319
- const w = (N = A == null ? void 0 : A.properties) === null || N === void 0 ? void 0 : N[l];
7321
+ let D = o[I];
7322
+ D != null && D.$ref && !(0, util_1.schemaHasRulesButRef)(D, i.self.RULES) && (D = compile_1.resolveRef.call(i.self, i.schemaEnv.root, i.baseId, D == null ? void 0 : D.$ref), D instanceof compile_1.SchemaEnv && (D = D.schema));
7323
+ const w = (N = D == null ? void 0 : D.properties) === null || N === void 0 ? void 0 : N[l];
7320
7324
  if (typeof w != "object")
7321
7325
  throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);
7322
- g = g && (v || m(A)), T(w, I);
7326
+ g = g && (v || m(D)), T(w, I);
7323
7327
  }
7324
7328
  if (!g)
7325
7329
  throw new Error(`discriminator: "${l}" must be required`);
@@ -7327,19 +7331,19 @@ const codegen_1 = codegen, types_1 = types, compile_1 = compile, util_1 = util,
7327
7331
  function m({ required: I }) {
7328
7332
  return Array.isArray(I) && I.includes(l);
7329
7333
  }
7330
- function T(I, A) {
7334
+ function T(I, D) {
7331
7335
  if (I.const)
7332
- S(I.const, A);
7336
+ S(I.const, D);
7333
7337
  else if (I.enum)
7334
7338
  for (const w of I.enum)
7335
- S(w, A);
7339
+ S(w, D);
7336
7340
  else
7337
7341
  throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`);
7338
7342
  }
7339
- function S(I, A) {
7343
+ function S(I, D) {
7340
7344
  if (typeof I != "string" || I in R)
7341
7345
  throw new Error(`discriminator: "${l}" values must be unique strings`);
7342
- R[I] = A;
7346
+ R[I] = D;
7343
7347
  }
7344
7348
  }
7345
7349
  }
@@ -7642,7 +7646,38 @@ const Ajv = /* @__PURE__ */ getDefaultExportFromCjs(ajvExports), $schema = "http
7642
7646
  },
7643
7647
  description: {
7644
7648
  type: "string",
7645
- description: "Optional description. It doesn't do anything but is exposed as a courtesy to developers who may want to document which blueprint file does what."
7649
+ description: "Optional description. It doesn't do anything but is exposed as a courtesy to developers who may want to document which blueprint file does what.",
7650
+ deprecated: "Use meta.description instead."
7651
+ },
7652
+ meta: {
7653
+ type: "object",
7654
+ properties: {
7655
+ title: {
7656
+ type: "string",
7657
+ description: "A clear and concise name for your Blueprint."
7658
+ },
7659
+ description: {
7660
+ type: "string",
7661
+ description: "A brief explanation of what your Blueprint offers."
7662
+ },
7663
+ author: {
7664
+ type: "string",
7665
+ description: "A GitHub username of the author of this Blueprint."
7666
+ },
7667
+ categories: {
7668
+ type: "array",
7669
+ items: {
7670
+ type: "string"
7671
+ },
7672
+ description: "Relevant categories to help users find your Blueprint in the future Blueprints section on WordPress.org."
7673
+ }
7674
+ },
7675
+ required: [
7676
+ "title",
7677
+ "author"
7678
+ ],
7679
+ additionalProperties: !1,
7680
+ description: "Optional metadata. Used by the Blueprints gallery at https://github.com/WordPress/blueprints"
7646
7681
  },
7647
7682
  preferredVersions: {
7648
7683
  type: "object",
@@ -8919,46 +8954,129 @@ for existing apps using this option.`
8919
8954
  $ref: "#/definitions/PHPRequestHeaders",
8920
8955
  description: "Request headers."
8921
8956
  },
8922
- files: {
8923
- type: "object",
8924
- additionalProperties: {
8925
- type: "object",
8926
- properties: {
8927
- size: {
8928
- type: "number"
8929
- },
8930
- type: {
8931
- type: "string"
8957
+ body: {
8958
+ anyOf: [
8959
+ {
8960
+ type: "string"
8961
+ },
8962
+ {
8963
+ type: "object",
8964
+ properties: {
8965
+ BYTES_PER_ELEMENT: {
8966
+ type: "number"
8967
+ },
8968
+ buffer: {
8969
+ type: "object",
8970
+ properties: {
8971
+ byteLength: {
8972
+ type: "number"
8973
+ }
8974
+ },
8975
+ required: [
8976
+ "byteLength"
8977
+ ],
8978
+ additionalProperties: !1
8979
+ },
8980
+ byteLength: {
8981
+ type: "number"
8982
+ },
8983
+ byteOffset: {
8984
+ type: "number"
8985
+ },
8986
+ length: {
8987
+ type: "number"
8988
+ }
8932
8989
  },
8933
- lastModified: {
8990
+ required: [
8991
+ "BYTES_PER_ELEMENT",
8992
+ "buffer",
8993
+ "byteLength",
8994
+ "byteOffset",
8995
+ "length"
8996
+ ],
8997
+ additionalProperties: {
8934
8998
  type: "number"
8935
- },
8936
- name: {
8937
- type: "string"
8938
- },
8939
- webkitRelativePath: {
8940
- type: "string"
8941
8999
  }
8942
9000
  },
8943
- required: [
8944
- "lastModified",
8945
- "name",
8946
- "size",
8947
- "type",
8948
- "webkitRelativePath"
8949
- ],
8950
- additionalProperties: !1
8951
- },
8952
- description: "Uploaded files"
8953
- },
8954
- body: {
8955
- type: "string",
8956
- description: "Request body without the files."
8957
- },
8958
- formData: {
8959
- type: "object",
8960
- additionalProperties: {},
8961
- description: "Form data. If set, the request body will be ignored and the content-type header will be set to `application/x-www-form-urlencoded`."
9001
+ {
9002
+ type: "object",
9003
+ additionalProperties: {
9004
+ anyOf: [
9005
+ {
9006
+ type: "string"
9007
+ },
9008
+ {
9009
+ type: "object",
9010
+ properties: {
9011
+ BYTES_PER_ELEMENT: {
9012
+ type: "number"
9013
+ },
9014
+ buffer: {
9015
+ type: "object",
9016
+ properties: {
9017
+ byteLength: {
9018
+ type: "number"
9019
+ }
9020
+ },
9021
+ required: [
9022
+ "byteLength"
9023
+ ],
9024
+ additionalProperties: !1
9025
+ },
9026
+ byteLength: {
9027
+ type: "number"
9028
+ },
9029
+ byteOffset: {
9030
+ type: "number"
9031
+ },
9032
+ length: {
9033
+ type: "number"
9034
+ }
9035
+ },
9036
+ required: [
9037
+ "BYTES_PER_ELEMENT",
9038
+ "buffer",
9039
+ "byteLength",
9040
+ "byteOffset",
9041
+ "length"
9042
+ ],
9043
+ additionalProperties: {
9044
+ type: "number"
9045
+ }
9046
+ },
9047
+ {
9048
+ type: "object",
9049
+ properties: {
9050
+ size: {
9051
+ type: "number"
9052
+ },
9053
+ type: {
9054
+ type: "string"
9055
+ },
9056
+ lastModified: {
9057
+ type: "number"
9058
+ },
9059
+ name: {
9060
+ type: "string"
9061
+ },
9062
+ webkitRelativePath: {
9063
+ type: "string"
9064
+ }
9065
+ },
9066
+ required: [
9067
+ "lastModified",
9068
+ "name",
9069
+ "size",
9070
+ "type",
9071
+ "webkitRelativePath"
9072
+ ],
9073
+ additionalProperties: !1
9074
+ }
9075
+ ]
9076
+ }
9077
+ }
9078
+ ],
9079
+ description: "Request body. If an object is given, the request will be encoded as multipart and sent with a `multipart/form-data` header."
8962
9080
  }
8963
9081
  },
8964
9082
  required: [
@@ -9008,85 +9126,68 @@ for existing apps using this option.`
9008
9126
  description: "Request headers."
9009
9127
  },
9010
9128
  body: {
9011
- type: "string",
9012
- description: "Request body without the files."
9013
- },
9014
- fileInfos: {
9015
- type: "array",
9016
- items: {
9017
- $ref: "#/definitions/FileInfo"
9018
- },
9019
- description: "Uploaded files."
9020
- },
9021
- code: {
9022
- type: "string",
9023
- description: "The code snippet to eval instead of a php file."
9024
- },
9025
- throwOnError: {
9026
- type: "boolean",
9027
- description: "Whether to throw an error if the PHP process exits with a non-zero code or outputs to stderr."
9028
- }
9029
- },
9030
- additionalProperties: !1
9031
- },
9032
- FileInfo: {
9033
- type: "object",
9034
- properties: {
9035
- key: {
9036
- type: "string"
9037
- },
9038
- name: {
9039
- type: "string"
9040
- },
9041
- type: {
9042
- type: "string"
9043
- },
9044
- data: {
9045
- type: "object",
9046
- properties: {
9047
- BYTES_PER_ELEMENT: {
9048
- type: "number"
9129
+ anyOf: [
9130
+ {
9131
+ type: "string"
9049
9132
  },
9050
- buffer: {
9133
+ {
9051
9134
  type: "object",
9052
9135
  properties: {
9136
+ BYTES_PER_ELEMENT: {
9137
+ type: "number"
9138
+ },
9139
+ buffer: {
9140
+ type: "object",
9141
+ properties: {
9142
+ byteLength: {
9143
+ type: "number"
9144
+ }
9145
+ },
9146
+ required: [
9147
+ "byteLength"
9148
+ ],
9149
+ additionalProperties: !1
9150
+ },
9053
9151
  byteLength: {
9054
9152
  type: "number"
9153
+ },
9154
+ byteOffset: {
9155
+ type: "number"
9156
+ },
9157
+ length: {
9158
+ type: "number"
9055
9159
  }
9056
9160
  },
9057
9161
  required: [
9058
- "byteLength"
9162
+ "BYTES_PER_ELEMENT",
9163
+ "buffer",
9164
+ "byteLength",
9165
+ "byteOffset",
9166
+ "length"
9059
9167
  ],
9060
- additionalProperties: !1
9061
- },
9062
- byteLength: {
9063
- type: "number"
9064
- },
9065
- byteOffset: {
9066
- type: "number"
9067
- },
9068
- length: {
9069
- type: "number"
9168
+ additionalProperties: {
9169
+ type: "number"
9170
+ }
9070
9171
  }
9071
- },
9072
- required: [
9073
- "BYTES_PER_ELEMENT",
9074
- "buffer",
9075
- "byteLength",
9076
- "byteOffset",
9077
- "length"
9078
9172
  ],
9173
+ description: "Request body."
9174
+ },
9175
+ env: {
9176
+ type: "object",
9079
9177
  additionalProperties: {
9080
- type: "number"
9081
- }
9178
+ type: "string"
9179
+ },
9180
+ description: "Environment variables to set for this run."
9181
+ },
9182
+ code: {
9183
+ type: "string",
9184
+ description: "The code snippet to eval instead of a php file."
9185
+ },
9186
+ throwOnError: {
9187
+ type: "boolean",
9188
+ description: "Whether to throw an error if the PHP process exits with a non-zero code or outputs to stderr."
9082
9189
  }
9083
9190
  },
9084
- required: [
9085
- "key",
9086
- "name",
9087
- "type",
9088
- "data"
9089
- ],
9090
9191
  additionalProperties: !1
9091
9192
  },
9092
9193
  WordPressInstallationOptions: {