@wp-playground/blueprints 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@php-wasm/node-polyfills");const fr=require("@php-wasm/progress"),B=require("@php-wasm/util"),De=require("@php-wasm/universal"),je=require("@wp-playground/storage"),at=require("@php-wasm/web"),nt=require("@php-wasm/stream-compression"),ae=require("@php-wasm/logger"),jr=require("@wp-playground/wordpress"),Er=require("@wp-playground/common");function tr(r){const t=r.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const pt=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url","git:directory","bundled"];function lt(r){return r&&typeof r=="object"&&typeof r.resource=="string"&&pt.includes(r.resource)}class Oe{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:d,corsProxy:u,streamBundledFile:s}){let e;switch(t.resource){case"vfs":e=new ft(t,d);break;case"literal":e=new dt(t,d);break;case"wordpress.org/themes":e=new bt(t,d);break;case"wordpress.org/plugins":e=new wt(t,d);break;case"url":e=new mt(t,d,{corsProxy:u});break;case"git:directory":e=new yt(t,d,{corsProxy:u});break;case"literal:directory":e=new gt(t,d);break;case"bundled":if(!s)throw new Error("Filesystem is required for blueprint resources");e=new _t(t,s,d);break;default:throw new Error(`Unknown resource type: ${t.resource}`)}return n&&(e=new Pt(e,n)),new vt(e)}}class qr extends Oe{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 ft extends Oe{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 dt extends Oe{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 dr extends Oe{constructor(t,n){super(),this._progress=t,this.corsProxy=n}async resolve(){var n,d,u;(n=this.progress)==null||n.setCaption(this.caption);const t=this.getURL();try{let s=await at.fetchWithCorsProxy(t,void 0,this.corsProxy,await((d=this.playground)==null?void 0:d.absoluteUrl));if(!s.ok)throw new Error(`Could not download "${t}"`);if(s=await fr.cloneResponseMonitorProgress(s,((u=this.progress)==null?void 0:u.loadingListener)??ct),s.status!==200)throw new Error(`Could not download "${t}"`);const e=this.name||ut(s.headers.get("content-disposition")||"")||encodeURIComponent(t);return new File([await s.blob()],e)}catch(s){throw new Error(`Could not download "${t}".
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@php-wasm/node-polyfills");const dr=require("@php-wasm/progress"),B=require("@php-wasm/util"),De=require("@php-wasm/universal"),je=require("@wp-playground/storage"),pt=require("@php-wasm/web"),lt=require("@php-wasm/stream-compression"),ae=require("@php-wasm/logger"),$r=require("@wp-playground/wordpress"),ur=require("@wp-playground/common");function Ar(r){return r&&"read"in r&&typeof r.read=="function"}async function ft(r){if(!Ar(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}class Ie{constructor(t,n,f){this.declaration=t,this.bundle=n,this.version=f}static async create(t){const n=await ft(t),f=Ar(t)?t:void 0;return Ie.createFromDeclaration(n,f)}static createFromDeclaration(t,n=void 0){return new Ie(t,n,t.version||1)}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 sr(r){const t=r.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const dt=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url","git:directory","bundled"];function ut(r){return r&&typeof r=="object"&&typeof r.resource=="string"&&dt.includes(r.resource)}class Oe{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}){let e;switch(t.resource){case"vfs":e=new ct(t,f);break;case"literal":e=new mt(t,f);break;case"wordpress.org/themes":e=new Pt(t,f);break;case"wordpress.org/plugins":e=new _t(t,f);break;case"url":e=new gt(t,f,{corsProxy:u});break;case"git:directory":e=new bt(t,f,{corsProxy:u});break;case"literal:directory":e=new vt(t,f);break;case"bundled":if(!s)throw new Error("Filesystem is required for blueprint resources");e=new Tt(t,s,f);break;default:throw new Error(`Unknown resource type: ${t.resource}`)}return n&&(e=new Ot(e,n)),new kt(e)}}class Rr extends Oe{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 ct extends Oe{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 mt extends Oe{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 cr extends Oe{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 pt.fetchWithCorsProxy(t,void 0,this.corsProxy,await((f=this.playground)==null?void 0:f.absoluteUrl));if(!s.ok)throw new Error(`Could not download "${t}"`);if(s=await dr.cloneResponseMonitorProgress(s,((u=this.progress)==null?void 0:u.loadingListener)??ht),s.status!==200)throw new Error(`Could not download "${t}"`);const e=this.name||yt(s.headers.get("content-disposition")||"")||encodeURIComponent(t);return new File([await s.blob()],e)}catch(s){throw new Error(`Could not download "${t}".
2
2
  Check if the URL is correct and the server is reachable.
3
3
  If it is reachable, the server might be blocking the request.
4
4
  Check the browser console and network tabs for more information.
@@ -22,9 +22,9 @@
22
22
  https://raw.githubusercontent.com/username/repository/branch/filename
23
23
 
24
24
  Error:
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 ut(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 ct=()=>{};class mt extends dr{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\/(?<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 yt extends Oe{constructor(t,n,d){super(),this.reference=t,this._progress=n,this.options=d}async resolve(){var f;const t=(f=this.options)!=null&&f.corsProxy?`${this.options.corsProxy}${this.reference.url}`:this.reference.url,n=await je.resolveCommitHash(t,{value:this.reference.ref,type:"infer"}),d=await je.listGitFiles(t,n),u=this.reference.path.replace(/^\/+/,""),s=je.listDescendantFiles(d,u);let e=await je.sparseCheckout(t,n,s);return e=ht(e,y=>y.substring(u.length).replace(/^\/+/,"")),{name:B.dirname(this.reference.path)||this.reference.url.replaceAll(/[^a-zA-Z0-9-.]/g,"-").replaceAll(/-+/g,"-"),files:e}}get name(){return this.reference.path.split("/").pop()}}function ht(r,t){return Object.fromEntries(Object.entries(r).map(([n,d])=>[t(n),d]))}class gt extends Oe{constructor(t,n){super(),this.reference=t,this._progress=n}async resolve(){return this.reference}get name(){return this.reference.name}}class bt extends dr{constructor(t,n){super(n),this.resource=t}get name(){return tr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${$r(this.resource.slug)}`}}class wt extends dr{constructor(t,n){super(n),this.resource=t}get name(){return tr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${$r(this.resource.slug)}`}}function $r(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class vt extends qr{async resolve(){return this.promise||(this.promise=this.resource.resolve()),this.promise}}class Pt extends qr{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>this.resource.resolve()):this.resource.resolve()}}class _t extends Oe{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=fr.cloneStreamMonitorProgress(u.stream(),s,f=>{var y;(y=this.progress)==null||y.set(f.detail.loaded/f.detail.total*100)});return new nt.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.
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 yt(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 ht=()=>{};class gt extends cr{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\/(?<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 bt extends Oe{constructor(t,n,f){super(),this.reference=t,this._progress=n,this.options=f}async resolve(){var d;const t=(d=this.options)!=null&&d.corsProxy?`${this.options.corsProxy}${this.reference.url}`:this.reference.url,n=await je.resolveCommitHash(t,{value:this.reference.ref,type:"infer"}),f=await je.listGitFiles(t,n),u=this.reference.path.replace(/^\/+/,""),s=je.listDescendantFiles(f,u);let e=await je.sparseCheckout(t,n,s);return e=wt(e,y=>y.substring(u.length).replace(/^\/+/,"")),{name:B.dirname(this.reference.path)||this.reference.url.replaceAll(/[^a-zA-Z0-9-.]/g,"-").replaceAll(/-+/g,"-"),files:e}}get name(){return this.reference.path.split("/").pop()}}function wt(r,t){return Object.fromEntries(Object.entries(r).map(([n,f])=>[t(n),f]))}class vt extends Oe{constructor(t,n){super(),this.reference=t,this._progress=n}async resolve(){return this.reference}get name(){return this.reference.name}}class Pt extends cr{constructor(t,n){super(n),this.resource=t}get name(){return sr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${Fr(this.resource.slug)}`}}class _t extends cr{constructor(t,n){super(n),this.resource=t}get name(){return sr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${Fr(this.resource.slug)}`}}function Fr(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class kt extends Rr{async resolve(){return this.promise||(this.promise=this.resource.resolve()),this.promise}}class Ot extends Rr{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>this.resource.resolve()):this.resource.resolve()}}class Tt extends Oe{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=dr.cloneStreamMonitorProgress(u.stream(),s,d=>{var y;(y=this.progress)==null||y.set(d.detail.loaded/d.detail.total*100)});return new lt.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.
26
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 ur=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
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 mr=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
28
  define( 'WP_ADMIN', true );
29
29
  require_once( getenv('DOCROOT') . "/wp-load.php" );
30
30
  require_once( getenv('DOCROOT') . "/wp-admin/includes/plugin.php" );
@@ -92,7 +92,7 @@ Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name()
92
92
  }
93
93
  }
94
94
  die( ob_get_flush() ?: 'false' );
95
- `,env:{DOCROOT:u,PLUGIN_PATH:t}});if(e.text!=="true")throw e.text!=="false"&&ae.logger.debug(e.text),new Error(`Plugin ${t} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details.`)},cr=async(r,{themeFolderName:t},n)=>{n==null||n.tracker.setCaption(`Activating ${t}`);const d=await r.documentRoot,u=`${d}/wp-content/themes/${t}`;if(!await r.fileExists(u))throw new Error(`
95
+ `,env:{DOCROOT:u,PLUGIN_PATH:t}});if(e.text!=="true")throw e.text!=="false"&&ae.logger.debug(e.text),new Error(`Plugin ${t} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details.`)},yr=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
96
  Couldn't activate theme ${t}.
97
97
  Theme not found at the provided theme path: ${u}.
98
98
  Check the theme path to ensure it's correct.
@@ -111,7 +111,7 @@ Error details: ${u instanceof Error?u.message:String(u)}`,{cause:u})}}get name()
111
111
  throw new Exception( 'Theme ' . getenv('themeFolderName') . ' could not be activated.' );
112
112
  }
113
113
  die('Theme activated successfully');
114
- `,env:{docroot:d,themeFolderName:t}});if(s.text!=="Theme activated successfully")throw ae.logger.debug(s),new Error(`Theme ${t} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details`)},Ar=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(`
114
+ `,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 no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details`)},Lr=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
115
  It looks like you're trying to load WordPress using a relative path 'wordpress/wp-load.php'.
116
116
 
117
117
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -125,7 +125,7 @@ Instead of: require_once 'wordpress/wp-load.php';
125
125
  Use: require_once '/wordpress/wp-load.php';
126
126
 
127
127
  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})},Rr=async(r,{options:t})=>await r.run(t),mr=async(r,{path:t})=>{t.startsWith("/")||(ae.logger.error(`
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})},Sr=async(r,{options:t})=>await r.run(t),hr=async(r,{path:t})=>{t.startsWith("/")||(ae.logger.error(`
129
129
  The rm() step in your Blueprint refers to a relative path.
130
130
 
131
131
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -139,7 +139,7 @@ Instead of: rm({ path: 'wordpress/wp-load.php' });
139
139
  Use: rm({ path: '/wordpress/wp-load.php' });
140
140
 
141
141
  This will ensure your code works reliably regardless of the current working directory.
142
- `.trim()),t=`/${t}`),await r.unlink(t)},Fr=async(r,{sql:t},n)=>{n==null||n.tracker.setCaption("Executing SQL Queries");const d=`/tmp/${B.randomFilename()}.sql`;await r.writeFile(d,new Uint8Array(await t.arrayBuffer()));const u=await r.documentRoot,s=B.phpVars({docroot:u,sqlFilename:d}),e=await r.run({code:`<?php
142
+ `.trim()),t=`/${t}`),await r.unlink(t)},Nr=async(r,{sql:t},n)=>{n==null||n.tracker.setCaption("Executing SQL Queries");const f=`/tmp/${B.randomFilename()}.sql`;await r.writeFile(f,new Uint8Array(await t.arrayBuffer()));const u=await r.documentRoot,s=B.phpVars({docroot:u,sqlFilename:f}),e=await r.run({code:`<?php
143
143
  require_once ${s.docroot} . '/wp-load.php';
144
144
 
145
145
  $handle = fopen(${s.sqlFilename}, 'r');
@@ -154,26 +154,26 @@ This will ensure your code works reliably regardless of the current working dire
154
154
 
155
155
  $wpdb->query($line);
156
156
  }
157
- `});return await mr(r,{path:d}),e},Lr=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},sr=async(r,{consts:t,method:n="define-before-run"})=>{switch(n){case"define-before-run":await kt(r,t);break;case"rewrite-wp-config":{const d=await r.documentRoot,u=B.joinPaths(d,"/wp-config.php");await jr.defineWpConfigConstants(r,u,t,"rewrite");break}default:throw new Error(`Invalid method: ${n}`)}};async function kt(r,t){for(const n in t)await r.defineConstant(n,t[n])}const yr=async(r,{options:t})=>{const n=await r.documentRoot;await r.run({code:`<?php
157
+ `});return await hr(r,{path:f}),e},xr=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},ir=async(r,{consts:t,method:n="define-before-run"})=>{switch(n){case"define-before-run":await jt(r,t);break;case"rewrite-wp-config":{const f=await r.documentRoot,u=B.joinPaths(f,"/wp-config.php");await $r.defineWpConfigConstants(r,u,t,"rewrite");break}default:throw new Error(`Invalid method: ${n}`)}};async function jt(r,t){for(const n in t)await r.defineConstant(n,t[n])}const gr=async(r,{options:t})=>{const n=await r.documentRoot;await r.run({code:`<?php
158
158
  include ${B.phpVar(n)} . '/wp-load.php';
159
159
  $site_options = ${B.phpVar(t)};
160
160
  foreach($site_options as $name => $value) {
161
161
  update_option($name, $value);
162
162
  }
163
163
  echo "Success";
164
- `})},Sr=async(r,{meta:t,userId:n})=>{const d=await r.documentRoot;await r.run({code:`<?php
165
- include ${B.phpVar(d)} . '/wp-load.php';
164
+ `})},Cr=async(r,{meta:t,userId:n})=>{const f=await r.documentRoot;await r.run({code:`<?php
165
+ include ${B.phpVar(f)} . '/wp-load.php';
166
166
  $meta = ${B.phpVar(t)};
167
167
  foreach($meta as $name => $value) {
168
168
  update_user_meta(${B.phpVar(n)}, $name, $value);
169
169
  }
170
- `})},hr="/tmp/wp-cli.phar",Ot={resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},Nr=async(r,t=hr)=>{if(!await r.fileExists(t))throw new Error(`wp-cli.phar not found at ${t}.
170
+ `})},br="/tmp/wp-cli.phar",Et={resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},Dr=async(r,t=br)=>{if(!await r.fileExists(t))throw new Error(`wp-cli.phar not found at ${t}.
171
171
  You can enable wp-cli support by adding "wp-cli" to the list of extra libraries in your blueprint as follows:
172
172
  {
173
173
  "extraLibraries": [ "wp-cli" ]
174
174
  }
175
175
  Read more about it in the documentation.
176
- https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`)},gr=async(r,{command:t,wpCliPath:n=hr})=>{await Nr(r,n);let d;if(typeof t=="string"?(t=t.trim(),d=Tt(t)):d=t,d.shift()!=="wp")throw new Error('The first argument must be "wp".');let s=!1;const e=d.map(N=>N.startsWith("wordpress/")?(s=!0,`/${N}`):N);s&&ae.logger.error(`
176
+ https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`)},wr=async(r,{command:t,wpCliPath:n=br})=>{await Dr(r,n);let f;if(typeof t=="string"?(t=t.trim(),f=qt(t)):f=t,f.shift()!=="wp")throw new Error('The first argument must be "wp".');let s=!1;const e=f.map(N=>N.startsWith("wordpress/")?(s=!0,`/${N}`):N);s&&ae.logger.error(`
177
177
  The wp-cli step in your Blueprint refers to a relative path.
178
178
 
179
179
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -198,7 +198,7 @@ Use:
198
198
  }
199
199
 
200
200
  This will ensure your code works reliably regardless of the current working directory.
201
- `.trim());const f=await r.documentRoot;await r.writeFile("/tmp/stdout",""),await r.writeFile("/tmp/stderr",""),await r.writeFile(B.joinPaths(f,"run-cli.php"),`<?php
201
+ `.trim());const d=await r.documentRoot;await r.writeFile("/tmp/stdout",""),await r.writeFile("/tmp/stderr",""),await r.writeFile(B.joinPaths(d,"run-cli.php"),`<?php
202
202
  // Set up the environment to emulate a shell script
203
203
  // call.
204
204
 
@@ -210,7 +210,7 @@ This will ensure your code works reliably regardless of the current working dire
210
210
  // Set the argv global.
211
211
  $GLOBALS['argv'] = array_merge([
212
212
  "/tmp/wp-cli.phar",
213
- "--path=${f}"
213
+ "--path=${d}"
214
214
  ], ${B.phpVar(e)});
215
215
 
216
216
  // Provide stdin, stdout, stderr streams outside of
@@ -220,7 +220,7 @@ This will ensure your code works reliably regardless of the current working dire
220
220
  define('STDERR', fopen('php://stderr', 'wb'));
221
221
 
222
222
  require( ${B.phpVar(n)} );
223
- `);const y=await r.run({scriptPath:B.joinPaths(f,"run-cli.php")});if(y.errors)throw new Error(y.errors);return y};function Tt(r){let d=0,u="";const s=[];let e="";for(let f=0;f<r.length;f++){const y=r[f];d===0?y==='"'||y==="'"?(d=1,u=y):y.match(/\s/)?(e&&s.push(e),e=""):e+=y:d===1&&(y==="\\"?(f++,e+=r[f]):y===u?(d=0,u=""):e+=y)}return e&&s.push(e),s}const xr=async(r,{wpCliPath:t})=>{await Nr(r,t),await sr(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 d=n.pathname.replace(/\/$/,"")+"/",u=`${n.protocol}//${n.hostname}${d}`;await yr(r,{options:{siteurl:u,home:u}}),await gr(r,{command:"wp core multisite-convert"})},Cr=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&ae.logger.error(`
223
+ `);const y=await r.run({scriptPath:B.joinPaths(d,"run-cli.php")});if(y.errors)throw new Error(y.errors);return y};function qt(r){let f=0,u="";const s=[];let e="";for(let d=0;d<r.length;d++){const y=r[d];f===0?y==='"'||y==="'"?(f=1,u=y):y.match(/\s/)?(e&&s.push(e),e=""):e+=y:f===1&&(y==="\\"?(d++,e+=r[d]):y===u?(f=0,u=""):e+=y)}return e&&s.push(e),s}const Ir=async(r,{wpCliPath:t})=>{await Dr(r,t),await ir(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 gr(r,{options:{siteurl:u,home:u}}),await wr(r,{command:"wp core multisite-convert"})},Wr=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&ae.logger.error(`
224
224
  The cp() step in your Blueprint refers to a relative path.
225
225
 
226
226
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -234,7 +234,7 @@ Instead of: cp({ fromPath: 'wordpress/wp-load.php', toPath: 'wordpress/wp-load.
234
234
  Use: cp({ fromPath: '/wordpress/wp-load.php', toPath: '/wordpress/wp-load.php' });
235
235
 
236
236
  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))},Dr=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&ae.logger.error(`
237
+ `.trim()),t.startsWith("/")||(t=`/${t}`),n.startsWith("/")||(n=`/${n}`),await r.writeFile(n,await r.readFileAsBuffer(t))},Ur=async(r,{fromPath:t,toPath:n})=>{(!t.startsWith("/")||!n.startsWith("/"))&&ae.logger.error(`
238
238
  The mv() step in your Blueprint refers to a relative path.
239
239
 
240
240
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -248,7 +248,7 @@ Instead of: mv({ fromPath: 'wordpress/wp-load.php', toPath: 'wordpress/wp-load.
248
248
  Use: mv({ fromPath: '/wordpress/wp-load.php', toPath: '/wordpress/wp-load.php' });
249
249
 
250
250
  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)},Ir=async(r,{path:t})=>{t.startsWith("/")||ae.logger.error(`
251
+ `.trim()),t.startsWith("/")||(t=`/${t}`),n.startsWith("/")||(n=`/${n}`),await r.mv(t,n)},Br=async(r,{path:t})=>{t.startsWith("/")||ae.logger.error(`
252
252
  The mkdir() step in your Blueprint refers to a relative path.
253
253
 
254
254
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -262,7 +262,7 @@ Instead of: mkdir({ path: 'wordpress/my-new-folder' });
262
262
  Use: mkdir({ path: '/wordpress/my-new-folder' });
263
263
 
264
264
  This will ensure your code works reliably regardless of the current working directory.
265
- `.trim()),await r.mkdir(t)},Wr=async(r,{path:t})=>{t.startsWith("/")||(ae.logger.error(`
265
+ `.trim()),await r.mkdir(t)},Vr=async(r,{path:t})=>{t.startsWith("/")||(ae.logger.error(`
266
266
  The rmdir() step in your Blueprint refers to a relative path.
267
267
 
268
268
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -276,7 +276,7 @@ Instead of: rmdir({ path: 'wordpress/wp-load.php' });
276
276
  Use: rmdir({ path: '/wordpress/wp-load.php' });
277
277
 
278
278
  This will ensure your code works reliably regardless of the current working directory.
279
- `.trim()),t=`/${t}`),await r.rmdir(t)},ir=async(r,{path:t,data:n})=>{n instanceof File&&(n=new Uint8Array(await n.arrayBuffer())),t.startsWith("/")||(ae.logger.error(`
279
+ `.trim()),t=`/${t}`),await r.rmdir(t)},or=async(r,{path:t,data:n})=>{n instanceof File&&(n=new Uint8Array(await n.arrayBuffer())),t.startsWith("/")||(ae.logger.error(`
280
280
  The writeFile() step in your Blueprint refers to a relative path.
281
281
 
282
282
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -290,7 +290,7 @@ Instead of: writeFile({ path: 'wordpress/wp-load.php', data: '<?php echo "Hello
290
290
  Use: writeFile({ path: '/wordpress/wp-load.php', data: '<?php echo "Hello World!"; ?>' });
291
291
 
292
292
  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)},Ur=async(r,{writeToPath:t,filesTree:n})=>{t.startsWith("/")||(ae.logger.error(`
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)},Mr=async(r,{writeToPath:t,filesTree:n})=>{t.startsWith("/")||(ae.logger.error(`
294
294
  The writeFiles() step in your Blueprint refers to a relative path.
295
295
 
296
296
  Playground recently changed the working directory from '/' to '/wordpress' to better mimic
@@ -304,7 +304,7 @@ Instead of: writeFiles({ writeToPath: 'wordpress/wp-content/plugins/my-plugin',
304
304
  Use: writeFiles({ writeToPath: '/wordpress/wp-content/plugins/my-plugin', filesTree: { name: 'style.css': 'a { color: red; }' });
305
305
 
306
306
  This will ensure your code works reliably regardless of the current working directory.
307
- `.trim()),t=`/${t}`),await De.writeFiles(r,t,n.files)},br=async(r,{siteUrl:t})=>{await sr(r,{consts:{WP_HOME:t,WP_SITEURL:t}})},Br=async(r,{file:t},n)=>{await jt(r,t,n)};async function jt(r,t,n){var d;(d=n==null?void 0:n.tracker)==null||d.setCaption("Importing content"),await ir(r,{path:"/tmp/import.wxr",data:t}),await r.run({code:`<?php
307
+ `.trim()),t=`/${t}`),await De.writeFiles(r,t,n.files)},vr=async(r,{siteUrl:t})=>{await ir(r,{consts:{WP_HOME:t,WP_SITEURL:t}})},zr=async(r,{file:t},n)=>{await $t(r,t,n)};async function $t(r,t,n){var f;(f=n==null?void 0:n.tracker)==null||f.setCaption("Importing content"),await or(r,{path:"/tmp/import.wxr",data:t}),await r.run({code:`<?php
308
308
  define('WP_LOAD_IMPORTERS', true);
309
309
  require 'wp-load.php';
310
310
  require 'wp-admin/includes/admin.php';
@@ -353,7 +353,7 @@ This will ensure your code works reliably regardless of the current working dire
353
353
  $wp_import->import( getenv('IMPORT_FILE'), [
354
354
  'rewrite_urls' => true,
355
355
  ] );
356
- `,env:{IMPORT_FILE:"/tmp/import.wxr",FETCH_ATTACHMENTS:"true"}})}const wr=async(r,{themeSlug:t=""},n)=>{var u;(u=n==null?void 0:n.tracker)==null||u.setCaption("Importing theme starter content");const d=await r.documentRoot;await r.run({code:`<?php
356
+ `,env:{IMPORT_FILE:"/tmp/import.wxr",FETCH_ATTACHMENTS:"true"}})}const Pr=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
357
 
358
358
  /**
359
359
  * Ensure that the customizer loads as an admin user.
@@ -388,7 +388,7 @@ This will ensure your code works reliably regardless of the current working dire
388
388
  }
389
389
  playground_add_filter( 'plugins_loaded', 'importThemeStarterContent_plugins_loaded', 0 );
390
390
 
391
- require ${B.phpVar(d)} . '/wp-load.php';
391
+ require ${B.phpVar(f)} . '/wp-load.php';
392
392
 
393
393
  // Return early if there's no starter content.
394
394
  if ( ! get_theme_starter_content() ) {
@@ -400,10 +400,10 @@ This will ensure your code works reliably regardless of the current working dire
400
400
 
401
401
  // Publish the changeset, which publishes the starter content.
402
402
  wp_publish_post( $wp_customize->changeset_post_id() );
403
- `})},or=async(r,{zipFile:t,zipPath:n,extractToPath:d})=>{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 Er.unzipFile(r,t||n,d)},vr=["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"],Vr=async(r,{wordPressFilesZip:t,pathInZip:n=""})=>{const d=await r.documentRoot;let u=B.joinPaths("/tmp","import");await r.mkdir(u),await or(r,{zipFile:t,extractToPath:u}),u=B.joinPaths(u,n);const s=B.joinPaths(u,"wp-content"),e=B.joinPaths(d,"wp-content");for(const L of vr){const T=B.joinPaths(s,L);await kr(r,T);const _=B.joinPaths(e,L);await r.fileExists(_)&&(await r.mkdir(B.dirname(T)),await r.mv(_,T))}const f=B.joinPaths(u,"wp-content","database");await r.fileExists(f)||await r.mv(B.joinPaths(d,"wp-content","database"),f);const y=await r.listFiles(u);for(const L of y)await kr(r,B.joinPaths(d,L)),await r.mv(B.joinPaths(u,L),B.joinPaths(d,L));await r.rmdir(u),await jr.ensureWpConfig(r,d),await br(r,{siteUrl:await r.absoluteUrl});const N=B.phpVar(B.joinPaths(d,"wp-admin","upgrade.php"));await r.run({code:`<?php
403
+ `})},ar=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 ur.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"],Hr=async(r,{wordPressFilesZip:t,pathInZip:n=""})=>{const f=await r.documentRoot;let u=B.joinPaths("/tmp","import");await r.mkdir(u),await ar(r,{zipFile:t,extractToPath:u}),u=B.joinPaths(u,n);const s=B.joinPaths(u,"wp-content"),e=B.joinPaths(f,"wp-content");for(const L of _r){const T=B.joinPaths(s,L);await jr(r,T);const _=B.joinPaths(e,L);await r.fileExists(_)&&(await r.mkdir(B.dirname(T)),await r.mv(_,T))}const d=B.joinPaths(u,"wp-content","database");await r.fileExists(d)||await r.mv(B.joinPaths(f,"wp-content","database"),d);const y=await r.listFiles(u);for(const L of y)await jr(r,B.joinPaths(f,L)),await r.mv(B.joinPaths(u,L),B.joinPaths(f,L));await r.rmdir(u),await $r.ensureWpConfig(r,f),await vr(r,{siteUrl:await r.absoluteUrl});const N=B.phpVar(B.joinPaths(f,"wp-admin","upgrade.php"));await r.run({code:`<?php
404
404
  $_GET['step'] = 'upgrade_db';
405
405
  require ${N};
406
- `})};async function kr(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function Mr(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function zr(r,{targetPath:t,zipFile:n,ifAlreadyInstalled:d="overwrite",targetFolderName:u=""}){const e=n.name.replace(/\.zip$/,""),f=B.joinPaths(await r.documentRoot,"wp-content"),y=B.joinPaths(f,B.randomString()),N=B.joinPaths(y,"assets",e);await r.fileExists(N)&&await r.rmdir(y,{recursive:!0}),await r.mkdir(y);try{await or(r,{zipFile:n,extractToPath:N});let L=await r.listFiles(N,{prependPath:!0});L=L.filter(m=>!m.endsWith("/__MACOSX"));const T=L.length===1&&await r.isDir(L[0]);let _,k="";T?(k=L[0],_=L[0].split("/").pop()):(k=N,_=e),u&&u.length&&(_=u);const $=`${t}/${_}`;if(await r.fileExists($)){if(!await r.isDir($))throw new Error(`Cannot install asset ${_} to ${$} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(d==="overwrite")await r.rmdir($,{recursive:!0});else{if(d==="skip")return{assetFolderPath:$,assetFolderName:_};throw new Error(`Cannot install asset ${_} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${d}`)}}return await r.mv(k,$),{assetFolderPath:$,assetFolderName:_}}finally{await r.rmdir(y,{recursive:!0})}}const Hr=async(r,{pluginData:t,pluginZipFile:n,ifAlreadyInstalled:d,options:u={}},s)=>{n&&(t=n,ae.logger.warn('The "pluginZipFile" option is deprecated. Use "pluginData" instead.'));const e=B.joinPaths(await r.documentRoot,"wp-content","plugins"),f="targetFolderName"in u?u.targetFolderName:"";let y="",N="";const L=async _=>{if(_.name.toLowerCase().endsWith(".zip"))return!0;const k=new Uint8Array(await _.arrayBuffer(),0,4);return k[0]===80&&k[1]===75&&k[2]===3&&k[3]===4};if(t instanceof File)if(await L(t)){const _=t.name.split("/").pop()||"plugin.zip";N=tr(_),s==null||s.tracker.setCaption(`Installing the ${N} plugin`);const k=await zr(r,{ifAlreadyInstalled:d,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/plugins`,targetFolderName:f});y=k.assetFolderPath,N=k.assetFolderName}else if(t.name.endsWith(".php")){const _=B.joinPaths(e,t.name);await ir(r,{path:_,data:t}),y=e,N=t.name}else throw new Error("pluginData looks like a file but does not look like a .zip or .php file.");else if(t){N=t.name,s==null||s.tracker.setCaption(`Installing the ${N} plugin`);const _=B.joinPaths(e,f||t.name);await De.writeFiles(r,_,t.files,{rmRoot:!0}),y=_}("activate"in u?u.activate:!0)&&await ur(r,{pluginPath:y,pluginName:N},s)},Zr=async(r,{themeData:t,themeZipFile:n,ifAlreadyInstalled:d,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 f="",y="";if(t instanceof File){const T=t.name.split("/").pop()||"theme.zip";y=tr(T),s==null||s.tracker.setCaption(`Installing the ${y} theme`),f=(await zr(r,{ifAlreadyInstalled:d,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/themes`,targetFolderName:e})).assetFolderName}else{y=t.name,f=e||y,s==null||s.tracker.setCaption(`Installing the ${y} theme`);const T=B.joinPaths(await r.documentRoot,"wp-content","themes",f);await De.writeFiles(r,T,t.files,{rmRoot:!0})}("activate"in u?u.activate:!0)&&await cr(r,{themeFolderName:f},s),("importStarterContent"in u?u.importStarterContent:!1)&&await wr(r,{themeSlug:f},s)},Yr=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)},Gr=async(r,t,n)=>{var u;(u=n==null?void 0:n.tracker)==null||u.setCaption("Resetting WordPress data");const d=await r.documentRoot;await r.run({env:{DOCROOT:d},code:`<?php
406
+ `})};async function jr(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function Zr(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function Yr(r,{targetPath:t,zipFile:n,ifAlreadyInstalled:f="overwrite",targetFolderName:u=""}){const e=n.name.replace(/\.zip$/,""),d=B.joinPaths(await r.documentRoot,"wp-content"),y=B.joinPaths(d,B.randomFilename()),N=B.joinPaths(y,"assets",e);await r.fileExists(N)&&await r.rmdir(y,{recursive:!0}),await r.mkdir(y);try{await ar(r,{zipFile:n,extractToPath:N});let L=await r.listFiles(N,{prependPath:!0});L=L.filter(m=>!m.endsWith("/__MACOSX"));const T=L.length===1&&await r.isDir(L[0]);let _,k="";T?(k=L[0],_=L[0].split("/").pop()):(k=N,_=e),u&&u.length&&(_=u);const $=`${t}/${_}`;if(await r.fileExists($)){if(!await r.isDir($))throw new Error(`Cannot install asset ${_} to ${$} 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($,{recursive:!0});else{if(f==="skip")return{assetFolderPath:$,assetFolderName:_};throw new Error(`Cannot install asset ${_} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${f}`)}}return await r.mv(k,$),{assetFolderPath:$,assetFolderName:_}}finally{await r.rmdir(y,{recursive:!0})}}const Gr=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=B.joinPaths(await r.documentRoot,"wp-content","plugins"),d="targetFolderName"in u?u.targetFolderName:"";let y="",N="";const L=async _=>{if(_.name.toLowerCase().endsWith(".zip"))return!0;const k=new Uint8Array(await _.arrayBuffer(),0,4);return k[0]===80&&k[1]===75&&k[2]===3&&k[3]===4};if(t instanceof File)if(await L(t)){const _=t.name.split("/").pop()||"plugin.zip";N=sr(_),s==null||s.tracker.setCaption(`Installing the ${N} plugin`);const k=await Yr(r,{ifAlreadyInstalled:f,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/plugins`,targetFolderName:d});y=k.assetFolderPath,N=k.assetFolderName}else if(t.name.endsWith(".php")){const _=B.joinPaths(e,t.name);await or(r,{path:_,data:t}),y=e,N=t.name}else throw new Error("pluginData looks like a file but does not look like a .zip or .php file.");else if(t){N=t.name,s==null||s.tracker.setCaption(`Installing the ${N} plugin`);const _=B.joinPaths(e,d||t.name);await De.writeFiles(r,_,t.files,{rmRoot:!0}),y=_}("activate"in u?u.activate:!0)&&await mr(r,{pluginPath:y,pluginName:N},s)},Qr=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 d="",y="";if(t instanceof File){const T=t.name.split("/").pop()||"theme.zip";y=sr(T),s==null||s.tracker.setCaption(`Installing the ${y} theme`),d=(await Yr(r,{ifAlreadyInstalled:f,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/themes`,targetFolderName:e})).assetFolderName}else{y=t.name,d=e||y,s==null||s.tracker.setCaption(`Installing the ${y} theme`);const T=B.joinPaths(await r.documentRoot,"wp-content","themes",d);await De.writeFiles(r,T,t.files,{rmRoot:!0})}("activate"in u?u.activate:!0)&&await yr(r,{themeFolderName:d},s),("importStarterContent"in u?u.importStarterContent:!1)&&await Pr(r,{themeSlug:d},s)},Jr=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)},Xr=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
407
  require getenv('DOCROOT') . '/wp-load.php';
408
408
 
409
409
  $GLOBALS['@pdo']->query('DELETE FROM wp_posts WHERE id > 0');
@@ -417,11 +417,11 @@ This will ensure your code works reliably regardless of the current working dire
417
417
 
418
418
  $GLOBALS['@pdo']->query('DELETE FROM wp_commentmeta');
419
419
  $GLOBALS['@pdo']->query("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='wp_commentmeta'");
420
- `})},Qr=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"}})},Jr=async(r,{selfContained:t=!1}={})=>{const n="/tmp/wordpress-playground.zip",d=await r.documentRoot,u=B.joinPaths(d,"wp-content");let s=vr;t&&(s=s.filter(y=>!y.startsWith("themes/twenty")).filter(y=>y!=="mu-plugins/sqlite-database-integration"));const e=B.phpVars({zipPath:n,wpContentPath:u,documentRoot:d,exceptPaths:s.map(y=>B.joinPaths(d,"wp-content",y)),additionalPaths:t?{[B.joinPaths(d,"wp-config.php")]:"wp-config.php"}:{}});await qt(r,`zipDir(${e.wpContentPath}, ${e.zipPath}, array(
420
+ `})},Kr=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"}})},et=async(r,{selfContained:t=!1}={})=>{const n="/tmp/wordpress-playground.zip",f=await r.documentRoot,u=B.joinPaths(f,"wp-content");let s=_r;t&&(s=s.filter(y=>!y.startsWith("themes/twenty")).filter(y=>y!=="mu-plugins/sqlite-database-integration"));const e=B.phpVars({zipPath:n,wpContentPath:u,documentRoot:f,exceptPaths:s.map(y=>B.joinPaths(f,"wp-content",y)),additionalPaths:t?{[B.joinPaths(f,"wp-config.php")]:"wp-config.php"}:{}});await Rt(r,`zipDir(${e.wpContentPath}, ${e.zipPath}, array(
421
421
  'exclude_paths' => ${e.exceptPaths},
422
422
  'zip_root' => ${e.documentRoot},
423
423
  'additional_paths' => ${e.additionalPaths}
424
- ));`);const f=await r.readFileAsBuffer(n);return r.unlink(n),f},Et=`<?php
424
+ ));`);const d=await r.readFileAsBuffer(n);return r.unlink(n),d},At=`<?php
425
425
 
426
426
  function zipDir($root, $output, $options = array())
427
427
  {
@@ -481,12 +481,12 @@ function join_paths()
481
481
 
482
482
  return preg_replace('#/+#', '/', join('/', $paths));
483
483
  }
484
- `;async function qt(r,t){return await r.run({code:Et+t})}const $t=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},Xr=async(r,{language:t},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Translating"),await r.defineConstant("WPLANG",t);const d=await r.documentRoot,u=(await r.run({code:`<?php
485
- require '${d}/wp-includes/version.php';
484
+ `;async function Rt(r,t){return await r.run({code:At+t})}const Ft=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},rt=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
485
+ require '${f}/wp-includes/version.php';
486
486
  echo $wp_version;
487
- `})).text,s=[{url:await $t(u,t),type:"core"}],f=(await r.run({code:`<?php
488
- require_once('${d}/wp-load.php');
489
- require_once('${d}/wp-admin/includes/plugin.php');
487
+ `})).text,s=[{url:await Ft(u,t),type:"core"}],d=(await r.run({code:`<?php
488
+ require_once('${f}/wp-load.php');
489
+ require_once('${f}/wp-admin/includes/plugin.php');
490
490
  echo json_encode(
491
491
  array_values(
492
492
  array_map(
@@ -504,9 +504,9 @@ function join_paths()
504
504
  )
505
505
  )
506
506
  )
507
- );`})).json;for(const{slug:_,version:k}of f)s.push({url:`https://downloads.wordpress.org/translation/plugin/${_}/${k}/${t}.zip`,type:"plugin"});const N=(await r.run({code:`<?php
508
- require_once('${d}/wp-load.php');
509
- require_once('${d}/wp-admin/includes/theme.php');
507
+ );`})).json;for(const{slug:_,version:k}of d)s.push({url:`https://downloads.wordpress.org/translation/plugin/${_}/${k}/${t}.zip`,type:"plugin"});const N=(await r.run({code:`<?php
508
+ require_once('${f}/wp-load.php');
509
+ require_once('${f}/wp-admin/includes/theme.php');
510
510
  echo json_encode(
511
511
  array_values(
512
512
  array_map(
@@ -519,14 +519,14 @@ function join_paths()
519
519
  wp_get_themes()
520
520
  )
521
521
  )
522
- );`})).json;for(const{slug:_,version:k}of N)s.push({url:`https://downloads.wordpress.org/translation/theme/${_}/${k}/${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 L=new B.Semaphore({concurrency:5}),T=s.map(({url:_,type:k})=>L.run(async()=>{try{const $=await fetch(_);if(!$.ok)throw new Error(`Failed to download translations for ${k}: ${$.statusText}`);let m=`${d}/wp-content/languages`;k==="plugin"?m+="/plugins":k==="theme"&&(m+="/themes"),await Er.unzipFile(r,new File([await $.blob()],`${t}-${k}.zip`),m)}catch($){if(k==="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 ${k}: ${$}`)}}));await Promise.all(T)},At=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:ur,activateTheme:cr,cp:Cr,defineSiteUrl:br,defineWpConfigConsts:sr,enableMultisite:xr,exportWXR:Mr,importThemeStarterContent:wr,importWordPressFiles:Vr,importWxr:Br,installPlugin:Hr,installTheme:Zr,login:Yr,mkdir:Ir,mv:Dr,request:Lr,resetData:Gr,rm:mr,rmdir:Wr,runPHP:Ar,runPHPWithOptions:Rr,runSql:Fr,runWpInstallationWizard:Qr,setSiteLanguage:Xr,setSiteOptions:yr,unzip:or,updateUserMeta:Sr,wpCLI:gr,writeFile:ir,writeFiles:Ur,zipWpContent:Jr},Symbol.toStringTag,{value:"Module"})),Rt={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"}}},Ft={enum:["8.4","8.3","8.2","8.1","8.0","7.4","7.3","7.2"]},Lt={additionalProperties:{type:["string","boolean","number"]}},Kr=Object.prototype.hasOwnProperty;function K(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;const f=e;let y=!1;const N=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let V;if(r.resource===void 0&&(V="resource")||r.path===void 0&&(V="path")){const te={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:V},message:"must have required property '"+V+"'"};s===null?s=[te]:s.push(te),e++}else{const te=e;for(const c in r)if(!(c==="resource"||c==="path")){const S={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};s===null?s=[S]:s.push(S),e++;break}if(te===e){if(r.resource!==void 0){let c=r.resource;const S=e;if(typeof c!="string"){const g={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[g]:s.push(g),e++}if(c!=="vfs"){const g={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};s===null?s=[g]:s.push(g),e++}var T=S===e}else var T=!0;if(T)if(r.path!==void 0){const c=e;if(typeof r.path!="string"){const g={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[g]:s.push(g),e++}var T=c===e}else var T=!0}}}else{const V={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[V]:s.push(V),e++}var _=N===e;if(y=y||_,!y){const V=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let S;if(r.resource===void 0&&(S="resource")||r.name===void 0&&(S="name")||r.contents===void 0&&(S="contents")){const g={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:S},message:"must have required property '"+S+"'"};s===null?s=[g]:s.push(g),e++}else{const g=e;for(const w in r)if(!(w==="resource"||w==="name"||w==="contents")){const P={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};s===null?s=[P]:s.push(P),e++;break}if(g===e){if(r.resource!==void 0){let w=r.resource;const P=e;if(typeof w!="string"){const v={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[v]:s.push(v),e++}if(w!=="literal"){const v={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};s===null?s=[v]:s.push(v),e++}var k=P===e}else var k=!0;if(k){if(r.name!==void 0){const w=e;if(typeof r.name!="string"){const v={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[v]:s.push(v),e++}var k=w===e}else var k=!0;if(k)if(r.contents!==void 0){let w=r.contents;const P=e,v=e;let h=!1;const b=e;if(typeof w!="string"){const R={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[R]:s.push(R),e++}var $=b===e;if(h=h||$,!h){const R=e;if(e===R)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 U={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=[U]:s.push(U),e++}else{const U=e;for(const D in w)if(!(D==="BYTES_PER_ELEMENT"||D==="buffer"||D==="byteLength"||D==="byteOffset"||D==="length")){let I=w[D];const re=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 m=re===e;if(!m)break}if(U===e){if(w.BYTES_PER_ELEMENT!==void 0){let D=w.BYTES_PER_ELEMENT;const I=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 W=I===e}else var W=!0;if(W){if(w.buffer!==void 0){let D=w.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 Y={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=[Y]:s.push(Y),e++}else{const Y=e;for(const M in D)if(M!=="byteLength"){const H={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=[H]:s.push(H),e++;break}if(Y===e&&D.byteLength!==void 0){let M=D.byteLength;if(!(typeof M=="number"&&isFinite(M))){const H={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=[H]:s.push(H),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 W=I===e}else var W=!0;if(W){if(w.byteLength!==void 0){let D=w.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 W=I===e}else var W=!0;if(W){if(w.byteOffset!==void 0){let D=w.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 W=I===e}else var W=!0;if(W)if(w.length!==void 0){let D=w.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 W=I===e}else var W=!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 $=R===e;h=h||$}if(h)e=v,s!==null&&(v?s.length=v:s=null);else{const R={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[R]:s.push(R),e++}var k=P===e}else var k=!0}}}}else{const S={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[S]:s.push(S),e++}var _=V===e;if(y=y||_,!y){const S=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 v={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:P},message:"must have required property '"+P+"'"};s===null?s=[v]:s.push(v),e++}else{const v=e;for(const h in r)if(!(h==="resource"||h==="slug")){const b={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};s===null?s=[b]:s.push(b),e++;break}if(v===e){if(r.resource!==void 0){let h=r.resource;const b=e;if(typeof h!="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(h!=="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 z=b===e}else var z=!0;if(z)if(r.slug!==void 0){const h=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 z=h===e}else var z=!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 _=S===e;if(y=y||_,!y){const P=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let b;if(r.resource===void 0&&(b="resource")||r.slug===void 0&&(b="slug")){const q={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:b},message:"must have required property '"+b+"'"};s===null?s=[q]:s.push(q),e++}else{const q=e;for(const R in r)if(!(R==="resource"||R==="slug")){const C={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:R},message:"must NOT have additional properties"};s===null?s=[C]:s.push(C),e++;break}if(q===e){if(r.resource!==void 0){let R=r.resource;const C=e;if(typeof R!="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(R!=="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 G=C===e}else var G=!0;if(G)if(r.slug!==void 0){const R=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 G=R===e}else var G=!0}}}else{const b={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[b]:s.push(b),e++}var _=P===e;if(y=y||_,!y){const b=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 U in r)if(!(U==="resource"||U==="url"||U==="caption")){const D={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:U},message:"must NOT have additional properties"};s===null?s=[D]:s.push(D),e++;break}if(F===e){if(r.resource!==void 0){let U=r.resource;const D=e;if(typeof U!="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(U!=="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 j=D===e}else var j=!0;if(j){if(r.url!==void 0){const U=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 j=U===e}else var j=!0;if(j)if(r.caption!==void 0){const U=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 j=U===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 _=b===e;if(y=y||_,!y){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 re in r)if(!(re==="resource"||re==="path")){const A={instancePath:t,schemaPath:"#/definitions/BundledReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:re},message:"must NOT have additional properties"};s===null?s=[A]:s.push(A),e++;break}if(I===e){if(r.resource!==void 0){let re=r.resource;const A=e;if(typeof re!="string"){const Y={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Y]:s.push(Y),e++}if(re!=="bundled"){const Y={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/const",keyword:"const",params:{allowedValue:"bundled"},message:"must be equal to constant"};s===null?s=[Y]:s.push(Y),e++}var ee=A===e}else var ee=!0;if(ee)if(r.path!==void 0){const re=e;if(typeof r.path!="string"){const Y={instancePath:t+"/path",schemaPath:"#/definitions/BundledReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Y]:s.push(Y),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 _=C===e;y=y||_}}}}}if(y)e=f,s!==null&&(f?s.length=f: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++,K.errors=s,!1}return K.errors=s,e===0}const er={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:
522
+ );`})).json;for(const{slug:_,version:k}of N)s.push({url:`https://downloads.wordpress.org/translation/theme/${_}/${k}/${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 L=new B.Semaphore({concurrency:5}),T=s.map(({url:_,type:k})=>L.run(async()=>{try{const $=await fetch(_);if(!$.ok)throw new Error(`Failed to download translations for ${k}: ${$.statusText}`);let m=`${f}/wp-content/languages`;k==="plugin"?m+="/plugins":k==="theme"&&(m+="/themes"),await ur.unzipFile(r,new File([await $.blob()],`${t}-${k}.zip`),m)}catch($){if(k==="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 ${k}: ${$}`)}}));await Promise.all(T)},Lt=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:mr,activateTheme:yr,cp:Wr,defineSiteUrl:vr,defineWpConfigConsts:ir,enableMultisite:Ir,exportWXR:Zr,importThemeStarterContent:Pr,importWordPressFiles:Hr,importWxr:zr,installPlugin:Gr,installTheme:Qr,login:Jr,mkdir:Br,mv:Ur,request:xr,resetData:Xr,rm:hr,rmdir:Vr,runPHP:Lr,runPHPWithOptions:Sr,runSql:Nr,runWpInstallationWizard:Kr,setSiteLanguage:rt,setSiteOptions:gr,unzip:ar,updateUserMeta:Cr,wpCLI:wr,writeFile:or,writeFiles:Mr,zipWpContent:et},Symbol.toStringTag,{value:"Module"})),St={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"}}},Nt={enum:["8.4","8.3","8.2","8.1","8.0","7.4","7.3","7.2"]},xt={additionalProperties:{type:["string","boolean","number"]}},tt=Object.prototype.hasOwnProperty;function K(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;const d=e;let y=!1;const N=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let V;if(r.resource===void 0&&(V="resource")||r.path===void 0&&(V="path")){const te={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:V},message:"must have required property '"+V+"'"};s===null?s=[te]:s.push(te),e++}else{const te=e;for(const c in r)if(!(c==="resource"||c==="path")){const S={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};s===null?s=[S]:s.push(S),e++;break}if(te===e){if(r.resource!==void 0){let c=r.resource;const S=e;if(typeof c!="string"){const g={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[g]:s.push(g),e++}if(c!=="vfs"){const g={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};s===null?s=[g]:s.push(g),e++}var T=S===e}else var T=!0;if(T)if(r.path!==void 0){const c=e;if(typeof r.path!="string"){const g={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[g]:s.push(g),e++}var T=c===e}else var T=!0}}}else{const V={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[V]:s.push(V),e++}var _=N===e;if(y=y||_,!y){const V=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let S;if(r.resource===void 0&&(S="resource")||r.name===void 0&&(S="name")||r.contents===void 0&&(S="contents")){const g={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:S},message:"must have required property '"+S+"'"};s===null?s=[g]:s.push(g),e++}else{const g=e;for(const w in r)if(!(w==="resource"||w==="name"||w==="contents")){const P={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};s===null?s=[P]:s.push(P),e++;break}if(g===e){if(r.resource!==void 0){let w=r.resource;const P=e;if(typeof w!="string"){const v={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[v]:s.push(v),e++}if(w!=="literal"){const v={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};s===null?s=[v]:s.push(v),e++}var k=P===e}else var k=!0;if(k){if(r.name!==void 0){const w=e;if(typeof r.name!="string"){const v={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[v]:s.push(v),e++}var k=w===e}else var k=!0;if(k)if(r.contents!==void 0){let w=r.contents;const P=e,v=e;let h=!1;const b=e;if(typeof w!="string"){const R={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[R]:s.push(R),e++}var $=b===e;if(h=h||$,!h){const R=e;if(e===R)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 U={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=[U]:s.push(U),e++}else{const U=e;for(const D in w)if(!(D==="BYTES_PER_ELEMENT"||D==="buffer"||D==="byteLength"||D==="byteOffset"||D==="length")){let I=w[D];const re=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 m=re===e;if(!m)break}if(U===e){if(w.BYTES_PER_ELEMENT!==void 0){let D=w.BYTES_PER_ELEMENT;const I=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 W=I===e}else var W=!0;if(W){if(w.buffer!==void 0){let D=w.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 Y={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=[Y]:s.push(Y),e++}else{const Y=e;for(const M in D)if(M!=="byteLength"){const H={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=[H]:s.push(H),e++;break}if(Y===e&&D.byteLength!==void 0){let M=D.byteLength;if(!(typeof M=="number"&&isFinite(M))){const H={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=[H]:s.push(H),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 W=I===e}else var W=!0;if(W){if(w.byteLength!==void 0){let D=w.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 W=I===e}else var W=!0;if(W){if(w.byteOffset!==void 0){let D=w.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 W=I===e}else var W=!0;if(W)if(w.length!==void 0){let D=w.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 W=I===e}else var W=!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 $=R===e;h=h||$}if(h)e=v,s!==null&&(v?s.length=v:s=null);else{const R={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};s===null?s=[R]:s.push(R),e++}var k=P===e}else var k=!0}}}}else{const S={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[S]:s.push(S),e++}var _=V===e;if(y=y||_,!y){const S=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 v={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:P},message:"must have required property '"+P+"'"};s===null?s=[v]:s.push(v),e++}else{const v=e;for(const h in r)if(!(h==="resource"||h==="slug")){const b={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};s===null?s=[b]:s.push(b),e++;break}if(v===e){if(r.resource!==void 0){let h=r.resource;const b=e;if(typeof h!="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(h!=="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 z=b===e}else var z=!0;if(z)if(r.slug!==void 0){const h=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 z=h===e}else var z=!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 _=S===e;if(y=y||_,!y){const P=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let b;if(r.resource===void 0&&(b="resource")||r.slug===void 0&&(b="slug")){const q={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:b},message:"must have required property '"+b+"'"};s===null?s=[q]:s.push(q),e++}else{const q=e;for(const R in r)if(!(R==="resource"||R==="slug")){const C={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:R},message:"must NOT have additional properties"};s===null?s=[C]:s.push(C),e++;break}if(q===e){if(r.resource!==void 0){let R=r.resource;const C=e;if(typeof R!="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(R!=="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 G=C===e}else var G=!0;if(G)if(r.slug!==void 0){const R=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 G=R===e}else var G=!0}}}else{const b={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[b]:s.push(b),e++}var _=P===e;if(y=y||_,!y){const b=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 U in r)if(!(U==="resource"||U==="url"||U==="caption")){const D={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:U},message:"must NOT have additional properties"};s===null?s=[D]:s.push(D),e++;break}if(F===e){if(r.resource!==void 0){let U=r.resource;const D=e;if(typeof U!="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(U!=="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 j=D===e}else var j=!0;if(j){if(r.url!==void 0){const U=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 j=U===e}else var j=!0;if(j)if(r.caption!==void 0){const U=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 j=U===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 _=b===e;if(y=y||_,!y){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 re in r)if(!(re==="resource"||re==="path")){const A={instancePath:t,schemaPath:"#/definitions/BundledReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:re},message:"must NOT have additional properties"};s===null?s=[A]:s.push(A),e++;break}if(I===e){if(r.resource!==void 0){let re=r.resource;const A=e;if(typeof re!="string"){const Y={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Y]:s.push(Y),e++}if(re!=="bundled"){const Y={instancePath:t+"/resource",schemaPath:"#/definitions/BundledReference/properties/resource/const",keyword:"const",params:{allowedValue:"bundled"},message:"must be equal to constant"};s===null?s=[Y]:s.push(Y),e++}var ee=A===e}else var ee=!0;if(ee)if(r.path!==void 0){const re=e;if(typeof r.path!="string"){const Y={instancePath:t+"/path",schemaPath:"#/definitions/BundledReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Y]:s.push(Y),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 _=C===e;y=y||_}}}}}if(y)e=d,s!==null&&(d?s.length=d: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++,K.errors=s,!1}return K.errors=s,e===0}const rr={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
523
 
524
524
  - 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
525
 
526
526
  - 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
527
  This option is only kept in here to avoid breaking Blueprint schema validation
528
528
  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"]}]},St={additionalProperties:{anyOf:[{$ref:"#/definitions/FileTree"},{type:["object","string"]}]}},lr={validate:Se};function Se(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 N in r){let L=r[N];const T=e,_=e;let k=!1;const $=e;lr.validate(L,{instancePath:t+"/"+N.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:N,rootData:u})||(s=s===null?lr.validate.errors:s.concat(lr.validate.errors),e=s.length);var f=$===e;if(k=k||f,!k){const m=e;if(!(L&&typeof L=="object"&&!Array.isArray(L))&&typeof L!="string"){const z={instancePath:t+"/"+N.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf/1/type",keyword:"type",params:{type:St.additionalProperties.anyOf[1].type},message:"must be object,string"};s===null?s=[z]:s.push(z),e++}var f=m===e;k=k||f}if(k)e=_,s!==null&&(_?s.length=_:s=null);else{const m={instancePath:t+"/"+N.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[m]:s.push(m),e++,Se.errors=s,!1}var y=T===e;if(!y)break}else return Se.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Se.errors=s,e===0}function ke(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 y;if(r.files===void 0&&(y="files")||r.name===void 0&&(y="name")||r.resource===void 0&&(y="resource"))return ke.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:y},message:"must have required property '"+y+"'"}],!1;{const N=e;for(const L in r)if(!(L==="resource"||L==="files"||L==="name"))return ke.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:L},message:"must NOT have additional properties"}],!1;if(N===e){if(r.resource!==void 0){let L=r.resource;const T=e;if(typeof L!="string")return ke.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(L!=="literal:directory")return ke.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"literal:directory"},message:"must be equal to constant"}],!1;var f=T===e}else var f=!0;if(f){if(r.files!==void 0){const L=e;Se(r.files,{instancePath:t+"/files",parentData:r,parentDataProperty:"files",rootData:u})||(s=s===null?Se.errors:s.concat(Se.errors),e=s.length);var f=L===e}else var f=!0;if(f)if(r.name!==void 0){const L=e;if(typeof r.name!="string")return ke.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=L===e}else var f=!0}}}}else return ke.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ke.errors=s,e===0}function he(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;const f=e;let y=!1;const N=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let k;if(r.resource===void 0&&(k="resource")||r.url===void 0&&(k="url")||r.ref===void 0&&(k="ref")||r.path===void 0&&(k="path")){const $={instancePath:t,schemaPath:"#/definitions/GitDirectoryReference/required",keyword:"required",params:{missingProperty:k},message:"must have required property '"+k+"'"};s===null?s=[$]:s.push($),e++}else{const $=e;for(const m in r)if(!(m==="resource"||m==="url"||m==="ref"||m==="path")){const W={instancePath:t,schemaPath:"#/definitions/GitDirectoryReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};s===null?s=[W]:s.push(W),e++;break}if($===e){if(r.resource!==void 0){let m=r.resource;const W=e;if(typeof m!="string"){const z={instancePath:t+"/resource",schemaPath:"#/definitions/GitDirectoryReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[z]:s.push(z),e++}if(m!=="git:directory"){const z={instancePath:t+"/resource",schemaPath:"#/definitions/GitDirectoryReference/properties/resource/const",keyword:"const",params:{allowedValue:"git:directory"},message:"must be equal to constant"};s===null?s=[z]:s.push(z),e++}var T=W===e}else var T=!0;if(T){if(r.url!==void 0){const m=e;if(typeof r.url!="string"){const z={instancePath:t+"/url",schemaPath:"#/definitions/GitDirectoryReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[z]:s.push(z),e++}var T=m===e}else var T=!0;if(T){if(r.ref!==void 0){const m=e;if(typeof r.ref!="string"){const z={instancePath:t+"/ref",schemaPath:"#/definitions/GitDirectoryReference/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[z]:s.push(z),e++}var T=m===e}else var T=!0;if(T)if(r.path!==void 0){const m=e;if(typeof r.path!="string"){const z={instancePath:t+"/path",schemaPath:"#/definitions/GitDirectoryReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[z]:s.push(z),e++}var T=m===e}else var T=!0}}}}}else{const k={instancePath:t,schemaPath:"#/definitions/GitDirectoryReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[k]:s.push(k),e++}var _=N===e;if(y=y||_,!y){const k=e;ke(r,{instancePath:t,parentData:n,parentDataProperty:d,rootData:u})||(s=s===null?ke.errors:s.concat(ke.errors),e=s.length);var _=k===e;y=y||_}if(y)e=f,s!==null&&(f?s.length=f:s=null);else{const k={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[k]:s.push(k),e++,he.errors=s,!1}return he.errors=s,e===0}const et={enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function ye(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 z;if(r.url===void 0&&(z="url"))return ye.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:z},message:"must have required property '"+z+"'"}],!1;{const G=e;for(const j in r)if(!(j==="method"||j==="url"||j==="headers"||j==="body"))return ye.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:j},message:"must NOT have additional properties"}],!1;if(G===e){if(r.method!==void 0){let j=r.method;const ee=e;if(typeof j!="string")return ye.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 ye.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:et.enum},message:"must be equal to one of the allowed values"}],!1;var f=ee===e}else var f=!0;if(f){if(r.url!==void 0){const j=e;if(typeof r.url!="string")return ye.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=j===e}else var f=!0;if(f){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 c in j){const S=e;if(typeof j[c]!="string")return ye.errors=[{instancePath:t+"/headers/"+c.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=S===e;if(!y)break}else return ye.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=ee===e}else var f=!0;if(f)if(r.body!==void 0){let j=r.body;const ee=e,V=e;let te=!1;const c=e;if(typeof j!="string"){const g={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[g]:s.push(g),e++}var N=c===e;if(te=te||N,!te){const g=e;if(e===g)if(j&&typeof j=="object"&&!Array.isArray(j)){let P;if(j.BYTES_PER_ELEMENT===void 0&&(P="BYTES_PER_ELEMENT")||j.buffer===void 0&&(P="buffer")||j.byteLength===void 0&&(P="byteLength")||j.byteOffset===void 0&&(P="byteOffset")||j.length===void 0&&(P="length")){const v={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:P},message:"must have required property '"+P+"'"};s===null?s=[v]:s.push(v),e++}else{const v=e;for(const h in j)if(!(h==="BYTES_PER_ELEMENT"||h==="buffer"||h==="byteLength"||h==="byteOffset"||h==="length")){let b=j[h];const q=e;if(!(typeof b=="number"&&isFinite(b))){const R={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=[R]:s.push(R),e++}var L=q===e;if(!L)break}if(v===e){if(j.BYTES_PER_ELEMENT!==void 0){let h=j.BYTES_PER_ELEMENT;const b=e;if(!(typeof h=="number"&&isFinite(h))){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 T=b===e}else var T=!0;if(T){if(j.buffer!==void 0){let h=j.buffer;const b=e;if(e===b)if(h&&typeof h=="object"&&!Array.isArray(h)){let R;if(h.byteLength===void 0&&(R="byteLength")){const C={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"};s===null?s=[C]:s.push(C),e++}else{const C=e;for(const F in h)if(F!=="byteLength"){const U={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=[U]:s.push(U),e++;break}if(C===e&&h.byteLength!==void 0){let F=h.byteLength;if(!(typeof F=="number"&&isFinite(F))){const U={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=[U]:s.push(U),e++}}}}else{const R={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[R]:s.push(R),e++}var T=b===e}else var T=!0;if(T){if(j.byteLength!==void 0){let h=j.byteLength;const b=e;if(!(typeof h=="number"&&isFinite(h))){const R={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var T=b===e}else var T=!0;if(T){if(j.byteOffset!==void 0){let h=j.byteOffset;const b=e;if(!(typeof h=="number"&&isFinite(h))){const R={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var T=b===e}else var T=!0;if(T)if(j.length!==void 0){let h=j.length;const b=e;if(!(typeof h=="number"&&isFinite(h))){const R={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var T=b===e}else var T=!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 N=g===e;if(te=te||N,!te){const P=e;if(e===P)if(j&&typeof j=="object"&&!Array.isArray(j))for(const h in j){let b=j[h];const q=e,R=e;let C=!1;const F=e;if(typeof b!="string"){const U={instancePath:t+"/body/"+h.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=[U]:s.push(U),e++}var _=F===e;if(C=C||_,!C){const U=e;if(e===U)if(b&&typeof b=="object"&&!Array.isArray(b)){let I;if(b.BYTES_PER_ELEMENT===void 0&&(I="BYTES_PER_ELEMENT")||b.buffer===void 0&&(I="buffer")||b.byteLength===void 0&&(I="byteLength")||b.byteOffset===void 0&&(I="byteOffset")||b.length===void 0&&(I="length")){const re={instancePath:t+"/body/"+h.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=[re]:s.push(re),e++}else{const re=e;for(const A in b)if(!(A==="BYTES_PER_ELEMENT"||A==="buffer"||A==="byteLength"||A==="byteOffset"||A==="length")){let Y=b[A];const M=e;if(!(typeof Y=="number"&&isFinite(Y))){const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++}var k=M===e;if(!k)break}if(re===e){if(b.BYTES_PER_ELEMENT!==void 0){let A=b.BYTES_PER_ELEMENT;const Y=e;if(!(typeof A=="number"&&isFinite(A))){const M={instancePath:t+"/body/"+h.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 $=Y===e}else var $=!0;if($){if(b.buffer!==void 0){let A=b.buffer;const Y=e;if(e===Y)if(A&&typeof A=="object"&&!Array.isArray(A)){let H;if(A.byteLength===void 0&&(H="byteLength")){const oe={instancePath:t+"/body/"+h.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:H},message:"must have required property '"+H+"'"};s===null?s=[oe]:s.push(oe),e++}else{const oe=e;for(const de in A)if(de!=="byteLength"){const ge={instancePath:t+"/body/"+h.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=[ge]:s.push(ge),e++;break}if(oe===e&&A.byteLength!==void 0){let de=A.byteLength;if(!(typeof de=="number"&&isFinite(de))){const ge={instancePath:t+"/body/"+h.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=[ge]:s.push(ge),e++}}}}else{const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++}var $=Y===e}else var $=!0;if($){if(b.byteLength!==void 0){let A=b.byteLength;const Y=e;if(!(typeof A=="number"&&isFinite(A))){const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++}var $=Y===e}else var $=!0;if($){if(b.byteOffset!==void 0){let A=b.byteOffset;const Y=e;if(!(typeof A=="number"&&isFinite(A))){const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++}var $=Y===e}else var $=!0;if($)if(b.length!==void 0){let A=b.length;const Y=e;if(!(typeof A=="number"&&isFinite(A))){const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++}var $=Y===e}else var $=!0}}}}}}else{const I={instancePath:t+"/body/"+h.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 _=U===e;if(C=C||_,!C){const I=e;if(e===I)if(b&&typeof b=="object"&&!Array.isArray(b)){let A;if(b.lastModified===void 0&&(A="lastModified")||b.name===void 0&&(A="name")||b.size===void 0&&(A="size")||b.type===void 0&&(A="type")||b.webkitRelativePath===void 0&&(A="webkitRelativePath")){const Y={instancePath:t+"/body/"+h.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=[Y]:s.push(Y),e++}else{const Y=e;for(const M in b)if(!(M==="size"||M==="type"||M==="lastModified"||M==="name"||M==="webkitRelativePath")){const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++;break}if(Y===e){if(b.size!==void 0){let M=b.size;const H=e;if(!(typeof M=="number"&&isFinite(M))){const oe={instancePath:t+"/body/"+h.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 m=H===e}else var m=!0;if(m){if(b.type!==void 0){const M=e;if(typeof b.type!="string"){const oe={instancePath:t+"/body/"+h.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 m=M===e}else var m=!0;if(m){if(b.lastModified!==void 0){let M=b.lastModified;const H=e;if(!(typeof M=="number"&&isFinite(M))){const de={instancePath:t+"/body/"+h.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 m=H===e}else var m=!0;if(m){if(b.name!==void 0){const M=e;if(typeof b.name!="string"){const oe={instancePath:t+"/body/"+h.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 m=M===e}else var m=!0;if(m)if(b.webkitRelativePath!==void 0){const M=e;if(typeof b.webkitRelativePath!="string"){const oe={instancePath:t+"/body/"+h.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 m=M===e}else var m=!0}}}}}}else{const A={instancePath:t+"/body/"+h.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 _=I===e;C=C||_}}if(C)e=R,s!==null&&(R?s.length=R:s=null);else{const U={instancePath:t+"/body/"+h.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=[U]:s.push(U),e++}var W=q===e;if(!W)break}else{const h={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[h]:s.push(h),e++}var N=P===e;te=te||N}}if(te)e=V,s!==null&&(V?s.length=V:s=null);else{const g={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[g]:s.push(g),e++,ye.errors=s,!1}var f=ee===e}else var f=!0}}}}}else return ye.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ye.errors=s,e===0}const Nt={properties:{relativeUri:{type:"string",description:"Request path following the domain:port part."},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 $=e;for(const m in r)if(!Kr.call(Nt.properties,m))return pe.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if($===e){if(r.relativeUri!==void 0){const m=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 f=m===e}else var f=!0;if(f){if(r.scriptPath!==void 0){const m=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 f=m===e}else var f=!0;if(f){if(r.protocol!==void 0){const m=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 f=m===e}else var f=!0;if(f){if(r.method!==void 0){let m=r.method;const W=e;if(typeof m!="string")return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(m==="GET"||m==="POST"||m==="HEAD"||m==="OPTIONS"||m==="PATCH"||m==="PUT"||m==="DELETE"))return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:et.enum},message:"must be equal to one of the allowed values"}],!1;var f=W===e}else var f=!0;if(f){if(r.headers!==void 0){let m=r.headers;const W=e;if(e===e)if(m&&typeof m=="object"&&!Array.isArray(m))for(const j in m){const ee=e;if(typeof m[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 y=ee===e;if(!y)break}else return pe.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=W===e}else var f=!0;if(f){if(r.body!==void 0){let m=r.body;const W=e,z=e;let G=!1;const j=e;if(typeof m!="string"){const V={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[V]:s.push(V),e++}var N=j===e;if(G=G||N,!G){const V=e;if(e===V)if(m&&typeof m=="object"&&!Array.isArray(m)){let c;if(m.BYTES_PER_ELEMENT===void 0&&(c="BYTES_PER_ELEMENT")||m.buffer===void 0&&(c="buffer")||m.byteLength===void 0&&(c="byteLength")||m.byteOffset===void 0&&(c="byteOffset")||m.length===void 0&&(c="length")){const S={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/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 g in m)if(!(g==="BYTES_PER_ELEMENT"||g==="buffer"||g==="byteLength"||g==="byteOffset"||g==="length")){let w=m[g];const P=e;if(!(typeof w=="number"&&isFinite(w))){const v={instancePath:t+"/body/"+g.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=[v]:s.push(v),e++}var L=P===e;if(!L)break}if(S===e){if(m.BYTES_PER_ELEMENT!==void 0){let g=m.BYTES_PER_ELEMENT;const w=e;if(!(typeof g=="number"&&isFinite(g))){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 T=w===e}else var T=!0;if(T){if(m.buffer!==void 0){let g=m.buffer;const w=e;if(e===w)if(g&&typeof g=="object"&&!Array.isArray(g)){let v;if(g.byteLength===void 0&&(v="byteLength")){const h={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"};s===null?s=[h]:s.push(h),e++}else{const h=e;for(const b in g)if(b!=="byteLength"){const q={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:b},message:"must NOT have additional properties"};s===null?s=[q]:s.push(q),e++;break}if(h===e&&g.byteLength!==void 0){let b=g.byteLength;if(!(typeof b=="number"&&isFinite(b))){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 v={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[v]:s.push(v),e++}var T=w===e}else var T=!0;if(T){if(m.byteLength!==void 0){let g=m.byteLength;const w=e;if(!(typeof g=="number"&&isFinite(g))){const v={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[v]:s.push(v),e++}var T=w===e}else var T=!0;if(T){if(m.byteOffset!==void 0){let g=m.byteOffset;const w=e;if(!(typeof g=="number"&&isFinite(g))){const v={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[v]:s.push(v),e++}var T=w===e}else var T=!0;if(T)if(m.length!==void 0){let g=m.length;const w=e;if(!(typeof g=="number"&&isFinite(g))){const v={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[v]:s.push(v),e++}var T=w===e}else var T=!0}}}}}}else{const c={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[c]:s.push(c),e++}var N=V===e;G=G||N}if(G)e=z,s!==null&&(z?s.length=z:s=null);else{const V={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[V]:s.push(V),e++,pe.errors=s,!1}var f=W===e}else var f=!0;if(f){if(r.env!==void 0){let m=r.env;const W=e;if(e===W)if(m&&typeof m=="object"&&!Array.isArray(m))for(const G in m){const j=e;if(typeof m[G]!="string")return pe.errors=[{instancePath:t+"/env/"+G.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=j===e;if(!_)break}else return pe.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=W===e}else var f=!0;if(f){if(r.$_SERVER!==void 0){let m=r.$_SERVER;const W=e;if(e===W)if(m&&typeof m=="object"&&!Array.isArray(m))for(const G in m){const j=e;if(typeof m[G]!="string")return pe.errors=[{instancePath:t+"/$_SERVER/"+G.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/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+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=W===e}else var f=!0;if(f)if(r.code!==void 0){const m=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 f=m===e}else var f=!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 pr;if(r.step===void 0&&(pr="step"))return o.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:pr},message:"must have required property '"+pr+"'"}],!1;{const J=r.step;if(typeof J=="string")if(J==="activatePlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let l;if(r.pluginPath===void 0&&(l="pluginPath")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 f=E===e}else var f=!0;if(f)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 f=a===e}else var f=!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 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/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 y=p===e}else var y=!0;if(y){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 y=i===e}else var y=!0;if(y)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 y=i===e}else var y=!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 l;if(r.step===void 0&&(l="step")||r.themeFolderName===void 0&&(l="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 N=E===e}else var N=!0;if(N)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 N=a===e}else var N=!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 L=p===e}else var L=!0;if(L){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 L=p===e}else var L=!0;if(L)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 L=i===e}else var L=!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 l;if(r.fromPath===void 0&&(l="fromPath")||r.step===void 0&&(l="step")||r.toPath===void 0&&(l="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/2/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/2/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/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 _=p===e}else var _=!0;if(_){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 _=i===e}else var _=!0;if(_)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 _=i===e}else var _=!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 l;if(r.consts===void 0&&(l="consts")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 k=E===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/3/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/3/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/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 $=p===e}else var $=!0;if($){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 $=p===e}else var $=!0;if($){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:er.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var $=p===e}else var $=!0;if($)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 $=i===e}else var $=!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 l;if(r.siteUrl===void 0&&(l="siteUrl")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/4/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/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var W=p===e}else var W=!0;if(W){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 W=p===e}else var W=!0;if(W)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 W=i===e}else var W=!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 l;if(r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 z=E===e}else var z=!0;if(z)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 z=a===e}else var z=!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 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/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 G=p===e}else var G=!0;if(G)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 G=i===e}else var G=!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 l;if(r.file===void 0&&(l="file")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/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=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/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=p===e}else var ee=!0;if(ee){if(r.file!==void 0){const i=e;K(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var ee=i===e}else var ee=!0;if(ee)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:er.oneOf[6].properties.importer.enum},message:"must be equal to one of the allowed values"}],!1;var ee=p===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 l;if(r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/7/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/7/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var te=p===e}else var te=!0;if(te){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 te=p===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 l;if(r.step===void 0&&(l="step")||r.wordPressFilesZip===void 0&&(l="wordPressFilesZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/8/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/8/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/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 S=p===e}else var S=!0;if(S){if(r.wordPressFilesZip!==void 0){const i=e;K(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var S=i===e}else var S=!0;if(S)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 S=i===e}else var S=!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 l;if(r.pluginData===void 0&&(l="pluginData")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 g=E===e}else var g=!0;if(g)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 g=a===e}else var g=!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=p===e}else var w=!0;if(w){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:er.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var w=p===e}else var w=!0;if(w){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 w=p===e}else var w=!0;if(w){if(r.pluginData!==void 0){let i=r.pluginData;const p=e,O=e;let a=!1;const E=e;K(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var P=E===e;if(a=a||P,!a){const X=e;he(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:u})||(s=s===null?he.errors:s.concat(he.errors),e=s.length);var P=X===e;a=a||P}if(a)e=O,s!==null&&(O?s.length=O: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=p===e}else var w=!0;if(w){if(r.pluginZipFile!==void 0){const i=e;K(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var w=i===e}else var w=!0;if(w)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 v=ie===e}else var v=!0;if(v)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 v=ie===e}else var v=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var w=p===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 l;if(r.step===void 0&&(l="step")||r.themeData===void 0&&(l="themeData"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/10/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/10/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/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:er.oneOf[10].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/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 b=p===e}else var b=!0;if(b){if(r.themeData!==void 0){let i=r.themeData;const p=e,O=e;let a=!1;const E=e;K(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var q=E===e;if(a=a||q,!a){const X=e;he(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:u})||(s=s===null?he.errors:s.concat(he.errors),e=s.length);var q=X===e;a=a||q}if(a)e=O,s!==null&&(O?s.length=O: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 b=p===e}else var b=!0;if(b){if(r.themeZipFile!==void 0){const i=e;K(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:u})||(s=s===null?K.errors:s.concat(K.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==="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 R=ie===e}else var R=!0;if(R){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 R=ie===e}else var R=!0;if(R)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 R=ie===e}else var R=!0}}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/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/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 l;if(r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/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=p===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 l;if(r.path===void 0&&(l="path")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 U=E===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/12/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/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(J==="mv"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let l;if(r.fromPath===void 0&&(l="fromPath")||r.step===void 0&&(l="step")||r.toPath===void 0&&(l="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/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=p===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 l;if(r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/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 Y=p===e}else var Y=!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 l;if(r.request===void 0&&(l="request")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 H=p===e}else var H=!0;if(H){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 H=p===e}else var H=!0;if(H)if(r.request!==void 0){const i=e;ye(r.request,{instancePath:t+"/request",parentData:r,parentDataProperty:"request",rootData:u})||(s=s===null?ye.errors:s.concat(ye.errors),e=s.length);var H=i===e}else var H=!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 l;if(r.path===void 0&&(l="path")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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(J==="rmdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let l;if(r.path===void 0&&(l="path")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/17/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/17/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/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 Ee=p===e}else var Ee=!0;if(Ee)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 Ee=i===e}else var Ee=!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 l;if(r.code===void 0&&(l="code")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 Ie=E===e}else var Ie=!0;if(Ie)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 Ie=a===e}else var Ie=!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 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/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 qe=p===e}else var qe=!0;if(qe)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 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 ar=E===e;if(a=a||ar,!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 Te={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=[Te]:s.push(Te),e++}else{const Te=e;for(const ne in i)if(!(ne==="filename"||ne==="content")){const _e={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=[_e]:s.push(_e),e++;break}if(Te===e){if(i.filename!==void 0){const ne=e;if(typeof i.filename!="string"){const _e={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=[_e]:s.push(_e),e++}var We=ne===e}else var We=!0;if(We)if(i.content!==void 0){const ne=e;if(typeof i.content!="string"){const Q={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=[Q]:s.push(Q),e++}var We=ne===e}else var We=!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 ar=X===e;a=a||ar}if(a)e=O,s!==null&&(O?s.length=O: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 qe=p===e}else var qe=!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 l;if(r.options===void 0&&(l="options")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/19/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/19/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/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 $e=p===e}else var $e=!0;if($e)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 $e=i===e}else var $e=!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 l;if(r.options===void 0&&(l="options")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/20/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/20/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/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 Ae=p===e}else var Ae=!0;if(Ae)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 Ve=ie===e}else var Ve=!0;if(Ve)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 Ve=ie===e}else var Ve=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=p===e}else var Ae=!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 l;if(r.sql===void 0&&(l="sql")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/21/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/21/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/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 Re=p===e}else var Re=!0;if(Re)if(r.sql!==void 0){const i=e;K(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var Re=i===e}else var Re=!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 l;if(r.options===void 0&&(l="options")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/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=p===e}else var Fe=!0;if(Fe)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 Fe=p===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 l;if(r.extractToPath===void 0&&(l="extractToPath")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/23/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/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ue=p===e}else var ue=!0;if(ue){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 ue=p===e}else var ue=!0;if(ue){if(r.zipFile!==void 0){const i=e;K(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var ue=i===e}else var ue=!0;if(ue){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 ue=i===e}else var ue=!0;if(ue)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 ue=i===e}else var ue=!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 l;if(r.meta===void 0&&(l="meta")||r.step===void 0&&(l="step")||r.userId===void 0&&(l="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/24/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/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var be=p===e}else var be=!0;if(be){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 be=p===e}else var be=!0;if(be){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 be=p===e}else var be=!0;if(be)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 be=p===e}else var be=!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 l;if(r.data===void 0&&(l="data")||r.path===void 0&&(l="path")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/25/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/25/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/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 we=p===e}else var we=!0;if(we){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 we=i===e}else var we=!0;if(we)if(r.data!==void 0){let i=r.data;const p=e,O=e;let a=!1;const E=e;K(i,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var Ne=E===e;if(a=a||Ne,!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 Ne=X===e;if(a=a||Ne,!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 _e={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=[_e]:s.push(_e),e++}else{const _e=e;for(const Q in i)if(!(Q==="BYTES_PER_ELEMENT"||Q==="buffer"||Q==="byteLength"||Q==="byteOffset"||Q==="length")){let me=i[Q];const Xe=e;if(!(typeof me=="number"&&isFinite(me))){const fe={instancePath:t+"/data/"+Q.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 ot=Xe===e;if(!ot)break}if(_e===e){if(i.BYTES_PER_ELEMENT!==void 0){let Q=i.BYTES_PER_ELEMENT;const me=e;if(!(typeof Q=="number"&&isFinite(Q))){const Xe={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=[Xe]:s.push(Xe),e++}var ce=me===e}else var ce=!0;if(ce){if(i.buffer!==void 0){let Q=i.buffer;const me=e;if(e===me)if(Q&&typeof Q=="object"&&!Array.isArray(Q)){let fe;if(Q.byteLength===void 0&&(fe="byteLength")){const Ke={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=[Ke]:s.push(Ke),e++}else{const Ke=e;for(const xe in Q)if(xe!=="byteLength"){const Ce={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:xe},message:"must NOT have additional properties"};s===null?s=[Ce]:s.push(Ce),e++;break}if(Ke===e&&Q.byteLength!==void 0){let xe=Q.byteLength;if(!(typeof xe=="number"&&isFinite(xe))){const Ce={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=[Ce]:s.push(Ce),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 ce=me===e}else var ce=!0;if(ce){if(i.byteLength!==void 0){let Q=i.byteLength;const me=e;if(!(typeof Q=="number"&&isFinite(Q))){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 ce=me===e}else var ce=!0;if(ce){if(i.byteOffset!==void 0){let Q=i.byteOffset;const me=e;if(!(typeof Q=="number"&&isFinite(Q))){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 ce=me===e}else var ce=!0;if(ce)if(i.length!==void 0){let Q=i.length;const me=e;if(!(typeof Q=="number"&&isFinite(Q))){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 ce=me===e}else var ce=!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 Ne=le===e;a=a||Ne}}if(a)e=O,s!==null&&(O?s.length=O: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 we=p===e}else var we=!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 l;if(r.filesTree===void 0&&(l="filesTree")||r.step===void 0&&(l="step")||r.writeToPath===void 0&&(l="writeToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/26/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/26/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/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 ve=p===e}else var ve=!0;if(ve){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 ve=i===e}else var ve=!0;if(ve)if(r.filesTree!==void 0){const i=e;he(r.filesTree,{instancePath:t+"/filesTree",parentData:r,parentDataProperty:"filesTree",rootData:u})||(s=s===null?he.errors:s.concat(he.errors),e=s.length);var ve=i===e}else var ve=!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 l;if(r.command===void 0&&(l="command")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/27/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/27/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/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 Pe=p===e}else var Pe=!0;if(Pe){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 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 nr=E===e;if(a=a||nr,!a){const X=e;if(e===X)if(Array.isArray(i)){var _r=!0;const le=i.length;for(let Te=0;Te<le;Te++){const ne=e;if(typeof i[Te]!="string"){const Q={instancePath:t+"/command/"+Te,schemaPath:"#/oneOf/27/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Q]:s.push(Q),e++}var _r=ne===e;if(!_r)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 nr=X===e;a=a||nr}if(a)e=O,s!==null&&(O?s.length=O: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 Pe=p===e}else var Pe=!0;if(Pe)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 Pe=i===e}else var Pe=!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 l;if(r.language===void 0&&(l="language")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/28/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/28/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/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 Le=p===e}else var Le=!0;if(Le)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 Le=i===e}else var Le=!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 Z(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 te=e;for(const c in r)if(!Kr.call(Rt.properties,c))return Z.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"}],!1;if(te===e){if(r.landingPage!==void 0){const c=e;if(typeof r.landingPage!="string")return Z.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=c===e}else var f=!0;if(f){if(r.description!==void 0){const c=e;if(typeof r.description!="string")return Z.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=c===e}else var f=!0;if(f){if(r.meta!==void 0){let c=r.meta;const S=e;if(e===S)if(c&&typeof c=="object"&&!Array.isArray(c)){let w;if(c.title===void 0&&(w="title")||c.author===void 0&&(w="author"))return Z.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:w},message:"must have required property '"+w+"'"}],!1;{const P=e;for(const v in c)if(!(v==="title"||v==="description"||v==="author"||v==="categories"))return Z.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"}],!1;if(P===e){if(c.title!==void 0){const v=e;if(typeof c.title!="string")return Z.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=v===e}else var y=!0;if(y){if(c.description!==void 0){const v=e;if(typeof c.description!="string")return Z.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=v===e}else var y=!0;if(y){if(c.author!==void 0){const v=e;if(typeof c.author!="string")return Z.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=v===e}else var y=!0;if(y)if(c.categories!==void 0){let v=c.categories;const h=e;if(e===h)if(Array.isArray(v)){var N=!0;const q=v.length;for(let R=0;R<q;R++){const C=e;if(typeof v[R]!="string")return Z.errors=[{instancePath:t+"/meta/categories/"+R,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=C===e;if(!N)break}}else return Z.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var y=h===e}else var y=!0}}}}}else return Z.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=S===e}else var f=!0;if(f){if(r.preferredVersions!==void 0){let c=r.preferredVersions;const S=e;if(e===S)if(c&&typeof c=="object"&&!Array.isArray(c)){let w;if(c.php===void 0&&(w="php")||c.wp===void 0&&(w="wp"))return Z.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:w},message:"must have required property '"+w+"'"}],!1;{const P=e;for(const v in c)if(!(v==="php"||v==="wp"))return Z.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"}],!1;if(P===e){if(c.php!==void 0){let v=c.php;const h=e,b=e;let q=!1;const R=e;if(typeof v!="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(!(v==="8.4"||v==="8.3"||v==="8.2"||v==="8.1"||v==="8.0"||v==="7.4"||v==="7.3"||v==="7.2")){const C={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:Ft.enum},message:"must be equal to one of the allowed values"};s===null?s=[C]:s.push(C),e++}var L=R===e;if(q=q||L,!q){const C=e;if(typeof v!="string"){const U={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[U]:s.push(U),e++}if(v!=="latest"){const U={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=[U]:s.push(U),e++}var L=C===e;q=q||L}if(q)e=b,s!==null&&(b?s.length=b: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++,Z.errors=s,!1}var T=h===e}else var T=!0;if(T)if(c.wp!==void 0){const v=e;if(typeof c.wp!="string")return Z.errors=[{instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var T=v===e}else var T=!0}}}else return Z.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=S===e}else var f=!0;if(f){if(r.features!==void 0){let c=r.features;const S=e;if(e===S)if(c&&typeof c=="object"&&!Array.isArray(c)){const w=e;for(const P in c)if(!(P==="intl"||P==="networking"))return Z.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(w===e){if(c.intl!==void 0){const P=e;if(typeof c.intl!="boolean")return Z.errors=[{instancePath:t+"/features/intl",schemaPath:"#/properties/features/properties/intl/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var _=P===e}else var _=!0;if(_)if(c.networking!==void 0){const P=e;if(typeof c.networking!="boolean")return Z.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var _=P===e}else var _=!0}}else return Z.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=S===e}else var f=!0;if(f){if(r.extraLibraries!==void 0){let c=r.extraLibraries;const S=e;if(e===S)if(Array.isArray(c)){var k=!0;const w=c.length;for(let P=0;P<w;P++){let v=c[P];const h=e;if(typeof v!="string")return Z.errors=[{instancePath:t+"/extraLibraries/"+P,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(v!=="wp-cli")return Z.errors=[{instancePath:t+"/extraLibraries/"+P,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var k=h===e;if(!k)break}}else return Z.errors=[{instancePath:t+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=S===e}else var f=!0;if(f){if(r.constants!==void 0){let c=r.constants;const S=e;if(e===e)if(c&&typeof c=="object"&&!Array.isArray(c))for(const P in c){let v=c[P];const h=e;if(typeof v!="string"&&typeof v!="boolean"&&!(typeof v=="number"&&isFinite(v)))return Z.errors=[{instancePath:t+"/constants/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPConstants/additionalProperties/type",keyword:"type",params:{type:Lt.additionalProperties.type},message:"must be string,boolean,number"}],!1;var $=h===e;if(!$)break}else return Z.errors=[{instancePath:t+"/constants",schemaPath:"#/definitions/PHPConstants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=S===e}else var f=!0;if(f){if(r.plugins!==void 0){let c=r.plugins;const S=e;if(e===S)if(Array.isArray(c)){var m=!0;const w=c.length;for(let P=0;P<w;P++){let v=c[P];const h=e,b=e;let q=!1;const R=e;if(typeof v!="string"){const F={instancePath:t+"/plugins/"+P,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 W=R===e;if(q=q||W,!q){const F=e;K(v,{instancePath:t+"/plugins/"+P,parentData:c,parentDataProperty:P,rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var W=F===e;q=q||W}if(q)e=b,s!==null&&(b?s.length=b:s=null);else{const F={instancePath:t+"/plugins/"+P,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[F]:s.push(F),e++,Z.errors=s,!1}var m=h===e;if(!m)break}}else return Z.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=S===e}else var f=!0;if(f){if(r.siteOptions!==void 0){let c=r.siteOptions;const S=e;if(e===S)if(c&&typeof c=="object"&&!Array.isArray(c)){const w=e;for(const P in c)if(P!=="blogname"){const v=e;if(typeof c[P]!="string")return Z.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 z=v===e;if(!z)break}if(w===e&&c.blogname!==void 0&&typeof c.blogname!="string")return Z.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return Z.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=S===e}else var f=!0;if(f){if(r.login!==void 0){let c=r.login;const S=e,g=e;let w=!1;const P=e;if(typeof c!="boolean"){const h={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[h]:s.push(h),e++}var G=P===e;if(w=w||G,!w){const h=e;if(e===h)if(c&&typeof c=="object"&&!Array.isArray(c)){let q;if(c.username===void 0&&(q="username")||c.password===void 0&&(q="password")){const R={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:q},message:"must have required property '"+q+"'"};s===null?s=[R]:s.push(R),e++}else{const R=e;for(const C in c)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(R===e){if(c.username!==void 0){const C=e;if(typeof c.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(c.password!==void 0){const C=e;if(typeof c.password!="string"){const U={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[U]:s.push(U),e++}var j=C===e}else var j=!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 G=h===e;w=w||G}if(w)e=g,s!==null&&(g?s.length=g:s=null);else{const h={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[h]:s.push(h),e++,Z.errors=s,!1}var f=S===e}else var f=!0;if(f){if(r.steps!==void 0){let c=r.steps;const S=e;if(e===S)if(Array.isArray(c)){var ee=!0;const w=c.length;for(let P=0;P<w;P++){let v=c[P];const h=e,b=e;let q=!1;const R=e;o(v,{instancePath:t+"/steps/"+P,parentData:c,parentDataProperty:P,rootData:u})||(s=s===null?o.errors:s.concat(o.errors),e=s.length);var V=R===e;if(q=q||V,!q){const F=e;if(typeof v!="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 V=F===e;if(q=q||V,!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 V=D===e;if(q=q||V,!q){const A=e;if(typeof v!="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(v!==!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 V=A===e;if(q=q||V,!q){const M=e;if(v!==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 V=M===e;q=q||V}}}}if(q)e=b,s!==null&&(b?s.length=b:s=null);else{const F={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[F]:s.push(F),e++,Z.errors=s,!1}var ee=h===e;if(!ee)break}}else return Z.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=S===e}else var f=!0;if(f)if(r.$schema!==void 0){const c=e;if(typeof r.$schema!="string")return Z.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=c===e}else var f=!0}}}}}}}}}}}}else return Z.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Z.errors=s,e===0}function rr(r,{instancePath:t="",parentData:n,parentDataProperty:d,rootData:u=r}={}){let s=null,e=0;return Z(r,{instancePath:t,parentData:n,parentDataProperty:d,rootData:u})||(s=s===null?Z.errors:s.concat(Z.errors),e=s.length),rr.errors=s,e===0}const{wpCLI:xt,...Or}=At,Ct={...Or,"wp-cli":xt,importFile:Or.importWxr};async function rt(r,t={}){const n={...t};let d;return Pr(r)?(d=await tt(r),n.streamBundledFile=function(...u){return r.read(...u)}):d=r,Dt(d,n)}function Pr(r){return r&&"read"in r&&typeof r.read=="function"}async function tt(r){if(!Pr(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}function Dt(r,{progress:t=new fr.ProgressTracker,semaphore:n=new B.Semaphore({concurrency:3}),onStepCompleted:d=()=>{},onBlueprintValidated:u=()=>{},corsProxy:s,streamBundledFile:e,additionalSteps:f}={}){var m,W,z,G,j,ee,V,te,c,S;r=structuredClone(r),r={...r,steps:(r.steps||[]).filter(Ut).filter(Bt)},r.steps=[...r.steps||[],...f||[]];for(const g of r.steps)!g||typeof g!="object"||(g.step==="importFile"?(g.step="importWxr",ae.logger.warn('The "importFile" step is deprecated. Use "importWxr" instead.')):(g==null?void 0:g.step)==="installPlugin"&&"pluginZipFile"in g?(g.pluginData=g.pluginZipFile,ae.logger.warn('The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.')):(g==null?void 0:g.step)==="installTheme"&&"themeZipFile"in g&&(g.themeData=g.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 g=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(...g)}r.login&&r.steps.push({step:"login",...r.login===!0?{username:"admin"}:r.login});const y=((m=r.steps)==null?void 0:m.findIndex(g=>typeof g=="object"&&(g==null?void 0:g.step)&&["wp-cli","enableMultisite"].includes(g.step)))??-1;if((W=r==null?void 0:r.extraLibraries)!=null&&W.includes("wp-cli")||y!==-1){const g={step:"writeFile",data:Ot,path:hr};y===-1?(z=r.steps)==null||z.push(g):(G=r.steps)==null||G.splice(y,0,g)}const N=(j=r.steps)==null?void 0:j.findIndex(g=>typeof g=="object"&&(g==null?void 0:g.step)==="importWxr");N!==void 0&&N>-1&&((ee=r.steps)==null||ee.splice(N,0,{step:"installPlugin",pluginData:{resource:"wordpress.org/plugins",slug:"wordpress-importer"}}));const{valid:L,errors:T}=It(r);if(!L){const g=new Error(`Invalid blueprint: ${T[0].message} at ${T[0].instancePath}`);throw g.errors=T,g}u(r);const _=r.steps||[],k=_.reduce((g,w)=>{var P;return g+(((P=w.progress)==null?void 0:P.weight)||1)},0),$=_.map(g=>Vt(g,{semaphore:n,rootProgressTracker:t,totalProgressWeight:k,corsProxy:s,streamBundledFile:e}));return{versions:{php:Wt((V=r.preferredVersions)==null?void 0:V.php,De.SupportedPHPVersions,De.LatestSupportedPHPVersion),wp:((te=r.preferredVersions)==null?void 0:te.wp)||"latest"},features:{intl:((c=r.features)==null?void 0:c.intl)??!1,networking:((S=r.features)==null?void 0:S.networking)??!0},extraLibraries:r.extraLibraries||[],run:async g=>{try{for(const{resources:w}of $)for(const P of w)P.setPlayground(g),P.isAsync&&P.resolve().catch(()=>{});for(const[w,{run:P,step:v}]of Object.entries($))try{const h=await P(g);d(h,v)}catch(h){throw new Error(`Error when executing the blueprint step #${w} (${JSON.stringify(v)}) ${h instanceof Error?`: ${h.message}`:h}`,{cause:h})}}finally{try{const w=await g.pathToInternalUrl(r.landingPage||"/");await g.goTo("/index.php?playground-redirection-handler&next="+encodeURIComponent(w))}catch{}t.finish()}}}}function It(r){var u;const t=rr(r);if(t)return{valid:t};const n=new Set;for(const s of rr.errors)s.schemaPath.startsWith("#/properties/steps/items/anyOf")||n.add(s.instancePath);const d=(u=rr.errors)==null?void 0:u.filter(s=>!(s.schemaPath.startsWith("#/properties/steps/items/anyOf")&&n.has(s.instancePath)));return{valid:t,errors:d}}function Wt(r,t,n){return r&&t.includes(r)?r:n}function Ut(r){return!!(typeof r=="object"&&r)}function Bt(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 Vt(r,{semaphore:t,rootProgressTracker:n,totalProgressWeight:d,corsProxy:u,streamBundledFile:s}){var _;const e=n.stage((((_=r.progress)==null?void 0:_.weight)||1)/d),f={};for(const k of Object.keys(r)){let $=r[k];lt($)&&($=Oe.create($,{semaphore:t,corsProxy:u,streamBundledFile:s})),f[k]=$}const y=async k=>{var $;try{return e.fillSlowly(),await Ct[r.step](k,await Mt(f),{tracker:e,initialCaption:($=r.progress)==null?void 0:$.caption})}finally{e.finish()}},N=Tr(f),L=Tr(f).filter(k=>k.isAsync),T=1/(L.length+1);for(const k of L)k.progress=e.stage(T);return{run:y,step:r,resources:N}}function Tr(r){const t=[];for(const n in r){const d=r[n];d instanceof Oe&&t.push(d)}return t}async function Mt(r){const t={};for(const n in r){const d=r[n];d instanceof Oe?t[n]=await d.resolve():t[n]=d}return t}async function st(r,t){await r.run(t)}async function it(){const r=(await Promise.resolve().then(()=>require("./blueprints-DY7omvFh.cjs"))).default;return new File([r],"blueprints.phar",{type:"application/zip"})}function zt(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 Ht(r){var L,T;const t=r.cliArgs||[];for(const _ of t)if(_.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(_=>_.startsWith("--db-engine="))||t.push("--db-engine=sqlite");const d=r.php,u=(r==null?void 0:r.onMessage)||(()=>{}),s=await it();d.writeFile("/tmp/blueprints.phar",new Uint8Array(await s.arrayBuffer()));const e=zt(r.blueprint);let f="";switch(e.type){case"inline-file":d.writeFile("/tmp/blueprint.json",e.contents),f="/tmp/blueprint.json";break;case"file-reference":f=e.reference;break}const y=await d.onMessage(async _=>{try{const k=typeof _=="string"?JSON.parse(_):_;if(!k)return;await new Promise($=>setTimeout($,0)),k.type.startsWith("blueprint.")&&await u(k)}catch(k){ae.logger.warn("Failed to parse message as JSON:",_,k)}});await(d==null?void 0:d.writeFile("/tmp/run-blueprints.php",`<?php
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"]}]},Ct={additionalProperties:{anyOf:[{$ref:"#/definitions/FileTree"},{type:["object","string"]}]}},fr={validate:Se};function Se(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 N in r){let L=r[N];const T=e,_=e;let k=!1;const $=e;fr.validate(L,{instancePath:t+"/"+N.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:r,parentDataProperty:N,rootData:u})||(s=s===null?fr.validate.errors:s.concat(fr.validate.errors),e=s.length);var d=$===e;if(k=k||d,!k){const m=e;if(!(L&&typeof L=="object"&&!Array.isArray(L))&&typeof L!="string"){const z={instancePath:t+"/"+N.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf/1/type",keyword:"type",params:{type:Ct.additionalProperties.anyOf[1].type},message:"must be object,string"};s===null?s=[z]:s.push(z),e++}var d=m===e;k=k||d}if(k)e=_,s!==null&&(_?s.length=_:s=null);else{const m={instancePath:t+"/"+N.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[m]:s.push(m),e++,Se.errors=s,!1}var y=T===e;if(!y)break}else return Se.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Se.errors=s,e===0}function ke(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.files===void 0&&(y="files")||r.name===void 0&&(y="name")||r.resource===void 0&&(y="resource"))return ke.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:y},message:"must have required property '"+y+"'"}],!1;{const N=e;for(const L in r)if(!(L==="resource"||L==="files"||L==="name"))return ke.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:L},message:"must NOT have additional properties"}],!1;if(N===e){if(r.resource!==void 0){let L=r.resource;const T=e;if(typeof L!="string")return ke.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(L!=="literal:directory")return ke.errors=[{instancePath:t+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"literal:directory"},message:"must be equal to constant"}],!1;var d=T===e}else var d=!0;if(d){if(r.files!==void 0){const L=e;Se(r.files,{instancePath:t+"/files",parentData:r,parentDataProperty:"files",rootData:u})||(s=s===null?Se.errors:s.concat(Se.errors),e=s.length);var d=L===e}else var d=!0;if(d)if(r.name!==void 0){const L=e;if(typeof r.name!="string")return ke.errors=[{instancePath:t+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=L===e}else var d=!0}}}}else return ke.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ke.errors=s,e===0}function he(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;const d=e;let y=!1;const N=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let k;if(r.resource===void 0&&(k="resource")||r.url===void 0&&(k="url")||r.ref===void 0&&(k="ref")||r.path===void 0&&(k="path")){const $={instancePath:t,schemaPath:"#/definitions/GitDirectoryReference/required",keyword:"required",params:{missingProperty:k},message:"must have required property '"+k+"'"};s===null?s=[$]:s.push($),e++}else{const $=e;for(const m in r)if(!(m==="resource"||m==="url"||m==="ref"||m==="path")){const W={instancePath:t,schemaPath:"#/definitions/GitDirectoryReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};s===null?s=[W]:s.push(W),e++;break}if($===e){if(r.resource!==void 0){let m=r.resource;const W=e;if(typeof m!="string"){const z={instancePath:t+"/resource",schemaPath:"#/definitions/GitDirectoryReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[z]:s.push(z),e++}if(m!=="git:directory"){const z={instancePath:t+"/resource",schemaPath:"#/definitions/GitDirectoryReference/properties/resource/const",keyword:"const",params:{allowedValue:"git:directory"},message:"must be equal to constant"};s===null?s=[z]:s.push(z),e++}var T=W===e}else var T=!0;if(T){if(r.url!==void 0){const m=e;if(typeof r.url!="string"){const z={instancePath:t+"/url",schemaPath:"#/definitions/GitDirectoryReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[z]:s.push(z),e++}var T=m===e}else var T=!0;if(T){if(r.ref!==void 0){const m=e;if(typeof r.ref!="string"){const z={instancePath:t+"/ref",schemaPath:"#/definitions/GitDirectoryReference/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[z]:s.push(z),e++}var T=m===e}else var T=!0;if(T)if(r.path!==void 0){const m=e;if(typeof r.path!="string"){const z={instancePath:t+"/path",schemaPath:"#/definitions/GitDirectoryReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[z]:s.push(z),e++}var T=m===e}else var T=!0}}}}}else{const k={instancePath:t,schemaPath:"#/definitions/GitDirectoryReference/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[k]:s.push(k),e++}var _=N===e;if(y=y||_,!y){const k=e;ke(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:u})||(s=s===null?ke.errors:s.concat(ke.errors),e=s.length);var _=k===e;y=y||_}if(y)e=d,s!==null&&(d?s.length=d:s=null);else{const k={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[k]:s.push(k),e++,he.errors=s,!1}return he.errors=s,e===0}const st={enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function ye(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 z;if(r.url===void 0&&(z="url"))return ye.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:z},message:"must have required property '"+z+"'"}],!1;{const G=e;for(const j in r)if(!(j==="method"||j==="url"||j==="headers"||j==="body"))return ye.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:j},message:"must NOT have additional properties"}],!1;if(G===e){if(r.method!==void 0){let j=r.method;const ee=e;if(typeof j!="string")return ye.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 ye.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:st.enum},message:"must be equal to one of the allowed values"}],!1;var d=ee===e}else var d=!0;if(d){if(r.url!==void 0){const j=e;if(typeof r.url!="string")return ye.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=j===e}else var d=!0;if(d){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 c in j){const S=e;if(typeof j[c]!="string")return ye.errors=[{instancePath:t+"/headers/"+c.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=S===e;if(!y)break}else return ye.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=ee===e}else var d=!0;if(d)if(r.body!==void 0){let j=r.body;const ee=e,V=e;let te=!1;const c=e;if(typeof j!="string"){const g={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[g]:s.push(g),e++}var N=c===e;if(te=te||N,!te){const g=e;if(e===g)if(j&&typeof j=="object"&&!Array.isArray(j)){let P;if(j.BYTES_PER_ELEMENT===void 0&&(P="BYTES_PER_ELEMENT")||j.buffer===void 0&&(P="buffer")||j.byteLength===void 0&&(P="byteLength")||j.byteOffset===void 0&&(P="byteOffset")||j.length===void 0&&(P="length")){const v={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:P},message:"must have required property '"+P+"'"};s===null?s=[v]:s.push(v),e++}else{const v=e;for(const h in j)if(!(h==="BYTES_PER_ELEMENT"||h==="buffer"||h==="byteLength"||h==="byteOffset"||h==="length")){let b=j[h];const q=e;if(!(typeof b=="number"&&isFinite(b))){const R={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=[R]:s.push(R),e++}var L=q===e;if(!L)break}if(v===e){if(j.BYTES_PER_ELEMENT!==void 0){let h=j.BYTES_PER_ELEMENT;const b=e;if(!(typeof h=="number"&&isFinite(h))){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 T=b===e}else var T=!0;if(T){if(j.buffer!==void 0){let h=j.buffer;const b=e;if(e===b)if(h&&typeof h=="object"&&!Array.isArray(h)){let R;if(h.byteLength===void 0&&(R="byteLength")){const C={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"};s===null?s=[C]:s.push(C),e++}else{const C=e;for(const F in h)if(F!=="byteLength"){const U={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=[U]:s.push(U),e++;break}if(C===e&&h.byteLength!==void 0){let F=h.byteLength;if(!(typeof F=="number"&&isFinite(F))){const U={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=[U]:s.push(U),e++}}}}else{const R={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[R]:s.push(R),e++}var T=b===e}else var T=!0;if(T){if(j.byteLength!==void 0){let h=j.byteLength;const b=e;if(!(typeof h=="number"&&isFinite(h))){const R={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var T=b===e}else var T=!0;if(T){if(j.byteOffset!==void 0){let h=j.byteOffset;const b=e;if(!(typeof h=="number"&&isFinite(h))){const R={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var T=b===e}else var T=!0;if(T)if(j.length!==void 0){let h=j.length;const b=e;if(!(typeof h=="number"&&isFinite(h))){const R={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[R]:s.push(R),e++}var T=b===e}else var T=!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 N=g===e;if(te=te||N,!te){const P=e;if(e===P)if(j&&typeof j=="object"&&!Array.isArray(j))for(const h in j){let b=j[h];const q=e,R=e;let C=!1;const F=e;if(typeof b!="string"){const U={instancePath:t+"/body/"+h.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=[U]:s.push(U),e++}var _=F===e;if(C=C||_,!C){const U=e;if(e===U)if(b&&typeof b=="object"&&!Array.isArray(b)){let I;if(b.BYTES_PER_ELEMENT===void 0&&(I="BYTES_PER_ELEMENT")||b.buffer===void 0&&(I="buffer")||b.byteLength===void 0&&(I="byteLength")||b.byteOffset===void 0&&(I="byteOffset")||b.length===void 0&&(I="length")){const re={instancePath:t+"/body/"+h.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=[re]:s.push(re),e++}else{const re=e;for(const A in b)if(!(A==="BYTES_PER_ELEMENT"||A==="buffer"||A==="byteLength"||A==="byteOffset"||A==="length")){let Y=b[A];const M=e;if(!(typeof Y=="number"&&isFinite(Y))){const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++}var k=M===e;if(!k)break}if(re===e){if(b.BYTES_PER_ELEMENT!==void 0){let A=b.BYTES_PER_ELEMENT;const Y=e;if(!(typeof A=="number"&&isFinite(A))){const M={instancePath:t+"/body/"+h.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 $=Y===e}else var $=!0;if($){if(b.buffer!==void 0){let A=b.buffer;const Y=e;if(e===Y)if(A&&typeof A=="object"&&!Array.isArray(A)){let H;if(A.byteLength===void 0&&(H="byteLength")){const oe={instancePath:t+"/body/"+h.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:H},message:"must have required property '"+H+"'"};s===null?s=[oe]:s.push(oe),e++}else{const oe=e;for(const de in A)if(de!=="byteLength"){const ge={instancePath:t+"/body/"+h.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=[ge]:s.push(ge),e++;break}if(oe===e&&A.byteLength!==void 0){let de=A.byteLength;if(!(typeof de=="number"&&isFinite(de))){const ge={instancePath:t+"/body/"+h.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=[ge]:s.push(ge),e++}}}}else{const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++}var $=Y===e}else var $=!0;if($){if(b.byteLength!==void 0){let A=b.byteLength;const Y=e;if(!(typeof A=="number"&&isFinite(A))){const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++}var $=Y===e}else var $=!0;if($){if(b.byteOffset!==void 0){let A=b.byteOffset;const Y=e;if(!(typeof A=="number"&&isFinite(A))){const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++}var $=Y===e}else var $=!0;if($)if(b.length!==void 0){let A=b.length;const Y=e;if(!(typeof A=="number"&&isFinite(A))){const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++}var $=Y===e}else var $=!0}}}}}}else{const I={instancePath:t+"/body/"+h.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 _=U===e;if(C=C||_,!C){const I=e;if(e===I)if(b&&typeof b=="object"&&!Array.isArray(b)){let A;if(b.lastModified===void 0&&(A="lastModified")||b.name===void 0&&(A="name")||b.size===void 0&&(A="size")||b.type===void 0&&(A="type")||b.webkitRelativePath===void 0&&(A="webkitRelativePath")){const Y={instancePath:t+"/body/"+h.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=[Y]:s.push(Y),e++}else{const Y=e;for(const M in b)if(!(M==="size"||M==="type"||M==="lastModified"||M==="name"||M==="webkitRelativePath")){const H={instancePath:t+"/body/"+h.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=[H]:s.push(H),e++;break}if(Y===e){if(b.size!==void 0){let M=b.size;const H=e;if(!(typeof M=="number"&&isFinite(M))){const oe={instancePath:t+"/body/"+h.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 m=H===e}else var m=!0;if(m){if(b.type!==void 0){const M=e;if(typeof b.type!="string"){const oe={instancePath:t+"/body/"+h.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 m=M===e}else var m=!0;if(m){if(b.lastModified!==void 0){let M=b.lastModified;const H=e;if(!(typeof M=="number"&&isFinite(M))){const de={instancePath:t+"/body/"+h.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 m=H===e}else var m=!0;if(m){if(b.name!==void 0){const M=e;if(typeof b.name!="string"){const oe={instancePath:t+"/body/"+h.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 m=M===e}else var m=!0;if(m)if(b.webkitRelativePath!==void 0){const M=e;if(typeof b.webkitRelativePath!="string"){const oe={instancePath:t+"/body/"+h.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 m=M===e}else var m=!0}}}}}}else{const A={instancePath:t+"/body/"+h.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 _=I===e;C=C||_}}if(C)e=R,s!==null&&(R?s.length=R:s=null);else{const U={instancePath:t+"/body/"+h.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=[U]:s.push(U),e++}var W=q===e;if(!W)break}else{const h={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[h]:s.push(h),e++}var N=P===e;te=te||N}}if(te)e=V,s!==null&&(V?s.length=V:s=null);else{const g={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[g]:s.push(g),e++,ye.errors=s,!1}var d=ee===e}else var d=!0}}}}}else return ye.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ye.errors=s,e===0}const Dt={properties:{relativeUri:{type:"string",description:"Request path following the domain:port part."},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 $=e;for(const m in r)if(!tt.call(Dt.properties,m))return pe.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if($===e){if(r.relativeUri!==void 0){const m=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 d=m===e}else var d=!0;if(d){if(r.scriptPath!==void 0){const m=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 d=m===e}else var d=!0;if(d){if(r.protocol!==void 0){const m=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 d=m===e}else var d=!0;if(d){if(r.method!==void 0){let m=r.method;const W=e;if(typeof m!="string")return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(m==="GET"||m==="POST"||m==="HEAD"||m==="OPTIONS"||m==="PATCH"||m==="PUT"||m==="DELETE"))return pe.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:st.enum},message:"must be equal to one of the allowed values"}],!1;var d=W===e}else var d=!0;if(d){if(r.headers!==void 0){let m=r.headers;const W=e;if(e===e)if(m&&typeof m=="object"&&!Array.isArray(m))for(const j in m){const ee=e;if(typeof m[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 y=ee===e;if(!y)break}else return pe.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=W===e}else var d=!0;if(d){if(r.body!==void 0){let m=r.body;const W=e,z=e;let G=!1;const j=e;if(typeof m!="string"){const V={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[V]:s.push(V),e++}var N=j===e;if(G=G||N,!G){const V=e;if(e===V)if(m&&typeof m=="object"&&!Array.isArray(m)){let c;if(m.BYTES_PER_ELEMENT===void 0&&(c="BYTES_PER_ELEMENT")||m.buffer===void 0&&(c="buffer")||m.byteLength===void 0&&(c="byteLength")||m.byteOffset===void 0&&(c="byteOffset")||m.length===void 0&&(c="length")){const S={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/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 g in m)if(!(g==="BYTES_PER_ELEMENT"||g==="buffer"||g==="byteLength"||g==="byteOffset"||g==="length")){let w=m[g];const P=e;if(!(typeof w=="number"&&isFinite(w))){const v={instancePath:t+"/body/"+g.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=[v]:s.push(v),e++}var L=P===e;if(!L)break}if(S===e){if(m.BYTES_PER_ELEMENT!==void 0){let g=m.BYTES_PER_ELEMENT;const w=e;if(!(typeof g=="number"&&isFinite(g))){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 T=w===e}else var T=!0;if(T){if(m.buffer!==void 0){let g=m.buffer;const w=e;if(e===w)if(g&&typeof g=="object"&&!Array.isArray(g)){let v;if(g.byteLength===void 0&&(v="byteLength")){const h={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"};s===null?s=[h]:s.push(h),e++}else{const h=e;for(const b in g)if(b!=="byteLength"){const q={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:b},message:"must NOT have additional properties"};s===null?s=[q]:s.push(q),e++;break}if(h===e&&g.byteLength!==void 0){let b=g.byteLength;if(!(typeof b=="number"&&isFinite(b))){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 v={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[v]:s.push(v),e++}var T=w===e}else var T=!0;if(T){if(m.byteLength!==void 0){let g=m.byteLength;const w=e;if(!(typeof g=="number"&&isFinite(g))){const v={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[v]:s.push(v),e++}var T=w===e}else var T=!0;if(T){if(m.byteOffset!==void 0){let g=m.byteOffset;const w=e;if(!(typeof g=="number"&&isFinite(g))){const v={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[v]:s.push(v),e++}var T=w===e}else var T=!0;if(T)if(m.length!==void 0){let g=m.length;const w=e;if(!(typeof g=="number"&&isFinite(g))){const v={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};s===null?s=[v]:s.push(v),e++}var T=w===e}else var T=!0}}}}}}else{const c={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};s===null?s=[c]:s.push(c),e++}var N=V===e;G=G||N}if(G)e=z,s!==null&&(z?s.length=z:s=null);else{const V={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[V]:s.push(V),e++,pe.errors=s,!1}var d=W===e}else var d=!0;if(d){if(r.env!==void 0){let m=r.env;const W=e;if(e===W)if(m&&typeof m=="object"&&!Array.isArray(m))for(const G in m){const j=e;if(typeof m[G]!="string")return pe.errors=[{instancePath:t+"/env/"+G.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=j===e;if(!_)break}else return pe.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=W===e}else var d=!0;if(d){if(r.$_SERVER!==void 0){let m=r.$_SERVER;const W=e;if(e===W)if(m&&typeof m=="object"&&!Array.isArray(m))for(const G in m){const j=e;if(typeof m[G]!="string")return pe.errors=[{instancePath:t+"/$_SERVER/"+G.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/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+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=W===e}else var d=!0;if(d)if(r.code!==void 0){const m=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 d=m===e}else var d=!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 lr;if(r.step===void 0&&(lr="step"))return o.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:lr},message:"must have required property '"+lr+"'"}],!1;{const J=r.step;if(typeof J=="string")if(J==="activatePlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let l;if(r.pluginPath===void 0&&(l="pluginPath")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 d=E===e}else var d=!0;if(d)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 d=a===e}else var d=!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 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/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 y=p===e}else var y=!0;if(y){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 y=i===e}else var y=!0;if(y)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 y=i===e}else var y=!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 l;if(r.step===void 0&&(l="step")||r.themeFolderName===void 0&&(l="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 N=E===e}else var N=!0;if(N)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 N=a===e}else var N=!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 L=p===e}else var L=!0;if(L){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 L=p===e}else var L=!0;if(L)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 L=i===e}else var L=!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 l;if(r.fromPath===void 0&&(l="fromPath")||r.step===void 0&&(l="step")||r.toPath===void 0&&(l="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/2/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/2/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/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 _=p===e}else var _=!0;if(_){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 _=i===e}else var _=!0;if(_)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 _=i===e}else var _=!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 l;if(r.consts===void 0&&(l="consts")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 k=E===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/3/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/3/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/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 $=p===e}else var $=!0;if($){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 $=p===e}else var $=!0;if($){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:rr.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var $=p===e}else var $=!0;if($)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 $=i===e}else var $=!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 l;if(r.siteUrl===void 0&&(l="siteUrl")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/4/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/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var W=p===e}else var W=!0;if(W){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 W=p===e}else var W=!0;if(W)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 W=i===e}else var W=!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 l;if(r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 z=E===e}else var z=!0;if(z)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 z=a===e}else var z=!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 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/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 G=p===e}else var G=!0;if(G)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 G=i===e}else var G=!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 l;if(r.file===void 0&&(l="file")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/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=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/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=p===e}else var ee=!0;if(ee){if(r.file!==void 0){const i=e;K(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var ee=i===e}else var ee=!0;if(ee)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:rr.oneOf[6].properties.importer.enum},message:"must be equal to one of the allowed values"}],!1;var ee=p===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 l;if(r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/7/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/7/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var te=p===e}else var te=!0;if(te){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 te=p===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 l;if(r.step===void 0&&(l="step")||r.wordPressFilesZip===void 0&&(l="wordPressFilesZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/8/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/8/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/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 S=p===e}else var S=!0;if(S){if(r.wordPressFilesZip!==void 0){const i=e;K(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var S=i===e}else var S=!0;if(S)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 S=i===e}else var S=!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 l;if(r.pluginData===void 0&&(l="pluginData")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 g=E===e}else var g=!0;if(g)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 g=a===e}else var g=!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=p===e}else var w=!0;if(w){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:rr.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var w=p===e}else var w=!0;if(w){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 w=p===e}else var w=!0;if(w){if(r.pluginData!==void 0){let i=r.pluginData;const p=e,O=e;let a=!1;const E=e;K(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var P=E===e;if(a=a||P,!a){const X=e;he(i,{instancePath:t+"/pluginData",parentData:r,parentDataProperty:"pluginData",rootData:u})||(s=s===null?he.errors:s.concat(he.errors),e=s.length);var P=X===e;a=a||P}if(a)e=O,s!==null&&(O?s.length=O: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=p===e}else var w=!0;if(w){if(r.pluginZipFile!==void 0){const i=e;K(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var w=i===e}else var w=!0;if(w)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 v=ie===e}else var v=!0;if(v)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 v=ie===e}else var v=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var w=p===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 l;if(r.step===void 0&&(l="step")||r.themeData===void 0&&(l="themeData"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/10/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/10/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/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:rr.oneOf[10].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/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 b=p===e}else var b=!0;if(b){if(r.themeData!==void 0){let i=r.themeData;const p=e,O=e;let a=!1;const E=e;K(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var q=E===e;if(a=a||q,!a){const X=e;he(i,{instancePath:t+"/themeData",parentData:r,parentDataProperty:"themeData",rootData:u})||(s=s===null?he.errors:s.concat(he.errors),e=s.length);var q=X===e;a=a||q}if(a)e=O,s!==null&&(O?s.length=O: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 b=p===e}else var b=!0;if(b){if(r.themeZipFile!==void 0){const i=e;K(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:u})||(s=s===null?K.errors:s.concat(K.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==="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 R=ie===e}else var R=!0;if(R){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 R=ie===e}else var R=!0;if(R)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 R=ie===e}else var R=!0}}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallThemeOptions/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/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 l;if(r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/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=p===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 l;if(r.path===void 0&&(l="path")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 U=E===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/12/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/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(J==="mv"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let l;if(r.fromPath===void 0&&(l="fromPath")||r.step===void 0&&(l="step")||r.toPath===void 0&&(l="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/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=p===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 l;if(r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/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 Y=p===e}else var Y=!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 l;if(r.request===void 0&&(l="request")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 H=p===e}else var H=!0;if(H){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 H=p===e}else var H=!0;if(H)if(r.request!==void 0){const i=e;ye(r.request,{instancePath:t+"/request",parentData:r,parentDataProperty:"request",rootData:u})||(s=s===null?ye.errors:s.concat(ye.errors),e=s.length);var H=i===e}else var H=!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 l;if(r.path===void 0&&(l="path")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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(J==="rmdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let l;if(r.path===void 0&&(l="path")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/17/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/17/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/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 Ee=p===e}else var Ee=!0;if(Ee)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 Ee=i===e}else var Ee=!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 l;if(r.code===void 0&&(l="code")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 We=E===e}else var We=!0;if(We)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 We=a===e}else var We=!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 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/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 qe=p===e}else var qe=!0;if(qe)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 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 nr=E===e;if(a=a||nr,!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 Te={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=[Te]:s.push(Te),e++}else{const Te=e;for(const ne in i)if(!(ne==="filename"||ne==="content")){const _e={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=[_e]:s.push(_e),e++;break}if(Te===e){if(i.filename!==void 0){const ne=e;if(typeof i.filename!="string"){const _e={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=[_e]:s.push(_e),e++}var Ue=ne===e}else var Ue=!0;if(Ue)if(i.content!==void 0){const ne=e;if(typeof i.content!="string"){const Q={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=[Q]:s.push(Q),e++}var Ue=ne===e}else var Ue=!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 nr=X===e;a=a||nr}if(a)e=O,s!==null&&(O?s.length=O: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 qe=p===e}else var qe=!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 l;if(r.options===void 0&&(l="options")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/19/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/19/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/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 $e=p===e}else var $e=!0;if($e)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 $e=i===e}else var $e=!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 l;if(r.options===void 0&&(l="options")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/20/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/20/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/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 Ae=p===e}else var Ae=!0;if(Ae)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 Me=ie===e}else var Me=!0;if(Me)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 Me=ie===e}else var Me=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=p===e}else var Ae=!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 l;if(r.sql===void 0&&(l="sql")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/21/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/21/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/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 Re=p===e}else var Re=!0;if(Re)if(r.sql!==void 0){const i=e;K(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var Re=i===e}else var Re=!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 l;if(r.options===void 0&&(l="options")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/22/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/22/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/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=p===e}else var Fe=!0;if(Fe)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 Fe=p===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 l;if(r.extractToPath===void 0&&(l="extractToPath")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/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 ue=p===e}else var ue=!0;if(ue){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 ue=p===e}else var ue=!0;if(ue){if(r.zipFile!==void 0){const i=e;K(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var ue=i===e}else var ue=!0;if(ue){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 ue=i===e}else var ue=!0;if(ue)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 ue=i===e}else var ue=!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 l;if(r.meta===void 0&&(l="meta")||r.step===void 0&&(l="step")||r.userId===void 0&&(l="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/24/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/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var be=p===e}else var be=!0;if(be){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 be=p===e}else var be=!0;if(be){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 be=p===e}else var be=!0;if(be)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 be=p===e}else var be=!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 l;if(r.data===void 0&&(l="data")||r.path===void 0&&(l="path")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/25/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/25/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/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 we=p===e}else var we=!0;if(we){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 we=i===e}else var we=!0;if(we)if(r.data!==void 0){let i=r.data;const p=e,O=e;let a=!1;const E=e;K(i,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var Ne=E===e;if(a=a||Ne,!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 Ne=X===e;if(a=a||Ne,!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 _e={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=[_e]:s.push(_e),e++}else{const _e=e;for(const Q in i)if(!(Q==="BYTES_PER_ELEMENT"||Q==="buffer"||Q==="byteLength"||Q==="byteOffset"||Q==="length")){let me=i[Q];const Ke=e;if(!(typeof me=="number"&&isFinite(me))){const fe={instancePath:t+"/data/"+Q.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 nt=Ke===e;if(!nt)break}if(_e===e){if(i.BYTES_PER_ELEMENT!==void 0){let Q=i.BYTES_PER_ELEMENT;const me=e;if(!(typeof Q=="number"&&isFinite(Q))){const Ke={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=[Ke]:s.push(Ke),e++}var ce=me===e}else var ce=!0;if(ce){if(i.buffer!==void 0){let Q=i.buffer;const me=e;if(e===me)if(Q&&typeof Q=="object"&&!Array.isArray(Q)){let fe;if(Q.byteLength===void 0&&(fe="byteLength")){const er={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=[er]:s.push(er),e++}else{const er=e;for(const xe in Q)if(xe!=="byteLength"){const Ce={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:xe},message:"must NOT have additional properties"};s===null?s=[Ce]:s.push(Ce),e++;break}if(er===e&&Q.byteLength!==void 0){let xe=Q.byteLength;if(!(typeof xe=="number"&&isFinite(xe))){const Ce={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=[Ce]:s.push(Ce),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 ce=me===e}else var ce=!0;if(ce){if(i.byteLength!==void 0){let Q=i.byteLength;const me=e;if(!(typeof Q=="number"&&isFinite(Q))){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 ce=me===e}else var ce=!0;if(ce){if(i.byteOffset!==void 0){let Q=i.byteOffset;const me=e;if(!(typeof Q=="number"&&isFinite(Q))){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 ce=me===e}else var ce=!0;if(ce)if(i.length!==void 0){let Q=i.length;const me=e;if(!(typeof Q=="number"&&isFinite(Q))){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 ce=me===e}else var ce=!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 Ne=le===e;a=a||Ne}}if(a)e=O,s!==null&&(O?s.length=O: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 we=p===e}else var we=!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 l;if(r.filesTree===void 0&&(l="filesTree")||r.step===void 0&&(l="step")||r.writeToPath===void 0&&(l="writeToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/26/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/26/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/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 ve=p===e}else var ve=!0;if(ve){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 ve=i===e}else var ve=!0;if(ve)if(r.filesTree!==void 0){const i=e;he(r.filesTree,{instancePath:t+"/filesTree",parentData:r,parentDataProperty:"filesTree",rootData:u})||(s=s===null?he.errors:s.concat(he.errors),e=s.length);var ve=i===e}else var ve=!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 l;if(r.command===void 0&&(l="command")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/27/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/27/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/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 Pe=p===e}else var Pe=!0;if(Pe){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 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 pr=E===e;if(a=a||pr,!a){const X=e;if(e===X)if(Array.isArray(i)){var Tr=!0;const le=i.length;for(let Te=0;Te<le;Te++){const ne=e;if(typeof i[Te]!="string"){const Q={instancePath:t+"/command/"+Te,schemaPath:"#/oneOf/27/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[Q]:s.push(Q),e++}var Tr=ne===e;if(!Tr)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 pr=X===e;a=a||pr}if(a)e=O,s!==null&&(O?s.length=O: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 Pe=p===e}else var Pe=!0;if(Pe)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 Pe=i===e}else var Pe=!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 l;if(r.language===void 0&&(l="language")||r.step===void 0&&(l="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/28/required",keyword:"required",params:{missingProperty:l},message:"must have required property '"+l+"'"}],!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 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/28/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/28/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/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 Le=p===e}else var Le=!0;if(Le)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 Le=i===e}else var Le=!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 Z(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 c in r)if(!tt.call(St.properties,c))return Z.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"}],!1;if(te===e){if(r.landingPage!==void 0){const c=e;if(typeof r.landingPage!="string")return Z.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=c===e}else var d=!0;if(d){if(r.description!==void 0){const c=e;if(typeof r.description!="string")return Z.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=c===e}else var d=!0;if(d){if(r.meta!==void 0){let c=r.meta;const S=e;if(e===S)if(c&&typeof c=="object"&&!Array.isArray(c)){let w;if(c.title===void 0&&(w="title")||c.author===void 0&&(w="author"))return Z.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:w},message:"must have required property '"+w+"'"}],!1;{const P=e;for(const v in c)if(!(v==="title"||v==="description"||v==="author"||v==="categories"))return Z.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"}],!1;if(P===e){if(c.title!==void 0){const v=e;if(typeof c.title!="string")return Z.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=v===e}else var y=!0;if(y){if(c.description!==void 0){const v=e;if(typeof c.description!="string")return Z.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=v===e}else var y=!0;if(y){if(c.author!==void 0){const v=e;if(typeof c.author!="string")return Z.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=v===e}else var y=!0;if(y)if(c.categories!==void 0){let v=c.categories;const h=e;if(e===h)if(Array.isArray(v)){var N=!0;const q=v.length;for(let R=0;R<q;R++){const C=e;if(typeof v[R]!="string")return Z.errors=[{instancePath:t+"/meta/categories/"+R,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=C===e;if(!N)break}}else return Z.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var y=h===e}else var y=!0}}}}}else return Z.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=S===e}else var d=!0;if(d){if(r.preferredVersions!==void 0){let c=r.preferredVersions;const S=e;if(e===S)if(c&&typeof c=="object"&&!Array.isArray(c)){let w;if(c.php===void 0&&(w="php")||c.wp===void 0&&(w="wp"))return Z.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:w},message:"must have required property '"+w+"'"}],!1;{const P=e;for(const v in c)if(!(v==="php"||v==="wp"))return Z.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"}],!1;if(P===e){if(c.php!==void 0){let v=c.php;const h=e,b=e;let q=!1;const R=e;if(typeof v!="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(!(v==="8.4"||v==="8.3"||v==="8.2"||v==="8.1"||v==="8.0"||v==="7.4"||v==="7.3"||v==="7.2")){const C={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:Nt.enum},message:"must be equal to one of the allowed values"};s===null?s=[C]:s.push(C),e++}var L=R===e;if(q=q||L,!q){const C=e;if(typeof v!="string"){const U={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[U]:s.push(U),e++}if(v!=="latest"){const U={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=[U]:s.push(U),e++}var L=C===e;q=q||L}if(q)e=b,s!==null&&(b?s.length=b: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++,Z.errors=s,!1}var T=h===e}else var T=!0;if(T)if(c.wp!==void 0){const v=e;if(typeof c.wp!="string")return Z.errors=[{instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var T=v===e}else var T=!0}}}else return Z.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=S===e}else var d=!0;if(d){if(r.features!==void 0){let c=r.features;const S=e;if(e===S)if(c&&typeof c=="object"&&!Array.isArray(c)){const w=e;for(const P in c)if(!(P==="intl"||P==="networking"))return Z.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(w===e){if(c.intl!==void 0){const P=e;if(typeof c.intl!="boolean")return Z.errors=[{instancePath:t+"/features/intl",schemaPath:"#/properties/features/properties/intl/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var _=P===e}else var _=!0;if(_)if(c.networking!==void 0){const P=e;if(typeof c.networking!="boolean")return Z.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var _=P===e}else var _=!0}}else return Z.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=S===e}else var d=!0;if(d){if(r.extraLibraries!==void 0){let c=r.extraLibraries;const S=e;if(e===S)if(Array.isArray(c)){var k=!0;const w=c.length;for(let P=0;P<w;P++){let v=c[P];const h=e;if(typeof v!="string")return Z.errors=[{instancePath:t+"/extraLibraries/"+P,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(v!=="wp-cli")return Z.errors=[{instancePath:t+"/extraLibraries/"+P,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var k=h===e;if(!k)break}}else return Z.errors=[{instancePath:t+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var d=S===e}else var d=!0;if(d){if(r.constants!==void 0){let c=r.constants;const S=e;if(e===e)if(c&&typeof c=="object"&&!Array.isArray(c))for(const P in c){let v=c[P];const h=e;if(typeof v!="string"&&typeof v!="boolean"&&!(typeof v=="number"&&isFinite(v)))return Z.errors=[{instancePath:t+"/constants/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPConstants/additionalProperties/type",keyword:"type",params:{type:xt.additionalProperties.type},message:"must be string,boolean,number"}],!1;var $=h===e;if(!$)break}else return Z.errors=[{instancePath:t+"/constants",schemaPath:"#/definitions/PHPConstants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=S===e}else var d=!0;if(d){if(r.plugins!==void 0){let c=r.plugins;const S=e;if(e===S)if(Array.isArray(c)){var m=!0;const w=c.length;for(let P=0;P<w;P++){let v=c[P];const h=e,b=e;let q=!1;const R=e;if(typeof v!="string"){const F={instancePath:t+"/plugins/"+P,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 W=R===e;if(q=q||W,!q){const F=e;K(v,{instancePath:t+"/plugins/"+P,parentData:c,parentDataProperty:P,rootData:u})||(s=s===null?K.errors:s.concat(K.errors),e=s.length);var W=F===e;q=q||W}if(q)e=b,s!==null&&(b?s.length=b:s=null);else{const F={instancePath:t+"/plugins/"+P,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[F]:s.push(F),e++,Z.errors=s,!1}var m=h===e;if(!m)break}}else return Z.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var d=S===e}else var d=!0;if(d){if(r.siteOptions!==void 0){let c=r.siteOptions;const S=e;if(e===S)if(c&&typeof c=="object"&&!Array.isArray(c)){const w=e;for(const P in c)if(P!=="blogname"){const v=e;if(typeof c[P]!="string")return Z.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 z=v===e;if(!z)break}if(w===e&&c.blogname!==void 0&&typeof c.blogname!="string")return Z.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return Z.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=S===e}else var d=!0;if(d){if(r.login!==void 0){let c=r.login;const S=e,g=e;let w=!1;const P=e;if(typeof c!="boolean"){const h={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};s===null?s=[h]:s.push(h),e++}var G=P===e;if(w=w||G,!w){const h=e;if(e===h)if(c&&typeof c=="object"&&!Array.isArray(c)){let q;if(c.username===void 0&&(q="username")||c.password===void 0&&(q="password")){const R={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:q},message:"must have required property '"+q+"'"};s===null?s=[R]:s.push(R),e++}else{const R=e;for(const C in c)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(R===e){if(c.username!==void 0){const C=e;if(typeof c.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(c.password!==void 0){const C=e;if(typeof c.password!="string"){const U={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};s===null?s=[U]:s.push(U),e++}var j=C===e}else var j=!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 G=h===e;w=w||G}if(w)e=g,s!==null&&(g?s.length=g:s=null);else{const h={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[h]:s.push(h),e++,Z.errors=s,!1}var d=S===e}else var d=!0;if(d){if(r.steps!==void 0){let c=r.steps;const S=e;if(e===S)if(Array.isArray(c)){var ee=!0;const w=c.length;for(let P=0;P<w;P++){let v=c[P];const h=e,b=e;let q=!1;const R=e;o(v,{instancePath:t+"/steps/"+P,parentData:c,parentDataProperty:P,rootData:u})||(s=s===null?o.errors:s.concat(o.errors),e=s.length);var V=R===e;if(q=q||V,!q){const F=e;if(typeof v!="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 V=F===e;if(q=q||V,!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 V=D===e;if(q=q||V,!q){const A=e;if(typeof v!="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(v!==!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 V=A===e;if(q=q||V,!q){const M=e;if(v!==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 V=M===e;q=q||V}}}}if(q)e=b,s!==null&&(b?s.length=b:s=null);else{const F={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return s===null?s=[F]:s.push(F),e++,Z.errors=s,!1}var ee=h===e;if(!ee)break}}else return Z.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var d=S===e}else var d=!0;if(d)if(r.$schema!==void 0){const c=e;if(typeof r.$schema!="string")return Z.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=c===e}else var d=!0}}}}}}}}}}}}else return Z.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Z.errors=s,e===0}function tr(r,{instancePath:t="",parentData:n,parentDataProperty:f,rootData:u=r}={}){let s=null,e=0;return Z(r,{instancePath:t,parentData:n,parentDataProperty:f,rootData:u})||(s=s===null?Z.errors:s.concat(Z.errors),e=s.length),tr.errors=s,e===0}const{wpCLI:It,...Er}=Lt,Wt={...Er,"wp-cli":It,importFile:Er.importWxr};async function kr(r,t={}){const n={...t};let f;return Or(r)?(f=await it(r),n.streamBundledFile=function(...u){return r.read(...u)}):f=r,Ut(f,n)}function Or(r){return r&&"read"in r&&typeof r.read=="function"}async function it(r){if(!Or(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}function Ut(r,{progress:t=new dr.ProgressTracker,semaphore:n=new B.Semaphore({concurrency:3}),onStepCompleted:f=()=>{},onBlueprintValidated:u=()=>{},corsProxy:s,streamBundledFile:e,additionalSteps:d}={}){var m,W,z,G,j,ee,V,te,c,S;r=structuredClone(r),r={...r,steps:(r.steps||[]).filter(Mt).filter(zt)},r.steps=[...r.steps||[],...d||[]];for(const g of r.steps)!g||typeof g!="object"||(g.step==="importFile"?(g.step="importWxr",ae.logger.warn('The "importFile" step is deprecated. Use "importWxr" instead.')):(g==null?void 0:g.step)==="installPlugin"&&"pluginZipFile"in g?(g.pluginData=g.pluginZipFile,ae.logger.warn('The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.')):(g==null?void 0:g.step)==="installTheme"&&"themeZipFile"in g&&(g.themeData=g.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 g=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(...g)}r.login&&r.steps.push({step:"login",...r.login===!0?{username:"admin"}:r.login});const y=((m=r.steps)==null?void 0:m.findIndex(g=>typeof g=="object"&&(g==null?void 0:g.step)&&["wp-cli","enableMultisite"].includes(g.step)))??-1;if((W=r==null?void 0:r.extraLibraries)!=null&&W.includes("wp-cli")||y!==-1){const g={step:"writeFile",data:Et,path:br};y===-1?(z=r.steps)==null||z.push(g):(G=r.steps)==null||G.splice(y,0,g)}const N=(j=r.steps)==null?void 0:j.findIndex(g=>typeof g=="object"&&(g==null?void 0:g.step)==="importWxr");N!==void 0&&N>-1&&((ee=r.steps)==null||ee.splice(N,0,{step:"installPlugin",pluginData:{resource:"wordpress.org/plugins",slug:"wordpress-importer"}}));const{valid:L,errors:T}=Bt(r);if(!L){const g=new Error(`Invalid blueprint: ${T[0].message} at ${T[0].instancePath}`);throw g.errors=T,g}u(r);const _=r.steps||[],k=_.reduce((g,w)=>{var P;return g+(((P=w.progress)==null?void 0:P.weight)||1)},0),$=_.map(g=>Ht(g,{semaphore:n,rootProgressTracker:t,totalProgressWeight:k,corsProxy:s,streamBundledFile:e}));return{versions:{php:Vt((V=r.preferredVersions)==null?void 0:V.php,De.SupportedPHPVersions,De.LatestSupportedPHPVersion),wp:((te=r.preferredVersions)==null?void 0:te.wp)||"latest"},features:{intl:((c=r.features)==null?void 0:c.intl)??!1,networking:((S=r.features)==null?void 0:S.networking)??!0},extraLibraries:r.extraLibraries||[],run:async g=>{try{for(const{resources:w}of $)for(const P of w)P.setPlayground(g),P.isAsync&&P.resolve().catch(()=>{});for(const[w,{run:P,step:v}]of Object.entries($))try{const h=await P(g);f(h,v)}catch(h){throw new Error(`Error when executing the blueprint step #${w} (${JSON.stringify(v)}) ${h instanceof Error?`: ${h.message}`:h}`,{cause:h})}}finally{try{const w=await g.pathToInternalUrl(r.landingPage||"/");await g.goTo("/index.php?playground-redirection-handler&next="+encodeURIComponent(w))}catch{}t.finish()}}}}function Bt(r){var u;const t=tr(r);if(t)return{valid:t};const n=new Set;for(const s of tr.errors)s.schemaPath.startsWith("#/properties/steps/items/anyOf")||n.add(s.instancePath);const f=(u=tr.errors)==null?void 0:u.filter(s=>!(s.schemaPath.startsWith("#/properties/steps/items/anyOf")&&n.has(s.instancePath)));return{valid:t,errors:f}}function Vt(r,t,n){return r&&t.includes(r)?r:n}function Mt(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 Ht(r,{semaphore:t,rootProgressTracker:n,totalProgressWeight:f,corsProxy:u,streamBundledFile:s}){var _;const e=n.stage((((_=r.progress)==null?void 0:_.weight)||1)/f),d={};for(const k of Object.keys(r)){let $=r[k];ut($)&&($=Oe.create($,{semaphore:t,corsProxy:u,streamBundledFile:s})),d[k]=$}const y=async k=>{var $;try{return e.fillSlowly(),await Wt[r.step](k,await Zt(d),{tracker:e,initialCaption:($=r.progress)==null?void 0:$.caption})}finally{e.finish()}},N=qr(d),L=qr(d).filter(k=>k.isAsync),T=1/(L.length+1);for(const k of L)k.progress=e.stage(T);return{run:y,step:r,resources:N}}function qr(r){const t=[];for(const n in r){const f=r[n];f instanceof Oe&&t.push(f)}return t}async function Zt(r){const t={};for(const n in r){const f=r[n];f instanceof Oe?t[n]=await f.resolve():t[n]=f}return t}async function ot(r,t){await r.run(t)}async function at(){const r=(await Promise.resolve().then(()=>require("./blueprints-DY7omvFh.cjs"))).default;return new File([r],"blueprints.phar",{type:"application/zip"})}function Yt(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 Gt(r){var L,T;const t=r.cliArgs||[];for(const _ of t)if(_.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(_=>_.startsWith("--db-engine="))||t.push("--db-engine=sqlite");const f=r.php,u=(r==null?void 0:r.onMessage)||(()=>{}),s=await at();f.writeFile("/tmp/blueprints.phar",new Uint8Array(await s.arrayBuffer()));const e=Yt(r.blueprint);let d="";switch(e.type){case"inline-file":f.writeFile("/tmp/blueprint.json",e.contents),d="/tmp/blueprint.json";break;case"file-reference":d=e.reference;break}const y=await f.onMessage(async _=>{try{const k=typeof _=="string"?JSON.parse(_):_;if(!k)return;await new Promise($=>setTimeout($,0)),k.type.startsWith("blueprint.")&&await u(k)}catch(k){ae.logger.warn("Failed to parse message as JSON:",_,k)}});await(f==null?void 0:f.writeFile("/tmp/run-blueprints.php",`<?php
530
530
  function playground_http_client_factory() {
531
531
  return new WordPress\\HttpClient\\Client([
532
532
  // sockets transport is somehow faster than curl in Playground. Maybe
@@ -607,5 +607,5 @@ function playground_progress_reporter() {
607
607
  }
608
608
  playground_add_filter('blueprint.progress_reporter', 'playground_progress_reporter');
609
609
  require( "/tmp/blueprints.phar" );
610
- `));const N=await d.cli(["/internal/shared/bin/php","/tmp/run-blueprints.php","exec",f,...t]);return N.finished.finally(y),N}async function Zt(r){const t=await fetch(r,{credentials:"omit"});if(!t.ok)throw new Error(`Failed to fetch blueprint from ${r}`);const n=await t.arrayBuffer();try{const d=new TextDecoder().decode(n);return JSON.parse(d),new je.OverlayFilesystem([new je.InMemoryFilesystem({"blueprint.json":d}),new je.FetchFilesystem({baseUrl:r})])}catch{if(await Yt(n))return je.ZipFilesystem.fromArrayBuffer(n);throw new Error(`Blueprint file at ${r} is neither a valid JSON nor a ZIP file.`)}}async function Yt(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}function Gt(){}exports.activatePlugin=ur;exports.activateTheme=cr;exports.compileBlueprint=rt;exports.compileBlueprintV1=rt;exports.cp=Cr;exports.defineSiteUrl=br;exports.defineWpConfigConsts=sr;exports.enableMultisite=xr;exports.exportWXR=Mr;exports.getBlueprintDeclaration=tt;exports.getV2Runner=it;exports.importThemeStarterContent=wr;exports.importWordPressFiles=Vr;exports.importWxr=Br;exports.installPlugin=Hr;exports.installTheme=Zr;exports.isBlueprintBundle=Pr;exports.login=Yr;exports.mkdir=Ir;exports.mv=Dr;exports.request=Lr;exports.resetData=Gr;exports.resolveRemoteBlueprint=Zt;exports.rm=mr;exports.rmdir=Wr;exports.runBlueprintSteps=st;exports.runBlueprintV1Steps=st;exports.runBlueprintV2=Ht;exports.runPHP=Ar;exports.runPHPWithOptions=Rr;exports.runSql=Fr;exports.runWpInstallationWizard=Qr;exports.setPluginProxyURL=Gt;exports.setSiteLanguage=Xr;exports.setSiteOptions=yr;exports.unzip=or;exports.updateUserMeta=Sr;exports.wpCLI=gr;exports.wpContentFilesExcludedFromExport=vr;exports.writeFile=ir;exports.writeFiles=Ur;exports.zipWpContent=Jr;
610
+ `));const N=await f.cli(["/internal/shared/bin/php","/tmp/run-blueprints.php","exec",d,...t]);return N.finished.finally(y),N}async function Qt(r){const t=await fetch(r,{credentials:"omit"});if(!t.ok)throw new Error(`Failed to fetch blueprint from ${r}`);const n=await t.arrayBuffer();try{const f=new TextDecoder().decode(n);return JSON.parse(f),new je.OverlayFilesystem([new je.InMemoryFilesystem({"blueprint.json":f}),new je.FetchFilesystem({baseUrl:r})])}catch{if(await Jt(n))return je.ZipFilesystem.fromArrayBuffer(n);throw new Error(`Blueprint file at ${r} is neither a valid JSON nor a ZIP file.`)}}async function Jt(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 Xt(r){if((await Ie.create(r)).getVersion()===1){const n=await kr(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:ur.RecommendedPHPVersion,wpVersion:"latest",intl:!1,networking:!0,constants:{},extraLibraries:[]}}function Kt(){}exports.BlueprintReflection=Ie;exports.activatePlugin=mr;exports.activateTheme=yr;exports.compileBlueprint=kr;exports.compileBlueprintV1=kr;exports.cp=Wr;exports.defineSiteUrl=vr;exports.defineWpConfigConsts=ir;exports.enableMultisite=Ir;exports.exportWXR=Zr;exports.getBlueprintDeclaration=it;exports.getV2Runner=at;exports.importThemeStarterContent=Pr;exports.importWordPressFiles=Hr;exports.importWxr=zr;exports.installPlugin=Gr;exports.installTheme=Qr;exports.isBlueprintBundle=Or;exports.login=Jr;exports.mkdir=Br;exports.mv=Ur;exports.request=xr;exports.resetData=Xr;exports.resolveRemoteBlueprint=Qt;exports.resolveRuntimeConfiguration=Xt;exports.rm=hr;exports.rmdir=Vr;exports.runBlueprintSteps=ot;exports.runBlueprintV1Steps=ot;exports.runBlueprintV2=Gt;exports.runPHP=Lr;exports.runPHPWithOptions=Sr;exports.runSql=Nr;exports.runWpInstallationWizard=Kr;exports.setPluginProxyURL=Kt;exports.setSiteLanguage=rt;exports.setSiteOptions=gr;exports.unzip=ar;exports.updateUserMeta=Cr;exports.wpCLI=wr;exports.wpContentFilesExcludedFromExport=_r;exports.writeFile=or;exports.writeFiles=Mr;exports.zipWpContent=et;
611
611
  //# sourceMappingURL=index.cjs.map