@wp-playground/blueprints 3.0.22 → 3.0.32
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/blueprint-schema-validator.js +1971 -1688
- package/blueprint-schema.json +121 -80
- package/blueprints-Gs5fAvvo.cjs +2 -0
- package/blueprints-Gs5fAvvo.cjs.map +1 -0
- package/blueprints-pMn3V9MZ.js +5 -0
- package/blueprints-pMn3V9MZ.js.map +1 -0
- package/index.cjs +349 -100
- package/index.cjs.map +1 -1
- package/index.d.ts +4 -3
- package/index.js +3708 -3052
- package/index.js.map +1 -1
- package/lib/reflection.d.ts +1 -1
- package/lib/resolve-remote-blueprint.d.ts +4 -0
- package/lib/steps/run-php-with-options.d.ts +3 -5
- package/lib/steps/run-sql.d.ts +5 -3
- package/lib/types.d.ts +2 -2
- package/lib/v1/compile.d.ts +39 -4
- package/lib/v1/resources.d.ts +66 -3
- package/lib/v1/types.d.ts +1 -0
- package/package.json +22 -16
- package/blueprints-DY7omvFh.cjs +0 -2
- package/blueprints-DY7omvFh.cjs.map +0 -1
- package/blueprints-Dg6flSLH.js +0 -5
- package/blueprints-Dg6flSLH.js.map +0 -1
package/index.cjs
CHANGED
|
@@ -1,30 +1,21 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@php-wasm/node-polyfills");const
|
|
2
|
-
Check if the URL is correct and the server is reachable.
|
|
3
|
-
If it is reachable, the server might be blocking the request.
|
|
4
|
-
Check the browser console and network tabs for more information.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@php-wasm/node-polyfills");const gr=require("@php-wasm/progress"),I=require("@php-wasm/util"),Ie=require("@php-wasm/universal"),ve=require("@wp-playground/storage"),vt=require("@php-wasm/web"),hr=require("@php-wasm/stream-compression"),ae=require("@php-wasm/logger"),Nr=require("@wp-playground/wordpress"),br=require("@wp-playground/common");function xr(r){return r&&"read"in r&&typeof r.read=="function"}async function Pt(r){if(!xr(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}class We{static async create(t){const n=await Pt(t),f=xr(t)?t:void 0;return We.createFromDeclaration(n,f)}static createFromDeclaration(t,n=void 0){return new We(t,n,t.version||1)}constructor(t,n,f){this.declaration=t,this.bundle=n,this.version=f}getVersion(){return this.version}getDeclaration(){return this.declaration}isBundle(){return this.bundle!==void 0}getBundle(){return this.bundle}getBlueprint(){return this.getBundle()||this.getDeclaration()}}function nr(r){const t=r.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const _t=`Blueprint resource of type "bundled" requires a filesystem.
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
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:
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
cross-origin file downloads. Learn more about CORS at
|
|
11
|
-
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS.
|
|
5
|
+
1. You're trying to load a Blueprint as a standalone JSON file that was meant to be part of a bundle
|
|
6
|
+
2. The Blueprint was not packaged correctly as a blueprint.zip file
|
|
12
7
|
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
To fix this:
|
|
9
|
+
• If you're loading from a URL, make sure all referenced files are accessible relative to the Blueprint file
|
|
10
|
+
• If you're using a blueprint.zip file, ensure it contains all the files referenced in the Blueprint
|
|
11
|
+
• Check that the "resource": "bundled" references in your Blueprint match actual files in your bundle
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
https://github.com/username/repository/blob/branch/filename.
|
|
18
|
-
2. Replace "github.com" with "raw.githubusercontent.com".
|
|
19
|
-
3. Remove the "/blob/" part of the URL.
|
|
13
|
+
Learn more about Blueprint resources: https://wordpress.github.io/wordpress-playground/blueprints/data-format#resources`;class Cr extends Error{constructor(t=_t){super(t),this.name="BlueprintFilesystemRequiredError"}}class ir extends Error{constructor(t,n,f){super(t,f),this.name="ResourceDownloadError",this.url=n}}const kt=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url","git:directory","bundled","zip"];function Ot(r){return r&&typeof r=="object"&&typeof r.resource=="string"&&kt.includes(r.resource)}function Et(r){try{return new URL(r).hostname==="github-proxy.com"}catch{return!1}}function Tt(r){let t;try{t=new URL(r)}catch{return null}if(t.hostname!=="github-proxy.com")return null;const n=t.pathname.slice(1);if(n.startsWith("https://github.com/")||n.startsWith("http://github.com/"))return{resource:"url",url:n};const f=t.searchParams,u=f.get("repo");if(!u)return null;const s=f.get("release"),e=f.get("asset");if(s&&e){const T=s==="latest"?"releases/latest/download":`releases/download/${s}`;return{resource:"url",url:`https://github.com/${u}/${T}/${e}`}}let p,d;const y=f.get("pr"),E=f.get("commit"),v=f.get("branch");y?p=`refs/pull/${y}/head`:E?(p=E,d="commit"):s?(p=s,d="tag"):p=v||"HEAD";const k=f.get("directory");return{resource:"zip",inner:{resource:"git:directory",url:`https://github.com/${u}`,ref:p,...d&&{refType:d},...k&&{path:k}}}}class be{get progress(){return this._progress}set progress(t){this._progress=t}setPlayground(t){this.playground=t}get isAsync(){return!1}static create(t,{semaphore:n,progress:f,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e}){if(t.resource==="url"&&Et(t.url)){const d=Tt(t.url);d&&(console.warn(`[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`),t=d)}let p;switch(t.resource){case"vfs":p=new $t(t,f);break;case"literal":p=new jt(t,f);break;case"wordpress.org/themes":p=new Nt(t,f);break;case"wordpress.org/plugins":p=new xt(t,f);break;case"url":p=new St(t,f,{corsProxy:u});break;case"git:directory":p=new Rt(t,f,{corsProxy:u,additionalHeaders:e});break;case"literal:directory":p=new Ft(t,f);break;case"bundled":if(!s)throw new Cr;p=new Ut(t,s,f);break;case"zip":{const d=be.create(t.inner,{semaphore:n,progress:f,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e});p=new It(t,d,f);break}default:throw new Error(`Unknown resource type: ${t.resource}`)}return n&&(p=new Dt(p,n)),new Ct(p)}}class Dr extends be{constructor(t){super(),this.resource=t}get progress(){return this.resource.progress}set progress(t){this.resource.progress=t}get name(){return this.resource.name}get isAsync(){return this.resource.isAsync}setPlayground(t){this.resource.setPlayground(t)}}class $t extends be{constructor(t,n){super(),this.resource=t,this._progress=n}async resolve(){var n;const t=await this.playground.readFileAsBuffer(this.resource.path);return(n=this.progress)==null||n.set(100),new File([t],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class jt extends be{constructor(t,n){super(),this.resource=t,this._progress=n}async resolve(){var t;return(t=this.progress)==null||t.set(100),new File([this.resource.contents],this.resource.name)}get name(){return this.resource.name}}class wr extends be{constructor(t,n){super(),this._progress=t,this.corsProxy=n}async resolve(){var n,f,u;(n=this.progress)==null||n.setCaption(this.caption);const t=this.getURL();try{let s=await vt.fetchWithCorsProxy(t,void 0,this.corsProxy,await((f=this.playground)==null?void 0:f.absoluteUrl));if(!s.ok)throw new ir(`Could not download "${t}"`,t);if(s=await gr.cloneResponseMonitorProgress(s,((u=this.progress)==null?void 0:u.loadingListener)??At),s.status!==200)throw new ir(`Could not download "${t}"`,t);const e=this.name||qt(s.headers.get("content-disposition")||"")||encodeURIComponent(t);return new File([await s.blob()],e)}catch(s){throw new ir(`Could not download "${t}".
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
Confirm that the URL is correct, the server is reachable, and the file isactually served at that URL. Original error:
|
|
16
|
+
${s}`,t,{cause:s})}}get caption(){return`Downloading ${this.name}`}get name(){try{return new URL(this.getURL(),"http://example.com").pathname.split("/").pop()}catch{return this.getURL()}}get isAsync(){return!0}}function qt(r){if(!r)return null;const t=r.match(/filename\*?=([^;]+)/i);if(!t)return null;let n=t[1].trim();if((n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),t[0].includes("filename*")){const f=n.match(/^[^']*'[^']*'(.+)$/);if(f)try{n=decodeURIComponent(f[1])}catch{}}return n}const At=()=>{};class St extends wr{constructor(t,n,f){if(super(n,f==null?void 0:f.corsProxy),this.resource=t,this.options=f,this.resource.url.startsWith("https://github.com/")){const u=this.resource.url.match(/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/(?:blob|raw)\/(?<branch>[^/]+)\/(?<path>.+[^/])$/);u!=null&&u.groups&&(this.resource={...this.resource,url:`https://raw.githubusercontent.com/${u.groups.owner}/${u.groups.repo}/${u.groups.branch}/${u.groups.path}`})}}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class Rt extends be{constructor(t,n,f){super(),this.reference=t,this._progress=n,this.options=f}async resolve(){var f,u,s;const t=((u=(f=this.options)==null?void 0:f.additionalHeaders)==null?void 0:u.call(f,this.reference.url))??{},n=(s=this.options)!=null&&s.corsProxy?`${this.options.corsProxy}${this.reference.url}`:this.reference.url;try{const e=await ve.resolveCommitHash(n,{value:this.reference.ref,type:this.reference.refType??"infer"},t),p=await ve.listGitFiles(n,e,t),d=(this.reference.path??"").replace(/^\/+/,""),y=ve.listDescendantFiles(p,d),E=await ve.sparseCheckout(n,e,y,{withObjects:this.reference[".git"],additionalHeaders:t});let v=E.files;return v=Lt(v,k=>k.substring(d.length).replace(/^\/+/,"")),this.reference[".git"]&&(v={...await ve.createDotGitDirectory({repoUrl:this.reference.url,commitHash:e,ref:this.reference.ref,refType:this.reference.refType,objects:E.objects??[],fileOids:E.fileOids??{},pathPrefix:d}),...v}),{name:this.filename,files:v}}catch(e){throw e instanceof ve.GitAuthenticationError?new ve.GitAuthenticationError(this.reference.url,e.status):e}}get filename(){return this.name.replaceAll(/[^a-zA-Z0-9-.]/g,"-").replaceAll(/-+/g,"-").replace(/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+$/g,"")||I.randomFilename()}get name(){var t;return[this.reference.url,this.reference.ref?`(${this.reference.ref})`:"",(t=this.reference.path)!=null&&t.replace(/^\/+/,"")?`at ${this.reference.path}`:""].filter(n=>n.length>0).join(" ")}}function Lt(r,t){return Object.fromEntries(Object.entries(r).map(([n,f])=>[t(n),f]))}class Ft extends be{constructor(t,n){super(),this.reference=t,this._progress=n}async resolve(){return this.reference}get name(){return this.reference.name}}class Nt extends wr{constructor(t,n){super(n),this.resource=t}get name(){return nr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${Ur(this.resource.slug)}`}}class xt extends wr{constructor(t,n){super(n),this.resource=t}get name(){return nr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${Ur(this.resource.slug)}`}}function Ur(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class Ct extends Dr{async resolve(){return this.promise||(this.promise=this.resource.resolve()),this.promise}}class Dt extends Dr{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>this.resource.resolve()):this.resource.resolve()}}class Ut extends be{constructor(t,n,f){if(!n)throw new Error(`You are trying to run a Blueprint that refers to a bundled file ("blueprint" resource type), but you did not provide the rest of the bundle. This Blueprint won't work as a standalone JSON file. You'll need to load the entire bundle, e.g. a blueprint.zip file. Alternatively, you may try loading it directly from a URL or a local directory and Playground will try (with your permission) to source the missing files from paths relative to the blueprint file.`);super(),this.resource=t,this.streamBundledFile=n,this._progress=f}async resolve(){var t,n,f;(t=this.progress)==null||t.set(0);try{const u=await this.streamBundledFile(this.resource.path),s=u.filesize;if(!s)return(n=this.progress)==null||n.set(100),u;const e=gr.cloneStreamMonitorProgress(u.stream(),s,p=>{var d;(d=this.progress)==null||d.set(p.detail.loaded/p.detail.total*100)});return new hr.StreamedFile(e,this.name,{filesize:s})}catch(u){throw(f=this.progress)==null||f.set(100),new Error(`Failed to read file from blueprint. This Blueprint refers to a resource of type "bundled" with path "${this.resource.path}" that was not available. Please ensure that the entire bundle, such as a blueprint.zip file, is loaded. If you are trying to load the Blueprint directly from a URL or a local directory, make sure that all the necessary files are accessible and located relative to the blueprint file.
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
${s}`)}}get caption(){return`Downloading ${this.name}`}get name(){try{return new URL(this.getURL(),"http://example.com").pathname.split("/").pop()}catch{return this.getURL()}}get isAsync(){return!0}}function ht(r){if(!r)return null;const t=r.match(/filename\*?=([^;]+)/i);if(!t)return null;let n=t[1].trim();if((n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),t[0].includes("filename*")){const d=n.match(/^[^']*'[^']*'(.+)$/);if(d)try{n=decodeURIComponent(d[1])}catch{}}return n}const gt=()=>{};class bt extends mr{constructor(t,n,d){if(super(n,d==null?void 0:d.corsProxy),this.resource=t,this.options=d,this.resource.url.startsWith("https://github.com/")){const u=this.resource.url.match(/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/(?:blob|raw)\/(?<branch>[^/]+)\/(?<path>.+[^/])$/);u!=null&&u.groups&&(this.resource={...this.resource,url:`https://raw.githubusercontent.com/${u.groups.owner}/${u.groups.repo}/${u.groups.branch}/${u.groups.path}`})}}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class wt extends Te{constructor(t,n,d){super(),this.reference=t,this._progress=n,this.options=d}async resolve(){var c;const t=(c=this.options)!=null&&c.corsProxy?`${this.options.corsProxy}${this.reference.url}`:this.reference.url,n=await Ee.resolveCommitHash(t,{value:this.reference.ref,type:this.reference.refType??"infer"}),d=await Ee.listGitFiles(t,n),u=(this.reference.path??"").replace(/^\/+/,""),s=Ee.listDescendantFiles(d,u),e=await Ee.sparseCheckout(t,n,s,{withObjects:this.reference[".git"]});let l=e.files;return l=vt(l,_=>_.substring(u.length).replace(/^\/+/,"")),this.reference[".git"]&&(l={...await Ee.createDotGitDirectory({repoUrl:this.reference.url,commitHash:n,ref:this.reference.ref,refType:this.reference.refType,objects:e.objects??[],fileOids:e.fileOids??{},pathPrefix:u}),...l}),{name:this.filename,files:l}}get filename(){return this.name.replaceAll(/[^a-zA-Z0-9-.]/g,"-").replaceAll(/-+/g,"-").replace(/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+$/g,"")||U.randomFilename()}get name(){var t;return[this.reference.url,this.reference.ref?`(${this.reference.ref})`:"",(t=this.reference.path)!=null&&t.replace(/^\/+/,"")?`at ${this.reference.path}`:""].filter(n=>n.length>0).join(" ")}}function vt(r,t){return Object.fromEntries(Object.entries(r).map(([n,d])=>[t(n),d]))}class Pt extends Te{constructor(t,n){super(),this.reference=t,this._progress=n}async resolve(){return this.reference}get name(){return this.reference.name}}class _t extends mr{constructor(t,n){super(n),this.resource=t}get name(){return ir(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${Lr(this.resource.slug)}`}}class kt extends mr{constructor(t,n){super(n),this.resource=t}get name(){return ir(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${Lr(this.resource.slug)}`}}function Lr(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class Ot extends Fr{async resolve(){return this.promise||(this.promise=this.resource.resolve()),this.promise}}class Tt extends Fr{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>this.resource.resolve()):this.resource.resolve()}}class jt extends Te{constructor(t,n,d){if(!n)throw new Error(`You are trying to run a Blueprint that refers to a bundled file ("blueprint" resource type), but you did not provide the rest of the bundle. This Blueprint won't work as a standalone JSON file. You'll need to load the entire bundle, e.g. a blueprint.zip file. Alternatively, you may try loading it directly from a URL or a local directory and Playground will try (with your permission) to source the missing files from paths relative to the blueprint file.`);super(),this.resource=t,this.streamBundledFile=n,this._progress=d}async resolve(){var t,n,d;(t=this.progress)==null||t.set(0);try{const u=await this.streamBundledFile(this.resource.path),s=u.filesize;if(!s)return(n=this.progress)==null||n.set(100),u;const e=ur.cloneStreamMonitorProgress(u.stream(),s,l=>{var c;(c=this.progress)==null||c.set(l.detail.loaded/l.detail.total*100)});return new ft.StreamedFile(e,this.name,{filesize:s})}catch(u){throw(d=this.progress)==null||d.set(100),new Error(`Failed to read file from blueprint. This Blueprint refers to a resource of type "bundled" with path "${this.resource.path}" that was not available. Please ensure that the entire bundle, such as a blueprint.zip file, is loaded. If you are trying to load the Blueprint directly from a URL or a local directory, make sure that all the necessary files are accessible and located relative to the blueprint file.
|
|
26
|
-
|
|
27
|
-
Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name(){return this.resource.path.split("/").pop()||""}get isAsync(){return!0}}const yr=async(r,{pluginPath:t,pluginName:n},d)=>{d==null||d.tracker.setCaption(`Activating ${n||t}`);const u=await r.documentRoot,s=await r.run({code:`<?php
|
|
18
|
+
Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name(){return this.resource.path.split("/").pop()||""}get isAsync(){return!0}}class It extends be{constructor(t,n,f){super(),this.reference=t,this.innerResource=n,this._progress=f}async resolve(){var s,e;(s=this.progress)==null||s.setCaption(`Creating ZIP: ${this.name}`);const t=await this.innerResource.resolve();let n;t instanceof File?n=[t]:n=Wt(t.files,t.name);const f=hr.encodeZip(n),u=await hr.collectFile(this.name,f);return(e=this.progress)==null||e.set(100),u}get name(){if(this.reference.name)return this.reference.name;const t=this.innerResource.name;return t.endsWith(".zip")?t:`${t}.zip`}get isAsync(){return!0}}function Wt(r,t){const n=[];function f(u,s){for(const[e,p]of Object.entries(u)){const d=s?`${s}/${e}`:e;p instanceof Uint8Array?n.push(new File([p],`${t}/${d}`)):typeof p=="string"?n.push(new File([new TextEncoder().encode(p)],`${t}/${d}`)):f(p,d)}}return f(r,""),n}const vr=async(r,{pluginPath:t,pluginName:n},f)=>{f==null||f.tracker.setCaption(`Activating ${n||t}`);const u=await r.documentRoot,s=await r.run({code:`<?php
|
|
28
19
|
define( 'WP_ADMIN', true );
|
|
29
20
|
require_once( getenv('DOCROOT') . "/wp-load.php" );
|
|
30
21
|
require_once( getenv('DOCROOT') . "/wp-admin/includes/plugin.php" );
|
|
@@ -54,27 +45,11 @@ Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name()
|
|
|
54
45
|
} else if ( false === $response ) {
|
|
55
46
|
die( "The activatePlugin step wasn't able to find the plugin $plugin_path." );
|
|
56
47
|
}
|
|
57
|
-
`,env:{PLUGIN_PATH:t,DOCROOT:u}});s.text&&ae.logger.warn(`Plugin ${t} activation printed the following bytes: ${s.text}`);const
|
|
48
|
+
`,env:{PLUGIN_PATH:t,DOCROOT:u}});s.text&&ae.logger.warn(`Plugin ${t} activation printed the following bytes: ${s.text}`);const p=((await r.run({code:`<?php
|
|
58
49
|
ob_start();
|
|
59
50
|
require_once( getenv( 'DOCROOT' ) . "/wp-load.php" );
|
|
60
51
|
|
|
61
|
-
|
|
62
|
-
* Extracts the relative plugin path from either an absolute or relative plugin path.
|
|
63
|
-
*
|
|
64
|
-
* Absolute paths starting with plugin directory (e.g., '/wordpress/wp-content/plugins/test-plugin/index.php')
|
|
65
|
-
* should be converted to relative paths (e.g., 'test-plugin/index.php')
|
|
66
|
-
*
|
|
67
|
-
* Directories should finish with a trailing slash to ensure we match the full plugin directory name.
|
|
68
|
-
*
|
|
69
|
-
* Examples:
|
|
70
|
-
* - '/wordpress/wp-content/plugins/test-plugin/index.php' → 'test-plugin/index.php'
|
|
71
|
-
* - '/wordpress/wp-content/plugins/test-plugin/' → 'test-plugin/'
|
|
72
|
-
* - '/wordpress/wp-content/plugins/test-plugin' → 'test-plugin/'
|
|
73
|
-
* - 'test-plugin/index.php' → 'test-plugin/index.php'
|
|
74
|
-
* - 'test-plugin/' → 'test-plugin/'
|
|
75
|
-
* - 'test-plugin' → 'test-plugin/'
|
|
76
|
-
*/
|
|
77
|
-
$plugin_directory = WP_PLUGIN_DIR . '/';
|
|
52
|
+
$plugin_directory = rtrim( WP_PLUGIN_DIR, '/' ) . '/';
|
|
78
53
|
$relative_plugin_path = getenv( 'PLUGIN_PATH' );
|
|
79
54
|
if (strpos($relative_plugin_path, $plugin_directory) === 0) {
|
|
80
55
|
$relative_plugin_path = substr($relative_plugin_path, strlen($plugin_directory));
|
|
@@ -85,14 +60,25 @@ Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name()
|
|
|
85
60
|
}
|
|
86
61
|
|
|
87
62
|
$active_plugins = get_option( 'active_plugins' );
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
ob_end_clean();
|
|
91
|
-
die( 'true' );
|
|
92
|
-
}
|
|
63
|
+
if ( ! is_array( $active_plugins ) ) {
|
|
64
|
+
$active_plugins = array();
|
|
93
65
|
}
|
|
94
|
-
|
|
95
|
-
|
|
66
|
+
ob_end_clean();
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Use a shutdown function to ensure the activation-related output comes
|
|
70
|
+
* last in stdout.
|
|
71
|
+
*/
|
|
72
|
+
register_shutdown_function( function() use ( $relative_plugin_path, $active_plugins ) {
|
|
73
|
+
foreach ( $active_plugins as $plugin ) {
|
|
74
|
+
if ( substr( $plugin, 0, strlen( $relative_plugin_path ) ) === $relative_plugin_path ) {
|
|
75
|
+
die('{"success": true}');
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
die('{"success": false}');
|
|
80
|
+
});
|
|
81
|
+
`,env:{DOCROOT:u,PLUGIN_PATH:t}})).text??"").trim();if(!p.endsWith('{"success": true}'))throw p!=='{"success": false}'&&ae.logger.debug(p),new Error(`Plugin ${t} could not be activated - WordPress exited with exit code ${s.exitCode}. Inspect the "debug" logs in the console for more details. Output headers: ${JSON.stringify(s.headers,null,2)}`)},Pr=async(r,{themeFolderName:t},n)=>{n==null||n.tracker.setCaption(`Activating ${t}`);const f=await r.documentRoot,u=`${f}/wp-content/themes/${t}`;if(!await r.fileExists(u))throw new Error(`
|
|
96
82
|
Couldn't activate theme ${t}.
|
|
97
83
|
Theme not found at the provided theme path: ${u}.
|
|
98
84
|
Check the theme path to ensure it's correct.
|
|
@@ -111,7 +97,7 @@ Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name()
|
|
|
111
97
|
throw new Exception( 'Theme ' . getenv('themeFolderName') . ' could not be activated.' );
|
|
112
98
|
}
|
|
113
99
|
die('Theme activated successfully');
|
|
114
|
-
`,env:{docroot:
|
|
100
|
+
`,env:{docroot:f,themeFolderName:t}});if(s.text!=="Theme activated successfully")throw ae.logger.debug(s),new Error(`Theme ${t} could not be activated - WordPress exited with exit code ${s.exitCode}. Inspect the "debug" logs in the console for more details. Output headers: ${JSON.stringify(s.headers,null,2)}`)},Ir=async(r,{code:t})=>{let n=typeof t=="string"?t:t.content;return(n.includes('"wordpress/wp-load.php"')||n.includes("'wordpress/wp-load.php'"))&&(ae.logger.error(`
|
|
115
101
|
It looks like you're trying to load WordPress using a relative path 'wordpress/wp-load.php'.
|
|
116
102
|
|
|
117
103
|
Playground recently changed the working directory from '/' to '/wordpress' to better mimic
|
|
@@ -125,7 +111,7 @@ Instead of: require_once 'wordpress/wp-load.php';
|
|
|
125
111
|
Use: require_once '/wordpress/wp-load.php';
|
|
126
112
|
|
|
127
113
|
This will ensure your code works reliably regardless of the current working directory.
|
|
128
|
-
`.trim()),n=n.replace("'wordpress/wp-load.php'","'/wordpress/wp-load.php'"),n=n.replace('"wordpress/wp-load.php"','"/wordpress/wp-load.php"')),await r.run({code:n})},
|
|
114
|
+
`.trim()),n=n.replace("'wordpress/wp-load.php'","'/wordpress/wp-load.php'"),n=n.replace('"wordpress/wp-load.php"','"/wordpress/wp-load.php"')),await r.run({code:n})},Wr=async(r,{options:t})=>await r.run(t),ar=async(r,{path:t})=>{t.startsWith("/")||(ae.logger.error(`
|
|
129
115
|
The rm() step in your Blueprint refers to a relative path.
|
|
130
116
|
|
|
131
117
|
Playground recently changed the working directory from '/' to '/wordpress' to better mimic
|
|
@@ -139,41 +125,233 @@ Instead of: rm({ path: 'wordpress/wp-load.php' });
|
|
|
139
125
|
Use: rm({ path: '/wordpress/wp-load.php' });
|
|
140
126
|
|
|
141
127
|
This will ensure your code works reliably regardless of the current working directory.
|
|
142
|
-
`.trim()),t=`/${t}`),await r.unlink(t)},
|
|
143
|
-
|
|
128
|
+
`.trim()),t=`/${t}`),await r.unlink(t)},Bt=`<?php
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Naively splits an SQL string into a sequence of queries. It
|
|
132
|
+
* streams the data so you can process very large chunks of SQL
|
|
133
|
+
* without running out of memory.
|
|
134
|
+
*
|
|
135
|
+
* This class is **naive** because it doesn't understand what a
|
|
136
|
+
* valid query is. The lexer does not provide a way to distinguish
|
|
137
|
+
* between a syntax error and an incomplete input yet. Lacking this
|
|
138
|
+
* information, we assume that no SQL query is larger than 2MB and,
|
|
139
|
+
* failing to extract a query from a 2MB buffer, we fail. This heuristic
|
|
140
|
+
* is often sufficient, but may fail in pathological cases.
|
|
141
|
+
*
|
|
142
|
+
* Usage:
|
|
143
|
+
*
|
|
144
|
+
* $stream = new WP_MySQL_Naive_Query_Stream();
|
|
145
|
+
* $stream->append_sql( 'SELECT id FROM users; SELECT * FROM posts;' );
|
|
146
|
+
* while ( $stream->next_query() ) {
|
|
147
|
+
* $sql_string = $stream->get_query();
|
|
148
|
+
* // Process the query.
|
|
149
|
+
* }
|
|
150
|
+
* $stream->append_sql( 'CREATE TABLE users (id INT, name VARCHAR(255));' );
|
|
151
|
+
* while ( $stream->next_query() ) {
|
|
152
|
+
* $sql_string = $stream->get_query();
|
|
153
|
+
* // Process the query.
|
|
154
|
+
* }
|
|
155
|
+
* $stream->mark_input_complete();
|
|
156
|
+
* $stream->next_query(); // returns false
|
|
157
|
+
*/
|
|
158
|
+
class WP_MySQL_Naive_Query_Stream {
|
|
159
|
+
|
|
160
|
+
private $sql_buffer = '';
|
|
161
|
+
private $input_complete = false;
|
|
162
|
+
private $state = true;
|
|
163
|
+
private $last_query = false;
|
|
164
|
+
|
|
165
|
+
const STATE_QUERY = 'valid';
|
|
166
|
+
const STATE_SYNTAX_ERROR = 'syntax_error';
|
|
167
|
+
const STATE_PAUSED_ON_INCOMPLETE_INPUT = 'paused_on_incomplete_input';
|
|
168
|
+
const STATE_FINISHED = 'finished';
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* The maximum size of the buffer to store the SQL input. We don't
|
|
172
|
+
* have enough information from the lexer to distinguish between
|
|
173
|
+
* an incomplete input and a syntax error so we use a heuristic –
|
|
174
|
+
* if we've accumulated more than this amount of SQL input, we assume
|
|
175
|
+
* it's a syntax error. That's why this class is called a "naive" query
|
|
176
|
+
* stream.
|
|
177
|
+
*/
|
|
178
|
+
const MAX_SQL_BUFFER_SIZE = 1024 * 1024 * 15;
|
|
179
|
+
|
|
180
|
+
public function __construct() {}
|
|
181
|
+
|
|
182
|
+
public function append_sql( string $sql ) {
|
|
183
|
+
if($this->input_complete) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
$this->sql_buffer .= $sql;
|
|
187
|
+
$this->state = self::STATE_QUERY;
|
|
188
|
+
return true;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
public function is_paused_on_incomplete_input(): bool {
|
|
192
|
+
return $this->state === self::STATE_PAUSED_ON_INCOMPLETE_INPUT;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
public function mark_input_complete() {
|
|
196
|
+
$this->input_complete = true;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
public function next_query() {
|
|
200
|
+
$this->last_query = false;
|
|
201
|
+
if($this->state === self::STATE_PAUSED_ON_INCOMPLETE_INPUT) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
$result = $this->do_next_query();
|
|
206
|
+
if(!$result && strlen($this->sql_buffer) > self::MAX_SQL_BUFFER_SIZE) {
|
|
207
|
+
$this->state = self::STATE_SYNTAX_ERROR;
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
return $result;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
private function do_next_query() {
|
|
214
|
+
$query = [];
|
|
215
|
+
$lexer = new WP_MySQL_Lexer( $this->sql_buffer );
|
|
216
|
+
while ( $lexer->next_token() ) {
|
|
217
|
+
$token = $lexer->get_token();
|
|
218
|
+
$query[] = $token;
|
|
219
|
+
if ( $token->id === WP_MySQL_Lexer::SEMICOLON_SYMBOL ) {
|
|
220
|
+
// Got a complete query!
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// @TODO: expose this method from the lexer
|
|
226
|
+
// if($lexer->get_state() === WP_MySQL_Lexer::STATE_SYNTAX_ERROR) {
|
|
227
|
+
// return false;
|
|
228
|
+
// }
|
|
144
229
|
|
|
145
|
-
$
|
|
230
|
+
if(!count($query)) {
|
|
231
|
+
if ( $this->input_complete ) {
|
|
232
|
+
$this->state = self::STATE_FINISHED;
|
|
233
|
+
} else {
|
|
234
|
+
$this->state = self::STATE_PAUSED_ON_INCOMPLETE_INPUT;
|
|
235
|
+
}
|
|
236
|
+
return false;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// The last token either needs to end with a semicolon, or be the
|
|
240
|
+
// last token in the input.
|
|
241
|
+
$last_token = $query[count($query) - 1];
|
|
242
|
+
if (
|
|
243
|
+
$last_token->id !== WP_MySQL_Lexer::SEMICOLON_SYMBOL &&
|
|
244
|
+
! $this->input_complete
|
|
245
|
+
) {
|
|
246
|
+
$this->state = self::STATE_PAUSED_ON_INCOMPLETE_INPUT;
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// See if the query has any meaningful tokens. We don't want to return
|
|
251
|
+
// to give the caller a comment disguised as a query.
|
|
252
|
+
$has_meaningful_tokens = false;
|
|
253
|
+
foreach($query as $token) {
|
|
254
|
+
if (
|
|
255
|
+
$token->id !== WP_MySQL_Lexer::WHITESPACE &&
|
|
256
|
+
$token->id !== WP_MySQL_Lexer::COMMENT &&
|
|
257
|
+
$token->id !== WP_MySQL_Lexer::MYSQL_COMMENT_START &&
|
|
258
|
+
$token->id !== WP_MySQL_Lexer::MYSQL_COMMENT_END &&
|
|
259
|
+
$token->id !== WP_MySQL_Lexer::EOF
|
|
260
|
+
) {
|
|
261
|
+
$has_meaningful_tokens = true;
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if(!$has_meaningful_tokens) {
|
|
266
|
+
if ( $this->input_complete ) {
|
|
267
|
+
$this->state = self::STATE_FINISHED;
|
|
268
|
+
} else {
|
|
269
|
+
$this->state = self::STATE_PAUSED_ON_INCOMPLETE_INPUT;
|
|
270
|
+
}
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Remove the query from the input buffer and return it.
|
|
275
|
+
$last_byte = $last_token->start + $last_token->length;
|
|
276
|
+
$query = substr($this->sql_buffer, 0, $last_byte);
|
|
277
|
+
$this->sql_buffer = substr($this->sql_buffer, $last_byte);
|
|
278
|
+
$this->last_query = $query;
|
|
279
|
+
$this->state = self::STATE_QUERY;
|
|
280
|
+
return true;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
public function get_query() {
|
|
284
|
+
return $this->last_query;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
public function get_state() {
|
|
288
|
+
return $this->state;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
}`,Br=async(r,{sql:t},n)=>{n==null||n.tracker.setCaption("Executing SQL Queries");const f=`/tmp/${I.randomFilename()}.sql`,u=`/tmp/${I.randomFilename()}.php`;await r.writeFile(f,new Uint8Array(await t.arrayBuffer())),await r.writeFile(u,new TextEncoder().encode(Bt));const s=await r.documentRoot,e=I.phpVars({docroot:s,sqlFilename:f,streamClassFilename:u}),p=await r.run({code:`<?php
|
|
292
|
+
define('WP_SQLITE_AST_DRIVER', true);
|
|
293
|
+
require_once ${e.docroot} . '/wp-load.php';
|
|
294
|
+
|
|
295
|
+
// Load WP_MySQL_Naive_Query_Stream from the bundled file
|
|
296
|
+
require_once ${e.streamClassFilename};
|
|
146
297
|
|
|
147
298
|
global $wpdb;
|
|
148
299
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
300
|
+
do_action('run_sql_step');
|
|
301
|
+
|
|
302
|
+
$stream = new WP_MySQL_Naive_Query_Stream();
|
|
303
|
+
|
|
304
|
+
// Open the SQL file for streaming
|
|
305
|
+
$handle = fopen(${e.sqlFilename}, 'r');
|
|
306
|
+
if (!$handle) {
|
|
307
|
+
throw new Exception('Failed to open SQL file');
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Read and process the file in 8KB chunks
|
|
311
|
+
$chunk_size = 8192;
|
|
312
|
+
while (!feof($handle)) {
|
|
313
|
+
$chunk = fread($handle, $chunk_size);
|
|
314
|
+
if ($chunk === false) {
|
|
315
|
+
break;
|
|
153
316
|
}
|
|
154
317
|
|
|
155
|
-
$
|
|
318
|
+
$stream->append_sql($chunk);
|
|
319
|
+
|
|
320
|
+
// Process any complete queries in the stream
|
|
321
|
+
while ($stream->next_query()) {
|
|
322
|
+
$query = $stream->get_query();
|
|
323
|
+
$wpdb->query($query);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
fclose($handle);
|
|
328
|
+
|
|
329
|
+
// Mark input as complete and process any remaining queries
|
|
330
|
+
$stream->mark_input_complete();
|
|
331
|
+
while ($stream->next_query()) {
|
|
332
|
+
$query = $stream->get_query();
|
|
333
|
+
$wpdb->query($query);
|
|
156
334
|
}
|
|
157
|
-
`});return await
|
|
158
|
-
include ${
|
|
159
|
-
$site_options = ${
|
|
335
|
+
`});return await ar(r,{path:f}),await ar(r,{path:u}),p},Mr=async(r,{request:t})=>{ae.logger.warn('Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.');const n=await r.request(t);if(n.httpStatusCode>399||n.httpStatusCode<200)throw ae.logger.warn("WordPress response was",{response:n}),new Error(`Request failed with status ${n.httpStatusCode}`);return n},pr=async(r,{consts:t,method:n="define-before-run"})=>{switch(n){case"define-before-run":await Mt(r,t);break;case"rewrite-wp-config":{const f=await r.documentRoot,u=I.joinPaths(f,"/wp-config.php");await Nr.defineWpConfigConstants(r,u,t,"rewrite");break}default:throw new Error(`Invalid method: ${n}`)}};async function Mt(r,t){for(const n in t)await r.defineConstant(n,t[n])}const _r=async(r,{options:t})=>{const n=await r.documentRoot;await r.run({code:`<?php
|
|
336
|
+
include ${I.phpVar(n)} . '/wp-load.php';
|
|
337
|
+
$site_options = ${I.phpVar(t)};
|
|
160
338
|
foreach($site_options as $name => $value) {
|
|
161
339
|
update_option($name, $value);
|
|
162
340
|
}
|
|
163
341
|
echo "Success";
|
|
164
|
-
`})},
|
|
165
|
-
include ${
|
|
166
|
-
$meta = ${
|
|
342
|
+
`})},Vr=async(r,{meta:t,userId:n})=>{const f=await r.documentRoot;await r.run({code:`<?php
|
|
343
|
+
include ${I.phpVar(f)} . '/wp-load.php';
|
|
344
|
+
$meta = ${I.phpVar(t)};
|
|
167
345
|
foreach($meta as $name => $value) {
|
|
168
|
-
update_user_meta(${
|
|
346
|
+
update_user_meta(${I.phpVar(n)}, $name, $value);
|
|
169
347
|
}
|
|
170
|
-
`})},
|
|
348
|
+
`})},kr="/tmp/wp-cli.phar",Vt={resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},zr=async(r,t=kr)=>{if(!await r.fileExists(t))throw new Error(`wp-cli.phar not found at ${t}.
|
|
171
349
|
You can enable wp-cli support by adding "wp-cli" to the list of extra libraries in your blueprint as follows:
|
|
172
350
|
{
|
|
173
351
|
"extraLibraries": [ "wp-cli" ]
|
|
174
352
|
}
|
|
175
353
|
Read more about it in the documentation.
|
|
176
|
-
https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`)},
|
|
354
|
+
https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`)},Or=async(r,{command:t,wpCliPath:n=kr})=>{await zr(r,n);let f;if(typeof t=="string"?(t=t.trim(),f=zt(t)):f=t,f.shift()!=="wp")throw new Error('The first argument must be "wp".');let s=!1;const e=f.map(y=>y.startsWith("wordpress/")?(s=!0,`/${y}`):y);s&&ae.logger.error(`
|
|
177
355
|
The wp-cli step in your Blueprint refers to a relative path.
|
|
178
356
|
|
|
179
357
|
Playground recently changed the working directory from '/' to '/wordpress' to better mimic
|
|
@@ -198,7 +376,7 @@ Use:
|
|
|
198
376
|
}
|
|
199
377
|
|
|
200
378
|
This will ensure your code works reliably regardless of the current working directory.
|
|
201
|
-
`.trim());const
|
|
379
|
+
`.trim());const p=await r.documentRoot;await r.writeFile("/tmp/stdout",""),await r.writeFile("/tmp/stderr",""),await r.writeFile(I.joinPaths(p,"run-cli.php"),`<?php
|
|
202
380
|
// Set up the environment to emulate a shell script
|
|
203
381
|
// call.
|
|
204
382
|
|
|
@@ -210,8 +388,8 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
210
388
|
// Set the argv global.
|
|
211
389
|
$GLOBALS['argv'] = array_merge([
|
|
212
390
|
"/tmp/wp-cli.phar",
|
|
213
|
-
"--path=${
|
|
214
|
-
], ${
|
|
391
|
+
"--path=${p}"
|
|
392
|
+
], ${I.phpVar(e)});
|
|
215
393
|
|
|
216
394
|
// Provide stdin, stdout, stderr streams outside of
|
|
217
395
|
// the CLI SAPI.
|
|
@@ -219,8 +397,8 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
219
397
|
define('STDOUT', fopen('php://stdout', 'wb'));
|
|
220
398
|
define('STDERR', fopen('php://stderr', 'wb'));
|
|
221
399
|
|
|
222
|
-
require( ${
|
|
223
|
-
`);const
|
|
400
|
+
require( ${I.phpVar(n)} );
|
|
401
|
+
`);const d=await r.run({scriptPath:I.joinPaths(p,"run-cli.php")});if(d.errors)throw new Error(d.errors);return d};function zt(r){let f=0,u="";const s=[];let e="";for(let p=0;p<r.length;p++){const d=r[p];f===0?d==='"'||d==="'"?(f=1,u=d):d.match(/\s/)?(e&&s.push(e),e=""):e+=d:f===1&&(d==="\\"?(p++,e+=r[p]):d===u?(f=0,u=""):e+=d)}return e&&s.push(e),s}const Hr=async(r,{wpCliPath:t})=>{await zr(r,t),await pr(r,{consts:{WP_ALLOW_MULTISITE:1}});const n=new URL(await r.absoluteUrl);if(n.port!==""){let s=`The current host is ${n.host}, but WordPress multisites do not support custom ports.`;throw n.hostname==="localhost"&&(s+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(s)}const f=n.pathname.replace(/\/$/,"")+"/",u=`${n.protocol}//${n.hostname}${f}`;await _r(r,{options:{siteurl:u,home:u}}),await Or(r,{command:`wp core multisite-convert --base="${f}"`})},Qr=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&ae.logger.error(`
|
|
224
402
|
The cp() step in your Blueprint refers to a relative path.
|
|
225
403
|
|
|
226
404
|
Playground recently changed the working directory from '/' to '/wordpress' to better mimic
|
|
@@ -234,7 +412,7 @@ Instead of: cp({ fromPath: 'wordpress/wp-load.php', toPath: 'wordpress/wp-load.
|
|
|
234
412
|
Use: cp({ fromPath: '/wordpress/wp-load.php', toPath: '/wordpress/wp-load.php' });
|
|
235
413
|
|
|
236
414
|
This will ensure your code works reliably regardless of the current working directory.
|
|
237
|
-
`.trim()),t.startsWith("/")||(t=`/${t}`),n.startsWith("/")||(n=`/${n}`),await r.writeFile(n,await r.readFileAsBuffer(t))},
|
|
415
|
+
`.trim()),t.startsWith("/")||(t=`/${t}`),n.startsWith("/")||(n=`/${n}`),await r.writeFile(n,await r.readFileAsBuffer(t))},Yr=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&ae.logger.error(`
|
|
238
416
|
The mv() step in your Blueprint refers to a relative path.
|
|
239
417
|
|
|
240
418
|
Playground recently changed the working directory from '/' to '/wordpress' to better mimic
|
|
@@ -248,7 +426,7 @@ Instead of: mv({ fromPath: 'wordpress/wp-load.php', toPath: 'wordpress/wp-load.
|
|
|
248
426
|
Use: mv({ fromPath: '/wordpress/wp-load.php', toPath: '/wordpress/wp-load.php' });
|
|
249
427
|
|
|
250
428
|
This will ensure your code works reliably regardless of the current working directory.
|
|
251
|
-
`.trim()),t.startsWith("/")||(t=`/${t}`),n.startsWith("/")||(n=`/${n}`),await r.mv(t,n)},
|
|
429
|
+
`.trim()),t.startsWith("/")||(t=`/${t}`),n.startsWith("/")||(n=`/${n}`),await r.mv(t,n)},Zr=async(r,{path:t})=>{t.startsWith("/")||ae.logger.error(`
|
|
252
430
|
The mkdir() step in your Blueprint refers to a relative path.
|
|
253
431
|
|
|
254
432
|
Playground recently changed the working directory from '/' to '/wordpress' to better mimic
|
|
@@ -262,7 +440,7 @@ Instead of: mkdir({ path: 'wordpress/my-new-folder' });
|
|
|
262
440
|
Use: mkdir({ path: '/wordpress/my-new-folder' });
|
|
263
441
|
|
|
264
442
|
This will ensure your code works reliably regardless of the current working directory.
|
|
265
|
-
`.trim()),await r.mkdir(t)},
|
|
443
|
+
`.trim()),await r.mkdir(t)},Gr=async(r,{path:t})=>{t.startsWith("/")||(ae.logger.error(`
|
|
266
444
|
The rmdir() step in your Blueprint refers to a relative path.
|
|
267
445
|
|
|
268
446
|
Playground recently changed the working directory from '/' to '/wordpress' to better mimic
|
|
@@ -276,7 +454,7 @@ Instead of: rmdir({ path: 'wordpress/wp-load.php' });
|
|
|
276
454
|
Use: rmdir({ path: '/wordpress/wp-load.php' });
|
|
277
455
|
|
|
278
456
|
This will ensure your code works reliably regardless of the current working directory.
|
|
279
|
-
`.trim()),t=`/${t}`),await r.rmdir(t)},
|
|
457
|
+
`.trim()),t=`/${t}`),await r.rmdir(t)},lr=async(r,{path:t,data:n})=>{n instanceof File&&(n=new Uint8Array(await n.arrayBuffer())),t.startsWith("/")||(ae.logger.error(`
|
|
280
458
|
The writeFile() step in your Blueprint refers to a relative path.
|
|
281
459
|
|
|
282
460
|
Playground recently changed the working directory from '/' to '/wordpress' to better mimic
|
|
@@ -290,7 +468,7 @@ Instead of: writeFile({ path: 'wordpress/wp-load.php', data: '<?php echo "Hello
|
|
|
290
468
|
Use: writeFile({ path: '/wordpress/wp-load.php', data: '<?php echo "Hello World!"; ?>' });
|
|
291
469
|
|
|
292
470
|
This will ensure your code works reliably regardless of the current working directory.
|
|
293
|
-
`.trim()),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)},
|
|
471
|
+
`.trim()),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)},Jr=async(r,{writeToPath:t,filesTree:n})=>{t.startsWith("/")||(ae.logger.error(`
|
|
294
472
|
The writeFiles() step in your Blueprint refers to a relative path.
|
|
295
473
|
|
|
296
474
|
Playground recently changed the working directory from '/' to '/wordpress' to better mimic
|
|
@@ -304,7 +482,7 @@ Instead of: writeFiles({ writeToPath: 'wordpress/wp-content/plugins/my-plugin',
|
|
|
304
482
|
Use: writeFiles({ writeToPath: '/wordpress/wp-content/plugins/my-plugin', filesTree: { name: 'style.css': 'a { color: red; }' });
|
|
305
483
|
|
|
306
484
|
This will ensure your code works reliably regardless of the current working directory.
|
|
307
|
-
`.trim()),t=`/${t}`),await Ie.writeFiles(r,t,n.files)},
|
|
485
|
+
`.trim()),t=`/${t}`),await Ie.writeFiles(r,t,n.files)},Er=async(r,{siteUrl:t})=>{await pr(r,{consts:{WP_HOME:t,WP_SITEURL:t}})},Xr=async(r,{file:t},n)=>{await Ht(r,t,n)};async function Ht(r,t,n){var f;(f=n==null?void 0:n.tracker)==null||f.setCaption("Importing content"),await lr(r,{path:"/tmp/import.wxr",data:t}),await r.run({$_SERVER:{HTTPS:(await r.absoluteUrl).startsWith("https://")?"on":""},code:`<?php
|
|
308
486
|
define('WP_LOAD_IMPORTERS', true);
|
|
309
487
|
require 'wp-load.php';
|
|
310
488
|
require 'wp-admin/includes/admin.php';
|
|
@@ -353,7 +531,7 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
353
531
|
$wp_import->import( getenv('IMPORT_FILE'), [
|
|
354
532
|
'rewrite_urls' => true,
|
|
355
533
|
] );
|
|
356
|
-
`,env:{IMPORT_FILE:"/tmp/import.wxr",FETCH_ATTACHMENTS:"true"}})}const
|
|
534
|
+
`,env:{IMPORT_FILE:"/tmp/import.wxr",FETCH_ATTACHMENTS:"true"}})}const Tr=async(r,{themeSlug:t=""},n)=>{var u;(u=n==null?void 0:n.tracker)==null||u.setCaption("Importing theme starter content");const f=await r.documentRoot;await r.run({code:`<?php
|
|
357
535
|
|
|
358
536
|
/**
|
|
359
537
|
* Ensure that the customizer loads as an admin user.
|
|
@@ -376,7 +554,7 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
376
554
|
* See _wp_customize_include()
|
|
377
555
|
*/
|
|
378
556
|
$_REQUEST['wp_customize'] = 'on';
|
|
379
|
-
$_REQUEST['customize_theme'] = ${
|
|
557
|
+
$_REQUEST['customize_theme'] = ${I.phpVar(t)} ?: get_stylesheet();
|
|
380
558
|
|
|
381
559
|
/*
|
|
382
560
|
* Claim this is a ajax request saving settings, to avoid the preview filters being applied.
|
|
@@ -388,7 +566,7 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
388
566
|
}
|
|
389
567
|
playground_add_filter( 'plugins_loaded', 'importThemeStarterContent_plugins_loaded', 0 );
|
|
390
568
|
|
|
391
|
-
require ${
|
|
569
|
+
require ${I.phpVar(f)} . '/wp-load.php';
|
|
392
570
|
|
|
393
571
|
// Return early if there's no starter content.
|
|
394
572
|
if ( ! get_theme_starter_content() ) {
|
|
@@ -400,10 +578,69 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
400
578
|
|
|
401
579
|
// Publish the changeset, which publishes the starter content.
|
|
402
580
|
wp_publish_post( $wp_customize->changeset_post_id() );
|
|
403
|
-
`})},
|
|
581
|
+
`})},fr=async(r,{zipFile:t,zipPath:n,extractToPath:f})=>{if(n)ae.logger.warn('The "zipPath" option of the unzip() Blueprint step is deprecated and will be removed. Use "zipFile" instead.');else if(!t)throw new Error("Either zipPath or zipFile must be provided");await br.unzipFile(r,t||n,f)},$r=["db.php","plugins/akismet","plugins/hello.php","plugins/wordpress-importer","mu-plugins/sqlite-database-integration","mu-plugins/playground-includes","mu-plugins/0-playground.php","mu-plugins/0-sqlite.php","themes/twentytwenty","themes/twentytwentyone","themes/twentytwentytwo","themes/twentytwentythree","themes/twentytwentyfour","themes/twentytwentyfive","themes/twentytwentysix"],Kr=async(r,{wordPressFilesZip:t,pathInZip:n=""})=>{const f=await r.documentRoot;let u=I.joinPaths("/tmp","import");await r.mkdir(u),await fr(r,{zipFile:t,extractToPath:u}),u=I.joinPaths(u,n);const s=I.joinPaths(u,"playground-export.json");let e=null;if(await r.fileExists(s))try{const q=await r.readFileAsText(s);e=JSON.parse(q).siteUrl,await r.unlink(s)}catch{}const p=I.joinPaths(u,"wp-content"),d=I.joinPaths(f,"wp-content");for(const q of $r){const T=I.joinPaths(p,q);await Rr(r,T);const h=I.joinPaths(d,q);await r.fileExists(h)&&(await r.mkdir(I.dirname(T)),await r.mv(h,T))}const y=I.joinPaths(u,"wp-content","database");await r.fileExists(y)||await r.mv(I.joinPaths(f,"wp-content","database"),y);const E=await r.listFiles(u);for(const q of E)await Rr(r,I.joinPaths(f,q)),await r.mv(I.joinPaths(u,q),I.joinPaths(f,q));await r.rmdir(u),await Nr.ensureWpConfig(r,f);const v=await r.absoluteUrl;e||(e=await Yt(r,f)),await Er(r,{siteUrl:v});const k=I.phpVar(I.joinPaths(f,"wp-admin","upgrade.php"));await r.run({code:`<?php
|
|
404
582
|
$_GET['step'] = 'upgrade_db';
|
|
405
|
-
require ${
|
|
406
|
-
`})
|
|
583
|
+
require ${k};
|
|
584
|
+
`}),e&&e!==v&&await Qt(r,f,e,v)};function Sr(r){const t=r.match(/\/scope:[^/]+\/?/);return t?t[0].replace(/\/?$/,"/"):null}async function Qt(r,t,n,f){const u=Sr(n),s=Sr(f);!u||!s||u!==s&&await r.run({code:`<?php
|
|
585
|
+
require_once getenv('DOCUMENT_ROOT') . '/wp-load.php';
|
|
586
|
+
global $wpdb;
|
|
587
|
+
|
|
588
|
+
$old_scope = getenv('OLD_SCOPE');
|
|
589
|
+
$new_scope = getenv('NEW_SCOPE');
|
|
590
|
+
|
|
591
|
+
// Update URLs in posts content, excerpts, and GUIDs
|
|
592
|
+
$wpdb->query($wpdb->prepare(
|
|
593
|
+
"UPDATE {$wpdb->posts} SET post_content = REPLACE(post_content, %s, %s)",
|
|
594
|
+
$old_scope, $new_scope
|
|
595
|
+
));
|
|
596
|
+
$wpdb->query($wpdb->prepare(
|
|
597
|
+
"UPDATE {$wpdb->posts} SET post_excerpt = REPLACE(post_excerpt, %s, %s)",
|
|
598
|
+
$old_scope, $new_scope
|
|
599
|
+
));
|
|
600
|
+
$wpdb->query($wpdb->prepare(
|
|
601
|
+
"UPDATE {$wpdb->posts} SET guid = REPLACE(guid, %s, %s)",
|
|
602
|
+
$old_scope, $new_scope
|
|
603
|
+
));
|
|
604
|
+
|
|
605
|
+
// Update URLs in post meta
|
|
606
|
+
$wpdb->query($wpdb->prepare(
|
|
607
|
+
"UPDATE {$wpdb->postmeta} SET meta_value = REPLACE(meta_value, %s, %s) WHERE meta_value LIKE %s",
|
|
608
|
+
$old_scope, $new_scope, '%' . $wpdb->esc_like($old_scope) . '%'
|
|
609
|
+
));
|
|
610
|
+
|
|
611
|
+
// Update URLs in options (handles both regular and serialized data)
|
|
612
|
+
$wpdb->query($wpdb->prepare(
|
|
613
|
+
"UPDATE {$wpdb->options} SET option_value = REPLACE(option_value, %s, %s) WHERE option_value LIKE %s",
|
|
614
|
+
$old_scope, $new_scope, '%' . $wpdb->esc_like($old_scope) . '%'
|
|
615
|
+
));
|
|
616
|
+
|
|
617
|
+
// Update URLs in user meta
|
|
618
|
+
$wpdb->query($wpdb->prepare(
|
|
619
|
+
"UPDATE {$wpdb->usermeta} SET meta_value = REPLACE(meta_value, %s, %s) WHERE meta_value LIKE %s",
|
|
620
|
+
$old_scope, $new_scope, '%' . $wpdb->esc_like($old_scope) . '%'
|
|
621
|
+
));
|
|
622
|
+
|
|
623
|
+
// Update URLs in term meta
|
|
624
|
+
$wpdb->query($wpdb->prepare(
|
|
625
|
+
"UPDATE {$wpdb->termmeta} SET meta_value = REPLACE(meta_value, %s, %s) WHERE meta_value LIKE %s",
|
|
626
|
+
$old_scope, $new_scope, '%' . $wpdb->esc_like($old_scope) . '%'
|
|
627
|
+
));
|
|
628
|
+
|
|
629
|
+
// Update URLs in comments
|
|
630
|
+
$wpdb->query($wpdb->prepare(
|
|
631
|
+
"UPDATE {$wpdb->comments} SET comment_content = REPLACE(comment_content, %s, %s) WHERE comment_content LIKE %s",
|
|
632
|
+
$old_scope, $new_scope, '%' . $wpdb->esc_like($old_scope) . '%'
|
|
633
|
+
));
|
|
634
|
+
$wpdb->query($wpdb->prepare(
|
|
635
|
+
"UPDATE {$wpdb->comments} SET comment_author_url = REPLACE(comment_author_url, %s, %s) WHERE comment_author_url LIKE %s",
|
|
636
|
+
$old_scope, $new_scope, '%' . $wpdb->esc_like($old_scope) . '%'
|
|
637
|
+
));
|
|
638
|
+
`,env:{DOCUMENT_ROOT:t,OLD_SCOPE:u,NEW_SCOPE:s}})}async function Yt(r,t){const n=I.phpVars({documentRoot:t});return(await r.run({code:`<?php
|
|
639
|
+
require_once ${n.documentRoot} . '/wp-load.php';
|
|
640
|
+
global $wpdb;
|
|
641
|
+
$row = $wpdb->get_row("SELECT option_value FROM {$wpdb->options} WHERE option_name = 'siteurl'");
|
|
642
|
+
echo $row ? $row->option_value : '';
|
|
643
|
+
`})).text.trim()||null}async function Rr(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function et(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function rt(r,{targetPath:t,zipFile:n,ifAlreadyInstalled:f="overwrite",targetFolderName:u=""}){const e=n.name.replace(/\.zip$/,""),p=I.joinPaths(await r.documentRoot,"wp-content"),d=I.joinPaths(p,I.randomFilename()),y=I.joinPaths(d,"assets",e);await r.fileExists(y)&&await r.rmdir(d,{recursive:!0}),await r.mkdir(d);try{await fr(r,{zipFile:n,extractToPath:y});let E=await r.listFiles(y,{prependPath:!0});E=E.filter(h=>!h.endsWith("/__MACOSX"));const v=E.length===1&&await r.isDir(E[0]);let k,q="";v?(q=E[0],k=E[0].split("/").pop()):(q=y,k=e),u&&u.length&&(k=u);const T=`${t}/${k}`;if(await r.fileExists(T)){if(!await r.isDir(T))throw new Error(`Cannot install asset ${k} to ${T} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(f==="overwrite")await r.rmdir(T,{recursive:!0});else{if(f==="skip")return{assetFolderPath:T,assetFolderName:k};throw new Error(`Cannot install asset ${k} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${f}`)}}return await r.mv(q,T),{assetFolderPath:T,assetFolderName:k}}finally{await r.rmdir(d,{recursive:!0})}}const tt=async(r,{pluginData:t,pluginZipFile:n,ifAlreadyInstalled:f,options:u={}},s)=>{n&&(t=n,ae.logger.warn('The "pluginZipFile" option is deprecated. Use "pluginData" instead.'));const e=I.joinPaths(await r.documentRoot,"wp-content","plugins"),p="targetFolderName"in u?u.targetFolderName:"";let d="",y="";const E=async k=>{if(k.name.toLowerCase().endsWith(".zip"))return!0;const q=new Uint8Array(await k.arrayBuffer(),0,4);return q[0]===80&&q[1]===75&&q[2]===3&&q[3]===4};if(t instanceof File)if(await E(t)){const k=t.name.split("/").pop()||"plugin.zip";y=nr(k),s==null||s.tracker.setCaption(`Installing the ${y} plugin`);const q=await rt(r,{ifAlreadyInstalled:f,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/plugins`,targetFolderName:p});d=q.assetFolderPath,y=q.assetFolderName}else if(t.name.endsWith(".php")){const k=I.joinPaths(e,t.name);await lr(r,{path:k,data:t}),d=e,y=t.name}else throw new Error("pluginData looks like a file but does not look like a .zip or .php file.");else if(t){y=t.name,s==null||s.tracker.setCaption(`Installing the ${y} plugin`);const k=I.joinPaths(e,p||t.name);await Ie.writeFiles(r,k,t.files,{rmRoot:!0}),d=k}("activate"in u?u.activate:!0)&&await vr(r,{pluginPath:d,pluginName:y},s)},st=async(r,{themeData:t,themeZipFile:n,ifAlreadyInstalled:f,options:u={}},s)=>{n&&(t=n,ae.logger.warn('The "themeZipFile" option is deprecated. Use "themeData" instead.'));const e="targetFolderName"in u?u.targetFolderName:"";let p="",d="";if(t instanceof File){const v=t.name.split("/").pop()||"theme.zip";d=nr(v),s==null||s.tracker.setCaption(`Installing the ${d} theme`),p=(await rt(r,{ifAlreadyInstalled:f,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/themes`,targetFolderName:e})).assetFolderName}else{d=t.name,p=e||d,s==null||s.tracker.setCaption(`Installing the ${d} theme`);const v=I.joinPaths(await r.documentRoot,"wp-content","themes",p);await Ie.writeFiles(r,v,t.files,{rmRoot:!0})}("activate"in u?u.activate:!0)&&await Pr(r,{themeFolderName:p},s),("importStarterContent"in u?u.importStarterContent:!1)&&await Tr(r,{themeSlug:p},s)},it=async(r,{username:t="admin"}={},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Logging in"),r.defineConstant("PLAYGROUND_AUTO_LOGIN_AS_USER",t)},ot=async(r,t,n)=>{var u;(u=n==null?void 0:n.tracker)==null||u.setCaption("Resetting WordPress data");const f=await r.documentRoot;await r.run({env:{DOCROOT:f},code:`<?php
|
|
407
644
|
require getenv('DOCROOT') . '/wp-load.php';
|
|
408
645
|
|
|
409
646
|
$GLOBALS['@pdo']->query('DELETE FROM wp_posts WHERE id > 0');
|
|
@@ -417,11 +654,11 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
417
654
|
|
|
418
655
|
$GLOBALS['@pdo']->query('DELETE FROM wp_commentmeta');
|
|
419
656
|
$GLOBALS['@pdo']->query("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='wp_commentmeta'");
|
|
420
|
-
`})},
|
|
421
|
-
'exclude_paths' => ${
|
|
422
|
-
'zip_root' => ${
|
|
423
|
-
'additional_paths' => ${
|
|
424
|
-
));`);const
|
|
657
|
+
`})},at=async(r,{options:t})=>{await r.request({url:"/wp-admin/install.php?step=2",method:"POST",body:{language:"en",prefix:"wp_",weblog_title:"My WordPress Website",user_name:t.adminPassword||"admin",admin_password:t.adminPassword||"password",admin_password2:t.adminPassword||"password",Submit:"Install WordPress",pw_weak:"1",admin_email:"admin@localhost.com"}})},nt=async(r,{selfContained:t=!1}={})=>{const n="/tmp/wordpress-playground.zip",f="/tmp/playground-export.json",u=await r.documentRoot,s=I.joinPaths(u,"wp-content"),e=await r.absoluteUrl;await r.writeFile(f,new TextEncoder().encode(JSON.stringify({siteUrl:e})));let p=$r;t&&(p=p.filter(v=>!v.startsWith("themes/twenty")).filter(v=>v!=="mu-plugins/sqlite-database-integration"));const d={[f]:"playground-export.json"};t&&(d[I.joinPaths(u,"wp-config.php")]="wp-config.php");const y=I.phpVars({zipPath:n,wpContentPath:s,documentRoot:u,exceptPaths:p.map(v=>I.joinPaths(u,"wp-content",v)),additionalPaths:d});await Gt(r,`zipDir(${y.wpContentPath}, ${y.zipPath}, array(
|
|
658
|
+
'exclude_paths' => ${y.exceptPaths},
|
|
659
|
+
'zip_root' => ${y.documentRoot},
|
|
660
|
+
'additional_paths' => ${y.additionalPaths}
|
|
661
|
+
));`);const E=await r.readFileAsBuffer(n);return r.unlink(n),r.unlink(f),E},Zt=`<?php
|
|
425
662
|
|
|
426
663
|
function zipDir($root, $output, $options = array())
|
|
427
664
|
{
|
|
@@ -481,12 +718,12 @@ function join_paths()
|
|
|
481
718
|
|
|
482
719
|
return preg_replace('#/+#', '/', join('/', $paths));
|
|
483
720
|
}
|
|
484
|
-
`;async function
|
|
485
|
-
require '${
|
|
721
|
+
`;async function Gt(r,t){return await r.run({code:Zt+t})}const Jt=async(r,t)=>{const u=(await(await fetch(`https://api.wordpress.org/translations/core/1.0/?version=${r}`)).json()).translations.find(s=>s.language.toLowerCase()===t.toLowerCase());if(!u)throw new Error(`Failed to get ${t} translation package for WordPress ${r}.`);return u.package},pt=async(r,{language:t},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Translating"),await r.defineConstant("WPLANG",t);const f=await r.documentRoot,u=(await r.run({code:`<?php
|
|
722
|
+
require '${f}/wp-includes/version.php';
|
|
486
723
|
echo $wp_version;
|
|
487
|
-
`})).text,s=[{url:await
|
|
488
|
-
require_once('${
|
|
489
|
-
require_once('${
|
|
724
|
+
`})).text,s=[{url:await Jt(u,t),type:"core"}],p=(await r.run({code:`<?php
|
|
725
|
+
require_once('${f}/wp-load.php');
|
|
726
|
+
require_once('${f}/wp-admin/includes/plugin.php');
|
|
490
727
|
echo json_encode(
|
|
491
728
|
array_values(
|
|
492
729
|
array_map(
|
|
@@ -504,9 +741,9 @@ function join_paths()
|
|
|
504
741
|
)
|
|
505
742
|
)
|
|
506
743
|
)
|
|
507
|
-
);`})).json;for(const{slug:k,version:
|
|
508
|
-
require_once('${
|
|
509
|
-
require_once('${
|
|
744
|
+
);`})).json;for(const{slug:k,version:q}of p)s.push({url:`https://downloads.wordpress.org/translation/plugin/${k}/${q}/${t}.zip`,type:"plugin"});const y=(await r.run({code:`<?php
|
|
745
|
+
require_once('${f}/wp-load.php');
|
|
746
|
+
require_once('${f}/wp-admin/includes/theme.php');
|
|
510
747
|
echo json_encode(
|
|
511
748
|
array_values(
|
|
512
749
|
array_map(
|
|
@@ -519,14 +756,26 @@ function join_paths()
|
|
|
519
756
|
wp_get_themes()
|
|
520
757
|
)
|
|
521
758
|
)
|
|
522
|
-
);`})).json;for(const{slug:k,version:R}of _)s.push({url:`https://downloads.wordpress.org/translation/theme/${k}/${R}/${t}.zip`,type:"theme"});await r.isDir(`${d}/wp-content/languages/plugins`)||await r.mkdir(`${d}/wp-content/languages/plugins`),await r.isDir(`${d}/wp-content/languages/themes`)||await r.mkdir(`${d}/wp-content/languages/themes`);const $=new U.Semaphore({concurrency:5}),j=s.map(({url:k,type:R})=>$.run(async()=>{try{const F=await fetch(k);if(!F.ok)throw new Error(`Failed to download translations for ${R}: ${F.statusText}`);let v=`${d}/wp-content/languages`;R==="plugin"?v+="/plugins":R==="theme"&&(v+="/themes"),await cr.unzipFile(r,new File([await F.blob()],`${t}-${R}.zip`),v)}catch(F){if(R==="core")throw new Error(`Failed to download translations for WordPress. Please check if the language code ${t} is correct. You can find all available languages and translations on https://translate.wordpress.org/.`);ae.logger.warn(`Error downloading translations for ${R}: ${F}`)}}));await Promise.all(j)},St=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:yr,activateTheme:hr,cp:Ur,defineSiteUrl:Pr,defineWpConfigConsts:or,enableMultisite:Wr,exportWXR:Yr,importThemeStarterContent:_r,importWordPressFiles:Zr,importWxr:Hr,installPlugin:Qr,installTheme:Jr,login:Xr,mkdir:Vr,mv:Br,request:Cr,resetData:Kr,rm:gr,rmdir:Mr,runPHP:Sr,runPHPWithOptions:Nr,runSql:xr,runWpInstallationWizard:et,setSiteLanguage:tt,setSiteOptions:br,unzip:nr,updateUserMeta:Dr,wpCLI:vr,writeFile:ar,writeFiles:zr,zipWpContent:rt},Symbol.toStringTag,{value:"Module"})),Nt={properties:{landingPage:{type:"string",description:"The URL to navigate to after the blueprint has been run."},description:{type:"string",description:"Optional description. It doesn't do anything but is exposed as a courtesy to developers who may want to document which blueprint file does what.",deprecated:"Use meta.description instead."},meta:{type:"object",properties:{title:{type:"string",description:"A clear and concise name for your Blueprint."},description:{type:"string",description:"A brief explanation of what your Blueprint offers."},author:{type:"string",description:"A GitHub username of the author of this Blueprint."},categories:{type:"array",items:{type:"string"},description:"Relevant categories to help users find your Blueprint in the future Blueprints section on WordPress.org."}},required:["title","author"],additionalProperties:!1,description:"Optional metadata. Used by the Blueprints gallery at https://github.com/WordPress/blueprints"},preferredVersions:{type:"object",properties:{php:{anyOf:[{$ref:"#/definitions/SupportedPHPVersion"},{type:"string",const:"latest"}],description:"The preferred PHP version to use. If not specified, the latest supported version will be used"},wp:{type:"string",description:"The preferred WordPress version to use. If not specified, the latest supported version will be used"}},required:["php","wp"],additionalProperties:!1,description:"The preferred PHP and WordPress versions to use."},features:{type:"object",properties:{intl:{type:"boolean"},networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},extraLibraries:{type:"array",items:{$ref:"#/definitions/ExtraLibrary"},description:"Extra libraries to preload into the Playground instance."},constants:{$ref:"#/definitions/PHPConstants",description:"PHP Constants to define on every request"},plugins:{type:"array",items:{anyOf:[{type:"string"},{$ref:"#/definitions/FileReference"}]},description:"WordPress plugins to install and activate"},siteOptions:{type:"object",additionalProperties:{type:"string"},properties:{blogname:{type:"string",description:"The site title"}},description:"WordPress site options to define"},login:{anyOf:[{type:"boolean"},{type:"object",properties:{username:{type:"string"},password:{type:"string"}},required:["username","password"],additionalProperties:!1}],description:"User to log in as. If true, logs the user in as admin/password."},phpExtensionBundles:{deprecated:"No longer used. Feel free to remove it from your Blueprint."},steps:{type:"array",items:{anyOf:[{$ref:"#/definitions/StepDefinition"},{type:"string"},{not:{}},{type:"boolean",const:!1},{type:"null"}]},description:"The steps to run after every other operation in this Blueprint was executed."},$schema:{type:"string"}}},xt={enum:["8.4","8.3","8.2","8.1","8.0","7.4","7.3","7.2"]},Ct={additionalProperties:{type:["string","boolean","number"]}},st=Object.prototype.hasOwnProperty;function X(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;const l=e;let c=!1;const _=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let B;if(r.resource===void 0&&(B="resource")||r.path===void 0&&(B="path")){const re={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:B},message:"must have required property '"+B+"'"};s===null?s=[re]:s.push(re),e++}else{const re=e;for(const m in r)if(!(m==="resource"||m==="path")){const N={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};s===null?s=[N]:s.push(N),e++;break}if(re===e){if(r.resource!==void 0){let m=r.resource;const N=e;if(typeof m!="string"){const h={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[h]:s.push(h),e++}if(m!=="vfs"){const h={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};s===null?s=[h]:s.push(h),e++}var j=N===e}else var j=!0;if(j)if(r.path!==void 0){const m=e;if(typeof r.path!="string"){const h={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[h]:s.push(h),e++}var j=m===e}else var j=!0}}}else{const B={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[B]:s.push(B),e++}var k=_===e;if(c=c||k,!c){const B=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let N;if(r.resource===void 0&&(N="resource")||r.name===void 0&&(N="name")||r.contents===void 0&&(N="contents")){const h={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};s===null?s=[h]:s.push(h),e++}else{const h=e;for(const b in r)if(!(b==="resource"||b==="name"||b==="contents")){const P={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:b},message:"must NOT have additional properties"};s===null?s=[P]:s.push(P),e++;break}if(h===e){if(r.resource!==void 0){let b=r.resource;const P=e;if(typeof b!="string"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[w]:s.push(w),e++}if(b!=="literal"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};s===null?s=[w]:s.push(w),e++}var R=P===e}else var R=!0;if(R){if(r.name!==void 0){const b=e;if(typeof r.name!="string"){const w={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[w]:s.push(w),e++}var R=b===e}else var R=!0;if(R)if(r.contents!==void 0){let b=r.contents;const P=e,w=e;let y=!1;const g=e;if(typeof b!="string"){const L={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[L]:s.push(L),e++}var F=g===e;if(y=y||F,!y){const L=e;if(e===L)if(b&&typeof b=="object"&&!Array.isArray(b)){let S;if(b.BYTES_PER_ELEMENT===void 0&&(S="BYTES_PER_ELEMENT")||b.buffer===void 0&&(S="buffer")||b.byteLength===void 0&&(S="byteLength")||b.byteOffset===void 0&&(S="byteOffset")||b.length===void 0&&(S="length")){const W={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:S},message:"must have required property '"+S+"'"};s===null?s=[W]:s.push(W),e++}else{const W=e;for(const D in b)if(!(D==="BYTES_PER_ELEMENT"||D==="buffer"||D==="byteLength"||D==="byteOffset"||D==="length")){let I=b[D];const ee=e;if(!(typeof I=="number"&&isFinite(I))){const A={instancePath:t+"/contents/"+D.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[A]:s.push(A),e++}var v=ee===e;if(!v)break}if(W===e){if(b.BYTES_PER_ELEMENT!==void 0){let D=b.BYTES_PER_ELEMENT;const I=e;if(!(typeof D=="number"&&isFinite(D))){const ee={instancePath:t+"/contents/BYTES_PER_ELEMENT",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[ee]:s.push(ee),e++}var V=I===e}else var V=!0;if(V){if(b.buffer!==void 0){let D=b.buffer;const I=e;if(e===I)if(D&&typeof D=="object"&&!Array.isArray(D)){let A;if(D.byteLength===void 0&&(A="byteLength")){const Z={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:A},message:"must have required property '"+A+"'"};s===null?s=[Z]:s.push(Z),e++}else{const Z=e;for(const M in D)if(M!=="byteLength"){const z={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:M},message:"must NOT have additional properties"};s===null?s=[z]:s.push(z),e++;break}if(Z===e&&D.byteLength!==void 0){let M=D.byteLength;if(!(typeof M=="number"&&isFinite(M))){const z={instancePath:t+"/contents/buffer/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}}}}else{const A={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[A]:s.push(A),e++}var V=I===e}else var V=!0;if(V){if(b.byteLength!==void 0){let D=b.byteLength;const I=e;if(!(typeof D=="number"&&isFinite(D))){const A={instancePath:t+"/contents/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[A]:s.push(A),e++}var V=I===e}else var V=!0;if(V){if(b.byteOffset!==void 0){let D=b.byteOffset;const I=e;if(!(typeof D=="number"&&isFinite(D))){const A={instancePath:t+"/contents/byteOffset",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[A]:s.push(A),e++}var V=I===e}else var V=!0;if(V)if(b.length!==void 0){let D=b.length;const I=e;if(!(typeof D=="number"&&isFinite(D))){const A={instancePath:t+"/contents/length",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[A]:s.push(A),e++}var V=I===e}else var V=!0}}}}}}else{const S={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[S]:s.push(S),e++}var F=L===e;y=y||F}if(y)e=w,s!==null&&(w?s.length=w:s=null);else{const L={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[L]:s.push(L),e++}var R=P===e}else var R=!0}}}}else{const N={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[N]:s.push(N),e++}var k=B===e;if(c=c||k,!c){const N=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let P;if(r.resource===void 0&&(P="resource")||r.slug===void 0&&(P="slug")){const w={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:P},message:"must have required property '"+P+"'"};s===null?s=[w]:s.push(w),e++}else{const w=e;for(const y in r)if(!(y==="resource"||y==="slug")){const g={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};s===null?s=[g]:s.push(g),e++;break}if(w===e){if(r.resource!==void 0){let y=r.resource;const g=e;if(typeof y!="string"){const q={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[q]:s.push(q),e++}if(y!=="wordpress.org/themes"){const q={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/themes"},message:"must be equal to constant"};s===null?s=[q]:s.push(q),e++}var se=g===e}else var se=!0;if(se)if(r.slug!==void 0){const y=e;if(typeof r.slug!="string"){const q={instancePath:t+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[q]:s.push(q),e++}var se=y===e}else var se=!0}}}else{const P={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[P]:s.push(P),e++}var k=N===e;if(c=c||k,!c){const P=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let g;if(r.resource===void 0&&(g="resource")||r.slug===void 0&&(g="slug")){const q={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"};s===null?s=[q]:s.push(q),e++}else{const q=e;for(const L in r)if(!(L==="resource"||L==="slug")){const C={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:L},message:"must NOT have additional properties"};s===null?s=[C]:s.push(C),e++;break}if(q===e){if(r.resource!==void 0){let L=r.resource;const C=e;if(typeof L!="string"){const S={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[S]:s.push(S),e++}if(L!=="wordpress.org/plugins"){const S={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/plugins"},message:"must be equal to constant"};s===null?s=[S]:s.push(S),e++}var Y=C===e}else var Y=!0;if(Y)if(r.slug!==void 0){const L=e;if(typeof r.slug!="string"){const S={instancePath:t+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[S]:s.push(S),e++}var Y=L===e}else var Y=!0}}}else{const g={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[g]:s.push(g),e++}var k=P===e;if(c=c||k,!c){const g=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let C;if(r.resource===void 0&&(C="resource")||r.url===void 0&&(C="url")){const S={instancePath:t,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"};s===null?s=[S]:s.push(S),e++}else{const S=e;for(const W in r)if(!(W==="resource"||W==="url"||W==="caption")){const D={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:W},message:"must NOT have additional properties"};s===null?s=[D]:s.push(D),e++;break}if(S===e){if(r.resource!==void 0){let W=r.resource;const D=e;if(typeof W!="string"){const I={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[I]:s.push(I),e++}if(W!=="url"){const I={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};s===null?s=[I]:s.push(I),e++}var T=D===e}else var T=!0;if(T){if(r.url!==void 0){const W=e;if(typeof r.url!="string"){const I={instancePath:t+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[I]:s.push(I),e++}var T=W===e}else var T=!0;if(T)if(r.caption!==void 0){const W=e;if(typeof r.caption!="string"){const I={instancePath:t+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[I]:s.push(I),e++}var T=W===e}else var T=!0}}}}else{const C={instancePath:t,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[C]:s.push(C),e++}var k=g===e;if(c=c||k,!c){const C=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let D;if(r.resource===void 0&&(D="resource")||r.path===void 0&&(D="path")){const I={instancePath:t,schemaPath:"#/definitions/BundledReference/required",keyword:"required",params:{missingProperty:D},message:"must have required property '"+D+"'"};s===null?s=[I]:s.push(I),e++}else{const I=e;for(const ee in r)if(!(ee==="resource"||ee==="path")){const A={instancePath:t,schemaPath:"#/definitions/BundledReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ee},message:"must NOT have additional properties"};s===null?s=[A]:s.push(A),e++;break}if(I===e){if(r.resource!==void 0){let ee=r.resource;const A=e;if(typeof ee!="string"){const Z={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Z]:s.push(Z),e++}if(ee!=="bundled"){const Z={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/const",keyword:"const",params:{allowedValue:"bundled"},message:"must be equal to constant"};s===null?s=[Z]:s.push(Z),e++}var K=A===e}else var K=!0;if(K)if(r.path!==void 0){const ee=e;if(typeof r.path!="string"){const Z={instancePath:t+"/path",schemaPath:"#/definitions/BundledReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Z]:s.push(Z),e++}var K=ee===e}else var K=!0}}}else{const D={instancePath:t,schemaPath:"#/definitions/BundledReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[D]:s.push(D),e++}var k=C===e;c=c||k}}}}}if(c)e=l,s!==null&&(l?s.length=l:s=null);else{const B={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[B]:s.push(B),e++,X.errors=s,!1}return X.errors=s,e===0}const tr={oneOf:[{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activatePlugin"},pluginPath:{type:"string",description:"Path to the plugin directory as absolute path (/wordpress/wp-content/plugins/plugin-name); or the plugin entry file relative to the plugins directory (plugin-name/plugin-name.php)."},pluginName:{type:"string",description:"Optional. Plugin name to display in the progress bar."}},required:["pluginPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activateTheme"},themeFolderName:{type:"string",description:"The name of the theme folder inside wp-content/themes/"}},required:["step","themeFolderName"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"cp"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineWpConfigConsts"},consts:{type:"object",additionalProperties:{},description:"The constants to define"},method:{type:"string",enum:["rewrite-wp-config","define-before-run"],description:`The method of defining the constants in wp-config.php. Possible values are:
|
|
759
|
+
);`})).json;for(const{slug:k,version:q}of y)s.push({url:`https://downloads.wordpress.org/translation/theme/${k}/${q}/${t}.zip`,type:"theme"});await r.isDir(`${f}/wp-content/languages/plugins`)||await r.mkdir(`${f}/wp-content/languages/plugins`),await r.isDir(`${f}/wp-content/languages/themes`)||await r.mkdir(`${f}/wp-content/languages/themes`);const E=new I.Semaphore({concurrency:5}),v=s.map(({url:k,type:q})=>E.run(async()=>{try{const T=await fetch(k);if(!T.ok)throw new Error(`Failed to download translations for ${q}: ${T.statusText}`);let h=`${f}/wp-content/languages`;q==="plugin"?h+="/plugins":q==="theme"&&(h+="/themes"),await br.unzipFile(r,new File([await T.blob()],`${t}-${q}.zip`),h)}catch(T){if(q==="core")throw new Error(`Failed to download translations for WordPress. Please check if the language code ${t} is correct. You can find all available languages and translations on https://translate.wordpress.org/.`);ae.logger.warn(`Error downloading translations for ${q}: ${T}`)}}));await Promise.all(v)},Xt=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:vr,activateTheme:Pr,cp:Qr,defineSiteUrl:Er,defineWpConfigConsts:pr,enableMultisite:Hr,exportWXR:et,importThemeStarterContent:Tr,importWordPressFiles:Kr,importWxr:Xr,installPlugin:tt,installTheme:st,login:it,mkdir:Zr,mv:Yr,request:Mr,resetData:ot,rm:ar,rmdir:Gr,runPHP:Ir,runPHPWithOptions:Wr,runSql:Br,runWpInstallationWizard:at,setSiteLanguage:pt,setSiteOptions:_r,unzip:fr,updateUserMeta:Vr,wpCLI:Or,writeFile:lr,writeFiles:Jr,zipWpContent:nt},Symbol.toStringTag,{value:"Module"})),Kt={properties:{landingPage:{type:"string",description:"The URL to navigate to after the blueprint has been run."},description:{type:"string",description:"Optional description. It doesn't do anything but is exposed as a courtesy to developers who may want to document which blueprint file does what.",deprecated:"Use meta.description instead."},meta:{type:"object",properties:{title:{type:"string",description:"A clear and concise name for your Blueprint."},description:{type:"string",description:"A brief explanation of what your Blueprint offers."},author:{type:"string",description:"A GitHub username of the author of this Blueprint."},categories:{type:"array",items:{type:"string"},description:"Relevant categories to help users find your Blueprint in the future Blueprints section on WordPress.org."}},required:["title","author"],additionalProperties:!1,description:"Optional metadata. Used by the Blueprints gallery at https://github.com/WordPress/blueprints"},preferredVersions:{type:"object",properties:{php:{anyOf:[{$ref:"#/definitions/SupportedPHPVersion"},{type:"string",const:"latest"}],description:"The preferred PHP version to use. If not specified, the latest supported version will be used"},wp:{type:"string",description:"The preferred WordPress version to use. If not specified, the latest supported version will be used"}},required:["php","wp"],additionalProperties:!1,description:"The preferred PHP and WordPress versions to use."},features:{type:"object",properties:{intl:{type:"boolean",description:"Should boot with support for Intl dynamic extension"},networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},extraLibraries:{type:"array",items:{$ref:"#/definitions/ExtraLibrary"},description:"Extra libraries to preload into the Playground instance."},constants:{$ref:"#/definitions/PHPConstants",description:"PHP Constants to define on every request"},plugins:{type:"array",items:{anyOf:[{type:"string"},{$ref:"#/definitions/FileReference"}]},description:"WordPress plugins to install and activate"},siteOptions:{type:"object",additionalProperties:{type:"string"},properties:{blogname:{type:"string",description:"The site title"}},description:"WordPress site options to define"},login:{anyOf:[{type:"boolean"},{type:"object",properties:{username:{type:"string"},password:{type:"string"}},required:["username","password"],additionalProperties:!1}],description:"User to log in as. If true, logs the user in as admin/password."},phpExtensionBundles:{deprecated:"No longer used. Feel free to remove it from your Blueprint."},steps:{type:"array",items:{anyOf:[{$ref:"#/definitions/StepDefinition"},{type:"string"},{not:{}},{type:"boolean",const:!1},{type:"null"}]},description:"The steps to run after every other operation in this Blueprint was executed."},$schema:{type:"string"}}},es={enum:["8.5","8.4","8.3","8.2","8.1","8.0","7.4","7.3","7.2"]},rs={additionalProperties:{type:["string","boolean","number"]}},lt=Object.prototype.hasOwnProperty,mr={validate:G},ts={enum:["branch","tag","commit","refname"]};function de(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.resource===void 0&&(d="resource")||r.url===void 0&&(d="url")||r.ref===void 0&&(d="ref"))return de.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;for(const y in r)if(!(y==="resource"||y==="url"||y==="ref"||y==="refType"||y==="path"||y===".git"))return de.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"}],!1;{if(r.resource!==void 0){let y=r.resource;const E=e;if(typeof y!="string")return de.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(y!=="git:directory")return de.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"git:directory"},message:"must be equal to constant"}],!1;var p=E===e}else var p=!0;if(p){if(r.url!==void 0){const y=e;if(typeof r.url!="string")return de.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=y===e}else var p=!0;if(p){if(r.ref!==void 0){const y=e;if(typeof r.ref!="string")return de.errors=[{instancePath:t+"/ref",schemaPath:"#/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=y===e}else var p=!0;if(p){if(r.refType!==void 0){let y=r.refType;const E=e;if(typeof y!="string")return de.errors=[{instancePath:t+"/refType",schemaPath:"#/definitions/GitDirectoryRefType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(y==="branch"||y==="tag"||y==="commit"||y==="refname"))return de.errors=[{instancePath:t+"/refType",schemaPath:"#/definitions/GitDirectoryRefType/enum",keyword:"enum",params:{allowedValues:ts.enum},message:"must be equal to one of the allowed values"}],!1;var p=E===e}else var p=!0;if(p){if(r.path!==void 0){const y=e;if(typeof r.path!="string")return de.errors=[{instancePath:t+"/path",schemaPath:"#/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=y===e}else var p=!0;if(p)if(r[".git"]!==void 0){const y=e;if(typeof r[".git"]!="boolean")return de.errors=[{instancePath:t+"/.git",schemaPath:"#/properties/.git/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var p=y===e}else var p=!0}}}}}}else return de.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return de.errors=s,e===0}const ss={additionalProperties:{anyOf:[{$ref:"#/definitions/FileTree"},{type:["object","string"]}]}},yr={validate:xe};function xe(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r))for(const y in r){let E=r[y];const v=e,k=e;let q=!1;const T=e;yr.validate(E,{instancePath:t+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:y,rootData:u})||(s=s===null?yr.validate.errors:s.concat(yr.validate.errors),e=s.length);var p=T===e;if(q=q||p,!q){const h=e;if(!(E&&typeof E=="object"&&!Array.isArray(E))&&typeof E!="string"){const K={instancePath:t+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf/1/type",keyword:"type",params:{type:ss.additionalProperties.anyOf[1].type},message:"must be object,string"};s===null?s=[K]:s.push(K),e++}var p=h===e;q=q||p}if(q)e=k,s!==null&&(k?s.length=k:s=null);else{const h={instancePath:t+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[h]:s.push(h),e++,xe.errors=s,!1}var d=v===e;if(!d)break}else return xe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return xe.errors=s,e===0}function $e(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.files===void 0&&(d="files")||r.name===void 0&&(d="name")||r.resource===void 0&&(d="resource"))return $e.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const y=e;for(const E in r)if(!(E==="resource"||E==="files"||E==="name"))return $e.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"}],!1;if(y===e){if(r.resource!==void 0){let E=r.resource;const v=e;if(typeof E!="string")return $e.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(E!=="literal:directory")return $e.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"literal:directory"},message:"must be equal to constant"}],!1;var p=v===e}else var p=!0;if(p){if(r.files!==void 0){const E=e;xe(r.files,{instancePath:t+"/files",parentData:r,parentDataProperty:"files",rootData:u})||(s=s===null?xe.errors:s.concat(xe.errors),e=s.length);var p=E===e}else var p=!0;if(p)if(r.name!==void 0){const E=e;if(typeof r.name!="string")return $e.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=E===e}else var p=!0}}}}else return $e.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return $e.errors=s,e===0}function ce(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;const p=e;let d=!1;const y=e;de(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:u})||(s=s===null?de.errors:s.concat(de.errors),e=s.length);var E=y===e;if(d=d||E,!d){const v=e;$e(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:u})||(s=s===null?$e.errors:s.concat($e.errors),e=s.length);var E=v===e;d=d||E}if(d)e=p,s!==null&&(p?s.length=p:s=null);else{const v={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[v]:s.push(v),e++,ce.errors=s,!1}return ce.errors=s,e===0}function we(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let y;if(r.resource===void 0&&(y="resource")||r.inner===void 0&&(y="inner"))return we.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:y},message:"must have required property '"+y+"'"}],!1;{const E=e;for(const v in r)if(!(v==="resource"||v==="inner"||v==="name"))return we.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"}],!1;if(E===e){if(r.resource!==void 0){let v=r.resource;const k=e;if(typeof v!="string")return we.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(v!=="zip")return we.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"zip"},message:"must be equal to constant"}],!1;var p=k===e}else var p=!0;if(p){if(r.inner!==void 0){let v=r.inner;const k=e,q=e;let T=!1;const h=e;mr.validate(v,{instancePath:t+"/inner",parentData:r,parentDataProperty:"inner",rootData:u})||(s=s===null?mr.validate.errors:s.concat(mr.validate.errors),e=s.length);var d=h===e;if(T=T||d,!T){const K=e;ce(v,{instancePath:t+"/inner",parentData:r,parentDataProperty:"inner",rootData:u})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var d=K===e;T=T||d}if(T)e=q,s!==null&&(q?s.length=q:s=null);else{const K={instancePath:t+"/inner",schemaPath:"#/properties/inner/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[K]:s.push(K),e++,we.errors=s,!1}var p=k===e}else var p=!0;if(p)if(r.name!==void 0){const v=e;if(typeof r.name!="string")return we.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=v===e}else var p=!0}}}}else return we.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return we.errors=s,e===0}function G(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;const p=e;let d=!1;const y=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let B;if(r.resource===void 0&&(B="resource")||r.path===void 0&&(B="path")){const te={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:B},message:"must have required property '"+B+"'"};s===null?s=[te]:s.push(te),e++}else{const te=e;for(const m in r)if(!(m==="resource"||m==="path")){const N={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};s===null?s=[N]:s.push(N),e++;break}if(te===e){if(r.resource!==void 0){let m=r.resource;const N=e;if(typeof m!="string"){const b={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[b]:s.push(b),e++}if(m!=="vfs"){const b={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};s===null?s=[b]:s.push(b),e++}var v=N===e}else var v=!0;if(v)if(r.path!==void 0){const m=e;if(typeof r.path!="string"){const b={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[b]:s.push(b),e++}var v=m===e}else var v=!0}}}else{const B={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[B]:s.push(B),e++}var k=y===e;if(d=d||k,!d){const B=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let N;if(r.resource===void 0&&(N="resource")||r.name===void 0&&(N="name")||r.contents===void 0&&(N="contents")){const b={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};s===null?s=[b]:s.push(b),e++}else{const b=e;for(const w in r)if(!(w==="resource"||w==="name"||w==="contents")){const O={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};s===null?s=[O]:s.push(O),e++;break}if(b===e){if(r.resource!==void 0){let w=r.resource;const O=e;if(typeof w!="string"){const _={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[_]:s.push(_),e++}if(w!=="literal"){const _={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};s===null?s=[_]:s.push(_),e++}var q=O===e}else var q=!0;if(q){if(r.name!==void 0){const w=e;if(typeof r.name!="string"){const _={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[_]:s.push(_),e++}var q=w===e}else var q=!0;if(q)if(r.contents!==void 0){let w=r.contents;const O=e,_=e;let P=!1;const g=e;if(typeof w!="string"){const L={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[L]:s.push(L),e++}var T=g===e;if(P=P||T,!P){const L=e;if(e===L)if(w&&typeof w=="object"&&!Array.isArray(w)){let F;if(w.BYTES_PER_ELEMENT===void 0&&(F="BYTES_PER_ELEMENT")||w.buffer===void 0&&(F="buffer")||w.byteLength===void 0&&(F="byteLength")||w.byteOffset===void 0&&(F="byteOffset")||w.length===void 0&&(F="length")){const W={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:F},message:"must have required property '"+F+"'"};s===null?s=[W]:s.push(W),e++}else{const W=e;for(const D in w)if(!(D==="BYTES_PER_ELEMENT"||D==="buffer"||D==="byteLength"||D==="byteOffset"||D==="length")){let U=w[D];const re=e;if(!(typeof U=="number"&&isFinite(U))){const R={instancePath:t+"/contents/"+D.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var h=re===e;if(!h)break}if(W===e){if(w.BYTES_PER_ELEMENT!==void 0){let D=w.BYTES_PER_ELEMENT;const U=e;if(!(typeof D=="number"&&isFinite(D))){const re={instancePath:t+"/contents/BYTES_PER_ELEMENT",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[re]:s.push(re),e++}var M=U===e}else var M=!0;if(M){if(w.buffer!==void 0){let D=w.buffer;const U=e;if(e===U)if(D&&typeof D=="object"&&!Array.isArray(D)){let R;if(D.byteLength===void 0&&(R="byteLength")){const Q={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"};s===null?s=[Q]:s.push(Q),e++}else{const Q=e;for(const V in D)if(V!=="byteLength"){const z={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:V},message:"must NOT have additional properties"};s===null?s=[z]:s.push(z),e++;break}if(Q===e&&D.byteLength!==void 0){let V=D.byteLength;if(!(typeof V=="number"&&isFinite(V))){const z={instancePath:t+"/contents/buffer/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}}}}else{const R={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[R]:s.push(R),e++}var M=U===e}else var M=!0;if(M){if(w.byteLength!==void 0){let D=w.byteLength;const U=e;if(!(typeof D=="number"&&isFinite(D))){const R={instancePath:t+"/contents/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var M=U===e}else var M=!0;if(M){if(w.byteOffset!==void 0){let D=w.byteOffset;const U=e;if(!(typeof D=="number"&&isFinite(D))){const R={instancePath:t+"/contents/byteOffset",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var M=U===e}else var M=!0;if(M)if(w.length!==void 0){let D=w.length;const U=e;if(!(typeof D=="number"&&isFinite(D))){const R={instancePath:t+"/contents/length",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var M=U===e}else var M=!0}}}}}}else{const F={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[F]:s.push(F),e++}var T=L===e;P=P||T}if(P)e=_,s!==null&&(_?s.length=_:s=null);else{const L={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[L]:s.push(L),e++}var q=O===e}else var q=!0}}}}else{const N={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[N]:s.push(N),e++}var k=B===e;if(d=d||k,!d){const N=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let O;if(r.resource===void 0&&(O="resource")||r.slug===void 0&&(O="slug")){const _={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};s===null?s=[_]:s.push(_),e++}else{const _=e;for(const P in r)if(!(P==="resource"||P==="slug")){const g={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};s===null?s=[g]:s.push(g),e++;break}if(_===e){if(r.resource!==void 0){let P=r.resource;const g=e;if(typeof P!="string"){const S={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[S]:s.push(S),e++}if(P!=="wordpress.org/themes"){const S={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/themes"},message:"must be equal to constant"};s===null?s=[S]:s.push(S),e++}var K=g===e}else var K=!0;if(K)if(r.slug!==void 0){const P=e;if(typeof r.slug!="string"){const S={instancePath:t+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[S]:s.push(S),e++}var K=P===e}else var K=!0}}}else{const O={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[O]:s.push(O),e++}var k=N===e;if(d=d||k,!d){const O=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let g;if(r.resource===void 0&&(g="resource")||r.slug===void 0&&(g="slug")){const S={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"};s===null?s=[S]:s.push(S),e++}else{const S=e;for(const L in r)if(!(L==="resource"||L==="slug")){const C={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:L},message:"must NOT have additional properties"};s===null?s=[C]:s.push(C),e++;break}if(S===e){if(r.resource!==void 0){let L=r.resource;const C=e;if(typeof L!="string"){const F={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}if(L!=="wordpress.org/plugins"){const F={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/plugins"},message:"must be equal to constant"};s===null?s=[F]:s.push(F),e++}var Y=C===e}else var Y=!0;if(Y)if(r.slug!==void 0){const L=e;if(typeof r.slug!="string"){const F={instancePath:t+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var Y=L===e}else var Y=!0}}}else{const g={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[g]:s.push(g),e++}var k=O===e;if(d=d||k,!d){const g=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let C;if(r.resource===void 0&&(C="resource")||r.url===void 0&&(C="url")){const F={instancePath:t,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"};s===null?s=[F]:s.push(F),e++}else{const F=e;for(const W in r)if(!(W==="resource"||W==="url"||W==="caption")){const D={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:W},message:"must NOT have additional properties"};s===null?s=[D]:s.push(D),e++;break}if(F===e){if(r.resource!==void 0){let W=r.resource;const D=e;if(typeof W!="string"){const U={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[U]:s.push(U),e++}if(W!=="url"){const U={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};s===null?s=[U]:s.push(U),e++}var j=D===e}else var j=!0;if(j){if(r.url!==void 0){const W=e;if(typeof r.url!="string"){const U={instancePath:t+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[U]:s.push(U),e++}var j=W===e}else var j=!0;if(j)if(r.caption!==void 0){const W=e;if(typeof r.caption!="string"){const U={instancePath:t+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[U]:s.push(U),e++}var j=W===e}else var j=!0}}}}else{const C={instancePath:t,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[C]:s.push(C),e++}var k=g===e;if(d=d||k,!d){const C=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let D;if(r.resource===void 0&&(D="resource")||r.path===void 0&&(D="path")){const U={instancePath:t,schemaPath:"#/definitions/BundledReference/required",keyword:"required",params:{missingProperty:D},message:"must have required property '"+D+"'"};s===null?s=[U]:s.push(U),e++}else{const U=e;for(const re in r)if(!(re==="resource"||re==="path")){const R={instancePath:t,schemaPath:"#/definitions/BundledReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:re},message:"must NOT have additional properties"};s===null?s=[R]:s.push(R),e++;break}if(U===e){if(r.resource!==void 0){let re=r.resource;const R=e;if(typeof re!="string"){const Q={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Q]:s.push(Q),e++}if(re!=="bundled"){const Q={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/const",keyword:"const",params:{allowedValue:"bundled"},message:"must be equal to constant"};s===null?s=[Q]:s.push(Q),e++}var ee=R===e}else var ee=!0;if(ee)if(r.path!==void 0){const re=e;if(typeof r.path!="string"){const Q={instancePath:t+"/path",schemaPath:"#/definitions/BundledReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Q]:s.push(Q),e++}var ee=re===e}else var ee=!0}}}else{const D={instancePath:t,schemaPath:"#/definitions/BundledReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[D]:s.push(D),e++}var k=C===e;if(d=d||k,!d){const D=e;we(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:u})||(s=s===null?we.errors:s.concat(we.errors),e=s.length);var k=D===e;d=d||k}}}}}}if(d)e=p,s!==null&&(p?s.length=p:s=null);else{const B={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[B]:s.push(B),e++,G.errors=s,!1}return G.errors=s,e===0}const sr={oneOf:[{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activatePlugin"},pluginPath:{type:"string",description:"Path to the plugin directory as absolute path (/wordpress/wp-content/plugins/plugin-name); or the plugin entry file relative to the plugins directory (plugin-name/plugin-name.php)."},pluginName:{type:"string",description:"Optional. Plugin name to display in the progress bar."}},required:["pluginPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activateTheme"},themeFolderName:{type:"string",description:"The name of the theme folder inside wp-content/themes/"}},required:["step","themeFolderName"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"cp"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineWpConfigConsts"},consts:{type:"object",additionalProperties:{},description:"The constants to define"},method:{type:"string",enum:["rewrite-wp-config","define-before-run"],description:`The method of defining the constants in wp-config.php. Possible values are:
|
|
523
760
|
|
|
524
761
|
- rewrite-wp-config: Default. Rewrites the wp-config.php file to explicitly call define() with the requested name and value. This method alters the file on the disk, but it doesn't conflict with existing define() calls in wp-config.php.
|
|
525
762
|
|
|
526
763
|
- define-before-run: Defines the constant before running the requested script. It doesn't alter any files on the disk, but constants defined this way may conflict with existing define() calls in wp-config.php.`},virtualize:{type:"boolean",deprecated:`This option is noop and will be removed in a future version.
|
|
527
764
|
This option is only kept in here to avoid breaking Blueprint schema validation
|
|
528
765
|
for existing apps using this option.`}},required:["consts","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineSiteUrl"},siteUrl:{type:"string",description:"The URL"}},required:["siteUrl","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"enableMultisite"},wpCliPath:{type:"string",description:"wp-cli.phar path"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWxr"},file:{$ref:"#/definitions/FileReference",description:"The file to import"},importer:{type:"string",enum:["data-liberation","default"],description:"The importer to use. Possible values:\n\n- `default`: The importer from https://github.com/humanmade/WordPress-Importer\n- `data-liberation`: The experimental Data Liberation WXR importer developed at https://github.com/WordPress/wordpress-playground/issues/1894\n\nThis option is deprecated. The syntax will not be removed, but once the Data Liberation importer matures, it will become the only supported importer and the `importer` option will be ignored.",deprecated:!0}},required:["file","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importThemeStarterContent",description:"The step identifier."},themeSlug:{type:"string",description:"The name of the theme to import content from."}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWordPressFiles"},wordPressFilesZip:{$ref:"#/definitions/FileReference",description:"The zip file containing the top-level WordPress files and directories."},pathInZip:{type:"string",description:"The path inside the zip file where the WordPress files are."}},required:["step","wordPressFilesZip"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installPlugin",description:"The step identifier."},pluginData:{anyOf:[{$ref:"#/definitions/FileReference"},{$ref:"#/definitions/DirectoryReference"}],description:"The plugin files to install. It can be a plugin zip file, a single PHP file, or a directory containing all the plugin files at its root."},pluginZipFile:{$ref:"#/definitions/FileReference",deprecated:". Use 'pluginData' instead."},options:{$ref:"#/definitions/InstallPluginOptions",description:"Optional installation options."}},required:["pluginData","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installTheme",description:"The step identifier."},themeData:{anyOf:[{$ref:"#/definitions/FileReference"},{$ref:"#/definitions/DirectoryReference"}],description:"The theme files to install. It can be either a theme zip file, or a directory containing all the theme files at its root."},themeZipFile:{$ref:"#/definitions/FileReference",deprecated:". Use 'themeData' instead."},options:{$ref:"#/definitions/InstallThemeOptions",description:"Optional installation options."}},required:["step","themeData"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"login"},username:{type:"string",description:"The user to log in as. Defaults to 'admin'."},password:{type:"string",deprecated:`The password field is deprecated and will be removed in a future version.
|
|
529
|
-
Only the username field is required for user authentication.`}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mkdir"},path:{type:"string",description:"The path of the directory you want to create"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mv"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"resetData"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"request"},request:{$ref:"#/definitions/PHPRequest",description:"Request details (See /wordpress-playground/api/universal/interface/PHPRequest)"}},required:["request","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rm"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rmdir"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHP",description:"The step identifier."},code:{anyOf:[{type:"string"},{type:"object",properties:{filename:{type:"string",description:"This property is ignored during Blueprint v1 execution but exists so the same runPHP step structure can be used for Blueprints v1 and v2."},content:{type:"string"}},required:["filename","content"],additionalProperties:!1}],description:"The PHP code to run."}},required:["code","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHPWithOptions"},options:{$ref:"#/definitions/PHPRunOptions",description:"Run options (See /wordpress-playground/api/universal/interface/PHPRunOptions/))"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runWpInstallationWizard"},options:{$ref:"#/definitions/WordPressInstallationOptions"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runSql",description:"The step identifier."},sql:{$ref:"#/definitions/FileReference",description:"The SQL to run. Each non-empty line must contain a valid SQL query."}},required:["sql","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteOptions",description:'The name of the step. Must be "setSiteOptions".'},options:{type:"object",additionalProperties:{},description:"The options to set on the site."}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"unzip"},zipFile:{$ref:"#/definitions/FileReference",description:"The zip file to extract"},zipPath:{type:"string",description:"The path of the zip file to extract",deprecated:"Use zipFile instead."},extractToPath:{type:"string",description:"The path to extract the zip file to"}},required:["extractToPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"updateUserMeta"},meta:{type:"object",additionalProperties:{},description:'An object of user meta values to set, e.g. { "first_name": "John" }'},userId:{type:"number",description:"User ID"}},required:["meta","step","userId"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"writeFile"},path:{type:"string",description:"The path of the file to write to"},data:{anyOf:[{$ref:"#/definitions/FileReference"},{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"The data to write"}},required:["data","path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"writeFiles"},writeToPath:{type:"string",description:"The path of the file to write to"},filesTree:{$ref:"#/definitions/DirectoryReference",description:"The 'filesTree' defines the directory structure, supporting 'literal:directory' or 'git:directory' types. The 'name' represents the root directory, while 'files' is an object where keys are file paths, and values contain either file content as a string or nested objects for subdirectories."}},required:["filesTree","step","writeToPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"wp-cli",description:"The step identifier."},command:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"The WP CLI command to run."},wpCliPath:{type:"string",description:"wp-cli.phar path"}},required:["command","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteLanguage"},language:{type:"string",description:"The language to set, e.g. 'en_US'"}},required:["language","step"]}]},Dt={enum:["branch","tag","commit","refname"]};function ue(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.resource===void 0&&(c="resource")||r.url===void 0&&(c="url")||r.ref===void 0&&(c="ref"))return ue.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;for(const _ in r)if(!(_==="resource"||_==="url"||_==="ref"||_==="refType"||_==="path"||_===".git"))return ue.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},message:"must NOT have additional properties"}],!1;{if(r.resource!==void 0){let _=r.resource;const $=e;if(typeof _!="string")return ue.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(_!=="git:directory")return ue.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"git:directory"},message:"must be equal to constant"}],!1;var l=$===e}else var l=!0;if(l){if(r.url!==void 0){const _=e;if(typeof r.url!="string")return ue.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=_===e}else var l=!0;if(l){if(r.ref!==void 0){const _=e;if(typeof r.ref!="string")return ue.errors=[{instancePath:t+"/ref",schemaPath:"#/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=_===e}else var l=!0;if(l){if(r.refType!==void 0){let _=r.refType;const $=e;if(typeof _!="string")return ue.errors=[{instancePath:t+"/refType",schemaPath:"#/definitions/GitDirectoryRefType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(_==="branch"||_==="tag"||_==="commit"||_==="refname"))return ue.errors=[{instancePath:t+"/refType",schemaPath:"#/definitions/GitDirectoryRefType/enum",keyword:"enum",params:{allowedValues:Dt.enum},message:"must be equal to one of the allowed values"}],!1;var l=$===e}else var l=!0;if(l){if(r.path!==void 0){const _=e;if(typeof r.path!="string")return ue.errors=[{instancePath:t+"/path",schemaPath:"#/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=_===e}else var l=!0;if(l)if(r[".git"]!==void 0){const _=e;if(typeof r[".git"]!="boolean")return ue.errors=[{instancePath:t+"/.git",schemaPath:"#/properties/.git/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var l=_===e}else var l=!0}}}}}}else return ue.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ue.errors=s,e===0}const It={additionalProperties:{anyOf:[{$ref:"#/definitions/FileTree"},{type:["object","string"]}]}},dr={validate:Ne};function Ne(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r))for(const _ in r){let $=r[_];const j=e,k=e;let R=!1;const F=e;dr.validate($,{instancePath:t+"/"+_.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:_,rootData:u})||(s=s===null?dr.validate.errors:s.concat(dr.validate.errors),e=s.length);var l=F===e;if(R=R||l,!R){const v=e;if(!($&&typeof $=="object"&&!Array.isArray($))&&typeof $!="string"){const se={instancePath:t+"/"+_.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf/1/type",keyword:"type",params:{type:It.additionalProperties.anyOf[1].type},message:"must be object,string"};s===null?s=[se]:s.push(se),e++}var l=v===e;R=R||l}if(R)e=k,s!==null&&(k?s.length=k:s=null);else{const v={instancePath:t+"/"+_.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[v]:s.push(v),e++,Ne.errors=s,!1}var c=j===e;if(!c)break}else return Ne.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Ne.errors=s,e===0}function Oe(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.files===void 0&&(c="files")||r.name===void 0&&(c="name")||r.resource===void 0&&(c="resource"))return Oe.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const _=e;for(const $ in r)if(!($==="resource"||$==="files"||$==="name"))return Oe.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"}],!1;if(_===e){if(r.resource!==void 0){let $=r.resource;const j=e;if(typeof $!="string")return Oe.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if($!=="literal:directory")return Oe.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"literal:directory"},message:"must be equal to constant"}],!1;var l=j===e}else var l=!0;if(l){if(r.files!==void 0){const $=e;Ne(r.files,{instancePath:t+"/files",parentData:r,parentDataProperty:"files",rootData:u})||(s=s===null?Ne.errors:s.concat(Ne.errors),e=s.length);var l=$===e}else var l=!0;if(l)if(r.name!==void 0){const $=e;if(typeof r.name!="string")return Oe.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=$===e}else var l=!0}}}}else return Oe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Oe.errors=s,e===0}function ge(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;const l=e;let c=!1;const _=e;ue(r,{instancePath:t,parentData:n,parentDataProperty:d,rootData:u})||(s=s===null?ue.errors:s.concat(ue.errors),e=s.length);var $=_===e;if(c=c||$,!c){const j=e;Oe(r,{instancePath:t,parentData:n,parentDataProperty:d,rootData:u})||(s=s===null?Oe.errors:s.concat(Oe.errors),e=s.length);var $=j===e;c=c||$}if(c)e=l,s!==null&&(l?s.length=l:s=null);else{const j={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[j]:s.push(j),e++,ge.errors=s,!1}return ge.errors=s,e===0}const it={enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function he(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let se;if(r.url===void 0&&(se="url"))return he.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:se},message:"must have required property '"+se+"'"}],!1;{const Y=e;for(const T in r)if(!(T==="method"||T==="url"||T==="headers"||T==="body"))return he.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:T},message:"must NOT have additional properties"}],!1;if(Y===e){if(r.method!==void 0){let T=r.method;const K=e;if(typeof T!="string")return he.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(T==="GET"||T==="POST"||T==="HEAD"||T==="OPTIONS"||T==="PATCH"||T==="PUT"||T==="DELETE"))return he.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:it.enum},message:"must be equal to one of the allowed values"}],!1;var l=K===e}else var l=!0;if(l){if(r.url!==void 0){const T=e;if(typeof r.url!="string")return he.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=T===e}else var l=!0;if(l){if(r.headers!==void 0){let T=r.headers;const K=e;if(e===e)if(T&&typeof T=="object"&&!Array.isArray(T))for(const m in T){const N=e;if(typeof T[m]!="string")return he.errors=[{instancePath:t+"/headers/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=N===e;if(!c)break}else return he.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var l=K===e}else var l=!0;if(l)if(r.body!==void 0){let T=r.body;const K=e,B=e;let re=!1;const m=e;if(typeof T!="string"){const h={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[h]:s.push(h),e++}var _=m===e;if(re=re||_,!re){const h=e;if(e===h)if(T&&typeof T=="object"&&!Array.isArray(T)){let P;if(T.BYTES_PER_ELEMENT===void 0&&(P="BYTES_PER_ELEMENT")||T.buffer===void 0&&(P="buffer")||T.byteLength===void 0&&(P="byteLength")||T.byteOffset===void 0&&(P="byteOffset")||T.length===void 0&&(P="length")){const w={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:P},message:"must have required property '"+P+"'"};s===null?s=[w]:s.push(w),e++}else{const w=e;for(const y in T)if(!(y==="BYTES_PER_ELEMENT"||y==="buffer"||y==="byteLength"||y==="byteOffset"||y==="length")){let g=T[y];const q=e;if(!(typeof g=="number"&&isFinite(g))){const L={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var $=q===e;if(!$)break}if(w===e){if(T.BYTES_PER_ELEMENT!==void 0){let y=T.BYTES_PER_ELEMENT;const g=e;if(!(typeof y=="number"&&isFinite(y))){const q={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[q]:s.push(q),e++}var j=g===e}else var j=!0;if(j){if(T.buffer!==void 0){let y=T.buffer;const g=e;if(e===g)if(y&&typeof y=="object"&&!Array.isArray(y)){let L;if(y.byteLength===void 0&&(L="byteLength")){const C={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"};s===null?s=[C]:s.push(C),e++}else{const C=e;for(const S in y)if(S!=="byteLength"){const W={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:S},message:"must NOT have additional properties"};s===null?s=[W]:s.push(W),e++;break}if(C===e&&y.byteLength!==void 0){let S=y.byteLength;if(!(typeof S=="number"&&isFinite(S))){const W={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[W]:s.push(W),e++}}}}else{const L={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[L]:s.push(L),e++}var j=g===e}else var j=!0;if(j){if(T.byteLength!==void 0){let y=T.byteLength;const g=e;if(!(typeof y=="number"&&isFinite(y))){const L={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var j=g===e}else var j=!0;if(j){if(T.byteOffset!==void 0){let y=T.byteOffset;const g=e;if(!(typeof y=="number"&&isFinite(y))){const L={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var j=g===e}else var j=!0;if(j)if(T.length!==void 0){let y=T.length;const g=e;if(!(typeof y=="number"&&isFinite(y))){const L={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var j=g===e}else var j=!0}}}}}}else{const P={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[P]:s.push(P),e++}var _=h===e;if(re=re||_,!re){const P=e;if(e===P)if(T&&typeof T=="object"&&!Array.isArray(T))for(const y in T){let g=T[y];const q=e,L=e;let C=!1;const S=e;if(typeof g!="string"){const W={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}var k=S===e;if(C=C||k,!C){const W=e;if(e===W)if(g&&typeof g=="object"&&!Array.isArray(g)){let I;if(g.BYTES_PER_ELEMENT===void 0&&(I="BYTES_PER_ELEMENT")||g.buffer===void 0&&(I="buffer")||g.byteLength===void 0&&(I="byteLength")||g.byteOffset===void 0&&(I="byteOffset")||g.length===void 0&&(I="length")){const ee={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:I},message:"must have required property '"+I+"'"};s===null?s=[ee]:s.push(ee),e++}else{const ee=e;for(const A in g)if(!(A==="BYTES_PER_ELEMENT"||A==="buffer"||A==="byteLength"||A==="byteOffset"||A==="length")){let Z=g[A];const M=e;if(!(typeof Z=="number"&&isFinite(Z))){const z={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+A.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var R=M===e;if(!R)break}if(ee===e){if(g.BYTES_PER_ELEMENT!==void 0){let A=g.BYTES_PER_ELEMENT;const Z=e;if(!(typeof A=="number"&&isFinite(A))){const M={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[M]:s.push(M),e++}var F=Z===e}else var F=!0;if(F){if(g.buffer!==void 0){let A=g.buffer;const Z=e;if(e===Z)if(A&&typeof A=="object"&&!Array.isArray(A)){let z;if(A.byteLength===void 0&&(z="byteLength")){const oe={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:z},message:"must have required property '"+z+"'"};s===null?s=[oe]:s.push(oe),e++}else{const oe=e;for(const de in A)if(de!=="byteLength"){const be={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:de},message:"must NOT have additional properties"};s===null?s=[be]:s.push(be),e++;break}if(oe===e&&A.byteLength!==void 0){let de=A.byteLength;if(!(typeof de=="number"&&isFinite(de))){const be={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[be]:s.push(be),e++}}}}else{const z={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[z]:s.push(z),e++}var F=Z===e}else var F=!0;if(F){if(g.byteLength!==void 0){let A=g.byteLength;const Z=e;if(!(typeof A=="number"&&isFinite(A))){const z={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var F=Z===e}else var F=!0;if(F){if(g.byteOffset!==void 0){let A=g.byteOffset;const Z=e;if(!(typeof A=="number"&&isFinite(A))){const z={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteOffset",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var F=Z===e}else var F=!0;if(F)if(g.length!==void 0){let A=g.length;const Z=e;if(!(typeof A=="number"&&isFinite(A))){const z={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/length",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var F=Z===e}else var F=!0}}}}}}else{const I={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[I]:s.push(I),e++}var k=W===e;if(C=C||k,!C){const I=e;if(e===I)if(g&&typeof g=="object"&&!Array.isArray(g)){let A;if(g.lastModified===void 0&&(A="lastModified")||g.name===void 0&&(A="name")||g.size===void 0&&(A="size")||g.type===void 0&&(A="type")||g.webkitRelativePath===void 0&&(A="webkitRelativePath")){const Z={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/required",keyword:"required",params:{missingProperty:A},message:"must have required property '"+A+"'"};s===null?s=[Z]:s.push(Z),e++}else{const Z=e;for(const M in g)if(!(M==="size"||M==="type"||M==="lastModified"||M==="name"||M==="webkitRelativePath")){const z={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:M},message:"must NOT have additional properties"};s===null?s=[z]:s.push(z),e++;break}if(Z===e){if(g.size!==void 0){let M=g.size;const z=e;if(!(typeof M=="number"&&isFinite(M))){const oe={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/size",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[oe]:s.push(oe),e++}var v=z===e}else var v=!0;if(v){if(g.type!==void 0){const M=e;if(typeof g.type!="string"){const oe={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/type",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var v=M===e}else var v=!0;if(v){if(g.lastModified!==void 0){let M=g.lastModified;const z=e;if(!(typeof M=="number"&&isFinite(M))){const de={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/lastModified",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/lastModified/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[de]:s.push(de),e++}var v=z===e}else var v=!0;if(v){if(g.name!==void 0){const M=e;if(typeof g.name!="string"){const oe={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/name",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var v=M===e}else var v=!0;if(v)if(g.webkitRelativePath!==void 0){const M=e;if(typeof g.webkitRelativePath!="string"){const oe={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1")+"/webkitRelativePath",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/webkitRelativePath/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var v=M===e}else var v=!0}}}}}}else{const A={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[A]:s.push(A),e++}var k=I===e;C=C||k}}if(C)e=L,s!==null&&(L?s.length=L:s=null);else{const W={instancePath:t+"/body/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[W]:s.push(W),e++}var V=q===e;if(!V)break}else{const y={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[y]:s.push(y),e++}var _=P===e;re=re||_}}if(re)e=B,s!==null&&(B?s.length=B:s=null);else{const h={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[h]:s.push(h),e++,he.errors=s,!1}var l=K===e}else var l=!0}}}}}else return he.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return he.errors=s,e===0}const Wt={properties:{relativeUri:{type:"string",description:"Request path following the domain:port part – after any URL rewriting rules (e.g. apache .htaccess) have been applied."},scriptPath:{type:"string",description:"Path of the .php file to execute."},protocol:{type:"string",description:"Request protocol."},method:{$ref:"#/definitions/HTTPMethod",description:"Request method. Default: `GET`."},headers:{$ref:"#/definitions/PHPRequestHeaders",description:"Request headers."},body:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"Request body."},env:{type:"object",additionalProperties:{type:"string"},description:"Environment variables to set for this run."},$_SERVER:{type:"object",additionalProperties:{type:"string"},description:"$_SERVER entries to set for this run."},code:{type:"string",description:"The code snippet to eval instead of a php file."}}};function pe(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const F=e;for(const v in r)if(!st.call(Wt.properties,v))return pe.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"}],!1;if(F===e){if(r.relativeUri!==void 0){const v=e;if(typeof r.relativeUri!="string")return pe.errors=[{instancePath:t+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=v===e}else var l=!0;if(l){if(r.scriptPath!==void 0){const v=e;if(typeof r.scriptPath!="string")return pe.errors=[{instancePath:t+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=v===e}else var l=!0;if(l){if(r.protocol!==void 0){const v=e;if(typeof r.protocol!="string")return pe.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=v===e}else var l=!0;if(l){if(r.method!==void 0){let v=r.method;const V=e;if(typeof v!="string")return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(v==="GET"||v==="POST"||v==="HEAD"||v==="OPTIONS"||v==="PATCH"||v==="PUT"||v==="DELETE"))return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:it.enum},message:"must be equal to one of the allowed values"}],!1;var l=V===e}else var l=!0;if(l){if(r.headers!==void 0){let v=r.headers;const V=e;if(e===e)if(v&&typeof v=="object"&&!Array.isArray(v))for(const T in v){const K=e;if(typeof v[T]!="string")return pe.errors=[{instancePath:t+"/headers/"+T.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=K===e;if(!c)break}else return pe.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var l=V===e}else var l=!0;if(l){if(r.body!==void 0){let v=r.body;const V=e,se=e;let Y=!1;const T=e;if(typeof v!="string"){const B={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[B]:s.push(B),e++}var _=T===e;if(Y=Y||_,!Y){const B=e;if(e===B)if(v&&typeof v=="object"&&!Array.isArray(v)){let m;if(v.BYTES_PER_ELEMENT===void 0&&(m="BYTES_PER_ELEMENT")||v.buffer===void 0&&(m="buffer")||v.byteLength===void 0&&(m="byteLength")||v.byteOffset===void 0&&(m="byteOffset")||v.length===void 0&&(m="length")){const N={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:m},message:"must have required property '"+m+"'"};s===null?s=[N]:s.push(N),e++}else{const N=e;for(const h in v)if(!(h==="BYTES_PER_ELEMENT"||h==="buffer"||h==="byteLength"||h==="byteOffset"||h==="length")){let b=v[h];const P=e;if(!(typeof b=="number"&&isFinite(b))){const w={instancePath:t+"/body/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[w]:s.push(w),e++}var $=P===e;if(!$)break}if(N===e){if(v.BYTES_PER_ELEMENT!==void 0){let h=v.BYTES_PER_ELEMENT;const b=e;if(!(typeof h=="number"&&isFinite(h))){const P={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[P]:s.push(P),e++}var j=b===e}else var j=!0;if(j){if(v.buffer!==void 0){let h=v.buffer;const b=e;if(e===b)if(h&&typeof h=="object"&&!Array.isArray(h)){let w;if(h.byteLength===void 0&&(w="byteLength")){const y={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:w},message:"must have required property '"+w+"'"};s===null?s=[y]:s.push(y),e++}else{const y=e;for(const g in h)if(g!=="byteLength"){const q={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};s===null?s=[q]:s.push(q),e++;break}if(y===e&&h.byteLength!==void 0){let g=h.byteLength;if(!(typeof g=="number"&&isFinite(g))){const q={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[q]:s.push(q),e++}}}}else{const w={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[w]:s.push(w),e++}var j=b===e}else var j=!0;if(j){if(v.byteLength!==void 0){let h=v.byteLength;const b=e;if(!(typeof h=="number"&&isFinite(h))){const w={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[w]:s.push(w),e++}var j=b===e}else var j=!0;if(j){if(v.byteOffset!==void 0){let h=v.byteOffset;const b=e;if(!(typeof h=="number"&&isFinite(h))){const w={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[w]:s.push(w),e++}var j=b===e}else var j=!0;if(j)if(v.length!==void 0){let h=v.length;const b=e;if(!(typeof h=="number"&&isFinite(h))){const w={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[w]:s.push(w),e++}var j=b===e}else var j=!0}}}}}}else{const m={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[m]:s.push(m),e++}var _=B===e;Y=Y||_}if(Y)e=se,s!==null&&(se?s.length=se:s=null);else{const B={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[B]:s.push(B),e++,pe.errors=s,!1}var l=V===e}else var l=!0;if(l){if(r.env!==void 0){let v=r.env;const V=e;if(e===V)if(v&&typeof v=="object"&&!Array.isArray(v))for(const Y in v){const T=e;if(typeof v[Y]!="string")return pe.errors=[{instancePath:t+"/env/"+Y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=T===e;if(!k)break}else return pe.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var l=V===e}else var l=!0;if(l){if(r.$_SERVER!==void 0){let v=r.$_SERVER;const V=e;if(e===V)if(v&&typeof v=="object"&&!Array.isArray(v))for(const Y in v){const T=e;if(typeof v[Y]!="string")return pe.errors=[{instancePath:t+"/$_SERVER/"+Y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var R=T===e;if(!R)break}else return pe.errors=[{instancePath:t+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var l=V===e}else var l=!0;if(l)if(r.code!==void 0){const v=e;if(typeof r.code!="string")return pe.errors=[{instancePath:t+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=v===e}else var l=!0}}}}}}}}}else return pe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return pe.errors=s,e===0}function o(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let fr;if(r.step===void 0&&(fr="step"))return o.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:fr},message:"must have required property '"+fr+"'"}],!1;{const Q=r.step;if(typeof Q=="string")if(Q==="activatePlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.pluginPath===void 0&&(f="pluginPath")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="pluginPath"||i==="pluginName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/0/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var l=E===e}else var l=!0;if(l)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/0/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=a===e}else var l=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var c=p===e}else var c=!0;if(c){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="activatePlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/const",keyword:"const",params:{allowedValue:"activatePlugin"},message:"must be equal to constant"}],!1;var c=p===e}else var c=!0;if(c){if(r.pluginPath!==void 0){const i=e;if(typeof r.pluginPath!="string")return o.errors=[{instancePath:t+"/pluginPath",schemaPath:"#/oneOf/0/properties/pluginPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=i===e}else var c=!0;if(c)if(r.pluginName!==void 0){const i=e;if(typeof r.pluginName!="string")return o.errors=[{instancePath:t+"/pluginName",schemaPath:"#/oneOf/0/properties/pluginName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=i===e}else var c=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="activateTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.step===void 0&&(f="step")||r.themeFolderName===void 0&&(f="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/1/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var _=E===e}else var _=!0;if(_)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/1/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=a===e}else var _=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $=p===e}else var $=!0;if($){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="activateTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/const",keyword:"const",params:{allowedValue:"activateTheme"},message:"must be equal to constant"}],!1;var $=p===e}else var $=!0;if($)if(r.themeFolderName!==void 0){const i=e;if(typeof r.themeFolderName!="string")return o.errors=[{instancePath:t+"/themeFolderName",schemaPath:"#/oneOf/1/properties/themeFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var $=i===e}else var $=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="cp"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.fromPath===void 0&&(f="fromPath")||r.step===void 0&&(f="step")||r.toPath===void 0&&(f="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="fromPath"||i==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/2/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var j=E===e}else var j=!0;if(j)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/2/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var j=a===e}else var j=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var k=p===e}else var k=!0;if(k){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="cp")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/const",keyword:"const",params:{allowedValue:"cp"},message:"must be equal to constant"}],!1;var k=p===e}else var k=!0;if(k){if(r.fromPath!==void 0){const i=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/2/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=i===e}else var k=!0;if(k)if(r.toPath!==void 0){const i=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/2/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=i===e}else var k=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="defineWpConfigConsts"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.consts===void 0&&(f="consts")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="consts"||i==="method"||i==="virtualize"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/3/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var R=E===e}else var R=!0;if(R)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/3/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var R=a===e}else var R=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var F=p===e}else var F=!0;if(F){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="defineWpConfigConsts")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/const",keyword:"const",params:{allowedValue:"defineWpConfigConsts"},message:"must be equal to constant"}],!1;var F=p===e}else var F=!0;if(F){if(r.consts!==void 0){let i=r.consts;const p=e;if(e===p&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/consts",schemaPath:"#/oneOf/3/properties/consts/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var F=p===e}else var F=!0;if(F){if(r.method!==void 0){let i=r.method;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="rewrite-wp-config"||i==="define-before-run"))return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/enum",keyword:"enum",params:{allowedValues:tr.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var F=p===e}else var F=!0;if(F)if(r.virtualize!==void 0){const i=e;if(typeof r.virtualize!="boolean")return o.errors=[{instancePath:t+"/virtualize",schemaPath:"#/oneOf/3/properties/virtualize/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var F=i===e}else var F=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="defineSiteUrl"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.siteUrl===void 0&&(f="siteUrl")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="siteUrl"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/4/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var v=E===e}else var v=!0;if(v)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/4/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var v=a===e}else var v=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var V=p===e}else var V=!0;if(V){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="defineSiteUrl")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/const",keyword:"const",params:{allowedValue:"defineSiteUrl"},message:"must be equal to constant"}],!1;var V=p===e}else var V=!0;if(V)if(r.siteUrl!==void 0){const i=e;if(typeof r.siteUrl!="string")return o.errors=[{instancePath:t+"/siteUrl",schemaPath:"#/oneOf/4/properties/siteUrl/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var V=i===e}else var V=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="enableMultisite"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="wpCliPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/5/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var se=E===e}else var se=!0;if(se)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/5/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var se=a===e}else var se=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Y=p===e}else var Y=!0;if(Y){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="enableMultisite")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/const",keyword:"const",params:{allowedValue:"enableMultisite"},message:"must be equal to constant"}],!1;var Y=p===e}else var Y=!0;if(Y)if(r.wpCliPath!==void 0){const i=e;if(typeof r.wpCliPath!="string")return o.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/5/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Y=i===e}else var Y=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="importWxr"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.file===void 0&&(f="file")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="file"||i==="importer"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/6/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var T=E===e}else var T=!0;if(T)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/6/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var T=a===e}else var T=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var K=p===e}else var K=!0;if(K){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importWxr")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/const",keyword:"const",params:{allowedValue:"importWxr"},message:"must be equal to constant"}],!1;var K=p===e}else var K=!0;if(K){if(r.file!==void 0){const i=e;X(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:u})||(s=s===null?X.errors:s.concat(X.errors),e=s.length);var K=i===e}else var K=!0;if(K)if(r.importer!==void 0){let i=r.importer;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/importer",schemaPath:"#/oneOf/6/properties/importer/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="data-liberation"||i==="default"))return o.errors=[{instancePath:t+"/importer",schemaPath:"#/oneOf/6/properties/importer/enum",keyword:"enum",params:{allowedValues:tr.oneOf[6].properties.importer.enum},message:"must be equal to one of the allowed values"}],!1;var K=p===e}else var K=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="importThemeStarterContent"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="themeSlug"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/7/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var B=E===e}else var B=!0;if(B)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/7/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var B=a===e}else var B=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var re=p===e}else var re=!0;if(re){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importThemeStarterContent")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/const",keyword:"const",params:{allowedValue:"importThemeStarterContent"},message:"must be equal to constant"}],!1;var re=p===e}else var re=!0;if(re)if(r.themeSlug!==void 0){const i=e;if(typeof r.themeSlug!="string")return o.errors=[{instancePath:t+"/themeSlug",schemaPath:"#/oneOf/7/properties/themeSlug/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var re=i===e}else var re=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="importWordPressFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.step===void 0&&(f="step")||r.wordPressFilesZip===void 0&&(f="wordPressFilesZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="wordPressFilesZip"||i==="pathInZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/8/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var m=E===e}else var m=!0;if(m)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/8/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=a===e}else var m=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var N=p===e}else var N=!0;if(N){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importWordPressFiles")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/const",keyword:"const",params:{allowedValue:"importWordPressFiles"},message:"must be equal to constant"}],!1;var N=p===e}else var N=!0;if(N){if(r.wordPressFilesZip!==void 0){const i=e;X(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:u})||(s=s===null?X.errors:s.concat(X.errors),e=s.length);var N=i===e}else var N=!0;if(N)if(r.pathInZip!==void 0){const i=e;if(typeof r.pathInZip!="string")return o.errors=[{instancePath:t+"/pathInZip",schemaPath:"#/oneOf/8/properties/pathInZip/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=i===e}else var N=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="installPlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.pluginData===void 0&&(f="pluginData")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="ifAlreadyInstalled"||i==="step"||i==="pluginData"||i==="pluginZipFile"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/9/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var h=E===e}else var h=!0;if(h)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/9/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=a===e}else var h=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var b=p===e}else var b=!0;if(b){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="overwrite"||i==="skip"||i==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:tr.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var b=p===e}else var b=!0;if(b){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="installPlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/const",keyword:"const",params:{allowedValue:"installPlugin"},message:"must be equal to constant"}],!1;var b=p===e}else var b=!0;if(b){if(r.pluginData!==void 0){let i=r.pluginData;const p=e,O=e;let a=!1;const E=e;X(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:u})||(s=s===null?X.errors:s.concat(X.errors),e=s.length);var P=E===e;if(a=a||P,!a){const J=e;ge(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:u})||(s=s===null?ge.errors:s.concat(ge.errors),e=s.length);var P=J===e;a=a||P}if(a)e=O,s!==null&&(O?s.length=O:s=null);else{const J={instancePath:t+"/pluginData",schemaPath:"#/oneOf/9/properties/pluginData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[J]:s.push(J),e++,o.errors=s,!1}var b=p===e}else var b=!0;if(b){if(r.pluginZipFile!==void 0){const i=e;X(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:u})||(s=s===null?X.errors:s.concat(X.errors),e=s.length);var b=i===e}else var b=!0;if(b)if(r.options!==void 0){let i=r.options;const p=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const E=e;for(const ie in i)if(!(ie==="activate"||ie==="targetFolderName"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(E===e){if(i.activate!==void 0){const ie=e;if(typeof i.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/definitions/InstallPluginOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var w=ie===e}else var w=!0;if(w)if(i.targetFolderName!==void 0){const ie=e;if(typeof i.targetFolderName!="string")return o.errors=[{instancePath:t+"/options/targetFolderName",schemaPath:"#/definitions/InstallPluginOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=ie===e}else var w=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var b=p===e}else var b=!0}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="installTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.step===void 0&&(f="step")||r.themeData===void 0&&(f="themeData"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="ifAlreadyInstalled"||i==="step"||i==="themeData"||i==="themeZipFile"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/10/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var y=E===e}else var y=!0;if(y)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/10/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=a===e}else var y=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var g=p===e}else var g=!0;if(g){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="overwrite"||i==="skip"||i==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:tr.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var g=p===e}else var g=!0;if(g){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="installTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/const",keyword:"const",params:{allowedValue:"installTheme"},message:"must be equal to constant"}],!1;var g=p===e}else var g=!0;if(g){if(r.themeData!==void 0){let i=r.themeData;const p=e,O=e;let a=!1;const E=e;X(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:u})||(s=s===null?X.errors:s.concat(X.errors),e=s.length);var q=E===e;if(a=a||q,!a){const J=e;ge(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:u})||(s=s===null?ge.errors:s.concat(ge.errors),e=s.length);var q=J===e;a=a||q}if(a)e=O,s!==null&&(O?s.length=O:s=null);else{const J={instancePath:t+"/themeData",schemaPath:"#/oneOf/10/properties/themeData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[J]:s.push(J),e++,o.errors=s,!1}var g=p===e}else var g=!0;if(g){if(r.themeZipFile!==void 0){const i=e;X(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:u})||(s=s===null?X.errors:s.concat(X.errors),e=s.length);var g=i===e}else var g=!0;if(g)if(r.options!==void 0){let i=r.options;const p=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const E=e;for(const ie in i)if(!(ie==="activate"||ie==="importStarterContent"||ie==="targetFolderName"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(E===e){if(i.activate!==void 0){const ie=e;if(typeof i.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/definitions/InstallThemeOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var L=ie===e}else var L=!0;if(L){if(i.importStarterContent!==void 0){const ie=e;if(typeof i.importStarterContent!="boolean")return o.errors=[{instancePath:t+"/options/importStarterContent",schemaPath:"#/definitions/InstallThemeOptions/properties/importStarterContent/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var L=ie===e}else var L=!0;if(L)if(i.targetFolderName!==void 0){const ie=e;if(typeof i.targetFolderName!="string")return o.errors=[{instancePath:t+"/options/targetFolderName",schemaPath:"#/definitions/InstallThemeOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var L=ie===e}else var L=!0}}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var g=p===e}else var g=!0}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="login"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="username"||i==="password"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/11/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var C=E===e}else var C=!0;if(C)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/11/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var C=a===e}else var C=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var S=p===e}else var S=!0;if(S){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="login")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/const",keyword:"const",params:{allowedValue:"login"},message:"must be equal to constant"}],!1;var S=p===e}else var S=!0;if(S){if(r.username!==void 0){const i=e;if(typeof r.username!="string")return o.errors=[{instancePath:t+"/username",schemaPath:"#/oneOf/11/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var S=i===e}else var S=!0;if(S)if(r.password!==void 0){const i=e;if(typeof r.password!="string")return o.errors=[{instancePath:t+"/password",schemaPath:"#/oneOf/11/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var S=i===e}else var S=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="mkdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.path===void 0&&(f="path")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/12/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var W=E===e}else var W=!0;if(W)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/12/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var W=a===e}else var W=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var D=p===e}else var D=!0;if(D){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="mkdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/const",keyword:"const",params:{allowedValue:"mkdir"},message:"must be equal to constant"}],!1;var D=p===e}else var D=!0;if(D)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/12/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var D=i===e}else var D=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="mv"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.fromPath===void 0&&(f="fromPath")||r.step===void 0&&(f="step")||r.toPath===void 0&&(f="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="fromPath"||i==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/13/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var I=E===e}else var I=!0;if(I)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/13/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var I=a===e}else var I=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ee=p===e}else var ee=!0;if(ee){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="mv")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/const",keyword:"const",params:{allowedValue:"mv"},message:"must be equal to constant"}],!1;var ee=p===e}else var ee=!0;if(ee){if(r.fromPath!==void 0){const i=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/13/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ee=i===e}else var ee=!0;if(ee)if(r.toPath!==void 0){const i=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/13/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ee=i===e}else var ee=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="resetData"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/14/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var A=E===e}else var A=!0;if(A)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/14/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var A=a===e}else var A=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Z=p===e}else var Z=!0;if(Z)if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="resetData")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/const",keyword:"const",params:{allowedValue:"resetData"},message:"must be equal to constant"}],!1;var Z=p===e}else var Z=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="request"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.request===void 0&&(f="request")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="request"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/15/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var M=E===e}else var M=!0;if(M)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/15/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var M=a===e}else var M=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var z=p===e}else var z=!0;if(z){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="request")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/const",keyword:"const",params:{allowedValue:"request"},message:"must be equal to constant"}],!1;var z=p===e}else var z=!0;if(z)if(r.request!==void 0){const i=e;he(r.request,{instancePath:t+"/request",parentData:r,parentDataProperty:"request",rootData:u})||(s=s===null?he.errors:s.concat(he.errors),e=s.length);var z=i===e}else var z=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="rm"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.path===void 0&&(f="path")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/16/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var oe=E===e}else var oe=!0;if(oe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/16/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var oe=a===e}else var oe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var de=p===e}else var de=!0;if(de){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="rm")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/const",keyword:"const",params:{allowedValue:"rm"},message:"must be equal to constant"}],!1;var de=p===e}else var de=!0;if(de)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/16/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var de=i===e}else var de=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="rmdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.path===void 0&&(f="path")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/17/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var be=E===e}else var be=!0;if(be)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/17/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var be=a===e}else var be=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var qe=p===e}else var qe=!0;if(qe){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="rmdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/const",keyword:"const",params:{allowedValue:"rmdir"},message:"must be equal to constant"}],!1;var qe=p===e}else var qe=!0;if(qe)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/17/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var qe=i===e}else var qe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="runPHP"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.code===void 0&&(f="code")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="code"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/18/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ue=E===e}else var Ue=!0;if(Ue)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/18/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ue=a===e}else var Ue=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $e=p===e}else var $e=!0;if($e){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runPHP")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/const",keyword:"const",params:{allowedValue:"runPHP"},message:"must be equal to constant"}],!1;var $e=p===e}else var $e=!0;if($e)if(r.code!==void 0){let i=r.code;const p=e,O=e;let a=!1;const E=e;if(typeof i!="string"){const J={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[J]:s.push(J),e++}var pr=E===e;if(a=a||pr,!a){const J=e;if(e===J)if(i&&typeof i=="object"&&!Array.isArray(i)){let le;if(i.filename===void 0&&(le="filename")||i.content===void 0&&(le="content")){const je={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/required",keyword:"required",params:{missingProperty:le},message:"must have required property '"+le+"'"};s===null?s=[je]:s.push(je),e++}else{const je=e;for(const ne in i)if(!(ne==="filename"||ne==="content")){const ke={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ne},message:"must NOT have additional properties"};s===null?s=[ke]:s.push(ke),e++;break}if(je===e){if(i.filename!==void 0){const ne=e;if(typeof i.filename!="string"){const ke={instancePath:t+"/code/filename",schemaPath:"#/oneOf/18/properties/code/anyOf/1/properties/filename/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[ke]:s.push(ke),e++}var Be=ne===e}else var Be=!0;if(Be)if(i.content!==void 0){const ne=e;if(typeof i.content!="string"){const G={instancePath:t+"/code/content",schemaPath:"#/oneOf/18/properties/code/anyOf/1/properties/content/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[G]:s.push(G),e++}var Be=ne===e}else var Be=!0}}}else{const le={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[le]:s.push(le),e++}var pr=J===e;a=a||pr}if(a)e=O,s!==null&&(O?s.length=O:s=null);else{const J={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[J]:s.push(J),e++,o.errors=s,!1}var $e=p===e}else var $e=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="runPHPWithOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.options===void 0&&(f="options")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/19/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ve=E===e}else var Ve=!0;if(Ve)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/19/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ve=a===e}else var Ve=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=p===e}else var Ae=!0;if(Ae){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runPHPWithOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/const",keyword:"const",params:{allowedValue:"runPHPWithOptions"},message:"must be equal to constant"}],!1;var Ae=p===e}else var Ae=!0;if(Ae)if(r.options!==void 0){const i=e;pe(r.options,{instancePath:t+"/options",parentData:r,parentDataProperty:"options",rootData:u})||(s=s===null?pe.errors:s.concat(pe.errors),e=s.length);var Ae=i===e}else var Ae=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="runWpInstallationWizard"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.options===void 0&&(f="options")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/20/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Me=E===e}else var Me=!0;if(Me)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/20/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Me=a===e}else var Me=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Re=p===e}else var Re=!0;if(Re){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runWpInstallationWizard")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/const",keyword:"const",params:{allowedValue:"runWpInstallationWizard"},message:"must be equal to constant"}],!1;var Re=p===e}else var Re=!0;if(Re)if(r.options!==void 0){let i=r.options;const p=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const E=e;for(const ie in i)if(!(ie==="adminUsername"||ie==="adminPassword"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(E===e){if(i.adminUsername!==void 0){const ie=e;if(typeof i.adminUsername!="string")return o.errors=[{instancePath:t+"/options/adminUsername",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminUsername/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ze=ie===e}else var ze=!0;if(ze)if(i.adminPassword!==void 0){const ie=e;if(typeof i.adminPassword!="string")return o.errors=[{instancePath:t+"/options/adminPassword",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminPassword/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ze=ie===e}else var ze=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Re=p===e}else var Re=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="runSql"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.sql===void 0&&(f="sql")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="sql"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/21/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var He=E===e}else var He=!0;if(He)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/21/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var He=a===e}else var He=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Fe=p===e}else var Fe=!0;if(Fe){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runSql")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/const",keyword:"const",params:{allowedValue:"runSql"},message:"must be equal to constant"}],!1;var Fe=p===e}else var Fe=!0;if(Fe)if(r.sql!==void 0){const i=e;X(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:u})||(s=s===null?X.errors:s.concat(X.errors),e=s.length);var Fe=i===e}else var Fe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="setSiteOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.options===void 0&&(f="options")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/22/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ze=E===e}else var Ze=!0;if(Ze)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/22/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ze=a===e}else var Ze=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Le=p===e}else var Le=!0;if(Le){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="setSiteOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/const",keyword:"const",params:{allowedValue:"setSiteOptions"},message:"must be equal to constant"}],!1;var Le=p===e}else var Le=!0;if(Le)if(r.options!==void 0){let i=r.options;const p=e;if(e===p&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/22/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Le=p===e}else var Le=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="unzip"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.extractToPath===void 0&&(f="extractToPath")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="zipFile"||i==="zipPath"||i==="extractToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/23/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ye=E===e}else var Ye=!0;if(Ye)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/23/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ye=a===e}else var Ye=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ce=p===e}else var ce=!0;if(ce){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="unzip")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/const",keyword:"const",params:{allowedValue:"unzip"},message:"must be equal to constant"}],!1;var ce=p===e}else var ce=!0;if(ce){if(r.zipFile!==void 0){const i=e;X(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:u})||(s=s===null?X.errors:s.concat(X.errors),e=s.length);var ce=i===e}else var ce=!0;if(ce){if(r.zipPath!==void 0){const i=e;if(typeof r.zipPath!="string")return o.errors=[{instancePath:t+"/zipPath",schemaPath:"#/oneOf/23/properties/zipPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ce=i===e}else var ce=!0;if(ce)if(r.extractToPath!==void 0){const i=e;if(typeof r.extractToPath!="string")return o.errors=[{instancePath:t+"/extractToPath",schemaPath:"#/oneOf/23/properties/extractToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ce=i===e}else var ce=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="updateUserMeta"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.meta===void 0&&(f="meta")||r.step===void 0&&(f="step")||r.userId===void 0&&(f="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="meta"||i==="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/24/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ge=E===e}else var Ge=!0;if(Ge)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/24/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ge=a===e}else var Ge=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var we=p===e}else var we=!0;if(we){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="updateUserMeta")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/const",keyword:"const",params:{allowedValue:"updateUserMeta"},message:"must be equal to constant"}],!1;var we=p===e}else var we=!0;if(we){if(r.meta!==void 0){let i=r.meta;const p=e;if(e===p&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/meta",schemaPath:"#/oneOf/24/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var we=p===e}else var we=!0;if(we)if(r.userId!==void 0){let i=r.userId;const p=e;if(!(typeof i=="number"&&isFinite(i)))return o.errors=[{instancePath:t+"/userId",schemaPath:"#/oneOf/24/properties/userId/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var we=p===e}else var we=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="writeFile"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.data===void 0&&(f="data")||r.path===void 0&&(f="path")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"||i==="data"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/25/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Qe=E===e}else var Qe=!0;if(Qe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/25/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Qe=a===e}else var Qe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ve=p===e}else var ve=!0;if(ve){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="writeFile")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/const",keyword:"const",params:{allowedValue:"writeFile"},message:"must be equal to constant"}],!1;var ve=p===e}else var ve=!0;if(ve){if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/25/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ve=i===e}else var ve=!0;if(ve)if(r.data!==void 0){let i=r.data;const p=e,O=e;let a=!1;const E=e;X(i,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:u})||(s=s===null?X.errors:s.concat(X.errors),e=s.length);var xe=E===e;if(a=a||xe,!a){const J=e;if(typeof i!="string"){const le={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[le]:s.push(le),e++}var xe=J===e;if(a=a||xe,!a){const le=e;if(e===le)if(i&&typeof i=="object"&&!Array.isArray(i)){let ne;if(i.BYTES_PER_ELEMENT===void 0&&(ne="BYTES_PER_ELEMENT")||i.buffer===void 0&&(ne="buffer")||i.byteLength===void 0&&(ne="byteLength")||i.byteOffset===void 0&&(ne="byteOffset")||i.length===void 0&&(ne="length")){const ke={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:ne},message:"must have required property '"+ne+"'"};s===null?s=[ke]:s.push(ke),e++}else{const ke=e;for(const G in i)if(!(G==="BYTES_PER_ELEMENT"||G==="buffer"||G==="byteLength"||G==="byteOffset"||G==="length")){let ye=i[G];const er=e;if(!(typeof ye=="number"&&isFinite(ye))){const fe={instancePath:t+"/data/"+G.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/oneOf/25/properties/data/anyOf/2/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var pt=er===e;if(!pt)break}if(ke===e){if(i.BYTES_PER_ELEMENT!==void 0){let G=i.BYTES_PER_ELEMENT;const ye=e;if(!(typeof G=="number"&&isFinite(G))){const er={instancePath:t+"/data/BYTES_PER_ELEMENT",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[er]:s.push(er),e++}var me=ye===e}else var me=!0;if(me){if(i.buffer!==void 0){let G=i.buffer;const ye=e;if(e===ye)if(G&&typeof G=="object"&&!Array.isArray(G)){let fe;if(G.byteLength===void 0&&(fe="byteLength")){const rr={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:fe},message:"must have required property '"+fe+"'"};s===null?s=[rr]:s.push(rr),e++}else{const rr=e;for(const Ce in G)if(Ce!=="byteLength"){const De={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Ce},message:"must NOT have additional properties"};s===null?s=[De]:s.push(De),e++;break}if(rr===e&&G.byteLength!==void 0){let Ce=G.byteLength;if(!(typeof Ce=="number"&&isFinite(Ce))){const De={instancePath:t+"/data/buffer/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[De]:s.push(De),e++}}}}else{const fe={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[fe]:s.push(fe),e++}var me=ye===e}else var me=!0;if(me){if(i.byteLength!==void 0){let G=i.byteLength;const ye=e;if(!(typeof G=="number"&&isFinite(G))){const fe={instancePath:t+"/data/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var me=ye===e}else var me=!0;if(me){if(i.byteOffset!==void 0){let G=i.byteOffset;const ye=e;if(!(typeof G=="number"&&isFinite(G))){const fe={instancePath:t+"/data/byteOffset",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var me=ye===e}else var me=!0;if(me)if(i.length!==void 0){let G=i.length;const ye=e;if(!(typeof G=="number"&&isFinite(G))){const fe={instancePath:t+"/data/length",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var me=ye===e}else var me=!0}}}}}}else{const ne={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[ne]:s.push(ne),e++}var xe=le===e;a=a||xe}}if(a)e=O,s!==null&&(O?s.length=O:s=null);else{const J={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[J]:s.push(J),e++,o.errors=s,!1}var ve=p===e}else var ve=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="writeFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.filesTree===void 0&&(f="filesTree")||r.step===void 0&&(f="step")||r.writeToPath===void 0&&(f="writeToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="writeToPath"||i==="filesTree"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/26/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Je=E===e}else var Je=!0;if(Je)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/26/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Je=a===e}else var Je=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Pe=p===e}else var Pe=!0;if(Pe){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="writeFiles")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/const",keyword:"const",params:{allowedValue:"writeFiles"},message:"must be equal to constant"}],!1;var Pe=p===e}else var Pe=!0;if(Pe){if(r.writeToPath!==void 0){const i=e;if(typeof r.writeToPath!="string")return o.errors=[{instancePath:t+"/writeToPath",schemaPath:"#/oneOf/26/properties/writeToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Pe=i===e}else var Pe=!0;if(Pe)if(r.filesTree!==void 0){const i=e;ge(r.filesTree,{instancePath:t+"/filesTree",parentData:r,parentDataProperty:"filesTree",rootData:u})||(s=s===null?ge.errors:s.concat(ge.errors),e=s.length);var Pe=i===e}else var Pe=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="wp-cli"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.command===void 0&&(f="command")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="command"||i==="wpCliPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/27/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Xe=E===e}else var Xe=!0;if(Xe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/27/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Xe=a===e}else var Xe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _e=p===e}else var _e=!0;if(_e){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="wp-cli")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var _e=p===e}else var _e=!0;if(_e){if(r.command!==void 0){let i=r.command;const p=e,O=e;let a=!1;const E=e;if(typeof i!="string"){const J={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[J]:s.push(J),e++}var lr=E===e;if(a=a||lr,!a){const J=e;if(e===J)if(Array.isArray(i)){var jr=!0;const le=i.length;for(let je=0;je<le;je++){const ne=e;if(typeof i[je]!="string"){const G={instancePath:t+"/command/"+je,schemaPath:"#/oneOf/27/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[G]:s.push(G),e++}var jr=ne===e;if(!jr)break}}else{const le={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};s===null?s=[le]:s.push(le),e++}var lr=J===e;a=a||lr}if(a)e=O,s!==null&&(O?s.length=O:s=null);else{const J={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[J]:s.push(J),e++,o.errors=s,!1}var _e=p===e}else var _e=!0;if(_e)if(r.wpCliPath!==void 0){const i=e;if(typeof r.wpCliPath!="string")return o.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/27/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _e=i===e}else var _e=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Q==="setSiteLanguage"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let f;if(r.language===void 0&&(f="language")||r.step===void 0&&(f="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/required",keyword:"required",params:{missingProperty:f},message:"must have required property '"+f+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="language"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const p=e;if(e===p)if(i&&typeof i=="object"&&!Array.isArray(i)){const O=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/28/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(O===e){if(i.weight!==void 0){let a=i.weight;const E=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/28/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ke=E===e}else var Ke=!0;if(Ke)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/28/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ke=a===e}else var Ke=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/28/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Se=p===e}else var Se=!0;if(Se){if(r.step!==void 0){let i=r.step;const p=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/28/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="setSiteLanguage")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/28/properties/step/const",keyword:"const",params:{allowedValue:"setSiteLanguage"},message:"must be equal to constant"}],!1;var Se=p===e}else var Se=!0;if(Se)if(r.language!==void 0){const i=e;if(typeof r.language!="string")return o.errors=[{instancePath:t+"/language",schemaPath:"#/oneOf/28/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Se=i===e}else var Se=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"mapping",tag:"step",tagValue:Q},message:'value of tag "step" must be in oneOf'}],!1;else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"tag",tag:"step",tagValue:Q},message:'tag "step" must be string'}],!1}}else return o.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return o.errors=s,e===0}function H(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const re=e;for(const m in r)if(!st.call(Nt.properties,m))return H.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(re===e){if(r.landingPage!==void 0){const m=e;if(typeof r.landingPage!="string")return H.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=m===e}else var l=!0;if(l){if(r.description!==void 0){const m=e;if(typeof r.description!="string")return H.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=m===e}else var l=!0;if(l){if(r.meta!==void 0){let m=r.meta;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){let b;if(m.title===void 0&&(b="title")||m.author===void 0&&(b="author"))return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:b},message:"must have required property '"+b+"'"}],!1;{const P=e;for(const w in m)if(!(w==="title"||w==="description"||w==="author"||w==="categories"))return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"}],!1;if(P===e){if(m.title!==void 0){const w=e;if(typeof m.title!="string")return H.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=w===e}else var c=!0;if(c){if(m.description!==void 0){const w=e;if(typeof m.description!="string")return H.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=w===e}else var c=!0;if(c){if(m.author!==void 0){const w=e;if(typeof m.author!="string")return H.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=w===e}else var c=!0;if(c)if(m.categories!==void 0){let w=m.categories;const y=e;if(e===y)if(Array.isArray(w)){var _=!0;const q=w.length;for(let L=0;L<q;L++){const C=e;if(typeof w[L]!="string")return H.errors=[{instancePath:t+"/meta/categories/"+L,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=C===e;if(!_)break}}else return H.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var c=y===e}else var c=!0}}}}}else return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var l=N===e}else var l=!0;if(l){if(r.preferredVersions!==void 0){let m=r.preferredVersions;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){let b;if(m.php===void 0&&(b="php")||m.wp===void 0&&(b="wp"))return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:b},message:"must have required property '"+b+"'"}],!1;{const P=e;for(const w in m)if(!(w==="php"||w==="wp"))return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"}],!1;if(P===e){if(m.php!==void 0){let w=m.php;const y=e,g=e;let q=!1;const L=e;if(typeof w!="string"){const C={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[C]:s.push(C),e++}if(!(w==="8.4"||w==="8.3"||w==="8.2"||w==="8.1"||w==="8.0"||w==="7.4"||w==="7.3"||w==="7.2")){const C={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:xt.enum},message:"must be equal to one of the allowed values"};s===null?s=[C]:s.push(C),e++}var $=L===e;if(q=q||$,!q){const C=e;if(typeof w!="string"){const W={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}if(w!=="latest"){const W={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};s===null?s=[W]:s.push(W),e++}var $=C===e;q=q||$}if(q)e=g,s!==null&&(g?s.length=g:s=null);else{const C={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[C]:s.push(C),e++,H.errors=s,!1}var j=y===e}else var j=!0;if(j)if(m.wp!==void 0){const w=e;if(typeof m.wp!="string")return H.errors=[{instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var j=w===e}else var j=!0}}}else return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var l=N===e}else var l=!0;if(l){if(r.features!==void 0){let m=r.features;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){const b=e;for(const P in m)if(!(P==="intl"||P==="networking"))return H.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(b===e){if(m.intl!==void 0){const P=e;if(typeof m.intl!="boolean")return H.errors=[{instancePath:t+"/features/intl",schemaPath:"#/properties/features/properties/intl/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var k=P===e}else var k=!0;if(k)if(m.networking!==void 0){const P=e;if(typeof m.networking!="boolean")return H.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var k=P===e}else var k=!0}}else return H.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var l=N===e}else var l=!0;if(l){if(r.extraLibraries!==void 0){let m=r.extraLibraries;const N=e;if(e===N)if(Array.isArray(m)){var R=!0;const b=m.length;for(let P=0;P<b;P++){let w=m[P];const y=e;if(typeof w!="string")return H.errors=[{instancePath:t+"/extraLibraries/"+P,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(w!=="wp-cli")return H.errors=[{instancePath:t+"/extraLibraries/"+P,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var R=y===e;if(!R)break}}else return H.errors=[{instancePath:t+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var l=N===e}else var l=!0;if(l){if(r.constants!==void 0){let m=r.constants;const N=e;if(e===e)if(m&&typeof m=="object"&&!Array.isArray(m))for(const P in m){let w=m[P];const y=e;if(typeof w!="string"&&typeof w!="boolean"&&!(typeof w=="number"&&isFinite(w)))return H.errors=[{instancePath:t+"/constants/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPConstants/additionalProperties/type",keyword:"type",params:{type:Ct.additionalProperties.type},message:"must be string,boolean,number"}],!1;var F=y===e;if(!F)break}else return H.errors=[{instancePath:t+"/constants",schemaPath:"#/definitions/PHPConstants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var l=N===e}else var l=!0;if(l){if(r.plugins!==void 0){let m=r.plugins;const N=e;if(e===N)if(Array.isArray(m)){var v=!0;const b=m.length;for(let P=0;P<b;P++){let w=m[P];const y=e,g=e;let q=!1;const L=e;if(typeof w!="string"){const S={instancePath:t+"/plugins/"+P,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[S]:s.push(S),e++}var V=L===e;if(q=q||V,!q){const S=e;X(w,{instancePath:t+"/plugins/"+P,parentData:m,parentDataProperty:P,rootData:u})||(s=s===null?X.errors:s.concat(X.errors),e=s.length);var V=S===e;q=q||V}if(q)e=g,s!==null&&(g?s.length=g:s=null);else{const S={instancePath:t+"/plugins/"+P,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[S]:s.push(S),e++,H.errors=s,!1}var v=y===e;if(!v)break}}else return H.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var l=N===e}else var l=!0;if(l){if(r.siteOptions!==void 0){let m=r.siteOptions;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){const b=e;for(const P in m)if(P!=="blogname"){const w=e;if(typeof m[P]!="string")return H.errors=[{instancePath:t+"/siteOptions/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var se=w===e;if(!se)break}if(b===e&&m.blogname!==void 0&&typeof m.blogname!="string")return H.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return H.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var l=N===e}else var l=!0;if(l){if(r.login!==void 0){let m=r.login;const N=e,h=e;let b=!1;const P=e;if(typeof m!="boolean"){const y={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[y]:s.push(y),e++}var Y=P===e;if(b=b||Y,!b){const y=e;if(e===y)if(m&&typeof m=="object"&&!Array.isArray(m)){let q;if(m.username===void 0&&(q="username")||m.password===void 0&&(q="password")){const L={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:q},message:"must have required property '"+q+"'"};s===null?s=[L]:s.push(L),e++}else{const L=e;for(const C in m)if(!(C==="username"||C==="password")){const S={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:C},message:"must NOT have additional properties"};s===null?s=[S]:s.push(S),e++;break}if(L===e){if(m.username!==void 0){const C=e;if(typeof m.username!="string"){const S={instancePath:t+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[S]:s.push(S),e++}var T=C===e}else var T=!0;if(T)if(m.password!==void 0){const C=e;if(typeof m.password!="string"){const W={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}var T=C===e}else var T=!0}}}else{const q={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[q]:s.push(q),e++}var Y=y===e;b=b||Y}if(b)e=h,s!==null&&(h?s.length=h:s=null);else{const y={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[y]:s.push(y),e++,H.errors=s,!1}var l=N===e}else var l=!0;if(l){if(r.steps!==void 0){let m=r.steps;const N=e;if(e===N)if(Array.isArray(m)){var K=!0;const b=m.length;for(let P=0;P<b;P++){let w=m[P];const y=e,g=e;let q=!1;const L=e;o(w,{instancePath:t+"/steps/"+P,parentData:m,parentDataProperty:P,rootData:u})||(s=s===null?o.errors:s.concat(o.errors),e=s.length);var B=L===e;if(q=q||B,!q){const S=e;if(typeof w!="string"){const D={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[D]:s.push(D),e++}var B=S===e;if(q=q||B,!q){const D=e,I={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};s===null?s=[I]:s.push(I),e++;var B=D===e;if(q=q||B,!q){const A=e;if(typeof w!="boolean"){const M={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[M]:s.push(M),e++}if(w!==!1){const M={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};s===null?s=[M]:s.push(M),e++}var B=A===e;if(q=q||B,!q){const M=e;if(w!==null){const oe={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};s===null?s=[oe]:s.push(oe),e++}var B=M===e;q=q||B}}}}if(q)e=g,s!==null&&(g?s.length=g:s=null);else{const S={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[S]:s.push(S),e++,H.errors=s,!1}var K=y===e;if(!K)break}}else return H.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var l=N===e}else var l=!0;if(l)if(r.$schema!==void 0){const m=e;if(typeof r.$schema!="string")return H.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var l=m===e}else var l=!0}}}}}}}}}}}}else return H.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return H.errors=s,e===0}function sr(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;return H(r,{instancePath:t,parentData:n,parentDataProperty:d,rootData:u})||(s=s===null?H.errors:s.concat(H.errors),e=s.length),sr.errors=s,e===0}const{wpCLI:Ut,...qr}=St,Bt={...qr,"wp-cli":Ut,importFile:qr.importWxr};async function Or(r,t={}){const n={...t};let d;return Tr(r)?(d=await ot(r),n.streamBundledFile=function(...u){return r.read(...u)}):d=r,Vt(d,n)}function Tr(r){return r&&"read"in r&&typeof r.read=="function"}async function ot(r){if(!Tr(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}function Vt(r,{progress:t=new ur.ProgressTracker,semaphore:n=new U.Semaphore({concurrency:3}),onStepCompleted:d=()=>{},onBlueprintValidated:u=()=>{},corsProxy:s,streamBundledFile:e,additionalSteps:l}={}){var v,V,se,Y,T,K,B,re,m,N;r=structuredClone(r),r={...r,steps:(r.steps||[]).filter(Ht).filter(Zt)},r.steps=[...r.steps||[],...l||[]];for(const h of r.steps)!h||typeof h!="object"||(h.step==="importFile"?(h.step="importWxr",ae.logger.warn('The "importFile" step is deprecated. Use "importWxr" instead.')):(h==null?void 0:h.step)==="installPlugin"&&"pluginZipFile"in h?(h.pluginData=h.pluginZipFile,ae.logger.warn('The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.')):(h==null?void 0:h.step)==="installTheme"&&"themeZipFile"in h&&(h.themeData=h.themeZipFile,ae.logger.warn('The "themeZipFile" option of the "installTheme" step is deprecated. Use "themeData" instead.')));if(r.constants&&r.steps.unshift({step:"defineWpConfigConsts",consts:r.constants}),r.siteOptions&&r.steps.unshift({step:"setSiteOptions",options:r.siteOptions}),r.plugins){const h=r.plugins.map(b=>typeof b=="string"?b.startsWith("https://")?{resource:"url",url:b}:{resource:"wordpress.org/plugins",slug:b}:b).map(b=>({step:"installPlugin",pluginData:b}));r.steps.unshift(...h)}r.login&&r.steps.push({step:"login",...r.login===!0?{username:"admin"}:r.login});const c=((v=r.steps)==null?void 0:v.findIndex(h=>typeof h=="object"&&(h==null?void 0:h.step)&&["wp-cli","enableMultisite"].includes(h.step)))??-1;if((V=r==null?void 0:r.extraLibraries)!=null&&V.includes("wp-cli")||c!==-1){const h={step:"writeFile",data:qt,path:wr};c===-1?(se=r.steps)==null||se.push(h):(Y=r.steps)==null||Y.splice(c,0,h)}const _=(T=r.steps)==null?void 0:T.findIndex(h=>typeof h=="object"&&(h==null?void 0:h.step)==="importWxr");_!==void 0&&_>-1&&((K=r.steps)==null||K.splice(_,0,{step:"installPlugin",pluginData:{resource:"wordpress.org/plugins",slug:"wordpress-importer"}}));const{valid:$,errors:j}=Mt(r);if(!$){const h=new Error(`Invalid blueprint: ${j[0].message} at ${j[0].instancePath}`);throw h.errors=j,h}u(r);const k=r.steps||[],R=k.reduce((h,b)=>{var P;return h+(((P=b.progress)==null?void 0:P.weight)||1)},0),F=k.map(h=>Yt(h,{semaphore:n,rootProgressTracker:t,totalProgressWeight:R,corsProxy:s,streamBundledFile:e}));return{versions:{php:zt((B=r.preferredVersions)==null?void 0:B.php,Ie.SupportedPHPVersions,Ie.LatestSupportedPHPVersion),wp:((re=r.preferredVersions)==null?void 0:re.wp)||"latest"},features:{intl:((m=r.features)==null?void 0:m.intl)??!1,networking:((N=r.features)==null?void 0:N.networking)??!0},extraLibraries:r.extraLibraries||[],run:async h=>{try{for(const{resources:b}of F)for(const P of b)P.setPlayground(h),P.isAsync&&P.resolve().catch(()=>{});for(const[b,{run:P,step:w}]of Object.entries(F))try{const y=await P(h);d(y,w)}catch(y){throw new Error(`Error when executing the blueprint step #${b} (${JSON.stringify(w)}) ${y instanceof Error?`: ${y.message}`:y}`,{cause:y})}}finally{try{const b=await h.pathToInternalUrl(r.landingPage||"/");await h.goTo("/index.php?playground-redirection-handler&next="+encodeURIComponent(b))}catch{}t.finish()}}}}function Mt(r){var u;const t=sr(r);if(t)return{valid:t};const n=new Set;for(const s of sr.errors)s.schemaPath.startsWith("#/properties/steps/items/anyOf")||n.add(s.instancePath);const d=(u=sr.errors)==null?void 0:u.filter(s=>!(s.schemaPath.startsWith("#/properties/steps/items/anyOf")&&n.has(s.instancePath)));return{valid:t,errors:d}}function zt(r,t,n){return r&&t.includes(r)?r:n}function Ht(r){return!!(typeof r=="object"&&r)}function Zt(r){return["setPhpIniEntry","request"].includes(r.step)?(ae.logger.warn(`The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function Yt(r,{semaphore:t,rootProgressTracker:n,totalProgressWeight:d,corsProxy:u,streamBundledFile:s}){var k;const e=n.stage((((k=r.progress)==null?void 0:k.weight)||1)/d),l={};for(const R of Object.keys(r)){let F=r[R];ct(F)&&(F=Te.create(F,{semaphore:t,corsProxy:u,streamBundledFile:s})),l[R]=F}const c=async R=>{var F;try{return e.fillSlowly(),await Bt[r.step](R,await Gt(l),{tracker:e,initialCaption:(F=r.progress)==null?void 0:F.caption})}finally{e.finish()}},_=$r(l),$=$r(l).filter(R=>R.isAsync),j=1/($.length+1);for(const R of $)R.progress=e.stage(j);return{run:c,step:r,resources:_}}function $r(r){const t=[];for(const n in r){const d=r[n];d instanceof Te&&t.push(d)}return t}async function Gt(r){const t={};for(const n in r){const d=r[n];d instanceof Te?t[n]=await d.resolve():t[n]=d}return t}async function at(r,t){await r.run(t)}async function nt(){const r=(await Promise.resolve().then(()=>require("./blueprints-DY7omvFh.cjs"))).default;return new File([r],"blueprints.phar",{type:"application/zip"})}function Qt(r){if(typeof r=="object"&&"type"in r&&["inline-file","file-reference"].includes(r.type))return r;if(!r)return{type:"inline-file",contents:"{}"};if(typeof r!="string")return{type:"inline-file",contents:JSON.stringify(r)};try{return JSON.parse(r),{type:"inline-file",contents:r}}catch{return{type:"file-reference",reference:r}}}async function Jt(r){var $,j;const t=r.cliArgs||[];for(const k of t)if(k.startsWith("--site-path="))throw new Error("The --site-path CLI argument must not be provided. In Playground, it is always set to /wordpress.");t.push("--site-path=/wordpress"),t.find(k=>k.startsWith("--db-engine="))||t.push("--db-engine=sqlite");const d=r.php,u=(r==null?void 0:r.onMessage)||(()=>{}),s=await nt();d.writeFile("/tmp/blueprints.phar",new Uint8Array(await s.arrayBuffer()));const e=Qt(r.blueprint);let l="";switch(e.type){case"inline-file":d.writeFile("/tmp/blueprint.json",e.contents),l="/tmp/blueprint.json";break;case"file-reference":l=e.reference;break}const c=await d.onMessage(async k=>{try{const R=typeof k=="string"?JSON.parse(k):k;if(!R)return;await new Promise(F=>setTimeout(F,0)),R.type.startsWith("blueprint.")&&await u(R)}catch(R){ae.logger.warn("Failed to parse message as JSON:",k,R)}});await(d==null?void 0:d.writeFile("/tmp/run-blueprints.php",`<?php
|
|
766
|
+
Only the username field is required for user authentication.`}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mkdir"},path:{type:"string",description:"The path of the directory you want to create"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mv"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"resetData"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"request"},request:{$ref:"#/definitions/PHPRequest",description:"Request details (See /wordpress-playground/api/universal/interface/PHPRequest)"}},required:["request","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rm"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rmdir"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHP",description:"The step identifier."},code:{anyOf:[{type:"string"},{type:"object",properties:{filename:{type:"string",description:"This property is ignored during Blueprint v1 execution but exists so the same runPHP step structure can be used for Blueprints v1 and v2."},content:{type:"string"}},required:["filename","content"],additionalProperties:!1}],description:"The PHP code to run."}},required:["code","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHPWithOptions"},options:{$ref:"#/definitions/PHPRunOptions",description:"Run options (See /wordpress-playground/api/universal/interface/PHPRunOptions/))"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runWpInstallationWizard"},options:{$ref:"#/definitions/WordPressInstallationOptions"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runSql",description:"The step identifier."},sql:{$ref:"#/definitions/FileReference",description:"The SQL to run. Each non-empty line must contain a valid SQL query."}},required:["sql","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteOptions",description:'The name of the step. Must be "setSiteOptions".'},options:{type:"object",additionalProperties:{},description:"The options to set on the site."}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"unzip"},zipFile:{$ref:"#/definitions/FileReference",description:"The zip file to extract"},zipPath:{type:"string",description:"The path of the zip file to extract",deprecated:"Use zipFile instead."},extractToPath:{type:"string",description:"The path to extract the zip file to"}},required:["extractToPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"updateUserMeta"},meta:{type:"object",additionalProperties:{},description:'An object of user meta values to set, e.g. { "first_name": "John" }'},userId:{type:"number",description:"User ID"}},required:["meta","step","userId"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"writeFile"},path:{type:"string",description:"The path of the file to write to"},data:{anyOf:[{$ref:"#/definitions/FileReference"},{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"The data to write"}},required:["data","path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"writeFiles"},writeToPath:{type:"string",description:"The path of the file to write to"},filesTree:{$ref:"#/definitions/DirectoryReference",description:"The 'filesTree' defines the directory structure, supporting 'literal:directory' or 'git:directory' types. The 'name' represents the root directory, while 'files' is an object where keys are file paths, and values contain either file content as a string or nested objects for subdirectories."}},required:["filesTree","step","writeToPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"wp-cli",description:"The step identifier."},command:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"The WP CLI command to run."},wpCliPath:{type:"string",description:"wp-cli.phar path"}},required:["command","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteLanguage"},language:{type:"string",description:"The language to set, e.g. 'en_US'"}},required:["language","step"]}]},ft={enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function ge(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let K;if(r.url===void 0&&(K="url"))return ge.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:K},message:"must have required property '"+K+"'"}],!1;{const Y=e;for(const j in r)if(!(j==="method"||j==="url"||j==="headers"||j==="body"))return ge.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:j},message:"must NOT have additional properties"}],!1;if(Y===e){if(r.method!==void 0){let j=r.method;const ee=e;if(typeof j!="string")return ge.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(j==="GET"||j==="POST"||j==="HEAD"||j==="OPTIONS"||j==="PATCH"||j==="PUT"||j==="DELETE"))return ge.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:ft.enum},message:"must be equal to one of the allowed values"}],!1;var p=ee===e}else var p=!0;if(p){if(r.url!==void 0){const j=e;if(typeof r.url!="string")return ge.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=j===e}else var p=!0;if(p){if(r.headers!==void 0){let j=r.headers;const ee=e;if(e===e)if(j&&typeof j=="object"&&!Array.isArray(j))for(const m in j){const N=e;if(typeof j[m]!="string")return ge.errors=[{instancePath:t+"/headers/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=N===e;if(!d)break}else return ge.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=ee===e}else var p=!0;if(p)if(r.body!==void 0){let j=r.body;const ee=e,B=e;let te=!1;const m=e;if(typeof j!="string"){const b={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[b]:s.push(b),e++}var y=m===e;if(te=te||y,!te){const b=e;if(e===b)if(j&&typeof j=="object"&&!Array.isArray(j)){let O;if(j.BYTES_PER_ELEMENT===void 0&&(O="BYTES_PER_ELEMENT")||j.buffer===void 0&&(O="buffer")||j.byteLength===void 0&&(O="byteLength")||j.byteOffset===void 0&&(O="byteOffset")||j.length===void 0&&(O="length")){const _={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};s===null?s=[_]:s.push(_),e++}else{const _=e;for(const P in j)if(!(P==="BYTES_PER_ELEMENT"||P==="buffer"||P==="byteLength"||P==="byteOffset"||P==="length")){let g=j[P];const S=e;if(!(typeof g=="number"&&isFinite(g))){const L={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var E=S===e;if(!E)break}if(_===e){if(j.BYTES_PER_ELEMENT!==void 0){let P=j.BYTES_PER_ELEMENT;const g=e;if(!(typeof P=="number"&&isFinite(P))){const S={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[S]:s.push(S),e++}var v=g===e}else var v=!0;if(v){if(j.buffer!==void 0){let P=j.buffer;const g=e;if(e===g)if(P&&typeof P=="object"&&!Array.isArray(P)){let L;if(P.byteLength===void 0&&(L="byteLength")){const C={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"};s===null?s=[C]:s.push(C),e++}else{const C=e;for(const F in P)if(F!=="byteLength"){const W={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:F},message:"must NOT have additional properties"};s===null?s=[W]:s.push(W),e++;break}if(C===e&&P.byteLength!==void 0){let F=P.byteLength;if(!(typeof F=="number"&&isFinite(F))){const W={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[W]:s.push(W),e++}}}}else{const L={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[L]:s.push(L),e++}var v=g===e}else var v=!0;if(v){if(j.byteLength!==void 0){let P=j.byteLength;const g=e;if(!(typeof P=="number"&&isFinite(P))){const L={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var v=g===e}else var v=!0;if(v){if(j.byteOffset!==void 0){let P=j.byteOffset;const g=e;if(!(typeof P=="number"&&isFinite(P))){const L={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var v=g===e}else var v=!0;if(v)if(j.length!==void 0){let P=j.length;const g=e;if(!(typeof P=="number"&&isFinite(P))){const L={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[L]:s.push(L),e++}var v=g===e}else var v=!0}}}}}}else{const O={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[O]:s.push(O),e++}var y=b===e;if(te=te||y,!te){const O=e;if(e===O)if(j&&typeof j=="object"&&!Array.isArray(j))for(const P in j){let g=j[P];const S=e,L=e;let C=!1;const F=e;if(typeof g!="string"){const W={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}var k=F===e;if(C=C||k,!C){const W=e;if(e===W)if(g&&typeof g=="object"&&!Array.isArray(g)){let U;if(g.BYTES_PER_ELEMENT===void 0&&(U="BYTES_PER_ELEMENT")||g.buffer===void 0&&(U="buffer")||g.byteLength===void 0&&(U="byteLength")||g.byteOffset===void 0&&(U="byteOffset")||g.length===void 0&&(U="length")){const re={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:U},message:"must have required property '"+U+"'"};s===null?s=[re]:s.push(re),e++}else{const re=e;for(const R in g)if(!(R==="BYTES_PER_ELEMENT"||R==="buffer"||R==="byteLength"||R==="byteOffset"||R==="length")){let Q=g[R];const V=e;if(!(typeof Q=="number"&&isFinite(Q))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var q=V===e;if(!q)break}if(re===e){if(g.BYTES_PER_ELEMENT!==void 0){let R=g.BYTES_PER_ELEMENT;const Q=e;if(!(typeof R=="number"&&isFinite(R))){const V={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[V]:s.push(V),e++}var T=Q===e}else var T=!0;if(T){if(g.buffer!==void 0){let R=g.buffer;const Q=e;if(e===Q)if(R&&typeof R=="object"&&!Array.isArray(R)){let z;if(R.byteLength===void 0&&(z="byteLength")){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:z},message:"must have required property '"+z+"'"};s===null?s=[oe]:s.push(oe),e++}else{const oe=e;for(const ue in R)if(ue!=="byteLength"){const Pe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ue},message:"must NOT have additional properties"};s===null?s=[Pe]:s.push(Pe),e++;break}if(oe===e&&R.byteLength!==void 0){let ue=R.byteLength;if(!(typeof ue=="number"&&isFinite(ue))){const Pe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[Pe]:s.push(Pe),e++}}}}else{const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[z]:s.push(z),e++}var T=Q===e}else var T=!0;if(T){if(g.byteLength!==void 0){let R=g.byteLength;const Q=e;if(!(typeof R=="number"&&isFinite(R))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var T=Q===e}else var T=!0;if(T){if(g.byteOffset!==void 0){let R=g.byteOffset;const Q=e;if(!(typeof R=="number"&&isFinite(R))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteOffset",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var T=Q===e}else var T=!0;if(T)if(g.length!==void 0){let R=g.length;const Q=e;if(!(typeof R=="number"&&isFinite(R))){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/length",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[z]:s.push(z),e++}var T=Q===e}else var T=!0}}}}}}else{const U={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[U]:s.push(U),e++}var k=W===e;if(C=C||k,!C){const U=e;if(e===U)if(g&&typeof g=="object"&&!Array.isArray(g)){let R;if(g.lastModified===void 0&&(R="lastModified")||g.name===void 0&&(R="name")||g.size===void 0&&(R="size")||g.type===void 0&&(R="type")||g.webkitRelativePath===void 0&&(R="webkitRelativePath")){const Q={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"};s===null?s=[Q]:s.push(Q),e++}else{const Q=e;for(const V in g)if(!(V==="size"||V==="type"||V==="lastModified"||V==="name"||V==="webkitRelativePath")){const z={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:V},message:"must NOT have additional properties"};s===null?s=[z]:s.push(z),e++;break}if(Q===e){if(g.size!==void 0){let V=g.size;const z=e;if(!(typeof V=="number"&&isFinite(V))){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/size",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[oe]:s.push(oe),e++}var h=z===e}else var h=!0;if(h){if(g.type!==void 0){const V=e;if(typeof g.type!="string"){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/type",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var h=V===e}else var h=!0;if(h){if(g.lastModified!==void 0){let V=g.lastModified;const z=e;if(!(typeof V=="number"&&isFinite(V))){const ue={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/lastModified",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/lastModified/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[ue]:s.push(ue),e++}var h=z===e}else var h=!0;if(h){if(g.name!==void 0){const V=e;if(typeof g.name!="string"){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/name",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var h=V===e}else var h=!0;if(h)if(g.webkitRelativePath!==void 0){const V=e;if(typeof g.webkitRelativePath!="string"){const oe={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1")+"/webkitRelativePath",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/webkitRelativePath/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[oe]:s.push(oe),e++}var h=V===e}else var h=!0}}}}}}else{const R={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[R]:s.push(R),e++}var k=U===e;C=C||k}}if(C)e=L,s!==null&&(L?s.length=L:s=null);else{const W={instancePath:t+"/body/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[W]:s.push(W),e++}var M=S===e;if(!M)break}else{const P={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[P]:s.push(P),e++}var y=O===e;te=te||y}}if(te)e=B,s!==null&&(B?s.length=B:s=null);else{const b={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[b]:s.push(b),e++,ge.errors=s,!1}var p=ee===e}else var p=!0}}}}}else return ge.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ge.errors=s,e===0}const is={properties:{relativeUri:{type:"string",description:"Request path following the domain:port part – after any URL rewriting rules (e.g. apache .htaccess) have been applied."},scriptPath:{type:"string",description:"Path of the .php file to execute."},protocol:{type:"string",description:"Request protocol."},method:{$ref:"#/definitions/HTTPMethod",description:"Request method. Default: `GET`."},headers:{$ref:"#/definitions/PHPRequestHeaders",description:"Request headers."},body:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"Request body."},env:{type:"object",additionalProperties:{type:"string"},description:"Environment variables to set for this run."},$_SERVER:{type:"object",additionalProperties:{type:"string"},description:"$_SERVER entries to set for this run."},code:{type:"string",description:"The code snippet to eval instead of a php file."}}};function pe(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const T=e;for(const h in r)if(!lt.call(is.properties,h))return pe.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"}],!1;if(T===e){if(r.relativeUri!==void 0){const h=e;if(typeof r.relativeUri!="string")return pe.errors=[{instancePath:t+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=h===e}else var p=!0;if(p){if(r.scriptPath!==void 0){const h=e;if(typeof r.scriptPath!="string")return pe.errors=[{instancePath:t+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=h===e}else var p=!0;if(p){if(r.protocol!==void 0){const h=e;if(typeof r.protocol!="string")return pe.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=h===e}else var p=!0;if(p){if(r.method!==void 0){let h=r.method;const M=e;if(typeof h!="string")return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(h==="GET"||h==="POST"||h==="HEAD"||h==="OPTIONS"||h==="PATCH"||h==="PUT"||h==="DELETE"))return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:ft.enum},message:"must be equal to one of the allowed values"}],!1;var p=M===e}else var p=!0;if(p){if(r.headers!==void 0){let h=r.headers;const M=e;if(e===e)if(h&&typeof h=="object"&&!Array.isArray(h))for(const j in h){const ee=e;if(typeof h[j]!="string")return pe.errors=[{instancePath:t+"/headers/"+j.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=ee===e;if(!d)break}else return pe.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=M===e}else var p=!0;if(p){if(r.body!==void 0){let h=r.body;const M=e,K=e;let Y=!1;const j=e;if(typeof h!="string"){const B={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[B]:s.push(B),e++}var y=j===e;if(Y=Y||y,!Y){const B=e;if(e===B)if(h&&typeof h=="object"&&!Array.isArray(h)){let m;if(h.BYTES_PER_ELEMENT===void 0&&(m="BYTES_PER_ELEMENT")||h.buffer===void 0&&(m="buffer")||h.byteLength===void 0&&(m="byteLength")||h.byteOffset===void 0&&(m="byteOffset")||h.length===void 0&&(m="length")){const N={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:m},message:"must have required property '"+m+"'"};s===null?s=[N]:s.push(N),e++}else{const N=e;for(const b in h)if(!(b==="BYTES_PER_ELEMENT"||b==="buffer"||b==="byteLength"||b==="byteOffset"||b==="length")){let w=h[b];const O=e;if(!(typeof w=="number"&&isFinite(w))){const _={instancePath:t+"/body/"+b.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[_]:s.push(_),e++}var E=O===e;if(!E)break}if(N===e){if(h.BYTES_PER_ELEMENT!==void 0){let b=h.BYTES_PER_ELEMENT;const w=e;if(!(typeof b=="number"&&isFinite(b))){const O={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[O]:s.push(O),e++}var v=w===e}else var v=!0;if(v){if(h.buffer!==void 0){let b=h.buffer;const w=e;if(e===w)if(b&&typeof b=="object"&&!Array.isArray(b)){let _;if(b.byteLength===void 0&&(_="byteLength")){const P={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:_},message:"must have required property '"+_+"'"};s===null?s=[P]:s.push(P),e++}else{const P=e;for(const g in b)if(g!=="byteLength"){const S={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};s===null?s=[S]:s.push(S),e++;break}if(P===e&&b.byteLength!==void 0){let g=b.byteLength;if(!(typeof g=="number"&&isFinite(g))){const S={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[S]:s.push(S),e++}}}}else{const _={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[_]:s.push(_),e++}var v=w===e}else var v=!0;if(v){if(h.byteLength!==void 0){let b=h.byteLength;const w=e;if(!(typeof b=="number"&&isFinite(b))){const _={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[_]:s.push(_),e++}var v=w===e}else var v=!0;if(v){if(h.byteOffset!==void 0){let b=h.byteOffset;const w=e;if(!(typeof b=="number"&&isFinite(b))){const _={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[_]:s.push(_),e++}var v=w===e}else var v=!0;if(v)if(h.length!==void 0){let b=h.length;const w=e;if(!(typeof b=="number"&&isFinite(b))){const _={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[_]:s.push(_),e++}var v=w===e}else var v=!0}}}}}}else{const m={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[m]:s.push(m),e++}var y=B===e;Y=Y||y}if(Y)e=K,s!==null&&(K?s.length=K:s=null);else{const B={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[B]:s.push(B),e++,pe.errors=s,!1}var p=M===e}else var p=!0;if(p){if(r.env!==void 0){let h=r.env;const M=e;if(e===M)if(h&&typeof h=="object"&&!Array.isArray(h))for(const Y in h){const j=e;if(typeof h[Y]!="string")return pe.errors=[{instancePath:t+"/env/"+Y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=j===e;if(!k)break}else return pe.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=M===e}else var p=!0;if(p){if(r.$_SERVER!==void 0){let h=r.$_SERVER;const M=e;if(e===M)if(h&&typeof h=="object"&&!Array.isArray(h))for(const Y in h){const j=e;if(typeof h[Y]!="string")return pe.errors=[{instancePath:t+"/$_SERVER/"+Y.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=j===e;if(!q)break}else return pe.errors=[{instancePath:t+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=M===e}else var p=!0;if(p)if(r.code!==void 0){const h=e;if(typeof r.code!="string")return pe.errors=[{instancePath:t+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=h===e}else var p=!0}}}}}}}}}else return pe.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return pe.errors=s,e===0}function o(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let cr;if(r.step===void 0&&(cr="step"))return o.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:cr},message:"must have required property '"+cr+"'"}],!1;{const J=r.step;if(typeof J=="string")if(J==="activatePlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.pluginPath===void 0&&(c="pluginPath")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="pluginPath"||i==="pluginName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/0/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var p=A===e}else var p=!0;if(p)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/0/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=a===e}else var p=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=l===e}else var d=!0;if(d){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="activatePlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/const",keyword:"const",params:{allowedValue:"activatePlugin"},message:"must be equal to constant"}],!1;var d=l===e}else var d=!0;if(d){if(r.pluginPath!==void 0){const i=e;if(typeof r.pluginPath!="string")return o.errors=[{instancePath:t+"/pluginPath",schemaPath:"#/oneOf/0/properties/pluginPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=i===e}else var d=!0;if(d)if(r.pluginName!==void 0){const i=e;if(typeof r.pluginName!="string")return o.errors=[{instancePath:t+"/pluginName",schemaPath:"#/oneOf/0/properties/pluginName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=i===e}else var d=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="activateTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step")||r.themeFolderName===void 0&&(c="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/1/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var y=A===e}else var y=!0;if(y)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/1/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=a===e}else var y=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var E=l===e}else var E=!0;if(E){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="activateTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/const",keyword:"const",params:{allowedValue:"activateTheme"},message:"must be equal to constant"}],!1;var E=l===e}else var E=!0;if(E)if(r.themeFolderName!==void 0){const i=e;if(typeof r.themeFolderName!="string")return o.errors=[{instancePath:t+"/themeFolderName",schemaPath:"#/oneOf/1/properties/themeFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=i===e}else var E=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="cp"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.fromPath===void 0&&(c="fromPath")||r.step===void 0&&(c="step")||r.toPath===void 0&&(c="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="fromPath"||i==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/2/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var v=A===e}else var v=!0;if(v)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/2/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var v=a===e}else var v=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var k=l===e}else var k=!0;if(k){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="cp")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/const",keyword:"const",params:{allowedValue:"cp"},message:"must be equal to constant"}],!1;var k=l===e}else var k=!0;if(k){if(r.fromPath!==void 0){const i=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/2/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=i===e}else var k=!0;if(k)if(r.toPath!==void 0){const i=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/2/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=i===e}else var k=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="defineWpConfigConsts"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.consts===void 0&&(c="consts")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="consts"||i==="method"||i==="virtualize"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/3/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var q=A===e}else var q=!0;if(q)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/3/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=a===e}else var q=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var T=l===e}else var T=!0;if(T){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="defineWpConfigConsts")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/const",keyword:"const",params:{allowedValue:"defineWpConfigConsts"},message:"must be equal to constant"}],!1;var T=l===e}else var T=!0;if(T){if(r.consts!==void 0){let i=r.consts;const l=e;if(e===l&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/consts",schemaPath:"#/oneOf/3/properties/consts/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var T=l===e}else var T=!0;if(T){if(r.method!==void 0){let i=r.method;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="rewrite-wp-config"||i==="define-before-run"))return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/enum",keyword:"enum",params:{allowedValues:sr.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var T=l===e}else var T=!0;if(T)if(r.virtualize!==void 0){const i=e;if(typeof r.virtualize!="boolean")return o.errors=[{instancePath:t+"/virtualize",schemaPath:"#/oneOf/3/properties/virtualize/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var T=i===e}else var T=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="defineSiteUrl"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.siteUrl===void 0&&(c="siteUrl")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="siteUrl"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/4/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var h=A===e}else var h=!0;if(h)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/4/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=a===e}else var h=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var M=l===e}else var M=!0;if(M){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="defineSiteUrl")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/const",keyword:"const",params:{allowedValue:"defineSiteUrl"},message:"must be equal to constant"}],!1;var M=l===e}else var M=!0;if(M)if(r.siteUrl!==void 0){const i=e;if(typeof r.siteUrl!="string")return o.errors=[{instancePath:t+"/siteUrl",schemaPath:"#/oneOf/4/properties/siteUrl/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var M=i===e}else var M=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="enableMultisite"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="wpCliPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/5/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var K=A===e}else var K=!0;if(K)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/5/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=a===e}else var K=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Y=l===e}else var Y=!0;if(Y){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="enableMultisite")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/const",keyword:"const",params:{allowedValue:"enableMultisite"},message:"must be equal to constant"}],!1;var Y=l===e}else var Y=!0;if(Y)if(r.wpCliPath!==void 0){const i=e;if(typeof r.wpCliPath!="string")return o.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/5/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Y=i===e}else var Y=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="importWxr"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.file===void 0&&(c="file")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="file"||i==="importer"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/6/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var j=A===e}else var j=!0;if(j)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/6/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var j=a===e}else var j=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ee=l===e}else var ee=!0;if(ee){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importWxr")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/const",keyword:"const",params:{allowedValue:"importWxr"},message:"must be equal to constant"}],!1;var ee=l===e}else var ee=!0;if(ee){if(r.file!==void 0){const i=e;G(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var ee=i===e}else var ee=!0;if(ee)if(r.importer!==void 0){let i=r.importer;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/importer",schemaPath:"#/oneOf/6/properties/importer/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="data-liberation"||i==="default"))return o.errors=[{instancePath:t+"/importer",schemaPath:"#/oneOf/6/properties/importer/enum",keyword:"enum",params:{allowedValues:sr.oneOf[6].properties.importer.enum},message:"must be equal to one of the allowed values"}],!1;var ee=l===e}else var ee=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="importThemeStarterContent"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="themeSlug"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/7/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var B=A===e}else var B=!0;if(B)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/7/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var B=a===e}else var B=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var te=l===e}else var te=!0;if(te){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importThemeStarterContent")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/const",keyword:"const",params:{allowedValue:"importThemeStarterContent"},message:"must be equal to constant"}],!1;var te=l===e}else var te=!0;if(te)if(r.themeSlug!==void 0){const i=e;if(typeof r.themeSlug!="string")return o.errors=[{instancePath:t+"/themeSlug",schemaPath:"#/oneOf/7/properties/themeSlug/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var te=i===e}else var te=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="importWordPressFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step")||r.wordPressFilesZip===void 0&&(c="wordPressFilesZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="wordPressFilesZip"||i==="pathInZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/8/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var m=A===e}else var m=!0;if(m)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/8/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=a===e}else var m=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var N=l===e}else var N=!0;if(N){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="importWordPressFiles")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/const",keyword:"const",params:{allowedValue:"importWordPressFiles"},message:"must be equal to constant"}],!1;var N=l===e}else var N=!0;if(N){if(r.wordPressFilesZip!==void 0){const i=e;G(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var N=i===e}else var N=!0;if(N)if(r.pathInZip!==void 0){const i=e;if(typeof r.pathInZip!="string")return o.errors=[{instancePath:t+"/pathInZip",schemaPath:"#/oneOf/8/properties/pathInZip/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=i===e}else var N=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="installPlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.pluginData===void 0&&(c="pluginData")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="ifAlreadyInstalled"||i==="step"||i==="pluginData"||i==="pluginZipFile"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/9/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var b=A===e}else var b=!0;if(b)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/9/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=a===e}else var b=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var w=l===e}else var w=!0;if(w){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="overwrite"||i==="skip"||i==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:sr.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var w=l===e}else var w=!0;if(w){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="installPlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/const",keyword:"const",params:{allowedValue:"installPlugin"},message:"must be equal to constant"}],!1;var w=l===e}else var w=!0;if(w){if(r.pluginData!==void 0){let i=r.pluginData;const l=e,$=e;let a=!1;const A=e;G(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var O=A===e;if(a=a||O,!a){const X=e;ce(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:u})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var O=X===e;a=a||O}if(a)e=$,s!==null&&($?s.length=$:s=null);else{const X={instancePath:t+"/pluginData",schemaPath:"#/oneOf/9/properties/pluginData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var w=l===e}else var w=!0;if(w){if(r.pluginZipFile!==void 0){const i=e;G(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var w=i===e}else var w=!0;if(w)if(r.options!==void 0){let i=r.options;const l=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=e;for(const ie in i)if(!(ie==="activate"||ie==="targetFolderName"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(A===e){if(i.activate!==void 0){const ie=e;if(typeof i.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/definitions/InstallPluginOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var _=ie===e}else var _=!0;if(_)if(i.targetFolderName!==void 0){const ie=e;if(typeof i.targetFolderName!="string")return o.errors=[{instancePath:t+"/options/targetFolderName",schemaPath:"#/definitions/InstallPluginOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=ie===e}else var _=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var w=l===e}else var w=!0}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="installTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step")||r.themeData===void 0&&(c="themeData"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="ifAlreadyInstalled"||i==="step"||i==="themeData"||i==="themeZipFile"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/10/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var P=A===e}else var P=!0;if(P)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/10/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var P=a===e}else var P=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var g=l===e}else var g=!0;if(g){if(r.ifAlreadyInstalled!==void 0){let i=r.ifAlreadyInstalled;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(i==="overwrite"||i==="skip"||i==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:sr.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var g=l===e}else var g=!0;if(g){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="installTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/const",keyword:"const",params:{allowedValue:"installTheme"},message:"must be equal to constant"}],!1;var g=l===e}else var g=!0;if(g){if(r.themeData!==void 0){let i=r.themeData;const l=e,$=e;let a=!1;const A=e;G(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var S=A===e;if(a=a||S,!a){const X=e;ce(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:u})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var S=X===e;a=a||S}if(a)e=$,s!==null&&($?s.length=$:s=null);else{const X={instancePath:t+"/themeData",schemaPath:"#/oneOf/10/properties/themeData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var g=l===e}else var g=!0;if(g){if(r.themeZipFile!==void 0){const i=e;G(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var g=i===e}else var g=!0;if(g)if(r.options!==void 0){let i=r.options;const l=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=e;for(const ie in i)if(!(ie==="activate"||ie==="importStarterContent"||ie==="targetFolderName"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(A===e){if(i.activate!==void 0){const ie=e;if(typeof i.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/definitions/InstallThemeOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var L=ie===e}else var L=!0;if(L){if(i.importStarterContent!==void 0){const ie=e;if(typeof i.importStarterContent!="boolean")return o.errors=[{instancePath:t+"/options/importStarterContent",schemaPath:"#/definitions/InstallThemeOptions/properties/importStarterContent/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var L=ie===e}else var L=!0;if(L)if(i.targetFolderName!==void 0){const ie=e;if(typeof i.targetFolderName!="string")return o.errors=[{instancePath:t+"/options/targetFolderName",schemaPath:"#/definitions/InstallThemeOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var L=ie===e}else var L=!0}}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var g=l===e}else var g=!0}}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="login"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="username"||i==="password"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/11/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var C=A===e}else var C=!0;if(C)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/11/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var C=a===e}else var C=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var F=l===e}else var F=!0;if(F){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="login")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/const",keyword:"const",params:{allowedValue:"login"},message:"must be equal to constant"}],!1;var F=l===e}else var F=!0;if(F){if(r.username!==void 0){const i=e;if(typeof r.username!="string")return o.errors=[{instancePath:t+"/username",schemaPath:"#/oneOf/11/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var F=i===e}else var F=!0;if(F)if(r.password!==void 0){const i=e;if(typeof r.password!="string")return o.errors=[{instancePath:t+"/password",schemaPath:"#/oneOf/11/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var F=i===e}else var F=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="mkdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/12/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var W=A===e}else var W=!0;if(W)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/12/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var W=a===e}else var W=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var D=l===e}else var D=!0;if(D){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="mkdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/const",keyword:"const",params:{allowedValue:"mkdir"},message:"must be equal to constant"}],!1;var D=l===e}else var D=!0;if(D)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/12/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var D=i===e}else var D=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="mv"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.fromPath===void 0&&(c="fromPath")||r.step===void 0&&(c="step")||r.toPath===void 0&&(c="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="fromPath"||i==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/13/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var U=A===e}else var U=!0;if(U)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/13/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var U=a===e}else var U=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var re=l===e}else var re=!0;if(re){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="mv")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/const",keyword:"const",params:{allowedValue:"mv"},message:"must be equal to constant"}],!1;var re=l===e}else var re=!0;if(re){if(r.fromPath!==void 0){const i=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/13/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var re=i===e}else var re=!0;if(re)if(r.toPath!==void 0){const i=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/13/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var re=i===e}else var re=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="resetData"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/14/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var R=A===e}else var R=!0;if(R)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/14/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var R=a===e}else var R=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Q=l===e}else var Q=!0;if(Q)if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="resetData")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/const",keyword:"const",params:{allowedValue:"resetData"},message:"must be equal to constant"}],!1;var Q=l===e}else var Q=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="request"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.request===void 0&&(c="request")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="request"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/15/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var V=A===e}else var V=!0;if(V)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/15/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var V=a===e}else var V=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var z=l===e}else var z=!0;if(z){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="request")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/const",keyword:"const",params:{allowedValue:"request"},message:"must be equal to constant"}],!1;var z=l===e}else var z=!0;if(z)if(r.request!==void 0){const i=e;ge(r.request,{instancePath:t+"/request",parentData:r,parentDataProperty:"request",rootData:u})||(s=s===null?ge.errors:s.concat(ge.errors),e=s.length);var z=i===e}else var z=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="rm"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/16/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var oe=A===e}else var oe=!0;if(oe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/16/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var oe=a===e}else var oe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ue=l===e}else var ue=!0;if(ue){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="rm")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/const",keyword:"const",params:{allowedValue:"rm"},message:"must be equal to constant"}],!1;var ue=l===e}else var ue=!0;if(ue)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/16/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ue=i===e}else var ue=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="rmdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/17/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Pe=A===e}else var Pe=!0;if(Pe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/17/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Pe=a===e}else var Pe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var qe=l===e}else var qe=!0;if(qe){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="rmdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/const",keyword:"const",params:{allowedValue:"rmdir"},message:"must be equal to constant"}],!1;var qe=l===e}else var qe=!0;if(qe)if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/17/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var qe=i===e}else var qe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runPHP"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.code===void 0&&(c="code")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="code"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/18/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Be=A===e}else var Be=!0;if(Be)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/18/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Be=a===e}else var Be=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=l===e}else var Ae=!0;if(Ae){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runPHP")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/const",keyword:"const",params:{allowedValue:"runPHP"},message:"must be equal to constant"}],!1;var Ae=l===e}else var Ae=!0;if(Ae)if(r.code!==void 0){let i=r.code;const l=e,$=e;let a=!1;const A=e;if(typeof i!="string"){const X={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[X]:s.push(X),e++}var ur=A===e;if(a=a||ur,!a){const X=e;if(e===X)if(i&&typeof i=="object"&&!Array.isArray(i)){let le;if(i.filename===void 0&&(le="filename")||i.content===void 0&&(le="content")){const je={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/required",keyword:"required",params:{missingProperty:le},message:"must have required property '"+le+"'"};s===null?s=[je]:s.push(je),e++}else{const je=e;for(const ne in i)if(!(ne==="filename"||ne==="content")){const Te={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ne},message:"must NOT have additional properties"};s===null?s=[Te]:s.push(Te),e++;break}if(je===e){if(i.filename!==void 0){const ne=e;if(typeof i.filename!="string"){const Te={instancePath:t+"/code/filename",schemaPath:"#/oneOf/18/properties/code/anyOf/1/properties/filename/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Te]:s.push(Te),e++}var Me=ne===e}else var Me=!0;if(Me)if(i.content!==void 0){const ne=e;if(typeof i.content!="string"){const Z={instancePath:t+"/code/content",schemaPath:"#/oneOf/18/properties/code/anyOf/1/properties/content/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Z]:s.push(Z),e++}var Me=ne===e}else var Me=!0}}}else{const le={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[le]:s.push(le),e++}var ur=X===e;a=a||ur}if(a)e=$,s!==null&&($?s.length=$:s=null);else{const X={instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var Ae=l===e}else var Ae=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runPHPWithOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.options===void 0&&(c="options")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/19/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ve=A===e}else var Ve=!0;if(Ve)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/19/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ve=a===e}else var Ve=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Se=l===e}else var Se=!0;if(Se){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runPHPWithOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/const",keyword:"const",params:{allowedValue:"runPHPWithOptions"},message:"must be equal to constant"}],!1;var Se=l===e}else var Se=!0;if(Se)if(r.options!==void 0){const i=e;pe(r.options,{instancePath:t+"/options",parentData:r,parentDataProperty:"options",rootData:u})||(s=s===null?pe.errors:s.concat(pe.errors),e=s.length);var Se=i===e}else var Se=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runWpInstallationWizard"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.options===void 0&&(c="options")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/20/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ze=A===e}else var ze=!0;if(ze)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/20/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ze=a===e}else var ze=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Re=l===e}else var Re=!0;if(Re){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runWpInstallationWizard")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/const",keyword:"const",params:{allowedValue:"runWpInstallationWizard"},message:"must be equal to constant"}],!1;var Re=l===e}else var Re=!0;if(Re)if(r.options!==void 0){let i=r.options;const l=e;if(e===e)if(i&&typeof i=="object"&&!Array.isArray(i)){const A=e;for(const ie in i)if(!(ie==="adminUsername"||ie==="adminPassword"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ie},message:"must NOT have additional properties"}],!1;if(A===e){if(i.adminUsername!==void 0){const ie=e;if(typeof i.adminUsername!="string")return o.errors=[{instancePath:t+"/options/adminUsername",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminUsername/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var He=ie===e}else var He=!0;if(He)if(i.adminPassword!==void 0){const ie=e;if(typeof i.adminPassword!="string")return o.errors=[{instancePath:t+"/options/adminPassword",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminPassword/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var He=ie===e}else var He=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Re=l===e}else var Re=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="runSql"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.sql===void 0&&(c="sql")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="sql"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/21/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Qe=A===e}else var Qe=!0;if(Qe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/21/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Qe=a===e}else var Qe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Le=l===e}else var Le=!0;if(Le){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="runSql")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/const",keyword:"const",params:{allowedValue:"runSql"},message:"must be equal to constant"}],!1;var Le=l===e}else var Le=!0;if(Le)if(r.sql!==void 0){const i=e;G(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var Le=i===e}else var Le=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="setSiteOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.options===void 0&&(c="options")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/22/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ye=A===e}else var Ye=!0;if(Ye)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/22/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ye=a===e}else var Ye=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Fe=l===e}else var Fe=!0;if(Fe){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="setSiteOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/const",keyword:"const",params:{allowedValue:"setSiteOptions"},message:"must be equal to constant"}],!1;var Fe=l===e}else var Fe=!0;if(Fe)if(r.options!==void 0){let i=r.options;const l=e;if(e===l&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/22/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Fe=l===e}else var Fe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="unzip"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.extractToPath===void 0&&(c="extractToPath")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="zipFile"||i==="zipPath"||i==="extractToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/23/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ze=A===e}else var Ze=!0;if(Ze)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/23/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ze=a===e}else var Ze=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var me=l===e}else var me=!0;if(me){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="unzip")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/const",keyword:"const",params:{allowedValue:"unzip"},message:"must be equal to constant"}],!1;var me=l===e}else var me=!0;if(me){if(r.zipFile!==void 0){const i=e;G(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var me=i===e}else var me=!0;if(me){if(r.zipPath!==void 0){const i=e;if(typeof r.zipPath!="string")return o.errors=[{instancePath:t+"/zipPath",schemaPath:"#/oneOf/23/properties/zipPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var me=i===e}else var me=!0;if(me)if(r.extractToPath!==void 0){const i=e;if(typeof r.extractToPath!="string")return o.errors=[{instancePath:t+"/extractToPath",schemaPath:"#/oneOf/23/properties/extractToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var me=i===e}else var me=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="updateUserMeta"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.meta===void 0&&(c="meta")||r.step===void 0&&(c="step")||r.userId===void 0&&(c="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="meta"||i==="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/24/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ge=A===e}else var Ge=!0;if(Ge)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/24/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ge=a===e}else var Ge=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _e=l===e}else var _e=!0;if(_e){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="updateUserMeta")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/const",keyword:"const",params:{allowedValue:"updateUserMeta"},message:"must be equal to constant"}],!1;var _e=l===e}else var _e=!0;if(_e){if(r.meta!==void 0){let i=r.meta;const l=e;if(e===l&&!(i&&typeof i=="object"&&!Array.isArray(i)))return o.errors=[{instancePath:t+"/meta",schemaPath:"#/oneOf/24/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _e=l===e}else var _e=!0;if(_e)if(r.userId!==void 0){let i=r.userId;const l=e;if(!(typeof i=="number"&&isFinite(i)))return o.errors=[{instancePath:t+"/userId",schemaPath:"#/oneOf/24/properties/userId/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var _e=l===e}else var _e=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="writeFile"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.data===void 0&&(c="data")||r.path===void 0&&(c="path")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="path"||i==="data"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/25/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Je=A===e}else var Je=!0;if(Je)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/25/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Je=a===e}else var Je=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ke=l===e}else var ke=!0;if(ke){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="writeFile")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/const",keyword:"const",params:{allowedValue:"writeFile"},message:"must be equal to constant"}],!1;var ke=l===e}else var ke=!0;if(ke){if(r.path!==void 0){const i=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/25/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ke=i===e}else var ke=!0;if(ke)if(r.data!==void 0){let i=r.data;const l=e,$=e;let a=!1;const A=e;G(i,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var Ce=A===e;if(a=a||Ce,!a){const X=e;if(typeof i!="string"){const le={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[le]:s.push(le),e++}var Ce=X===e;if(a=a||Ce,!a){const le=e;if(e===le)if(i&&typeof i=="object"&&!Array.isArray(i)){let ne;if(i.BYTES_PER_ELEMENT===void 0&&(ne="BYTES_PER_ELEMENT")||i.buffer===void 0&&(ne="buffer")||i.byteLength===void 0&&(ne="byteLength")||i.byteOffset===void 0&&(ne="byteOffset")||i.length===void 0&&(ne="length")){const Te={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:ne},message:"must have required property '"+ne+"'"};s===null?s=[Te]:s.push(Te),e++}else{const Te=e;for(const Z in i)if(!(Z==="BYTES_PER_ELEMENT"||Z==="buffer"||Z==="byteLength"||Z==="byteOffset"||Z==="length")){let he=i[Z];const rr=e;if(!(typeof he=="number"&&isFinite(he))){const fe={instancePath:t+"/data/"+Z.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/oneOf/25/properties/data/anyOf/2/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var wt=rr===e;if(!wt)break}if(Te===e){if(i.BYTES_PER_ELEMENT!==void 0){let Z=i.BYTES_PER_ELEMENT;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const rr={instancePath:t+"/data/BYTES_PER_ELEMENT",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[rr]:s.push(rr),e++}var ye=he===e}else var ye=!0;if(ye){if(i.buffer!==void 0){let Z=i.buffer;const he=e;if(e===he)if(Z&&typeof Z=="object"&&!Array.isArray(Z)){let fe;if(Z.byteLength===void 0&&(fe="byteLength")){const tr={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:fe},message:"must have required property '"+fe+"'"};s===null?s=[tr]:s.push(tr),e++}else{const tr=e;for(const De in Z)if(De!=="byteLength"){const Ue={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:De},message:"must NOT have additional properties"};s===null?s=[Ue]:s.push(Ue),e++;break}if(tr===e&&Z.byteLength!==void 0){let De=Z.byteLength;if(!(typeof De=="number"&&isFinite(De))){const Ue={instancePath:t+"/data/buffer/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[Ue]:s.push(Ue),e++}}}}else{const fe={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0;if(ye){if(i.byteLength!==void 0){let Z=i.byteLength;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const fe={instancePath:t+"/data/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0;if(ye){if(i.byteOffset!==void 0){let Z=i.byteOffset;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const fe={instancePath:t+"/data/byteOffset",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0;if(ye)if(i.length!==void 0){let Z=i.length;const he=e;if(!(typeof Z=="number"&&isFinite(Z))){const fe={instancePath:t+"/data/length",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[fe]:s.push(fe),e++}var ye=he===e}else var ye=!0}}}}}}else{const ne={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[ne]:s.push(ne),e++}var Ce=le===e;a=a||Ce}}if(a)e=$,s!==null&&($?s.length=$:s=null);else{const X={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var ke=l===e}else var ke=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="writeFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.filesTree===void 0&&(c="filesTree")||r.step===void 0&&(c="step")||r.writeToPath===void 0&&(c="writeToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="writeToPath"||i==="filesTree"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/26/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Xe=A===e}else var Xe=!0;if(Xe)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/26/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Xe=a===e}else var Xe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Oe=l===e}else var Oe=!0;if(Oe){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="writeFiles")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/const",keyword:"const",params:{allowedValue:"writeFiles"},message:"must be equal to constant"}],!1;var Oe=l===e}else var Oe=!0;if(Oe){if(r.writeToPath!==void 0){const i=e;if(typeof r.writeToPath!="string")return o.errors=[{instancePath:t+"/writeToPath",schemaPath:"#/oneOf/26/properties/writeToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Oe=i===e}else var Oe=!0;if(Oe)if(r.filesTree!==void 0){const i=e;ce(r.filesTree,{instancePath:t+"/filesTree",parentData:r,parentDataProperty:"filesTree",rootData:u})||(s=s===null?ce.errors:s.concat(ce.errors),e=s.length);var Oe=i===e}else var Oe=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="wp-cli"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.command===void 0&&(c="command")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="command"||i==="wpCliPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/27/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ke=A===e}else var Ke=!0;if(Ke)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/27/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ke=a===e}else var Ke=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ee=l===e}else var Ee=!0;if(Ee){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="wp-cli")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var Ee=l===e}else var Ee=!0;if(Ee){if(r.command!==void 0){let i=r.command;const l=e,$=e;let a=!1;const A=e;if(typeof i!="string"){const X={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[X]:s.push(X),e++}var dr=A===e;if(a=a||dr,!a){const X=e;if(e===X)if(Array.isArray(i)){var Ar=!0;const le=i.length;for(let je=0;je<le;je++){const ne=e;if(typeof i[je]!="string"){const Z={instancePath:t+"/command/"+je,schemaPath:"#/oneOf/27/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Z]:s.push(Z),e++}var Ar=ne===e;if(!Ar)break}}else{const le={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};s===null?s=[le]:s.push(le),e++}var dr=X===e;a=a||dr}if(a)e=$,s!==null&&($?s.length=$:s=null);else{const X={instancePath:t+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[X]:s.push(X),e++,o.errors=s,!1}var Ee=l===e}else var Ee=!0;if(Ee)if(r.wpCliPath!==void 0){const i=e;if(typeof r.wpCliPath!="string")return o.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/27/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ee=i===e}else var Ee=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(J==="setSiteLanguage"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.language===void 0&&(c="language")||r.step===void 0&&(c="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"}],!1;{const x=e;for(const i in r)if(!(i==="progress"||i==="step"||i==="language"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"}],!1;if(x===e){if(r.progress!==void 0){let i=r.progress;const l=e;if(e===l)if(i&&typeof i=="object"&&!Array.isArray(i)){const $=e;for(const a in i)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/28/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if($===e){if(i.weight!==void 0){let a=i.weight;const A=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/28/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var er=A===e}else var er=!0;if(er)if(i.caption!==void 0){const a=e;if(typeof i.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/28/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var er=a===e}else var er=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/28/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ne=l===e}else var Ne=!0;if(Ne){if(r.step!==void 0){let i=r.step;const l=e;if(typeof i!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/28/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(i!=="setSiteLanguage")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/28/properties/step/const",keyword:"const",params:{allowedValue:"setSiteLanguage"},message:"must be equal to constant"}],!1;var Ne=l===e}else var Ne=!0;if(Ne)if(r.language!==void 0){const i=e;if(typeof r.language!="string")return o.errors=[{instancePath:t+"/language",schemaPath:"#/oneOf/28/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ne=i===e}else var Ne=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"mapping",tag:"step",tagValue:J},message:'value of tag "step" must be in oneOf'}],!1;else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"tag",tag:"step",tagValue:J},message:'tag "step" must be string'}],!1}}else return o.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return o.errors=s,e===0}function H(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const te=e;for(const m in r)if(!lt.call(Kt.properties,m))return H.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(te===e){if(r.landingPage!==void 0){const m=e;if(typeof r.landingPage!="string")return H.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===e}else var p=!0;if(p){if(r.description!==void 0){const m=e;if(typeof r.description!="string")return H.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===e}else var p=!0;if(p){if(r.meta!==void 0){let m=r.meta;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){let w;if(m.title===void 0&&(w="title")||m.author===void 0&&(w="author"))return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:w},message:"must have required property '"+w+"'"}],!1;{const O=e;for(const _ in m)if(!(_==="title"||_==="description"||_==="author"||_==="categories"))return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},message:"must NOT have additional properties"}],!1;if(O===e){if(m.title!==void 0){const _=e;if(typeof m.title!="string")return H.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=_===e}else var d=!0;if(d){if(m.description!==void 0){const _=e;if(typeof m.description!="string")return H.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=_===e}else var d=!0;if(d){if(m.author!==void 0){const _=e;if(typeof m.author!="string")return H.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=_===e}else var d=!0;if(d)if(m.categories!==void 0){let _=m.categories;const P=e;if(e===P)if(Array.isArray(_)){var y=!0;const S=_.length;for(let L=0;L<S;L++){const C=e;if(typeof _[L]!="string")return H.errors=[{instancePath:t+"/meta/categories/"+L,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=C===e;if(!y)break}}else return H.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var d=P===e}else var d=!0}}}}}else return H.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.preferredVersions!==void 0){let m=r.preferredVersions;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){let w;if(m.php===void 0&&(w="php")||m.wp===void 0&&(w="wp"))return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:w},message:"must have required property '"+w+"'"}],!1;{const O=e;for(const _ in m)if(!(_==="php"||_==="wp"))return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},message:"must NOT have additional properties"}],!1;if(O===e){if(m.php!==void 0){let _=m.php;const P=e,g=e;let S=!1;const L=e;if(typeof _!="string"){const C={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[C]:s.push(C),e++}if(!(_==="8.5"||_==="8.4"||_==="8.3"||_==="8.2"||_==="8.1"||_==="8.0"||_==="7.4"||_==="7.3"||_==="7.2")){const C={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:es.enum},message:"must be equal to one of the allowed values"};s===null?s=[C]:s.push(C),e++}var E=L===e;if(S=S||E,!S){const C=e;if(typeof _!="string"){const W={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}if(_!=="latest"){const W={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};s===null?s=[W]:s.push(W),e++}var E=C===e;S=S||E}if(S)e=g,s!==null&&(g?s.length=g:s=null);else{const C={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[C]:s.push(C),e++,H.errors=s,!1}var v=P===e}else var v=!0;if(v)if(m.wp!==void 0){const _=e;if(typeof m.wp!="string")return H.errors=[{instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var v=_===e}else var v=!0}}}else return H.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.features!==void 0){let m=r.features;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){const w=e;for(const O in m)if(!(O==="intl"||O==="networking"))return H.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"}],!1;if(w===e){if(m.intl!==void 0){const O=e;if(typeof m.intl!="boolean")return H.errors=[{instancePath:t+"/features/intl",schemaPath:"#/properties/features/properties/intl/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var k=O===e}else var k=!0;if(k)if(m.networking!==void 0){const O=e;if(typeof m.networking!="boolean")return H.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var k=O===e}else var k=!0}}else return H.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.extraLibraries!==void 0){let m=r.extraLibraries;const N=e;if(e===N)if(Array.isArray(m)){var q=!0;const w=m.length;for(let O=0;O<w;O++){let _=m[O];const P=e;if(typeof _!="string")return H.errors=[{instancePath:t+"/extraLibraries/"+O,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(_!=="wp-cli")return H.errors=[{instancePath:t+"/extraLibraries/"+O,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var q=P===e;if(!q)break}}else return H.errors=[{instancePath:t+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===e}else var p=!0;if(p){if(r.constants!==void 0){let m=r.constants;const N=e;if(e===e)if(m&&typeof m=="object"&&!Array.isArray(m))for(const O in m){let _=m[O];const P=e;if(typeof _!="string"&&typeof _!="boolean"&&!(typeof _=="number"&&isFinite(_)))return H.errors=[{instancePath:t+"/constants/"+O.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPConstants/additionalProperties/type",keyword:"type",params:{type:rs.additionalProperties.type},message:"must be string,boolean,number"}],!1;var T=P===e;if(!T)break}else return H.errors=[{instancePath:t+"/constants",schemaPath:"#/definitions/PHPConstants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.plugins!==void 0){let m=r.plugins;const N=e;if(e===N)if(Array.isArray(m)){var h=!0;const w=m.length;for(let O=0;O<w;O++){let _=m[O];const P=e,g=e;let S=!1;const L=e;if(typeof _!="string"){const F={instancePath:t+"/plugins/"+O,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var M=L===e;if(S=S||M,!S){const F=e;G(_,{instancePath:t+"/plugins/"+O,parentData:m,parentDataProperty:O,rootData:u})||(s=s===null?G.errors:s.concat(G.errors),e=s.length);var M=F===e;S=S||M}if(S)e=g,s!==null&&(g?s.length=g:s=null);else{const F={instancePath:t+"/plugins/"+O,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[F]:s.push(F),e++,H.errors=s,!1}var h=P===e;if(!h)break}}else return H.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===e}else var p=!0;if(p){if(r.siteOptions!==void 0){let m=r.siteOptions;const N=e;if(e===N)if(m&&typeof m=="object"&&!Array.isArray(m)){const w=e;for(const O in m)if(O!=="blogname"){const _=e;if(typeof m[O]!="string")return H.errors=[{instancePath:t+"/siteOptions/"+O.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=_===e;if(!K)break}if(w===e&&m.blogname!==void 0&&typeof m.blogname!="string")return H.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return H.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===e}else var p=!0;if(p){if(r.login!==void 0){let m=r.login;const N=e,b=e;let w=!1;const O=e;if(typeof m!="boolean"){const P={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[P]:s.push(P),e++}var Y=O===e;if(w=w||Y,!w){const P=e;if(e===P)if(m&&typeof m=="object"&&!Array.isArray(m)){let S;if(m.username===void 0&&(S="username")||m.password===void 0&&(S="password")){const L={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:S},message:"must have required property '"+S+"'"};s===null?s=[L]:s.push(L),e++}else{const L=e;for(const C in m)if(!(C==="username"||C==="password")){const F={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:C},message:"must NOT have additional properties"};s===null?s=[F]:s.push(F),e++;break}if(L===e){if(m.username!==void 0){const C=e;if(typeof m.username!="string"){const F={instancePath:t+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[F]:s.push(F),e++}var j=C===e}else var j=!0;if(j)if(m.password!==void 0){const C=e;if(typeof m.password!="string"){const W={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[W]:s.push(W),e++}var j=C===e}else var j=!0}}}else{const S={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[S]:s.push(S),e++}var Y=P===e;w=w||Y}if(w)e=b,s!==null&&(b?s.length=b:s=null);else{const P={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[P]:s.push(P),e++,H.errors=s,!1}var p=N===e}else var p=!0;if(p){if(r.steps!==void 0){let m=r.steps;const N=e;if(e===N)if(Array.isArray(m)){var ee=!0;const w=m.length;for(let O=0;O<w;O++){let _=m[O];const P=e,g=e;let S=!1;const L=e;o(_,{instancePath:t+"/steps/"+O,parentData:m,parentDataProperty:O,rootData:u})||(s=s===null?o.errors:s.concat(o.errors),e=s.length);var B=L===e;if(S=S||B,!S){const F=e;if(typeof _!="string"){const D={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[D]:s.push(D),e++}var B=F===e;if(S=S||B,!S){const D=e,U={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};s===null?s=[U]:s.push(U),e++;var B=D===e;if(S=S||B,!S){const R=e;if(typeof _!="boolean"){const V={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[V]:s.push(V),e++}if(_!==!1){const V={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};s===null?s=[V]:s.push(V),e++}var B=R===e;if(S=S||B,!S){const V=e;if(_!==null){const oe={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};s===null?s=[oe]:s.push(oe),e++}var B=V===e;S=S||B}}}}if(S)e=g,s!==null&&(g?s.length=g:s=null);else{const F={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[F]:s.push(F),e++,H.errors=s,!1}var ee=P===e;if(!ee)break}}else return H.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===e}else var p=!0;if(p)if(r.$schema!==void 0){const m=e;if(typeof r.$schema!="string")return H.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===e}else var p=!0}}}}}}}}}}}}else return H.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return H.errors=s,e===0}function or(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;return H(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:u})||(s=s===null?H.errors:s.concat(H.errors),e=s.length),or.errors=s,e===0}const{wpCLI:os,...Lr}=Xt,as={...Lr,"wp-cli":os,importFile:Lr.importWxr};class ut extends Error{constructor(t,n){super(t),this.name="InvalidBlueprintError",this.validationErrors=n}}class dt extends Error{constructor(t){const{stepNumber:n,step:f,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;super(p,{cause:s}),this.name="BlueprintStepExecutionError",this.stepNumber=n,this.step=f,this.messages=(s.message||"").split(`
|
|
767
|
+
`).map(d=>d.trim()).filter(Boolean)}}async function jr(r,t={}){const n={...t};let f;return qr(r)?(f=await ct(r),n.streamBundledFile=function(...u){return r.read(...u)}):f=r,ns(f,n)}function qr(r){return r&&"read"in r&&typeof r.read=="function"}async function ct(r){if(!qr(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}function ns(r,{progress:t=new gr.ProgressTracker,semaphore:n=new I.Semaphore({concurrency:3}),onStepCompleted:f=()=>{},onBlueprintValidated:u=()=>{},corsProxy:s,streamBundledFile:e,gitAdditionalHeadersCallback:p,additionalSteps:d}={}){var h,M,K,Y,j,ee,B,te,m,N;r=structuredClone(r),r={...r,steps:(r.steps||[]).filter(yt).filter(fs)},r.steps=[...r.steps||[],...d||[]];for(const b of r.steps)!b||typeof b!="object"||(b.step==="importFile"?(b.step="importWxr",ae.logger.warn('The "importFile" step is deprecated. Use "importWxr" instead.')):(b==null?void 0:b.step)==="installPlugin"&&"pluginZipFile"in b?(b.pluginData=b.pluginZipFile,ae.logger.warn('The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.')):(b==null?void 0:b.step)==="installTheme"&&"themeZipFile"in b&&(b.themeData=b.themeZipFile,ae.logger.warn('The "themeZipFile" option of the "installTheme" step is deprecated. Use "themeData" instead.')));if(r.constants&&r.steps.unshift({step:"defineWpConfigConsts",consts:r.constants}),r.siteOptions&&r.steps.unshift({step:"setSiteOptions",options:r.siteOptions}),r.plugins){const b=r.plugins.map(w=>typeof w=="string"?w.startsWith("https://")?{resource:"url",url:w}:{resource:"wordpress.org/plugins",slug:w}:w).map(w=>({step:"installPlugin",pluginData:w}));r.steps.unshift(...b)}r.login&&r.steps.unshift({step:"login",...r.login===!0?{username:"admin"}:r.login});const y=((h=r.steps)==null?void 0:h.findIndex(b=>typeof b=="object"&&(b==null?void 0:b.step)&&["wp-cli","enableMultisite"].includes(b.step)))??-1;if((M=r==null?void 0:r.extraLibraries)!=null&&M.includes("wp-cli")||y!==-1){const b={step:"writeFile",data:Vt,path:kr};y===-1?(K=r.steps)==null||K.push(b):(Y=r.steps)==null||Y.splice(y,0,b)}const E=(j=r.steps)==null?void 0:j.findIndex(b=>typeof b=="object"&&(b==null?void 0:b.step)==="importWxr");E!==void 0&&E>-1&&((ee=r.steps)==null||ee.splice(E,0,{step:"installPlugin",pluginData:{resource:"wordpress.org/plugins",slug:"wordpress-importer"}}));const v=mt(r);if(!v.valid){const{errors:b}=v,w=ps(r,b);throw new ut(`Invalid Blueprint: The Blueprint does not conform to the schema.
|
|
768
|
+
|
|
769
|
+
Found ${b.length} validation error(s):
|
|
770
|
+
|
|
771
|
+
${w}
|
|
772
|
+
|
|
773
|
+
Please review your Blueprint and fix these issues. Learn more about the Blueprint format: https://wordpress.github.io/wordpress-playground/blueprints/data-format`,b)}u(r);const k=r.steps||[],q=k.reduce((b,w)=>{var O;return b+(((O=w.progress)==null?void 0:O.weight)||1)},0),T=k.map(b=>us(b,{semaphore:n,rootProgressTracker:t,totalProgressWeight:q,corsProxy:s,streamBundledFile:e,gitAdditionalHeadersCallback:p}));return{versions:{php:ls((B=r.preferredVersions)==null?void 0:B.php,Ie.SupportedPHPVersions,Ie.LatestSupportedPHPVersion),wp:((te=r.preferredVersions)==null?void 0:te.wp)||"latest"},features:{intl:((m=r.features)==null?void 0:m.intl)??!1,networking:((N=r.features)==null?void 0:N.networking)??!0},extraLibraries:r.extraLibraries||[],run:async b=>{try{for(const{resources:w}of T)for(const O of w)O.setPlayground(b),O.isAsync&&O.resolve().catch(()=>{});for(const[w,{run:O,step:_}]of Object.entries(T))try{const P=await O(b);f(P,_)}catch(P){const g=Number(w)+1;throw new dt({stepNumber:g,step:_,cause:P})}}finally{try{const w=await b.pathToInternalUrl(r.landingPage||"/");await b.goTo("/index.php?playground-redirection-handler&next="+encodeURIComponent(w))}catch{}t.finish()}}}}function ps(r,t){return t.map((n,f)=>{var p;const u=n.instancePath||"/";let s=n.message||"validation failed",e="";if(s.includes("must NOT have additional properties")){const d=(p=n.params)==null?void 0:p.additionalProperty;if(d){s=`has unexpected property "${d}"`;try{const y=u.split("/").filter(Boolean);let E=r;for(const v of y)E&&typeof E=="object"&&(E=E[v]);if(E&&typeof E=="object"){const v=E[d],k=JSON.stringify(v);e=`
|
|
774
|
+
"${d}": ${k}
|
|
775
|
+
${"^".repeat(d.length+2)} This property is not recognized`}}catch{}}}else try{const d=u.split("/").filter(Boolean);let y=r;for(const E of d)y&&typeof y=="object"&&(y=y[E]);if(y!==void 0){const E=JSON.stringify(y,null,2);e=`
|
|
776
|
+
Value: ${E.length>200?E.substring(0,200)+"...":E}`}}catch{}return`${f+1}. At path "${u}": ${s}${e}`}).join(`
|
|
777
|
+
|
|
778
|
+
`)}function mt(r){var u;const t=or(r);if(t)return{valid:t};const n=new Set;for(const s of or.errors)s.schemaPath.startsWith("#/properties/steps/items/anyOf")||n.add(s.instancePath);return{valid:!1,errors:((u=or.errors)==null?void 0:u.filter(s=>!(s.schemaPath.startsWith("#/properties/steps/items/anyOf")&&n.has(s.instancePath))))??[]}}function ls(r,t,n){return r&&t.includes(r)?r:n}function yt(r){return!!(typeof r=="object"&&r)}function fs(r){return["setPhpIniEntry","request"].includes(r.step)?(ae.logger.warn(`The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function us(r,{semaphore:t,rootProgressTracker:n,totalProgressWeight:f,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e}){var q;const p=n.stage((((q=r.progress)==null?void 0:q.weight)||1)/f),d={};for(const T of Object.keys(r)){let h=r[T];Ot(h)&&(h=be.create(h,{semaphore:t,corsProxy:u,streamBundledFile:s,gitAdditionalHeadersCallback:e})),d[T]=h}const y=async T=>{var h;try{return p.fillSlowly(),await as[r.step](T,await ds(d),{tracker:p,initialCaption:(h=r.progress)==null?void 0:h.caption})}finally{p.finish()}},E=Fr(d),v=Fr(d).filter(T=>T.isAsync),k=1/(v.length+1);for(const T of v)T.progress=p.stage(k);return{run:y,step:r,resources:E}}function Fr(r){const t=[];for(const n in r){const f=r[n];f instanceof be&&t.push(f)}return t}async function ds(r){const t={};for(const n in r){const f=r[n];f instanceof be?t[n]=await f.resolve():t[n]=f}return t}async function ht(r,t){await r.run(t)}async function gt(){const r=(await Promise.resolve().then(()=>require("./blueprints-Gs5fAvvo.cjs"))).default;return new File([r],"blueprints.phar",{type:"application/zip"})}function cs(r){if(typeof r=="object"&&"type"in r&&["inline-file","file-reference"].includes(r.type))return r;if(!r)return{type:"inline-file",contents:"{}"};if(typeof r!="string")return{type:"inline-file",contents:JSON.stringify(r)};try{return JSON.parse(r),{type:"inline-file",contents:r}}catch{return{type:"file-reference",reference:r}}}async function ms(r){var E,v;const t=r.cliArgs||[];for(const k of t)if(k.startsWith("--site-path="))throw new Error("The --site-path CLI argument must not be provided. In Playground, it is always set to /wordpress.");t.push("--site-path=/wordpress"),t.find(k=>k.startsWith("--db-engine="))||t.push("--db-engine=sqlite");const f=r.php,u=(r==null?void 0:r.onMessage)||(()=>{}),s=await gt();f.writeFile("/tmp/blueprints.phar",new Uint8Array(await s.arrayBuffer()));const e=cs(r.blueprint);let p="";switch(e.type){case"inline-file":f.writeFile("/tmp/blueprint.json",e.contents),p="/tmp/blueprint.json";break;case"file-reference":p=e.reference;break}const d=await f.onMessage(async k=>{try{const q=typeof k=="string"?JSON.parse(k):k;if(!q)return;await new Promise(T=>setTimeout(T,0)),q.type.startsWith("blueprint.")&&await u(q)}catch(q){ae.logger.warn("Failed to parse message as JSON:",k,q)}});await(f==null?void 0:f.writeFile("/tmp/run-blueprints.php",`<?php
|
|
530
779
|
function playground_http_client_factory() {
|
|
531
780
|
return new WordPress\\HttpClient\\Client([
|
|
532
781
|
// sockets transport is somehow faster than curl in Playground. Maybe
|
|
@@ -545,7 +794,7 @@ playground_add_filter('blueprint.target_resolved', 'playground_on_blueprint_targ
|
|
|
545
794
|
|
|
546
795
|
playground_add_filter('blueprint.resolved', 'playground_on_blueprint_resolved');
|
|
547
796
|
function playground_on_blueprint_resolved($blueprint) {
|
|
548
|
-
$additional_blueprint_steps = json_decode(${
|
|
797
|
+
$additional_blueprint_steps = json_decode(${I.phpVar(JSON.stringify(((E=r.blueprintOverrides)==null?void 0:E.additionalSteps)||[]))}, true);
|
|
549
798
|
if(count($additional_blueprint_steps) > 0) {
|
|
550
799
|
$blueprint['additionalStepsAfterExecution'] = array_merge(
|
|
551
800
|
$blueprint['additionalStepsAfterExecution'] ?? [],
|
|
@@ -553,7 +802,7 @@ function playground_on_blueprint_resolved($blueprint) {
|
|
|
553
802
|
);
|
|
554
803
|
}
|
|
555
804
|
|
|
556
|
-
$wp_version_override = json_decode(${
|
|
805
|
+
$wp_version_override = json_decode(${I.phpVar(JSON.stringify(((v=r.blueprintOverrides)==null?void 0:v.wordpressVersion)||null))}, true);
|
|
557
806
|
if($wp_version_override) {
|
|
558
807
|
$blueprint['wordpressVersion'] = $wp_version_override;
|
|
559
808
|
}
|
|
@@ -607,5 +856,5 @@ function playground_progress_reporter() {
|
|
|
607
856
|
}
|
|
608
857
|
playground_add_filter('blueprint.progress_reporter', 'playground_progress_reporter');
|
|
609
858
|
require( "/tmp/blueprints.phar" );
|
|
610
|
-
`));const
|
|
859
|
+
`));const y=await f.cli(["/internal/shared/bin/php","/tmp/run-blueprints.php","exec",p,...t]);return y.finished.finally(d),y}class bt extends Error{constructor(t,n,f){super(t,f),this.name="BlueprintFetchError",this.url=n}}async function ys(r){let t;try{const n=await fetch(r,{credentials:"omit"});if(!n.ok)throw new Error(`Failed to fetch blueprint from ${r}`);t=await n.arrayBuffer()}catch(n){throw new bt(`Blueprint file could not be resolved from ${r}: ${n instanceof Error?n.message:String(n)}`,r,{cause:n})}try{const n=new TextDecoder().decode(t);return JSON.parse(n),new ve.OverlayFilesystem([new ve.InMemoryFilesystem({"blueprint.json":n}),new ve.FetchFilesystem({baseUrl:r})])}catch(n){if(await hs(t))return ve.ZipFilesystem.fromArrayBuffer(t);throw new Error(`Blueprint file at ${r} is neither a valid JSON nor a ZIP file.`,{cause:n})}}async function hs(r){if(r.byteLength<4)return!1;const t=new Uint8Array(r,0,4);return t[0]===80&&t[1]===75&&t[2]===3&&t[3]===4}async function gs(r){if((await We.create(r)).getVersion()===1){const n=await jr(r);return{wpVersion:n.versions.wp,phpVersion:n.versions.php,intl:n.features.intl,networking:n.features.networking,extraLibraries:n.extraLibraries,constants:{}}}else return{phpVersion:br.RecommendedPHPVersion,wpVersion:"latest",intl:!1,networking:!0,constants:{},extraLibraries:[]}}function bs(){}exports.BlueprintFetchError=bt;exports.BlueprintFilesystemRequiredError=Cr;exports.BlueprintReflection=We;exports.BlueprintStepExecutionError=dt;exports.InvalidBlueprintError=ut;exports.ResourceDownloadError=ir;exports.activatePlugin=vr;exports.activateTheme=Pr;exports.compileBlueprint=jr;exports.compileBlueprintV1=jr;exports.cp=Qr;exports.defineSiteUrl=Er;exports.defineWpConfigConsts=pr;exports.enableMultisite=Hr;exports.exportWXR=et;exports.getBlueprintDeclaration=ct;exports.getV2Runner=gt;exports.importThemeStarterContent=Tr;exports.importWordPressFiles=Kr;exports.importWxr=Xr;exports.installPlugin=tt;exports.installTheme=st;exports.isBlueprintBundle=qr;exports.isStepDefinition=yt;exports.login=it;exports.mkdir=Zr;exports.mv=Yr;exports.request=Mr;exports.resetData=ot;exports.resolveRemoteBlueprint=ys;exports.resolveRuntimeConfiguration=gs;exports.rm=ar;exports.rmdir=Gr;exports.runBlueprintSteps=ht;exports.runBlueprintV1Steps=ht;exports.runBlueprintV2=ms;exports.runPHP=Ir;exports.runPHPWithOptions=Wr;exports.runSql=Br;exports.runWpInstallationWizard=at;exports.setPluginProxyURL=bs;exports.setSiteLanguage=pt;exports.setSiteOptions=_r;exports.unzip=fr;exports.updateUserMeta=Vr;exports.validateBlueprint=mt;exports.wpCLI=Or;exports.wpContentFilesExcludedFromExport=$r;exports.writeFile=lr;exports.writeFiles=Jr;exports.zipWpContent=nt;
|
|
611
860
|
//# sourceMappingURL=index.cjs.map
|