@wp-playground/blueprints 0.6.15 → 0.6.16

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.
Files changed (3) hide show
  1. package/index.cjs +13 -13
  2. package/index.js +302 -288
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -274,7 +274,7 @@ require_once( ${phpVar(s)}. "/wp-load.php" );
274
274
  require_once( ${phpVar(s)}. "/wp-admin/includes/plugin.php" );
275
275
 
276
276
  // Set current user to admin
277
- set_current_user( get_users(array('role' => 'Administrator') )[0] );
277
+ wp_set_current_user( get_users(array('role' => 'Administrator') )[0]->ID );
278
278
 
279
279
  $plugin_path = ${phpVar(t)};
280
280
 
@@ -304,7 +304,7 @@ define( 'WP_ADMIN', true );
304
304
  require_once( ${phpVar(n)}. "/wp-load.php" );
305
305
 
306
306
  // Set current user to admin
307
- set_current_user( get_users(array('role' => 'Administrator') )[0] );
307
+ wp_set_current_user( get_users(array('role' => 'Administrator') )[0]->ID );
308
308
 
309
309
  switch_theme( ${phpVar(t)} );
310
310
  `
@@ -793,7 +793,7 @@ define( 'WP_ADMIN', true );
793
793
  require_once(${phpVar(s)} . "/wp-load.php");
794
794
 
795
795
  // Set current user to admin
796
- set_current_user( get_users(array('role' => 'Administrator') )[0] );
796
+ ( get_users(array('role' => 'Administrator') )[0] );
797
797
 
798
798
  require_once(${phpVar(s)} . "/wp-admin/includes/plugin.php");
799
799
  $plugins_root = ${phpVar(s)} . "/wp-content/plugins";
@@ -858,7 +858,7 @@ echo json_encode($deactivated_plugins);
858
858
  PATH_CURRENT_SITE: r
859
859
  }
860
860
  });
861
- const f = new URL(await e.absoluteUrl), $ = isURLScoped(f) ? "scope:" + getURLScope(f) : null;
861
+ const p = new URL(await e.absoluteUrl), $ = isURLScoped(p) ? "scope:" + getURLScope(p) : null;
862
862
  await e.writeFile(
863
863
  joinPaths(s, "/wp-content/sunrise.php"),
864
864
  `<?php
@@ -867,7 +867,7 @@ echo json_encode($deactivated_plugins);
867
867
  }
868
868
  $folder = ${phpVar($)};
869
869
  if ($folder && strpos($_SERVER['REQUEST_URI'],"/$folder") === false) {
870
- $_SERVER['HTTP_HOST'] = ${phpVar(f.hostname)};
870
+ $_SERVER['HTTP_HOST'] = ${phpVar(p.hostname)};
871
871
  $_SERVER['REQUEST_URI'] = "/$folder/" . ltrim($_SERVER['REQUEST_URI'], '/');
872
872
  }
873
873
  `
@@ -1049,13 +1049,13 @@ const tmpPath = "/tmp/file.zip", unzip = async (e, { zipFile: t, zipPath: r, ext
1049
1049
  extractToPath: s
1050
1050
  }), s = joinPaths(s, r);
1051
1051
  const i = joinPaths(s, "wp-content"), o = joinPaths(n, "wp-content");
1052
- for (const f of wpContentFilesExcludedFromExport) {
1052
+ for (const p of wpContentFilesExcludedFromExport) {
1053
1053
  const $ = joinPaths(
1054
1054
  i,
1055
- f
1055
+ p
1056
1056
  );
1057
1057
  await removePath(e, $);
1058
- const O = joinPaths(o, f);
1058
+ const O = joinPaths(o, p);
1059
1059
  await e.fileExists(O) && (await e.mkdir(dirname($)), await e.mv(O, $));
1060
1060
  }
1061
1061
  const l = joinPaths(
@@ -1068,10 +1068,10 @@ const tmpPath = "/tmp/file.zip", unzip = async (e, { zipFile: t, zipPath: r, ext
1068
1068
  l
1069
1069
  );
1070
1070
  const d = await e.listFiles(s);
1071
- for (const f of d)
1072
- await removePath(e, joinPaths(n, f)), await e.mv(
1073
- joinPaths(s, f),
1074
- joinPaths(n, f)
1071
+ for (const p of d)
1072
+ await removePath(e, joinPaths(n, p)), await e.mv(
1073
+ joinPaths(s, p),
1074
+ joinPaths(n, p)
1075
1075
  );
1076
1076
  await e.rmdir(s), await defineSiteUrl(e, {
1077
1077
  siteUrl: await e.absoluteUrl
@@ -1113,9 +1113,9 @@ async function installAsset(e, {
1113
1113
  prependPath: !0
1114
1114
  });
1115
1115
  u = u.filter((S) => !S.endsWith("/__MACOSX"));
1116
- const f = u.length === 1 && await e.isDir(u[0]);
1116
+ const p = u.length === 1 && await e.isDir(u[0]);
1117
1117
  let $, O = "";
1118
- f ? (O = u[0], $ = u[0].split("/").pop()) : (O = d, $ = i);
1118
+ p ? (O = u[0], $ = u[0].split("/").pop()) : (O = d, $ = i);
1119
1119
  const C = `${t}/${$}`;
1120
1120
  if (await e.fileExists(C)) {
1121
1121
  if (!await e.isDir(C))
@@ -2002,8 +2002,8 @@ Pe = new WeakMap(), Ke = new WeakMap(), dt = new WeakMap(), De = new WeakMap(),
2002
2002
  let l = t.body;
2003
2003
  if (typeof l == "object" && !(l instanceof Uint8Array)) {
2004
2004
  i = "POST";
2005
- const { bytes: u, contentType: f } = await encodeAsMultipart(l);
2006
- l = u, o["content-type"] = f;
2005
+ const { bytes: u, contentType: p } = await encodeAsMultipart(l);
2006
+ l = u, o["content-type"] = p;
2007
2007
  }
2008
2008
  let d;
2009
2009
  try {
@@ -2015,17 +2015,24 @@ Pe = new WeakMap(), Ke = new WeakMap(), dt = new WeakMap(), De = new WeakMap(),
2015
2015
  new TextEncoder().encode("404 File not found")
2016
2016
  );
2017
2017
  }
2018
- return await this.php.run({
2019
- relativeUri: ensurePathPrefix(
2020
- toRelativeUrl(r),
2021
- H(this, ve)
2022
- ),
2023
- protocol: H(this, Ke),
2024
- method: t.method || i,
2025
- body: l,
2026
- scriptPath: d,
2027
- headers: o
2028
- });
2018
+ try {
2019
+ return await this.php.run({
2020
+ relativeUri: ensurePathPrefix(
2021
+ toRelativeUrl(r),
2022
+ H(this, ve)
2023
+ ),
2024
+ protocol: H(this, Ke),
2025
+ method: t.method || i,
2026
+ body: l,
2027
+ scriptPath: d,
2028
+ headers: o
2029
+ });
2030
+ } catch (u) {
2031
+ const p = u;
2032
+ if (p != null && p.response)
2033
+ return p.response;
2034
+ throw u;
2035
+ }
2029
2036
  } finally {
2030
2037
  n();
2031
2038
  }
@@ -2185,7 +2192,7 @@ function rethrowFileSystemError(e = "") {
2185
2192
  } catch (l) {
2186
2193
  const d = typeof l == "object" ? l == null ? void 0 : l.errno : null;
2187
2194
  if (d in FileErrorCodes) {
2188
- const u = FileErrorCodes[d], f = typeof o[0] == "string" ? o[0] : null, $ = f !== null ? e.replaceAll("{path}", f) : e;
2195
+ const u = FileErrorCodes[d], p = typeof o[0] == "string" ? o[0] : null, $ = p !== null ? e.replaceAll("{path}", p) : e;
2189
2196
  throw new Error(`${$}: ${u}`, {
2190
2197
  cause: l
2191
2198
  });
@@ -2209,6 +2216,11 @@ var __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyD
2209
2216
  return n && s && __defProp(t, r, s), s;
2210
2217
  };
2211
2218
  const STRING = "string", NUMBER = "number", __private__dont__use = Symbol("__private__dont__use");
2219
+ class PHPExecutionFailureError extends Error {
2220
+ constructor(t, r, n) {
2221
+ super(t), this.response = r, this.source = n;
2222
+ }
2223
+ }
2212
2224
  var Me, Ze, Ye, be, Re, Te, Ee, Xe, gt, Gt, yt, Kt, vt, Jt, wt, Qt, Pt, Zt, bt, Yt, Et, Xt, St, er, Rt, tr, Tt, rr, kt, nr, Ct, sr;
2213
2225
  class BasePHP {
2214
2226
  /**
@@ -2357,10 +2369,12 @@ class BasePHP {
2357
2369
  const o = await ce(this, Ct, sr).call(this);
2358
2370
  if (o.exitCode !== 0) {
2359
2371
  console.warn("PHP.run() output was:", o.text);
2360
- const l = new Error(
2361
- `PHP.run() failed with exit code ${o.exitCode} and the following output: ` + o.errors
2372
+ const l = new PHPExecutionFailureError(
2373
+ `PHP.run() failed with exit code ${o.exitCode} and the following output: ` + o.errors,
2374
+ o,
2375
+ "request"
2362
2376
  );
2363
- throw l.response = o, l.source = "request", console.error(l), l;
2377
+ throw console.error(l), l;
2364
2378
  }
2365
2379
  return o;
2366
2380
  } catch (n) {
@@ -2659,8 +2673,8 @@ Me = new WeakMap(), Ze = new WeakMap(), Ye = new WeakMap(), be = new WeakMap(),
2659
2673
  var d;
2660
2674
  t = (u) => {
2661
2675
  console.error(u), console.error(u.error);
2662
- const f = new Error("Rethrown");
2663
- f.cause = u.error, f.betterMessage = u.message, o(f);
2676
+ const p = new Error("Rethrown");
2677
+ p.cause = u.error, p.betterMessage = u.message, o(p);
2664
2678
  }, (d = H(this, Re)) == null || d.addEventListener(
2665
2679
  "error",
2666
2680
  t
@@ -2689,7 +2703,7 @@ Me = new WeakMap(), Ze = new WeakMap(), Ye = new WeakMap(), be = new WeakMap(),
2689
2703
  }
2690
2704
  const { headers: r, httpStatusCode: n } = ce(this, yt, Kt).call(this);
2691
2705
  return new PHPResponse(
2692
- n,
2706
+ e === 0 ? n : 500,
2693
2707
  r,
2694
2708
  this.readFileAsBuffer("/internal/stdout"),
2695
2709
  this.readFileAsText("/internal/stderr"),
@@ -3068,10 +3082,10 @@ var ajv$1 = { exports: {} }, core$2 = {}, validate = {}, boolSchema = {}, errors
3068
3082
  if (typeof g == "string" && g[0] === '"' && !(_ instanceof r))
3069
3083
  return `"${_}${g.slice(1)}`;
3070
3084
  }
3071
- function f(_, g) {
3085
+ function p(_, g) {
3072
3086
  return g.emptyStr() ? _ : _.emptyStr() ? g : o`${_}${g}`;
3073
3087
  }
3074
- e.strConcat = f;
3088
+ e.strConcat = p;
3075
3089
  function $(_) {
3076
3090
  return typeof _ == "number" || typeof _ == "boolean" || _ === null ? _ : C(Array.isArray(_) ? _.join(",") : _);
3077
3091
  }
@@ -3116,8 +3130,8 @@ var scope = {};
3116
3130
  var: new t.Name("var")
3117
3131
  };
3118
3132
  class s {
3119
- constructor({ prefixes: u, parent: f } = {}) {
3120
- this._names = {}, this._prefixes = u, this._parent = f;
3133
+ constructor({ prefixes: u, parent: p } = {}) {
3134
+ this._names = {}, this._prefixes = u, this._parent = p;
3121
3135
  }
3122
3136
  toName(u) {
3123
3137
  return u instanceof t.Name ? u : this.name(u);
@@ -3126,23 +3140,23 @@ var scope = {};
3126
3140
  return new t.Name(this._newName(u));
3127
3141
  }
3128
3142
  _newName(u) {
3129
- const f = this._names[u] || this._nameGroup(u);
3130
- return `${u}${f.index++}`;
3143
+ const p = this._names[u] || this._nameGroup(u);
3144
+ return `${u}${p.index++}`;
3131
3145
  }
3132
3146
  _nameGroup(u) {
3133
- var f, $;
3134
- if (!(($ = (f = this._parent) === null || f === void 0 ? void 0 : f._prefixes) === null || $ === void 0) && $.has(u) || this._prefixes && !this._prefixes.has(u))
3147
+ var p, $;
3148
+ if (!(($ = (p = this._parent) === null || p === void 0 ? void 0 : p._prefixes) === null || $ === void 0) && $.has(u) || this._prefixes && !this._prefixes.has(u))
3135
3149
  throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);
3136
3150
  return this._names[u] = { prefix: u, index: 0 };
3137
3151
  }
3138
3152
  }
3139
3153
  e.Scope = s;
3140
3154
  class i extends t.Name {
3141
- constructor(u, f) {
3142
- super(f), this.prefix = u;
3155
+ constructor(u, p) {
3156
+ super(p), this.prefix = u;
3143
3157
  }
3144
- setValue(u, { property: f, itemIndex: $ }) {
3145
- this.value = u, this.scopePath = (0, t._)`.${new t.Name(f)}[${$}]`;
3158
+ setValue(u, { property: p, itemIndex: $ }) {
3159
+ this.value = u, this.scopePath = (0, t._)`.${new t.Name(p)}[${$}]`;
3146
3160
  }
3147
3161
  }
3148
3162
  e.ValueScopeName = i;
@@ -3157,11 +3171,11 @@ var scope = {};
3157
3171
  name(u) {
3158
3172
  return new i(u, this._newName(u));
3159
3173
  }
3160
- value(u, f) {
3174
+ value(u, p) {
3161
3175
  var $;
3162
- if (f.ref === void 0)
3176
+ if (p.ref === void 0)
3163
3177
  throw new Error("CodeGen: ref must be passed in value");
3164
- const O = this.toName(u), { prefix: C } = O, S = ($ = f.key) !== null && $ !== void 0 ? $ : f.ref;
3178
+ const O = this.toName(u), { prefix: C } = O, S = ($ = p.key) !== null && $ !== void 0 ? $ : p.ref;
3165
3179
  let T = this._values[C];
3166
3180
  if (T) {
3167
3181
  const g = T.get(S);
@@ -3171,28 +3185,28 @@ var scope = {};
3171
3185
  T = this._values[C] = /* @__PURE__ */ new Map();
3172
3186
  T.set(S, O);
3173
3187
  const y = this._scope[C] || (this._scope[C] = []), _ = y.length;
3174
- return y[_] = f.ref, O.setValue(f, { property: C, itemIndex: _ }), O;
3188
+ return y[_] = p.ref, O.setValue(p, { property: C, itemIndex: _ }), O;
3175
3189
  }
3176
- getValue(u, f) {
3190
+ getValue(u, p) {
3177
3191
  const $ = this._values[u];
3178
3192
  if ($)
3179
- return $.get(f);
3193
+ return $.get(p);
3180
3194
  }
3181
- scopeRefs(u, f = this._values) {
3182
- return this._reduceValues(f, ($) => {
3195
+ scopeRefs(u, p = this._values) {
3196
+ return this._reduceValues(p, ($) => {
3183
3197
  if ($.scopePath === void 0)
3184
3198
  throw new Error(`CodeGen: name "${$}" has no value`);
3185
3199
  return (0, t._)`${u}${$.scopePath}`;
3186
3200
  });
3187
3201
  }
3188
- scopeCode(u = this._values, f, $) {
3202
+ scopeCode(u = this._values, p, $) {
3189
3203
  return this._reduceValues(u, (O) => {
3190
3204
  if (O.value === void 0)
3191
3205
  throw new Error(`CodeGen: name "${O}" has no value`);
3192
3206
  return O.value.code;
3193
- }, f, $);
3207
+ }, p, $);
3194
3208
  }
3195
- _reduceValues(u, f, $ = {}, O) {
3209
+ _reduceValues(u, p, $ = {}, O) {
3196
3210
  let C = t.nil;
3197
3211
  for (const S in u) {
3198
3212
  const T = u[S];
@@ -3203,7 +3217,7 @@ var scope = {};
3203
3217
  if (y.has(_))
3204
3218
  return;
3205
3219
  y.set(_, n.Started);
3206
- let g = f(_);
3220
+ let g = p(_);
3207
3221
  if (g) {
3208
3222
  const P = this.opts.es5 ? e.varKinds.var : e.varKinds.const;
3209
3223
  C = (0, t._)`${C}${P} ${_} = ${g};${this.opts._n}`;
@@ -3317,7 +3331,7 @@ var scope = {};
3317
3331
  return `${this.label}:` + a;
3318
3332
  }
3319
3333
  }
3320
- class f extends i {
3334
+ class p extends i {
3321
3335
  constructor(a) {
3322
3336
  super(), this.label = a, this.names = {};
3323
3337
  }
@@ -3650,7 +3664,7 @@ var scope = {};
3650
3664
  }
3651
3665
  // `break` statement
3652
3666
  break(a) {
3653
- return this._leafNode(new f(a));
3667
+ return this._leafNode(new p(a));
3654
3668
  }
3655
3669
  // `return` statement
3656
3670
  return(a) {
@@ -3834,10 +3848,10 @@ var util = {};
3834
3848
  return O(decodeURIComponent(w));
3835
3849
  }
3836
3850
  e.unescapeFragment = u;
3837
- function f(w) {
3851
+ function p(w) {
3838
3852
  return encodeURIComponent($(w));
3839
3853
  }
3840
- e.escapeFragment = f;
3854
+ e.escapeFragment = p;
3841
3855
  function $(w) {
3842
3856
  return typeof w == "number" ? `${w}` : w.replace(/~/g, "~0").replace(/\//g, "~1");
3843
3857
  }
@@ -3983,7 +3997,7 @@ names$1.default = names;
3983
3997
  const { gen: g, validateName: P, schemaEnv: I } = y;
3984
3998
  I.$async ? g.throw((0, t._)`new ${y.ValidationError}(${_})`) : (g.assign((0, t._)`${P}.errors`, _), g.return(!1));
3985
3999
  }
3986
- const f = {
4000
+ const p = {
3987
4001
  keyword: new t.Name("keyword"),
3988
4002
  schemaPath: new t.Name("schemaPath"),
3989
4003
  params: new t.Name("params"),
@@ -4009,11 +4023,11 @@ names$1.default = names;
4009
4023
  }
4010
4024
  function S({ keyword: y, it: { errSchemaPath: _ } }, { schemaPath: g, parentSchema: P }) {
4011
4025
  let I = P ? _ : (0, t.str)`${_}/${y}`;
4012
- return g && (I = (0, t.str)`${I}${(0, r.getErrorPath)(g, r.Type.Str)}`), [f.schemaPath, I];
4026
+ return g && (I = (0, t.str)`${I}${(0, r.getErrorPath)(g, r.Type.Str)}`), [p.schemaPath, I];
4013
4027
  }
4014
4028
  function T(y, { params: _, message: g }, P) {
4015
4029
  const { keyword: I, data: D, schemaValue: w, it: k } = y, { opts: A, propertyName: V, topSchemaRef: x, schemaPath: re } = k;
4016
- P.push([f.keyword, I], [f.params, typeof _ == "function" ? _(y) : _ || (0, t._)`{}`]), A.messages && P.push([f.message, typeof g == "function" ? g(y) : g]), A.verbose && P.push([f.schema, w], [f.parentSchema, (0, t._)`${x}${re}`], [n.default.data, D]), V && P.push([f.propertyName, V]);
4030
+ P.push([p.keyword, I], [p.params, typeof _ == "function" ? _(y) : _ || (0, t._)`{}`]), A.messages && P.push([p.message, typeof g == "function" ? g(y) : g]), A.verbose && P.push([p.schema, w], [p.parentSchema, (0, t._)`${x}${re}`], [n.default.data, D]), V && P.push([p.propertyName, V]);
4017
4031
  }
4018
4032
  })(errors);
4019
4033
  Object.defineProperty(boolSchema, "__esModule", { value: !0 });
@@ -4123,15 +4137,15 @@ applicability.shouldUseRule = shouldUseRule;
4123
4137
  return V;
4124
4138
  }
4125
4139
  e.coerceAndCheckDataType = u;
4126
- const f = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
4140
+ const p = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
4127
4141
  function $(P, I) {
4128
- return I ? P.filter((D) => f.has(D) || I === "array" && D === "array") : [];
4142
+ return I ? P.filter((D) => p.has(D) || I === "array" && D === "array") : [];
4129
4143
  }
4130
4144
  function O(P, I, D) {
4131
4145
  const { gen: w, data: k, opts: A } = P, V = w.let("dataType", (0, s._)`typeof ${k}`), x = w.let("coerced", (0, s._)`undefined`);
4132
4146
  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(T(I, k, A.strictNumbers), () => w.assign(x, k))), w.if((0, s._)`${x} !== undefined`);
4133
4147
  for (const K of D)
4134
- (f.has(K) || K === "array" && A.coerceTypes === "array") && re(K);
4148
+ (p.has(K) || K === "array" && A.coerceTypes === "array") && re(K);
4135
4149
  w.else(), _(P), w.endIf(), w.if((0, s._)`${x} !== undefined`, () => {
4136
4150
  w.assign(k, x), C(P, x);
4137
4151
  });
@@ -4305,14 +4319,14 @@ function schemaProperties(e, t) {
4305
4319
  }
4306
4320
  code.schemaProperties = schemaProperties;
4307
4321
  function callValidateCode({ schemaCode: e, data: t, it: { gen: r, topSchemaRef: n, schemaPath: s, errorPath: i }, it: o }, l, d, u) {
4308
- const f = u ? (0, codegen_1$q._)`${e}, ${t}, ${n}${s}` : t, $ = [
4322
+ const p = u ? (0, codegen_1$q._)`${e}, ${t}, ${n}${s}` : t, $ = [
4309
4323
  [names_1$5.default.instancePath, (0, codegen_1$q.strConcat)(names_1$5.default.instancePath, i)],
4310
4324
  [names_1$5.default.parentData, o.parentData],
4311
4325
  [names_1$5.default.parentDataProperty, o.parentDataProperty],
4312
4326
  [names_1$5.default.rootData, names_1$5.default.rootData]
4313
4327
  ];
4314
4328
  o.opts.dynamicRef && $.push([names_1$5.default.dynamicAnchors, names_1$5.default.dynamicAnchors]);
4315
- const O = (0, codegen_1$q._)`${f}, ${r.object(...$)}`;
4329
+ const O = (0, codegen_1$q._)`${p}, ${r.object(...$)}`;
4316
4330
  return d !== codegen_1$q.nil ? (0, codegen_1$q._)`${l}.call(${d}, ${O})` : (0, codegen_1$q._)`${l}(${O})`;
4317
4331
  }
4318
4332
  code.callValidateCode = callValidateCode;
@@ -4353,12 +4367,12 @@ function validateUnion(e) {
4353
4367
  return;
4354
4368
  const o = t.let("valid", !1), l = t.name("_valid");
4355
4369
  t.block(() => r.forEach((d, u) => {
4356
- const f = e.subschema({
4370
+ const p = e.subschema({
4357
4371
  keyword: n,
4358
4372
  schemaProp: u,
4359
4373
  compositeRule: !0
4360
4374
  }, l);
4361
- t.assign(o, (0, codegen_1$q._)`${o} || ${l}`), e.mergeValidEvaluated(f, l) || t.if((0, codegen_1$q.not)(o));
4375
+ t.assign(o, (0, codegen_1$q._)`${o} || ${l}`), e.mergeValidEvaluated(p, l) || t.if((0, codegen_1$q.not)(o));
4362
4376
  })), e.result(o, () => e.reset(), () => e.error(!0));
4363
4377
  }
4364
4378
  code.validateUnion = validateUnion;
@@ -4382,7 +4396,7 @@ function funcKeywordCode(e, t) {
4382
4396
  var r;
4383
4397
  const { gen: n, keyword: s, schema: i, parentSchema: o, $data: l, it: d } = e;
4384
4398
  checkAsyncKeyword(d, t);
4385
- const u = !l && t.compile ? t.compile.call(d.self, i, o, d) : t.validate, f = useKeyword(n, s, u), $ = n.let("valid");
4399
+ const u = !l && t.compile ? t.compile.call(d.self, i, o, d) : t.validate, p = useKeyword(n, s, u), $ = n.let("valid");
4386
4400
  e.block$data($, O), e.ok((r = t.valid) !== null && r !== void 0 ? r : $);
4387
4401
  function O() {
4388
4402
  if (t.errors === !1)
@@ -4397,12 +4411,12 @@ function funcKeywordCode(e, t) {
4397
4411
  return n.try(() => T((0, codegen_1$p._)`await `), (g) => n.assign($, !1).if((0, codegen_1$p._)`${g} instanceof ${d.ValidationError}`, () => n.assign(_, (0, codegen_1$p._)`${g}.errors`), () => n.throw(g))), _;
4398
4412
  }
4399
4413
  function S() {
4400
- const _ = (0, codegen_1$p._)`${f}.errors`;
4414
+ const _ = (0, codegen_1$p._)`${p}.errors`;
4401
4415
  return n.assign(_, null), T(codegen_1$p.nil), _;
4402
4416
  }
4403
4417
  function T(_ = t.async ? (0, codegen_1$p._)`await ` : codegen_1$p.nil) {
4404
4418
  const g = d.opts.passContext ? names_1$4.default.this : names_1$4.default.self, P = !("compile" in t && !l || t.schema === !1);
4405
- n.assign($, (0, codegen_1$p._)`${_}${(0, code_1$9.callValidateCode)(e, f, g, P)}`, t.modifying);
4419
+ n.assign($, (0, codegen_1$p._)`${_}${(0, code_1$9.callValidateCode)(e, p, g, P)}`, t.modifying);
4406
4420
  }
4407
4421
  function y(_) {
4408
4422
  var g;
@@ -4485,8 +4499,8 @@ function extendSubschemaData(e, t, { dataProp: r, dataPropType: n, data: s, data
4485
4499
  throw new Error('both "data" and "dataProp" passed, only one allowed');
4486
4500
  const { gen: l } = t;
4487
4501
  if (r !== void 0) {
4488
- const { errorPath: u, dataPathArr: f, opts: $ } = t, O = l.let("data", (0, codegen_1$o._)`${t.data}${(0, codegen_1$o.getProperty)(r)}`, !0);
4489
- d(O), e.errorPath = (0, codegen_1$o.str)`${u}${(0, util_1$n.getErrorPath)(r, n, $.jsPropertySyntax)}`, e.parentDataProperty = (0, codegen_1$o._)`${r}`, e.dataPathArr = [...f, e.parentDataProperty];
4502
+ const { errorPath: u, dataPathArr: p, opts: $ } = t, O = l.let("data", (0, codegen_1$o._)`${t.data}${(0, codegen_1$o.getProperty)(r)}`, !0);
4503
+ d(O), e.errorPath = (0, codegen_1$o.str)`${u}${(0, util_1$n.getErrorPath)(r, n, $.jsPropertySyntax)}`, e.parentDataProperty = (0, codegen_1$o._)`${r}`, e.dataPathArr = [...p, e.parentDataProperty];
4490
4504
  }
4491
4505
  if (s !== void 0) {
4492
4506
  const u = s instanceof codegen_1$o.Name ? s : l.let("data", s, !0);
@@ -4590,18 +4604,18 @@ traverse$1.skipKeywords = {
4590
4604
  function _traverse(e, t, r, n, s, i, o, l, d, u) {
4591
4605
  if (n && typeof n == "object" && !Array.isArray(n)) {
4592
4606
  t(n, s, i, o, l, d, u);
4593
- for (var f in n) {
4594
- var $ = n[f];
4607
+ for (var p in n) {
4608
+ var $ = n[p];
4595
4609
  if (Array.isArray($)) {
4596
- if (f in traverse$1.arrayKeywords)
4610
+ if (p in traverse$1.arrayKeywords)
4597
4611
  for (var O = 0; O < $.length; O++)
4598
- _traverse(e, t, r, $[O], s + "/" + f + "/" + O, i, s, f, n, O);
4599
- } else if (f in traverse$1.propsKeywords) {
4612
+ _traverse(e, t, r, $[O], s + "/" + p + "/" + O, i, s, p, n, O);
4613
+ } else if (p in traverse$1.propsKeywords) {
4600
4614
  if ($ && typeof $ == "object")
4601
4615
  for (var C in $)
4602
- _traverse(e, t, r, $[C], s + "/" + f + "/" + escapeJsonPtr(C), i, s, f, n, C);
4616
+ _traverse(e, t, r, $[C], s + "/" + p + "/" + escapeJsonPtr(C), i, s, p, n, C);
4603
4617
  } else
4604
- (f in traverse$1.keywords || e.allKeys && !(f in traverse$1.skipKeywords)) && _traverse(e, t, r, $, s + "/" + f, i, s, f, n);
4618
+ (p in traverse$1.keywords || e.allKeys && !(p in traverse$1.skipKeywords)) && _traverse(e, t, r, $, s + "/" + p, i, s, p, n);
4605
4619
  }
4606
4620
  r(n, s, i, o, l, d, u);
4607
4621
  }
@@ -4694,7 +4708,7 @@ function getSchemaRefs(e, t) {
4694
4708
  function _(P) {
4695
4709
  const I = this.opts.uriResolver.resolve;
4696
4710
  if (P = normalizeId(y ? I(y, P) : P), d.has(P))
4697
- throw f(P);
4711
+ throw p(P);
4698
4712
  d.add(P);
4699
4713
  let D = this.refs[P];
4700
4714
  return typeof D == "string" && (D = this.refs[D]), typeof D == "object" ? u($, D.schema, P) : P !== normalizeId(T) && (P[0] === "#" ? (u($, l[P], P), l[P] = $) : this.refs[P] = T), P;
@@ -4709,9 +4723,9 @@ function getSchemaRefs(e, t) {
4709
4723
  }), l;
4710
4724
  function u($, O, C) {
4711
4725
  if (O !== void 0 && !equal$2($, O))
4712
- throw f(C);
4726
+ throw p(C);
4713
4727
  }
4714
- function f($) {
4728
+ function p($) {
4715
4729
  return new Error(`reference "${$}" resolves to more than one schema`);
4716
4730
  }
4717
4731
  }
@@ -4822,15 +4836,15 @@ function assignEvaluated({ gen: e, evaluated: t, props: r, items: n }) {
4822
4836
  r instanceof codegen_1$n.Name && e.assign((0, codegen_1$n._)`${t}.props`, r), n instanceof codegen_1$n.Name && e.assign((0, codegen_1$n._)`${t}.items`, n);
4823
4837
  }
4824
4838
  function schemaKeywords(e, t, r, n) {
4825
- const { gen: s, schema: i, data: o, allErrors: l, opts: d, self: u } = e, { RULES: f } = u;
4826
- if (i.$ref && (d.ignoreKeywordsWithRef || !(0, util_1$l.schemaHasRulesButRef)(i, f))) {
4827
- s.block(() => keywordCode(e, "$ref", f.all.$ref.definition));
4839
+ const { gen: s, schema: i, data: o, allErrors: l, opts: d, self: u } = e, { RULES: p } = u;
4840
+ if (i.$ref && (d.ignoreKeywordsWithRef || !(0, util_1$l.schemaHasRulesButRef)(i, p))) {
4841
+ s.block(() => keywordCode(e, "$ref", p.all.$ref.definition));
4828
4842
  return;
4829
4843
  }
4830
4844
  d.jtd || checkStrictTypes(e, t), s.block(() => {
4831
- for (const O of f.rules)
4845
+ for (const O of p.rules)
4832
4846
  $(O);
4833
- $(f.post);
4847
+ $(p.post);
4834
4848
  });
4835
4849
  function $(O) {
4836
4850
  (0, applicability_1.shouldUseGroup)(i, O) && (O.type ? (s.if((0, dataType_2.checkDataType)(O.type, o, d.strictNumbers)), iterateKeywords(e, O), t.length === 1 && t[0] === O.type && r && (s.else(), (0, dataType_2.reportTypeError)(e)), s.endIf()) : iterateKeywords(e, O), l || s.if((0, codegen_1$n._)`${names_1$3.default.errors} === ${n || 0}`));
@@ -5005,15 +5019,15 @@ function getData(e, { dataLevel: t, dataNames: r, dataPathArr: n }) {
5005
5019
  const u = RELATIVE_JSON_POINTER.exec(e);
5006
5020
  if (!u)
5007
5021
  throw new Error(`Invalid JSON-pointer: ${e}`);
5008
- const f = +u[1];
5022
+ const p = +u[1];
5009
5023
  if (s = u[2], s === "#") {
5010
- if (f >= t)
5011
- throw new Error(d("property/index", f));
5012
- return n[t - f];
5024
+ if (p >= t)
5025
+ throw new Error(d("property/index", p));
5026
+ return n[t - p];
5013
5027
  }
5014
- if (f > t)
5015
- throw new Error(d("data", f));
5016
- if (i = r[t - f], !s)
5028
+ if (p > t)
5029
+ throw new Error(d("data", p));
5030
+ if (i = r[t - p], !s)
5017
5031
  return i;
5018
5032
  }
5019
5033
  let o = i;
@@ -5021,8 +5035,8 @@ function getData(e, { dataLevel: t, dataNames: r, dataPathArr: n }) {
5021
5035
  for (const u of l)
5022
5036
  u && (i = (0, codegen_1$n._)`${i}${(0, codegen_1$n.getProperty)((0, util_1$l.unescapeJsonPointer)(u))}`, o = (0, codegen_1$n._)`${o} && ${i}`);
5023
5037
  return o;
5024
- function d(u, f) {
5025
- return `Cannot access ${u} ${f} levels up, current level is ${t}`;
5038
+ function d(u, p) {
5039
+ return `Cannot access ${u} ${p} levels up, current level is ${t}`;
5026
5040
  }
5027
5041
  }
5028
5042
  validate.getData = getData;
@@ -5092,12 +5106,12 @@ function compileSchema(e) {
5092
5106
  opts: this.opts,
5093
5107
  self: this
5094
5108
  };
5095
- let f;
5109
+ let p;
5096
5110
  try {
5097
5111
  this._compilations.add(e), (0, validate_1$1.validateFunctionCode)(u), o.optimize(this.opts.code.optimize);
5098
5112
  const $ = o.toString();
5099
- f = `${o.scopeRefs(names_1$2.default.scope)}return ${$}`, this.opts.code.process && (f = this.opts.code.process(f, e));
5100
- const C = new Function(`${names_1$2.default.self}`, `${names_1$2.default.scope}`, f)(this, this.scope.get());
5113
+ p = `${o.scopeRefs(names_1$2.default.scope)}return ${$}`, this.opts.code.process && (p = this.opts.code.process(p, e));
5114
+ const C = new Function(`${names_1$2.default.self}`, `${names_1$2.default.scope}`, p)(this, this.scope.get());
5101
5115
  if (this.scope.value(d, { ref: C }), C.errors = null, C.schema = e.schema, C.schemaEnv = e, e.$async && (C.$async = !0), this.opts.code.source === !0 && (C.source = { validateName: d, validateCode: $, scopeValues: o._values }), this.opts.unevaluated) {
5102
5116
  const { props: S, items: T } = u;
5103
5117
  C.evaluated = {
@@ -5109,7 +5123,7 @@ function compileSchema(e) {
5109
5123
  }
5110
5124
  return e.validate = C, e;
5111
5125
  } catch ($) {
5112
- throw delete e.validate, delete e.validateName, f && this.logger.error("Error compiling schema, function code:", f), $;
5126
+ throw delete e.validate, delete e.validateName, p && this.logger.error("Error compiling schema, function code:", p), $;
5113
5127
  } finally {
5114
5128
  this._compilations.delete(e);
5115
5129
  }
@@ -5226,7 +5240,7 @@ var uri$1 = {}, uri_all = { exports: {} };
5226
5240
  n(t);
5227
5241
  })(commonjsGlobal, function(r) {
5228
5242
  function n() {
5229
- for (var p = arguments.length, c = Array(p), m = 0; m < p; m++)
5243
+ for (var f = arguments.length, c = Array(f), m = 0; m < f; m++)
5230
5244
  c[m] = arguments[m];
5231
5245
  if (c.length > 1) {
5232
5246
  c[0] = c[0].slice(0, -1);
@@ -5236,27 +5250,27 @@ var uri$1 = {}, uri_all = { exports: {} };
5236
5250
  } else
5237
5251
  return c[0];
5238
5252
  }
5239
- function s(p) {
5240
- return "(?:" + p + ")";
5253
+ function s(f) {
5254
+ return "(?:" + f + ")";
5241
5255
  }
5242
- function i(p) {
5243
- return p === void 0 ? "undefined" : p === null ? "null" : Object.prototype.toString.call(p).split(" ").pop().split("]").shift().toLowerCase();
5256
+ function i(f) {
5257
+ return f === void 0 ? "undefined" : f === null ? "null" : Object.prototype.toString.call(f).split(" ").pop().split("]").shift().toLowerCase();
5244
5258
  }
5245
- function o(p) {
5246
- return p.toUpperCase();
5259
+ function o(f) {
5260
+ return f.toUpperCase();
5247
5261
  }
5248
- function l(p) {
5249
- return p != null ? p instanceof Array ? p : typeof p.length != "number" || p.split || p.setInterval || p.call ? [p] : Array.prototype.slice.call(p) : [];
5262
+ function l(f) {
5263
+ return f != null ? f instanceof Array ? f : typeof f.length != "number" || f.split || f.setInterval || f.call ? [f] : Array.prototype.slice.call(f) : [];
5250
5264
  }
5251
- function d(p, c) {
5252
- var m = p;
5265
+ function d(f, c) {
5266
+ var m = f;
5253
5267
  if (c)
5254
5268
  for (var R in c)
5255
5269
  m[R] = c[R];
5256
5270
  return m;
5257
5271
  }
5258
- function u(p) {
5259
- var c = "[A-Za-z]", m = "[0-9]", R = n(m, "[A-Fa-f]"), E = s(s("%[EFef]" + R + "%" + R + R + "%" + R + R) + "|" + s("%[89A-Fa-f]" + R + "%" + R + R) + "|" + s("%" + R + R)), U = "[\\:\\/\\?\\#\\[\\]\\@]", L = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", J = n(U, L), Y = p ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", se = p ? "[\\uE000-\\uF8FF]" : "[]", B = n(c, m, "[\\-\\.\\_\\~]", Y);
5272
+ function u(f) {
5273
+ var c = "[A-Za-z]", m = "[0-9]", R = n(m, "[A-Fa-f]"), E = s(s("%[EFef]" + R + "%" + R + R + "%" + R + R) + "|" + s("%[89A-Fa-f]" + R + "%" + R + R) + "|" + s("%" + R + R)), U = "[\\:\\/\\?\\#\\[\\]\\@]", L = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", J = n(U, L), Y = f ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", se = f ? "[\\uE000-\\uF8FF]" : "[]", B = n(c, m, "[\\-\\.\\_\\~]", Y);
5260
5274
  s(c + n(c, m, "[\\+\\-\\.]") + "*"), s(s(E + "|" + n(B, L, "[\\:]")) + "*");
5261
5275
  var Z = s(s("25[0-5]") + "|" + s("2[0-4]" + m) + "|" + s("1" + m + m) + "|" + s("0?[1-9]" + m) + "|0?0?" + m), ie = s(Z + "\\." + Z + "\\." + Z + "\\." + Z), z = s(R + "{1,4}"), X = s(s(z + "\\:" + z) + "|" + ie), ae = s(s(z + "\\:") + "{6}" + X), ee = s("\\:\\:" + s(z + "\\:") + "{5}" + X), Se = s(s(z) + "?\\:\\:" + s(z + "\\:") + "{4}" + X), $e = s(s(s(z + "\\:") + "{0,1}" + z) + "?\\:\\:" + s(z + "\\:") + "{3}" + X), ge = s(s(s(z + "\\:") + "{0,2}" + z) + "?\\:\\:" + s(z + "\\:") + "{2}" + X), Be = s(s(s(z + "\\:") + "{0,3}" + z) + "?\\:\\:" + z + "\\:" + X), Ie = s(s(s(z + "\\:") + "{0,4}" + z) + "?\\:\\:" + X), fe = s(s(s(z + "\\:") + "{0,5}" + z) + "?\\:\\:" + z), ye = s(s(s(z + "\\:") + "{0,6}" + z) + "?\\:\\:"), je = s([ae, ee, Se, $e, ge, Be, Ie, fe, ye].join("|")), we = s(s(B + "|" + E) + "+");
5262
5276
  s("[vV]" + R + "+\\." + n(B, L, "[\\:]") + "+"), s(s(E + "|" + n(B, L)) + "*");
@@ -5278,8 +5292,8 @@ var uri$1 = {}, uri_all = { exports: {} };
5278
5292
  //RFC 6874, with relaxed parsing rules
5279
5293
  };
5280
5294
  }
5281
- var f = u(!1), $ = u(!0), O = function() {
5282
- function p(c, m) {
5295
+ var p = u(!1), $ = u(!0), O = function() {
5296
+ function f(c, m) {
5283
5297
  var R = [], E = !0, U = !1, L = void 0;
5284
5298
  try {
5285
5299
  for (var J = c[Symbol.iterator](), Y; !(E = (Y = J.next()).done) && (R.push(Y.value), !(m && R.length === m)); E = !0)
@@ -5300,40 +5314,40 @@ var uri$1 = {}, uri_all = { exports: {} };
5300
5314
  if (Array.isArray(c))
5301
5315
  return c;
5302
5316
  if (Symbol.iterator in Object(c))
5303
- return p(c, m);
5317
+ return f(c, m);
5304
5318
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
5305
5319
  };
5306
- }(), C = function(p) {
5307
- if (Array.isArray(p)) {
5308
- for (var c = 0, m = Array(p.length); c < p.length; c++)
5309
- m[c] = p[c];
5320
+ }(), C = function(f) {
5321
+ if (Array.isArray(f)) {
5322
+ for (var c = 0, m = Array(f.length); c < f.length; c++)
5323
+ m[c] = f[c];
5310
5324
  return m;
5311
5325
  } else
5312
- return Array.from(p);
5326
+ return Array.from(f);
5313
5327
  }, S = 2147483647, T = 36, y = 1, _ = 26, g = 38, P = 700, I = 72, D = 128, w = "-", k = /^xn--/, A = /[^\0-\x7E]/, V = /[\x2E\u3002\uFF0E\uFF61]/g, x = {
5314
5328
  overflow: "Overflow: input needs wider integers to process",
5315
5329
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
5316
5330
  "invalid-input": "Invalid input"
5317
5331
  }, re = T - y, K = Math.floor, ue = String.fromCharCode;
5318
- function oe(p) {
5319
- throw new RangeError(x[p]);
5332
+ function oe(f) {
5333
+ throw new RangeError(x[f]);
5320
5334
  }
5321
- function ke(p, c) {
5322
- for (var m = [], R = p.length; R--; )
5323
- m[R] = c(p[R]);
5335
+ function ke(f, c) {
5336
+ for (var m = [], R = f.length; R--; )
5337
+ m[R] = c(f[R]);
5324
5338
  return m;
5325
5339
  }
5326
- function Ce(p, c) {
5327
- var m = p.split("@"), R = "";
5328
- m.length > 1 && (R = m[0] + "@", p = m[1]), p = p.replace(V, ".");
5329
- var E = p.split("."), U = ke(E, c).join(".");
5340
+ function Ce(f, c) {
5341
+ var m = f.split("@"), R = "";
5342
+ m.length > 1 && (R = m[0] + "@", f = m[1]), f = f.replace(V, ".");
5343
+ var E = f.split("."), U = ke(E, c).join(".");
5330
5344
  return R + U;
5331
5345
  }
5332
- function qe(p) {
5333
- for (var c = [], m = 0, R = p.length; m < R; ) {
5334
- var E = p.charCodeAt(m++);
5346
+ function qe(f) {
5347
+ for (var c = [], m = 0, R = f.length; m < R; ) {
5348
+ var E = f.charCodeAt(m++);
5335
5349
  if (E >= 55296 && E <= 56319 && m < R) {
5336
- var U = p.charCodeAt(m++);
5350
+ var U = f.charCodeAt(m++);
5337
5351
  (U & 64512) == 56320 ? c.push(((E & 1023) << 10) + (U & 1023) + 65536) : (c.push(E), m--);
5338
5352
  } else
5339
5353
  c.push(E);
@@ -5484,50 +5498,50 @@ var uri$1 = {}, uri_all = { exports: {} };
5484
5498
  toASCII: h,
5485
5499
  toUnicode: a
5486
5500
  }, M = {};
5487
- function q(p) {
5488
- var c = p.charCodeAt(0), m = void 0;
5501
+ function q(f) {
5502
+ var c = f.charCodeAt(0), m = void 0;
5489
5503
  return c < 16 ? m = "%0" + c.toString(16).toUpperCase() : c < 128 ? m = "%" + c.toString(16).toUpperCase() : c < 2048 ? m = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase() : m = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(), m;
5490
5504
  }
5491
- function W(p) {
5492
- for (var c = "", m = 0, R = p.length; m < R; ) {
5493
- var E = parseInt(p.substr(m + 1, 2), 16);
5505
+ function W(f) {
5506
+ for (var c = "", m = 0, R = f.length; m < R; ) {
5507
+ var E = parseInt(f.substr(m + 1, 2), 16);
5494
5508
  if (E < 128)
5495
5509
  c += String.fromCharCode(E), m += 3;
5496
5510
  else if (E >= 194 && E < 224) {
5497
5511
  if (R - m >= 6) {
5498
- var U = parseInt(p.substr(m + 4, 2), 16);
5512
+ var U = parseInt(f.substr(m + 4, 2), 16);
5499
5513
  c += String.fromCharCode((E & 31) << 6 | U & 63);
5500
5514
  } else
5501
- c += p.substr(m, 6);
5515
+ c += f.substr(m, 6);
5502
5516
  m += 6;
5503
5517
  } else if (E >= 224) {
5504
5518
  if (R - m >= 9) {
5505
- var L = parseInt(p.substr(m + 4, 2), 16), J = parseInt(p.substr(m + 7, 2), 16);
5519
+ var L = parseInt(f.substr(m + 4, 2), 16), J = parseInt(f.substr(m + 7, 2), 16);
5506
5520
  c += String.fromCharCode((E & 15) << 12 | (L & 63) << 6 | J & 63);
5507
5521
  } else
5508
- c += p.substr(m, 9);
5522
+ c += f.substr(m, 9);
5509
5523
  m += 9;
5510
5524
  } else
5511
- c += p.substr(m, 3), m += 3;
5525
+ c += f.substr(m, 3), m += 3;
5512
5526
  }
5513
5527
  return c;
5514
5528
  }
5515
- function G(p, c) {
5529
+ function G(f, c) {
5516
5530
  function m(R) {
5517
5531
  var E = W(R);
5518
5532
  return E.match(c.UNRESERVED) ? E : R;
5519
5533
  }
5520
- return p.scheme && (p.scheme = String(p.scheme).replace(c.PCT_ENCODED, m).toLowerCase().replace(c.NOT_SCHEME, "")), p.userinfo !== void 0 && (p.userinfo = String(p.userinfo).replace(c.PCT_ENCODED, m).replace(c.NOT_USERINFO, q).replace(c.PCT_ENCODED, o)), p.host !== void 0 && (p.host = String(p.host).replace(c.PCT_ENCODED, m).toLowerCase().replace(c.NOT_HOST, q).replace(c.PCT_ENCODED, o)), p.path !== void 0 && (p.path = String(p.path).replace(c.PCT_ENCODED, m).replace(p.scheme ? c.NOT_PATH : c.NOT_PATH_NOSCHEME, q).replace(c.PCT_ENCODED, o)), p.query !== void 0 && (p.query = String(p.query).replace(c.PCT_ENCODED, m).replace(c.NOT_QUERY, q).replace(c.PCT_ENCODED, o)), p.fragment !== void 0 && (p.fragment = String(p.fragment).replace(c.PCT_ENCODED, m).replace(c.NOT_FRAGMENT, q).replace(c.PCT_ENCODED, o)), p;
5534
+ return f.scheme && (f.scheme = String(f.scheme).replace(c.PCT_ENCODED, m).toLowerCase().replace(c.NOT_SCHEME, "")), f.userinfo !== void 0 && (f.userinfo = String(f.userinfo).replace(c.PCT_ENCODED, m).replace(c.NOT_USERINFO, q).replace(c.PCT_ENCODED, o)), f.host !== void 0 && (f.host = String(f.host).replace(c.PCT_ENCODED, m).toLowerCase().replace(c.NOT_HOST, q).replace(c.PCT_ENCODED, o)), f.path !== void 0 && (f.path = String(f.path).replace(c.PCT_ENCODED, m).replace(f.scheme ? c.NOT_PATH : c.NOT_PATH_NOSCHEME, q).replace(c.PCT_ENCODED, o)), f.query !== void 0 && (f.query = String(f.query).replace(c.PCT_ENCODED, m).replace(c.NOT_QUERY, q).replace(c.PCT_ENCODED, o)), f.fragment !== void 0 && (f.fragment = String(f.fragment).replace(c.PCT_ENCODED, m).replace(c.NOT_FRAGMENT, q).replace(c.PCT_ENCODED, o)), f;
5521
5535
  }
5522
- function ne(p) {
5523
- return p.replace(/^0*(.*)/, "$1") || "0";
5536
+ function ne(f) {
5537
+ return f.replace(/^0*(.*)/, "$1") || "0";
5524
5538
  }
5525
- function he(p, c) {
5526
- var m = p.match(c.IPV4ADDRESS) || [], R = O(m, 2), E = R[1];
5527
- return E ? E.split(".").map(ne).join(".") : p;
5539
+ function he(f, c) {
5540
+ var m = f.match(c.IPV4ADDRESS) || [], R = O(m, 2), E = R[1];
5541
+ return E ? E.split(".").map(ne).join(".") : f;
5528
5542
  }
5529
- function Le(p, c) {
5530
- var m = p.match(c.IPV6ADDRESS) || [], R = O(m, 3), E = R[1], U = R[2];
5543
+ function Le(f, c) {
5544
+ var m = f.match(c.IPV6ADDRESS) || [], R = O(m, 3), E = R[1], U = R[2];
5531
5545
  if (E) {
5532
5546
  for (var L = E.toLowerCase().split("::").reverse(), J = O(L, 2), Y = J[0], se = J[1], B = se ? se.split(":").map(ne) : [], Z = Y.split(":").map(ne), ie = c.IPV4ADDRESS.test(Z[Z.length - 1]), z = ie ? 7 : 8, X = Z.length - z, ae = Array(z), ee = 0; ee < z; ++ee)
5533
5547
  ae[ee] = B[ee] || Z[X + ee] || "";
@@ -5548,15 +5562,15 @@ var uri$1 = {}, uri_all = { exports: {} };
5548
5562
  ge = ae.join(":");
5549
5563
  return U && (ge += "%" + U), ge;
5550
5564
  } else
5551
- return p;
5565
+ return f;
5552
5566
  }
5553
5567
  var tt = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i, rt = "".match(/(){0}/)[1] === void 0;
5554
- function de(p) {
5555
- var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, m = {}, R = c.iri !== !1 ? $ : f;
5556
- c.reference === "suffix" && (p = (c.scheme ? c.scheme + ":" : "") + "//" + p);
5557
- var E = p.match(tt);
5568
+ function de(f) {
5569
+ var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, m = {}, R = c.iri !== !1 ? $ : p;
5570
+ c.reference === "suffix" && (f = (c.scheme ? c.scheme + ":" : "") + "//" + f);
5571
+ var E = f.match(tt);
5558
5572
  if (E) {
5559
- rt ? (m.scheme = E[1], m.userinfo = E[3], m.host = E[4], m.port = parseInt(E[5], 10), m.path = E[6] || "", m.query = E[7], m.fragment = E[8], isNaN(m.port) && (m.port = E[5])) : (m.scheme = E[1] || void 0, m.userinfo = p.indexOf("@") !== -1 ? E[3] : void 0, m.host = p.indexOf("//") !== -1 ? E[4] : void 0, m.port = parseInt(E[5], 10), m.path = E[6] || "", m.query = p.indexOf("?") !== -1 ? E[7] : void 0, m.fragment = p.indexOf("#") !== -1 ? E[8] : void 0, isNaN(m.port) && (m.port = p.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? E[4] : void 0)), m.host && (m.host = Le(he(m.host, R), R)), m.scheme === void 0 && m.userinfo === void 0 && m.host === void 0 && m.port === void 0 && !m.path && m.query === void 0 ? m.reference = "same-document" : m.scheme === void 0 ? m.reference = "relative" : m.fragment === void 0 ? m.reference = "absolute" : m.reference = "uri", c.reference && c.reference !== "suffix" && c.reference !== m.reference && (m.error = m.error || "URI is not a " + c.reference + " reference.");
5573
+ rt ? (m.scheme = E[1], m.userinfo = E[3], m.host = E[4], m.port = parseInt(E[5], 10), m.path = E[6] || "", m.query = E[7], m.fragment = E[8], isNaN(m.port) && (m.port = E[5])) : (m.scheme = E[1] || void 0, m.userinfo = f.indexOf("@") !== -1 ? E[3] : void 0, m.host = f.indexOf("//") !== -1 ? E[4] : void 0, m.port = parseInt(E[5], 10), m.path = E[6] || "", m.query = f.indexOf("?") !== -1 ? E[7] : void 0, m.fragment = f.indexOf("#") !== -1 ? E[8] : void 0, isNaN(m.port) && (m.port = f.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? E[4] : void 0)), m.host && (m.host = Le(he(m.host, R), R)), m.scheme === void 0 && m.userinfo === void 0 && m.host === void 0 && m.port === void 0 && !m.path && m.query === void 0 ? m.reference = "same-document" : m.scheme === void 0 ? m.reference = "relative" : m.fragment === void 0 ? m.reference = "absolute" : m.reference = "uri", c.reference && c.reference !== "suffix" && c.reference !== m.reference && (m.error = m.error || "URI is not a " + c.reference + " reference.");
5560
5574
  var U = M[(c.scheme || m.scheme || "").toLowerCase()];
5561
5575
  if (!c.unicodeSupport && (!U || !U.unicodeSupport)) {
5562
5576
  if (m.host && (c.domainHost || U && U.domainHost))
@@ -5565,7 +5579,7 @@ var uri$1 = {}, uri_all = { exports: {} };
5565
5579
  } catch (L) {
5566
5580
  m.error = m.error || "Host's domain name can not be converted to ASCII via punycode: " + L;
5567
5581
  }
5568
- G(m, f);
5582
+ G(m, p);
5569
5583
  } else
5570
5584
  G(m, R);
5571
5585
  U && U.parse && U.parse(m, c);
@@ -5573,70 +5587,70 @@ var uri$1 = {}, uri_all = { exports: {} };
5573
5587
  m.error = m.error || "URI can not be parsed.";
5574
5588
  return m;
5575
5589
  }
5576
- function nt(p, c) {
5577
- var m = c.iri !== !1 ? $ : f, R = [];
5578
- return p.userinfo !== void 0 && (R.push(p.userinfo), R.push("@")), p.host !== void 0 && R.push(Le(he(String(p.host), m), m).replace(m.IPV6ADDRESS, function(E, U, L) {
5590
+ function nt(f, c) {
5591
+ var m = c.iri !== !1 ? $ : p, R = [];
5592
+ return f.userinfo !== void 0 && (R.push(f.userinfo), R.push("@")), f.host !== void 0 && R.push(Le(he(String(f.host), m), m).replace(m.IPV6ADDRESS, function(E, U, L) {
5579
5593
  return "[" + U + (L ? "%25" + L : "") + "]";
5580
- })), (typeof p.port == "number" || typeof p.port == "string") && (R.push(":"), R.push(String(p.port))), R.length ? R.join("") : void 0;
5594
+ })), (typeof f.port == "number" || typeof f.port == "string") && (R.push(":"), R.push(String(f.port))), R.length ? R.join("") : void 0;
5581
5595
  }
5582
5596
  var He = /^\.\.?\//, Ve = /^\/\.(\/|$)/, ze = /^\/\.\.(\/|$)/, st = /^\/?(?:.|\n)*?(?=\/|$)/;
5583
- function me(p) {
5584
- for (var c = []; p.length; )
5585
- if (p.match(He))
5586
- p = p.replace(He, "");
5587
- else if (p.match(Ve))
5588
- p = p.replace(Ve, "/");
5589
- else if (p.match(ze))
5590
- p = p.replace(ze, "/"), c.pop();
5591
- else if (p === "." || p === "..")
5592
- p = "";
5597
+ function me(f) {
5598
+ for (var c = []; f.length; )
5599
+ if (f.match(He))
5600
+ f = f.replace(He, "");
5601
+ else if (f.match(Ve))
5602
+ f = f.replace(Ve, "/");
5603
+ else if (f.match(ze))
5604
+ f = f.replace(ze, "/"), c.pop();
5605
+ else if (f === "." || f === "..")
5606
+ f = "";
5593
5607
  else {
5594
- var m = p.match(st);
5608
+ var m = f.match(st);
5595
5609
  if (m) {
5596
5610
  var R = m[0];
5597
- p = p.slice(R.length), c.push(R);
5611
+ f = f.slice(R.length), c.push(R);
5598
5612
  } else
5599
5613
  throw new Error("Unexpected dot segment condition");
5600
5614
  }
5601
5615
  return c.join("");
5602
5616
  }
5603
- function le(p) {
5604
- var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, m = c.iri ? $ : f, R = [], E = M[(c.scheme || p.scheme || "").toLowerCase()];
5605
- if (E && E.serialize && E.serialize(p, c), p.host && !m.IPV6ADDRESS.test(p.host)) {
5617
+ function le(f) {
5618
+ var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, m = c.iri ? $ : p, R = [], E = M[(c.scheme || f.scheme || "").toLowerCase()];
5619
+ if (E && E.serialize && E.serialize(f, c), f.host && !m.IPV6ADDRESS.test(f.host)) {
5606
5620
  if (c.domainHost || E && E.domainHost)
5607
5621
  try {
5608
- p.host = c.iri ? N.toUnicode(p.host) : N.toASCII(p.host.replace(m.PCT_ENCODED, W).toLowerCase());
5622
+ f.host = c.iri ? N.toUnicode(f.host) : N.toASCII(f.host.replace(m.PCT_ENCODED, W).toLowerCase());
5609
5623
  } catch (J) {
5610
- p.error = p.error || "Host's domain name can not be converted to " + (c.iri ? "Unicode" : "ASCII") + " via punycode: " + J;
5624
+ f.error = f.error || "Host's domain name can not be converted to " + (c.iri ? "Unicode" : "ASCII") + " via punycode: " + J;
5611
5625
  }
5612
5626
  }
5613
- G(p, m), c.reference !== "suffix" && p.scheme && (R.push(p.scheme), R.push(":"));
5614
- var U = nt(p, c);
5615
- if (U !== void 0 && (c.reference !== "suffix" && R.push("//"), R.push(U), p.path && p.path.charAt(0) !== "/" && R.push("/")), p.path !== void 0) {
5616
- var L = p.path;
5627
+ G(f, m), c.reference !== "suffix" && f.scheme && (R.push(f.scheme), R.push(":"));
5628
+ var U = nt(f, c);
5629
+ if (U !== void 0 && (c.reference !== "suffix" && R.push("//"), R.push(U), f.path && f.path.charAt(0) !== "/" && R.push("/")), f.path !== void 0) {
5630
+ var L = f.path;
5617
5631
  !c.absolutePath && (!E || !E.absolutePath) && (L = me(L)), U === void 0 && (L = L.replace(/^\/\//, "/%2F")), R.push(L);
5618
5632
  }
5619
- return p.query !== void 0 && (R.push("?"), R.push(p.query)), p.fragment !== void 0 && (R.push("#"), R.push(p.fragment)), R.join("");
5633
+ return f.query !== void 0 && (R.push("?"), R.push(f.query)), f.fragment !== void 0 && (R.push("#"), R.push(f.fragment)), R.join("");
5620
5634
  }
5621
- function xe(p, c) {
5635
+ function xe(f, c) {
5622
5636
  var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, R = arguments[3], E = {};
5623
- return R || (p = de(le(p, m), m), c = de(le(c, m), m)), m = m || {}, !m.tolerant && c.scheme ? (E.scheme = c.scheme, E.userinfo = c.userinfo, E.host = c.host, E.port = c.port, E.path = me(c.path || ""), E.query = c.query) : (c.userinfo !== void 0 || c.host !== void 0 || c.port !== void 0 ? (E.userinfo = c.userinfo, E.host = c.host, E.port = c.port, E.path = me(c.path || ""), E.query = c.query) : (c.path ? (c.path.charAt(0) === "/" ? E.path = me(c.path) : ((p.userinfo !== void 0 || p.host !== void 0 || p.port !== void 0) && !p.path ? E.path = "/" + c.path : p.path ? E.path = p.path.slice(0, p.path.lastIndexOf("/") + 1) + c.path : E.path = c.path, E.path = me(E.path)), E.query = c.query) : (E.path = p.path, c.query !== void 0 ? E.query = c.query : E.query = p.query), E.userinfo = p.userinfo, E.host = p.host, E.port = p.port), E.scheme = p.scheme), E.fragment = c.fragment, E;
5637
+ return R || (f = de(le(f, m), m), c = de(le(c, m), m)), m = m || {}, !m.tolerant && c.scheme ? (E.scheme = c.scheme, E.userinfo = c.userinfo, E.host = c.host, E.port = c.port, E.path = me(c.path || ""), E.query = c.query) : (c.userinfo !== void 0 || c.host !== void 0 || c.port !== void 0 ? (E.userinfo = c.userinfo, E.host = c.host, E.port = c.port, E.path = me(c.path || ""), E.query = c.query) : (c.path ? (c.path.charAt(0) === "/" ? E.path = me(c.path) : ((f.userinfo !== void 0 || f.host !== void 0 || f.port !== void 0) && !f.path ? E.path = "/" + c.path : f.path ? E.path = f.path.slice(0, f.path.lastIndexOf("/") + 1) + c.path : E.path = c.path, E.path = me(E.path)), E.query = c.query) : (E.path = f.path, c.query !== void 0 ? E.query = c.query : E.query = f.query), E.userinfo = f.userinfo, E.host = f.host, E.port = f.port), E.scheme = f.scheme), E.fragment = c.fragment, E;
5624
5638
  }
5625
- function it(p, c, m) {
5639
+ function it(f, c, m) {
5626
5640
  var R = d({ scheme: "null" }, m);
5627
- return le(xe(de(p, R), de(c, R), R, !0), R);
5641
+ return le(xe(de(f, R), de(c, R), R, !0), R);
5628
5642
  }
5629
- function Oe(p, c) {
5630
- return typeof p == "string" ? p = le(de(p, c), c) : i(p) === "object" && (p = de(le(p, c), c)), p;
5643
+ function Oe(f, c) {
5644
+ return typeof f == "string" ? f = le(de(f, c), c) : i(f) === "object" && (f = de(le(f, c), c)), f;
5631
5645
  }
5632
- function ot(p, c, m) {
5633
- return typeof p == "string" ? p = le(de(p, m), m) : i(p) === "object" && (p = le(p, m)), typeof c == "string" ? c = le(de(c, m), m) : i(c) === "object" && (c = le(c, m)), p === c;
5646
+ function ot(f, c, m) {
5647
+ return typeof f == "string" ? f = le(de(f, m), m) : i(f) === "object" && (f = le(f, m)), typeof c == "string" ? c = le(de(c, m), m) : i(c) === "object" && (c = le(c, m)), f === c;
5634
5648
  }
5635
- function ut(p, c) {
5636
- return p && p.toString().replace(!c || !c.iri ? f.ESCAPE : $.ESCAPE, q);
5649
+ function ut(f, c) {
5650
+ return f && f.toString().replace(!c || !c.iri ? p.ESCAPE : $.ESCAPE, q);
5637
5651
  }
5638
- function pe(p, c) {
5639
- return p && p.toString().replace(!c || !c.iri ? f.PCT_ENCODED : $.PCT_ENCODED, W);
5652
+ function pe(f, c) {
5653
+ return f && f.toString().replace(!c || !c.iri ? p.PCT_ENCODED : $.PCT_ENCODED, W);
5640
5654
  }
5641
5655
  var Ne = {
5642
5656
  scheme: "http",
@@ -5654,8 +5668,8 @@ var uri$1 = {}, uri_all = { exports: {} };
5654
5668
  parse: Ne.parse,
5655
5669
  serialize: Ne.serialize
5656
5670
  };
5657
- function jt(p) {
5658
- return typeof p.secure == "boolean" ? p.secure : String(p.scheme).toLowerCase() === "wss";
5671
+ function jt(f) {
5672
+ return typeof f.secure == "boolean" ? f.secure : String(f.scheme).toLowerCase() === "wss";
5659
5673
  }
5660
5674
  var at = {
5661
5675
  scheme: "ws",
@@ -5677,9 +5691,9 @@ var uri$1 = {}, uri_all = { exports: {} };
5677
5691
  parse: at.parse,
5678
5692
  serialize: at.serialize
5679
5693
  }, 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;
5680
- function Ot(p) {
5681
- var c = W(p);
5682
- return c.match(ur) ? c : p;
5694
+ function Ot(f) {
5695
+ var c = W(f);
5696
+ return c.match(ur) ? c : f;
5683
5697
  }
5684
5698
  var Mt = {
5685
5699
  scheme: "mailto",
@@ -5798,7 +5812,7 @@ uri$1.default = uri;
5798
5812
  } }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
5799
5813
  return r.CodeGen;
5800
5814
  } });
5801
- const n = validation_error, s = ref_error, i = rules, o = compile, l = codegen, d = resolve$1, u = dataType, f = util, $ = require$$9, O = uri$1, C = (F, v) => new RegExp(F, v);
5815
+ const n = validation_error, s = ref_error, i = rules, o = compile, l = codegen, d = resolve$1, u = dataType, p = util, $ = require$$9, O = uri$1, C = (F, v) => new RegExp(F, v);
5802
5816
  C.code = "new RegExp";
5803
5817
  const S = ["removeAdditional", "useDefaults", "coerceTypes"], T = /* @__PURE__ */ new Set([
5804
5818
  "validate",
@@ -6027,14 +6041,14 @@ uri$1.default = uri;
6027
6041
  } else
6028
6042
  throw new Error("invalid addKeywords parameters");
6029
6043
  if (oe.call(this, b, j), !j)
6030
- return (0, f.eachItem)(b, (h) => ke.call(this, h)), this;
6044
+ return (0, p.eachItem)(b, (h) => ke.call(this, h)), this;
6031
6045
  qe.call(this, j);
6032
6046
  const a = {
6033
6047
  ...j,
6034
6048
  type: (0, u.getJSONTypes)(j.type),
6035
6049
  schemaType: (0, u.getJSONTypes)(j.schemaType)
6036
6050
  };
6037
- return (0, f.eachItem)(b, a.type.length === 0 ? (h) => ke.call(this, h, a) : (h) => a.type.forEach((N) => ke.call(this, h, a, N))), this;
6051
+ return (0, p.eachItem)(b, a.type.length === 0 ? (h) => ke.call(this, h, a) : (h) => a.type.forEach((N) => ke.call(this, h, a, N))), this;
6038
6052
  }
6039
6053
  getKeyword(v) {
6040
6054
  const j = this.RULES.all[v];
@@ -6176,7 +6190,7 @@ uri$1.default = uri;
6176
6190
  const ue = /^[a-z_$][a-z0-9_$:-]*$/i;
6177
6191
  function oe(F, v) {
6178
6192
  const { RULES: j } = this;
6179
- if ((0, f.eachItem)(F, (b) => {
6193
+ if ((0, p.eachItem)(F, (b) => {
6180
6194
  if (j.keywords[b])
6181
6195
  throw new Error(`Keyword ${b} is already defined`);
6182
6196
  if (!ue.test(b))
@@ -6237,12 +6251,12 @@ const ref_error_1 = ref_error, code_1$8 = code, codegen_1$l = codegen, names_1$1
6237
6251
  const { gen: t, schema: r, it: n } = e, { baseId: s, schemaEnv: i, validateName: o, opts: l, self: d } = n, { root: u } = i;
6238
6252
  if ((r === "#" || r === "#/") && s === u.baseId)
6239
6253
  return $();
6240
- const f = compile_1$1.resolveRef.call(d, u, s, r);
6241
- if (f === void 0)
6254
+ const p = compile_1$1.resolveRef.call(d, u, s, r);
6255
+ if (p === void 0)
6242
6256
  throw new ref_error_1.default(n.opts.uriResolver, s, r);
6243
- if (f instanceof compile_1$1.SchemaEnv)
6244
- return O(f);
6245
- return C(f);
6257
+ if (p instanceof compile_1$1.SchemaEnv)
6258
+ return O(p);
6259
+ return C(p);
6246
6260
  function $() {
6247
6261
  if (i === u)
6248
6262
  return callRef(e, o, i, i.$async);
@@ -6272,8 +6286,8 @@ function getValidate(e, t) {
6272
6286
  ref.getValidate = getValidate;
6273
6287
  function callRef(e, t, r, n) {
6274
6288
  const { gen: s, it: i } = e, { allErrors: o, schemaEnv: l, opts: d } = i, u = d.passContext ? names_1$1.default.this : codegen_1$l.nil;
6275
- n ? f() : $();
6276
- function f() {
6289
+ n ? p() : $();
6290
+ function p() {
6277
6291
  if (!l.$async)
6278
6292
  throw new Error("async schema referenced by sync schema");
6279
6293
  const S = s.let("valid");
@@ -6447,7 +6461,7 @@ const code_1$6 = code, codegen_1$f = codegen, util_1$h = util, error$d = {
6447
6461
  if (!i && r.length === 0)
6448
6462
  return;
6449
6463
  const d = r.length >= l.loopRequired;
6450
- if (o.allErrors ? u() : f(), l.strictRequired) {
6464
+ if (o.allErrors ? u() : p(), l.strictRequired) {
6451
6465
  const C = e.parentSchema.properties, { definedProperties: S } = e.it;
6452
6466
  for (const T of r)
6453
6467
  if ((C == null ? void 0 : C[T]) === void 0 && !S.has(T)) {
@@ -6462,7 +6476,7 @@ const code_1$6 = code, codegen_1$f = codegen, util_1$h = util, error$d = {
6462
6476
  for (const C of r)
6463
6477
  (0, code_1$6.checkReportMissingProp)(e, C);
6464
6478
  }
6465
- function f() {
6479
+ function p() {
6466
6480
  const C = t.let("missing");
6467
6481
  if (d || i) {
6468
6482
  const S = t.let("valid", !0);
@@ -6525,8 +6539,8 @@ const dataType_1 = dataType, codegen_1$d = codegen, util_1$g = util, equal_1$2 =
6525
6539
  if (!n && !s)
6526
6540
  return;
6527
6541
  const d = t.let("valid"), u = i.items ? (0, dataType_1.getSchemaTypes)(i.items) : [];
6528
- e.block$data(d, f, (0, codegen_1$d._)`${o} === false`), e.ok(d);
6529
- function f() {
6542
+ e.block$data(d, p, (0, codegen_1$d._)`${o} === false`), e.ok(d);
6543
+ function p() {
6530
6544
  const S = t.let("i", (0, codegen_1$d._)`${r}.length`), T = t.let("j");
6531
6545
  e.setParams({ i: S, j: T }), t.assign(d, !0), t.if((0, codegen_1$d._)`${S} > 1`, () => ($() ? O : C)(S, T));
6532
6546
  }
@@ -6582,18 +6596,18 @@ const codegen_1$b = codegen, util_1$e = util, equal_1 = equal$1, error$9 = {
6582
6596
  const l = s.length >= o.opts.loopEnum;
6583
6597
  let d;
6584
6598
  const u = () => d ?? (d = (0, util_1$e.useFunc)(t, equal_1.default));
6585
- let f;
6599
+ let p;
6586
6600
  if (l || n)
6587
- f = t.let("valid"), e.block$data(f, $);
6601
+ p = t.let("valid"), e.block$data(p, $);
6588
6602
  else {
6589
6603
  if (!Array.isArray(s))
6590
6604
  throw new Error("ajv implementation error");
6591
6605
  const C = t.const("vSchema", i);
6592
- f = (0, codegen_1$b.or)(...s.map((S, T) => O(C, T)));
6606
+ p = (0, codegen_1$b.or)(...s.map((S, T) => O(C, T)));
6593
6607
  }
6594
- e.pass(f);
6608
+ e.pass(p);
6595
6609
  function $() {
6596
- t.assign(f, !1), t.forOf("v", i, (C) => t.if((0, codegen_1$b._)`${u()}(${r}, ${C})`, () => t.assign(f, !0).break()));
6610
+ t.assign(p, !1), t.forOf("v", i, (C) => t.if((0, codegen_1$b._)`${u()}(${r}, ${C})`, () => t.assign(p, !0).break()));
6597
6611
  }
6598
6612
  function O(C, S) {
6599
6613
  const T = s[S];
@@ -6655,8 +6669,8 @@ function validateAdditionalItems(e, t) {
6655
6669
  r.if((0, codegen_1$a.not)(u), () => d(u)), e.ok(u);
6656
6670
  }
6657
6671
  function d(u) {
6658
- r.forRange("i", t.length, l, (f) => {
6659
- e.subschema({ keyword: i, dataProp: f, dataPropType: util_1$d.Type.Num }, u), o.allErrors || r.if((0, codegen_1$a.not)(u), () => r.break());
6672
+ r.forRange("i", t.length, l, (p) => {
6673
+ e.subschema({ keyword: i, dataProp: p, dataPropType: util_1$d.Type.Num }, u), o.allErrors || r.if((0, codegen_1$a.not)(u), () => r.break());
6660
6674
  });
6661
6675
  }
6662
6676
  }
@@ -6679,7 +6693,7 @@ const codegen_1$9 = codegen, util_1$c = util, code_1$5 = code, def$f = {
6679
6693
  };
6680
6694
  function validateTuple(e, t, r = e.schema) {
6681
6695
  const { gen: n, parentSchema: s, data: i, keyword: o, it: l } = e;
6682
- f(s), l.opts.unevaluated && r.length && l.items !== !0 && (l.items = util_1$c.mergeEvaluated.items(n, r.length, l.items));
6696
+ p(s), l.opts.unevaluated && r.length && l.items !== !0 && (l.items = util_1$c.mergeEvaluated.items(n, r.length, l.items));
6683
6697
  const d = n.name("valid"), u = n.const("len", (0, codegen_1$9._)`${i}.length`);
6684
6698
  r.forEach(($, O) => {
6685
6699
  (0, util_1$c.alwaysValidSchema)(l, $) || (n.if((0, codegen_1$9._)`${u} > ${O}`, () => e.subschema({
@@ -6688,7 +6702,7 @@ function validateTuple(e, t, r = e.schema) {
6688
6702
  dataProp: O
6689
6703
  }, d)), e.ok(d));
6690
6704
  });
6691
- function f($) {
6705
+ function p($) {
6692
6706
  const { opts: O, errSchemaPath: C } = l, S = r.length, T = S === $.minItems && (S === $.maxItems || $[t] === !1);
6693
6707
  if (O.strictTuples && !T) {
6694
6708
  const y = `"${o}" is ${S}-tuple, but minItems or maxItems/${t} are not specified or different at path "${C}"`;
@@ -6741,7 +6755,7 @@ const codegen_1$7 = codegen, util_1$a = util, error$6 = {
6741
6755
  let o, l;
6742
6756
  const { minContains: d, maxContains: u } = n;
6743
6757
  i.opts.next ? (o = d === void 0 ? 1 : d, l = u) : o = 1;
6744
- const f = t.const("len", (0, codegen_1$7._)`${s}.length`);
6758
+ const p = t.const("len", (0, codegen_1$7._)`${s}.length`);
6745
6759
  if (e.setParams({ min: o, max: l }), l === void 0 && o === 0) {
6746
6760
  (0, util_1$a.checkStrictMode)(i, '"minContains" == 0 without "maxContains": "contains" keyword ignored');
6747
6761
  return;
@@ -6751,8 +6765,8 @@ const codegen_1$7 = codegen, util_1$a = util, error$6 = {
6751
6765
  return;
6752
6766
  }
6753
6767
  if ((0, util_1$a.alwaysValidSchema)(i, r)) {
6754
- let T = (0, codegen_1$7._)`${f} >= ${o}`;
6755
- l !== void 0 && (T = (0, codegen_1$7._)`${T} && ${f} <= ${l}`), e.pass(T);
6768
+ let T = (0, codegen_1$7._)`${p} >= ${o}`;
6769
+ l !== void 0 && (T = (0, codegen_1$7._)`${T} && ${p} <= ${l}`), e.pass(T);
6756
6770
  return;
6757
6771
  }
6758
6772
  i.items = !0;
@@ -6763,7 +6777,7 @@ const codegen_1$7 = codegen, util_1$a = util, error$6 = {
6763
6777
  C(T, () => t.if(T, () => S(y)));
6764
6778
  }
6765
6779
  function C(T, y) {
6766
- t.forRange("i", 0, f, (_) => {
6780
+ t.forRange("i", 0, p, (_) => {
6767
6781
  e.subschema({
6768
6782
  keyword: "contains",
6769
6783
  dataProp: _,
@@ -6783,14 +6797,14 @@ var dependencies = {};
6783
6797
  Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
6784
6798
  const t = codegen, r = util, n = code;
6785
6799
  e.error = {
6786
- message: ({ params: { property: d, depsCount: u, deps: f } }) => {
6800
+ message: ({ params: { property: d, depsCount: u, deps: p } }) => {
6787
6801
  const $ = u === 1 ? "property" : "properties";
6788
- return (0, t.str)`must have ${$} ${f} when property ${d} is present`;
6802
+ return (0, t.str)`must have ${$} ${p} when property ${d} is present`;
6789
6803
  },
6790
- params: ({ params: { property: d, depsCount: u, deps: f, missingProperty: $ } }) => (0, t._)`{property: ${d},
6804
+ params: ({ params: { property: d, depsCount: u, deps: p, missingProperty: $ } }) => (0, t._)`{property: ${d},
6791
6805
  missingProperty: ${$},
6792
6806
  depsCount: ${u},
6793
- deps: ${f}}`
6807
+ deps: ${p}}`
6794
6808
  // TODO change to reference
6795
6809
  };
6796
6810
  const s = {
@@ -6799,51 +6813,51 @@ var dependencies = {};
6799
6813
  schemaType: "object",
6800
6814
  error: e.error,
6801
6815
  code(d) {
6802
- const [u, f] = i(d);
6803
- o(d, u), l(d, f);
6816
+ const [u, p] = i(d);
6817
+ o(d, u), l(d, p);
6804
6818
  }
6805
6819
  };
6806
6820
  function i({ schema: d }) {
6807
- const u = {}, f = {};
6821
+ const u = {}, p = {};
6808
6822
  for (const $ in d) {
6809
6823
  if ($ === "__proto__")
6810
6824
  continue;
6811
- const O = Array.isArray(d[$]) ? u : f;
6825
+ const O = Array.isArray(d[$]) ? u : p;
6812
6826
  O[$] = d[$];
6813
6827
  }
6814
- return [u, f];
6828
+ return [u, p];
6815
6829
  }
6816
6830
  function o(d, u = d.schema) {
6817
- const { gen: f, data: $, it: O } = d;
6831
+ const { gen: p, data: $, it: O } = d;
6818
6832
  if (Object.keys(u).length === 0)
6819
6833
  return;
6820
- const C = f.let("missing");
6834
+ const C = p.let("missing");
6821
6835
  for (const S in u) {
6822
6836
  const T = u[S];
6823
6837
  if (T.length === 0)
6824
6838
  continue;
6825
- const y = (0, n.propertyInData)(f, $, S, O.opts.ownProperties);
6839
+ const y = (0, n.propertyInData)(p, $, S, O.opts.ownProperties);
6826
6840
  d.setParams({
6827
6841
  property: S,
6828
6842
  depsCount: T.length,
6829
6843
  deps: T.join(", ")
6830
- }), O.allErrors ? f.if(y, () => {
6844
+ }), O.allErrors ? p.if(y, () => {
6831
6845
  for (const _ of T)
6832
6846
  (0, n.checkReportMissingProp)(d, _);
6833
- }) : (f.if((0, t._)`${y} && (${(0, n.checkMissingProp)(d, T, C)})`), (0, n.reportMissingProp)(d, C), f.else());
6847
+ }) : (p.if((0, t._)`${y} && (${(0, n.checkMissingProp)(d, T, C)})`), (0, n.reportMissingProp)(d, C), p.else());
6834
6848
  }
6835
6849
  }
6836
6850
  e.validatePropertyDeps = o;
6837
6851
  function l(d, u = d.schema) {
6838
- const { gen: f, data: $, keyword: O, it: C } = d, S = f.name("valid");
6852
+ const { gen: p, data: $, keyword: O, it: C } = d, S = p.name("valid");
6839
6853
  for (const T in u)
6840
- (0, r.alwaysValidSchema)(C, u[T]) || (f.if(
6841
- (0, n.propertyInData)(f, $, T, C.opts.ownProperties),
6854
+ (0, r.alwaysValidSchema)(C, u[T]) || (p.if(
6855
+ (0, n.propertyInData)(p, $, T, C.opts.ownProperties),
6842
6856
  () => {
6843
6857
  const y = d.subschema({ keyword: O, schemaProp: T }, S);
6844
6858
  d.mergeValidEvaluated(y, S);
6845
6859
  },
6846
- () => f.var(S, !0)
6860
+ () => p.var(S, !0)
6847
6861
  // TODO var
6848
6862
  ), d.ok(S));
6849
6863
  }
@@ -6897,11 +6911,11 @@ const code_1$3 = code, codegen_1$5 = codegen, names_1 = names$1, util_1$8 = util
6897
6911
  const { allErrors: l, opts: d } = o;
6898
6912
  if (o.props = !0, d.removeAdditional !== "all" && (0, util_1$8.alwaysValidSchema)(o, r))
6899
6913
  return;
6900
- const u = (0, code_1$3.allSchemaProperties)(n.properties), f = (0, code_1$3.allSchemaProperties)(n.patternProperties);
6914
+ const u = (0, code_1$3.allSchemaProperties)(n.properties), p = (0, code_1$3.allSchemaProperties)(n.patternProperties);
6901
6915
  $(), e.ok((0, codegen_1$5._)`${i} === ${names_1.default.errors}`);
6902
6916
  function $() {
6903
6917
  t.forIn("key", s, (y) => {
6904
- !u.length && !f.length ? S(y) : t.if(O(y), () => S(y));
6918
+ !u.length && !p.length ? S(y) : t.if(O(y), () => S(y));
6905
6919
  });
6906
6920
  }
6907
6921
  function O(y) {
@@ -6911,7 +6925,7 @@ const code_1$3 = code, codegen_1$5 = codegen, names_1 = names$1, util_1$8 = util
6911
6925
  _ = (0, code_1$3.isOwnProperty)(t, g, y);
6912
6926
  } else
6913
6927
  u.length ? _ = (0, codegen_1$5.or)(...u.map((g) => (0, codegen_1$5._)`${y} === ${g}`)) : _ = codegen_1$5.nil;
6914
- return f.length && (_ = (0, codegen_1$5.or)(_, ...f.map((g) => (0, codegen_1$5._)`${(0, code_1$3.usePattern)(e, g)}.test(${y})`))), (0, codegen_1$5.not)(_);
6928
+ return p.length && (_ = (0, codegen_1$5.or)(_, ...p.map((g) => (0, codegen_1$5._)`${(0, code_1$3.usePattern)(e, g)}.test(${y})`))), (0, codegen_1$5.not)(_);
6915
6929
  }
6916
6930
  function C(y) {
6917
6931
  t.code((0, codegen_1$5._)`delete ${s}[${y}]`);
@@ -6965,11 +6979,11 @@ const validate_1 = validate, code_1$2 = code, util_1$7 = util, additionalPropert
6965
6979
  return;
6966
6980
  const d = t.name("valid");
6967
6981
  for (const $ of l)
6968
- u($) ? f($) : (t.if((0, code_1$2.propertyInData)(t, s, $, i.opts.ownProperties)), f($), i.allErrors || t.else().var(d, !0), t.endIf()), e.it.definedProperties.add($), e.ok(d);
6982
+ u($) ? p($) : (t.if((0, code_1$2.propertyInData)(t, s, $, i.opts.ownProperties)), p($), i.allErrors || t.else().var(d, !0), t.endIf()), e.it.definedProperties.add($), e.ok(d);
6969
6983
  function u($) {
6970
6984
  return i.opts.useDefaults && !i.compositeRule && r[$].default !== void 0;
6971
6985
  }
6972
- function f($) {
6986
+ function p($) {
6973
6987
  e.subschema({
6974
6988
  keyword: "properties",
6975
6989
  schemaProp: $,
@@ -6989,13 +7003,13 @@ const code_1$1 = code, codegen_1$4 = codegen, util_1$6 = util, util_2 = util, de
6989
7003
  const { gen: t, schema: r, data: n, parentSchema: s, it: i } = e, { opts: o } = i, l = (0, code_1$1.allSchemaProperties)(r), d = l.filter((T) => (0, util_1$6.alwaysValidSchema)(i, r[T]));
6990
7004
  if (l.length === 0 || d.length === l.length && (!i.opts.unevaluated || i.props === !0))
6991
7005
  return;
6992
- const u = o.strictSchema && !o.allowMatchingProperties && s.properties, f = t.name("valid");
7006
+ const u = o.strictSchema && !o.allowMatchingProperties && s.properties, p = t.name("valid");
6993
7007
  i.props !== !0 && !(i.props instanceof codegen_1$4.Name) && (i.props = (0, util_2.evaluatedPropsToName)(t, i.props));
6994
7008
  const { props: $ } = i;
6995
7009
  O();
6996
7010
  function O() {
6997
7011
  for (const T of l)
6998
- u && C(T), i.allErrors ? S(T) : (t.var(f, !0), S(T), t.if(f));
7012
+ u && C(T), i.allErrors ? S(T) : (t.var(p, !0), S(T), t.if(p));
6999
7013
  }
7000
7014
  function C(T) {
7001
7015
  for (const y in u)
@@ -7010,7 +7024,7 @@ const code_1$1 = code, codegen_1$4 = codegen, util_1$6 = util, util_2 = util, de
7010
7024
  schemaProp: T,
7011
7025
  dataProp: y,
7012
7026
  dataPropType: util_2.Type.Str
7013
- }, f), i.opts.unevaluated && $ !== !0 ? t.assign((0, codegen_1$4._)`${$}[${y}]`, !0) : !_ && !i.allErrors && t.if((0, codegen_1$4.not)(f), () => t.break());
7027
+ }, p), i.opts.unevaluated && $ !== !0 ? t.assign((0, codegen_1$4._)`${$}[${y}]`, !0) : !_ && !i.allErrors && t.if((0, codegen_1$4.not)(p), () => t.break());
7014
7028
  });
7015
7029
  });
7016
7030
  }
@@ -7069,9 +7083,9 @@ const codegen_1$3 = codegen, util_1$4 = util, error$3 = {
7069
7083
  const i = r, o = t.let("valid", !1), l = t.let("passing", null), d = t.name("_valid");
7070
7084
  e.setParams({ passing: l }), t.block(u), e.result(o, () => e.reset(), () => e.error(!0));
7071
7085
  function u() {
7072
- i.forEach((f, $) => {
7086
+ i.forEach((p, $) => {
7073
7087
  let O;
7074
- (0, util_1$4.alwaysValidSchema)(s, f) ? t.var(d, !0) : O = e.subschema({
7088
+ (0, util_1$4.alwaysValidSchema)(s, p) ? t.var(d, !0) : O = e.subschema({
7075
7089
  keyword: "oneOf",
7076
7090
  schemaProp: $,
7077
7091
  compositeRule: !0
@@ -7120,24 +7134,24 @@ const codegen_1$2 = codegen, util_1$2 = util, error$2 = {
7120
7134
  return;
7121
7135
  const o = t.let("valid", !0), l = t.name("_valid");
7122
7136
  if (d(), e.reset(), s && i) {
7123
- const f = t.let("ifClause");
7124
- e.setParams({ ifClause: f }), t.if(l, u("then", f), u("else", f));
7137
+ const p = t.let("ifClause");
7138
+ e.setParams({ ifClause: p }), t.if(l, u("then", p), u("else", p));
7125
7139
  } else
7126
7140
  s ? t.if(l, u("then")) : t.if((0, codegen_1$2.not)(l), u("else"));
7127
7141
  e.pass(o, () => e.error(!0));
7128
7142
  function d() {
7129
- const f = e.subschema({
7143
+ const p = e.subschema({
7130
7144
  keyword: "if",
7131
7145
  compositeRule: !0,
7132
7146
  createErrors: !1,
7133
7147
  allErrors: !1
7134
7148
  }, l);
7135
- e.mergeEvaluated(f);
7149
+ e.mergeEvaluated(p);
7136
7150
  }
7137
- function u(f, $) {
7151
+ function u(p, $) {
7138
7152
  return () => {
7139
- const O = e.subschema({ keyword: f }, l);
7140
- t.assign(o, l), e.mergeValidEvaluated(O, o), $ ? t.assign($, (0, codegen_1$2._)`${f}`) : e.setParams({ ifClause: f });
7153
+ const O = e.subschema({ keyword: p }, l);
7154
+ t.assign(o, l), e.mergeValidEvaluated(O, o), $ ? t.assign($, (0, codegen_1$2._)`${p}`) : e.setParams({ ifClause: p });
7141
7155
  };
7142
7156
  }
7143
7157
  }
@@ -7190,7 +7204,7 @@ const codegen_1$1 = codegen, error$1 = {
7190
7204
  $data: !0,
7191
7205
  error: error$1,
7192
7206
  code(e, t) {
7193
- const { gen: r, data: n, $data: s, schema: i, schemaCode: o, it: l } = e, { opts: d, errSchemaPath: u, schemaEnv: f, self: $ } = l;
7207
+ const { gen: r, data: n, $data: s, schema: i, schemaCode: o, it: l } = e, { opts: d, errSchemaPath: u, schemaEnv: p, self: $ } = l;
7194
7208
  if (!d.validateFormats)
7195
7209
  return;
7196
7210
  s ? O() : C();
@@ -7204,7 +7218,7 @@ const codegen_1$1 = codegen, error$1 = {
7204
7218
  return d.strictSchema === !1 ? codegen_1$1.nil : (0, codegen_1$1._)`${o} && !${_}`;
7205
7219
  }
7206
7220
  function P() {
7207
- const I = f.$async ? (0, codegen_1$1._)`(${T}.async ? await ${_}(${n}) : ${_}(${n}))` : (0, codegen_1$1._)`${_}(${n})`, D = (0, codegen_1$1._)`(typeof ${_} == "function" ? ${I} : ${_}.test(${n}))`;
7221
+ const I = p.$async ? (0, codegen_1$1._)`(${T}.async ? await ${_}(${n}) : ${_}(${n}))` : (0, codegen_1$1._)`${_}(${n})`, D = (0, codegen_1$1._)`(typeof ${_} == "function" ? ${I} : ${_}.test(${n}))`;
7208
7222
  return (0, codegen_1$1._)`${_} && ${_} !== true && ${y} === ${t} && !${D}`;
7209
7223
  }
7210
7224
  }
@@ -7234,7 +7248,7 @@ const codegen_1$1 = codegen, error$1 = {
7234
7248
  }
7235
7249
  function I() {
7236
7250
  if (typeof S == "object" && !(S instanceof RegExp) && S.async) {
7237
- if (!f.$async)
7251
+ if (!p.$async)
7238
7252
  throw new Error("async format in sync schema");
7239
7253
  return (0, codegen_1$1._)`await ${_}(${n})`;
7240
7254
  }
@@ -7301,8 +7315,8 @@ const codegen_1 = codegen, types_1 = types, compile_1 = compile, util_1 = util,
7301
7315
  if (!o)
7302
7316
  throw new Error("discriminator: requires oneOf keyword");
7303
7317
  const d = t.let("valid", !1), u = t.const("tag", (0, codegen_1._)`${r}${(0, codegen_1.getProperty)(l)}`);
7304
- t.if((0, codegen_1._)`typeof ${u} == "string"`, () => f(), () => e.error(!1, { discrError: types_1.DiscrError.Tag, tag: u, tagName: l })), e.ok(d);
7305
- function f() {
7318
+ t.if((0, codegen_1._)`typeof ${u} == "string"`, () => p(), () => e.error(!1, { discrError: types_1.DiscrError.Tag, tag: u, tagName: l })), e.ok(d);
7319
+ function p() {
7306
7320
  const C = O();
7307
7321
  t.if(!1);
7308
7322
  for (const S in C)
@@ -7612,19 +7626,19 @@ const $schema$1 = "http://json-schema.org/draft-07/schema#", $id = "http://json-
7612
7626
  Object.defineProperty(t, "KeywordCxt", { enumerable: !0, get: function() {
7613
7627
  return u.KeywordCxt;
7614
7628
  } });
7615
- var f = codegen;
7629
+ var p = codegen;
7616
7630
  Object.defineProperty(t, "_", { enumerable: !0, get: function() {
7617
- return f._;
7631
+ return p._;
7618
7632
  } }), Object.defineProperty(t, "str", { enumerable: !0, get: function() {
7619
- return f.str;
7633
+ return p.str;
7620
7634
  } }), Object.defineProperty(t, "stringify", { enumerable: !0, get: function() {
7621
- return f.stringify;
7635
+ return p.stringify;
7622
7636
  } }), Object.defineProperty(t, "nil", { enumerable: !0, get: function() {
7623
- return f.nil;
7637
+ return p.nil;
7624
7638
  } }), Object.defineProperty(t, "Name", { enumerable: !0, get: function() {
7625
- return f.Name;
7639
+ return p.Name;
7626
7640
  } }), Object.defineProperty(t, "CodeGen", { enumerable: !0, get: function() {
7627
- return f.CodeGen;
7641
+ return p.CodeGen;
7628
7642
  } });
7629
7643
  var $ = validation_error;
7630
7644
  Object.defineProperty(t, "ValidationError", { enumerable: !0, get: function() {
@@ -9319,7 +9333,7 @@ function compileBlueprint(e, {
9319
9333
  return g + (((I = P.progress) == null ? void 0 : I.weight) || 1);
9320
9334
  },
9321
9335
  0
9322
- ), f = d.map(
9336
+ ), p = d.map(
9323
9337
  (g) => compileStep(g, {
9324
9338
  semaphore: r,
9325
9339
  rootProgressTracker: t,
@@ -9345,10 +9359,10 @@ function compileBlueprint(e, {
9345
9359
  },
9346
9360
  run: async (g) => {
9347
9361
  try {
9348
- for (const { resources: P } of f)
9362
+ for (const { resources: P } of p)
9349
9363
  for (const I of P)
9350
9364
  I.setPlayground(g), I.isAsync && I.resolve();
9351
- for (const [P, { run: I, step: D }] of Object.entries(f))
9365
+ for (const [P, { run: I, step: D }] of Object.entries(p))
9352
9366
  try {
9353
9367
  const w = await I(g);
9354
9368
  n(w, D);
@@ -9410,9 +9424,9 @@ function compileStep(e, {
9410
9424
  rootProgressTracker: r,
9411
9425
  totalProgressWeight: n
9412
9426
  }) {
9413
- var f;
9427
+ var p;
9414
9428
  const s = r.stage(
9415
- (((f = e.progress) == null ? void 0 : f.weight) || 1) / n
9429
+ (((p = e.progress) == null ? void 0 : p.weight) || 1) / n
9416
9430
  ), i = {};
9417
9431
  for (const $ of Object.keys(e)) {
9418
9432
  let O = e[$];