@wp-playground/blueprints 3.1.20 → 3.1.21

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
@@ -1,28 +1,28 @@
1
- import { cloneStreamMonitorProgress as Zr, cloneResponseMonitorProgress as Qr, ProgressTracker as Yr } from "@php-wasm/progress";
2
- import { randomFilename as ir, phpVars as mr, joinPaths as ie, phpVar as be, dirname as yr, Semaphore as qr, normalizePath as Gr, basename as kr } from "@php-wasm/util";
3
- import { writeFiles as hr, LatestSupportedPHPVersion as Jr, SupportedPHPVersions as Xr } from "@php-wasm/universal";
4
- import { resolveCommitHash as Kr, listGitFiles as et, listDescendantFiles as rt, sparseCheckout as tt, createDotGitDirectory as st, GitAuthenticationError as Or, OverlayFilesystem as it, InMemoryFilesystem as ot, FetchFilesystem as at, ZipFilesystem as nt, ChrootFilesystem as pt } from "@wp-playground/storage";
5
- import { fetchWithCorsProxy as lt } from "@php-wasm/web-service-worker";
6
- import { encodeZip as ft, collectFile as ut, StreamedFile as dt } from "@php-wasm/stream-compression";
1
+ import { cloneStreamMonitorProgress as Qr, cloneResponseMonitorProgress as Yr, ProgressTracker as Gr } from "@php-wasm/progress";
2
+ import { randomFilename as or, phpVars as yr, joinPaths as ie, phpVar as be, dirname as hr, Semaphore as Ar, normalizePath as Jr, basename as Or } from "@php-wasm/util";
3
+ import { writeFiles as gr, LatestSupportedPHPVersion as Xr, AllPHPVersions as Kr } from "@php-wasm/universal";
4
+ import { resolveCommitHash as et, listGitFiles as rt, listDescendantFiles as tt, sparseCheckout as st, createDotGitDirectory as it, GitAuthenticationError as Tr, OverlayFilesystem as ot, InMemoryFilesystem as at, FetchFilesystem as nt, ZipFilesystem as pt, ChrootFilesystem as lt } from "@wp-playground/storage";
5
+ import { fetchWithCorsProxy as ft } from "@php-wasm/web-service-worker";
6
+ import { encodeZip as ut, collectFile as dt, StreamedFile as ct } from "@php-wasm/stream-compression";
7
7
  import { logger as ae } from "@php-wasm/logger";
8
- import { defineWpConfigConstants as ct, ensureWpConfig as mt } from "@wp-playground/wordpress";
9
- import { unzipFile as Ar, RecommendedPHPVersion as yt } from "@wp-playground/common";
10
- function Rr(r) {
8
+ import { defineWpConfigConstants as mt, ensureWpConfig as yt } from "@wp-playground/wordpress";
9
+ import { unzipFile as Rr, RecommendedPHPVersion as ht } from "@wp-playground/common";
10
+ function Sr(r) {
11
11
  return r && "read" in r && typeof r.read == "function";
12
12
  }
13
- async function ht(r) {
14
- if (!Rr(r))
13
+ async function gt(r) {
14
+ if (!Sr(r))
15
15
  return r;
16
16
  const n = await (await r.read("blueprint.json")).text();
17
17
  return JSON.parse(n);
18
18
  }
19
- class or {
19
+ class ar {
20
20
  static async create(t) {
21
- const n = await ht(t), l = Rr(t) ? t : void 0;
22
- return or.createFromDeclaration(n, l);
21
+ const n = await gt(t), l = Sr(t) ? t : void 0;
22
+ return ar.createFromDeclaration(n, l);
23
23
  }
24
24
  static createFromDeclaration(t, n = void 0) {
25
- return new or(
25
+ return new ar(
26
26
  t,
27
27
  n,
28
28
  t.version || 1
@@ -47,11 +47,11 @@ class or {
47
47
  return this.getBundle() || this.getDeclaration();
48
48
  }
49
49
  }
50
- function ar(r) {
50
+ function nr(r) {
51
51
  const t = r.split(".").shift().replace(/-/g, " ");
52
52
  return t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
53
53
  }
54
- const gt = `Blueprint resource of type "bundled" requires a filesystem.
54
+ const bt = `Blueprint resource of type "bundled" requires a filesystem.
55
55
 
56
56
  This Blueprint refers to files that should be bundled with it (like images, plugins, or themes), but the filesystem needed to access these files is not available. This usually happens when:
57
57
 
@@ -64,17 +64,17 @@ To fix this:
64
64
  • Check that the "resource": "bundled" references in your Blueprint match actual files in your bundle
65
65
 
66
66
  Learn more about Blueprint resources: https://wordpress.github.io/wordpress-playground/blueprints/data-format#resources`;
67
- class bt extends Error {
68
- constructor(t = gt) {
67
+ class wt extends Error {
68
+ constructor(t = bt) {
69
69
  super(t), this.name = "BlueprintFilesystemRequiredError";
70
70
  }
71
71
  }
72
- class fr extends Error {
72
+ class ur extends Error {
73
73
  constructor(t, n, l) {
74
74
  super(t, l), this.name = "ResourceDownloadError", this.url = n;
75
75
  }
76
76
  }
77
- const wt = [
77
+ const vt = [
78
78
  "vfs",
79
79
  "literal",
80
80
  "wordpress.org/themes",
@@ -84,17 +84,17 @@ const wt = [
84
84
  "bundled",
85
85
  "zip"
86
86
  ];
87
- function vt(r) {
88
- return r && typeof r == "object" && typeof r.resource == "string" && wt.includes(r.resource);
89
- }
90
87
  function Pt(r) {
88
+ return r && typeof r == "object" && typeof r.resource == "string" && vt.includes(r.resource);
89
+ }
90
+ function _t(r) {
91
91
  try {
92
92
  return new URL(r).hostname === "github-proxy.com";
93
93
  } catch {
94
94
  return !1;
95
95
  }
96
96
  }
97
- function _t(r) {
97
+ function kt(r) {
98
98
  let t;
99
99
  try {
100
100
  t = new URL(r);
@@ -118,8 +118,8 @@ function _t(r) {
118
118
  };
119
119
  }
120
120
  let p, d;
121
- const y = l.get("pr"), _ = l.get("commit"), h = l.get("branch");
122
- y ? p = `refs/pull/${y}/head` : _ ? (p = _, d = "commit") : s ? (p = s, d = "tag") : p = h || "HEAD";
121
+ const y = l.get("pr"), _ = l.get("commit"), m = l.get("branch");
122
+ y ? p = `refs/pull/${y}/head` : _ ? (p = _, d = "commit") : s ? (p = s, d = "tag") : p = m || "HEAD";
123
123
  const k = l.get("directory");
124
124
  return {
125
125
  resource: "zip",
@@ -160,8 +160,8 @@ class we {
160
160
  streamBundledFile: s,
161
161
  gitAdditionalHeadersCallback: e
162
162
  }) {
163
- if (t.resource === "url" && Pt(t.url)) {
164
- const d = _t(t.url);
163
+ if (t.resource === "url" && _t(t.url)) {
164
+ const d = kt(t.url);
165
165
  d && (console.warn(
166
166
  `[Blueprints] github-proxy.com is deprecated and will stop working soon. The URL "${t.url}" has been automatically converted to a ${d.resource} resource. Please update your Blueprint to use native resource types. See: https://wordpress.github.io/wordpress-playground/blueprints/steps/resources`
167
167
  ), t = d);
@@ -169,33 +169,33 @@ class we {
169
169
  let p;
170
170
  switch (t.resource) {
171
171
  case "vfs":
172
- p = new kt(t, l);
172
+ p = new Ot(t, l);
173
173
  break;
174
174
  case "literal":
175
- p = new Ot(t, l);
175
+ p = new Tt(t, l);
176
176
  break;
177
177
  case "wordpress.org/themes":
178
- p = new Rt(t, l);
178
+ p = new St(t, l);
179
179
  break;
180
180
  case "wordpress.org/plugins":
181
- p = new St(t, l);
181
+ p = new Lt(t, l);
182
182
  break;
183
183
  case "url":
184
- p = new $t(t, l, { corsProxy: u });
184
+ p = new jt(t, l, { corsProxy: u });
185
185
  break;
186
186
  case "git:directory":
187
- p = new jt(t, l, {
187
+ p = new qt(t, l, {
188
188
  corsProxy: u,
189
189
  additionalHeaders: e
190
190
  });
191
191
  break;
192
192
  case "literal:directory":
193
- p = new At(t, l);
193
+ p = new Rt(t, l);
194
194
  break;
195
195
  case "bundled":
196
196
  if (!s)
197
- throw new bt();
198
- p = new Nt(
197
+ throw new wt();
198
+ p = new xt(
199
199
  t,
200
200
  s,
201
201
  l
@@ -209,7 +209,7 @@ class we {
209
209
  streamBundledFile: s,
210
210
  gitAdditionalHeadersCallback: e
211
211
  });
212
- p = new xt(t, d, l);
212
+ p = new Ct(t, d, l);
213
213
  break;
214
214
  }
215
215
  default:
@@ -217,10 +217,10 @@ class we {
217
217
  `Unknown resource type: ${t.resource}`
218
218
  );
219
219
  }
220
- return n && (p = new Ft(p, n)), new Lt(p);
220
+ return n && (p = new Nt(p, n)), new Ft(p);
221
221
  }
222
222
  }
223
- class Sr extends we {
223
+ class Lr extends we {
224
224
  constructor(t) {
225
225
  super(), this.resource = t;
226
226
  }
@@ -245,7 +245,7 @@ class Sr extends we {
245
245
  this.resource.setPlayground(t);
246
246
  }
247
247
  }
248
- class kt extends we {
248
+ class Ot extends we {
249
249
  /**
250
250
  * Creates a new instance of `VFSResource`.
251
251
  * @param playground The playground client.
@@ -268,7 +268,7 @@ class kt extends we {
268
268
  return this.resource.path.split("/").pop() || "";
269
269
  }
270
270
  }
271
- class Ot extends we {
271
+ class Tt extends we {
272
272
  /**
273
273
  * Creates a new instance of `LiteralResource`.
274
274
  * @param resource The literal reference.
@@ -287,7 +287,7 @@ class Ot extends we {
287
287
  return this.resource.name;
288
288
  }
289
289
  }
290
- class gr extends we {
290
+ class br extends we {
291
291
  /**
292
292
  * Creates a new instance of `FetchResource`.
293
293
  * @param progress The progress tracker.
@@ -301,31 +301,31 @@ class gr extends we {
301
301
  (n = this.progress) == null || n.setCaption(this.caption);
302
302
  const t = this.getURL();
303
303
  try {
304
- let s = await lt(
304
+ let s = await ft(
305
305
  t,
306
306
  void 0,
307
307
  this.corsProxy,
308
308
  await ((l = this.playground) == null ? void 0 : l.absoluteUrl)
309
309
  );
310
310
  if (!s.ok)
311
- throw new fr(
311
+ throw new ur(
312
312
  `Could not download "${t}"`,
313
313
  t
314
314
  );
315
- if (s = await Qr(
315
+ if (s = await Yr(
316
316
  s,
317
- ((u = this.progress) == null ? void 0 : u.loadingListener) ?? Et
317
+ ((u = this.progress) == null ? void 0 : u.loadingListener) ?? $t
318
318
  ), s.status !== 200)
319
- throw new fr(
319
+ throw new ur(
320
320
  `Could not download "${t}"`,
321
321
  t
322
322
  );
323
- const e = this.name || Tt(
323
+ const e = this.name || Et(
324
324
  s.headers.get("content-disposition") || ""
325
325
  ) || encodeURIComponent(t);
326
326
  return new File([await s.arrayBuffer()], e);
327
327
  } catch (s) {
328
- throw new fr(
328
+ throw new ur(
329
329
  `Could not download "${t}".
330
330
 
331
331
  Confirm that the URL is correct, the server is reachable, and the file is actually served at that URL. Original error:
@@ -355,7 +355,7 @@ Confirm that the URL is correct, the server is reachable, and the file is actual
355
355
  return !0;
356
356
  }
357
357
  }
358
- function Tt(r) {
358
+ function Et(r) {
359
359
  if (!r)
360
360
  return null;
361
361
  const t = r.match(/filename\*?=([^;]+)/i);
@@ -372,9 +372,9 @@ function Tt(r) {
372
372
  }
373
373
  return n;
374
374
  }
375
- const Et = () => {
375
+ const $t = () => {
376
376
  };
377
- class $t extends gr {
377
+ class jt extends br {
378
378
  /**
379
379
  * Creates a new instance of `UrlResource`.
380
380
  * @param resource The URL reference.
@@ -400,7 +400,7 @@ class $t extends gr {
400
400
  return this.resource.caption ?? super.caption;
401
401
  }
402
402
  }
403
- class jt extends we {
403
+ class qt extends we {
404
404
  constructor(t, n, l) {
405
405
  super(), this.reference = t, this._progress = n, this.options = l;
406
406
  }
@@ -408,21 +408,21 @@ class jt extends we {
408
408
  var l, u, s;
409
409
  const t = ((u = (l = this.options) == null ? void 0 : l.additionalHeaders) == null ? void 0 : u.call(l, this.reference.url)) ?? {}, n = (s = this.options) != null && s.corsProxy ? `${this.options.corsProxy}${this.reference.url}` : this.reference.url;
410
410
  try {
411
- const e = await Kr(
411
+ const e = await et(
412
412
  n,
413
413
  {
414
414
  value: this.reference.ref,
415
415
  type: this.reference.refType ?? "infer"
416
416
  },
417
417
  t
418
- ), p = await et(
418
+ ), p = await rt(
419
419
  n,
420
420
  e,
421
421
  t
422
422
  ), d = (this.reference.path ?? "").replace(
423
423
  /^\/+/,
424
424
  ""
425
- ), y = rt(p, d), _ = await tt(
425
+ ), y = tt(p, d), _ = await st(
426
426
  n,
427
427
  e,
428
428
  y,
@@ -431,12 +431,12 @@ class jt extends we {
431
431
  additionalHeaders: t
432
432
  }
433
433
  );
434
- let h = _.files;
435
- return h = qt(
436
- h,
434
+ let m = _.files;
435
+ return m = At(
436
+ m,
437
437
  (k) => k.substring(d.length).replace(/^\/+/, "")
438
- ), this.reference[".git"] && (h = {
439
- ...await st({
438
+ ), this.reference[".git"] && (m = {
439
+ ...await it({
440
440
  repoUrl: this.reference.url,
441
441
  commitHash: e,
442
442
  ref: this.reference.ref,
@@ -445,13 +445,13 @@ class jt extends we {
445
445
  fileOids: _.fileOids ?? {},
446
446
  pathPrefix: d
447
447
  }),
448
- ...h
448
+ ...m
449
449
  }), {
450
450
  name: this.filename,
451
- files: h
451
+ files: m
452
452
  };
453
453
  } catch (e) {
454
- throw e instanceof Or ? new Or(
454
+ throw e instanceof Tr ? new Tr(
455
455
  this.reference.url,
456
456
  e.status
457
457
  ) : e;
@@ -461,7 +461,7 @@ class jt extends we {
461
461
  * Generate a nice, non-empty filename – the installPlugin step depends on it.
462
462
  */
463
463
  get filename() {
464
- return this.name.replaceAll(/[^a-zA-Z0-9-.]/g, "-").replaceAll(/-+/g, "-").replace(/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+$/g, "") || ir();
464
+ return this.name.replaceAll(/[^a-zA-Z0-9-.]/g, "-").replaceAll(/-+/g, "-").replace(/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+$/g, "") || or();
465
465
  }
466
466
  /** @inheritDoc */
467
467
  get name() {
@@ -473,12 +473,12 @@ class jt extends we {
473
473
  ].filter((n) => n.length > 0).join(" ");
474
474
  }
475
475
  }
476
- function qt(r, t) {
476
+ function At(r, t) {
477
477
  return Object.fromEntries(
478
478
  Object.entries(r).map(([n, l]) => [t(n), l])
479
479
  );
480
480
  }
481
- class At extends we {
481
+ class Rt extends we {
482
482
  constructor(t, n) {
483
483
  super(), this.reference = t, this._progress = n;
484
484
  }
@@ -490,40 +490,40 @@ class At extends we {
490
490
  return this.reference.name;
491
491
  }
492
492
  }
493
- class Rt extends gr {
493
+ class St extends br {
494
494
  constructor(t, n) {
495
495
  super(n), this.resource = t;
496
496
  }
497
497
  get name() {
498
- return ar(this.resource.slug);
498
+ return nr(this.resource.slug);
499
499
  }
500
500
  getURL() {
501
- return `https://downloads.wordpress.org/theme/${Lr(this.resource.slug)}`;
501
+ return `https://downloads.wordpress.org/theme/${Fr(this.resource.slug)}`;
502
502
  }
503
503
  }
504
- class St extends gr {
504
+ class Lt extends br {
505
505
  constructor(t, n) {
506
506
  super(n), this.resource = t;
507
507
  }
508
508
  /** @inheritDoc */
509
509
  get name() {
510
- return ar(this.resource.slug);
510
+ return nr(this.resource.slug);
511
511
  }
512
512
  /** @inheritDoc */
513
513
  getURL() {
514
- return `https://downloads.wordpress.org/plugin/${Lr(this.resource.slug)}`;
514
+ return `https://downloads.wordpress.org/plugin/${Fr(this.resource.slug)}`;
515
515
  }
516
516
  }
517
- function Lr(r) {
517
+ function Fr(r) {
518
518
  return !r || r.endsWith(".zip") ? r : r + ".latest-stable.zip";
519
519
  }
520
- class Lt extends Sr {
520
+ class Ft extends Lr {
521
521
  /** @inheritDoc */
522
522
  async resolve() {
523
523
  return this.promise || (this.promise = this.resource.resolve()), this.promise;
524
524
  }
525
525
  }
526
- class Ft extends Sr {
526
+ class Nt extends Lr {
527
527
  constructor(t, n) {
528
528
  super(t), this.semaphore = n;
529
529
  }
@@ -532,7 +532,7 @@ class Ft extends Sr {
532
532
  return this.isAsync ? this.semaphore.run(() => this.resource.resolve()) : this.resource.resolve();
533
533
  }
534
534
  }
535
- class Nt extends we {
535
+ class xt extends we {
536
536
  /**
537
537
  * Creates a new instance of `BlueprintResource`.
538
538
  * @param resource The blueprint reference.
@@ -554,7 +554,7 @@ class Nt extends we {
554
554
  const u = await this.streamBundledFile(this.resource.path), s = u.filesize;
555
555
  if (!s)
556
556
  return (n = this.progress) == null || n.set(100), u;
557
- const e = Zr(
557
+ const e = Qr(
558
558
  u.stream(),
559
559
  s,
560
560
  (p) => {
@@ -564,7 +564,7 @@ class Nt extends we {
564
564
  );
565
565
  }
566
566
  );
567
- return new dt(e, this.name, {
567
+ return new ct(e, this.name, {
568
568
  filesize: s
569
569
  });
570
570
  } catch (u) {
@@ -585,7 +585,7 @@ Error details: ${u instanceof Error ? u.message : String(u)}`,
585
585
  return !0;
586
586
  }
587
587
  }
588
- class xt extends we {
588
+ class Ct extends we {
589
589
  constructor(t, n, l) {
590
590
  super(), this.reference = t, this.innerResource = n, this._progress = l;
591
591
  }
@@ -595,8 +595,8 @@ class xt extends we {
595
595
  (s = this.progress) == null || s.setCaption(`Creating ZIP: ${this.name}`);
596
596
  const t = await this.innerResource.resolve();
597
597
  let n;
598
- t instanceof File ? n = [t] : n = Ct(t.files, t.name);
599
- const l = ft(n), u = await ut(this.name, l);
598
+ t instanceof File ? n = [t] : n = Dt(t.files, t.name);
599
+ const l = ut(n), u = await dt(this.name, l);
600
600
  return (e = this.progress) == null || e.set(100), u;
601
601
  }
602
602
  /** @inheritDoc */
@@ -611,7 +611,7 @@ class xt extends we {
611
611
  return !0;
612
612
  }
613
613
  }
614
- function Ct(r, t) {
614
+ function Dt(r, t) {
615
615
  const n = [];
616
616
  function l(u, s) {
617
617
  for (const [e, p] of Object.entries(u)) {
@@ -626,7 +626,7 @@ function Ct(r, t) {
626
626
  }
627
627
  return l(r, ""), n;
628
628
  }
629
- const Fr = async (r, { pluginPath: t, pluginName: n }, l) => {
629
+ const Nr = async (r, { pluginPath: t, pluginName: n }, l) => {
630
630
  l == null || l.tracker.setCaption(`Activating ${n || t}`);
631
631
  const u = await r.documentRoot, s = await r.run({
632
632
  code: `<?php
@@ -716,7 +716,7 @@ const Fr = async (r, { pluginPath: t, pluginName: n }, l) => {
716
716
  2
717
717
  )}`
718
718
  );
719
- }, Nr = async (r, { themeFolderName: t }, n) => {
719
+ }, xr = async (r, { themeFolderName: t }, n) => {
720
720
  n == null || n.tracker.setCaption(`Activating ${t}`);
721
721
  const l = await r.documentRoot, u = `${l}/wp-content/themes/${t}`;
722
722
  if (!await r.fileExists(u))
@@ -755,7 +755,7 @@ const Fr = async (r, { pluginPath: t, pluginName: n }, l) => {
755
755
  2
756
756
  )}`
757
757
  );
758
- }, Dt = async (r, { code: t }) => {
758
+ }, Ut = async (r, { code: t }) => {
759
759
  let n = typeof t == "string" ? t : t.content;
760
760
  return (n.includes('"wordpress/wp-load.php"') || n.includes("'wordpress/wp-load.php'")) && (ae.error(
761
761
  `
@@ -780,7 +780,7 @@ This will ensure your code works reliably regardless of the current working dire
780
780
  '"wordpress/wp-load.php"',
781
781
  '"/wordpress/wp-load.php"'
782
782
  )), await r.run({ code: n });
783
- }, Ut = async (r, { options: t }) => await r.run(t), cr = async (r, { path: t }) => {
783
+ }, It = async (r, { options: t }) => await r.run(t), mr = async (r, { path: t }) => {
784
784
  t.startsWith("/") || (ae.error(
785
785
  `
786
786
  The rm() step in your Blueprint refers to a relative path.
@@ -798,7 +798,7 @@ Use: rm({ path: '/wordpress/wp-load.php' });
798
798
  This will ensure your code works reliably regardless of the current working directory.
799
799
  `.trim()
800
800
  ), t = `/${t}`), await r.unlink(t);
801
- }, It = `<?php
801
+ }, Wt = `<?php
802
802
 
803
803
  /**
804
804
  * Naively splits an SQL string into a sequence of queries. It
@@ -961,17 +961,17 @@ class WP_MySQL_Naive_Query_Stream {
961
961
  return $this->state;
962
962
  }
963
963
 
964
- }`, Wt = async (r, { sql: t }, n) => {
964
+ }`, Bt = async (r, { sql: t }, n) => {
965
965
  n == null || n.tracker.setCaption("Executing SQL Queries");
966
- const l = `/tmp/${ir()}.sql`, u = `/tmp/${ir()}.php`;
966
+ const l = `/tmp/${or()}.sql`, u = `/tmp/${or()}.php`;
967
967
  await r.writeFile(
968
968
  l,
969
969
  new Uint8Array(await t.arrayBuffer())
970
970
  ), await r.writeFile(
971
971
  u,
972
- new TextEncoder().encode(It)
972
+ new TextEncoder().encode(Wt)
973
973
  );
974
- const s = await r.documentRoot, e = mr({ docroot: s, sqlFilename: l, streamClassFilename: u }), p = await r.run({
974
+ const s = await r.documentRoot, e = yr({ docroot: s, sqlFilename: l, streamClassFilename: u }), p = await r.run({
975
975
  code: `<?php
976
976
  define('WP_SQLITE_AST_DRIVER', true);
977
977
  require_once ${e.docroot} . '/wp-load.php';
@@ -1018,8 +1018,8 @@ class WP_MySQL_Naive_Query_Stream {
1018
1018
  }
1019
1019
  `
1020
1020
  });
1021
- return await cr(r, { path: l }), await cr(r, { path: u }), p;
1022
- }, Bt = async (r, { request: t }) => {
1021
+ return await mr(r, { path: l }), await mr(r, { path: u }), p;
1022
+ }, Mt = async (r, { request: t }) => {
1023
1023
  ae.warn(
1024
1024
  'Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.'
1025
1025
  );
@@ -1029,25 +1029,25 @@ class WP_MySQL_Naive_Query_Stream {
1029
1029
  `Request failed with status ${n.httpStatusCode}`
1030
1030
  );
1031
1031
  return n;
1032
- }, br = async (r, { consts: t, method: n = "define-before-run" }) => {
1032
+ }, wr = async (r, { consts: t, method: n = "define-before-run" }) => {
1033
1033
  switch (n) {
1034
1034
  case "define-before-run":
1035
- await Mt(r, t);
1035
+ await zt(r, t);
1036
1036
  break;
1037
1037
  case "rewrite-wp-config": {
1038
1038
  const l = await r.documentRoot, u = ie(l, "/wp-config.php");
1039
- await ct(r, u, t);
1039
+ await mt(r, u, t);
1040
1040
  break;
1041
1041
  }
1042
1042
  default:
1043
1043
  throw new Error(`Invalid method: ${n}`);
1044
1044
  }
1045
1045
  };
1046
- async function Mt(r, t) {
1046
+ async function zt(r, t) {
1047
1047
  for (const n in t)
1048
1048
  await r.defineConstant(n, t[n]);
1049
1049
  }
1050
- const xr = async (r, { options: t }) => {
1050
+ const Cr = async (r, { options: t }) => {
1051
1051
  const n = await r.documentRoot;
1052
1052
  await r.run({
1053
1053
  code: `<?php
@@ -1059,7 +1059,7 @@ const xr = async (r, { options: t }) => {
1059
1059
  echo "Success";
1060
1060
  `
1061
1061
  });
1062
- }, zt = async (r, { meta: t, userId: n }) => {
1062
+ }, Vt = async (r, { meta: t, userId: n }) => {
1063
1063
  const l = await r.documentRoot;
1064
1064
  await r.run({
1065
1065
  code: `<?php
@@ -1070,7 +1070,7 @@ const xr = async (r, { options: t }) => {
1070
1070
  }
1071
1071
  `
1072
1072
  });
1073
- }, wr = "/tmp/wp-cli.phar", Vt = {
1073
+ }, vr = "/tmp/wp-cli.phar", Ht = {
1074
1074
  resource: "url",
1075
1075
  /**
1076
1076
  * Use compression for downloading the wp-cli.phar file.
@@ -1083,7 +1083,7 @@ const xr = async (r, { options: t }) => {
1083
1083
  * like the JavaScript parser or Composer are removed.
1084
1084
  */
1085
1085
  url: "https://playground.wordpress.net/wp-cli.phar"
1086
- }, Cr = async (r, t = wr) => {
1086
+ }, Dr = async (r, t = vr) => {
1087
1087
  if (!await r.fileExists(t))
1088
1088
  throw new Error(`wp-cli.phar not found at ${t}.
1089
1089
  You can enable wp-cli support by adding "wp-cli" to the list of extra libraries in your blueprint as follows:
@@ -1092,10 +1092,10 @@ const xr = async (r, { options: t }) => {
1092
1092
  }
1093
1093
  Read more about it in the documentation.
1094
1094
  https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`);
1095
- }, Dr = async (r, { command: t, wpCliPath: n = wr }) => {
1096
- await Cr(r, n);
1095
+ }, Ur = async (r, { command: t, wpCliPath: n = vr }) => {
1096
+ await Dr(r, n);
1097
1097
  let l;
1098
- if (typeof t == "string" ? (t = t.trim(), l = Ht(t)) : l = t, l.shift() !== "wp")
1098
+ if (typeof t == "string" ? (t = t.trim(), l = Zt(t)) : l = t, l.shift() !== "wp")
1099
1099
  throw new Error('The first argument must be "wp".');
1100
1100
  let s = !1;
1101
1101
  const e = l.map((y) => y.startsWith("wordpress/") ? (s = !0, `/${y}`) : y);
@@ -1161,7 +1161,7 @@ This will ensure your code works reliably regardless of the current working dire
1161
1161
  throw new Error(d.errors);
1162
1162
  return d;
1163
1163
  };
1164
- function Ht(r) {
1164
+ function Zt(r) {
1165
1165
  let l = 0, u = "";
1166
1166
  const s = [];
1167
1167
  let e = "";
@@ -1171,8 +1171,8 @@ function Ht(r) {
1171
1171
  }
1172
1172
  return e && s.push(e), s;
1173
1173
  }
1174
- const Zt = async (r, { wpCliPath: t }) => {
1175
- await Cr(r, t), await br(r, {
1174
+ const Qt = async (r, { wpCliPath: t }) => {
1175
+ await Dr(r, t), await wr(r, {
1176
1176
  consts: {
1177
1177
  WP_ALLOW_MULTISITE: 1
1178
1178
  }
@@ -1183,12 +1183,12 @@ const Zt = async (r, { wpCliPath: t }) => {
1183
1183
  throw n.hostname === "localhost" && (y += " For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."), new Error(y);
1184
1184
  }
1185
1185
  const l = n.pathname.replace(/\/$/, "") + "/", u = `${n.protocol}//${n.hostname}${l}`;
1186
- await xr(r, {
1186
+ await Cr(r, {
1187
1187
  options: {
1188
1188
  siteurl: u,
1189
1189
  home: u
1190
1190
  }
1191
- }), await Dr(r, {
1191
+ }), await Ur(r, {
1192
1192
  command: `wp core multisite-convert --base="${l}"`
1193
1193
  });
1194
1194
  const e = `${await r.documentRoot}/wp-config.php`, p = await r.readFileAsText(e);
@@ -1199,7 +1199,7 @@ const Zt = async (r, { wpCliPath: t }) => {
1199
1199
  $_SERVER['HTTP_HOST'] = ${be(n.hostname)};
1200
1200
  `
1201
1201
  )), await r.writeFile(e, d);
1202
- }, Qt = async (r, { fromPath: t, toPath: n }) => {
1202
+ }, Yt = async (r, { fromPath: t, toPath: n }) => {
1203
1203
  (!t.startsWith("/") || !n.startsWith("/")) && ae.error(
1204
1204
  `
1205
1205
  The cp() step in your Blueprint refers to a relative path.
@@ -1220,7 +1220,7 @@ This will ensure your code works reliably regardless of the current working dire
1220
1220
  n,
1221
1221
  await r.readFileAsBuffer(t)
1222
1222
  );
1223
- }, Yt = async (r, { fromPath: t, toPath: n }) => {
1223
+ }, Gt = async (r, { fromPath: t, toPath: n }) => {
1224
1224
  (!t.startsWith("/") || !n.startsWith("/")) && ae.error(
1225
1225
  `
1226
1226
  The mv() step in your Blueprint refers to a relative path.
@@ -1238,7 +1238,7 @@ Use: mv({ fromPath: '/wordpress/wp-load.php', toPath: '/wordpress/wp-loa
1238
1238
  This will ensure your code works reliably regardless of the current working directory.
1239
1239
  `.trim()
1240
1240
  ), t.startsWith("/") || (t = `/${t}`), n.startsWith("/") || (n = `/${n}`), await r.mv(t, n);
1241
- }, Gt = async (r, { path: t }) => {
1241
+ }, Jt = async (r, { path: t }) => {
1242
1242
  t.startsWith("/") || ae.error(
1243
1243
  `
1244
1244
  The mkdir() step in your Blueprint refers to a relative path.
@@ -1256,7 +1256,7 @@ Use: mkdir({ path: '/wordpress/my-new-folder' });
1256
1256
  This will ensure your code works reliably regardless of the current working directory.
1257
1257
  `.trim()
1258
1258
  ), await r.mkdir(t);
1259
- }, Jt = async (r, { path: t }) => {
1259
+ }, Xt = async (r, { path: t }) => {
1260
1260
  t.startsWith("/") || (ae.error(
1261
1261
  `
1262
1262
  The rmdir() step in your Blueprint refers to a relative path.
@@ -1274,7 +1274,7 @@ Use: rmdir({ path: '/wordpress/wp-load.php' });
1274
1274
  This will ensure your code works reliably regardless of the current working directory.
1275
1275
  `.trim()
1276
1276
  ), t = `/${t}`), await r.rmdir(t);
1277
- }, vr = async (r, { path: t, data: n }) => {
1277
+ }, Pr = async (r, { path: t, data: n }) => {
1278
1278
  n instanceof File && (n = new Uint8Array(await n.arrayBuffer())), t.startsWith("/") || (ae.error(
1279
1279
  `
1280
1280
  The writeFile() step in your Blueprint refers to a relative path.
@@ -1292,7 +1292,7 @@ Use: writeFile({ path: '/wordpress/wp-load.php', data: '<?php echo "Hell
1292
1292
  This will ensure your code works reliably regardless of the current working directory.
1293
1293
  `.trim()
1294
1294
  ), t = `/${t}`), t.startsWith("/wordpress/wp-content/mu-plugins") && !await r.fileExists("/wordpress/wp-content/mu-plugins") && await r.mkdir("/wordpress/wp-content/mu-plugins"), await r.writeFile(t, n);
1295
- }, Xt = async (r, { writeToPath: t, filesTree: n }) => {
1295
+ }, Kt = async (r, { writeToPath: t, filesTree: n }) => {
1296
1296
  t.startsWith("/") || (ae.error(
1297
1297
  `
1298
1298
  The writeFiles() step in your Blueprint refers to a relative path.
@@ -1309,20 +1309,20 @@ Use: writeFiles({ writeToPath: '/wordpress/wp-content/plugins/my-plugin'
1309
1309
 
1310
1310
  This will ensure your code works reliably regardless of the current working directory.
1311
1311
  `.trim()
1312
- ), t = `/${t}`), await hr(r, t, n.files);
1313
- }, Ur = async (r, { siteUrl: t }) => {
1314
- await br(r, {
1312
+ ), t = `/${t}`), await gr(r, t, n.files);
1313
+ }, Ir = async (r, { siteUrl: t }) => {
1314
+ await wr(r, {
1315
1315
  consts: {
1316
1316
  WP_HOME: t,
1317
1317
  WP_SITEURL: t
1318
1318
  }
1319
1319
  });
1320
- }, Kt = async (r, { file: t }, n) => {
1321
- await es(r, t, n);
1320
+ }, es = async (r, { file: t }, n) => {
1321
+ await rs(r, t, n);
1322
1322
  };
1323
- async function es(r, t, n) {
1323
+ async function rs(r, t, n) {
1324
1324
  var l;
1325
- (l = n == null ? void 0 : n.tracker) == null || l.setCaption("Importing content"), await vr(r, {
1325
+ (l = n == null ? void 0 : n.tracker) == null || l.setCaption("Importing content"), await Pr(r, {
1326
1326
  path: "/tmp/import.wxr",
1327
1327
  data: t
1328
1328
  }), await r.run({
@@ -1391,7 +1391,7 @@ async function es(r, t, n) {
1391
1391
  }
1392
1392
  });
1393
1393
  }
1394
- const Ir = async (r, { themeSlug: t = "" }, n) => {
1394
+ const Wr = async (r, { themeSlug: t = "" }, n) => {
1395
1395
  var u;
1396
1396
  (u = n == null ? void 0 : n.tracker) == null || u.setCaption("Importing theme starter content");
1397
1397
  const l = await r.documentRoot;
@@ -1445,15 +1445,15 @@ const Ir = async (r, { themeSlug: t = "" }, n) => {
1445
1445
  wp_publish_post( $wp_customize->changeset_post_id() );
1446
1446
  `
1447
1447
  });
1448
- }, Pr = async (r, { zipFile: t, zipPath: n, extractToPath: l }) => {
1448
+ }, _r = async (r, { zipFile: t, zipPath: n, extractToPath: l }) => {
1449
1449
  if (n)
1450
1450
  ae.warn(
1451
1451
  'The "zipPath" option of the unzip() Blueprint step is deprecated and will be removed. Use "zipFile" instead.'
1452
1452
  );
1453
1453
  else if (!t)
1454
1454
  throw new Error("Either zipPath or zipFile must be provided");
1455
- await Ar(r, t || n, l);
1456
- }, Wr = [
1455
+ await Rr(r, t || n, l);
1456
+ }, Br = [
1457
1457
  "db.php",
1458
1458
  "plugins/akismet",
1459
1459
  "plugins/hello.php",
@@ -1474,10 +1474,10 @@ const Ir = async (r, { themeSlug: t = "" }, n) => {
1474
1474
  "themes/twentytwentyfour",
1475
1475
  "themes/twentytwentyfive",
1476
1476
  "themes/twentytwentysix"
1477
- ], rs = async (r, { wordPressFilesZip: t, pathInZip: n = "" }) => {
1477
+ ], ts = async (r, { wordPressFilesZip: t, pathInZip: n = "" }) => {
1478
1478
  const l = await r.documentRoot;
1479
1479
  let u = ie("/tmp", "import");
1480
- await r.mkdir(u), await Pr(r, {
1480
+ await r.mkdir(u), await _r(r, {
1481
1481
  zipFile: t,
1482
1482
  extractToPath: u
1483
1483
  }), u = ie(u, n);
@@ -1490,14 +1490,14 @@ const Ir = async (r, { themeSlug: t = "" }, n) => {
1490
1490
  } catch {
1491
1491
  }
1492
1492
  const p = ie(u, "wp-content"), d = ie(l, "wp-content");
1493
- for (const E of Wr) {
1493
+ for (const E of Br) {
1494
1494
  const $ = ie(
1495
1495
  p,
1496
1496
  E
1497
1497
  );
1498
- await Er(r, $);
1498
+ await $r(r, $);
1499
1499
  const g = ie(d, E);
1500
- await r.fileExists(g) && (await r.mkdir(yr($)), await r.mv(g, $));
1500
+ await r.fileExists(g) && (await r.mkdir(hr($)), await r.mv(g, $));
1501
1501
  }
1502
1502
  const y = ie(
1503
1503
  u,
@@ -1510,14 +1510,14 @@ const Ir = async (r, { themeSlug: t = "" }, n) => {
1510
1510
  );
1511
1511
  const _ = await r.listFiles(u);
1512
1512
  for (const E of _)
1513
- await Er(r, ie(l, E)), await r.mv(
1513
+ await $r(r, ie(l, E)), await r.mv(
1514
1514
  ie(u, E),
1515
1515
  ie(l, E)
1516
1516
  );
1517
- await r.rmdir(u), await mt(r, l);
1518
- const h = await r.absoluteUrl;
1519
- e || (e = await ss(r, l)), await Ur(r, {
1520
- siteUrl: h
1517
+ await r.rmdir(u), await yt(r, l);
1518
+ const m = await r.absoluteUrl;
1519
+ e || (e = await is(r, l)), await Ir(r, {
1520
+ siteUrl: m
1521
1521
  });
1522
1522
  const k = be(
1523
1523
  ie(l, "wp-admin", "upgrade.php")
@@ -1527,14 +1527,14 @@ const Ir = async (r, { themeSlug: t = "" }, n) => {
1527
1527
  $_GET['step'] = 'upgrade_db';
1528
1528
  require ${k};
1529
1529
  `
1530
- }), e && e !== h && await ts(r, l, e, h);
1530
+ }), e && e !== m && await ss(r, l, e, m);
1531
1531
  };
1532
- function Tr(r) {
1532
+ function Er(r) {
1533
1533
  const t = r.match(/\/scope:[^/]+\/?/);
1534
1534
  return t ? t[0].replace(/\/?$/, "/") : null;
1535
1535
  }
1536
- async function ts(r, t, n, l) {
1537
- const u = Tr(n), s = Tr(l);
1536
+ async function ss(r, t, n, l) {
1537
+ const u = Er(n), s = Er(l);
1538
1538
  !u || !s || u !== s && await r.run({
1539
1539
  code: `<?php
1540
1540
  require_once getenv('DOCUMENT_ROOT') . '/wp-load.php';
@@ -1598,8 +1598,8 @@ async function ts(r, t, n, l) {
1598
1598
  }
1599
1599
  });
1600
1600
  }
1601
- async function ss(r, t) {
1602
- const n = mr({ documentRoot: t });
1601
+ async function is(r, t) {
1602
+ const n = yr({ documentRoot: t });
1603
1603
  return (await r.run({
1604
1604
  code: `<?php
1605
1605
  require_once ${n.documentRoot} . '/wp-load.php';
@@ -1609,27 +1609,27 @@ async function ss(r, t) {
1609
1609
  `
1610
1610
  })).text.trim() || null;
1611
1611
  }
1612
- async function Er(r, t) {
1612
+ async function $r(r, t) {
1613
1613
  await r.fileExists(t) && (await r.isDir(t) ? await r.rmdir(t) : await r.unlink(t));
1614
1614
  }
1615
- async function is(r) {
1615
+ async function os(r) {
1616
1616
  const t = await r.request({
1617
1617
  url: "/wp-admin/export.php?download=true&content=all"
1618
1618
  });
1619
1619
  return new File([t.bytes], "export.xml");
1620
1620
  }
1621
- async function Br(r, {
1621
+ async function Mr(r, {
1622
1622
  targetPath: t,
1623
1623
  zipFile: n,
1624
1624
  ifAlreadyInstalled: l = "overwrite",
1625
1625
  targetFolderName: u = ""
1626
1626
  }) {
1627
- const e = n.name.replace(/\.zip$/, ""), p = ie(await r.documentRoot, "wp-content"), d = ie(p, ir()), y = ie(d, "assets", e);
1627
+ const e = n.name.replace(/\.zip$/, ""), p = ie(await r.documentRoot, "wp-content"), d = ie(p, or()), y = ie(d, "assets", e);
1628
1628
  await r.fileExists(y) && await r.rmdir(d, {
1629
1629
  recursive: !0
1630
1630
  }), await r.mkdir(d);
1631
1631
  try {
1632
- await Pr(r, {
1632
+ await _r(r, {
1633
1633
  zipFile: n,
1634
1634
  extractToPath: y
1635
1635
  });
@@ -1637,9 +1637,9 @@ async function Br(r, {
1637
1637
  prependPath: !0
1638
1638
  });
1639
1639
  _ = _.filter((g) => !g.endsWith("/__MACOSX"));
1640
- const h = _.length === 1 && await r.isDir(_[0]);
1640
+ const m = _.length === 1 && await r.isDir(_[0]);
1641
1641
  let k, E = "";
1642
- h ? (E = _[0], k = _[0].split("/").pop()) : (E = y, k = e), u && u.length && (k = u);
1642
+ m ? (E = _[0], k = _[0].split("/").pop()) : (E = y, k = e), u && u.length && (k = u);
1643
1643
  const $ = `${t}/${k}`;
1644
1644
  if (await r.fileExists($)) {
1645
1645
  if (!await r.isDir($))
@@ -1671,7 +1671,7 @@ async function Br(r, {
1671
1671
  });
1672
1672
  }
1673
1673
  }
1674
- const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, options: u = {} }, s) => {
1674
+ const as = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, options: u = {} }, s) => {
1675
1675
  n && (t = n, ae.warn(
1676
1676
  'The "pluginZipFile" option is deprecated. Use "pluginData" instead.'
1677
1677
  ));
@@ -1690,10 +1690,10 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
1690
1690
  if (t instanceof File)
1691
1691
  if (await _(t)) {
1692
1692
  const k = t.name.split("/").pop() || "plugin.zip";
1693
- y = ar(k), s == null || s.tracker.setCaption(
1693
+ y = nr(k), s == null || s.tracker.setCaption(
1694
1694
  `Installing the ${y} plugin`
1695
1695
  );
1696
- const E = await Br(r, {
1696
+ const E = await Mr(r, {
1697
1697
  ifAlreadyInstalled: l,
1698
1698
  zipFile: t,
1699
1699
  targetPath: `${await r.documentRoot}/wp-content/plugins`,
@@ -1705,7 +1705,7 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
1705
1705
  e,
1706
1706
  t.name
1707
1707
  );
1708
- await vr(r, {
1708
+ await Pr(r, {
1709
1709
  path: k,
1710
1710
  data: t
1711
1711
  }), d = e, y = t.name;
@@ -1719,11 +1719,11 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
1719
1719
  e,
1720
1720
  p || t.name
1721
1721
  );
1722
- await hr(r, k, t.files, {
1722
+ await gr(r, k, t.files, {
1723
1723
  rmRoot: !0
1724
1724
  }), d = k;
1725
1725
  }
1726
- ("activate" in u ? u.activate : !0) && await Fr(
1726
+ ("activate" in u ? u.activate : !0) && await Nr(
1727
1727
  r,
1728
1728
  {
1729
1729
  pluginPath: d,
@@ -1731,15 +1731,15 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
1731
1731
  },
1732
1732
  s
1733
1733
  );
1734
- }, as = async (r, { themeData: t, themeZipFile: n, ifAlreadyInstalled: l, options: u = {} }, s) => {
1734
+ }, ns = async (r, { themeData: t, themeZipFile: n, ifAlreadyInstalled: l, options: u = {} }, s) => {
1735
1735
  n && (t = n, ae.warn(
1736
1736
  'The "themeZipFile" option is deprecated. Use "themeData" instead.'
1737
1737
  ));
1738
1738
  const e = "targetFolderName" in u ? u.targetFolderName : "";
1739
1739
  let p = "", d = "";
1740
1740
  if (t instanceof File) {
1741
- const h = t.name.split("/").pop() || "theme.zip";
1742
- d = ar(h), s == null || s.tracker.setCaption(`Installing the ${d} theme`), p = (await Br(r, {
1741
+ const m = t.name.split("/").pop() || "theme.zip";
1742
+ d = nr(m), s == null || s.tracker.setCaption(`Installing the ${d} theme`), p = (await Mr(r, {
1743
1743
  ifAlreadyInstalled: l,
1744
1744
  zipFile: t,
1745
1745
  targetPath: `${await r.documentRoot}/wp-content/themes`,
@@ -1747,32 +1747,32 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
1747
1747
  })).assetFolderName;
1748
1748
  } else {
1749
1749
  d = t.name, p = e || d, s == null || s.tracker.setCaption(`Installing the ${d} theme`);
1750
- const h = ie(
1750
+ const m = ie(
1751
1751
  await r.documentRoot,
1752
1752
  "wp-content",
1753
1753
  "themes",
1754
1754
  p
1755
1755
  );
1756
- await hr(r, h, t.files, {
1756
+ await gr(r, m, t.files, {
1757
1757
  rmRoot: !0
1758
1758
  });
1759
1759
  }
1760
- ("activate" in u ? u.activate : !0) && await Nr(
1760
+ ("activate" in u ? u.activate : !0) && await xr(
1761
1761
  r,
1762
1762
  {
1763
1763
  themeFolderName: p
1764
1764
  },
1765
1765
  s
1766
- ), ("importStarterContent" in u ? u.importStarterContent : !1) && await Ir(
1766
+ ), ("importStarterContent" in u ? u.importStarterContent : !1) && await Wr(
1767
1767
  r,
1768
1768
  {
1769
1769
  themeSlug: p
1770
1770
  },
1771
1771
  s
1772
1772
  );
1773
- }, ns = async (r, { username: t = "admin" } = {}, n) => {
1773
+ }, ps = async (r, { username: t = "admin" } = {}, n) => {
1774
1774
  n == null || n.tracker.setCaption((n == null ? void 0 : n.initialCaption) || "Logging in"), r.defineConstant("PLAYGROUND_AUTO_LOGIN_AS_USER", t);
1775
- }, ps = async (r, t, n) => {
1775
+ }, ls = async (r, t, n) => {
1776
1776
  var u;
1777
1777
  (u = n == null ? void 0 : n.tracker) == null || u.setCaption("Resetting WordPress data");
1778
1778
  const l = await r.documentRoot;
@@ -1796,7 +1796,7 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
1796
1796
  $GLOBALS['@pdo']->query("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='wp_commentmeta'");
1797
1797
  `
1798
1798
  });
1799
- }, ls = async (r, { options: t }) => {
1799
+ }, fs = async (r, { options: t }) => {
1800
1800
  await r.request({
1801
1801
  url: "/wp-admin/install.php?step=2",
1802
1802
  method: "POST",
@@ -1813,30 +1813,30 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
1813
1813
  admin_email: "admin@localhost.com"
1814
1814
  }
1815
1815
  });
1816
- }, fs = async (r, { selfContained: t = !1 } = {}) => {
1816
+ }, us = async (r, { selfContained: t = !1 } = {}) => {
1817
1817
  const n = "/tmp/wordpress-playground.zip", l = "/tmp/playground-export.json", u = await r.documentRoot, s = ie(u, "wp-content"), e = await r.absoluteUrl;
1818
1818
  await r.writeFile(
1819
1819
  l,
1820
1820
  new TextEncoder().encode(JSON.stringify({ siteUrl: e }))
1821
1821
  );
1822
- let p = Wr;
1823
- t && (p = p.filter((h) => !h.startsWith("themes/twenty")).filter(
1824
- (h) => h !== "mu-plugins/sqlite-database-integration"
1822
+ let p = Br;
1823
+ t && (p = p.filter((m) => !m.startsWith("themes/twenty")).filter(
1824
+ (m) => m !== "mu-plugins/sqlite-database-integration"
1825
1825
  ));
1826
1826
  const d = {
1827
1827
  [l]: "playground-export.json"
1828
1828
  };
1829
1829
  t && (d[ie(u, "wp-config.php")] = "wp-config.php");
1830
- const y = mr({
1830
+ const y = yr({
1831
1831
  zipPath: n,
1832
1832
  wpContentPath: s,
1833
1833
  documentRoot: u,
1834
1834
  exceptPaths: p.map(
1835
- (h) => ie(u, "wp-content", h)
1835
+ (m) => ie(u, "wp-content", m)
1836
1836
  ),
1837
1837
  additionalPaths: d
1838
1838
  });
1839
- await ds(
1839
+ await cs(
1840
1840
  r,
1841
1841
  `zipDir(${y.wpContentPath}, ${y.zipPath}, array(
1842
1842
  'exclude_paths' => ${y.exceptPaths},
@@ -1846,7 +1846,7 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
1846
1846
  );
1847
1847
  const _ = await r.readFileAsBuffer(n);
1848
1848
  return r.unlink(n), r.unlink(l), _;
1849
- }, us = `<?php
1849
+ }, ds = `<?php
1850
1850
 
1851
1851
  function zipDir($root, $output, $options = array())
1852
1852
  {
@@ -1907,12 +1907,12 @@ function join_paths()
1907
1907
  return preg_replace('#/+#', '/', join('/', $paths));
1908
1908
  }
1909
1909
  `;
1910
- async function ds(r, t) {
1910
+ async function cs(r, t) {
1911
1911
  return await r.run({
1912
- code: us + t
1912
+ code: ds + t
1913
1913
  });
1914
1914
  }
1915
- const cs = async (r, t) => {
1915
+ const ms = async (r, t) => {
1916
1916
  const u = (await (await fetch(
1917
1917
  `https://api.wordpress.org/translations/core/1.0/?version=${r}`
1918
1918
  )).json()).translations.find(
@@ -1923,7 +1923,7 @@ const cs = async (r, t) => {
1923
1923
  `Failed to get ${t} translation package for WordPress ${r}.`
1924
1924
  );
1925
1925
  return u.package;
1926
- }, ms = async (r, { language: t }, n) => {
1926
+ }, ys = async (r, { language: t }, n) => {
1927
1927
  n == null || n.tracker.setCaption((n == null ? void 0 : n.initialCaption) || "Translating"), await r.defineConstant("WPLANG", t);
1928
1928
  const l = await r.documentRoot, u = (await r.run({
1929
1929
  code: `<?php
@@ -1932,7 +1932,7 @@ const cs = async (r, t) => {
1932
1932
  `
1933
1933
  })).text, s = [
1934
1934
  {
1935
- url: await cs(u, t),
1935
+ url: await ms(u, t),
1936
1936
  type: "core"
1937
1937
  }
1938
1938
  ], p = (await r.run({
@@ -1987,7 +1987,7 @@ const cs = async (r, t) => {
1987
1987
  type: "theme"
1988
1988
  });
1989
1989
  await r.isDir(`${l}/wp-content/languages/plugins`) || await r.mkdir(`${l}/wp-content/languages/plugins`), await r.isDir(`${l}/wp-content/languages/themes`) || await r.mkdir(`${l}/wp-content/languages/themes`);
1990
- const _ = new qr({ concurrency: 5 }), h = s.map(
1990
+ const _ = new Ar({ concurrency: 5 }), m = s.map(
1991
1991
  ({ url: k, type: E }) => _.run(async () => {
1992
1992
  try {
1993
1993
  const $ = await fetch(k);
@@ -1996,7 +1996,7 @@ const cs = async (r, t) => {
1996
1996
  `Failed to download translations for ${E}: ${$.statusText}`
1997
1997
  );
1998
1998
  let g = `${l}/wp-content/languages`;
1999
- E === "plugin" ? g += "/plugins" : E === "theme" && (g += "/themes"), await Ar(
1999
+ E === "plugin" ? g += "/plugins" : E === "theme" && (g += "/themes"), await Rr(
2000
2000
  r,
2001
2001
  new File(
2002
2002
  [await $.arrayBuffer()],
@@ -2015,41 +2015,41 @@ const cs = async (r, t) => {
2015
2015
  }
2016
2016
  })
2017
2017
  );
2018
- await Promise.all(h);
2019
- }, ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2018
+ await Promise.all(m);
2019
+ }, hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2020
2020
  __proto__: null,
2021
- activatePlugin: Fr,
2022
- activateTheme: Nr,
2023
- cp: Qt,
2024
- defineSiteUrl: Ur,
2025
- defineWpConfigConsts: br,
2026
- enableMultisite: Zt,
2027
- exportWXR: is,
2028
- importThemeStarterContent: Ir,
2029
- importWordPressFiles: rs,
2030
- importWxr: Kt,
2031
- installPlugin: os,
2032
- installTheme: as,
2033
- login: ns,
2034
- mkdir: Gt,
2035
- mv: Yt,
2036
- request: Bt,
2037
- resetData: ps,
2038
- rm: cr,
2039
- rmdir: Jt,
2040
- runPHP: Dt,
2041
- runPHPWithOptions: Ut,
2042
- runSql: Wt,
2043
- runWpInstallationWizard: ls,
2044
- setSiteLanguage: ms,
2045
- setSiteOptions: xr,
2046
- unzip: Pr,
2047
- updateUserMeta: zt,
2048
- wpCLI: Dr,
2049
- writeFile: vr,
2050
- writeFiles: Xt,
2051
- zipWpContent: fs
2052
- }, Symbol.toStringTag, { value: "Module" })), hs = {
2021
+ activatePlugin: Nr,
2022
+ activateTheme: xr,
2023
+ cp: Yt,
2024
+ defineSiteUrl: Ir,
2025
+ defineWpConfigConsts: wr,
2026
+ enableMultisite: Qt,
2027
+ exportWXR: os,
2028
+ importThemeStarterContent: Wr,
2029
+ importWordPressFiles: ts,
2030
+ importWxr: es,
2031
+ installPlugin: as,
2032
+ installTheme: ns,
2033
+ login: ps,
2034
+ mkdir: Jt,
2035
+ mv: Gt,
2036
+ request: Mt,
2037
+ resetData: ls,
2038
+ rm: mr,
2039
+ rmdir: Xt,
2040
+ runPHP: Ut,
2041
+ runPHPWithOptions: It,
2042
+ runSql: Bt,
2043
+ runWpInstallationWizard: fs,
2044
+ setSiteLanguage: ys,
2045
+ setSiteOptions: Cr,
2046
+ unzip: _r,
2047
+ updateUserMeta: Vt,
2048
+ wpCLI: Ur,
2049
+ writeFile: Pr,
2050
+ writeFiles: Kt,
2051
+ zipWpContent: us
2052
+ }, Symbol.toStringTag, { value: "Module" })), gs = {
2053
2053
  properties: {
2054
2054
  landingPage: {
2055
2055
  type: "string",
@@ -2180,39 +2180,90 @@ Note: PHP 7.2 and 7.3 are deprecated and will be automatically upgraded to 7.4.`
2180
2180
  },
2181
2181
  $schema: { type: "string" }
2182
2182
  }
2183
- }, gs = {
2183
+ }, bs = {
2184
2184
  additionalProperties: { type: ["string", "boolean", "number"] }
2185
- }, Mr = Object.prototype.hasOwnProperty, bs = {
2185
+ }, zr = Object.prototype.hasOwnProperty, ws = {
2186
2186
  enum: ["8.5", "8.4", "8.3", "8.2", "8.1", "8.0", "7.4"]
2187
- };
2187
+ }, vs = { enum: ["5.2"] };
2188
2188
  function Ie(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
2189
2189
  let s = null, e = 0;
2190
2190
  const p = e;
2191
2191
  let d = !1;
2192
2192
  const y = e;
2193
2193
  if (typeof r != "string") {
2194
- const h = {
2194
+ const m = {
2195
2195
  instancePath: t,
2196
2196
  schemaPath: "#/definitions/SupportedPHPVersion/type",
2197
2197
  keyword: "type",
2198
2198
  params: { type: "string" },
2199
2199
  message: "must be string"
2200
2200
  };
2201
- s === null ? s = [h] : s.push(h), e++;
2201
+ s === null ? s = [m] : s.push(m), e++;
2202
2202
  }
2203
2203
  if (!(r === "8.5" || r === "8.4" || r === "8.3" || r === "8.2" || r === "8.1" || r === "8.0" || r === "7.4")) {
2204
- const h = {
2204
+ const m = {
2205
2205
  instancePath: t,
2206
2206
  schemaPath: "#/definitions/SupportedPHPVersion/enum",
2207
2207
  keyword: "enum",
2208
- params: { allowedValues: bs.enum },
2208
+ params: { allowedValues: ws.enum },
2209
2209
  message: "must be equal to one of the allowed values"
2210
2210
  };
2211
- s === null ? s = [h] : s.push(h), e++;
2211
+ s === null ? s = [m] : s.push(m), e++;
2212
+ }
2213
+ var _ = y === e;
2214
+ if (d = d || _, !d) {
2215
+ const m = e;
2216
+ if (typeof r != "string") {
2217
+ const E = {
2218
+ instancePath: t,
2219
+ schemaPath: "#/definitions/LegacyPHPVersion/type",
2220
+ keyword: "type",
2221
+ params: { type: "string" },
2222
+ message: "must be string"
2223
+ };
2224
+ s === null ? s = [E] : s.push(E), e++;
2225
+ }
2226
+ if (r !== "5.2") {
2227
+ const E = {
2228
+ instancePath: t,
2229
+ schemaPath: "#/definitions/LegacyPHPVersion/enum",
2230
+ keyword: "enum",
2231
+ params: { allowedValues: vs.enum },
2232
+ message: "must be equal to one of the allowed values"
2233
+ };
2234
+ s === null ? s = [E] : s.push(E), e++;
2235
+ }
2236
+ var _ = m === e;
2237
+ d = d || _;
2238
+ }
2239
+ if (d)
2240
+ e = p, s !== null && (p ? s.length = p : s = null);
2241
+ else {
2242
+ const m = {
2243
+ instancePath: t,
2244
+ schemaPath: "#/anyOf",
2245
+ keyword: "anyOf",
2246
+ params: {},
2247
+ message: "must match a schema in anyOf"
2248
+ };
2249
+ return s === null ? s = [m] : s.push(m), e++, Ie.errors = s, !1;
2212
2250
  }
2251
+ return Ie.errors = s, e === 0;
2252
+ }
2253
+ function We(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
2254
+ let s = null, e = 0;
2255
+ const p = e;
2256
+ let d = !1;
2257
+ const y = e;
2258
+ Ie(r, {
2259
+ instancePath: t,
2260
+ parentData: n,
2261
+ parentDataProperty: l,
2262
+ rootData: u
2263
+ }) || (s = s === null ? Ie.errors : s.concat(Ie.errors), e = s.length);
2213
2264
  var _ = y === e;
2214
2265
  if (d = d || _, !d) {
2215
- const h = e;
2266
+ const m = e;
2216
2267
  if (typeof r != "string") {
2217
2268
  const E = {
2218
2269
  instancePath: t,
@@ -2233,7 +2284,7 @@ function Ie(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2233
2284
  };
2234
2285
  s === null ? s = [E] : s.push(E), e++;
2235
2286
  }
2236
- var _ = h === e;
2287
+ var _ = m === e;
2237
2288
  if (d = d || _, !d) {
2238
2289
  const E = e;
2239
2290
  if (typeof r != "string") {
@@ -2263,18 +2314,18 @@ function Ie(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2263
2314
  if (d)
2264
2315
  e = p, s !== null && (p ? s.length = p : s = null);
2265
2316
  else {
2266
- const h = {
2317
+ const m = {
2267
2318
  instancePath: t,
2268
2319
  schemaPath: "#/anyOf",
2269
2320
  keyword: "anyOf",
2270
2321
  params: {},
2271
2322
  message: "must match a schema in anyOf"
2272
2323
  };
2273
- return s === null ? s = [h] : s.push(h), e++, Ie.errors = s, !1;
2324
+ return s === null ? s = [m] : s.push(m), e++, We.errors = s, !1;
2274
2325
  }
2275
- return Ie.errors = s, e === 0;
2326
+ return We.errors = s, e === 0;
2276
2327
  }
2277
- const ur = { validate: Y }, ws = {
2328
+ const dr = { validate: Y }, Ps = {
2278
2329
  enum: ["branch", "tag", "commit", "refname"]
2279
2330
  };
2280
2331
  function de(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
@@ -2382,7 +2433,7 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2382
2433
  schemaPath: "#/definitions/GitDirectoryRefType/enum",
2383
2434
  keyword: "enum",
2384
2435
  params: {
2385
- allowedValues: ws.enum
2436
+ allowedValues: Ps.enum
2386
2437
  },
2387
2438
  message: "must be equal to one of the allowed values"
2388
2439
  }
@@ -2441,29 +2492,29 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2441
2492
  ], !1;
2442
2493
  return de.errors = s, e === 0;
2443
2494
  }
2444
- const vs = {
2495
+ const _s = {
2445
2496
  additionalProperties: {
2446
2497
  anyOf: [
2447
2498
  { $ref: "#/definitions/FileTree" },
2448
2499
  { type: ["object", "string"] }
2449
2500
  ]
2450
2501
  }
2451
- }, dr = { validate: xe };
2502
+ }, cr = { validate: xe };
2452
2503
  function xe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
2453
2504
  let s = null, e = 0;
2454
2505
  if (e === 0)
2455
2506
  if (r && typeof r == "object" && !Array.isArray(r))
2456
2507
  for (const y in r) {
2457
2508
  let _ = r[y];
2458
- const h = e, k = e;
2509
+ const m = e, k = e;
2459
2510
  let E = !1;
2460
2511
  const $ = e;
2461
- dr.validate(_, {
2512
+ cr.validate(_, {
2462
2513
  instancePath: t + "/" + y.replace(/~/g, "~0").replace(/\//g, "~1"),
2463
2514
  parentData: r,
2464
2515
  parentDataProperty: y,
2465
2516
  rootData: u
2466
- }) || (s = s === null ? dr.validate.errors : s.concat(dr.validate.errors), e = s.length);
2517
+ }) || (s = s === null ? cr.validate.errors : s.concat(cr.validate.errors), e = s.length);
2467
2518
  var p = $ === e;
2468
2519
  if (E = E || p, !E) {
2469
2520
  const g = e;
@@ -2473,7 +2524,7 @@ function xe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2473
2524
  schemaPath: "#/additionalProperties/anyOf/1/type",
2474
2525
  keyword: "type",
2475
2526
  params: {
2476
- type: vs.additionalProperties.anyOf[1].type
2527
+ type: _s.additionalProperties.anyOf[1].type
2477
2528
  },
2478
2529
  message: "must be object,string"
2479
2530
  };
@@ -2494,7 +2545,7 @@ function xe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2494
2545
  };
2495
2546
  return s === null ? s = [g] : s.push(g), e++, xe.errors = s, !1;
2496
2547
  }
2497
- var d = h === e;
2548
+ var d = m === e;
2498
2549
  if (!d)
2499
2550
  break;
2500
2551
  }
@@ -2541,7 +2592,7 @@ function $e(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2541
2592
  if (y === e) {
2542
2593
  if (r.resource !== void 0) {
2543
2594
  let _ = r.resource;
2544
- const h = e;
2595
+ const m = e;
2545
2596
  if (typeof _ != "string")
2546
2597
  return $e.errors = [
2547
2598
  {
@@ -2564,7 +2615,7 @@ function $e(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2564
2615
  message: "must be equal to constant"
2565
2616
  }
2566
2617
  ], !1;
2567
- var p = h === e;
2618
+ var p = m === e;
2568
2619
  } else
2569
2620
  var p = !0;
2570
2621
  if (p) {
@@ -2623,27 +2674,27 @@ function ce(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2623
2674
  }) || (s = s === null ? de.errors : s.concat(de.errors), e = s.length);
2624
2675
  var _ = y === e;
2625
2676
  if (d = d || _, !d) {
2626
- const h = e;
2677
+ const m = e;
2627
2678
  $e(r, {
2628
2679
  instancePath: t,
2629
2680
  parentData: n,
2630
2681
  parentDataProperty: l,
2631
2682
  rootData: u
2632
2683
  }) || (s = s === null ? $e.errors : s.concat($e.errors), e = s.length);
2633
- var _ = h === e;
2684
+ var _ = m === e;
2634
2685
  d = d || _;
2635
2686
  }
2636
2687
  if (d)
2637
2688
  e = p, s !== null && (p ? s.length = p : s = null);
2638
2689
  else {
2639
- const h = {
2690
+ const m = {
2640
2691
  instancePath: t,
2641
2692
  schemaPath: "#/anyOf",
2642
2693
  keyword: "anyOf",
2643
2694
  params: {},
2644
2695
  message: "must match a schema in anyOf"
2645
2696
  };
2646
- return s === null ? s = [h] : s.push(h), e++, ce.errors = s, !1;
2697
+ return s === null ? s = [m] : s.push(m), e++, ce.errors = s, !1;
2647
2698
  }
2648
2699
  return ce.errors = s, e === 0;
2649
2700
  }
@@ -2664,22 +2715,22 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2664
2715
  ], !1;
2665
2716
  {
2666
2717
  const _ = e;
2667
- for (const h in r)
2668
- if (!(h === "resource" || h === "inner" || h === "name"))
2718
+ for (const m in r)
2719
+ if (!(m === "resource" || m === "inner" || m === "name"))
2669
2720
  return ve.errors = [
2670
2721
  {
2671
2722
  instancePath: t,
2672
2723
  schemaPath: "#/additionalProperties",
2673
2724
  keyword: "additionalProperties",
2674
- params: { additionalProperty: h },
2725
+ params: { additionalProperty: m },
2675
2726
  message: "must NOT have additional properties"
2676
2727
  }
2677
2728
  ], !1;
2678
2729
  if (_ === e) {
2679
2730
  if (r.resource !== void 0) {
2680
- let h = r.resource;
2731
+ let m = r.resource;
2681
2732
  const k = e;
2682
- if (typeof h != "string")
2733
+ if (typeof m != "string")
2683
2734
  return ve.errors = [
2684
2735
  {
2685
2736
  instancePath: t + "/resource",
@@ -2689,7 +2740,7 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2689
2740
  message: "must be string"
2690
2741
  }
2691
2742
  ], !1;
2692
- if (h !== "zip")
2743
+ if (m !== "zip")
2693
2744
  return ve.errors = [
2694
2745
  {
2695
2746
  instancePath: t + "/resource",
@@ -2704,22 +2755,22 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2704
2755
  var p = !0;
2705
2756
  if (p) {
2706
2757
  if (r.inner !== void 0) {
2707
- let h = r.inner;
2758
+ let m = r.inner;
2708
2759
  const k = e, E = e;
2709
2760
  let $ = !1;
2710
2761
  const g = e;
2711
- ur.validate(h, {
2762
+ dr.validate(m, {
2712
2763
  instancePath: t + "/inner",
2713
2764
  parentData: r,
2714
2765
  parentDataProperty: "inner",
2715
2766
  rootData: u
2716
- }) || (s = s === null ? ur.validate.errors : s.concat(
2717
- ur.validate.errors
2767
+ }) || (s = s === null ? dr.validate.errors : s.concat(
2768
+ dr.validate.errors
2718
2769
  ), e = s.length);
2719
2770
  var d = g === e;
2720
2771
  if ($ = $ || d, !$) {
2721
2772
  const X = e;
2722
- ce(h, {
2773
+ ce(m, {
2723
2774
  instancePath: t + "/inner",
2724
2775
  parentData: r,
2725
2776
  parentDataProperty: "inner",
@@ -2745,7 +2796,7 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2745
2796
  var p = !0;
2746
2797
  if (p)
2747
2798
  if (r.name !== void 0) {
2748
- const h = e;
2799
+ const m = e;
2749
2800
  if (typeof r.name != "string")
2750
2801
  return ve.errors = [
2751
2802
  {
@@ -2756,7 +2807,7 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
2756
2807
  message: "must be string"
2757
2808
  }
2758
2809
  ], !1;
2759
- var p = h === e;
2810
+ var p = m === e;
2760
2811
  } else
2761
2812
  var p = !0;
2762
2813
  }
@@ -2793,13 +2844,13 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
2793
2844
  s === null ? s = [re] : s.push(re), e++;
2794
2845
  } else {
2795
2846
  const re = e;
2796
- for (const m in r)
2797
- if (!(m === "resource" || m === "path")) {
2847
+ for (const h in r)
2848
+ if (!(h === "resource" || h === "path")) {
2798
2849
  const N = {
2799
2850
  instancePath: t,
2800
2851
  schemaPath: "#/definitions/VFSReference/additionalProperties",
2801
2852
  keyword: "additionalProperties",
2802
- params: { additionalProperty: m },
2853
+ params: { additionalProperty: h },
2803
2854
  message: "must NOT have additional properties"
2804
2855
  };
2805
2856
  s === null ? s = [N] : s.push(N), e++;
@@ -2807,9 +2858,9 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
2807
2858
  }
2808
2859
  if (re === e) {
2809
2860
  if (r.resource !== void 0) {
2810
- let m = r.resource;
2861
+ let h = r.resource;
2811
2862
  const N = e;
2812
- if (typeof m != "string") {
2863
+ if (typeof h != "string") {
2813
2864
  const v = {
2814
2865
  instancePath: t + "/resource",
2815
2866
  schemaPath: "#/definitions/VFSReference/properties/resource/type",
@@ -2819,7 +2870,7 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
2819
2870
  };
2820
2871
  s === null ? s = [v] : s.push(v), e++;
2821
2872
  }
2822
- if (m !== "vfs") {
2873
+ if (h !== "vfs") {
2823
2874
  const v = {
2824
2875
  instancePath: t + "/resource",
2825
2876
  schemaPath: "#/definitions/VFSReference/properties/resource/const",
@@ -2829,12 +2880,12 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
2829
2880
  };
2830
2881
  s === null ? s = [v] : s.push(v), e++;
2831
2882
  }
2832
- var h = N === e;
2883
+ var m = N === e;
2833
2884
  } else
2834
- var h = !0;
2835
- if (h)
2885
+ var m = !0;
2886
+ if (m)
2836
2887
  if (r.path !== void 0) {
2837
- const m = e;
2888
+ const h = e;
2838
2889
  if (typeof r.path != "string") {
2839
2890
  const v = {
2840
2891
  instancePath: t + "/path",
@@ -2845,9 +2896,9 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
2845
2896
  };
2846
2897
  s === null ? s = [v] : s.push(v), e++;
2847
2898
  }
2848
- var h = m === e;
2899
+ var m = h === e;
2849
2900
  } else
2850
- var h = !0;
2901
+ var m = !0;
2851
2902
  }
2852
2903
  }
2853
2904
  } else {
@@ -3628,7 +3679,7 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
3628
3679
  }
3629
3680
  return Y.errors = s, e === 0;
3630
3681
  }
3631
- const tr = {
3682
+ const sr = {
3632
3683
  oneOf: [
3633
3684
  {
3634
3685
  type: "object",
@@ -4349,7 +4400,7 @@ Only the username field is required for user authentication.`
4349
4400
  required: ["language", "step"]
4350
4401
  }
4351
4402
  ]
4352
- }, zr = {
4403
+ }, Vr = {
4353
4404
  enum: ["GET", "POST", "HEAD", "OPTIONS", "PATCH", "PUT", "DELETE"]
4354
4405
  };
4355
4406
  function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
@@ -4400,7 +4451,7 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
4400
4451
  instancePath: t + "/method",
4401
4452
  schemaPath: "#/definitions/HTTPMethod/enum",
4402
4453
  keyword: "enum",
4403
- params: { allowedValues: zr.enum },
4454
+ params: { allowedValues: Vr.enum },
4404
4455
  message: "must be equal to one of the allowed values"
4405
4456
  }
4406
4457
  ], !1;
@@ -4429,12 +4480,12 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
4429
4480
  const K = e;
4430
4481
  if (e === e)
4431
4482
  if (q && typeof q == "object" && !Array.isArray(q))
4432
- for (const m in q) {
4483
+ for (const h in q) {
4433
4484
  const N = e;
4434
- if (typeof q[m] != "string")
4485
+ if (typeof q[h] != "string")
4435
4486
  return ge.errors = [
4436
4487
  {
4437
- instancePath: t + "/headers/" + m.replace(
4488
+ instancePath: t + "/headers/" + h.replace(
4438
4489
  /~/g,
4439
4490
  "~0"
4440
4491
  ).replace(
@@ -4471,7 +4522,7 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
4471
4522
  let q = r.body;
4472
4523
  const K = e, W = e;
4473
4524
  let re = !1;
4474
- const m = e;
4525
+ const h = e;
4475
4526
  if (typeof q != "string") {
4476
4527
  const v = {
4477
4528
  instancePath: t + "/body",
@@ -4482,7 +4533,7 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
4482
4533
  };
4483
4534
  s === null ? s = [v] : s.push(v), e++;
4484
4535
  }
4485
- var y = m === e;
4536
+ var y = h === e;
4486
4537
  if (re = re || y, !re) {
4487
4538
  const v = e;
4488
4539
  if (e === v)
@@ -4555,10 +4606,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
4555
4606
  R
4556
4607
  ), e++;
4557
4608
  }
4558
- var h = w === e;
4609
+ var m = w === e;
4559
4610
  } else
4560
- var h = !0;
4561
- if (h) {
4611
+ var m = !0;
4612
+ if (m) {
4562
4613
  if (q.buffer !== void 0) {
4563
4614
  let P = q.buffer;
4564
4615
  const w = e;
@@ -4640,10 +4691,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
4640
4691
  L
4641
4692
  ), e++;
4642
4693
  }
4643
- var h = w === e;
4694
+ var m = w === e;
4644
4695
  } else
4645
- var h = !0;
4646
- if (h) {
4696
+ var m = !0;
4697
+ if (m) {
4647
4698
  if (q.byteLength !== void 0) {
4648
4699
  let P = q.byteLength;
4649
4700
  const w = e;
@@ -4665,10 +4716,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
4665
4716
  L
4666
4717
  ), e++;
4667
4718
  }
4668
- var h = w === e;
4719
+ var m = w === e;
4669
4720
  } else
4670
- var h = !0;
4671
- if (h) {
4721
+ var m = !0;
4722
+ if (m) {
4672
4723
  if (q.byteOffset !== void 0) {
4673
4724
  let P = q.byteOffset;
4674
4725
  const w = e;
@@ -4690,10 +4741,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
4690
4741
  L
4691
4742
  ), e++;
4692
4743
  }
4693
- var h = w === e;
4744
+ var m = w === e;
4694
4745
  } else
4695
- var h = !0;
4696
- if (h)
4746
+ var m = !0;
4747
+ if (m)
4697
4748
  if (q.length !== void 0) {
4698
4749
  let P = q.length;
4699
4750
  const w = e;
@@ -4715,9 +4766,9 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
4715
4766
  L
4716
4767
  ), e++;
4717
4768
  }
4718
- var h = w === e;
4769
+ var m = w === e;
4719
4770
  } else
4720
- var h = !0;
4771
+ var m = !0;
4721
4772
  }
4722
4773
  }
4723
4774
  }
@@ -5399,7 +5450,7 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
5399
5450
  ], !1;
5400
5451
  return ge.errors = s, e === 0;
5401
5452
  }
5402
- const Ps = {
5453
+ const ks = {
5403
5454
  properties: {
5404
5455
  relativeUri: {
5405
5456
  type: "string",
@@ -5469,7 +5520,7 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
5469
5520
  if (r && typeof r == "object" && !Array.isArray(r)) {
5470
5521
  const $ = e;
5471
5522
  for (const g in r)
5472
- if (!Mr.call(Ps.properties, g))
5523
+ if (!zr.call(ks.properties, g))
5473
5524
  return pe.errors = [
5474
5525
  {
5475
5526
  instancePath: t,
@@ -5548,7 +5599,7 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
5548
5599
  schemaPath: "#/definitions/HTTPMethod/enum",
5549
5600
  keyword: "enum",
5550
5601
  params: {
5551
- allowedValues: zr.enum
5602
+ allowedValues: Vr.enum
5552
5603
  },
5553
5604
  message: "must be equal to one of the allowed values"
5554
5605
  }
@@ -5620,16 +5671,16 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
5620
5671
  const W = e;
5621
5672
  if (e === W)
5622
5673
  if (g && typeof g == "object" && !Array.isArray(g)) {
5623
- let m;
5624
- if (g.BYTES_PER_ELEMENT === void 0 && (m = "BYTES_PER_ELEMENT") || g.buffer === void 0 && (m = "buffer") || g.byteLength === void 0 && (m = "byteLength") || g.byteOffset === void 0 && (m = "byteOffset") || g.length === void 0 && (m = "length")) {
5674
+ let h;
5675
+ if (g.BYTES_PER_ELEMENT === void 0 && (h = "BYTES_PER_ELEMENT") || g.buffer === void 0 && (h = "buffer") || g.byteLength === void 0 && (h = "byteLength") || g.byteOffset === void 0 && (h = "byteOffset") || g.length === void 0 && (h = "length")) {
5625
5676
  const N = {
5626
5677
  instancePath: t + "/body",
5627
5678
  schemaPath: "#/properties/body/anyOf/1/required",
5628
5679
  keyword: "required",
5629
5680
  params: {
5630
- missingProperty: m
5681
+ missingProperty: h
5631
5682
  },
5632
- message: "must have required property '" + m + "'"
5683
+ message: "must have required property '" + h + "'"
5633
5684
  };
5634
5685
  s === null ? s = [N] : s.push(N), e++;
5635
5686
  } else {
@@ -5688,10 +5739,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
5688
5739
  O
5689
5740
  ), e++;
5690
5741
  }
5691
- var h = b === e;
5742
+ var m = b === e;
5692
5743
  } else
5693
- var h = !0;
5694
- if (h) {
5744
+ var m = !0;
5745
+ if (m) {
5695
5746
  if (g.buffer !== void 0) {
5696
5747
  let v = g.buffer;
5697
5748
  const b = e;
@@ -5773,10 +5824,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
5773
5824
  T
5774
5825
  ), e++;
5775
5826
  }
5776
- var h = b === e;
5827
+ var m = b === e;
5777
5828
  } else
5778
- var h = !0;
5779
- if (h) {
5829
+ var m = !0;
5830
+ if (m) {
5780
5831
  if (g.byteLength !== void 0) {
5781
5832
  let v = g.byteLength;
5782
5833
  const b = e;
@@ -5798,10 +5849,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
5798
5849
  T
5799
5850
  ), e++;
5800
5851
  }
5801
- var h = b === e;
5852
+ var m = b === e;
5802
5853
  } else
5803
- var h = !0;
5804
- if (h) {
5854
+ var m = !0;
5855
+ if (m) {
5805
5856
  if (g.byteOffset !== void 0) {
5806
5857
  let v = g.byteOffset;
5807
5858
  const b = e;
@@ -5823,10 +5874,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
5823
5874
  T
5824
5875
  ), e++;
5825
5876
  }
5826
- var h = b === e;
5877
+ var m = b === e;
5827
5878
  } else
5828
- var h = !0;
5829
- if (h)
5879
+ var m = !0;
5880
+ if (m)
5830
5881
  if (g.length !== void 0) {
5831
5882
  let v = g.length;
5832
5883
  const b = e;
@@ -5848,16 +5899,16 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
5848
5899
  T
5849
5900
  ), e++;
5850
5901
  }
5851
- var h = b === e;
5902
+ var m = b === e;
5852
5903
  } else
5853
- var h = !0;
5904
+ var m = !0;
5854
5905
  }
5855
5906
  }
5856
5907
  }
5857
5908
  }
5858
5909
  }
5859
5910
  } else {
5860
- const m = {
5911
+ const h = {
5861
5912
  instancePath: t + "/body",
5862
5913
  schemaPath: "#/properties/body/anyOf/1/type",
5863
5914
  keyword: "type",
@@ -5866,7 +5917,7 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
5866
5917
  },
5867
5918
  message: "must be object"
5868
5919
  };
5869
- s === null ? s = [m] : s.push(m), e++;
5920
+ s === null ? s = [h] : s.push(h), e++;
5870
5921
  }
5871
5922
  var y = W === e;
5872
5923
  Z = Z || y;
@@ -6018,15 +6069,15 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
6018
6069
  let s = null, e = 0;
6019
6070
  if (e === 0)
6020
6071
  if (r && typeof r == "object" && !Array.isArray(r)) {
6021
- let lr;
6022
- if (r.step === void 0 && (lr = "step"))
6072
+ let fr;
6073
+ if (r.step === void 0 && (fr = "step"))
6023
6074
  return o.errors = [
6024
6075
  {
6025
6076
  instancePath: t,
6026
6077
  schemaPath: "#/required",
6027
6078
  keyword: "required",
6028
- params: { missingProperty: lr },
6029
- message: "must have required property '" + lr + "'"
6079
+ params: { missingProperty: fr },
6080
+ message: "must have required property '" + fr + "'"
6030
6081
  }
6031
6082
  ], !1;
6032
6083
  {
@@ -6456,10 +6507,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
6456
6507
  message: "must be number"
6457
6508
  }
6458
6509
  ], !1;
6459
- var h = A === e;
6510
+ var m = A === e;
6460
6511
  } else
6461
- var h = !0;
6462
- if (h)
6512
+ var m = !0;
6513
+ if (m)
6463
6514
  if (i.caption !== void 0) {
6464
6515
  const a = e;
6465
6516
  if (typeof i.caption != "string")
@@ -6474,9 +6525,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
6474
6525
  message: "must be string"
6475
6526
  }
6476
6527
  ], !1;
6477
- var h = a === e;
6528
+ var m = a === e;
6478
6529
  } else
6479
- var h = !0;
6530
+ var m = !0;
6480
6531
  }
6481
6532
  } else
6482
6533
  return o.errors = [
@@ -6755,7 +6806,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
6755
6806
  schemaPath: "#/oneOf/3/properties/method/enum",
6756
6807
  keyword: "enum",
6757
6808
  params: {
6758
- allowedValues: tr.oneOf[3].properties.method.enum
6809
+ allowedValues: sr.oneOf[3].properties.method.enum
6759
6810
  },
6760
6811
  message: "must be equal to one of the allowed values"
6761
6812
  }
@@ -7306,7 +7357,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
7306
7357
  schemaPath: "#/oneOf/6/properties/importer/enum",
7307
7358
  keyword: "enum",
7308
7359
  params: {
7309
- allowedValues: tr.oneOf[6].properties.importer.enum
7360
+ allowedValues: sr.oneOf[6].properties.importer.enum
7310
7361
  },
7311
7362
  message: "must be equal to one of the allowed values"
7312
7363
  }
@@ -7565,10 +7616,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
7565
7616
  message: "must be number"
7566
7617
  }
7567
7618
  ], !1;
7568
- var m = A === e;
7619
+ var h = A === e;
7569
7620
  } else
7570
- var m = !0;
7571
- if (m)
7621
+ var h = !0;
7622
+ if (h)
7572
7623
  if (i.caption !== void 0) {
7573
7624
  const a = e;
7574
7625
  if (typeof i.caption != "string")
@@ -7583,9 +7634,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
7583
7634
  message: "must be string"
7584
7635
  }
7585
7636
  ], !1;
7586
- var m = a === e;
7637
+ var h = a === e;
7587
7638
  } else
7588
- var m = !0;
7639
+ var h = !0;
7589
7640
  }
7590
7641
  } else
7591
7642
  return o.errors = [
@@ -7811,7 +7862,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
7811
7862
  schemaPath: "#/oneOf/9/properties/ifAlreadyInstalled/enum",
7812
7863
  keyword: "enum",
7813
7864
  params: {
7814
- allowedValues: tr.oneOf[9].properties.ifAlreadyInstalled.enum
7865
+ allowedValues: sr.oneOf[9].properties.ifAlreadyInstalled.enum
7815
7866
  },
7816
7867
  message: "must be equal to one of the allowed values"
7817
7868
  }
@@ -8139,7 +8190,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
8139
8190
  schemaPath: "#/oneOf/10/properties/ifAlreadyInstalled/enum",
8140
8191
  keyword: "enum",
8141
8192
  params: {
8142
- allowedValues: tr.oneOf[10].properties.ifAlreadyInstalled.enum
8193
+ allowedValues: sr.oneOf[10].properties.ifAlreadyInstalled.enum
8143
8194
  },
8144
8195
  message: "must be equal to one of the allowed values"
8145
8196
  }
@@ -9620,10 +9671,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
9620
9671
  message: "must be number"
9621
9672
  }
9622
9673
  ], !1;
9623
- var We = A === e;
9674
+ var Be = A === e;
9624
9675
  } else
9625
- var We = !0;
9626
- if (We)
9676
+ var Be = !0;
9677
+ if (Be)
9627
9678
  if (i.caption !== void 0) {
9628
9679
  const a = e;
9629
9680
  if (typeof i.caption != "string")
@@ -9638,9 +9689,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
9638
9689
  message: "must be string"
9639
9690
  }
9640
9691
  ], !1;
9641
- var We = a === e;
9692
+ var Be = a === e;
9642
9693
  } else
9643
- var We = !0;
9694
+ var Be = !0;
9644
9695
  }
9645
9696
  } else
9646
9697
  return o.errors = [
@@ -9706,8 +9757,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
9706
9757
  };
9707
9758
  s === null ? s = [J] : s.push(J), e++;
9708
9759
  }
9709
- var nr = A === e;
9710
- if (a = a || nr, !a) {
9760
+ var pr = A === e;
9761
+ if (a = a || pr, !a) {
9711
9762
  const J = e;
9712
9763
  if (e === J)
9713
9764
  if (i && typeof i == "object" && !Array.isArray(
@@ -9768,10 +9819,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
9768
9819
  Ee
9769
9820
  ), e++;
9770
9821
  }
9771
- var Be = ne === e;
9822
+ var Me = ne === e;
9772
9823
  } else
9773
- var Be = !0;
9774
- if (Be)
9824
+ var Me = !0;
9825
+ if (Me)
9775
9826
  if (i.content !== void 0) {
9776
9827
  const ne = e;
9777
9828
  if (typeof i.content != "string") {
@@ -9790,9 +9841,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
9790
9841
  Q
9791
9842
  ), e++;
9792
9843
  }
9793
- var Be = ne === e;
9844
+ var Me = ne === e;
9794
9845
  } else
9795
- var Be = !0;
9846
+ var Me = !0;
9796
9847
  }
9797
9848
  }
9798
9849
  } else {
@@ -9811,8 +9862,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
9811
9862
  le
9812
9863
  ), e++;
9813
9864
  }
9814
- var nr = J === e;
9815
- a = a || nr;
9865
+ var pr = J === e;
9866
+ a = a || pr;
9816
9867
  }
9817
9868
  if (a)
9818
9869
  e = j, s !== null && (j ? s.length = j : s = null);
@@ -9911,10 +9962,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
9911
9962
  message: "must be number"
9912
9963
  }
9913
9964
  ], !1;
9914
- var Me = A === e;
9965
+ var ze = A === e;
9915
9966
  } else
9916
- var Me = !0;
9917
- if (Me)
9967
+ var ze = !0;
9968
+ if (ze)
9918
9969
  if (i.caption !== void 0) {
9919
9970
  const a = e;
9920
9971
  if (typeof i.caption != "string")
@@ -9929,9 +9980,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
9929
9980
  message: "must be string"
9930
9981
  }
9931
9982
  ], !1;
9932
- var Me = a === e;
9983
+ var ze = a === e;
9933
9984
  } else
9934
- var Me = !0;
9985
+ var ze = !0;
9935
9986
  }
9936
9987
  } else
9937
9988
  return o.errors = [
@@ -10078,10 +10129,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10078
10129
  message: "must be number"
10079
10130
  }
10080
10131
  ], !1;
10081
- var ze = A === e;
10132
+ var Ve = A === e;
10082
10133
  } else
10083
- var ze = !0;
10084
- if (ze)
10134
+ var Ve = !0;
10135
+ if (Ve)
10085
10136
  if (i.caption !== void 0) {
10086
10137
  const a = e;
10087
10138
  if (typeof i.caption != "string")
@@ -10096,9 +10147,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10096
10147
  message: "must be string"
10097
10148
  }
10098
10149
  ], !1;
10099
- var ze = a === e;
10150
+ var Ve = a === e;
10100
10151
  } else
10101
- var ze = !0;
10152
+ var Ve = !0;
10102
10153
  }
10103
10154
  } else
10104
10155
  return o.errors = [
@@ -10183,10 +10234,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10183
10234
  message: "must be string"
10184
10235
  }
10185
10236
  ], !1;
10186
- var Ve = se === e;
10237
+ var He = se === e;
10187
10238
  } else
10188
- var Ve = !0;
10189
- if (Ve)
10239
+ var He = !0;
10240
+ if (He)
10190
10241
  if (i.adminPassword !== void 0) {
10191
10242
  const se = e;
10192
10243
  if (typeof i.adminPassword != "string")
@@ -10201,9 +10252,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10201
10252
  message: "must be string"
10202
10253
  }
10203
10254
  ], !1;
10204
- var Ve = se === e;
10255
+ var He = se === e;
10205
10256
  } else
10206
- var Ve = !0;
10257
+ var He = !0;
10207
10258
  }
10208
10259
  } else
10209
10260
  return o.errors = [
@@ -10302,10 +10353,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10302
10353
  message: "must be number"
10303
10354
  }
10304
10355
  ], !1;
10305
- var He = A === e;
10356
+ var Ze = A === e;
10306
10357
  } else
10307
- var He = !0;
10308
- if (He)
10358
+ var Ze = !0;
10359
+ if (Ze)
10309
10360
  if (i.caption !== void 0) {
10310
10361
  const a = e;
10311
10362
  if (typeof i.caption != "string")
@@ -10320,9 +10371,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10320
10371
  message: "must be string"
10321
10372
  }
10322
10373
  ], !1;
10323
- var He = a === e;
10374
+ var Ze = a === e;
10324
10375
  } else
10325
- var He = !0;
10376
+ var Ze = !0;
10326
10377
  }
10327
10378
  } else
10328
10379
  return o.errors = [
@@ -10466,10 +10517,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10466
10517
  message: "must be number"
10467
10518
  }
10468
10519
  ], !1;
10469
- var Ze = A === e;
10520
+ var Qe = A === e;
10470
10521
  } else
10471
- var Ze = !0;
10472
- if (Ze)
10522
+ var Qe = !0;
10523
+ if (Qe)
10473
10524
  if (i.caption !== void 0) {
10474
10525
  const a = e;
10475
10526
  if (typeof i.caption != "string")
@@ -10484,9 +10535,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10484
10535
  message: "must be string"
10485
10536
  }
10486
10537
  ], !1;
10487
- var Ze = a === e;
10538
+ var Qe = a === e;
10488
10539
  } else
10489
- var Ze = !0;
10540
+ var Qe = !0;
10490
10541
  }
10491
10542
  } else
10492
10543
  return o.errors = [
@@ -10637,10 +10688,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10637
10688
  message: "must be number"
10638
10689
  }
10639
10690
  ], !1;
10640
- var Qe = A === e;
10691
+ var Ye = A === e;
10641
10692
  } else
10642
- var Qe = !0;
10643
- if (Qe)
10693
+ var Ye = !0;
10694
+ if (Ye)
10644
10695
  if (i.caption !== void 0) {
10645
10696
  const a = e;
10646
10697
  if (typeof i.caption != "string")
@@ -10655,9 +10706,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10655
10706
  message: "must be string"
10656
10707
  }
10657
10708
  ], !1;
10658
- var Qe = a === e;
10709
+ var Ye = a === e;
10659
10710
  } else
10660
- var Qe = !0;
10711
+ var Ye = !0;
10661
10712
  }
10662
10713
  } else
10663
10714
  return o.errors = [
@@ -10842,10 +10893,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10842
10893
  message: "must be number"
10843
10894
  }
10844
10895
  ], !1;
10845
- var Ye = A === e;
10896
+ var Ge = A === e;
10846
10897
  } else
10847
- var Ye = !0;
10848
- if (Ye)
10898
+ var Ge = !0;
10899
+ if (Ge)
10849
10900
  if (i.caption !== void 0) {
10850
10901
  const a = e;
10851
10902
  if (typeof i.caption != "string")
@@ -10860,9 +10911,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
10860
10911
  message: "must be string"
10861
10912
  }
10862
10913
  ], !1;
10863
- var Ye = a === e;
10914
+ var Ge = a === e;
10864
10915
  } else
10865
- var Ye = !0;
10916
+ var Ge = !0;
10866
10917
  }
10867
10918
  } else
10868
10919
  return o.errors = [
@@ -11035,10 +11086,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11035
11086
  message: "must be number"
11036
11087
  }
11037
11088
  ], !1;
11038
- var Ge = A === e;
11089
+ var Je = A === e;
11039
11090
  } else
11040
- var Ge = !0;
11041
- if (Ge)
11091
+ var Je = !0;
11092
+ if (Je)
11042
11093
  if (i.caption !== void 0) {
11043
11094
  const a = e;
11044
11095
  if (typeof i.caption != "string")
@@ -11053,9 +11104,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11053
11104
  message: "must be string"
11054
11105
  }
11055
11106
  ], !1;
11056
- var Ge = a === e;
11107
+ var Je = a === e;
11057
11108
  } else
11058
- var Ge = !0;
11109
+ var Je = !0;
11059
11110
  }
11060
11111
  } else
11061
11112
  return o.errors = [
@@ -11185,7 +11236,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11185
11236
  for (const Q in i)
11186
11237
  if (!(Q === "BYTES_PER_ELEMENT" || Q === "buffer" || Q === "byteLength" || Q === "byteOffset" || Q === "length")) {
11187
11238
  let he = i[Q];
11188
- const er = e;
11239
+ const rr = e;
11189
11240
  if (!(typeof he == "number" && isFinite(
11190
11241
  he
11191
11242
  ))) {
@@ -11210,8 +11261,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11210
11261
  fe
11211
11262
  ), e++;
11212
11263
  }
11213
- var Hr = er === e;
11214
- if (!Hr)
11264
+ var Zr = rr === e;
11265
+ if (!Zr)
11215
11266
  break;
11216
11267
  }
11217
11268
  if (Ee === e) {
@@ -11221,7 +11272,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11221
11272
  if (!(typeof Q == "number" && isFinite(
11222
11273
  Q
11223
11274
  ))) {
11224
- const er = {
11275
+ const rr = {
11225
11276
  instancePath: t + "/data/BYTES_PER_ELEMENT",
11226
11277
  schemaPath: "#/oneOf/25/properties/data/anyOf/2/properties/BYTES_PER_ELEMENT/type",
11227
11278
  keyword: "type",
@@ -11231,9 +11282,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11231
11282
  message: "must be number"
11232
11283
  };
11233
11284
  s === null ? s = [
11234
- er
11285
+ rr
11235
11286
  ] : s.push(
11236
- er
11287
+ rr
11237
11288
  ), e++;
11238
11289
  }
11239
11290
  var ye = he === e;
@@ -11249,7 +11300,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11249
11300
  )) {
11250
11301
  let fe;
11251
11302
  if (Q.byteLength === void 0 && (fe = "byteLength")) {
11252
- const rr = {
11303
+ const tr = {
11253
11304
  instancePath: t + "/data/buffer",
11254
11305
  schemaPath: "#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",
11255
11306
  keyword: "required",
@@ -11259,12 +11310,12 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11259
11310
  message: "must have required property '" + fe + "'"
11260
11311
  };
11261
11312
  s === null ? s = [
11262
- rr
11313
+ tr
11263
11314
  ] : s.push(
11264
- rr
11315
+ tr
11265
11316
  ), e++;
11266
11317
  } else {
11267
- const rr = e;
11318
+ const tr = e;
11268
11319
  for (const De in Q)
11269
11320
  if (De !== "byteLength") {
11270
11321
  const Ue = {
@@ -11283,7 +11334,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11283
11334
  ), e++;
11284
11335
  break;
11285
11336
  }
11286
- if (rr === e && Q.byteLength !== void 0) {
11337
+ if (tr === e && Q.byteLength !== void 0) {
11287
11338
  let De = Q.byteLength;
11288
11339
  if (!(typeof De == "number" && isFinite(
11289
11340
  De
@@ -11526,10 +11577,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11526
11577
  message: "must be number"
11527
11578
  }
11528
11579
  ], !1;
11529
- var Je = A === e;
11580
+ var Xe = A === e;
11530
11581
  } else
11531
- var Je = !0;
11532
- if (Je)
11582
+ var Xe = !0;
11583
+ if (Xe)
11533
11584
  if (i.caption !== void 0) {
11534
11585
  const a = e;
11535
11586
  if (typeof i.caption != "string")
@@ -11544,9 +11595,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11544
11595
  message: "must be string"
11545
11596
  }
11546
11597
  ], !1;
11547
- var Je = a === e;
11598
+ var Xe = a === e;
11548
11599
  } else
11549
- var Je = !0;
11600
+ var Xe = !0;
11550
11601
  }
11551
11602
  } else
11552
11603
  return o.errors = [
@@ -11712,10 +11763,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11712
11763
  message: "must be number"
11713
11764
  }
11714
11765
  ], !1;
11715
- var Xe = A === e;
11766
+ var Ke = A === e;
11716
11767
  } else
11717
- var Xe = !0;
11718
- if (Xe)
11768
+ var Ke = !0;
11769
+ if (Ke)
11719
11770
  if (i.caption !== void 0) {
11720
11771
  const a = e;
11721
11772
  if (typeof i.caption != "string")
@@ -11730,9 +11781,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11730
11781
  message: "must be string"
11731
11782
  }
11732
11783
  ], !1;
11733
- var Xe = a === e;
11784
+ var Ke = a === e;
11734
11785
  } else
11735
- var Xe = !0;
11786
+ var Ke = !0;
11736
11787
  }
11737
11788
  } else
11738
11789
  return o.errors = [
@@ -11798,14 +11849,14 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11798
11849
  };
11799
11850
  s === null ? s = [J] : s.push(J), e++;
11800
11851
  }
11801
- var pr = A === e;
11802
- if (a = a || pr, !a) {
11852
+ var lr = A === e;
11853
+ if (a = a || lr, !a) {
11803
11854
  const J = e;
11804
11855
  if (e === J)
11805
11856
  if (Array.isArray(
11806
11857
  i
11807
11858
  )) {
11808
- var _r = !0;
11859
+ var kr = !0;
11809
11860
  const le = i.length;
11810
11861
  for (let je = 0; je < le; je++) {
11811
11862
  const ne = e;
@@ -11825,8 +11876,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11825
11876
  Q
11826
11877
  ), e++;
11827
11878
  }
11828
- var _r = ne === e;
11829
- if (!_r)
11879
+ var kr = ne === e;
11880
+ if (!kr)
11830
11881
  break;
11831
11882
  }
11832
11883
  } else {
@@ -11845,8 +11896,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11845
11896
  le
11846
11897
  ), e++;
11847
11898
  }
11848
- var pr = J === e;
11849
- a = a || pr;
11899
+ var lr = J === e;
11900
+ a = a || lr;
11850
11901
  }
11851
11902
  if (a)
11852
11903
  e = j, s !== null && (j ? s.length = j : s = null);
@@ -11964,10 +12015,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11964
12015
  message: "must be number"
11965
12016
  }
11966
12017
  ], !1;
11967
- var Ke = A === e;
12018
+ var er = A === e;
11968
12019
  } else
11969
- var Ke = !0;
11970
- if (Ke)
12020
+ var er = !0;
12021
+ if (er)
11971
12022
  if (i.caption !== void 0) {
11972
12023
  const a = e;
11973
12024
  if (typeof i.caption != "string")
@@ -11982,9 +12033,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
11982
12033
  message: "must be string"
11983
12034
  }
11984
12035
  ], !1;
11985
- var Ke = a === e;
12036
+ var er = a === e;
11986
12037
  } else
11987
- var Ke = !0;
12038
+ var er = !0;
11988
12039
  }
11989
12040
  } else
11990
12041
  return o.errors = [
@@ -12109,20 +12160,20 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12109
12160
  if (e === 0)
12110
12161
  if (r && typeof r == "object" && !Array.isArray(r)) {
12111
12162
  const re = e;
12112
- for (const m in r)
12113
- if (!Mr.call(hs.properties, m))
12163
+ for (const h in r)
12164
+ if (!zr.call(gs.properties, h))
12114
12165
  return V.errors = [
12115
12166
  {
12116
12167
  instancePath: t,
12117
12168
  schemaPath: "#/additionalProperties",
12118
12169
  keyword: "additionalProperties",
12119
- params: { additionalProperty: m },
12170
+ params: { additionalProperty: h },
12120
12171
  message: "must NOT have additional properties"
12121
12172
  }
12122
12173
  ], !1;
12123
12174
  if (re === e) {
12124
12175
  if (r.landingPage !== void 0) {
12125
- const m = e;
12176
+ const h = e;
12126
12177
  if (typeof r.landingPage != "string")
12127
12178
  return V.errors = [
12128
12179
  {
@@ -12133,12 +12184,12 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12133
12184
  message: "must be string"
12134
12185
  }
12135
12186
  ], !1;
12136
- var p = m === e;
12187
+ var p = h === e;
12137
12188
  } else
12138
12189
  var p = !0;
12139
12190
  if (p) {
12140
12191
  if (r.description !== void 0) {
12141
- const m = e;
12192
+ const h = e;
12142
12193
  if (typeof r.description != "string")
12143
12194
  return V.errors = [
12144
12195
  {
@@ -12149,17 +12200,17 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12149
12200
  message: "must be string"
12150
12201
  }
12151
12202
  ], !1;
12152
- var p = m === e;
12203
+ var p = h === e;
12153
12204
  } else
12154
12205
  var p = !0;
12155
12206
  if (p) {
12156
12207
  if (r.meta !== void 0) {
12157
- let m = r.meta;
12208
+ let h = r.meta;
12158
12209
  const N = e;
12159
12210
  if (e === N)
12160
- if (m && typeof m == "object" && !Array.isArray(m)) {
12211
+ if (h && typeof h == "object" && !Array.isArray(h)) {
12161
12212
  let b;
12162
- if (m.title === void 0 && (b = "title") || m.author === void 0 && (b = "author"))
12213
+ if (h.title === void 0 && (b = "title") || h.author === void 0 && (b = "author"))
12163
12214
  return V.errors = [
12164
12215
  {
12165
12216
  instancePath: t + "/meta",
@@ -12173,7 +12224,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12173
12224
  ], !1;
12174
12225
  {
12175
12226
  const O = e;
12176
- for (const T in m)
12227
+ for (const T in h)
12177
12228
  if (!(T === "title" || T === "description" || T === "author" || T === "categories"))
12178
12229
  return V.errors = [
12179
12230
  {
@@ -12187,9 +12238,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12187
12238
  }
12188
12239
  ], !1;
12189
12240
  if (O === e) {
12190
- if (m.title !== void 0) {
12241
+ if (h.title !== void 0) {
12191
12242
  const T = e;
12192
- if (typeof m.title != "string")
12243
+ if (typeof h.title != "string")
12193
12244
  return V.errors = [
12194
12245
  {
12195
12246
  instancePath: t + "/meta/title",
@@ -12205,9 +12256,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12205
12256
  } else
12206
12257
  var d = !0;
12207
12258
  if (d) {
12208
- if (m.description !== void 0) {
12259
+ if (h.description !== void 0) {
12209
12260
  const T = e;
12210
- if (typeof m.description != "string")
12261
+ if (typeof h.description != "string")
12211
12262
  return V.errors = [
12212
12263
  {
12213
12264
  instancePath: t + "/meta/description",
@@ -12223,9 +12274,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12223
12274
  } else
12224
12275
  var d = !0;
12225
12276
  if (d) {
12226
- if (m.author !== void 0) {
12277
+ if (h.author !== void 0) {
12227
12278
  const T = e;
12228
- if (typeof m.author != "string")
12279
+ if (typeof h.author != "string")
12229
12280
  return V.errors = [
12230
12281
  {
12231
12282
  instancePath: t + "/meta/author",
@@ -12241,8 +12292,8 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12241
12292
  } else
12242
12293
  var d = !0;
12243
12294
  if (d)
12244
- if (m.categories !== void 0) {
12245
- let T = m.categories;
12295
+ if (h.categories !== void 0) {
12296
+ let T = h.categories;
12246
12297
  const P = e;
12247
12298
  if (e === P)
12248
12299
  if (Array.isArray(
@@ -12302,12 +12353,12 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12302
12353
  var p = !0;
12303
12354
  if (p) {
12304
12355
  if (r.preferredVersions !== void 0) {
12305
- let m = r.preferredVersions;
12356
+ let h = r.preferredVersions;
12306
12357
  const N = e;
12307
12358
  if (e === N)
12308
- if (m && typeof m == "object" && !Array.isArray(m)) {
12359
+ if (h && typeof h == "object" && !Array.isArray(h)) {
12309
12360
  let b;
12310
- if (m.php === void 0 && (b = "php") || m.wp === void 0 && (b = "wp"))
12361
+ if (h.php === void 0 && (b = "php") || h.wp === void 0 && (b = "wp"))
12311
12362
  return V.errors = [
12312
12363
  {
12313
12364
  instancePath: t + "/preferredVersions",
@@ -12321,7 +12372,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12321
12372
  ], !1;
12322
12373
  {
12323
12374
  const O = e;
12324
- for (const T in m)
12375
+ for (const T in h)
12325
12376
  if (!(T === "php" || T === "wp"))
12326
12377
  return V.errors = [
12327
12378
  {
@@ -12335,18 +12386,18 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12335
12386
  }
12336
12387
  ], !1;
12337
12388
  if (O === e) {
12338
- if (m.php !== void 0) {
12339
- let T = m.php;
12389
+ if (h.php !== void 0) {
12390
+ let T = h.php;
12340
12391
  const P = e, w = e;
12341
12392
  let R = !1;
12342
12393
  const L = e;
12343
- Ie(T, {
12394
+ We(T, {
12344
12395
  instancePath: t + "/preferredVersions/php",
12345
- parentData: m,
12396
+ parentData: h,
12346
12397
  parentDataProperty: "php",
12347
12398
  rootData: u
12348
- }) || (s = s === null ? Ie.errors : s.concat(
12349
- Ie.errors
12399
+ }) || (s = s === null ? We.errors : s.concat(
12400
+ We.errors
12350
12401
  ), e = s.length);
12351
12402
  var _ = L === e;
12352
12403
  if (R = R || _, !R) {
@@ -12398,13 +12449,13 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12398
12449
  };
12399
12450
  return s === null ? s = [U] : s.push(U), e++, V.errors = s, !1;
12400
12451
  }
12401
- var h = P === e;
12452
+ var m = P === e;
12402
12453
  } else
12403
- var h = !0;
12404
- if (h)
12405
- if (m.wp !== void 0) {
12454
+ var m = !0;
12455
+ if (m)
12456
+ if (h.wp !== void 0) {
12406
12457
  const T = e;
12407
- if (typeof m.wp != "string")
12458
+ if (typeof h.wp != "string")
12408
12459
  return V.errors = [
12409
12460
  {
12410
12461
  instancePath: t + "/preferredVersions/wp",
@@ -12416,9 +12467,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12416
12467
  message: "must be string"
12417
12468
  }
12418
12469
  ], !1;
12419
- var h = T === e;
12470
+ var m = T === e;
12420
12471
  } else
12421
- var h = !0;
12472
+ var m = !0;
12422
12473
  }
12423
12474
  }
12424
12475
  } else
@@ -12436,12 +12487,12 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12436
12487
  var p = !0;
12437
12488
  if (p) {
12438
12489
  if (r.features !== void 0) {
12439
- let m = r.features;
12490
+ let h = r.features;
12440
12491
  const N = e;
12441
12492
  if (e === N)
12442
- if (m && typeof m == "object" && !Array.isArray(m)) {
12493
+ if (h && typeof h == "object" && !Array.isArray(h)) {
12443
12494
  const b = e;
12444
- for (const O in m)
12495
+ for (const O in h)
12445
12496
  if (!(O === "intl" || O === "networking"))
12446
12497
  return V.errors = [
12447
12498
  {
@@ -12455,9 +12506,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12455
12506
  }
12456
12507
  ], !1;
12457
12508
  if (b === e) {
12458
- if (m.intl !== void 0) {
12509
+ if (h.intl !== void 0) {
12459
12510
  const O = e;
12460
- if (typeof m.intl != "boolean")
12511
+ if (typeof h.intl != "boolean")
12461
12512
  return V.errors = [
12462
12513
  {
12463
12514
  instancePath: t + "/features/intl",
@@ -12473,9 +12524,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12473
12524
  } else
12474
12525
  var k = !0;
12475
12526
  if (k)
12476
- if (m.networking !== void 0) {
12527
+ if (h.networking !== void 0) {
12477
12528
  const O = e;
12478
- if (typeof m.networking != "boolean")
12529
+ if (typeof h.networking != "boolean")
12479
12530
  return V.errors = [
12480
12531
  {
12481
12532
  instancePath: t + "/features/networking",
@@ -12506,14 +12557,14 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12506
12557
  var p = !0;
12507
12558
  if (p) {
12508
12559
  if (r.extraLibraries !== void 0) {
12509
- let m = r.extraLibraries;
12560
+ let h = r.extraLibraries;
12510
12561
  const N = e;
12511
12562
  if (e === N)
12512
- if (Array.isArray(m)) {
12563
+ if (Array.isArray(h)) {
12513
12564
  var E = !0;
12514
- const b = m.length;
12565
+ const b = h.length;
12515
12566
  for (let O = 0; O < b; O++) {
12516
- let T = m[O];
12567
+ let T = h[O];
12517
12568
  const P = e;
12518
12569
  if (typeof T != "string")
12519
12570
  return V.errors = [
@@ -12560,12 +12611,12 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12560
12611
  var p = !0;
12561
12612
  if (p) {
12562
12613
  if (r.constants !== void 0) {
12563
- let m = r.constants;
12614
+ let h = r.constants;
12564
12615
  const N = e;
12565
12616
  if (e === e)
12566
- if (m && typeof m == "object" && !Array.isArray(m))
12567
- for (const O in m) {
12568
- let T = m[O];
12617
+ if (h && typeof h == "object" && !Array.isArray(h))
12618
+ for (const O in h) {
12619
+ let T = h[O];
12569
12620
  const P = e;
12570
12621
  if (typeof T != "string" && typeof T != "boolean" && !(typeof T == "number" && isFinite(T)))
12571
12622
  return V.errors = [
@@ -12580,7 +12631,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12580
12631
  schemaPath: "#/definitions/PHPConstants/additionalProperties/type",
12581
12632
  keyword: "type",
12582
12633
  params: {
12583
- type: gs.additionalProperties.type
12634
+ type: bs.additionalProperties.type
12584
12635
  },
12585
12636
  message: "must be string,boolean,number"
12586
12637
  }
@@ -12606,14 +12657,14 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12606
12657
  var p = !0;
12607
12658
  if (p) {
12608
12659
  if (r.plugins !== void 0) {
12609
- let m = r.plugins;
12660
+ let h = r.plugins;
12610
12661
  const N = e;
12611
12662
  if (e === N)
12612
- if (Array.isArray(m)) {
12663
+ if (Array.isArray(h)) {
12613
12664
  var g = !0;
12614
- const b = m.length;
12665
+ const b = h.length;
12615
12666
  for (let O = 0; O < b; O++) {
12616
- let T = m[O];
12667
+ let T = h[O];
12617
12668
  const P = e, w = e;
12618
12669
  let R = !1;
12619
12670
  const L = e;
@@ -12640,7 +12691,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12640
12691
  T,
12641
12692
  {
12642
12693
  instancePath: t + "/plugins/" + O,
12643
- parentData: m,
12694
+ parentData: h,
12644
12695
  parentDataProperty: O,
12645
12696
  rootData: u
12646
12697
  }
@@ -12687,17 +12738,17 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12687
12738
  var p = !0;
12688
12739
  if (p) {
12689
12740
  if (r.siteOptions !== void 0) {
12690
- let m = r.siteOptions;
12741
+ let h = r.siteOptions;
12691
12742
  const N = e;
12692
12743
  if (e === N)
12693
- if (m && typeof m == "object" && !Array.isArray(
12694
- m
12744
+ if (h && typeof h == "object" && !Array.isArray(
12745
+ h
12695
12746
  )) {
12696
12747
  const b = e;
12697
- for (const O in m)
12748
+ for (const O in h)
12698
12749
  if (O !== "blogname") {
12699
12750
  const T = e;
12700
- if (typeof m[O] != "string")
12751
+ if (typeof h[O] != "string")
12701
12752
  return V.errors = [
12702
12753
  {
12703
12754
  instancePath: t + "/siteOptions/" + O.replace(
@@ -12719,7 +12770,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12719
12770
  if (!X)
12720
12771
  break;
12721
12772
  }
12722
- if (b === e && m.blogname !== void 0 && typeof m.blogname != "string")
12773
+ if (b === e && h.blogname !== void 0 && typeof h.blogname != "string")
12723
12774
  return V.errors = [
12724
12775
  {
12725
12776
  instancePath: t + "/siteOptions/blogname",
@@ -12748,11 +12799,11 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12748
12799
  var p = !0;
12749
12800
  if (p) {
12750
12801
  if (r.login !== void 0) {
12751
- let m = r.login;
12802
+ let h = r.login;
12752
12803
  const N = e, v = e;
12753
12804
  let b = !1;
12754
12805
  const O = e;
12755
- if (typeof m != "boolean") {
12806
+ if (typeof h != "boolean") {
12756
12807
  const P = {
12757
12808
  instancePath: t + "/login",
12758
12809
  schemaPath: "#/properties/login/anyOf/0/type",
@@ -12772,11 +12823,11 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12772
12823
  if (b = b || Z, !b) {
12773
12824
  const P = e;
12774
12825
  if (e === P)
12775
- if (m && typeof m == "object" && !Array.isArray(
12776
- m
12826
+ if (h && typeof h == "object" && !Array.isArray(
12827
+ h
12777
12828
  )) {
12778
12829
  let R;
12779
- if (m.username === void 0 && (R = "username") || m.password === void 0 && (R = "password")) {
12830
+ if (h.username === void 0 && (R = "username") || h.password === void 0 && (R = "password")) {
12780
12831
  const L = {
12781
12832
  instancePath: t + "/login",
12782
12833
  schemaPath: "#/properties/login/anyOf/1/required",
@@ -12793,7 +12844,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12793
12844
  ), e++;
12794
12845
  } else {
12795
12846
  const L = e;
12796
- for (const U in m)
12847
+ for (const U in h)
12797
12848
  if (!(U === "username" || U === "password")) {
12798
12849
  const F = {
12799
12850
  instancePath: t + "/login",
@@ -12812,9 +12863,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12812
12863
  break;
12813
12864
  }
12814
12865
  if (L === e) {
12815
- if (m.username !== void 0) {
12866
+ if (h.username !== void 0) {
12816
12867
  const U = e;
12817
- if (typeof m.username != "string") {
12868
+ if (typeof h.username != "string") {
12818
12869
  const F = {
12819
12870
  instancePath: t + "/login/username",
12820
12871
  schemaPath: "#/properties/login/anyOf/1/properties/username/type",
@@ -12834,9 +12885,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12834
12885
  } else
12835
12886
  var q = !0;
12836
12887
  if (q)
12837
- if (m.password !== void 0) {
12888
+ if (h.password !== void 0) {
12838
12889
  const U = e;
12839
- if (typeof m.password != "string") {
12890
+ if (typeof h.password != "string") {
12840
12891
  const I = {
12841
12892
  instancePath: t + "/login/password",
12842
12893
  schemaPath: "#/properties/login/anyOf/1/properties/password/type",
@@ -12897,16 +12948,16 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12897
12948
  var p = !0;
12898
12949
  if (p) {
12899
12950
  if (r.steps !== void 0) {
12900
- let m = r.steps;
12951
+ let h = r.steps;
12901
12952
  const N = e;
12902
12953
  if (e === N)
12903
12954
  if (Array.isArray(
12904
- m
12955
+ h
12905
12956
  )) {
12906
12957
  var K = !0;
12907
- const b = m.length;
12958
+ const b = h.length;
12908
12959
  for (let O = 0; O < b; O++) {
12909
- let T = m[O];
12960
+ let T = h[O];
12910
12961
  const P = e, w = e;
12911
12962
  let R = !1;
12912
12963
  const L = e;
@@ -12914,7 +12965,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
12914
12965
  T,
12915
12966
  {
12916
12967
  instancePath: t + "/steps/" + O,
12917
- parentData: m,
12968
+ parentData: h,
12918
12969
  parentDataProperty: O,
12919
12970
  rootData: u
12920
12971
  }
@@ -13051,7 +13102,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
13051
13102
  var p = !0;
13052
13103
  if (p)
13053
13104
  if (r.$schema !== void 0) {
13054
- const m = e;
13105
+ const h = e;
13055
13106
  if (typeof r.$schema != "string")
13056
13107
  return V.errors = [
13057
13108
  {
@@ -13064,7 +13115,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
13064
13115
  message: "must be string"
13065
13116
  }
13066
13117
  ], !1;
13067
- var p = m === e;
13118
+ var p = h === e;
13068
13119
  } else
13069
13120
  var p = !0;
13070
13121
  }
@@ -13090,53 +13141,53 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
13090
13141
  ], !1;
13091
13142
  return V.errors = s, e === 0;
13092
13143
  }
13093
- function sr(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
13144
+ function ir(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
13094
13145
  let s = null, e = 0;
13095
13146
  return V(r, {
13096
13147
  instancePath: t,
13097
13148
  parentData: n,
13098
13149
  parentDataProperty: l,
13099
13150
  rootData: u
13100
- }) || (s = s === null ? V.errors : s.concat(V.errors), e = s.length), sr.errors = s, e === 0;
13151
+ }) || (s = s === null ? V.errors : s.concat(V.errors), e = s.length), ir.errors = s, e === 0;
13101
13152
  }
13102
- const { wpCLI: _s, ...$r } = ys, ks = {
13103
- ...$r,
13104
- "wp-cli": _s,
13105
- importFile: $r.importWxr
13153
+ const { wpCLI: Os, ...jr } = hs, Ts = {
13154
+ ...jr,
13155
+ "wp-cli": Os,
13156
+ importFile: jr.importWxr
13106
13157
  };
13107
- class Os extends Error {
13158
+ class Es extends Error {
13108
13159
  constructor(t, n) {
13109
13160
  super(t), this.name = "InvalidBlueprintError", this.validationErrors = n;
13110
13161
  }
13111
13162
  }
13112
- class Ts extends Error {
13163
+ class $s extends Error {
13113
13164
  constructor(t) {
13114
13165
  const { stepNumber: n, step: l, cause: u } = t, s = u instanceof Error ? u : new Error(String(u)), e = `Error when executing the blueprint step #${n}`, p = s.message ? `${e}: ${s.message}` : e;
13115
13166
  super(p, { cause: s }), this.name = "BlueprintStepExecutionError", this.stepNumber = n, this.step = l, this.messages = (s.message || "").split(`
13116
13167
  `).map((d) => d.trim()).filter(Boolean);
13117
13168
  }
13118
13169
  }
13119
- async function Es(r, t = {}) {
13170
+ async function js(r, t = {}) {
13120
13171
  const n = {
13121
13172
  ...t
13122
13173
  };
13123
13174
  let l;
13124
- return Vr(r) ? (l = await $s(r), n.streamBundledFile = function(...u) {
13175
+ return Hr(r) ? (l = await qs(r), n.streamBundledFile = function(...u) {
13125
13176
  return r.read(...u);
13126
- }) : l = r, js(l, n);
13177
+ }) : l = r, As(l, n);
13127
13178
  }
13128
- function Vr(r) {
13179
+ function Hr(r) {
13129
13180
  return r && "read" in r && typeof r.read == "function";
13130
13181
  }
13131
- async function $s(r) {
13132
- if (!Vr(r))
13182
+ async function qs(r) {
13183
+ if (!Hr(r))
13133
13184
  return r;
13134
13185
  const n = await (await r.read("blueprint.json")).text();
13135
13186
  return JSON.parse(n);
13136
13187
  }
13137
- function js(r, {
13138
- progress: t = new Yr(),
13139
- semaphore: n = new qr({ concurrency: 3 }),
13188
+ function As(r, {
13189
+ progress: t = new Gr(),
13190
+ semaphore: n = new Ar({ concurrency: 3 }),
13140
13191
  onStepCompleted: l = () => {
13141
13192
  },
13142
13193
  onBlueprintValidated: u = () => {
@@ -13146,10 +13197,10 @@ function js(r, {
13146
13197
  gitAdditionalHeadersCallback: p,
13147
13198
  additionalSteps: d
13148
13199
  } = {}) {
13149
- var g, B, X, Z, q, K, W, re, m, N;
13200
+ var g, B, X, Z, q, K, W, re, h, N;
13150
13201
  r = structuredClone(r), r = {
13151
13202
  ...r,
13152
- steps: (r.steps || []).filter(Ss).filter(Ls)
13203
+ steps: (r.steps || []).filter(Fs).filter(Ns)
13153
13204
  }, r.steps = [...r.steps || [], ...d || []];
13154
13205
  for (const v of r.steps)
13155
13206
  !v || typeof v != "object" || (v.step === "importFile" ? (v.step = "importWxr", ae.warn(
@@ -13166,7 +13217,7 @@ function js(r, {
13166
13217
  step: "setSiteOptions",
13167
13218
  options: r.siteOptions
13168
13219
  }), r.plugins) {
13169
- const v = r.plugins.map((b) => typeof b == "string" ? xs(b) ? {
13220
+ const v = r.plugins.map((b) => typeof b == "string" ? Ds(b) ? {
13170
13221
  resource: "zip",
13171
13222
  inner: {
13172
13223
  resource: "git:directory",
@@ -13195,8 +13246,8 @@ function js(r, {
13195
13246
  if ((B = r == null ? void 0 : r.extraLibraries) != null && B.includes("wp-cli") || y !== -1) {
13196
13247
  const v = {
13197
13248
  step: "writeFile",
13198
- data: Vt,
13199
- path: wr
13249
+ data: Ht,
13250
+ path: vr
13200
13251
  };
13201
13252
  y === -1 ? (X = r.steps) == null || X.push(v) : (Z = r.steps) == null || Z.splice(
13202
13253
  y,
@@ -13214,10 +13265,10 @@ function js(r, {
13214
13265
  slug: "wordpress-importer"
13215
13266
  }
13216
13267
  }));
13217
- const h = As(r);
13218
- if (!h.valid) {
13219
- const { errors: v } = h, b = qs(r, v);
13220
- throw new Os(
13268
+ const m = Ss(r);
13269
+ if (!m.valid) {
13270
+ const { errors: v } = m, b = Rs(r, v);
13271
+ throw new Es(
13221
13272
  `Invalid Blueprint: The Blueprint does not conform to the schema.
13222
13273
 
13223
13274
  Found ${v.length} validation error(s):
@@ -13236,7 +13287,7 @@ Please review your Blueprint and fix these issues. Learn more about the Blueprin
13236
13287
  },
13237
13288
  0
13238
13289
  ), $ = k.map(
13239
- (v) => Fs(v, {
13290
+ (v) => xs(v, {
13240
13291
  semaphore: n,
13241
13292
  rootProgressTracker: t,
13242
13293
  totalProgressWeight: E,
@@ -13247,16 +13298,16 @@ Please review your Blueprint and fix these issues. Learn more about the Blueprin
13247
13298
  );
13248
13299
  return {
13249
13300
  versions: {
13250
- php: Rs(
13301
+ php: Ls(
13251
13302
  (W = r.preferredVersions) == null ? void 0 : W.php,
13252
- Xr,
13253
- Jr
13303
+ Kr,
13304
+ Xr
13254
13305
  ),
13255
13306
  wp: ((re = r.preferredVersions) == null ? void 0 : re.wp) || "latest"
13256
13307
  },
13257
13308
  features: {
13258
13309
  // Disable intl by default to reduce the transfer size
13259
- intl: ((m = r.features) == null ? void 0 : m.intl) ?? !1,
13310
+ intl: ((h = r.features) == null ? void 0 : h.intl) ?? !1,
13260
13311
  // Enable network access by default
13261
13312
  networking: ((N = r.features) == null ? void 0 : N.networking) ?? !0
13262
13313
  },
@@ -13273,7 +13324,7 @@ Please review your Blueprint and fix these issues. Learn more about the Blueprin
13273
13324
  l(P, T);
13274
13325
  } catch (P) {
13275
13326
  const w = Number(b) + 1;
13276
- throw new Ts({
13327
+ throw new $s({
13277
13328
  stepNumber: w,
13278
13329
  step: T,
13279
13330
  cause: P
@@ -13292,7 +13343,7 @@ Please review your Blueprint and fix these issues. Learn more about the Blueprin
13292
13343
  }
13293
13344
  };
13294
13345
  }
13295
- function qs(r, t) {
13346
+ function Rs(r, t) {
13296
13347
  return t.map((n, l) => {
13297
13348
  var p;
13298
13349
  const u = n.instancePath || "/";
@@ -13304,10 +13355,10 @@ function qs(r, t) {
13304
13355
  try {
13305
13356
  const y = u.split("/").filter(Boolean);
13306
13357
  let _ = r;
13307
- for (const h of y)
13308
- _ && typeof _ == "object" && (_ = _[h]);
13358
+ for (const m of y)
13359
+ _ && typeof _ == "object" && (_ = _[m]);
13309
13360
  if (_ && typeof _ == "object") {
13310
- const h = _[d], k = JSON.stringify(h);
13361
+ const m = _[d], k = JSON.stringify(m);
13311
13362
  e = `
13312
13363
  "${d}": ${k}
13313
13364
  ${"^".repeat(
@@ -13335,37 +13386,37 @@ function qs(r, t) {
13335
13386
 
13336
13387
  `);
13337
13388
  }
13338
- function As(r) {
13389
+ function Ss(r) {
13339
13390
  var u;
13340
- const t = sr(r);
13391
+ const t = ir(r);
13341
13392
  if (t)
13342
13393
  return { valid: t };
13343
13394
  const n = /* @__PURE__ */ new Set();
13344
- for (const s of sr.errors)
13395
+ for (const s of ir.errors)
13345
13396
  s.schemaPath.startsWith("#/properties/steps/items/anyOf") || n.add(s.instancePath);
13346
13397
  return {
13347
13398
  valid: !1,
13348
- errors: ((u = sr.errors) == null ? void 0 : u.filter(
13399
+ errors: ((u = ir.errors) == null ? void 0 : u.filter(
13349
13400
  (s) => !(s.schemaPath.startsWith(
13350
13401
  "#/properties/steps/items/anyOf"
13351
13402
  ) && n.has(s.instancePath))
13352
13403
  )) ?? []
13353
13404
  };
13354
13405
  }
13355
- function Rs(r, t, n) {
13406
+ function Ls(r, t, n) {
13356
13407
  return (r === "7.2" || r === "7.3") && (ae.warn(
13357
13408
  `PHP ${r} is no longer supported. Automatically upgrading to PHP 7.4.`
13358
13409
  ), r = "7.4"), r && t.includes(r) ? r : n;
13359
13410
  }
13360
- function Ss(r) {
13411
+ function Fs(r) {
13361
13412
  return !!(typeof r == "object" && r);
13362
13413
  }
13363
- function Ls(r) {
13414
+ function Ns(r) {
13364
13415
  return ["setPhpIniEntry", "request"].includes(r.step) ? (ae.warn(
13365
13416
  `The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`
13366
13417
  ), !1) : !0;
13367
13418
  }
13368
- function Fs(r, {
13419
+ function xs(r, {
13369
13420
  semaphore: t,
13370
13421
  rootProgressTracker: n,
13371
13422
  totalProgressWeight: l,
@@ -13379,7 +13430,7 @@ function Fs(r, {
13379
13430
  ), d = {};
13380
13431
  for (const $ of Object.keys(r)) {
13381
13432
  let g = r[$];
13382
- vt(g) && (g = we.create(g, {
13433
+ Pt(g) && (g = we.create(g, {
13383
13434
  semaphore: t,
13384
13435
  corsProxy: u,
13385
13436
  streamBundledFile: s,
@@ -13389,9 +13440,9 @@ function Fs(r, {
13389
13440
  const y = async ($) => {
13390
13441
  var g;
13391
13442
  try {
13392
- return p.fillSlowly(), await ks[r.step](
13443
+ return p.fillSlowly(), await Ts[r.step](
13393
13444
  $,
13394
- await Ns(d),
13445
+ await Cs(d),
13395
13446
  {
13396
13447
  tracker: p,
13397
13448
  initialCaption: (g = r.progress) == null ? void 0 : g.caption
@@ -13400,14 +13451,14 @@ function Fs(r, {
13400
13451
  } finally {
13401
13452
  p.finish();
13402
13453
  }
13403
- }, _ = jr(d), h = jr(d).filter(
13454
+ }, _ = qr(d), m = qr(d).filter(
13404
13455
  ($) => $.isAsync
13405
- ), k = 1 / (h.length + 1);
13406
- for (const $ of h)
13456
+ ), k = 1 / (m.length + 1);
13457
+ for (const $ of m)
13407
13458
  $.progress = p.stage(k);
13408
13459
  return { run: y, step: r, resources: _ };
13409
13460
  }
13410
- function jr(r) {
13461
+ function qr(r) {
13411
13462
  const t = [];
13412
13463
  for (const n in r) {
13413
13464
  const l = r[n];
@@ -13415,7 +13466,7 @@ function jr(r) {
13415
13466
  }
13416
13467
  return t;
13417
13468
  }
13418
- async function Ns(r) {
13469
+ async function Cs(r) {
13419
13470
  const t = {};
13420
13471
  for (const n in r) {
13421
13472
  const l = r[n];
@@ -13423,13 +13474,13 @@ async function Ns(r) {
13423
13474
  }
13424
13475
  return t;
13425
13476
  }
13426
- async function Xs(r, t) {
13477
+ async function ei(r, t) {
13427
13478
  await r.run(t);
13428
13479
  }
13429
- function xs(r) {
13480
+ function Ds(r) {
13430
13481
  return !!(/^https:\/\/.+\.git\/?$/.test(r) || /^https:\/\/github\.com\/[^/]+\/[^/]+\/?$/.test(r) || /^https:\/\/gitlab\.com\/[^/]+\/[^/]+(\/[^/]+)*\/?$/.test(r));
13431
13482
  }
13432
- async function Cs() {
13483
+ async function Us() {
13433
13484
  const r = (
13434
13485
  // @ts-ignore
13435
13486
  (await import("./blueprints-pMn3V9MZ.js")).default
@@ -13438,7 +13489,7 @@ async function Cs() {
13438
13489
  type: "application/zip"
13439
13490
  });
13440
13491
  }
13441
- function Ds(r) {
13492
+ function Is(r) {
13442
13493
  if (typeof r == "object" && "type" in r && ["inline-file", "file-reference"].includes(r.type))
13443
13494
  return r;
13444
13495
  if (!r)
@@ -13463,8 +13514,8 @@ function Ds(r) {
13463
13514
  };
13464
13515
  }
13465
13516
  }
13466
- async function Ks(r) {
13467
- var _, h;
13517
+ async function ri(r) {
13518
+ var _, m;
13468
13519
  const t = r.cliArgs || [];
13469
13520
  for (const k of t)
13470
13521
  if (k.startsWith("--site-path="))
@@ -13473,12 +13524,12 @@ async function Ks(r) {
13473
13524
  );
13474
13525
  t.push("--site-path=/wordpress"), t.find((k) => k.startsWith("--db-engine=")) || t.push("--db-engine=sqlite");
13475
13526
  const l = r.php, u = (r == null ? void 0 : r.onMessage) || (() => {
13476
- }), s = await Cs();
13527
+ }), s = await Us();
13477
13528
  l.writeFile(
13478
13529
  "/tmp/blueprints.phar",
13479
13530
  new Uint8Array(await s.arrayBuffer())
13480
13531
  );
13481
- const e = Ds(
13532
+ const e = Is(
13482
13533
  r.blueprint
13483
13534
  );
13484
13535
  let p = "";
@@ -13535,7 +13586,7 @@ function playground_on_blueprint_resolved($blueprint) {
13535
13586
  }
13536
13587
 
13537
13588
  $wp_version_override = json_decode(${be(
13538
- JSON.stringify(((h = r.blueprintOverrides) == null ? void 0 : h.wordpressVersion) || null)
13589
+ JSON.stringify(((m = r.blueprintOverrides) == null ? void 0 : m.wordpressVersion) || null)
13539
13590
  )}, true);
13540
13591
  if($wp_version_override) {
13541
13592
  $blueprint['wordpressVersion'] = $wp_version_override;
@@ -13601,12 +13652,12 @@ require( "/tmp/blueprints.phar" );
13601
13652
  ]);
13602
13653
  return y.finished.finally(d), y;
13603
13654
  }
13604
- class Us extends Error {
13655
+ class Ws extends Error {
13605
13656
  constructor(t, n, l) {
13606
13657
  super(t, l), this.name = "BlueprintFetchError", this.url = n;
13607
13658
  }
13608
13659
  }
13609
- async function ei(r) {
13660
+ async function ti(r) {
13610
13661
  let t;
13611
13662
  try {
13612
13663
  const n = await fetch(r, {
@@ -13616,7 +13667,7 @@ async function ei(r) {
13616
13667
  throw new Error(`Failed to fetch blueprint from ${r}`);
13617
13668
  t = await n.arrayBuffer();
13618
13669
  } catch (n) {
13619
- throw new Us(
13670
+ throw new Ws(
13620
13671
  `Blueprint file could not be resolved from ${r}: ${n instanceof Error ? n.message : String(n)}`,
13621
13672
  r,
13622
13673
  { cause: n }
@@ -13624,31 +13675,31 @@ async function ei(r) {
13624
13675
  }
13625
13676
  try {
13626
13677
  const n = new TextDecoder().decode(t);
13627
- return JSON.parse(n), new it([
13628
- new ot({
13678
+ return JSON.parse(n), new ot([
13679
+ new at({
13629
13680
  "blueprint.json": n
13630
13681
  }),
13631
- new at({
13682
+ new nt({
13632
13683
  baseUrl: r
13633
13684
  })
13634
13685
  ]);
13635
13686
  } catch (n) {
13636
- if (await Bs(t))
13637
- return Ws(t);
13687
+ if (await zs(t))
13688
+ return Ms(t);
13638
13689
  throw new Error(
13639
13690
  `Blueprint file at ${r} is neither a valid JSON nor a ZIP file.`,
13640
13691
  { cause: n }
13641
13692
  );
13642
13693
  }
13643
13694
  }
13644
- function Is(r) {
13645
- const t = r.map((l) => Gr(l));
13646
- if (t.some((l) => kr(l) === "blueprint.json" && yr(l) === ""))
13695
+ function Bs(r) {
13696
+ const t = r.map((l) => Jr(l));
13697
+ if (t.some((l) => Or(l) === "blueprint.json" && hr(l) === ""))
13647
13698
  return "blueprint.json";
13648
13699
  const n = /* @__PURE__ */ new Set();
13649
13700
  for (const l of t) {
13650
13701
  const u = l.split("/")[0];
13651
- u && u !== kr(l) && u !== "__MACOSX" && n.add(u);
13702
+ u && u !== Or(l) && u !== "__MACOSX" && n.add(u);
13652
13703
  }
13653
13704
  if (n.size > 1)
13654
13705
  throw new Error(
@@ -13663,19 +13714,19 @@ function Is(r) {
13663
13714
  "ZIP does not contain a blueprint.json. Place blueprint.json at the ZIP root or inside a single top-level directory."
13664
13715
  );
13665
13716
  }
13666
- async function Ws(r) {
13667
- const t = nt.fromArrayBuffer(r), n = await t.getAllFilePaths(), l = Is(n), u = yr(l);
13668
- return u === "" ? t : new pt(u, t);
13717
+ async function Ms(r) {
13718
+ const t = pt.fromArrayBuffer(r), n = await t.getAllFilePaths(), l = Bs(n), u = hr(l);
13719
+ return u === "" ? t : new lt(u, t);
13669
13720
  }
13670
- async function Bs(r) {
13721
+ async function zs(r) {
13671
13722
  if (r.byteLength < 4)
13672
13723
  return !1;
13673
13724
  const t = new Uint8Array(r, 0, 4);
13674
13725
  return t[0] === 80 && t[1] === 75 && t[2] === 3 && t[3] === 4;
13675
13726
  }
13676
- async function ri(r) {
13677
- if ((await or.create(r)).getVersion() === 1) {
13678
- const n = await Es(
13727
+ async function si(r) {
13728
+ if ((await ar.create(r)).getVersion() === 1) {
13729
+ const n = await js(
13679
13730
  r
13680
13731
  );
13681
13732
  return {
@@ -13697,7 +13748,7 @@ async function ri(r) {
13697
13748
  };
13698
13749
  } else
13699
13750
  return {
13700
- phpVersion: yt,
13751
+ phpVersion: ht,
13701
13752
  wpVersion: "latest",
13702
13753
  intl: !1,
13703
13754
  networking: !0,
@@ -13705,59 +13756,59 @@ async function ri(r) {
13705
13756
  extraLibraries: []
13706
13757
  };
13707
13758
  }
13708
- function ti() {
13759
+ function ii() {
13709
13760
  }
13710
13761
  export {
13711
- Us as BlueprintFetchError,
13712
- bt as BlueprintFilesystemRequiredError,
13713
- or as BlueprintReflection,
13714
- Ts as BlueprintStepExecutionError,
13715
- Os as InvalidBlueprintError,
13716
- fr as ResourceDownloadError,
13717
- Fr as activatePlugin,
13718
- Nr as activateTheme,
13719
- Es as compileBlueprint,
13720
- Es as compileBlueprintV1,
13721
- Qt as cp,
13722
- Ur as defineSiteUrl,
13723
- br as defineWpConfigConsts,
13724
- Zt as enableMultisite,
13725
- is as exportWXR,
13726
- $s as getBlueprintDeclaration,
13727
- Cs as getV2Runner,
13728
- Ir as importThemeStarterContent,
13729
- rs as importWordPressFiles,
13730
- Kt as importWxr,
13731
- os as installPlugin,
13732
- as as installTheme,
13733
- Vr as isBlueprintBundle,
13734
- Ss as isStepDefinition,
13735
- ns as login,
13736
- Gt as mkdir,
13737
- Yt as mv,
13738
- Bt as request,
13739
- ps as resetData,
13740
- ei as resolveRemoteBlueprint,
13741
- ri as resolveRuntimeConfiguration,
13742
- cr as rm,
13743
- Jt as rmdir,
13744
- Xs as runBlueprintSteps,
13745
- Xs as runBlueprintV1Steps,
13746
- Ks as runBlueprintV2,
13747
- Dt as runPHP,
13748
- Ut as runPHPWithOptions,
13749
- Wt as runSql,
13750
- ls as runWpInstallationWizard,
13751
- ti as setPluginProxyURL,
13752
- ms as setSiteLanguage,
13753
- xr as setSiteOptions,
13754
- Pr as unzip,
13755
- zt as updateUserMeta,
13756
- As as validateBlueprint,
13757
- Dr as wpCLI,
13758
- Wr as wpContentFilesExcludedFromExport,
13759
- vr as writeFile,
13760
- Xt as writeFiles,
13761
- fs as zipWpContent
13762
+ Ws as BlueprintFetchError,
13763
+ wt as BlueprintFilesystemRequiredError,
13764
+ ar as BlueprintReflection,
13765
+ $s as BlueprintStepExecutionError,
13766
+ Es as InvalidBlueprintError,
13767
+ ur as ResourceDownloadError,
13768
+ Nr as activatePlugin,
13769
+ xr as activateTheme,
13770
+ js as compileBlueprint,
13771
+ js as compileBlueprintV1,
13772
+ Yt as cp,
13773
+ Ir as defineSiteUrl,
13774
+ wr as defineWpConfigConsts,
13775
+ Qt as enableMultisite,
13776
+ os as exportWXR,
13777
+ qs as getBlueprintDeclaration,
13778
+ Us as getV2Runner,
13779
+ Wr as importThemeStarterContent,
13780
+ ts as importWordPressFiles,
13781
+ es as importWxr,
13782
+ as as installPlugin,
13783
+ ns as installTheme,
13784
+ Hr as isBlueprintBundle,
13785
+ Fs as isStepDefinition,
13786
+ ps as login,
13787
+ Jt as mkdir,
13788
+ Gt as mv,
13789
+ Mt as request,
13790
+ ls as resetData,
13791
+ ti as resolveRemoteBlueprint,
13792
+ si as resolveRuntimeConfiguration,
13793
+ mr as rm,
13794
+ Xt as rmdir,
13795
+ ei as runBlueprintSteps,
13796
+ ei as runBlueprintV1Steps,
13797
+ ri as runBlueprintV2,
13798
+ Ut as runPHP,
13799
+ It as runPHPWithOptions,
13800
+ Bt as runSql,
13801
+ fs as runWpInstallationWizard,
13802
+ ii as setPluginProxyURL,
13803
+ ys as setSiteLanguage,
13804
+ Cr as setSiteOptions,
13805
+ _r as unzip,
13806
+ Vt as updateUserMeta,
13807
+ Ss as validateBlueprint,
13808
+ Ur as wpCLI,
13809
+ Br as wpContentFilesExcludedFromExport,
13810
+ Pr as writeFile,
13811
+ Kt as writeFiles,
13812
+ us as zipWpContent
13762
13813
  };
13763
13814
  //# sourceMappingURL=index.js.map